From cc106944b3679a9cd53bfd8204e6df938599a54a Mon Sep 17 00:00:00 2001 From: Michele Zanda Date: Thu, 1 Feb 2018 16:04:41 +0100 Subject: [PATCH] Commit just for tag 1.28.3-ion49 --- CHANGELOG_ION.md | 5 + dist_ion/plotly-ion.js | 1172 ++++++++++++++++++------------------ dist_ion/plotly-ion.min.js | 48 +- package.json | 2 +- 4 files changed, 614 insertions(+), 613 deletions(-) diff --git a/CHANGELOG_ION.md b/CHANGELOG_ION.md index 9c88ed7c409..7a63bc3d0c9 100644 --- a/CHANGELOG_ION.md +++ b/CHANGELOG_ION.md @@ -1,5 +1,10 @@ # plotly.js ION changelog +## [1.28.3-ion49] -- 2018-02-01 + +### [ATPWM-898] Support for correct management of dates on mobile devices. Earlier it worked accidentally on desktop envs. + + ## [1.28.3-ion48] -- 2018-01-02 ### Disable autoscroll on windowed axes while dragged in the past diff --git a/dist_ion/plotly-ion.js b/dist_ion/plotly-ion.js index dbfcfc52038..35689a28cd9 100644 --- a/dist_ion/plotly-ion.js +++ b/dist_ion/plotly-ion.js @@ -323,6 +323,496 @@ module.exports = require('../src/traces/pie'); module.exports = require('../src/traces/scattergeo'); },{"../src/traces/scattergeo":332}],12:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +EventEmitter.defaultMaxListeners = 10; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; +}; + +EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + + if (!this._events) + this._events = {}; + + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event + } else { + // At least give some kind of context to the user + var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + err.context = er; + throw err; + } + } + } + + handler = this._events[type]; + + if (isUndefined(handler)) + return false; + + if (isFunction(handler)) { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + args = Array.prototype.slice.call(arguments, 1); + handler.apply(this, args); + } + } else if (isObject(handler)) { + args = Array.prototype.slice.call(arguments, 1); + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } + + return true; +}; + +EventEmitter.prototype.addListener = function(type, listener) { + var m; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events) + this._events = {}; + + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + else if (isObject(this._events[type])) + // If we've already got an array, just append. + this._events[type].push(listener); + else + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } + } + } + + return this; +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + var fired = false; + + function g() { + this.removeListener(type, g); + + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + + g.listener = listener; + this.on(type, g); + + return this; +}; + +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events || !this._events[type]) + return this; + + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } + + return this; +}; + +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } + + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else if (listeners) { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + + return this; +}; + +EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; +}; + +EventEmitter.prototype.listenerCount = function(type) { + if (this._events) { + var evlistener = this._events[type]; + + if (isFunction(evlistener)) + return 1; + else if (evlistener) + return evlistener.length; + } + return 0; +}; + +EventEmitter.listenerCount = function(emitter, type) { + return emitter.listenerCount(type); +}; + +function isFunction(arg) { + return typeof arg === 'function'; +} + +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isUndefined(arg) { + return arg === void 0; +} + +},{}],13:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],14:[function(require,module,exports){ module.exports = { AFG: 'afghan', ALA: '\\b\\wland', @@ -581,7 +1071,7 @@ module.exports = { ZWE: 'zimbabwe|^(?!.*northern).*rhodesia' } -},{}],13:[function(require,module,exports){ +},{}],15:[function(require,module,exports){ !function() { var d3 = { version: "3.5.17" @@ -10136,7 +10626,7 @@ module.exports = { }); if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3; }(); -},{}],14:[function(require,module,exports){ +},{}],16:[function(require,module,exports){ (function (process,global){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. @@ -11293,311 +11783,7 @@ return Promise; }))); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":21}],15:[function(require,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -function EventEmitter() { - this._events = this._events || {}; - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; - -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; - -// By default EventEmitters will print a warning if more than 10 listeners are -// added to it. This is a useful default which helps finding memory leaks. -EventEmitter.defaultMaxListeners = 10; - -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -EventEmitter.prototype.setMaxListeners = function(n) { - if (!isNumber(n) || n < 0 || isNaN(n)) - throw TypeError('n must be a positive number'); - this._maxListeners = n; - return this; -}; - -EventEmitter.prototype.emit = function(type) { - var er, handler, len, args, i, listeners; - - if (!this._events) - this._events = {}; - - // If there is no 'error' event listener then throw. - if (type === 'error') { - if (!this._events.error || - (isObject(this._events.error) && !this._events.error.length)) { - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } else { - // At least give some kind of context to the user - var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); - err.context = er; - throw err; - } - } - } - - handler = this._events[type]; - - if (isUndefined(handler)) - return false; - - if (isFunction(handler)) { - switch (arguments.length) { - // fast cases - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - // slower - default: - args = Array.prototype.slice.call(arguments, 1); - handler.apply(this, args); - } - } else if (isObject(handler)) { - args = Array.prototype.slice.call(arguments, 1); - listeners = handler.slice(); - len = listeners.length; - for (i = 0; i < len; i++) - listeners[i].apply(this, args); - } - - return true; -}; - -EventEmitter.prototype.addListener = function(type, listener) { - var m; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events) - this._events = {}; - - // To avoid recursion in the case that type === "newListener"! Before - // adding it to the listeners, first emit "newListener". - if (this._events.newListener) - this.emit('newListener', type, - isFunction(listener.listener) ? - listener.listener : listener); - - if (!this._events[type]) - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - else if (isObject(this._events[type])) - // If we've already got an array, just append. - this._events[type].push(listener); - else - // Adding the second element, need to change to array. - this._events[type] = [this._events[type], listener]; - - // Check for listener leak - if (isObject(this._events[type]) && !this._events[type].warned) { - if (!isUndefined(this._maxListeners)) { - m = this._maxListeners; - } else { - m = EventEmitter.defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - if (typeof console.trace === 'function') { - // not supported in IE 10 - console.trace(); - } - } - } - - return this; -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.once = function(type, listener) { - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - var fired = false; - - function g() { - this.removeListener(type, g); - - if (!fired) { - fired = true; - listener.apply(this, arguments); - } - } - - g.listener = listener; - this.on(type, g); - - return this; -}; - -// emits a 'removeListener' event iff the listener was removed -EventEmitter.prototype.removeListener = function(type, listener) { - var list, position, length, i; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events || !this._events[type]) - return this; - - list = this._events[type]; - length = list.length; - position = -1; - - if (list === listener || - (isFunction(list.listener) && list.listener === listener)) { - delete this._events[type]; - if (this._events.removeListener) - this.emit('removeListener', type, listener); - - } else if (isObject(list)) { - for (i = length; i-- > 0;) { - if (list[i] === listener || - (list[i].listener && list[i].listener === listener)) { - position = i; - break; - } - } - - if (position < 0) - return this; - - if (list.length === 1) { - list.length = 0; - delete this._events[type]; - } else { - list.splice(position, 1); - } - - if (this._events.removeListener) - this.emit('removeListener', type, listener); - } - - return this; -}; - -EventEmitter.prototype.removeAllListeners = function(type) { - var key, listeners; - - if (!this._events) - return this; - - // not listening for removeListener, no need to emit - if (!this._events.removeListener) { - if (arguments.length === 0) - this._events = {}; - else if (this._events[type]) - delete this._events[type]; - return this; - } - - // emit removeListener for all listeners on all events - if (arguments.length === 0) { - for (key in this._events) { - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = {}; - return this; - } - - listeners = this._events[type]; - - if (isFunction(listeners)) { - this.removeListener(type, listeners); - } else if (listeners) { - // LIFO order - while (listeners.length) - this.removeListener(type, listeners[listeners.length - 1]); - } - delete this._events[type]; - - return this; -}; - -EventEmitter.prototype.listeners = function(type) { - var ret; - if (!this._events || !this._events[type]) - ret = []; - else if (isFunction(this._events[type])) - ret = [this._events[type]]; - else - ret = this._events[type].slice(); - return ret; -}; - -EventEmitter.prototype.listenerCount = function(type) { - if (this._events) { - var evlistener = this._events[type]; - - if (isFunction(evlistener)) - return 1; - else if (evlistener) - return evlistener.length; - } - return 0; -}; - -EventEmitter.listenerCount = function(emitter, type) { - return emitter.listenerCount(type); -}; - -function isFunction(arg) { - return typeof arg === 'function'; -} - -function isNumber(arg) { - return typeof arg === 'number'; -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -function isUndefined(arg) { - return arg === void 0; -} - -},{}],16:[function(require,module,exports){ +},{"_process":13}],17:[function(require,module,exports){ /** * inspired by is-number * but significantly simplified and sped up by ignoring number and string constructors @@ -11654,7 +11840,7 @@ module.exports = function(n) { return n - n < 1; }; -},{}],17:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ module.exports = fromQuat; /** @@ -11702,7 +11888,7 @@ function fromQuat(out, q) { return out; }; -},{}],18:[function(require,module,exports){ +},{}],19:[function(require,module,exports){ (function (global){ 'use strict' @@ -11719,9 +11905,9 @@ else { module.exports = hasHover }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"is-browser":19}],19:[function(require,module,exports){ +},{"is-browser":20}],20:[function(require,module,exports){ module.exports = true; -},{}],20:[function(require,module,exports){ +},{}],21:[function(require,module,exports){ var rootPosition = { left: 0, top: 0 } module.exports = mouseEventOffset @@ -11748,192 +11934,6 @@ function getBoundingClientOffset (element) { } } -},{}],21:[function(require,module,exports){ -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - },{}],22:[function(require,module,exports){ // TinyColor v1.4.1 // https://github.com/bgrins/TinyColor @@ -14773,7 +14773,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":174,"fast-isnumeric":16}],36:[function(require,module,exports){ +},{"../../lib/to_log_range":174,"fast-isnumeric":17}],36:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -15529,7 +15529,7 @@ function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4) { return {x: x1 + a * t, y: y1 + d * t}; } -},{"../../lib":156,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/cartesian/axes":192,"../../plots/plots":233,"../color":41,"../dragelement":62,"../drawing":65,"../fx":82,"./draw_arrow_head":38,"d3":13}],38:[function(require,module,exports){ +},{"../../lib":156,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/cartesian/axes":192,"../../plots/plots":233,"../color":41,"../dragelement":62,"../drawing":65,"../fx":82,"./draw_arrow_head":38,"d3":15}],38:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -15663,7 +15663,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag, standoff) { if(doEnd) drawhead(end, endRot); }; -},{"../color":41,"../drawing":65,"./arrow_paths":30,"d3":13,"fast-isnumeric":16}],39:[function(require,module,exports){ +},{"../color":41,"../drawing":65,"./arrow_paths":30,"d3":15,"fast-isnumeric":17}],39:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -15917,7 +15917,7 @@ function cleanOne(val) { return 'rgb(' + rgbStr + ')'; } -},{"./attributes":40,"fast-isnumeric":16,"tinycolor2":22}],42:[function(require,module,exports){ +},{"./attributes":40,"fast-isnumeric":17,"tinycolor2":22}],42:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -16774,7 +16774,7 @@ module.exports = function draw(gd, id) { return component; }; -},{"../../constants/alignment":137,"../../lib":156,"../../lib/extend":150,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/cartesian/axes":192,"../../plots/cartesian/axis_defaults":194,"../../plots/cartesian/layout_attributes":203,"../../plots/cartesian/position_defaults":206,"../../plots/plots":233,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"../titles":130,"./attributes":42,"d3":13,"tinycolor2":22}],45:[function(require,module,exports){ +},{"../../constants/alignment":137,"../../lib":156,"../../lib/extend":150,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/cartesian/axes":192,"../../plots/cartesian/axis_defaults":194,"../../plots/cartesian/layout_attributes":203,"../../plots/cartesian/position_defaults":206,"../../plots/plots":233,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"../titles":130,"./attributes":42,"d3":15,"tinycolor2":22}],45:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -17051,7 +17051,7 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce, if(showScale) colorbarDefaults(containerIn, containerOut, layout); }; -},{"../../lib":156,"../colorbar/defaults":43,"../colorbar/has_colorbar":45,"./flip_scale":52,"./is_valid_scale":56,"fast-isnumeric":16}],51:[function(require,module,exports){ +},{"../../lib":156,"../colorbar/defaults":43,"../colorbar/has_colorbar":45,"./flip_scale":52,"./is_valid_scale":56,"fast-isnumeric":17}],51:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -17199,7 +17199,7 @@ module.exports = function hasColorscale(trace, containerStr) { ); }; -},{"../../lib":156,"./is_valid_scale":56,"fast-isnumeric":16}],55:[function(require,module,exports){ +},{"../../lib":156,"./is_valid_scale":56,"fast-isnumeric":17}],55:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -17387,7 +17387,7 @@ function colorArray2rbga(colorArray) { return tinycolor(colorObj).toRgbString(); } -},{"../color":41,"d3":13,"fast-isnumeric":16,"tinycolor2":22}],59:[function(require,module,exports){ +},{"../color":41,"d3":15,"fast-isnumeric":17,"tinycolor2":22}],59:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -17872,7 +17872,7 @@ function pointerOffset(e) { ); } -},{"../../constants/interactions":138,"../../lib":156,"../../plotly":187,"../../plots/cartesian/constants":197,"./align":60,"./cursor":61,"./unhover":63,"has-hover":18,"mouse-event-offset":20}],63:[function(require,module,exports){ +},{"../../constants/interactions":138,"../../lib":156,"../../plotly":187,"../../plots/cartesian/constants":197,"./align":60,"./cursor":61,"./unhover":63,"has-hover":19,"mouse-event-offset":21}],63:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -18842,7 +18842,7 @@ drawing.setTextPointsScale = function(selection, xScale, yScale) { }); }; -},{"../../constants/alignment":137,"../../constants/xmlns_namespaces":141,"../../lib":156,"../../lib/svg_text_utils":173,"../../registry":241,"../../traces/scatter/make_bubble_size_func":319,"../../traces/scatter/subtypes":324,"../color":41,"../colorscale":55,"./symbol_defs":66,"d3":13,"fast-isnumeric":16,"tinycolor2":22}],66:[function(require,module,exports){ +},{"../../constants/alignment":137,"../../constants/xmlns_namespaces":141,"../../lib":156,"../../lib/svg_text_utils":173,"../../registry":241,"../../traces/scatter/make_bubble_size_func":319,"../../traces/scatter/subtypes":324,"../color":41,"../colorscale":55,"./symbol_defs":66,"d3":15,"fast-isnumeric":17,"tinycolor2":22}],66:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -19318,7 +19318,7 @@ module.exports = { } }; -},{"d3":13}],67:[function(require,module,exports){ +},{"d3":15}],67:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -19480,7 +19480,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) { Axes.expand(axis, vals, {padded: true}); } -},{"../../plots/cartesian/axes":192,"../../registry":241,"./compute_error":69,"fast-isnumeric":16}],69:[function(require,module,exports){ +},{"../../plots/cartesian/axes":192,"../../registry":241,"./compute_error":69,"fast-isnumeric":17}],69:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -19653,7 +19653,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) { } }; -},{"../../lib":156,"../../registry":241,"./attributes":67,"fast-isnumeric":16}],71:[function(require,module,exports){ +},{"../../lib":156,"../../registry":241,"./attributes":67,"fast-isnumeric":17}],71:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -19876,7 +19876,7 @@ function errorCoords(d, xa, ya) { return out; } -},{"../../traces/scatter/subtypes":324,"d3":13,"fast-isnumeric":16}],73:[function(require,module,exports){ +},{"../../traces/scatter/subtypes":324,"d3":15,"fast-isnumeric":17}],73:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -19913,7 +19913,7 @@ module.exports = function style(traces) { }); }; -},{"../color":41,"d3":13}],74:[function(require,module,exports){ +},{"../color":41,"d3":15}],74:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -21515,7 +21515,7 @@ function hoverChanged(gd, evt, oldhoverdata) { return false; } -},{"../../lib":156,"../../lib/events":149,"../../lib/override_cursor":165,"../../lib/svg_text_utils":173,"../../plots/cartesian/axes":192,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"./constants":77,"./helpers":79,"d3":13,"fast-isnumeric":16,"tinycolor2":22}],81:[function(require,module,exports){ +},{"../../lib":156,"../../lib/events":149,"../../lib/override_cursor":165,"../../lib/svg_text_utils":173,"../../plots/cartesian/axes":192,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"./constants":77,"./helpers":79,"d3":15,"fast-isnumeric":17,"tinycolor2":22}],81:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -21613,7 +21613,7 @@ function castHoverinfo(trace, fullLayout, ptNumber) { return Lib.castOption(trace, ptNumber, 'hoverinfo', _coerce); } -},{"../../lib":156,"../dragelement":62,"./attributes":74,"./calc":75,"./click":76,"./constants":77,"./defaults":78,"./helpers":79,"./hover":80,"./layout_attributes":83,"./layout_defaults":84,"./layout_global_defaults":85,"d3":13}],83:[function(require,module,exports){ +},{"../../lib":156,"../dragelement":62,"./attributes":74,"./calc":75,"./click":76,"./constants":77,"./defaults":78,"./helpers":79,"./hover":80,"./layout_attributes":83,"./layout_defaults":84,"./layout_global_defaults":85,"d3":15}],83:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -21942,7 +21942,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) { } }; -},{"../../lib/to_log_range":174,"fast-isnumeric":16}],88:[function(require,module,exports){ +},{"../../lib/to_log_range":174,"fast-isnumeric":17}],88:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -22224,7 +22224,7 @@ module.exports = function draw(gd) { } }; -},{"../../constants/xmlns_namespaces":141,"../../plots/cartesian/axes":192,"../drawing":65,"d3":13}],90:[function(require,module,exports){ +},{"../../constants/xmlns_namespaces":141,"../../plots/cartesian/axes":192,"../drawing":65,"d3":15}],90:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -23348,7 +23348,7 @@ function expandHorizontalMargin(gd) { }); } -},{"../../constants/alignment":137,"../../constants/interactions":138,"../../lib":156,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/plots":233,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"./anchor_utils":91,"./constants":93,"./get_legend_data":96,"./helpers":97,"./style":99,"d3":13}],96:[function(require,module,exports){ +},{"../../constants/alignment":137,"../../constants/interactions":138,"../../lib":156,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/plots":233,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"./anchor_utils":91,"./constants":93,"./get_legend_data":96,"./helpers":97,"./style":99,"d3":15}],96:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -23741,7 +23741,7 @@ module.exports = function style(s, gd) { } }; -},{"../../lib":156,"../../registry":241,"../../traces/pie/style_one":302,"../../traces/scatter/subtypes":324,"../color":41,"../drawing":65,"d3":13}],100:[function(require,module,exports){ +},{"../../lib":156,"../../registry":241,"../../traces/pie/style_one":302,"../../traces/scatter/subtypes":324,"../color":41,"../drawing":65,"d3":15}],100:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -24855,7 +24855,7 @@ function createModeBar(gd, buttons) { module.exports = createModeBar; -},{"../../../build/ploticon":2,"../../lib":156,"d3":13}],104:[function(require,module,exports){ +},{"../../../build/ploticon":2,"../../lib":156,"d3":15}],104:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -25381,7 +25381,7 @@ function reposition(gd, buttons, opts, axName) { }); } -},{"../../constants/alignment":137,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/cartesian/axis_ids":195,"../../plots/plots":233,"../color":41,"../drawing":65,"../legend/anchor_utils":91,"./constants":106,"./get_update_object":109,"d3":13}],109:[function(require,module,exports){ +},{"../../constants/alignment":137,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/cartesian/axis_ids":195,"../../plots/plots":233,"../color":41,"../drawing":65,"../legend/anchor_utils":91,"./constants":106,"./get_update_object":109,"d3":15}],109:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -25438,7 +25438,7 @@ function getXRange(axisLayout, buttonLayout) { return [range0, range1]; } -},{"d3":13}],110:[function(require,module,exports){ +},{"d3":15}],110:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -26225,7 +26225,7 @@ function clearPushMargins(gd) { } } -},{"../../lib":156,"../../lib/setcursor":171,"../../plotly":187,"../../plots/cartesian":202,"../../plots/cartesian/axes":192,"../../plots/plots":233,"../color":41,"../dragelement":62,"../drawing":65,"./constants":113,"d3":13}],116:[function(require,module,exports){ +},{"../../lib":156,"../../lib/setcursor":171,"../../plotly":187,"../../plots/cartesian":202,"../../plots/cartesian/axes":192,"../../plots/plots":233,"../color":41,"../dragelement":62,"../drawing":65,"./constants":113,"d3":15}],116:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -28179,7 +28179,7 @@ function clearPushMargins(gd) { } } -},{"../../constants/alignment":137,"../../lib/svg_text_utils":173,"../../plots/plots":233,"../color":41,"../drawing":65,"../legend/anchor_utils":91,"./constants":126,"d3":13}],129:[function(require,module,exports){ +},{"../../constants/alignment":137,"../../lib/svg_text_utils":173,"../../plots/plots":233,"../color":41,"../drawing":65,"../legend/anchor_utils":91,"./constants":126,"d3":15}],129:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -28454,7 +28454,7 @@ Titles.draw = function(gd, titleClass, options) { cont._titleElement = el; }; -},{"../../constants/interactions":138,"../../lib":156,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/plots":233,"../color":41,"../drawing":65,"d3":13,"fast-isnumeric":16}],131:[function(require,module,exports){ +},{"../../constants/interactions":138,"../../lib":156,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/plots":233,"../color":41,"../drawing":65,"d3":15,"fast-isnumeric":17}],131:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -29465,7 +29465,7 @@ function clearPushMargins(gd) { } } -},{"../../constants/alignment":137,"../../lib/svg_text_utils":173,"../../plots/plots":233,"../color":41,"../drawing":65,"../legend/anchor_utils":91,"./constants":132,"./scrollbox":136,"d3":13}],135:[function(require,module,exports){ +},{"../../constants/alignment":137,"../../lib/svg_text_utils":173,"../../plots/plots":233,"../color":41,"../drawing":65,"../legend/anchor_utils":91,"./constants":132,"./scrollbox":136,"d3":15}],135:[function(require,module,exports){ arguments[4][129][0].apply(exports,arguments) },{"./attributes":131,"./constants":132,"./defaults":133,"./draw":134,"dup":129}],136:[function(require,module,exports){ /** @@ -29938,7 +29938,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY) } }; -},{"../../lib":156,"../color":41,"../drawing":65,"d3":13}],137:[function(require,module,exports){ +},{"../../lib":156,"../color":41,"../drawing":65,"d3":15}],137:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -30206,11 +30206,7 @@ exports.colorDefaults = color.overrideColorDefaults; // ion: export exports var datesModule = require('./lib/dates'); exports.dateTime2ms = datesModule.dateTime2ms; - -// ion: export exports -exports.ms2DateTimeLocal = datesModule.ms2DateTimeLocal; - -},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":39,"./components/annotations3d":28,"./components/color":41,"./components/fx":82,"./components/images":90,"./components/legend":98,"./components/rangeselector":110,"./components/rangeslider":116,"./components/shapes":123,"./components/sliders":129,"./components/updatemenus":135,"./fonts/mathjax_config":143,"./lib/dates":147,"./lib/queue":168,"./plot_api/plot_schema":181,"./plot_api/register":182,"./plot_api/set_plot_config":183,"./plot_api/to_image":185,"./plot_api/validate":186,"./plotly":187,"./snapshot":246,"./snapshot/download":243,"./traces/scatter":314,"d3":13,"es6-promise":14}],143:[function(require,module,exports){ +},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":39,"./components/annotations3d":28,"./components/color":41,"./components/fx":82,"./components/images":90,"./components/legend":98,"./components/rangeselector":110,"./components/rangeslider":116,"./components/shapes":123,"./components/sliders":129,"./components/updatemenus":135,"./fonts/mathjax_config":143,"./lib/dates":147,"./lib/queue":168,"./plot_api/plot_schema":181,"./plot_api/register":182,"./plot_api/set_plot_config":183,"./plot_api/to_image":185,"./plot_api/validate":186,"./plotly":187,"./snapshot":246,"./snapshot/download":243,"./traces/scatter":314,"d3":15,"es6-promise":16}],143:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -30293,7 +30289,7 @@ module.exports = function cleanNumber(v) { return BADNUM; }; -},{"../constants/numerical":139,"fast-isnumeric":16}],146:[function(require,module,exports){ +},{"../constants/numerical":139,"fast-isnumeric":17}],146:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -30648,7 +30644,7 @@ exports.validate = function(value, opts) { return out !== failed; }; -},{"../components/colorscale/get_scale":53,"../components/colorscale/scales":59,"../plots/attributes":190,"./nested_property":162,"fast-isnumeric":16,"tinycolor2":22}],147:[function(require,module,exports){ +},{"../components/colorscale/get_scale":53,"../components/colorscale/scales":59,"../plots/attributes":190,"./nested_property":162,"fast-isnumeric":17,"tinycolor2":22}],147:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -31276,7 +31272,7 @@ exports.findExactDates = function(data, calendar) { }; }; -},{"../constants/numerical":139,"../registry":241,"./loggers":159,"./mod":161,"d3":13,"fast-isnumeric":16}],148:[function(require,module,exports){ +},{"../constants/numerical":139,"../registry":241,"./loggers":159,"./mod":161,"d3":15,"fast-isnumeric":17}],148:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -31471,7 +31467,7 @@ var Events = { module.exports = Events; -},{"events":15}],150:[function(require,module,exports){ +},{"events":12}],150:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -31732,7 +31728,7 @@ function countryNameToISO3(countryName) { return false; } -},{"../lib":156,"country-regex":12}],154:[function(require,module,exports){ +},{"../lib":156,"country-regex":14}],154:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -32609,7 +32605,7 @@ lib.numSeparate = function(value, separators, separatethousands) { return x1 + x2; }; -},{"../constants/numerical":139,"./clean_number":145,"./coerce":146,"./dates":147,"./ensure_array":148,"./extend":150,"./filter_unique":151,"./filter_visible":152,"./identity":155,"./is_array":157,"./is_plain_object":158,"./loggers":159,"./matrix":160,"./mod":161,"./nested_property":162,"./noop":163,"./notifier":164,"./push_unique":167,"./relink_private":169,"./search":170,"./stats":172,"./to_log_range":174,"d3":13,"fast-isnumeric":16}],157:[function(require,module,exports){ +},{"../constants/numerical":139,"./clean_number":145,"./coerce":146,"./dates":147,"./ensure_array":148,"./extend":150,"./filter_unique":151,"./filter_visible":152,"./identity":155,"./is_array":157,"./is_plain_object":158,"./loggers":159,"./matrix":160,"./mod":161,"./nested_property":162,"./noop":163,"./notifier":164,"./push_unique":167,"./relink_private":169,"./search":170,"./stats":172,"./to_log_range":174,"d3":15,"fast-isnumeric":17}],157:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -33170,7 +33166,7 @@ function badContainer(container, propStr, propParts) { }; } -},{"../plot_api/container_array_match":176,"./is_array":157,"./is_plain_object":158,"fast-isnumeric":16}],163:[function(require,module,exports){ +},{"../plot_api/container_array_match":176,"./is_array":157,"./is_plain_object":158,"fast-isnumeric":17}],163:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -33268,7 +33264,7 @@ module.exports = function(text, displayLength) { }); }; -},{"d3":13,"fast-isnumeric":16}],165:[function(require,module,exports){ +},{"d3":15,"fast-isnumeric":17}],165:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -33975,7 +33971,7 @@ exports.roundUp = function(val, arrayIn, reverse) { return arrayIn[low]; }; -},{"./loggers":159,"fast-isnumeric":16}],171:[function(require,module,exports){ +},{"./loggers":159,"fast-isnumeric":17}],171:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -34094,7 +34090,7 @@ exports.interp = function(arr, n) { return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)]; }; -},{"fast-isnumeric":16}],173:[function(require,module,exports){ +},{"fast-isnumeric":17}],173:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -34755,7 +34751,7 @@ exports.makeEditable = function(context, options) { return d3.rebind(context, dispatch, 'on'); }; -},{"../constants/alignment":137,"../constants/string_mappings":140,"../constants/xmlns_namespaces":141,"../lib":156,"d3":13}],174:[function(require,module,exports){ +},{"../constants/alignment":137,"../constants/string_mappings":140,"../constants/xmlns_namespaces":141,"../lib":156,"d3":15}],174:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -34783,7 +34779,7 @@ module.exports = function toLogRange(val, range) { return newVal; }; -},{"fast-isnumeric":16}],175:[function(require,module,exports){ +},{"fast-isnumeric":17}],175:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -35417,7 +35413,7 @@ exports.hasParent = function(aobj, attr) { return false; }; -},{"../components/color":41,"../lib":156,"../plots/cartesian/axes":192,"../plots/plots":233,"../registry":241,"fast-isnumeric":16,"gl-mat4/fromQuat":17}],178:[function(require,module,exports){ +},{"../components/color":41,"../lib":156,"../plots/cartesian/axes":192,"../plots/plots":233,"../registry":241,"fast-isnumeric":17,"gl-mat4/fromQuat":18}],178:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -38715,7 +38711,7 @@ function makePlotFramework(gd) { gd.emit('plotly_framework'); } -},{"../components/drawing":65,"../components/errorbars":71,"../constants/xmlns_namespaces":141,"../lib":156,"../lib/events":149,"../lib/queue":168,"../lib/svg_text_utils":173,"../plotly":187,"../plots/cartesian/axis_ids":195,"../plots/cartesian/constants":197,"../plots/cartesian/constraints":199,"../plots/cartesian/graph_interact":201,"../plots/plots":233,"../plots/polar":236,"../registry":241,"./helpers":177,"./manage_arrays":178,"./subroutines":184,"d3":13,"fast-isnumeric":16,"has-hover":18}],180:[function(require,module,exports){ +},{"../components/drawing":65,"../components/errorbars":71,"../constants/xmlns_namespaces":141,"../lib":156,"../lib/events":149,"../lib/queue":168,"../lib/svg_text_utils":173,"../plotly":187,"../plots/cartesian/axis_ids":195,"../plots/cartesian/constants":197,"../plots/cartesian/constraints":199,"../plots/cartesian/graph_interact":201,"../plots/plots":233,"../plots/polar":236,"../registry":241,"./helpers":177,"./manage_arrays":178,"./subroutines":184,"d3":15,"fast-isnumeric":17,"has-hover":19}],180:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -39830,7 +39826,7 @@ exports.doCamera = function(gd) { } }; -},{"../components/color":41,"../components/drawing":65,"../components/modebar":101,"../components/titles":130,"../lib":156,"../plotly":187,"../plots/cartesian/graph_interact":201,"../plots/plots":233,"../registry":241,"d3":13}],185:[function(require,module,exports){ +},{"../components/color":41,"../components/drawing":65,"../components/modebar":101,"../components/titles":130,"../lib":156,"../plotly":187,"../plots/cartesian/graph_interact":201,"../plots/plots":233,"../registry":241,"d3":15}],185:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -39940,7 +39936,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":156,"../plotly":187,"../snapshot/cloneplot":242,"../snapshot/helpers":245,"../snapshot/svgtoimg":247,"../snapshot/tosvg":249,"fast-isnumeric":16}],186:[function(require,module,exports){ +},{"../lib":156,"../plotly":187,"../snapshot/cloneplot":242,"../snapshot/helpers":245,"../snapshot/svgtoimg":247,"../snapshot/tosvg":249,"fast-isnumeric":17}],186:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -43137,7 +43133,7 @@ function swapAxisAttrs(layout, key, xFullAxes, yFullAxes) { } } -},{"../../components/color":41,"../../components/drawing":65,"../../components/titles":130,"../../constants/numerical":139,"../../lib":156,"../../lib/svg_text_utils":173,"../../plots/plots":233,"../../registry":241,"./axis_autotype":193,"./axis_ids":195,"./layout_attributes":203,"./layout_defaults":204,"./set_convert":209,"d3":13,"fast-isnumeric":16}],193:[function(require,module,exports){ +},{"../../components/color":41,"../../components/drawing":65,"../../components/titles":130,"../../constants/numerical":139,"../../lib":156,"../../lib/svg_text_utils":173,"../../plots/plots":233,"../../registry":241,"./axis_autotype":193,"./axis_ids":195,"./layout_attributes":203,"./layout_defaults":204,"./set_convert":209,"d3":15,"fast-isnumeric":17}],193:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -43212,7 +43208,7 @@ function category(a) { return curvecats > curvenums * 2; } -},{"../../constants/numerical":139,"../../lib":156,"fast-isnumeric":16}],194:[function(require,module,exports){ +},{"../../constants/numerical":139,"../../lib":156,"fast-isnumeric":17}],194:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -44965,7 +44961,7 @@ function calcLinks(constraintGroups, xIDs, yIDs) { }; } -},{"../../components/color":41,"../../components/dragelement":62,"../../components/drawing":65,"../../constants/alignment":137,"../../lib":156,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../plotly":187,"../../registry":241,"../plots":233,"./axes":192,"./axis_ids":195,"./constants":197,"./scale_zoom":207,"./select":208,"d3":13,"tinycolor2":22}],201:[function(require,module,exports){ +},{"../../components/color":41,"../../components/dragelement":62,"../../components/drawing":65,"../../constants/alignment":137,"../../lib":156,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../plotly":187,"../../registry":241,"../plots":233,"./axes":192,"./axis_ids":195,"./constants":197,"./scale_zoom":207,"./select":208,"d3":15,"tinycolor2":22}],201:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -45124,7 +45120,7 @@ module.exports = function initInteractions(gd) { }; }; -},{"../../components/dragelement":62,"../../components/fx":82,"./constants":197,"./dragbox":200,"fast-isnumeric":16}],202:[function(require,module,exports){ +},{"../../components/dragelement":62,"../../components/fx":82,"./constants":197,"./dragbox":200,"fast-isnumeric":17}],202:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -45518,7 +45514,7 @@ function joinLayer(parent, nodeType, className) { return layer; } -},{"../../lib":156,"../plots":233,"./attributes":191,"./axis_ids":195,"./constants":197,"./layout_attributes":203,"./transition_axes":213,"d3":13}],203:[function(require,module,exports){ +},{"../../lib":156,"../plots":233,"./attributes":191,"./axis_ids":195,"./constants":197,"./layout_attributes":203,"./transition_axes":213,"d3":15}],203:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -46276,7 +46272,7 @@ module.exports = function orderedCategories(axisLetter, categoryorder, categorya } }; -},{"d3":13}],206:[function(require,module,exports){ +},{"d3":15}],206:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -46341,7 +46337,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer return containerOut; }; -},{"../../lib":156,"fast-isnumeric":16}],207:[function(require,module,exports){ +},{"../../lib":156,"fast-isnumeric":17}],207:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -47042,7 +47038,7 @@ module.exports = function setConvert(ax, fullLayout) { delete ax._forceTick0; }; -},{"../../constants/numerical":139,"../../lib":156,"./axis_ids":195,"./constants":197,"d3":13,"fast-isnumeric":16}],210:[function(require,module,exports){ +},{"../../constants/numerical":139,"../../lib":156,"./axis_ids":195,"./constants":197,"d3":15,"fast-isnumeric":17}],210:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -47243,7 +47239,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe } }; -},{"../../constants/numerical":139,"../../lib":156,"fast-isnumeric":16}],213:[function(require,module,exports){ +},{"../../constants/numerical":139,"../../lib":156,"fast-isnumeric":17}],213:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -47559,7 +47555,7 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo return Promise.resolve(); }; -},{"../../components/drawing":65,"../../plotly":187,"../../registry":241,"./axes":192,"d3":13}],214:[function(require,module,exports){ +},{"../../components/drawing":65,"../../plotly":187,"../../registry":241,"./axes":192,"d3":15}],214:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -48825,7 +48821,7 @@ function createMockAxis(fullLayout) { return mockAxis; } -},{"../../components/color":41,"../../components/drawing":65,"../../components/fx":82,"../../lib/topojson_utils":175,"../cartesian/axes":192,"../plots":233,"./constants":218,"./projections":226,"./set_scale":227,"./zoom":228,"./zoom_reset":229,"d3":13,"topojson-client":23}],220:[function(require,module,exports){ +},{"../../components/color":41,"../../components/drawing":65,"../../components/fx":82,"../../lib/topojson_utils":175,"../cartesian/axes":192,"../plots":233,"./constants":218,"./projections":226,"./set_scale":227,"./zoom":228,"./zoom_reset":229,"d3":15,"topojson-client":23}],220:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -50004,7 +50000,7 @@ function getBounds(projection, rangeBox) { return d3.geo.path().projection(projection).bounds(rangeBox); } -},{"./constants":218,"d3":13}],228:[function(require,module,exports){ +},{"./constants":218,"d3":15}],228:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -50442,7 +50438,7 @@ function d3_eventDispatch(target) { return dispatch; } -},{"d3":13}],229:[function(require,module,exports){ +},{"d3":15}],229:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -52885,7 +52881,7 @@ plots.generalUpdatePerTraceModule = function(subplot, subplotCalcData, subplotLa subplot.traceHash = traceHash; }; -},{"../components/color":41,"../components/errorbars":71,"../constants/numerical":139,"../lib":156,"../plot_api/plot_schema":181,"../plotly":187,"../registry":241,"./animation_attributes":188,"./attributes":190,"./command":215,"./font_attributes":216,"./frame_attributes":217,"./layout_attributes":231,"d3":13,"fast-isnumeric":16}],234:[function(require,module,exports){ +},{"../components/color":41,"../components/errorbars":71,"../constants/numerical":139,"../lib":156,"../plot_api/plot_schema":181,"../plotly":187,"../registry":241,"./animation_attributes":188,"./attributes":190,"./command":215,"./font_attributes":216,"./frame_attributes":217,"./layout_attributes":231,"d3":15,"fast-isnumeric":17}],234:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -54459,7 +54455,7 @@ var µ = module.exports = { version: '0.2.2' }; return exports; }; -},{"../../lib":156,"d3":13}],238:[function(require,module,exports){ +},{"../../lib":156,"d3":15}],238:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -54545,7 +54541,7 @@ manager.fillLayout = function(_gd) { _gd._fullLayout = extendDeepAll(dflts, _gd.layout); }; -},{"../../components/color":41,"../../lib":156,"./micropolar":237,"./undo_manager":239,"d3":13}],239:[function(require,module,exports){ +},{"../../components/color":41,"../../lib":156,"./micropolar":237,"./undo_manager":239,"d3":15}],239:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -55373,7 +55369,7 @@ function svgToImg(opts) { module.exports = svgToImg; -},{"../lib":156,"events":15}],248:[function(require,module,exports){ +},{"../lib":156,"events":12}],248:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -55453,7 +55449,7 @@ function toImage(gd, opts) { module.exports = toImage; -},{"../lib":156,"../plotly":187,"./cloneplot":242,"./helpers":245,"./svgtoimg":247,"./tosvg":249,"events":15}],249:[function(require,module,exports){ +},{"../lib":156,"../plotly":187,"./cloneplot":242,"./helpers":245,"./svgtoimg":247,"./tosvg":249,"events":12}],249:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -55602,7 +55598,7 @@ module.exports = function toSVG(gd, format) { return s; }; -},{"../components/color":41,"../components/drawing":65,"../constants/xmlns_namespaces":141,"d3":13}],250:[function(require,module,exports){ +},{"../components/color":41,"../components/drawing":65,"../constants/xmlns_namespaces":141,"d3":15}],250:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -55853,7 +55849,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../components/colorscale/calc":47,"../../components/colorscale/has_colorscale":54,"../../plots/cartesian/axes":192,"./arrays_to_calcdata":250,"fast-isnumeric":16}],253:[function(require,module,exports){ +},{"../../components/colorscale/calc":47,"../../components/colorscale/has_colorscale":54,"../../plots/cartesian/axes":192,"./arrays_to_calcdata":250,"fast-isnumeric":17}],253:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -56678,7 +56674,7 @@ function coerceColor(attributeDefinition, value, defaultValue) { attributeDefinition.dflt; } -},{"../../components/color":41,"../../components/drawing":65,"../../components/errorbars":71,"../../lib":156,"../../lib/svg_text_utils":173,"./attributes":251,"d3":13,"fast-isnumeric":16,"tinycolor2":22}],259:[function(require,module,exports){ +},{"../../components/color":41,"../../components/drawing":65,"../../components/errorbars":71,"../../lib":156,"../../lib/svg_text_utils":173,"./attributes":251,"d3":15,"fast-isnumeric":17,"tinycolor2":22}],259:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -57322,7 +57318,7 @@ function getAxisLetter(ax) { return ax._id.charAt(0); } -},{"../../constants/numerical":139,"../../plots/cartesian/axes":192,"../../registry":241,"./sieve.js":260,"fast-isnumeric":16}],260:[function(require,module,exports){ +},{"../../constants/numerical":139,"../../plots/cartesian/axes":192,"../../registry":241,"./sieve.js":260,"fast-isnumeric":17}],260:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -57499,7 +57495,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/color":41,"../../components/drawing":65,"../../components/errorbars":71,"d3":13}],262:[function(require,module,exports){ +},{"../../components/color":41,"../../components/drawing":65,"../../components/errorbars":71,"d3":15}],262:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -57818,7 +57814,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../lib":156,"../../plots/cartesian/axes":192,"fast-isnumeric":16}],265:[function(require,module,exports){ +},{"../../lib":156,"../../plots/cartesian/axes":192,"fast-isnumeric":17}],265:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -58345,7 +58341,7 @@ module.exports = function plot(gd, plotinfo, cdbox) { }); }; -},{"../../components/drawing":65,"../../lib":156,"d3":13}],271:[function(require,module,exports){ +},{"../../components/drawing":65,"../../lib":156,"d3":15}],271:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -58478,7 +58474,7 @@ module.exports = function style(gd) { }); }; -},{"../../components/color":41,"../../components/drawing":65,"d3":13}],273:[function(require,module,exports){ +},{"../../components/color":41,"../../components/drawing":65,"d3":15}],273:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -58739,7 +58735,7 @@ exports.calcTransform = function calcTransform(gd, trace, opts) { trace.y = y; }; -},{"../../lib":156,"../ohlc/helpers":288,"fast-isnumeric":16}],277:[function(require,module,exports){ +},{"../../lib":156,"../ohlc/helpers":288,"fast-isnumeric":17}],277:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -59114,7 +59110,7 @@ function style(geo) { }); } -},{"../../components/color":41,"../../components/colorscale":55,"../../components/drawing":65,"../../lib/array_to_calc_item":144,"../../lib/geo_location_utils":153,"../../lib/topojson_utils":175,"../../plots/geo/constants":218,"d3":13}],284:[function(require,module,exports){ +},{"../../components/color":41,"../../components/colorscale":55,"../../components/drawing":65,"../../lib/array_to_calc_item":144,"../../lib/geo_location_utils":153,"../../lib/topojson_utils":175,"../../plots/geo/constants":218,"d3":15}],284:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -59165,7 +59161,7 @@ module.exports = function colorbar(gd, cd) { .options(trace.colorbar)(); }; -},{"../../components/colorbar/draw":44,"../../components/colorscale":55,"../../lib":156,"../../plots/plots":233,"fast-isnumeric":16}],285:[function(require,module,exports){ +},{"../../components/colorbar/draw":44,"../../components/colorscale":55,"../../lib":156,"../../plots/plots":233,"fast-isnumeric":17}],285:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -59497,7 +59493,7 @@ exports.addRangeSlider = function(data, layout) { } }; -},{"../../lib":156,"fast-isnumeric":16}],289:[function(require,module,exports){ +},{"../../lib":156,"fast-isnumeric":17}],289:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -59830,7 +59826,7 @@ function convertTickWidth(gd, xa, trace) { return minDiff * tickWidth; } -},{"../../lib":156,"../../plots/cartesian/axes":192,"../../plots/cartesian/axis_ids":195,"./helpers":288,"fast-isnumeric":16}],292:[function(require,module,exports){ +},{"../../lib":156,"../../plots/cartesian/axes":192,"../../plots/cartesian/axis_ids":195,"./helpers":288,"fast-isnumeric":17}],292:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -60222,7 +60218,7 @@ function nextDefaultColor(index) { return pieDefaultColors[index % pieDefaultColors.length]; } -},{"../../components/color":41,"./helpers":296,"fast-isnumeric":16,"tinycolor2":22}],295:[function(require,module,exports){ +},{"../../components/color":41,"./helpers":296,"fast-isnumeric":17,"tinycolor2":22}],295:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -61117,7 +61113,7 @@ function maxExtent(tilt, tiltAxisFraction, depth) { 2 * Math.sqrt(1 - sinTilt * sinTilt * tiltAxisFraction * tiltAxisFraction)); } -},{"../../components/color":41,"../../components/drawing":65,"../../components/fx":82,"../../lib/svg_text_utils":173,"./helpers":296,"d3":13}],301:[function(require,module,exports){ +},{"../../components/color":41,"../../components/drawing":65,"../../components/fx":82,"../../lib/svg_text_utils":173,"./helpers":296,"d3":15}],301:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -61146,7 +61142,7 @@ module.exports = function style(gd) { }); }; -},{"./style_one":302,"d3":13}],302:[function(require,module,exports){ +},{"./style_one":302,"d3":15}],302:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -61626,7 +61622,7 @@ module.exports = function calc(gd, trace) { return cd; }; -},{"../../constants/numerical":139,"../../plots/cartesian/axes":192,"./arrays_to_calcdata":303,"./colorscale_calc":308,"./subtypes":324,"fast-isnumeric":16}],306:[function(require,module,exports){ +},{"../../constants/numerical":139,"../../plots/cartesian/axes":192,"./arrays_to_calcdata":303,"./colorscale_calc":308,"./subtypes":324,"fast-isnumeric":17}],306:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -61721,7 +61717,7 @@ module.exports = function colorbar(gd, cd) { .options(marker.colorbar)(); }; -},{"../../components/colorbar/draw":44,"../../components/colorscale":55,"../../lib":156,"../../plots/plots":233,"fast-isnumeric":16}],308:[function(require,module,exports){ +},{"../../components/colorbar/draw":44,"../../components/colorscale":55,"../../lib":156,"../../plots/plots":233,"fast-isnumeric":17}],308:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -62480,7 +62476,7 @@ module.exports = function makeBubbleSizeFn(trace) { }; }; -},{"fast-isnumeric":16}],320:[function(require,module,exports){ +},{"fast-isnumeric":17}],320:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -63114,7 +63110,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) { }); } -},{"../../components/drawing":65,"../../components/errorbars":71,"../../lib":156,"../../lib/polygon":166,"./line_points":316,"./link_traces":318,"./subtypes":324,"d3":13}],322:[function(require,module,exports){ +},{"../../components/drawing":65,"../../components/errorbars":71,"../../lib":156,"../../lib/polygon":166,"./line_points":316,"./link_traces":318,"./subtypes":324,"d3":15}],322:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -63230,7 +63226,7 @@ module.exports = function style(gd) { s.call(ErrorBars.style); }; -},{"../../components/drawing":65,"../../components/errorbars":71,"d3":13}],324:[function(require,module,exports){ +},{"../../components/drawing":65,"../../components/errorbars":71,"d3":15}],324:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -63476,7 +63472,7 @@ module.exports = function calc(gd, trace) { return calcTrace; }; -},{"../../constants/numerical":139,"../scatter/arrays_to_calcdata":303,"../scatter/colorscale_calc":308,"fast-isnumeric":16}],329:[function(require,module,exports){ +},{"../../constants/numerical":139,"../scatter/arrays_to_calcdata":303,"../scatter/colorscale_calc":308,"fast-isnumeric":17}],329:[function(require,module,exports){ /** * Copyright 2012-2017, Plotly, Inc. * All rights reserved. @@ -63865,5 +63861,5 @@ function style(geo) { }); } -},{"../../components/color":41,"../../components/drawing":65,"../../constants/numerical":139,"../../lib":156,"../../lib/geo_location_utils":153,"../../lib/geojson_utils":154,"../../lib/topojson_utils":175,"../scatter/subtypes":324,"d3":13}]},{},[8])(8) +},{"../../components/color":41,"../../components/drawing":65,"../../constants/numerical":139,"../../lib":156,"../../lib/geo_location_utils":153,"../../lib/geojson_utils":154,"../../lib/topojson_utils":175,"../scatter/subtypes":324,"d3":15}]},{},[8])(8) }); \ No newline at end of file diff --git a/dist_ion/plotly-ion.min.js b/dist_ion/plotly-ion.min.js index f2f4a629631..3aeef31849f 100644 --- a/dist_ion/plotly-ion.min.js +++ b/dist_ion/plotly-ion.min.js @@ -1,24 +1,24 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Plotly=t()}}(function(){var t;return function t(e,r,n){function a(i,l){if(!r[i]){if(!e[i]){var s="function"==typeof require&&require;if(!l&&s)return s(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[i]={exports:{}};e[i][0].call(u.exports,function(t){var r=e[i][1][t];return a(r||t)},u,u.exports,t,e,r,n)}return r[i].exports}for(var o="function"==typeof require&&require,i=0;ie?1:t>=e?0:NaN}function o(t){return null===t?NaN:+t}function i(t){return!isNaN(t)}function l(t){return{left:function(e,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=e.length);n>>1;t(e[o],r)<0?n=o+1:a=o}return n},right:function(e,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=e.length);n>>1;t(e[o],r)>0?a=o:n=o+1}return n}}}function s(t){return t.length}function c(t){for(var e=1;t*e%1;)e*=10;return e}function u(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function f(){this._=Object.create(null)}function d(t){return(t+="")===_i||t[0]===wi?wi+t:t}function h(t){return(t+="")[0]===wi?t.slice(1):t}function p(t){return d(t)in this._}function g(t){return(t=d(t))in this._&&delete this._[t]}function m(){var t=[];for(var e in this._)t.push(h(e));return t}function v(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function x(){this._=Object.create(null)}function b(t){return t}function _(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=Mi.length;r=e&&(e=a+1);!(i=l[e])&&++e0&&(t=t.slice(0,l));var c=Di.get(t);return c&&(t=c,s=$),l?e?a:n:e?M:o}function W(t,e){return function(r){var n=ui.event;ui.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{ui.event=n}}}function $(t,e){var r=W(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}function Q(t){var r=".dragsuppress-"+ ++Ni,a="click"+r,o=ui.select(n(t)).on("touchmove"+r,T).on("dragstart"+r,T).on("selectstart"+r,T);if(null==Ei&&(Ei=!("onselectstart"in t)&&w(t.style,"userSelect")),Ei){var i=e(t).style,l=i[Ei];i[Ei]="none"}return function(t){if(o.on(r,null),Ei&&(i[Ei]=l),t){var e=function(){o.on(a,null)};o.on(a,function(){T(),e()},!0),setTimeout(e,0)}}}function J(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var a=r.createSVGPoint();if(Ri<0){var o=n(t);if(o.scrollX||o.scrollY){r=ui.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=r[0][0].getScreenCTM();Ri=!(i.f||i.e),r.remove()}}return Ri?(a.x=e.pageX,a.y=e.pageY):(a.x=e.clientX,a.y=e.clientY),a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}var l=t.getBoundingClientRect();return[e.clientX-l.left-t.clientLeft,e.clientY-l.top-t.clientTop]}function K(){return ui.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function rt(t){return t>1?0:t<-1?Fi:Math.acos(t)}function nt(t){return t>1?Hi:t<-1?-Hi:Math.asin(t)}function at(t){return((t=Math.exp(t))-1/t)/2}function ot(t){return((t=Math.exp(t))+1/t)/2}function it(t){return((t=Math.exp(2*t))-1)/(t+1)}function lt(t){return(t=Math.sin(t/2))*t}function st(){}function ct(t,e,r){return this instanceof ct?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof ct?new ct(t.h,t.s,t.l):Mt(""+t,kt,ct):new ct(t,e,r)}function ut(t,e,r){function n(t){return t>360?t-=360:t<0&&(t+=360),t<60?o+(i-o)*t/60:t<180?i:t<240?o+(i-o)*(240-t)/60:o}function a(t){return Math.round(255*n(t))}var o,i;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,i=r<=.5?r*(1+e):r+e-r*e,o=2*r-i,new xt(a(t+120),a(t),a(t-120))}function ft(t,e,r){return this instanceof ft?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof ft?new ft(t.h,t.c,t.l):t instanceof ht?gt(t.l,t.a,t.b):gt((t=At((t=ui.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ft(t,e,r)}function dt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ht(r,Math.cos(t*=Vi)*e,Math.sin(t)*e)}function ht(t,e,r){return this instanceof ht?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof ht?new ht(t.l,t.a,t.b):t instanceof ft?dt(t.h,t.c,t.l):At((t=xt(t)).r,t.g,t.b):new ht(t,e,r)}function pt(t,e,r){var n=(t+16)/116,a=n+e/500,o=n-r/200;return a=mt(a)*Ji,n=mt(n)*Ki,o=mt(o)*tl,new xt(yt(3.2404542*a-1.5371385*n-.4985314*o),yt(-.969266*a+1.8760108*n+.041556*o),yt(.0556434*a-.2040259*n+1.0572252*o))}function gt(t,e,r){return t>0?new ft(Math.atan2(r,e)*Ui,Math.sqrt(e*e+r*r),t):new ft(NaN,NaN,t)}function mt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function xt(t,e,r){return this instanceof xt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof xt?new xt(t.r,t.g,t.b):Mt(""+t,xt,ut):new xt(t,e,r)}function bt(t){return new xt(t>>16,t>>8&255,255&t)}function _t(t){return bt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,r){var n,a,o,i=0,l=0,s=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(Lt(a[0]),Lt(a[1]),Lt(a[2]))}return(o=nl.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(i=(3840&o)>>4,i|=i>>4,l=240&o,l|=l>>4,s=15&o,s|=s<<4):7===t.length&&(i=(16711680&o)>>16,l=(65280&o)>>8,s=255&o)),e(i,l,s))}function kt(t,e,r){var n,a,o=Math.min(t/=255,e/=255,r/=255),i=Math.max(t,e,r),l=i-o,s=(i+o)/2;return l?(a=s<.5?l/(i+o):l/(2-i-o),n=t==i?(e-r)/l+(e0&&s<1?0:n),new ct(n,a,s)}function At(t,e,r){t=Tt(t),e=Tt(e),r=Tt(r);var n=vt((.4124564*t+.3575761*e+.1804375*r)/Ji),a=vt((.2126729*t+.7151522*e+.072175*r)/Ki);return ht(116*a-16,500*(n-a),200*(a-vt((.0193339*t+.119192*e+.9503041*r)/tl)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Lt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Ct(t){return"function"==typeof t?t:function(){return t}}function St(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),zt(e,r,t,n)}}function zt(t,e,r,n){function a(){var t,e=s.status;if(!e&&Pt(s)||e>=200&&e<300||304===e){try{t=r.call(o,s)}catch(t){return void i.error.call(o,t)}i.load.call(o,t)}else i.error.call(o,s)}var o={},i=ui.dispatch("beforesend","progress","load","error"),l={},s=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=a:s.onreadystatechange=function(){s.readyState>3&&a()},s.onprogress=function(t){var e=ui.event;ui.event=t;try{i.progress.call(o,s)}finally{ui.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return r=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(di(arguments)))}}),o.send=function(r,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),s.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),s.setRequestHeader)for(var u in l)s.setRequestHeader(u,l[u]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=c&&(s.responseType=c),null!=a&&o.on("error",a).on("load",function(t){a(null,t)}),i.beforesend.call(o,s),s.send(null==n?null:n),o},o.abort=function(){return s.abort(),o},ui.rebind(o,i,"on"),null==n?o:o.get(Ot(n))}function Ot(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}function Pt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Dt(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var a=r+e,o={c:t,t:a,n:null};return ol?ol.n=o:al=o,ol=o,il||(ll=clearTimeout(ll),il=1,sl(Et)),o}function Et(){var t=Nt(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(ll),ll=setTimeout(Et,e)),il=0):(il=1,sl(Et))}function Nt(){for(var t=Date.now(),e=al;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=al,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}function Ft(t){var e=t.decimal,r=t.thousands,n=t.grouping,a=t.currency,o=n&&r?function(t,e){for(var a=t.length,o=[],i=0,l=n[0],s=0;a>0&&l>0&&(s+l+1>e&&(l=Math.max(1,e-s)),o.push(t.substring(a-=l,a+l)),!((s+=l+1)>e));)l=n[i=(i+1)%n.length];return o.reverse().join(r)}:b;return function(t){ -var r=ul.exec(t),n=r[1]||" ",i=r[2]||">",l=r[3]||"-",s=r[4]||"",c=r[5],u=+r[6],f=r[7],d=r[8],h=r[9],p=1,g="",m="",v=!1,y=!0;switch(d&&(d=+d.substring(1)),(c||"0"===n&&"="===i)&&(c=n="0",i="="),h){case"n":f=!0,h="g";break;case"%":p=100,m="%",h="f";break;case"p":p=100,m="%",h="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+h.toLowerCase());case"c":y=!1;case"d":v=!0,d=0;break;case"s":p=-1,h="r"}"$"===s&&(g=a[0],m=a[1]),"r"!=h||d||(h="g"),null!=d&&("g"==h?d=Math.max(1,Math.min(21,d)):"e"!=h&&"f"!=h||(d=Math.max(0,Math.min(20,d)))),h=fl.get(h)||Bt;var x=c&&f;return function(t){var r=m;if(v&&t%1)return"";var a=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(p<0){var s=ui.formatPrefix(t,d);t=s.scale(t),r=s.symbol+m}else t*=p;t=h(t,d);var b,_,w=t.lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(b=t,_=""):(b=t.substring(0,M),_=t.substring(M))}else b=t.substring(0,w),_=e+t.substring(w+1);!c&&f&&(b=o(b,1/0));var k=g.length+b.length+_.length+(x?0:a.length),A=k"===i?A+a+t:"^"===i?A.substring(0,k>>=1)+a+t+A.substring(k):a+(x?t:A+t))+r}}}function Bt(t){return t+""}function qt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(t,e,r){function n(e){var r=t(e),n=o(r,1);return e-r1)for(;i=c)return-1;if(37===(a=e.charCodeAt(l++))){if(i=e.charAt(l++),!(o=S[i in gl?e.charAt(l++):i])||(n=o(t,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}function n(t,e,r){w.lastIndex=0;var n=w.exec(e.slice(r));return n?(t.w=M.get(n[0].toLowerCase()),r+n[0].length):-1}function a(t,e,r){b.lastIndex=0;var n=b.exec(e.slice(r));return n?(t.w=_.get(n[0].toLowerCase()),r+n[0].length):-1}function o(t,e,r){T.lastIndex=0;var n=T.exec(e.slice(r));return n?(t.m=L.get(n[0].toLowerCase()),r+n[0].length):-1}function i(t,e,r){k.lastIndex=0;var n=k.exec(e.slice(r));return n?(t.m=A.get(n[0].toLowerCase()),r+n[0].length):-1}function l(t,e,n){return r(t,C.c.toString(),e,n)}function s(t,e,n){return r(t,C.x.toString(),e,n)}function c(t,e,n){return r(t,C.X.toString(),e,n)}function u(t,e,r){var n=x.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)}var f=t.dateTime,d=t.date,h=t.time,p=t.periods,g=t.days,m=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function r(t){try{hl=qt;var e=new hl;return e._=t,n(e)}finally{hl=Date}}var n=e(t);return r.parse=function(t){try{hl=qt;var e=n.parse(t);return e&&e._}finally{hl=Date}},r.toString=n.toString,r},e.multi=e.utc.multi=ue;var x=ui.map(),b=Yt(g),_=Xt(g),w=Yt(m),M=Xt(m),k=Yt(v),A=Xt(v),T=Yt(y),L=Xt(y);p.forEach(function(t,e){x.set(t.toLowerCase(),e)});var C={a:function(t){return m[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(f),d:function(t,e){return Gt(t.getDate(),e,2)},e:function(t,e){return Gt(t.getDate(),e,2)},H:function(t,e){return Gt(t.getHours(),e,2)},I:function(t,e){return Gt(t.getHours()%12||12,e,2)},j:function(t,e){return Gt(1+dl.dayOfYear(t),e,3)},L:function(t,e){return Gt(t.getMilliseconds(),e,3)},m:function(t,e){return Gt(t.getMonth()+1,e,2)},M:function(t,e){return Gt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Gt(t.getSeconds(),e,2)},U:function(t,e){return Gt(dl.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Gt(dl.mondayOfYear(t),e,2)},x:e(d),X:e(h),y:function(t,e){return Gt(t.getFullYear()%100,e,2)},Y:function(t,e){return Gt(t.getFullYear()%1e4,e,4)},Z:se,"%":function(){return"%"}},S={a:n,A:a,b:o,B:i,c:l,d:re,e:re,H:ae,I:ae,j:ne,L:le,m:ee,M:oe,p:u,S:ie,U:Wt,w:Zt,W:$t,x:s,X:c,y:Jt,Y:Qt,Z:Kt,"%":ce};return e}function Gt(t,e,r){var n=t<0?"-":"",a=(n?-t:t)+"",o=a.length;return n+(o68?1900:2e3)}function ee(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function re(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ne(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function ae(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function oe(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function ie(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function le(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function se(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=bi(e)/60|0,a=bi(e)%60;return r+Gt(n,"0",2)+Gt(a,"0",2)}function ce(t,e,r){vl.lastIndex=0;var n=vl.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ue(t){for(var e=t.length,r=-1;++r=0?1:-1,l=i*r,s=Math.cos(e),c=Math.sin(e),u=o*c,f=a*s+u*Math.cos(l),d=u*i*Math.sin(l);Ml.add(Math.atan2(d,f)),n=t,a=s,o=c}var e,r,n,a,o;kl.point=function(i,l){kl.point=t,n=(e=i)*Vi,a=Math.cos(l=(r=l)*Vi/2+Fi/4),o=Math.sin(l)},kl.lineEnd=function(){t(e,r)}}function ve(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function xe(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function be(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function ke(t,e){return bi(t[0]-e[0])=0;--l)a.point((f=u[l])[0],f[1])}else n(h.x,h.p.x,-1,a);h=h.p}h=h.o,u=h.z,p=!p}while(!h.v);a.lineEnd()}}}function De(t){if(e=t.length){for(var e,r,n=0,a=t[0];++n0){for(_||(o.polygonStart(),_=!0),o.lineStart();++i1&&2&e&&r.push(r.pop().concat(r.shift())),h.push(r.filter(Re))}var h,p,g,m=e(o),v=a.invert(n[0],n[1]),y={point:i,lineStart:s,lineEnd:c,polygonStart:function(){y.point=u,y.lineStart=f,y.lineEnd=d,h=[],p=[]},polygonEnd:function(){y.point=i,y.lineStart=s,y.lineEnd=c,h=ui.merge(h);var t=He(v,p);h.length?(_||(o.polygonStart(),_=!0),Pe(h,je,t,r,o)):t&&(_||(o.polygonStart(),_=!0),o.lineStart(),r(null,null,1,o),o.lineEnd()),_&&(o.polygonEnd(),_=!1),h=p=null},sphere:function(){o.polygonStart(),o.lineStart(),r(null,null,1,o),o.lineEnd(),o.polygonEnd()}},x=Ie(),b=e(x),_=!1;return y}}function Re(t){return t.length>1}function Ie(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:M,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function je(t,e){return((t=t.x)[0]<0?t[1]-Hi-Ii:Hi-t[1])-((e=e.x)[0]<0?e[1]-Hi-Ii:Hi-e[1])}function Fe(t){var e,r=NaN,n=NaN,a=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,i){var l=o>0?Fi:-Fi,s=bi(o-r);bi(s-Fi)0?Hi:-Hi),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(l,n),t.point(o,n),e=0):a!==l&&s>=Fi&&(bi(r-a)Ii?Math.atan((Math.sin(e)*(o=Math.cos(n))*Math.sin(r)-Math.sin(n)*(a=Math.cos(e))*Math.sin(t))/(a*o*i)):(e+n)/2}function qe(t,e,r,n){var a;if(null==t)a=r*Hi,n.point(-Fi,a),n.point(0,a),n.point(Fi,a),n.point(Fi,0),n.point(Fi,-a),n.point(0,-a),n.point(-Fi,-a),n.point(-Fi,0),n.point(-Fi,a);else if(bi(t[0]-e[0])>Ii){var o=t[0]=0?1:-1,M=w*_,k=M>Fi,A=p*x;if(Ml.add(Math.atan2(A*w*Math.sin(M),g*b+A*Math.cos(M))),o+=k?_+w*Bi:_,k^d>=r^v>=r){var T=xe(ve(f),ve(t));we(T);var L=xe(a,T);we(L);var C=(k^_>=0?-1:1)*nt(L[2]);(n>C||n===C&&(T[0]||T[1]))&&(i+=k^_>=0?1:-1)}if(!m++)break;d=v,p=x,g=b,f=t}}return(o<-Ii||oo}function r(t){var r,o,s,c,u;return{lineStart:function(){c=s=!1,u=1},point:function(f,d){var h,p=[f,d],g=e(f,d),m=i?g?0:a(f,d):g?a(f+(f<0?Fi:-Fi),d):0;if(!r&&(c=s=g)&&t.lineStart(),g!==s&&(h=n(r,p),(ke(r,h)||ke(p,h))&&(p[0]+=Ii,p[1]+=Ii,g=e(p[0],p[1]))),g!==s)u=0,g?(t.lineStart(),h=n(p,r),t.point(h[0],h[1])):(h=n(r,p),t.point(h[0],h[1]),t.lineEnd()),r=h;else if(l&&r&&i^g){var v;m&o||!(v=n(p,r,!0))||(u=0,i?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||r&&ke(r,p)||t.point(p[0],p[1]),r=p,s=g,o=m},lineEnd:function(){s&&t.lineEnd(),r=null},clean:function(){return u|(c&&s)<<1}}}function n(t,e,r){var n=ve(t),a=ve(e),i=[1,0,0],l=xe(n,a),s=ye(l,l),c=l[0],u=s-c*c;if(!u)return!r&&t;var f=o*s/u,d=-o*c/u,h=xe(i,l),p=_e(i,f);be(p,_e(l,d));var g=h,m=ye(p,g),v=ye(g,g),y=m*m-v*(ye(p,p)-1);if(!(y<0)){var x=Math.sqrt(y),b=_e(g,(-m-x)/v);if(be(b,p),b=Me(b),!r)return b;var _,w=t[0],M=e[0],k=t[1],A=e[1];M0^b[1]<(bi(b[0]-w)Fi^(w<=b[0]&&b[0]<=M)){var S=_e(g,(-m+x)/v);return be(S,p),[b,Me(S)]}}}function a(e,r){var n=i?t:Fi-t,a=0;return e<-n?a|=1:e>n&&(a|=2),r<-n?a|=4:r>n&&(a|=8),a}var o=Math.cos(t),i=o>0,l=bi(o)>Ii;return Ne(e,r,mr(t,6*Vi),i?[0,-t]:[-Fi,t-Fi])}function Ue(t,e,r,n){return function(a){var o,i=a.a,l=a.b,s=i.x,c=i.y,u=l.x,f=l.y,d=0,h=1,p=u-s,g=f-c;if(o=t-s,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=r-s,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>d&&(d=o)}else if(p>0){if(o0)){if(o/=g,g<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=n-c,g||!(o<0)){if(o/=g,g<0){if(o>h)return;o>d&&(d=o)}else if(g>0){if(o0&&(a.a={x:s+d*p,y:c+d*g}),h<1&&(a.b={x:s+h*p,y:c+h*g}),a}}}}}}function Ge(t,e,r,n){function a(n,a){return bi(n[0]-t)0?0:3:bi(n[0]-r)0?2:1:bi(n[1]-e)0?1:0:a>0?3:2}function o(t,e){return i(t.x,e.x)}function i(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(l){function s(t){for(var e=0,r=m.length,n=t[1],a=0;an&&et(c,o,t)>0&&++e:o[1]<=n&&et(c,o,t)<0&&--e,c=o;return 0!==e}function c(o,l,s,c){var u=0,f=0;if(null==o||(u=a(o,s))!==(f=a(l,s))||i(o,l)<0^s>0)do{c.point(0===u||3===u?t:r,u>1?n:e)}while((u=(u+s+4)%4)!==f);else c.point(l[0],l[1])}function u(a,o){return t<=a&&a<=r&&e<=o&&o<=n}function f(t,e){u(t,e)&&l.point(t,e)}function d(){S.point=p,m&&m.push(v=[]),k=!0,M=!1,_=w=NaN}function h(){g&&(p(y,x),b&&M&&L.rejoin(),g.push(L.buffer())),S.point=f,M&&l.lineEnd()}function p(t,e){t=Math.max(-jl,Math.min(jl,t)),e=Math.max(-jl,Math.min(jl,e));var r=u(t,e);if(m&&v.push([t,e]),k)y=t,x=e,b=r,k=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&M)l.point(t,e);else{var n={a:{x:_,y:w},b:{x:t,y:e}};C(n)?(M||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),A=!1):r&&(l.lineStart(),l.point(t,e),A=!1)}_=t,w=e,M=r}var g,m,v,y,x,b,_,w,M,k,A,T=l,L=Ie(),C=Ue(t,e,r,n),S={point:f,lineStart:d,lineEnd:h,polygonStart:function(){l=L,g=[],m=[],A=!0},polygonEnd:function(){l=T,g=ui.merge(g);var e=s([t,n]),r=A&&e,a=g.length;(r||a)&&(l.polygonStart(),r&&(l.lineStart(),c(null,null,1,l),l.lineEnd()),a&&Pe(g,o,e,c,l),l.polygonEnd()),g=m=v=null}};return S}}function Ye(t){var e=0,r=Fi/3,n=sr(t),a=n(e,r);return a.parallels=function(t){return arguments.length?n(e=t[0]*Fi/180,r=t[1]*Fi/180):[e/Fi*180,r/Fi*180]},a}function Xe(t,e){function r(t,e){var r=Math.sqrt(o-2*a*Math.sin(e))/a;return[r*Math.sin(t*=a),i-r*Math.cos(t)]}var n=Math.sin(t),a=(n+Math.sin(e))/2,o=1+n*(2*a-n),i=Math.sqrt(o)/a;return r.invert=function(t,e){var r=i-e;return[Math.atan2(t,r)/a,nt((o-(t*t+r*r)*a*a)/(2*a))]},r}function Ze(){function t(t,e){Bl+=a*t-n*e,n=t,a=e}var e,r,n,a;Gl.point=function(o,i){Gl.point=t,e=n=o,r=a=i},Gl.lineEnd=function(){t(e,r)}}function We(t,e){tVl&&(Vl=t),eUl&&(Ul=e)}function $e(){function t(t,e){i.push("M",t,",",e,o)}function e(t,e){i.push("M",t,",",e),l.point=r}function r(t,e){i.push("L",t,",",e)}function n(){l.point=t}function a(){i.push("Z")}var o=Qe(4.5),i=[],l={point:t,lineStart:function(){l.point=e},lineEnd:n,polygonStart:function(){l.lineEnd=a},polygonEnd:function(){l.lineEnd=n,l.point=t},pointRadius:function(t){return o=Qe(t),l},result:function(){if(i.length){var t=i.join("");return i=[],t}}};return l}function Qe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Je(t,e){Ll+=t,Cl+=e,++Sl}function Ke(){function t(t,n){var a=t-e,o=n-r,i=Math.sqrt(a*a+o*o);zl+=i*(e+t)/2,Ol+=i*(r+n)/2,Pl+=i,Je(e=t,r=n)}var e,r;Xl.point=function(n,a){Xl.point=t,Je(e=n,r=a)}}function tr(){Xl.point=Je}function er(){function t(t,e){var r=t-n,o=e-a,i=Math.sqrt(r*r+o*o);zl+=i*(n+t)/2,Ol+=i*(a+e)/2,Pl+=i,i=a*t-n*e,Dl+=i*(n+t),El+=i*(a+e),Nl+=3*i,Je(n=t,a=e)}var e,r,n,a;Xl.point=function(o,i){Xl.point=t,Je(e=n=o,r=a=i)},Xl.lineEnd=function(){t(e,r)}}function rr(t){function e(e,r){t.moveTo(e+i,r),t.arc(e,r,i,0,Bi)}function r(e,r){t.moveTo(e,r),l.point=n}function n(e,r){t.lineTo(e,r)}function a(){l.point=e}function o(){t.closePath()}var i=4.5,l={point:e,lineStart:function(){l.point=r},lineEnd:a,polygonStart:function(){l.lineEnd=o},polygonEnd:function(){l.lineEnd=a,l.point=e},pointRadius:function(t){return i=t,l},result:M};return l}function nr(t){function e(t){return(l?n:r)(t)}function r(e){return ir(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})}function n(e){function r(r,n){r=t(r,n),e.point(r[0],r[1])}function n(){x=NaN,k.point=o,e.lineStart()}function o(r,n){var o=ve([r,n]),i=t(r,n);a(x,b,y,_,w,M,x=i[0],b=i[1],y=r,_=o[0],w=o[1],M=o[2],l,e),e.point(x,b)}function i(){k.point=r,e.lineEnd()}function s(){n(),k.point=c,k.lineEnd=u}function c(t,e){o(f=t,d=e),h=x,p=b,g=_,m=w,v=M,k.point=o}function u(){a(x,b,y,_,w,M,h,p,f,g,m,v,l,e),k.lineEnd=i,i()}var f,d,h,p,g,m,v,y,x,b,_,w,M,k={point:r,lineStart:n,lineEnd:i,polygonStart:function(){e.polygonStart(),k.lineStart=s},polygonEnd:function(){e.polygonEnd(),k.lineStart=n}};return k}function a(e,r,n,l,s,c,u,f,d,h,p,g,m,v){var y=u-e,x=f-r,b=y*y+x*x;if(b>4*o&&m--){var _=l+h,w=s+p,M=c+g,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=bi(bi(M)-1)o||bi((y*z+x*O)/b-.5)>.3||l*h+s*p+c*g0&&16,e):Math.sqrt(o)},e}function ar(t){var e=nr(function(e,r){return t([e*Ui,r*Ui])});return function(t){return cr(e(t))}}function or(t){this.stream=t}function ir(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function lr(t){return sr(function(){return t})()}function sr(t){function e(t){return t=l(t[0]*Vi,t[1]*Vi),[t[0]*d+s,c-t[1]*d]}function r(t){return(t=l.invert((t[0]-s)/d,(c-t[1])/d))&&[t[0]*Ui,t[1]*Ui]}function n(){l=ze(i=dr(v,y,x),o);var t=o(g,m);return s=h-t[0]*d,c=p+t[1]*d,a()}function a(){return u&&(u.valid=!1,u=null),e}var o,i,l,s,c,u,f=nr(function(t,e){return t=o(t,e),[t[0]*d+s,c-t[1]*d]}),d=150,h=480,p=250,g=0,m=0,v=0,y=0,x=0,_=Il,w=b,M=null,k=null;return e.stream=function(t){return u&&(u.valid=!1),u=cr(_(i,f(w(t)))),u.valid=!0,u},e.clipAngle=function(t){return arguments.length?(_=null==t?(M=t,Il):Ve((M=+t)*Vi),a()):M},e.clipExtent=function(t){return arguments.length?(k=t,w=t?Ge(t[0][0],t[0][1],t[1][0],t[1][1]):b,a()):k},e.scale=function(t){return arguments.length?(d=+t,n()):d},e.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],n()):[h,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Vi,m=t[1]%360*Vi,n()):[g*Ui,m*Ui]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Vi,y=t[1]%360*Vi,x=t.length>2?t[2]%360*Vi:0,n()):[v*Ui,y*Ui,x*Ui]},ui.rebind(e,f,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&r,n()}}function cr(t){return ir(t,function(e,r){t.point(e*Vi,r*Vi)})}function ur(t,e){return[t,e]}function fr(t,e){return[t>Fi?t-Bi:t<-Fi?t+Bi:t,e]}function dr(t,e,r){return t?e||r?ze(pr(t),gr(e,r)):pr(t):e||r?gr(e,r):fr}function hr(t){return function(e,r){return e+=t,[e>Fi?e-Bi:e<-Fi?e+Bi:e,r]}}function pr(t){var e=hr(t);return e.invert=hr(-t),e}function gr(t,e){function r(t,e){var r=Math.cos(e),l=Math.cos(t)*r,s=Math.sin(t)*r,c=Math.sin(e),u=c*n+l*a;return[Math.atan2(s*o-u*i,l*n-c*a),nt(u*o+s*i)]}var n=Math.cos(t),a=Math.sin(t),o=Math.cos(e),i=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),l=Math.cos(t)*r,s=Math.sin(t)*r,c=Math.sin(e),u=c*o-s*i;return[Math.atan2(s*o+c*i,l*n+u*a),nt(u*n-l*a)]},r}function mr(t,e){var r=Math.cos(t),n=Math.sin(t);return function(a,o,i,l){var s=i*e;null!=a?(a=vr(r,a),o=vr(r,o),(i>0?ao)&&(a+=i*Bi)):(a=t+i*Bi,o=t-.5*s);for(var c,u=a;i>0?u>o:u0?e<-Hi+Ii&&(e=-Hi+Ii):e>Hi-Ii&&(e=Hi-Ii);var r=i/Math.pow(a(e),o);return[r*Math.sin(o*t),i-r*Math.cos(o*t)]}var n=Math.cos(t),a=function(t){return Math.tan(Fi/4+t/2)},o=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(a(e)/a(t)),i=n*Math.pow(a(t),o)/o;return o?(r.invert=function(t,e){var r=i-e,n=tt(o)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/o,2*Math.atan(Math.pow(i/n,1/o))-Hi]},r):Lr}function Tr(t,e){function r(t,e){var r=o-e;return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),a=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),o=n/a+t;return bi(a)1&&et(t[r[n-2]],t[r[n-1]],t[a])<=0;)--n;r[n++]=a}return r.slice(0,n)}function Dr(t,e){return t[0]-e[0]||t[1]-e[1]}function Er(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Nr(t,e,r,n){var a=t[0],o=r[0],i=e[0]-a,l=n[0]-o,s=t[1],c=r[1],u=e[1]-s,f=n[1]-c,d=(l*(s-c)-f*(a-o))/(f*i-l*u);return[a+d*i,s+d*u]}function Rr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function Ir(){an(this),this.edge=this.site=this.circle=null}function jr(t){var e=ls.pop()||new Ir;return e.site=t,e}function Fr(t){Wr(t),as.remove(t),ls.push(t),an(t)}function Br(t){var e=t.circle,r=e.x,n=e.cy,a={x:r,y:n},o=t.P,i=t.N,l=[t];Fr(t);for(var s=o;s.circle&&bi(r-s.circle.x)Ii)l=l.L;else{if(!((a=o-Vr(l,i))>Ii)){n>-Ii?(e=l.P,r=l):a>-Ii?(e=l,r=l.N):e=r=l;break}if(!l.R){e=l;break}l=l.R}var s=jr(t);if(as.insert(e,s),e||r){if(e===r)return Wr(e),r=jr(e.site),as.insert(s,r),s.edge=r.edge=Kr(e.site,s.site),Zr(e),void Zr(r);if(!r)return void(s.edge=Kr(e.site,s.site));Wr(e),Wr(r);var c=e.site,u=c.x,f=c.y,d=t.x-u,h=t.y-f,p=r.site,g=p.x-u,m=p.y-f,v=2*(d*m-h*g),y=d*d+h*h,x=g*g+m*m,b={x:(m*y-h*x)/v+u,y:(d*x-g*y)/v+f};en(r.edge,c,p,b),s.edge=Kr(c,t,null,b),r.edge=Kr(t,p,null,b),Zr(e),Zr(r)}}function Hr(t,e){var r=t.site,n=r.x,a=r.y,o=a-e;if(!o)return n;var i=t.P;if(!i)return-1/0;r=i.site;var l=r.x,s=r.y,c=s-e;if(!c)return l;var u=l-n,f=1/o-1/c,d=u/c;return f?(-d+Math.sqrt(d*d-2*f*(u*u/(-2*c)-s+c/2+a-o/2)))/f+n:(n+l)/2}function Vr(t,e){var r=t.N;if(r)return Hr(r,e);var n=t.site;return n.y===e?n.x:1/0}function Ur(t){this.site=t,this.edges=[]}function Gr(t){for(var e,r,n,a,o,i,l,s,c,u,f=t[0][0],d=t[1][0],h=t[0][1],p=t[1][1],g=ns,m=g.length;m--;)if((o=g[m])&&o.prepare())for(l=o.edges,s=l.length,i=0;iIi||bi(a-r)>Ii)&&(l.splice(i,0,new rn(tn(o.site,u,bi(n-f)Ii?{x:f,y:bi(e-f)Ii?{x:bi(r-p)Ii?{x:d,y:bi(e-d)Ii?{x:bi(r-h)=-ji)){var h=s*s+c*c,p=u*u+f*f,g=(f*h-c*p)/d,m=(s*p-u*h)/d,f=m+l,v=ss.pop()||new Xr;v.arc=t,v.site=a,v.x=g+i,v.y=f+Math.sqrt(g*g+m*m),v.cy=f,t.circle=v;for(var y=null,x=is._;x;)if(v.y=l)return;if(d>p){if(o){if(o.y>=c)return}else o={x:m,y:s};r={x:m,y:c}}else{if(o){if(o.y1)if(d>p){if(o){if(o.y>=c)return}else o={x:(s-a)/n,y:s};r={x:(c-a)/n,y:c}}else{if(o){if(o.y=l)return}else o={x:i,y:n*i+a};r={x:l,y:n*l+a}}else{if(o){if(o.xo||f>i||d=b,M=r>=_,k=M<<1|w,A=k+4;ko&&(a=e.slice(o,a),l[i]?l[i]+=a:l[++i]=a),(r=r[0])===(n=n[0])?l[i]?l[i]+=n:l[++i]=n:(l[++i]=null,s.push({i:i, -x:xn(r,n)})),o=fs.lastIndex;return o=0&&!(r=ui.interpolators[n](t,e)););return r}function wn(t,e){var r,n=[],a=[],o=t.length,i=e.length,l=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function kn(t){return function(e){return 1-t(1-e)}}function An(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tn(t){return t*t}function Ln(t){return t*t*t}function Cn(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Sn(t){return function(e){return Math.pow(e,t)}}function zn(t){return 1-Math.cos(t*Hi)}function On(t){return Math.pow(2,10*(t-1))}function Pn(t){return 1-Math.sqrt(1-t*t)}function Dn(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Bi*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Bi/e)}}function En(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Nn(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rn(t,e){t=ui.hcl(t),e=ui.hcl(e);var r=t.h,n=t.c,a=t.l,o=e.h-r,i=e.c-n,l=e.l-a;return isNaN(i)&&(i=0,n=isNaN(n)?e.c:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return dt(r+o*t,n+i*t,a+l*t)+""}}function In(t,e){t=ui.hsl(t),e=ui.hsl(e);var r=t.h,n=t.s,a=t.l,o=e.h-r,i=e.s-n,l=e.l-a;return isNaN(i)&&(i=0,n=isNaN(n)?e.s:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return ut(r+o*t,n+i*t,a+l*t)+""}}function jn(t,e){t=ui.lab(t),e=ui.lab(e);var r=t.l,n=t.a,a=t.b,o=e.l-r,i=e.a-n,l=e.b-a;return function(t){return pt(r+o*t,n+i*t,a+l*t)+""}}function Fn(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Bn(t){var e=[t.a,t.b],r=[t.c,t.d],n=Hn(e),a=qn(e,r),o=Hn(Vn(r,e,-a))||0;e[0]*r[1]180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Un(r)+"rotate(",null,")")-2,x:xn(t,e)})):e&&r.push(Un(r)+"rotate("+e+")")}function Xn(t,e,r,n){t!==e?n.push({i:r.push(Un(r)+"skewX(",null,")")-2,x:xn(t,e)}):e&&r.push(Un(r)+"skewX("+e+")")}function Zn(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var a=r.push(Un(r)+"scale(",null,",",null,")");n.push({i:a-4,x:xn(t[0],e[0])},{i:a-2,x:xn(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Un(r)+"scale("+e+")")}function Wn(t,e){var r=[],n=[];return t=ui.transform(t),e=ui.transform(e),Gn(t.translate,e.translate,r,n),Yn(t.rotate,e.rotate,r,n),Xn(t.skew,e.skew,r,n),Zn(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,a=-1,o=n.length;++a=0;)r.push(a[n])}function sa(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(o=t.children)&&(a=o.length))for(var a,o,i=-1;++ia&&(n=r,a=e);return n}function xa(t){return t.reduce(ba,0)}function ba(t,e){return t+e[1]}function _a(t,e){return wa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wa(t,e){for(var r=-1,n=+t[0],a=(t[1]-n)/e,o=[];++r<=e;)o[r]=a*r+n;return o}function Ma(t){return[ui.min(t),ui.max(t)]}function ka(t,e){return t.value-e.value}function Aa(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ta(t,e){t._pack_next=e,e._pack_prev=t}function La(t,e){var r=e.x-t.x,n=e.y-t.y,a=t.r+e.r;return.999*a*a>r*r+n*n}function Ca(t){function e(t){u=Math.min(t.x-t.r,u),f=Math.max(t.x+t.r,f),d=Math.min(t.y-t.r,d),h=Math.max(t.y+t.r,h)}if((r=t.children)&&(c=r.length)){var r,n,a,o,i,l,s,c,u=1/0,f=-1/0,d=1/0,h=-1/0;if(r.forEach(Sa),n=r[0],n.x=-n.r,n.y=0,e(n),c>1&&(a=r[1],a.x=a.r,a.y=0,e(a),c>2))for(o=r[2],Pa(n,a,o),e(o),Aa(n,o),n._pack_prev=o,Aa(o,a),a=n._pack_next,i=3;i=0;)e=a[o],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}function ja(t,e,r){return t.a.parent===e.parent?t.a:r}function Fa(t){return 1+ui.max(t,function(t){return t.y})}function Ba(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function qa(t){var e=t.children;return e&&e.length?qa(e[0]):t}function Ha(t){var e,r=t.children;return r&&(e=r.length)?Ha(r[e-1]):t}function Va(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ua(t,e){var r=t.x+e[3],n=t.y+e[0],a=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return a<0&&(r+=a/2,a=0),o<0&&(n+=o/2,o=0),{x:r,y:n,dx:a,dy:o}}function Ga(t){var e=t[0],r=t[t.length-1];return e2?$a:Xa,s=n?Qn:$n;return i=a(t,e,s,r),l=a(e,t,s,_n),o}function o(t){return i(t)}var i,l;return o.invert=function(t){return l(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},o.range=function(t){return arguments.length?(e=t,a()):e},o.rangeRound=function(t){return o.range(t).interpolate(Fn)},o.clamp=function(t){return arguments.length?(n=t,a()):n},o.interpolate=function(t){return arguments.length?(r=t,a()):r},o.ticks=function(e){return eo(t,e)},o.tickFormat=function(e,r){return ro(t,e,r)},o.nice=function(e){return Ka(t,e),a()},o.copy=function(){return Qa(t,e,r,n)},a()}function Ja(t,e){return ui.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ka(t,e){return Za(t,Wa(to(t,e)[2])),Za(t,Wa(to(t,e)[2])),t}function to(t,e){null==e&&(e=10);var r=Ga(t),n=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),o=e/n*a;return o<=.15?a*=10:o<=.35?a*=5:o<=.75&&(a*=2),r[0]=Math.ceil(r[0]/a)*a,r[1]=Math.floor(r[1]/a)*a+.5*a,r[2]=a,r}function eo(t,e){return ui.range.apply(ui,to(t,e))}function ro(t,e,r){var n=to(t,e);if(r){var a=ul.exec(r);if(a.shift(),"s"===a[8]){var o=ui.formatPrefix(Math.max(bi(n[0]),bi(n[1])));return a[7]||(a[7]="."+no(o.scale(n[2]))),a[8]="f",r=ui.format(a.join("")),function(t){return r(o.scale(t))+o.symbol}}a[7]||(a[7]="."+ao(a[8],n)),r=a.join("")}else r=",."+no(n[2])+"f";return ui.format(r)}function no(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ao(t,e){var r=no(e[2]);return t in Ms?Math.abs(r-no(Math.max(bi(e[0]),bi(e[1]))))+ +("e"!==t):r-2*("%"===t)}function oo(t,e,r,n){function a(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function i(e){return t(a(e))}return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(a)),i):n},i.base=function(r){return arguments.length?(e=+r,t.domain(n.map(a)),i):e},i.nice=function(){var e=Za(n.map(a),r?Math:As);return t.domain(e),n=e.map(o),i},i.ticks=function(){var t=Ga(n),i=[],l=t[0],s=t[1],c=Math.floor(a(l)),u=Math.ceil(a(s)),f=e%1?2:e;if(isFinite(u-c)){if(r){for(;c0;d--)i.push(o(c)*d);for(c=0;i[c]s;u--);i=i.slice(c,u)}return i},i.tickFormat=function(t,r){if(!arguments.length)return ks;arguments.length<2?r=ks:"function"!=typeof r&&(r=ui.format(r));var n=Math.max(1,e*t/i.ticks().length);return function(t){var i=t/o(Math.round(a(t)));return i*e0?l[r-1]:t[0],r0?0:1}function _o(t,e,r,n,a){var o=t[0]-e[0],i=t[1]-e[1],l=(a?n:-n)/Math.sqrt(o*o+i*i),s=l*i,c=-l*o,u=t[0]+s,f=t[1]+c,d=e[0]+s,h=e[1]+c,p=(u+d)/2,g=(f+h)/2,m=d-u,v=h-f,y=m*m+v*v,x=r-n,b=u*h-d*f,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-m*_)/y,M=(-b*m-v*_)/y,k=(b*v+m*_)/y,A=(-b*m+v*_)/y,T=w-p,L=M-g,C=k-p,S=A-g;return T*T+L*L>C*C+S*S&&(w=k,M=A),[[w-s,M-c],[w*r/x,M*r/x]]}function wo(t){function e(e){function i(){c.push("M",o(t(u),l))}for(var s,c=[],u=[],f=-1,d=e.length,h=Ct(r),p=Ct(n);++f1?t.join("L"):t+"Z"}function ko(t){return t.join("L")+"Z"}function Ao(t){for(var e=0,r=t.length,n=t[0],a=[n[0],",",n[1]];++e1&&a.push("H",n[0]),a.join("")}function To(t){for(var e=0,r=t.length,n=t[0],a=[n[0],",",n[1]];++e1){l=e[1],o=t[s],s++,n+="C"+(a[0]+i[0])+","+(a[1]+i[1])+","+(o[0]-l[0])+","+(o[1]-l[1])+","+o[0]+","+o[1];for(var c=2;c9&&(a=3*e/Math.sqrt(a),i[l]=a*r,i[l+1]=a*n));for(l=-1;++l<=s;)a=(t[Math.min(s,l+1)][0]-t[Math.max(0,l-1)][0])/(6*(1+i[l]*i[l])),o.push([a||0,i[l]*a||0]);return o}function Ho(t){return t.length<3?Mo(t):t[0]+Oo(t,qo(t))}function Vo(t){for(var e,r,n,a=-1,o=t.length;++a0;)h[--l].call(t,i);if(o>=1)return g.event&&g.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var s,c,u,d,h,p=t[r]||(t[r]={active:0,count:0}),g=p[n];g||(s=a.time,c=Dt(o,0,s),g=p[n]={tween:new f,time:s,timer:c,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++p.count)}function ni(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function ai(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function oi(t){return t.toISOString()}function ii(t,e,r){function n(e){return t(e)}function a(t,r){var n=t[1]-t[0],a=n/r,o=ui.bisect($s,a);return o==$s.length?[e.year,to(t.map(function(t){return t/31536e6}),r)[2]]:o?e[a/$s[o-1]<$s[o]/a?o-1:o]:[Ks,to(t,r)[2]]}return n.invert=function(e){return li(t.invert(e))},n.domain=function(e){return arguments.length?(t.domain(e),n):t.domain().map(li)},n.nice=function(t,e){function r(r){return!isNaN(r)&&!t.range(r,li(+r+1),e).length}var o=n.domain(),i=Ga(o),l=null==t?a(i,10):"number"==typeof t&&a(i,t);return l&&(t=l[0],e=l[1]),n.domain(Za(o,e>1?{floor:function(e){for(;r(e=t.floor(e));)e=li(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=li(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Ga(n.domain()),o=null==t?a(r,10):"number"==typeof t?a(r,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(r[0],li(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return ii(t.copy(),e,r)},Ja(n,t)}function li(t){return new Date(t)}function si(t){return JSON.parse(t.responseText)}function ci(t){var e=hi.createRange();return e.selectNode(hi.body),e.createContextualFragment(t.responseText)}var ui={version:"3.5.17"},fi=[].slice,di=function(t){return fi.call(t)},hi=this.document;if(hi)try{di(hi.documentElement.childNodes)[0].nodeType}catch(t){di=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),hi)try{hi.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var pi=this.Element.prototype,gi=pi.setAttribute,mi=pi.setAttributeNS,vi=this.CSSStyleDeclaration.prototype,yi=vi.setProperty;pi.setAttribute=function(t,e){gi.call(this,t,e+"")},pi.setAttributeNS=function(t,e,r){mi.call(this,t,e,r+"")},vi.setProperty=function(t,e,r){yi.call(this,t,e+"",r)}}ui.ascending=a,ui.descending=function(t,e){return et?1:e>=t?0:NaN},ui.min=function(t,e){var r,n,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},ui.max=function(t,e){var r,n,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},ui.extent=function(t,e){var r,n,a,o=-1,i=t.length;if(1===arguments.length){for(;++o=n){r=a=n;break}for(;++on&&(r=n),a=n){r=a=n;break}for(;++on&&(r=n),a1)return s/(u-1)},ui.deviation=function(){var t=ui.variance.apply(this,arguments);return t?Math.sqrt(t):t};var xi=l(a);ui.bisectLeft=xi.left,ui.bisect=ui.bisectRight=xi.right,ui.bisector=function(t){return l(1===t.length?function(e,r){return a(t(e),r)}:t)},ui.shuffle=function(t,e,r){(o=arguments.length)<3&&(r=t.length,o<2&&(e=0));for(var n,a,o=r-e;o;)a=Math.random()*o--|0,n=t[o+e],t[o+e]=t[a+e],t[a+e]=n;return t},ui.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},ui.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],a=new Array(r<0?0:r);e=0;)for(n=t[a],e=n.length;--e>=0;)r[--i]=n[e];return r};var bi=Math.abs;ui.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,a=[],o=c(bi(r)),i=-1;if(t*=o,e*=o,r*=o,r<0)for(;(n=t+r*++i)>e;)a.push(n/o);else for(;(n=t+r*++i)=o.length)return n?n.call(a,i):r?i.sort(r):i;for(var s,c,u,d,h=-1,p=i.length,g=o[l++],m=new f;++h=o.length)return t;var n=[],a=i[r++];return t.forEach(function(t,a){n.push({key:t,values:e(a,r)})}),a?n.sort(function(t,e){return a(t.key,e.key)}):n}var r,n,a={},o=[],i=[];return a.map=function(e,r){return t(r,e,0)},a.entries=function(r){return e(t(ui.map,r,0),0)},a.key=function(t){return o.push(t),a},a.sortKeys=function(t){return i[o.length-1]=t,a},a.sortValues=function(t){return r=t,a},a.rollup=function(t){return n=t,a},a},ui.set=function(t){var e=new x;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},ui.event=null,ui.requote=function(t){return t.replace(ki,"\\$&")};var ki=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ai={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},Ti=function(t,e){return e.querySelector(t)},Li=function(t,e){return e.querySelectorAll(t)},Ci=function(t,e){var r=t.matches||t[w(t,"matchesSelector")];return(Ci=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Ti=function(t,e){return Sizzle(t,e)[0]||null},Li=Sizzle,Ci=Sizzle.matchesSelector),ui.selection=function(){return ui.select(hi.documentElement)};var Si=ui.selection.prototype=[];Si.select=function(t){var e,r,n,a,o=[];t=z(t);for(var i=-1,l=this.length;++i=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),Oi.hasOwnProperty(r)?{space:Oi[r],local:t}:t}},Si.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=ui.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(P(e,t[e]));return this}return this.each(P(t,e))},Si.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=N(t)).length,a=-1;if(e=r.classList){for(;++a=0;)(r=n[a])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},Si.sort=function(t){t=U.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.transition().duration(S)),e.call(t.event)}function l(){_&&_.domain(b.range().map(function(t){return(t-k.x)/k.k}).map(b.invert)),M&&M.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function s(t){z++||t({type:"zoomstart"})}function c(t){l(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function u(t){--z||(t({type:"zoomend"}),m=null)}function f(){function t(){l=1,o(ui.mouse(a),d),c(i)}function r(){f.on(P,null).on(D,null),h(l),u(i)}var a=this,i=N.of(a,arguments),l=0,f=ui.select(n(a)).on(P,t).on(D,r),d=e(ui.mouse(a)),h=Q(a);Bs.call(a),s(i)}function d(){function t(){var t=ui.touches(p);return h=k.k,t.forEach(function(t){t.identifier in m&&(m[t.identifier]=e(t))}),t}function r(){var e=ui.event.target;ui.select(e).on(b,n).on(_,l),w.push(e);for(var r=ui.event.changedTouches,a=0,o=r.length;a1){var u=s[0],f=s[1],d=u[0]-f[0],h=u[1]-f[1];v=d*d+h*h}}function n(){var t,e,r,n,i=ui.touches(p);Bs.call(p);for(var l=0,s=i.length;l=c)return i;if(a)return a=!1,o;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fl=ui.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=ui.round(t,It(t,e))).toFixed(Math.max(0,Math.min(20,It(t*(1+1e-15),e))))}}),dl=ui.time={},hl=Date;qt.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(){pl.setUTCDate.apply(this._,arguments)},setDay:function(){pl.setUTCDay.apply(this._,arguments)},setFullYear:function(){pl.setUTCFullYear.apply(this._,arguments)},setHours:function(){pl.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){pl.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){pl.setUTCMinutes.apply(this._,arguments)},setMonth:function(){pl.setUTCMonth.apply(this._,arguments)},setSeconds:function(){pl.setUTCSeconds.apply(this._,arguments)},setTime:function(){pl.setTime.apply(this._,arguments)}};var pl=Date.prototype;dl.year=Ht(function(t){return t=dl.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),dl.years=dl.year.range,dl.years.utc=dl.year.utc.range,dl.day=Ht(function(t){var e=new hl(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),dl.days=dl.day.range,dl.days.utc=dl.day.utc.range,dl.dayOfYear=function(t){var e=dl.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=dl[t]=Ht(function(t){return(t=dl.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=dl.year(t).getDay();return Math.floor((dl.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});dl[t+"s"]=r.range,dl[t+"s"].utc=r.utc.range,dl[t+"OfYear"]=function(t){var r=dl.year(t).getDay();return Math.floor((dl.dayOfYear(t)+(r+e)%7)/7)}}),dl.week=dl.sunday,dl.weeks=dl.sunday.range,dl.weeks.utc=dl.sunday.utc.range,dl.weekOfYear=dl.sundayOfYear;var gl={"-":"",_:" ",0:"0"},ml=/^\s*\d+/,vl=/^%/;ui.locale=function(t){return{numberFormat:Ft(t),timeFormat:Ut(t)}};var yl=ui.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"]});ui.format=yl.numberFormat,ui.geo={},fe.prototype={s:0,t:0,add:function(t){de(t,this.t,xl),de(xl.s,this.s,this),this.s?this.t+=xl.t:this.s=xl.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var xl=new fe;ui.geo.stream=function(t,e){t&&bl.hasOwnProperty(t.type)?bl[t.type](t,e):he(t,e)};var bl={Feature:function(t,e){he(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,a=r.length;++nh&&(h=e)}function e(e,r){var n=ve([e*Vi,r*Vi]);if(v){var a=xe(v,n),o=[a[1],-a[0],0],i=xe(o,a);we(i),i=Me(i);var s=e-p,c=s>0?1:-1,g=i[0]*Ui*c,m=bi(s)>180;if(m^(c*ph&&(h=y)}else if(g=(g+360)%360-180,m^(c*ph&&(h=r);m?el(u,d)&&(d=e):l(e,d)>l(u,d)&&(u=e):d>=u?(ed&&(d=e)):e>p?l(u,e)>l(u,d)&&(d=e):l(e,d)>l(u,d)&&(u=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){b[0]=u,b[1]=d,_.point=t,v=null}function a(t,r){if(v){var n=t-p;y+=bi(n)>180?n+(n>0?360:-360):n}else g=t,m=r;kl.point(t,r),e(t,r)}function o(){kl.lineStart()}function i(){a(g,m),kl.lineEnd(),bi(y)>Ii&&(u=-(d=180)),b[0]=u,b[1]=d,v=null}function l(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tIi?h=90:y<-Ii&&(f=-90),b[0]=u,b[1]=d}};return function(t){h=d=-(u=f=1/0),x=[],ui.geo.stream(t,_);var e=x.length;if(e){x.sort(s);for(var r,n=1,a=x[0],o=[a];nl(a[0],a[1])&&(a[1]=r[1]),l(r[0],a[1])>l(a[0],a[1])&&(a[0]=r[0])):o.push(a=r);for(var i,r,p=-1/0,e=o.length-1,n=0,a=o[e];n<=e;a=r,++n)r=o[n],(i=l(a[1],r[0]))>p&&(p=i,u=r[0],d=a[1])}return x=b=null,u===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[u,f],[d,h]]}}(),ui.geo.centroid=function(t){Al=Tl=Ll=Cl=Sl=zl=Ol=Pl=Dl=El=Nl=0,ui.geo.stream(t,Rl);var e=Dl,r=El,n=Nl,a=e*e+r*r+n*n;return a=.12&&a<.234&&n>=-.425&&n<-.214?i:a>=.166&&a<.234&&n>=-.214&&n<-.115?l:o).invert(t)},t.stream=function(t){var e=o.stream(t),r=i.stream(t),n=l.stream(t);return{point:function(t,a){e.point(t,a),r.point(t,a),n.point(t,a)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),i.precision(e),l.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),i.scale(.35*e),l.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var c=o.scale(),u=+e[0],f=+e[1];return r=o.translate(e).clipExtent([[u-.455*c,f-.238*c],[u+.455*c,f+.238*c]]).stream(s).point,n=i.translate([u-.307*c,f+.201*c]).clipExtent([[u-.425*c+Ii,f+.12*c+Ii],[u-.214*c-Ii,f+.234*c-Ii]]).stream(s).point,a=l.translate([u-.205*c,f+.212*c]).clipExtent([[u-.214*c+Ii,f+.166*c+Ii],[u-.115*c-Ii,f+.234*c-Ii]]).stream(s).point,t},t.scale(1070)};var Fl,Bl,ql,Hl,Vl,Ul,Gl={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Bl=0,Gl.lineStart=Ze},polygonEnd:function(){Gl.lineStart=Gl.lineEnd=Gl.point=M,Fl+=bi(Bl/2)}},Yl={point:We,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Xl={point:Je,lineStart:Ke,lineEnd:tr,polygonStart:function(){Xl.lineStart=er},polygonEnd:function(){Xl.point=Je,Xl.lineStart=Ke,Xl.lineEnd=tr}};ui.geo.path=function(){function t(t){return t&&("function"==typeof l&&o.pointRadius(+l.apply(this,arguments)),i&&i.valid||(i=a(o)),ui.geo.stream(t,i)),o.result()}function e(){return i=null,t}var r,n,a,o,i,l=4.5;return t.area=function(t){return Fl=0,ui.geo.stream(t,a(Gl)),Fl},t.centroid=function(t){return Ll=Cl=Sl=zl=Ol=Pl=Dl=El=Nl=0,ui.geo.stream(t,a(Xl)),Nl?[Dl/Nl,El/Nl]:Pl?[zl/Pl,Ol/Pl]:Sl?[Ll/Sl,Cl/Sl]:[NaN,NaN]},t.bounds=function(t){return Vl=Ul=-(ql=Hl=1/0),ui.geo.stream(t,a(Yl)),[[ql,Hl],[Vl,Ul]]},t.projection=function(t){return arguments.length?(a=(r=t)?t.stream||ar(t):b,e()):r},t.context=function(t){return arguments.length?(o=null==(n=t)?new $e:new rr(t),"function"!=typeof l&&o.pointRadius(l),e()):n},t.pointRadius=function(e){return arguments.length?(l="function"==typeof e?e:(o.pointRadius(+e),+e),t):l},t.projection(ui.geo.albersUsa()).context(null)},ui.geo.transform=function(t){return{stream:function(e){var r=new or(e);for(var n in t)r[n]=t[n];return r}}},or.prototype={point:function(t,e){this.stream.point(t,e)},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()}},ui.geo.projection=lr,ui.geo.projectionMutator=sr,(ui.geo.equirectangular=function(){return lr(ur)}).raw=ur.invert=ur,ui.geo.rotation=function(t){function e(e){return e=t(e[0]*Vi,e[1]*Vi),e[0]*=Ui,e[1]*=Ui,e}return t=dr(t[0]%360*Vi,t[1]*Vi,t.length>2?t[2]*Vi:0),e.invert=function(e){return e=t.invert(e[0]*Vi,e[1]*Vi),e[0]*=Ui,e[1]*=Ui,e},e},fr.invert=ur,ui.geo.circle=function(){function t(){var t="function"==typeof n?n.apply(this,arguments):n,e=dr(-t[0]*Vi,-t[1]*Vi,0).invert,a=[];return r(null,null,1,{point:function(t,r){a.push(t=e(t,r)),t[0]*=Ui,t[1]*=Ui}}),{type:"Polygon",coordinates:[a]}}var e,r,n=[0,0],a=6;return t.origin=function(e){return arguments.length?(n=e,t):n},t.angle=function(n){return arguments.length?(r=mr((e=+n)*Vi,a*Vi),t):e},t.precision=function(n){return arguments.length?(r=mr(e*Vi,(a=+n)*Vi),t):a},t.angle(90)},ui.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Vi,a=t[1]*Vi,o=e[1]*Vi,i=Math.sin(n),l=Math.cos(n),s=Math.sin(a),c=Math.cos(a),u=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((r=f*i)*r+(r=c*u-s*f*l)*r),s*u+c*f*l)},ui.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return ui.range(Math.ceil(o/m)*m,a,m).map(d).concat(ui.range(Math.ceil(c/v)*v,s,v).map(h)).concat(ui.range(Math.ceil(n/p)*p,r,p).filter(function(t){return bi(t%m)>Ii}).map(u)).concat(ui.range(Math.ceil(l/g)*g,i,g).filter(function(t){return bi(t%v)>Ii}).map(f))}var r,n,a,o,i,l,s,c,u,f,d,h,p=10,g=p,m=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(h(s).slice(1),d(a).reverse().slice(1),h(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],a=+e[1][0],c=+e[0][1],s=+e[1][1],o>a&&(e=o,o=a,a=e),c>s&&(e=c,c=s,s=e),t.precision(y)):[[o,c],[a,s]]},t.minorExtent=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],l=+e[0][1],i=+e[1][1],n>r&&(e=n,n=r,r=e),l>i&&(e=l,l=i,i=e),t.precision(y)):[[n,l],[r,i]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(m=+e[0],v=+e[1],t):[m,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(y=+e,u=yr(l,i,90),f=xr(n,r,y),d=yr(c,s,90),h=xr(o,a,y),t):y},t.majorExtent([[-180,-90+Ii],[180,90-Ii]]).minorExtent([[-180,-80-Ii],[180,80+Ii]])},ui.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||a.apply(this,arguments)]}}var e,r,n=br,a=_r;return t.distance=function(){return ui.geo.distance(e||n.apply(this,arguments),r||a.apply(this,arguments))},t.source=function(r){return arguments.length?(n=r,e="function"==typeof r?null:r,t):n},t.target=function(e){return arguments.length?(a=e,r="function"==typeof e?null:e,t):a},t.precision=function(){return arguments.length?t:0},t},ui.geo.interpolate=function(t,e){return wr(t[0]*Vi,t[1]*Vi,e[0]*Vi,e[1]*Vi)},ui.geo.length=function(t){return Zl=0,ui.geo.stream(t,Wl),Zl};var Zl,Wl={sphere:M,point:M,lineStart:Mr,lineEnd:M,polygonStart:M,polygonEnd:M},$l=kr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(ui.geo.azimuthalEqualArea=function(){return lr($l)}).raw=$l;var Ql=kr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},b);(ui.geo.azimuthalEquidistant=function(){return lr(Ql)}).raw=Ql,(ui.geo.conicConformal=function(){return Ye(Ar)}).raw=Ar,(ui.geo.conicEquidistant=function(){return Ye(Tr)}).raw=Tr;var Jl=kr(function(t){return 1/t},Math.atan);(ui.geo.gnomonic=function(){return lr(Jl)}).raw=Jl,Lr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Hi]},(ui.geo.mercator=function(){return Cr(Lr)}).raw=Lr;var Kl=kr(function(){return 1},Math.asin);(ui.geo.orthographic=function(){return lr(Kl)}).raw=Kl;var ts=kr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(ui.geo.stereographic=function(){return lr(ts)}).raw=ts,Sr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Hi]},(ui.geo.transverseMercator=function(){var t=Cr(Sr),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):(t=r(),[t[0],t[1],t[2]-90])},r([0,0,90])}).raw=Sr,ui.geom={},ui.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,a=Ct(r),o=Ct(n),i=t.length,l=[],s=[];for(e=0;e=0;--e)h.push(t[l[c[e]][2]]);for(e=+f;e=n&&c.x<=o&&c.y>=a&&c.y<=i?[[n,i],[o,i],[o,a],[n,a]]:[]).point=t[l]}),e}function r(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Ii)*Ii,y:Math.round(i(t,e)/Ii)*Ii,i:e}})}var n=zr,a=Or,o=n,i=a,l=cs;return t?e(t):(e.links=function(t){return cn(r(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return cn(r(t)).cells.forEach(function(r,n){for(var a,o=r.site,i=r.edges.sort(Yr),l=-1,s=i.length,c=i[s-1].edge,u=c.l===o?c.r:c.l;++l=c,d=n>=u,h=d<<1|f;t.leaf=!1,t=t.nodes[h]||(t.nodes[h]=pn()),f?a=c:l=c,d?i=u:s=u,o(t,e,r,n,a,i,l,s)}var u,f,d,h,p,g,m,v,y,x=Ct(l),b=Ct(s);if(null!=e)g=e,m=r,v=n,y=a;else if(v=y=-(g=m=1/0),f=[],d=[],p=t.length,i)for(h=0;hv&&(v=u.x),u.y>y&&(y=u.y),f.push(u.x),d.push(u.y);else for(h=0;hv&&(v=_),w>y&&(y=w),f.push(_),d.push(w)}var M=v-g,k=y-m;M>k?y=m+M:v=g+k;var A=pn();if(A.add=function(t){o(A,t,+x(t,++h),+b(t,h),g,m,v,y)},A.visit=function(t){gn(t,A,g,m,v,y)},A.find=function(t){return mn(A,t[0],t[1],g,m,v,y)},h=-1,null==e){for(;++h=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=hs.get(r)||ds,n=ps.get(n)||b,Mn(n(r.apply(null,fi.call(arguments,1))))},ui.interpolateHcl=Rn,ui.interpolateHsl=In,ui.interpolateLab=jn,ui.interpolateRound=Fn,ui.transform=function(t){var e=hi.createElementNS(ui.ns.prefix.svg,"g");return(ui.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Bn(r?r.matrix:gs)})(t)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gs={a:1,b:0,c:0,d:1,e:0,f:0};ui.interpolateTransform=Wn,ui.layout={},ui.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r0?a=t:(r.c=null,r.t=NaN,r=null,c.end({type:"end",alpha:a=0})):t>0&&(c.start({type:"start",alpha:a=t}),r=Dt(s.tick)),s):a},s.start=function(){function t(t,n){if(!r){for(r=new Array(a),s=0;s=0;)i.push(u=c[s]),u.parent=o,u.depth=o.depth+1;n&&(o.value=0),o.children=c}else n&&(o.value=+n.call(t,o,o.depth)||0),delete o.children;return sa(a,function(t){var r,a;e&&(r=t.children)&&r.sort(e),n&&(a=t.parent)&&(a.value+=t.value)}),l}var e=fa,r=ca,n=ua;return t.sort=function(r){return arguments.length?(e=r,t):e},t.children=function(e){return arguments.length?(r=e,t):r},t.value=function(e){return arguments.length?(n=e,t):n},t.revalue=function(e){return n&&(la(e,function(t){t.children&&(t.value=0)}),sa(e,function(e){var r;e.children||(e.value=+n.call(t,e,e.depth)||0),(r=e.parent)&&(r.value+=e.value)})),e},t},ui.layout.partition=function(){function t(e,r,n,a){var o=e.children;if(e.x=r,e.y=e.depth*a,e.dx=n,e.dy=a,o&&(i=o.length)){var i,l,s,c=-1;for(n=e.value?n/e.value:0;++cl&&(l=n),i.push(n)}for(r=0;r0)for(o=-1;++o=u[0]&&l<=u[1]&&(i=s[ui.bisect(f,l,1,h)-1],i.y+=p,i.push(t[o]));return s}var e=!0,r=Number,n=Ma,a=_a;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=Ct(e),t):n},t.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return wa(t,e)}:Ct(e),t):a},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},ui.layout.pack=function(){function t(t,o){var i=r.call(this,t,o),l=i[0],s=a[0],c=a[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(l.x=l.y=0,sa(l,function(t){t.r=+u(t.value)}),sa(l,Ca),n){var f=n*(e?1:Math.max(2*l.r/s,2*l.r/c))/2;sa(l,function(t){t.r+=f}),sa(l,Ca),sa(l,function(t){t.r-=f})}return Oa(l,s/2,c/2,e?1:1/Math.max(2*l.r/s,2*l.r/c)),i}var e,r=ui.layout.hierarchy().sort(ka),n=0,a=[1,1];return t.size=function(e){return arguments.length?(a=e,t):a},t.radius=function(r){return arguments.length?(e=null==r||"function"==typeof r?r:+r,t):e},t.padding=function(e){return arguments.length?(n=+e,t):n},ia(t,r)},ui.layout.tree=function(){function t(t,a){var u=i.call(this,t,a),f=u[0],d=e(f);if(sa(d,r),d.parent.m=-d.z,la(d,n),c)la(f,o);else{var h=f,p=f,g=f;la(f,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var m=l(h,p)/2-h.x,v=s[0]/(p.x+l(p,h)/2+m),y=s[1]/(g.depth||1);la(f,function(t){t.x=(t.x+m)*v,t.y=t.depth*y})}return u}function e(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var a,o=e.children,i=0,l=o.length;i0&&(Ra(ja(i,t,r),t,n),c+=n,u+=n),f+=i.m,c+=a.m,d+=s.m,u+=o.m;i&&!Na(o)&&(o.t=i,o.m+=f-u),a&&!Ea(s)&&(s.t=a,s.m+=c-d,r=t)}return r}function o(t){t.x*=s[0],t.y=t.depth*s[1]}var i=ui.layout.hierarchy().sort(null).value(null),l=Da,s=[1,1],c=null;return t.separation=function(e){return arguments.length?(l=e,t):l},t.size=function(e){return arguments.length?(c=null==(s=e)?o:null,t):c?null:s},t.nodeSize=function(e){return arguments.length?(c=null==(s=e)?null:o,t):c?s:null},ia(t,i)},ui.layout.cluster=function(){function t(t,o){var i,l=e.call(this,t,o),s=l[0],c=0;sa(s,function(t){var e=t.children;e&&e.length?(t.x=Ba(e),t.y=Fa(e)):(t.x=i?c+=r(t,i):0,t.y=0,i=t)});var u=qa(s),f=Ha(s),d=u.x-r(u,f)/2,h=f.x+r(f,u)/2;return sa(s,a?function(t){t.x=(t.x-s.x)*n[0],t.y=(s.y-t.y)*n[1]}:function(t){t.x=(t.x-d)/(h-d)*n[0],t.y=(1-(s.y?t.y/s.y:1))*n[1]}),l}var e=ui.layout.hierarchy().sort(null).value(null),r=Da,n=[1,1],a=!1;return t.separation=function(e){return arguments.length?(r=e,t):r},t.size=function(e){return arguments.length?(a=null==(n=e),t):a?null:n},t.nodeSize=function(e){return arguments.length?(a=null!=(n=e),t):a?n:null},ia(t,e)},ui.layout.treemap=function(){function t(t,e){for(var r,n,a=-1,o=t.length;++a0;)u.push(i=d[s-1]),u.area+=i.area,"squarify"!==h||(l=n(u,g))<=p?(d.pop(),p=l):(u.area-=u.pop().area,a(u,g,c,!1),g=Math.min(c.dx,c.dy),u.length=u.area=0,p=1/0);u.length&&(a(u,g,c,!0),u.length=u.area=0),o.forEach(e)}}function r(e){var n=e.children;if(n&&n.length){var o,i=f(e),l=n.slice(),s=[];for(t(l,i.dx*i.dy/e.value),s.area=0;o=l.pop();)s.push(o),s.area+=o.area,null!=o.z&&(a(s,o.z?i.dx:i.dy,i,!l.length),s.length=s.area=0);n.forEach(r)}}function n(t,e){for(var r,n=t.area,a=0,o=1/0,i=-1,l=t.length;++ia&&(a=r));return n*=n,e*=e,n?Math.max(e*a*p/n,n/(e*o*p)):1/0}function a(t,e,r,n){var a,o=-1,i=t.length,l=r.x,c=r.y,u=e?s(t.area/e):0;if(e==r.dx){for((n||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=ui.random.normal.apply(ui,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=ui.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;rf?0:1;if(c=qi)return e(c,h)+(t?e(t,1-h):"")+"Z";var p,g,m,v,y,x,b,_,w,M,k,A,T=0,L=0,C=[];if((v=(+s.apply(this,arguments)||0)/2)&&(m=o===zs?Math.sqrt(t*t+c*c):+o.apply(this,arguments),h||(L*=-1),c&&(L=nt(m/c*Math.sin(v))),t&&(T=nt(m/t*Math.sin(v)))),c){y=c*Math.cos(u+L),x=c*Math.sin(u+L),b=c*Math.cos(f-L),_=c*Math.sin(f-L);var S=Math.abs(f-u-2*L)<=Fi?0:1;if(L&&bo(y,x,b,_)===h^S){var z=(u+f)/2;y=c*Math.cos(z),x=c*Math.sin(z),b=_=null}}else y=x=0;if(t){w=t*Math.cos(f-T),M=t*Math.sin(f-T),k=t*Math.cos(u+T),A=t*Math.sin(u+T);var O=Math.abs(u-f+2*T)<=Fi?0:1;if(T&&bo(w,M,k,A)===1-h^O){var P=(u+f)/2;w=t*Math.cos(P),M=t*Math.sin(P),k=A=null}}else w=M=0;if(d>Ii&&(p=Math.min(Math.abs(c-t)/2,+a.apply(this,arguments)))>.001){g=tFi)+",1 "+e}function a(t,e,r,n){return"Q 0,0 "+n}var o=br,i=_r,l=Go,s=vo,c=yo;return t.radius=function(e){return arguments.length?(l=Ct(e),t):l},t.source=function(e){return arguments.length?(o=Ct(e),t):o},t.target=function(e){return arguments.length?(i=Ct(e),t):i},t.startAngle=function(e){return arguments.length?(s=Ct(e),t):s},t.endAngle=function(e){return arguments.length?(c=Ct(e),t):c},t},ui.svg.diagonal=function(){function t(t,a){var o=e.call(this,t,a),i=r.call(this,t,a),l=(o.y+i.y)/2,s=[o,{x:o.x,y:l},{x:i.x,y:l},i];return s=s.map(n),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=br,r=_r,n=Yo;return t.source=function(r){return arguments.length?(e=Ct(r),t):e},t.target=function(e){return arguments.length?(r=Ct(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},ui.svg.diagonal.radial=function(){var t=ui.svg.diagonal(),e=Yo,r=t.projection;return t.projection=function(t){return arguments.length?r(Xo(e=t)):e},t},ui.svg.symbol=function(){function t(t,n){return(Ns.get(e.call(this,t,n))||$o)(r.call(this,t,n))}var e=Wo,r=Zo;return t.type=function(r){return arguments.length?(e=Ct(r),t):e},t.size=function(e){return arguments.length?(r=Ct(e),t):r},t};var Ns=ui.map({circle:$o,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Is)),r=e*Is;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rs),r=e*Rs/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rs),r=e*Rs/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});ui.svg.symbolTypes=Ns.keys();var Rs=Math.sqrt(3),Is=Math.tan(30*Vi);Si.transition=function(t){for(var e,r,n=js||++Hs,a=ei(t),o=[],i=Fs||{time:Date.now(),ease:Cn,delay:0,duration:250},l=-1,s=this.length;++lrect,.s>rect").attr("width",f[1]-f[0])}function a(t){t.select(".extent").attr("y",d[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function o(){function o(){32==ui.event.keyCode&&(S||(x=null,O[0]-=f[1],O[1]-=d[1],S=2),T())}function g(){32==ui.event.keyCode&&2==S&&(O[0]+=f[1],O[1]+=d[1],S=0,T())}function m(){var t=ui.mouse(_),n=!1;b&&(t[0]+=b[0],t[1]+=b[1]),S||(ui.event.altKey?(x||(x=[(f[0]+f[1])/2,(d[0]+d[1])/2]),O[0]=f[+(t[0]0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!a(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,o,l;if(!a(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,n=-1,r===e||a(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(l=o;l-- >0;)if(r[l]===e||r[l].listener&&r[l].listener===e){n=l;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],a(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?a(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(a(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],16:[function(t,e,r){"use strict";function n(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{}],17:[function(t,e,r){function n(t,e){var r=e[0],n=e[1],a=e[2],o=e[3],i=r+r,l=n+n,s=a+a,c=r*i,u=n*i,f=n*l,d=a*i,h=a*l,p=a*s,g=o*i,m=o*l,v=o*s;return t[0]=1-f-p,t[1]=u+v,t[2]=d-m,t[3]=0,t[4]=u-v,t[5]=1-c-p,t[6]=h+g,t[7]=0,t[8]=d+m,t[9]=h-g,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}e.exports=n},{}],18:[function(t,e,r){(function(r){"use strict";var n,a=t("is-browser");n="function"==typeof r.matchMedia?!r.matchMedia("(hover: none)").matches:a,e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"is-browser":19}],19:[function(t,e,r){e.exports=!0},{}],20:[function(t,e,r){function n(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n=t.clientX||0,o=t.clientY||0,i=a(e);return r[0]=n-i.left,r[1]=o-i.top,r}function a(t){return t===window||t===document||t===document.body?o:t.getBoundingClientRect()}var o={left:0,top:0};e.exports=n},{}],21:[function(t,e,r){function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(f===setTimeout)return setTimeout(t,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(d===clearTimeout)return clearTimeout(t);if((d===a||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function l(){m&&p&&(m=!1,p.length?g=p.concat(g):v=-1,g.length&&s())}function s(){if(!m){var t=o(l);m=!0;for(var e=g.length;e;){for(p=g,g=[];++v1)for(var r=1;r.5?s/(2-o-i):s/(o+i),o){case t:n=(e-r)/s+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var a,o,i;if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)a=o=i=r;else{var l=r<.5?r*(1+e):r+e-r*e,s=2*r-l;a=n(s,l,t+1/3),o=n(s,l,t),i=n(s,l,t-1/3)}return{r:255*a,g:255*o,b:255*i}}function s(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,a,o=U(t,e,r),i=V(t,e,r),l=o,s=o-i;if(a=0===o?0:s/o,o==i)n=0;else{switch(o){case t:n=(e-r)/s+(e>1)+720)%360;--e;)a.h=(a.h+o)%360,i.push(n(a));return i}function A(t,e){e=e||6;for(var r=n(t).toHsv(),a=r.h,o=r.s,i=r.v,l=[],s=1/e;e--;)l.push(n({h:a,s:o,v:i})),i=(i+s)%1;return l}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(t,r){z(t)&&(t="100%");var n=O(t);return t=V(r,U(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function C(t){return V(1,U(0,t))}function S(t){return parseInt(t,16)}function z(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function O(t){return"string"==typeof t&&-1!=t.indexOf("%")}function P(t){return 1==t.length?"0"+t:""+t}function D(t){return t<=1&&(t=100*t+"%"),t}function E(t){return e.round(255*parseFloat(t)).toString(16)}function N(t){return S(t)/255}function R(t){return!!Z.CSS_UNIT.exec(t)}function I(t){t=t.replace(F,"").replace(B,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Z.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=Z.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Z.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=Z.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Z.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=Z.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Z.hex8.exec(t))?{r:S(r[1]),g:S(r[2]),b:S(r[3]),a:N(r[4]),format:e?"name":"hex8"}:(r=Z.hex6.exec(t))?{r:S(r[1]),g:S(r[2]),b:S(r[3]),format:e?"name":"hex"}:(r=Z.hex4.exec(t))?{r:S(r[1]+""+r[1]),g:S(r[2]+""+r[2]),b:S(r[3]+""+r[3]),a:N(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=Z.hex3.exec(t))&&{r:S(r[1]+""+r[1]),g:S(r[2]+""+r[2]),b:S(r[3]+""+r[3]),format:e?"name":"hex"}}function j(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var F=/^\s+/,B=/\s+$/,q=0,H=e.round,V=e.min,U=e.max,G=e.random;n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,n,a,o,i,l=this.toRgb();return t=l.r/255,r=l.g/255,n=l.b/255,a=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),o=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),i=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),.2126*a+.7152*o+.0722*i},setAlpha:function(t){return this._a=T(t),this._roundA=H(100*this._a)/100,this},toHsv:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=s(this._r,this._g,this._b),e=H(360*t.h),r=H(100*t.s),n=H(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=H(360*t.h),r=H(100*t.s),n=H(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return u(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return f(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:H(this._r),g:H(this._g),b:H(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+H(this._r)+", "+H(this._g)+", "+H(this._b)+")":"rgba("+H(this._r)+", "+H(this._g)+", "+H(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:H(100*L(this._r,255))+"%",g:H(100*L(this._g,255))+"%",b:H(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+H(100*L(this._r,255))+"%, "+H(100*L(this._g,255))+"%, "+H(100*L(this._b,255))+"%)":"rgba("+H(100*L(this._r,255))+"%, "+H(100*L(this._g,255))+"%, "+H(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){ -return 0===this._a?"transparent":!(this._a<1)&&(X[u(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+d(this._r,this._g,this._b,this._a),r=e,a=this._gradientType?"GradientType = 1, ":"";if(t){var o=n(t);r="#"+d(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]="a"===a?t[a]:D(t[a]));t=r}return n(t,e)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:G(),g:G(),b:G()})},n.mix=function(t,e,r){r=0===r?0:r||50;var a=n(t).toRgb(),o=n(e).toRgb(),i=r/100;return n({r:(o.r-a.r)*i+a.r,g:(o.g-a.g)*i+a.g,b:(o.b-a.b)*i+a.b,a:(o.a-a.a)*i+a.a})},n.readability=function(t,r){var a=n(t),o=n(r);return(e.max(a.getLuminance(),o.getLuminance())+.05)/(e.min(a.getLuminance(),o.getLuminance())+.05)},n.isReadable=function(t,e,r){var a,o,i=n.readability(t,e);switch(o=!1,a=j(r),a.level+a.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},n.mostReadable=function(t,e,r){var a,o,i,l,s=null,c=0;r=r||{},o=r.includeFallbackColors,i=r.level,l=r.size;for(var u=0;uc&&(c=a,s=n(e[u]));return n.isReadable(t,s,{level:i,size:l})||!o?s:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var Y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},X=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(Y),Z=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==r&&r.exports?r.exports=n:"function"==typeof t&&t.amd?t(function(){return n}):window.tinycolor=n}(Math)},{}],23:[function(e,r,n){!function(e,a){"object"==typeof n&&void 0!==r?a(n):"function"==typeof t&&t.amd?t(["exports"],a):a(e.topojson=e.topojson||{})}(this,function(t){"use strict";function e(t,e){var n=e.id,a=e.bbox,o=null==e.properties?{}:e.properties,i=r(t,e);return null==n&&null==a?{type:"Feature",properties:o,geometry:i}:null==a?{type:"Feature",id:n,properties:o,geometry:i}:{type:"Feature",id:n,bbox:a,properties:o,geometry:i}}function r(t,e){function r(t,e){e.length&&e.pop();for(var r=f[t<0?~t:t],n=0,a=r.length;n1)n=a(t,e,r);else for(o=0,n=new Array(i=t.arcs.length);o1)for(var a,o,s=1,c=i(n[0]);sc&&(o=n[0],n[0]=n[s],n[s]=o,c=a);return n})}}var l=function(t){return t},s=function(t){if(null==(e=t.transform))return l;var e,r,n,a=e.scale[0],o=e.scale[1],i=e.translate[0],s=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*a+i,t[1]=(n+=t[1])*o+s,t}},c=function(t){function e(t){l[0]=t[0],l[1]=t[1],i(l),l[0]f&&(f=l[0]),l[1]d&&(d=l[1])}function r(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(r);break;case"Point":e(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(e)}}var n=t.bbox;if(!n){var a,o,i=s(t),l=new Array(2),c=1/0,u=c,f=-c,d=-c;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++ef&&(f=l[0]),l[1]d&&(d=l[1])});for(o in t.objects)r(t.objects[o]);n=t.bbox=[c,u,f,d]}return n},u=function(t,e){for(var r,n=t.length,a=n-e;a<--n;)r=t[a],t[a++]=t[n],t[n]=r},f=function(t,r){return"GeometryCollection"===r.type?{type:"FeatureCollection",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},d=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],a=n[0];return t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1],e<0?[r,a]:[a,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){a[t<0?~t:t]=1}),l.push(n)}}var a={},o={},i={},l=[],s=-1;return e.forEach(function(r,n){var a,o=t.arcs[r<0?~r:r];o.length<3&&!o[1][0]&&!o[1][1]&&(a=e[++s],e[s]=r,e[n]=a)}),e.forEach(function(t){var e,n,a=r(t),l=a[0],s=a[1];if(e=i[l])if(delete i[e.end],e.push(t),e.end=s,n=o[s]){delete o[n.start];var c=n===e?e:e.concat(n);o[c.start=e.start]=i[c.end=n.end]=c}else o[e.start]=i[e.end]=e;else if(e=o[s])if(delete o[e.start],e.unshift(t),e.start=l,n=i[l]){delete i[n.end];var u=n===e?e:n.concat(e);o[u.start=n.start]=i[u.end=e.end]=u}else o[e.start]=i[e.end]=e;else e=[t],o[e.start=l]=i[e.end=s]=e}),n(i,o),n(o,i),e.forEach(function(t){a[t<0?~t:t]||l.push([t])}),l},h=function(t){return r(t,n.apply(this,arguments))},p=function(t){return r(t,i.apply(this,arguments))},g=function(t,e){for(var r=0,n=t.length;r>>1;t[a]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var a,o=c(t),i=o[0],l=(o[2]-i)/(e-1)||1,s=o[1],u=(o[3]-s)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,a=1,o=1,c=t.length,f=t[0],d=f[0]=Math.round((f[0]-i)/l),h=f[1]=Math.round((f[1]-s)/u);a1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+l+'"]').remove():(s.pdata=a(t.glplot.cameraParams,[e.xaxis.r2l(s.x)*r[0],e.yaxis.r2l(s.y)*r[1],e.zaxis.r2l(s.z)*r[2]]),n(t.graphDiv,s,l,t.id,s._xa,s._ya))}}},{"../../plots/gl3d/project":230,"../annotations/draw":37}],28:[function(t,e,r){"use strict";e.exports={moduleType:"component",name:"annotations3d",schema:{layout:{"scene.annotations":t("./attributes")}},layoutAttributes:t("./attributes"),handleDefaults:t("./defaults"),convert:t("./convert"),draw:t("./draw")}},{"./attributes":24,"./convert":25,"./defaults":26,"./draw":27}],29:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./common_defaults"),i=t("./attributes");e.exports=function(t,e,r,l,s){function c(r,a){return n.coerce(t,e,i,r,a)}l=l||{},s=s||{};var u=c("visible",!s.itemIsNotPlainObject),f=c("clicktoshow");if(!u&&!f)return e;o(t,e,r,c);for(var d=e.showarrow,h=["x","y"],p=[-10,-30],g={_fullLayout:r},m=0;m<2;m++){var v=h[m],y=a.coerceRef(t,e,g,v,"","paper");if(a.coercePosition(e,g,c,y,v,.5),d){var x="a"+v,b=a.coerceRef(t,e,g,x,"pixel");"pixel"!==b&&b!==y&&(b=e[x]="pixel");var _="pixel"===b?p[m]:.4;a.coercePosition(e,g,c,b,x,_)}c(v+"anchor"),c(v+"shift")}if(n.noneOrAll(t,e,["x","y"]),d&&n.noneOrAll(t,e,["ax","ay"]),t.classes&&(e.classes=t.classes),f){var w=c("xclick"),M=c("yclick");e._xclick=void 0===w?e.x:a.cleanPosition(w,g,e.xref),e._yclick=void 0===M?e.y:a.cleanPosition(M,g,e.yref)}return e}},{"../../lib":156,"../../plots/cartesian/axes":192,"./attributes":31,"./common_defaults":34}],30:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],31:[function(t,e,r){"use strict";var n=t("./arrow_paths"),a=t("../../plots/font_attributes"),o=t("../../plots/cartesian/constants"),i=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:i({},a,{}),width:{valType:"number",min:1,dflt:null},height:{valType:"number",min:1,dflt:null},opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},xshift:{valType:"number",dflt:0},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},yshift:{valType:"number",dflt:0},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},hovertext:{valType:"string"},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:i({},a,{})},captureevents:{valType:"boolean"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":150,"../../plots/cartesian/constants":197,"../../plots/font_attributes":216,"./arrow_paths":30}],32:[function(t,e,r){"use strict";function n(t){var e=t._fullLayout;a.filterVisible(e.annotations).forEach(function(e){var r,n,a=o.getFromId(t,e.xref),i=o.getFromId(t,e.yref),l=3*e.arrowsize*e.arrowwidth||0;a&&a.autorange&&(r=l+e.xshift,n=l-e.xshift,e.axref===e.xref?(o.expand(a,[a.r2c(e.x)],{ppadplus:r,ppadminus:n}),o.expand(a,[a.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):o.expand(a,[a.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,r),ppadminus:Math.max(e._xpadminus,n)})),i&&i.autorange&&(r=l-e.yshift,n=l+e.yshift,e.ayref===e.yref?(o.expand(i,[i.r2c(e.y)],{ppadplus:r,ppadminus:n}),o.expand(i,[i.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):o.expand(i,[i.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,r),ppadminus:Math.max(e._ypadminus,n)}))})}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,r=a.filterVisible(e.annotations);if(r.length&&t._fullData.length){var l={};r.forEach(function(t){l[t.xref]=!0,l[t.yref]=!0});if(o.list(t).filter(function(t){return t.autorange&&l[t._id]}).length)return a.syncOrAsync([i,n],t)}}},{"../../lib":156,"../../plots/cartesian/axes":192,"./draw":37}],33:[function(t,e,r){"use strict";function n(t,e){var r=o(t,e);return r.on.length>0||r.explicitOff.length>0}function a(t,e){var r,n=o(t,e),a=n.on,i=n.off.concat(n.explicitOff),s={};if(a.length||i.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}var l=R.selectAll("a");if(1===l.size()&&l.text()===R.text()){C.insert("a",":first-child").attr({"xlink:xlink:href":l.attr("xlink:href"),"xlink:xlink:show":l.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(P.node())}var c=C.select(".annotation-text-math-group"),f=!c.empty(),p=h.bBox((f?c:R).node()),x=p.width,z=p.height,N=e.width||x,I=e.height||z,j=Math.round(N+2*O),F=Math.round(I+2*O);e._w=N,e._h=I;for(var B=!1,q=["x","y"],H=0;H1)&&($===W?((ot=Q.r2fraction(e["a"+Z]))<0||ot>1)&&(B=!0):B=!0,B))continue;V=Q._offset+Q.r2p(e[Z]),Y=.5}else"x"===Z?(G=e[Z],V=w.l+w.w*G):(G=1-e[Z],V=w.t+w.h*G),Y=e.showarrow?.5:G;if(e.showarrow){at.head=V;var it=e["a"+Z];X=K*r(.5,e.xanchor)-tt*r(.5,e.yanchor),$===W?(at.tail=Q._offset+Q.r2p(it),U=X):(at.tail=V+it,U=X+it),at.text=at.tail+X;var lt=_["x"===Z?"width":"height"];if("paper"===W&&(at.head=u.constrain(at.head,1,lt-1)),"pixel"===$){var st=-Math.max(at.tail-3,at.text),ct=Math.min(at.tail+3,at.text)-lt;st>0?(at.tail+=st,at.text+=st):ct>0&&(at.tail-=ct,at.text-=ct)}at.tail+=nt,at.head+=nt}else X=et*r(Y,rt),U=X,at.text=V+X;at.text+=nt,X+=nt,U+=nt,e["_"+Z+"padplus"]=et/2+U,e["_"+Z+"padminus"]=et/2-U,e["_"+Z+"size"]=et,e["_"+Z+"shift"]=X}if(B)return void C.remove();var ut=0,ft=0;if("left"!==e.align&&(ut=(N-x)*("center"===e.align?.5:1)),"top"!==e.valign&&(ft=(I-z)*("middle"===e.valign?.5:1)),f)c.select("svg").attr({x:O+ut-1,y:O+ft}).call(h.setClipUrl,D?M:null);else{var dt=O+ft-p.top,ht=O+ut-p.left;R.call(g.positionText,ht,dt).call(h.setClipUrl,D?M:null)}E.select("rect").call(h.setRect,O,O,N,I),P.call(h.setRect,S/2,S/2,j-S,F-S),C.call(h.setTranslate,Math.round(k.x.text-j/2),Math.round(k.y.text-F/2)),L.attr({transform:"rotate("+A+","+k.x.text+","+k.y.text+")"});var pt=function(r,l){T.selectAll(".annotation-arrow-g").remove();var c=k.x.head,f=k.y.head,p=k.x.tail+r,g=k.y.tail+l,m=k.x.text+r,x=k.y.text+l,_=u.rotationXYMatrix(A,m,x),M=u.apply2DTransform(_),S=u.apply2DTransform2(_),z=+P.attr("width"),O=+P.attr("height"),D=m-.5*z,E=D+z,N=x-.5*O,R=N+O,I=[[D,N,D,R],[D,R,E,R],[E,R,E,N],[E,N,D,N]].map(S);if(!I.reduce(function(t,e){return t^!!i(c,f,c+1e6,f+1e6,e[0],e[1],e[2],e[3])},!1)){I.forEach(function(t){var e=i(p,g,c,f,t[0],t[1],t[2],t[3]);e&&(p=e.x,g=e.y)});var j=e.arrowwidth,F=e.arrowcolor,B=T.append("g").style({opacity:d.opacity(F)}).classed("annotation-arrow-g",!0),q=B.append("path").attr("d","M"+p+","+g+"L"+c+","+f).style("stroke-width",j+"px").call(d.stroke,d.rgb(F));if(y(q,e.arrowhead,"end",e.arrowsize,e.standoff),t._context.editable&&q.node().parentNode&&!n){var H=c,V=f;if(e.standoff){var U=Math.sqrt(Math.pow(c-p,2)+Math.pow(f-g,2));H+=e.standoff*(p-c)/U,V+=e.standoff*(g-f)/U}var G,Y,X,Z=B.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(p-H)+","+(g-V),transform:"translate("+H+","+V+")"}).style("stroke-width",j+6+"px").call(d.stroke,"rgba(0,0,0,0)").call(d.fill,"rgba(0,0,0,0)");v.init({element:Z.node(),gd:t,prepFn:function(){var t=h.getTranslate(C);Y=t.x,X=t.y,G={},a&&a.autorange&&(G[a._name+".autorange"]=!0),o&&o.autorange&&(G[o._name+".autorange"]=!0)},moveFn:function(t,r){var n=M(Y,X),i=n[0]+t,l=n[1]+r;C.call(h.setTranslate,i,l),G[b+".x"]=a?a.p2r(a.r2p(e.x)+t):e.x+t/w.w,G[b+".y"]=o?o.p2r(o.r2p(e.y)+r):e.y-r/w.h,e.axref===e.xref&&(G[b+".ax"]=a.p2r(a.r2p(e.ax)+t)),e.ayref===e.yref&&(G[b+".ay"]=o.p2r(o.r2p(e.ay)+r)),B.attr("transform","translate("+t+","+r+")"),L.attr({transform:"rotate("+A+","+i+","+l+")"})},doneFn:function(e){if(e){s.relayout(t,G);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}};if(e.showarrow&&pt(0,0),t._context.editable){var gt,mt;v.init({element:C.node(),gd:t,prepFn:function(){mt=L.attr("transform"),gt={}},moveFn:function(t,r){var i="pointer";if(e.showarrow)e.axref===e.xref?gt[b+".ax"]=a.p2r(a.r2p(e.ax)+t):gt[b+".ax"]=e.ax+t,e.ayref===e.yref?gt[b+".ay"]=o.p2r(o.r2p(e.ay)+r):gt[b+".ay"]=e.ay+r,pt(t,r);else{if(n)return;if(a)gt[b+".x"]=e.x+t/a._m;else{var l=e._xsize/w.w,s=e.x+(e._xshift-e.xshift)/w.w-l/2;gt[b+".x"]=v.align(s+t/w.w,l,0,1,e.xanchor)}if(o)gt[b+".y"]=e.y+r/o._m;else{var c=e._ysize/w.h,u=e.y-(e._yshift+e.yshift)/w.h-c/2;gt[b+".y"]=v.align(u-r/w.h,c,0,1,e.yanchor)}a&&o||(i=v.getCursor(a?.5:gt[b+".x"],o?.5:gt[b+".y"],e.xanchor,e.yanchor))}L.attr({transform:"translate("+t+","+r+")"+mt}),m(C,i)},doneFn:function(e){if(m(C),e){s.relayout(t,gt);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}var x,b,_=t._fullLayout,w=t._fullLayout._size;n?(x="annotation-"+n,b=n+".annotations["+r+"]"):(x="annotation",b="annotations["+r+"]"),_._infolayer.selectAll("."+x+'[data-index="'+r+'"]').remove();var M="clip"+_._uid+"_ann"+r;if(!e._input||!1===e.visible)return void l.selectAll("#"+M).remove();var k={x:{},y:{}},A=+e.textangle||0,T=_._infolayer.append("g").classed(x,!0).attr("data-index",String(r)).style("opacity",e.opacity);e.classes&&T.classed(e.classes,!0);var L=T.append("g").classed("annotation-text-g",!0),C=L.append("g").style("pointer-events",e.captureevents?"all":null).call(m,"default").on("click",function(){t._dragging=!1;var a={index:r,annotation:e._input,fullAnnotation:e,event:l.event};n&&(a.subplotId=n),t.emit("plotly_clickannotation",a)});e.hovertext&&C.on("mouseover",function(){var r=e.hoverlabel,n=r.font,a=this.getBoundingClientRect(),o=t.getBoundingClientRect();p.loneHover({x0:a.left-o.left,x1:a.right-o.left,y:(a.top+a.bottom)/2-o.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:t})}).on("mouseout",function(){p.loneUnhover(_._hoverlayer.node())});var S=e.borderwidth,z=e.borderpad,O=S+z,P=C.append("rect").attr("class","bg").style("stroke-width",S+"px").call(d.stroke,e.bordercolor).call(d.fill,e.bgcolor),D=e.width||e.height,E=_._defs.select(".clips").selectAll("#"+M).data(D?[0]:[]);E.enter().append("clipPath").classed("annclip",!0).attr("id",M).append("rect"),E.exit().remove();var N=e.font,R=C.append("text").classed("annotation-text",!0).text(e.text);t._context.editable?R.call(g.makeEditable,{delegate:C,gd:t}).call(c).on("edit",function(r){e.text=r,this.call(c);var n={};n[b+".text"]=e.text,a&&a.autorange&&(n[a._name+".autorange"]=!0),o&&o.autorange&&(n[o._name+".autorange"]=!0),s.relayout(t,n)}):R.call(c)}function i(t,e,r,n,a,o,i,l){var s=r-t,c=a-t,u=i-a,f=n-e,d=o-e,h=l-o,p=s*h-u*f;if(0===p)return null;var g=(c*h-u*d)/p,m=(c*f-s*d)/p;return m<0||m>1||g<0||g>1?null:{x:t+s*g,y:e+f*g}}var l=t("d3"),s=t("../../plotly"),c=t("../../plots/plots"),u=t("../../lib"),f=t("../../plots/cartesian/axes"),d=t("../color"),h=t("../drawing"),p=t("../fx"),g=t("../../lib/svg_text_utils"),m=t("../../lib/setcursor"),v=t("../dragelement"),y=t("./draw_arrow_head");e.exports={draw:n,drawOne:a,drawRaw:o}},{"../../lib":156,"../../lib/setcursor":171,"../../lib/svg_text_utils":173, -"../../plotly":187,"../../plots/cartesian/axes":192,"../../plots/plots":233,"../color":41,"../dragelement":62,"../drawing":65,"../fx":82,"./draw_arrow_head":38,d3:13}],38:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),o=t("../color"),i=t("../drawing"),l=t("./arrow_paths");e.exports=function(t,e,r,s,c){function u(){t.style("stroke-dasharray","0px,100px")}function f(r,a){h.path&&(e>5&&(a=0),n.select(d.parentNode).append("path").attr({class:t.attr("class"),d:h.path,transform:"translate("+r.x+","+r.y+")rotate("+180*a/Math.PI+")scale("+y+")"}).style({fill:x,opacity:b,"stroke-width":0}))}a(s)||(s=1);var d=t.node(),h=l[e||0];"string"==typeof r&&r||(r="end");var p,g,m,v,y=(i.getPx(t,"stroke-width")||1)*s,x=t.style("stroke")||o.defaultLine,b=t.style("stroke-opacity")||1,_=r.indexOf("start")>=0,w=r.indexOf("end")>=0,M=h.backoff*y+c;if("line"===d.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},g={x:+t.attr("x2"),y:+t.attr("y2")};var k=p.x-g.x,A=p.y-g.y;if(m=Math.atan2(A,k),v=m+Math.PI,M){if(M*M>k*k+A*A)return void u();var T=M*Math.cos(m),L=M*Math.sin(m);_&&(p.x-=T,p.y-=L,t.attr({x1:p.x,y1:p.y})),w&&(g.x+=T,g.y+=L,t.attr({x2:g.x,y2:g.y}))}}else if("path"===d.nodeName){var C=d.getTotalLength(),S="";if(C=0))return t;if(3===i)n[i]>1&&(n[i]=1);else if(n[i]>=1)return t}var l=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+l+", "+n[3]+")":"rgb("+l+")"}var a=t("tinycolor2"),o=t("fast-isnumeric"),i=e.exports={},l=t("./attributes");i.defaults=l.defaults;var s=i.defaultLine=l.defaultLine;i.lightLine=l.lightLine;var c=i.background=l.background;i.overrideColorDefaults=function(t){if(void 0===t)return i.defaults;i.defaults=t},i.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},i.rgb=function(t){return i.tinyRGB(a(t))},i.opacity=function(t){return t?a(t).getAlpha():0},i.addOpacity=function(t,e){var r=a(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},i.combine=function(t,e){var r=a(t).toRgb();if(1===r.a)return a(t).toRgbString();var n=a(e||c).toRgb(),o=1===n.a?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},i={r:o.r*(1-r.a)+r.r*r.a,g:o.g*(1-r.a)+r.g*r.a,b:o.b*(1-r.a)+r.b*r.a};return a(i).toRgbString()},i.contrast=function(t,e,r){var n=a(t);return 1!==n.getAlpha()&&(n=a(i.combine(t,c))),(n.isDark()?e?n.lighten(e):c:r?n.darken(r):s).toString()},i.stroke=function(t,e){var r=a(e);t.style({stroke:i.tinyRGB(r),"stroke-opacity":r.getAlpha()})},i.fill=function(t,e){var r=a(e);t.style({fill:i.tinyRGB(r),"fill-opacity":r.getAlpha()})},i.clean=function(t){if(t&&"object"==typeof t){var e,r,a,o,l=Object.keys(t);for(e=0;el&&(o[1]-=(ct-l)/2):r.node()&&!r.classed("js-placeholder")&&(ct=h.bBox(r.node()).height),ct){if(ct+=5,"top"===M.titleside)et.domain[1]-=ct/C.h,o[1]*=-1;else{et.domain[0]+=ct/C.h;var c=m.lineCount(r);o[1]+=(1-c)*l}e.attr("transform","translate("+o+")"),et.setScale()}}lt.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(C.h*(1-et.domain[1]))+")");var f=lt.select(".cbfills").selectAll("rect.cbfill").data(P);f.enter().append("rect").classed("cbfill",!0).style("stroke","none"),f.exit().remove(),f.each(function(t,e){var r=[0===e?z[0]:(P[e]+P[e-1])/2,e===P.length-1?z[1]:(P[e]+P[e+1])/2].map(et.c2p).map(Math.round);e!==P.length-1&&(r[1]+=r[1]>r[0]?1:-1);var o=E(t).replace("e-",""),i=a(o).toHexString();n.select(this).attr({x:W,width:Math.max(H,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:i})});var d=lt.select(".cblines").selectAll("path.cbline").data(M.line.color&&M.line.width?O:[]);return d.enter().append("path").classed("cbline",!0),d.exit().remove(),d.each(function(t){n.select(this).attr("d","M"+W+","+(Math.round(et.c2p(t))+M.line.width/2%1)+"h"+H).call(h.lineGroupStyle,M.line.width,D(t),M.line.dash)}),et._axislayer.selectAll("g."+et._id+"tick,path").remove(),et._pos=W+H+(M.outlinewidth||0)/2-("outside"===M.ticks?1:0),et.side="right",u.syncOrAsync([function(){return s.doTicks(t,et,!0)},function(){if(-1===["top","bottom"].indexOf(M.titleside)){var e=et.titlefont.size,r=et._offset+et._length/2,a=C.l+(et.position||0)*C.w+("right"===et.side?10+e*(et.showticklabels?1:.5):-10-e*(et.showticklabels?.5:0));A("h"+et._id+"title",{avoid:{selection:n.select(t).selectAll("g."+et._id+"tick"),side:M.titleside,offsetLeft:C.l,offsetTop:C.t,maxShift:L.width},attributes:{x:a,y:r,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function A(e,r){var n,a=w();n=l.traceIs(a,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var o={propContainer:et,propName:n,traceIndex:a.index,dfltName:"colorscale",containerGroup:lt.select(".cbtitle")},i="h"===e.charAt(0)?e.substr(1):"h"+e;lt.selectAll("."+i+",."+i+"-math-group").remove(),g.draw(t,e,f(o,r||{}))}function T(){var r=H+M.outlinewidth/2+h.bBox(et._axislayer.node()).width;if(F=st.select("text"),F.node()&&!F.classed("js-placeholder")){var n,a=st.select(".h"+et._id+"title-math-group").node();n=a&&-1!==["top","bottom"].indexOf(M.titleside)?h.bBox(a).width:h.bBox(st.node()).right-W-C.l,r=Math.max(r,n)}var o=2*M.xpad+r+M.borderwidth+M.outlinewidth/2,l=J-K;lt.select(".cbbg").attr({x:W-M.xpad-(M.borderwidth+M.outlinewidth)/2,y:K-X,width:Math.max(o,2),height:Math.max(l+2*X,2)}).call(p.fill,M.bgcolor).call(p.stroke,M.bordercolor).style({"stroke-width":M.borderwidth}),lt.selectAll(".cboutline").attr({x:W,y:K+M.ypad+("top"===M.titleside?ct:0),width:Math.max(H,2),height:Math.max(l-2*M.ypad-ct,2)}).call(p.stroke,M.outlinecolor).style({fill:"None","stroke-width":M.outlinewidth});var s=({center:.5,right:1}[M.xanchor]||0)*o;lt.attr("transform","translate("+(C.l-s)+","+C.t+")"),i.autoMargin(t,e,{x:M.x,y:M.y,l:o*({right:1,center:.5}[M.xanchor]||0),r:o*({left:1,center:.5}[M.xanchor]||0),t:l*({bottom:1,middle:.5}[M.yanchor]||0),b:l*({top:1,middle:.5}[M.yanchor]||0)})}var L=t._fullLayout,C=L._size;if("function"!=typeof M.fillcolor&&"function"!=typeof M.line.color)return void L._infolayer.selectAll("g."+e).remove();var S,z=n.extent(("function"==typeof M.fillcolor?M.fillcolor:M.line.color).domain()),O=[],P=[],D="function"==typeof M.line.color?M.line.color:function(){return M.line.color},E="function"==typeof M.fillcolor?M.fillcolor:function(){return M.fillcolor},N=M.levels.end+M.levels.size/100,R=M.levels.size,I=1.001*z[0]-.001*z[1],j=1.001*z[1]-.001*z[0];for(S=M.levels.start;(S-N)*R<0;S+=R)S>I&&Sz[0]&&S1){var it=Math.pow(10,Math.floor(Math.log(ot)/Math.LN10));nt*=it*u.roundUp(ot/it,[2,5,10]),(Math.abs(M.levels.start)/M.levels.size+1e-6)%1<2e-6&&(et.tick0=0)}et.dtick=nt}et.domain=[Q+Z,Q+G-Z],et.setScale();var lt=L._infolayer.selectAll("g."+e).data([0]);lt.enter().append("g").classed(e,!0).each(function(){var t=n.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),lt.attr("transform","translate("+Math.round(C.l)+","+Math.round(C.t)+")");var st=lt.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(C.l)+",-"+Math.round(C.t)+")");et._axislayer=lt.select(".cbaxis");var ct=0;if(-1!==["top","bottom"].indexOf(M.titleside)){var ut,ft=C.l+(M.x+Y)*C.w,dt=et.titlefont.size;ut="top"===M.titleside?(1-(Q+G-Z))*C.h+C.t+3+.75*dt:(1-(Q+Z))*C.h+C.t-3-.25*dt,A(et._id+"title",{attributes:{x:ft,y:ut,"text-anchor":"start"}})}var ht=u.syncOrAsync([i.previousPromises,k,i.previousPromises,T],t);if(ht&&ht.then&&(t._promises||[]).push(ht),t._context.editable){var pt,gt,mt;c.init({element:lt.node(),gd:t,prepFn:function(){pt=lt.attr("transform"),d(lt)},moveFn:function(t,e){lt.attr("transform",pt+" translate("+t+","+e+")"),gt=c.align($+t/C.w,V,0,1,M.xanchor),mt=c.align(Q-e/C.h,G,0,1,M.yanchor);var r=c.getCursor(gt,mt,M.xanchor,M.yanchor);d(lt,r)},doneFn:function(e){d(lt),e&&void 0!==gt&&void 0!==mt&&o.restyle(t,{"colorbar.x":gt,"colorbar.y":mt},w().index)}})}return ht}function w(){var r,n,a=e.substr(2);for(r=0;r=0?a.Reds:a.Blues,s.colorscale=g,l.reversescale&&(g=o(g)),l.colorscale=g)}},{"../../lib":156,"./flip_scale":52,"./scales":59}],48:[function(t,e,r){"use strict";var n=t("./attributes"),a=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:a({},n.colorscale,{}),cauto:a({},n.zauto,{}),cmax:a({},n.zmax,{}),cmin:a({},n.zmin,{}),autocolorscale:a({},n.autocolorscale,{}),reversescale:a({},n.reversescale,{})}}},{"../../lib/extend":150,"./attributes":46,"./scales.js":59}],49:[function(t,e,r){"use strict";var n=t("./scales");e.exports=n.RdBu},{"./scales":59}],50:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),o=t("../colorbar/has_colorbar"),i=t("../colorbar/defaults"),l=t("./is_valid_scale"),s=t("./flip_scale");e.exports=function(t,e,r,c,u){var f=u.prefix,d=u.cLetter,h=f.slice(0,f.length-1),p=f?a.nestedProperty(t,h).get()||{}:t,g=f?a.nestedProperty(e,h).get()||{}:e,m=p[d+"min"],v=p[d+"max"],y=p.colorscale;c(f+d+"auto",!(n(m)&&n(v)&&m=0;a--,o++)e=t[a],n[o]=[1-e[0],e[1]];return n}},{}],53:[function(t,e,r){"use strict";var n=t("./scales"),a=t("./default_scale"),o=t("./is_valid_scale_array");e.exports=function(t,e){function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return e||(e=a),t?("string"==typeof t&&(r(),"string"==typeof t&&r()),o(t)?t:e):e}},{"./default_scale":49,"./is_valid_scale_array":57,"./scales":59}],54:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),o=t("./is_valid_scale");e.exports=function(t,e){var r=e?a.nestedProperty(t,e).get()||{}:t,i=r.color,l=!1;if(Array.isArray(i))for(var s=0;s4/3-l?i:l}},{}],61:[function(t,e,r){"use strict";var n=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,o){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:n.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":156}],62:[function(t,e,r){"use strict";function n(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function a(t){t._dragging=!1,t._replotPending&&s.plot(t)}function o(t){return i(t.changedTouches?t.changedTouches[0]:t,document.body)}var i=t("mouse-event-offset"),l=t("has-hover"),s=t("../../plotly"),c=t("../../lib"),u=t("../../plots/cartesian/constants"),f=t("../../constants/interactions"),d=e.exports={};d.align=t("./align"),d.getCursor=t("./cursor");var h=t("./unhover");d.unhover=h.wrapped,d.unhoverRaw=h.raw,d.init=function(t){function e(){var t=b&&b._fullLayout;return t&&"pan"===t.dragmode}function r(r,n){var a=function(t){return t&&t._input&&t._input.fixedrange};if(e()){var o=t&&t.plotinfo;if(a(o.yaxis)&&!r)return!1;if(a(o.xaxis)&&!n)return!1}return!0}function i(r){b._dragged=!1,b._dragging=!0;var a=o(r);if(p=a[0],g=a[1],x=r.target,m=(new Date).getTime(),m-b._mouseDownTimew&&(_=Math.max(_-1,1)),t.doneFn&&t.doneFn(b._dragged,_,r),!b._dragged){var n;try{n=new MouseEvent("click",r)}catch(t){var i=o(r);n=document.createEvent("MouseEvents"),n.initMouseEvent("click",r.bubbles,r.cancelable,r.view,r.detail,r.screenX,r.screenY,i[0],i[1],r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.button,r.relatedTarget)}x.dispatchEvent(n)}return a(b),b._dragged=!1,e()?void 0:c.pauseEvent(r)}var p,g,m,v,y,x,b=t.gd,_=1,w=f.DBLCLICKDELAY;b._mouseDownTime||(b._mouseDownTime=0),t.element.style.pointerEvents="all",t.element.onmousedown=i,t.element.ontouchstart=i},d.coverSlip=n},{"../../constants/interactions":138,"../../lib":156,"../../plotly":187,"../../plots/cartesian/constants":197,"./align":60,"./cursor":61,"./unhover":63,"has-hover":18,"mouse-event-offset":20}],63:[function(t,e,r){"use strict";var n=t("../../lib/events"),a=e.exports={};a.wrapped=function(t,e,r){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),a.raw(t,e,r)},a.raw=function(t,e){var r=t._fullLayout,a=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&a&&t.emit("plotly_unhover",{event:e,points:a}))}},{"../../lib/events":149}],64:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"}},{}],65:[function(t,e,r){"use strict";function n(t,e,r,n,a,o,i,l){if(c.traceIs(r,"symbols")){var s=y(r);e.attr("d",function(t){var e;e="various"===t.ms||"various"===o.size?3:v.isBubble(r)?s(t.ms):(o.size||6)/2,t.mrc=e;var n=x.symbolNumber(t.mx||o.symbol)||0,a=n%100;return t.om=n%200>=100,x.symbolFuncs[a](e)+(n>=200?w:"")}).style("opacity",function(t){return(t.mo+1||o.opacity+1)-1})}var f,d,h,p=!1;if(t.so?(h=i.outlierwidth,d=i.outliercolor,f=o.outliercolor):(h=(t.mlw+1||i.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,d="mlc"in t?t.mlcc=a(t.mlc):Array.isArray(i.color)?u.defaultLine:i.color,Array.isArray(o.color)&&(f=u.defaultLine,p=!0),f="mc"in t?t.mcc=n(t.mc):o.color||"rgba(0,0,0,0)"),t.om)e.call(u.stroke,f).style({"stroke-width":(h||1)+"px",fill:"none"});else{e.style("stroke-width",h+"px");var g=o.gradient,m=t.mgt;if(m?p=!0:m=g&&g.type,m&&"none"!==m){var b=t.mgc;b?p=!0:b=g.color;var _="g"+l._fullLayout._uid+"-"+r.uid;p&&(_+="-"+t.i),e.call(x.gradient,l,_,m,f,b)}else e.call(u.fill,f);h&&e.call(u.stroke,d)}}function a(t,e,r,n){var a=t[0]-e[0],o=t[1]-e[1],l=r[0]-e[0],s=r[1]-e[1],c=Math.pow(a*a+o*o,T/2),u=Math.pow(l*l+s*s,T/2),f=(u*u*a-c*c*l)*n,d=(u*u*o-c*c*s)*n,h=3*u*(c+u),p=3*c*(c+u);return[[i.round(e[0]+(h&&f/h),2),i.round(e[1]+(h&&d/h),2)],[i.round(e[0]-(p&&f/p),2),i.round(e[1]-(p&&d/p),2)]]}function o(t){var e=t.getAttribute("data-unformatted");if(null!==e)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}var i=t("d3"),l=t("fast-isnumeric"),s=t("tinycolor2"),c=t("../../registry"),u=t("../color"),f=t("../colorscale"),d=t("../../lib"),h=t("../../lib/svg_text_utils"),p=t("../../constants/xmlns_namespaces"),g=t("../../constants/alignment"),m=g.LINE_SPACING,v=t("../../traces/scatter/subtypes"),y=t("../../traces/scatter/make_bubble_size_func"),x=e.exports={};x.font=function(t,e,r,n){e&&e.family&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(u.fill,n)},x.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},x.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},x.setRect=function(t,e,r,n,a){t.call(x.setPosition,e,r).call(x.setSize,n,a)},x.translatePoint=function(t,e,r,n){var a=t.xp||r.c2p(t.x),o=t.yp||n.c2p(t.y);return!!(l(a)&&l(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",a).attr("y",o):e.attr("transform","translate("+a+","+o+")"),!0)},x.translatePoints=function(t,e,r,n){t.each(function(t){var a=i.select(this);x.translatePoint(t,a,e,r,n)})},x.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},x.crispRound=function(t,e,r){return e&&l(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,a){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},i=r||o.width||0,l=a||o.dash||"";u.stroke(e,n||o.color),x.dashLine(e,l,i)},x.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,l=n||a.dash||"" -;i.select(this).call(u.stroke,r||a.color).call(x.dashLine,l,o)})},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},x.singleFillStyle=function(t){var e=i.select(t.node()),r=e.data(),n=(((r[0]||[])[0]||{}).trace||{}).fillcolor;n&&t.call(u.fill,n)},x.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var r=i.select(this);try{r.call(u.fill,e[0].trace.fillcolor)}catch(e){d.error(e,t),r.remove()}})};var b=t("./symbol_defs");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolList=[],Object.keys(b).forEach(function(t){var e=b[t];x.symbolList=x.symbolList.concat([e.n,t,e.n+100,t+"-open"]),x.symbolNames[e.n]=t,x.symbolFuncs[e.n]=e.f,e.needLine&&(x.symbolNeedLines[e.n]=!0),e.noDot?x.symbolNoDot[e.n]=!0:x.symbolList=x.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var _=x.symbolNames.length,w="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";x.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=x.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var M={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0};x.gradient=function(t,e,r,n,a,o){var l=e._fullLayout._defs.select(".gradients").selectAll("#"+r).data([n+a+o],d.identity);l.exit().remove(),l.enter().append("radial"===n?"radialGradient":"linearGradient").each(function(){var t=i.select(this);"horizontal"===n?t.attr(M):"vertical"===n&&t.attr(k),t.attr("id",r);var e=s(a),l=s(o);t.append("stop").attr({offset:"0%","stop-color":u.tinyRGB(l),"stop-opacity":l.getAlpha()}),t.append("stop").attr({offset:"100%","stop-color":u.tinyRGB(e),"stop-opacity":e.getAlpha()})}),t.style({fill:"url(#"+r+")","fill-opacity":null})},x.initGradients=function(t){var e=t._fullLayout._defs.selectAll(".gradients").data([0]);e.enter().append("g").classed("gradients",!0),e.selectAll("linearGradient,radialGradient").remove()},x.singlePointStyle=function(t,e,r,a,o,i){var l=r.marker;n(t,e,r,a,o,l,l.line,i)},x.pointStyle=function(t,e,r){if(t.size()){var n=e.marker,a=x.tryColorscale(n,""),o=x.tryColorscale(n,"line");t.each(function(t){x.singlePointStyle(t,i.select(this),e,a,o,r)})}},x.tryColorscale=function(t,e){var r=e?d.nestedProperty(t,e).get():t,n=r.colorscale,a=r.color;return n&&Array.isArray(a)?f.makeColorScaleFunc(f.extractScale(n,r.cmin,r.cmax)):d.identity};var A={start:1,end:-1,middle:0,bottom:1,top:-1};x.textPointStyle=function(t,e,r){t.each(function(t){var n=i.select(this),a=t.tx||e.text;if(!a||Array.isArray(a))return void n.remove();var o=t.tp||e.textposition,s=-1!==o.indexOf("top")?"top":-1!==o.indexOf("bottom")?"bottom":"middle",c=-1!==o.indexOf("left")?"end":-1!==o.indexOf("right")?"start":"middle",u=t.ts||e.textfont.size,f=t.mrc?t.mrc/.8+1:0;u=l(u)&&u>0?u:0,n.call(x.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",c).text(a).call(h.convertToTspans,r);var d=i.select(this.parentNode),p=(h.lineCount(n)-1)*m+1,g=A[c]*f,v=.75*u+A[s]*f+(A[s]-1)*p*u/2;d.attr("transform","translate("+g+","+v+")")})};var T=.5;x.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],o=[];for(r=1;r=1e4&&(x.savedBBoxes={},S=0),e&&(x.savedBBoxes[e]=m),S++,d.extendFlat({},m)},x.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var r="#"+e,n=i.select("base");n.size()&&n.attr("href")&&(r=window.location.href.split("#")[0]+r),t.attr("clip-path","url("+r+")")},x.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}},x.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||0,r=r||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o+=" translate("+e+", "+r+")",o=o.trim(),t[a]("transform",o),o},x.getScale=function(t){var e=t.attr?"attr":"getAttribute",r=t[e]("transform")||"",n=r.replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}},x.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||1,r=r||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o+=" scale("+e+", "+r+")",o=o.trim(),t[a]("transform",o),o},x.setPointGroupScale=function(t,e,r){var n,a,o;return e=e||1,r=r||1,a=1===e&&1===r?"":" scale("+e+","+r+")",o=/\s*sc.*/,t.each(function(){n=(this.getAttribute("transform")||"").replace(o,""),n+=a,n=n.trim(),this.setAttribute("transform",n)}),a};x.setTextPointsScale=function(t,e,r){t.each(function(){var t,n=i.select(this),a=n.select("text"),o=parseFloat(a.attr("x")||0),l=parseFloat(a.attr("y")||0),s=(n.attr("transform")||"").match(/translate\([^)]*\)\s*$/);t=1===e&&1===r?[]:["translate("+o+","+l+")","scale("+e+","+r+")","translate("+-o+","+-l+")"],s&&t.push(s),n.attr("transform",t.join(" "))})}},{"../../constants/alignment":137,"../../constants/xmlns_namespaces":141,"../../lib":156,"../../lib/svg_text_utils":173,"../../registry":241,"../../traces/scatter/make_bubble_size_func":319,"../../traces/scatter/subtypes":324,"../color":41,"../colorscale":55,"./symbol_defs":66,d3:13,"fast-isnumeric":16,tinycolor2:22}],66:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,a="l"+e+",-"+e,o="l-"+e+",-"+e,i="l-"+e+","+e;return"M0,"+e+r+a+o+a+o+i+o+i+r+i+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),a=n.round(-t,2),o=n.round(-.309*t,2);return"M"+e+","+o+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+o+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+e+"L-"+a+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+e+",0L"+r+",-"+a+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),a=n.round(.951*e,2),o=n.round(.363*e,2),i=n.round(.588*e,2),l=n.round(-e,2),s=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return"M"+r+","+s+"H"+a+"L"+o+","+c+"L"+i+","+u+"L0,"+n.round(.382*e,2)+"L-"+i+","+u+"L-"+o+","+c+"L-"+a+","+s+"H-"+r+"L0,"+l+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),a=n.round(.76*t,2);return"M-"+a+",0l-"+r+",-"+e+"h"+a+"l"+r+",-"+e+"l"+r+","+e+"h"+a+"l-"+r+","+e+"l"+r+","+e+"h-"+a+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),a=n.round(1.6*t,2),o=n.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M-"+e+","+r+i+e+","+r+i+"0,-"+a+i+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),a=n.round(1.6*t,2),o=n.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M"+e+",-"+r+i+"-"+e+",-"+r+i+"0,"+a+i+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:13}],67:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],68:[function(t,e,r){"use strict";function n(t,e,r,n){var o=e["error_"+n]||{},s=o.visible&&-1!==["linear","log"].indexOf(r.type),c=[];if(s){for(var u=l(o),f=0;f0;t.each(function(t){var e,f=t[0].trace,d=f.error_x||{},h=f.error_y||{};f.ids&&(e=function(t){return t.id});var p=i.hasMarkers(f)&&f.marker.maxdisplayed>0;if(h.visible||d.visible){var g=a.select(this).selectAll("g.errorbar").data(t,e);g.exit().remove(),g.style("opacity",1);var m=g.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(r.duration).style("opacity",1),g.each(function(t){var e=a.select(this),i=n(t,s,c);if(!p||t.vis){var f;if(h.visible&&o(i.x)&&o(i.yh)&&o(i.ys)){var g=h.width;f="M"+(i.x-g)+","+i.yh+"h"+2*g+"m-"+g+",0V"+i.ys,i.noYS||(f+="m-"+g+",0h"+2*g);var m=e.select("path.yerror");l=!m.size(),l?m=e.append("path").classed("yerror",!0):u&&(m=m.transition().duration(r.duration).ease(r.easing)),m.attr("d",f)}if(d.visible&&o(i.y)&&o(i.xh)&&o(i.xs)){var v=(d.copy_ystyle?h:d).width;f="M"+i.xh+","+(i.y-v)+"v"+2*v+"m0,-"+v+"H"+i.xs,i.noXS||(f+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");l=!y.size(),l?y=e.append("path").classed("xerror",!0):u&&(y=y.transition().duration(r.duration).ease(r.easing)),y.attr("d",f)}}})}})}},{"../../traces/scatter/subtypes":324,d3:13,"fast-isnumeric":16}],73:[function(t,e,r){"use strict";var n=t("d3"),a=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},o=e.error_x||{},i=n.select(this);i.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),o.copy_ystyle&&(o=r),i.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(a.stroke,o.color)})}},{"../color":41,d3:13}],74:[function(t,e,r){"use strict";var n=t("../../lib/extend").extendFlat,a=t("../../plots/font_attributes");e.exports={hoverlabel:{bgcolor:{valType:"color",arrayOk:!0},bordercolor:{valType:"color",arrayOk:!0},font:{family:n({},a.family,{arrayOk:!0}),size:n({},a.size,{arrayOk:!0}),color:n({},a.color,{arrayOk:!0})}}}},{"../../lib/extend":150,"../../plots/font_attributes":216}],75:[function(t,e,r){"use strict";function n(t,e,r,n){n=n||a.identity,Array.isArray(t)&&(e[0][r]=n(t))}var a=t("../../lib"),o=t("../../registry");e.exports=function(t){for(var e=t.calcdata,r=t._fullLayout,i=0;i=0&&r.indexJ.width||$<0||$>J.height)return x.unhoverRaw(t,e)}if(E="xval"in e?w.flat(d,e.xval):w.p2c(L,W),N="yval"in e?w.flat(d,e.yval):w.p2c(C,$),!f(E[0])||!f(N[0]))return h.warn("Fx.hover failed",e,t),x.unhoverRaw(t,e)}var K=1/0;for(I=0;IY&&(X.splice(0,Y),K=X[0].distance)}if(0===X.length)return x.unhoverRaw(t,e);X.sort(function(t,e){return t.distance-e.distance});var at=t._hoverdata,ot=[];for(R=0;R1,ct=y.combine(g.plot_bgcolor||y.background,g.paper_bgcolor),ut={hovermode:D,rotateLabels:st,bgColor:ct,container:g._hoverlayer,outerContainer:g._paperdiv,commonLabelOpts:g.hoverlabel},ft=a(X,ut,t,e,t.layout.hoverFollowsMouse);if(o(X,st?"xa":"ya"),i(ft,st),e.target&&e.target.tagName){var dt=_.getComponentMethod("annotations","hasClickToShow")(t,ot);m(u.select(e.target),dt?"pointer":"")}e.target&&!n&&c(t,e,at)&&(at&&t.emit("plotly_unhover",{event:e,points:at}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:L,yaxes:C,xvals:E,yvals:N}))}function a(t,e,r,n,a){var o,i,l=e.hovermode,s=e.rotateLabels,c=e.bgColor,f=e.container,d=e.outerContainer,h=e.commonLabelOpts||{},p=e.fontFamily||M.HOVERFONT,m=e.fontSize||M.HOVERFONTSIZE,x=t[0],b=x.xa,_=x.ya,w="y"===l?"yLabel":"xLabel",A=x[w],T=(String(A)||"").split(" ")[0],L=d.node().getBoundingClientRect(),C=L.top,O=L.width,P=L.height,D=x.distance<=M.MAXDIST&&("x"===l||"y"===l);for(o=0;o15&&(o=o.substr(0,12)+"...")),void 0!==t.extraText&&(i+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(i+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(i+="y: "+t.yLabel+"
"),i+=(i?"z: ":"")+t.zLabel):D&&t[l+"Label"]===A?i=t[("x"===l?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(i=t.yLabel):i=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(i+=(i?"
":"")+t.text),""===i&&(""===o&&e.remove(),i=o);var x=e.select("text.nums").call(v.font,t.fontFamily||p,t.fontSize||m,t.fontColor||h).text(i).attr("data-notex",1).call(g.positionText,0,0).call(g.convertToTspans,r),b=e.select("text.name"),_=0;o&&o!==i?(b.call(v.font,t.fontFamily||p,t.fontSize||m,d).text(o).attr("data-notex",1).call(g.positionText,0,0).call(g.convertToTspans,r),_=b.node().getBoundingClientRect().width+2*z):(b.remove(),e.select("rect").remove()),e.select("path").style({fill:d,stroke:h});var w,M,T=x.node().getBoundingClientRect(),L=t.xa._offset+(t.x0+t.x1)/2,E=t.ya._offset+(t.y0+t.y1)/2,N=Math.abs(t.x1-t.x0),R=Math.abs(t.y1-t.y0),I=T.width+S+z+_;t.ty0=C-T.top,t.bx=T.width+2*z,t.by=T.height+2*z,t.anchor="start",t.txwidth=T.width,t.tx2width=_,t.offset=0,a&&"closest"===l&&n&&n.offsetX&&n.offsetY&&(L=n.offsetX,E=n.offsetY),s?(t.pos=L,w=E+R/2+I<=P,M=E-R/2-I>=0,"top"!==t.idealAlign&&w||!M?w?(E+=R/2,t.anchor="start"):t.anchor="middle":(E-=R/2,t.anchor="end")):(t.pos=E,w=L+N/2+I<=O,M=L-N/2-I>=0,"left"!==t.idealAlign&&w||!M?w?(L+=N/2,t.anchor="start"):t.anchor="middle":(L-=N/2,t.anchor="end")),x.attr("text-anchor",t.anchor),_&&b.attr("text-anchor",t.anchor),e.attr("transform","translate("+L+","+E+")"+(s?"rotate("+k+")":""))}),R}function o(t,e){function r(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;n=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;n=!1}if(n){var c=0;for(i=0;ie.pmax&&c++;for(i=t.length-1;i>=0&&!(c<=0);i--)s=t[i],s.pos>e.pmax-1&&(s.del=!0,c--);for(i=0;i=0;l--)t[l].dp-=o;for(i=t.length-1;i>=0&&!(c<=0);i--)s=t[i],s.pos+s.dp+s.size>e.pmax&&(s.del=!0,c--)}}}for(var n,a,o,i,l,s,c,u=0,f=t.map(function(t,r){var n=t[e];return[{i:r,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===n._id.charAt(0)?T:1)/2,pmin:n._offset,pmax:n._offset+n._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!n&&u<=t.length;){for(u++,n=!0,i=0;i.01&&p.pmin===g.pmin&&p.pmax===g.pmax){for(l=h.length-1;l>=0;l--)h[l].dp+=a;for(d.push.apply(d,h),f.splice(i+1,1),c=0,l=d.length-1;l>=0;l--)c+=d[l].dp;for(o=c/d.length, -l=d.length-1;l>=0;l--)d[l].dp-=o;n=!1}else i++}f.forEach(r)}for(i=f.length-1;i>=0;i--){var m=f[i];for(l=m.length-1;l>=0;l--){var v=m[l],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function i(t,e){t.each(function(t){var r=u.select(this);if(t.del)return void r.remove();var n="end"===t.anchor?-1:1,a=r.select("text.nums"),o={start:1,end:-1,middle:0}[t.anchor],i=o*(S+z),l=i+o*(t.txwidth+z),s=0,c=t.offset;"middle"===t.anchor&&(i-=t.tx2width/2,l-=t.tx2width/2),e&&(c*=-C,s=t.offset*L),r.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(n*S+s)+","+(S+c)+"v"+(t.by/2-S)+"h"+n*t.bx+"v-"+t.by+"H"+(n*S+s)+"V"+(c-S)+"Z"),a.call(g.positionText,i+s,c+t.ty0-t.by/2+z),t.tx2width&&(r.select("text.name").call(g.positionText,l+o*z+s,c+t.ty0-t.by/2+z),r.select("rect").call(v.setRect,l+(o-1)*t.tx2width/2+s,c-t.by/2-1,t.tx2width,t.by+2))})}function l(t,e){function r(e,r,i){var l;if(o[r])l=o[r];else if(a[r]){var s=a[r];Array.isArray(s)&&Array.isArray(s[t.index[0]])&&(l=s[t.index[0]][t.index[1]])}else l=h.nestedProperty(n,i).get();l&&(t[e]=l)}var n=t.trace||{},a=t.cd[0],o=t.cd[t.index]||{};r("hoverinfo","hi","hoverinfo"),r("color","hbg","hoverlabel.bgcolor"),r("borderColor","hbc","hoverlabel.bordercolor"),r("fontFamily","htf","hoverlabel.font.family"),r("fontSize","hts","hoverlabel.font.size"),r("fontColor","htc","hoverlabel.font.color"),t.posref="y"===e?(t.x0+t.x1)/2:(t.y0+t.y1)/2,t.x0=h.constrain(t.x0,0,t.xa._length),t.x1=h.constrain(t.x1,0,t.xa._length),t.y0=h.constrain(t.y0,0,t.ya._length),t.y1=h.constrain(t.y1,0,t.ya._length);var i;if(void 0!==t.xLabelVal){i="log"===t.xa.type&&t.xLabelVal<=0;var l=b.tickText(t.xa,t.xa.c2l(i?-t.xLabelVal:t.xLabelVal),"hover");i?0===t.xLabelVal?t.xLabel="0":t.xLabel="-"+l.text:t.xLabel=l.text,t.xVal=t.xa.c2d(t.xLabelVal)}if(void 0!==t.yLabelVal){i="log"===t.ya.type&&t.yLabelVal<=0;var s=b.tickText(t.ya,t.ya.c2l(i?-t.yLabelVal:t.yLabelVal),"hover");i?0===t.yLabelVal?t.yLabel="0":t.yLabel="-"+s.text:t.yLabel=s.text,t.yVal=t.ya.c2d(t.yLabelVal)}if(void 0!==t.zLabelVal&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var c=b.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+c+" / -"+b.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+c,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var u=b.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+u+" / -"+b.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+u,"y"===e&&(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return"all"!==f&&(f=f.split("+"),-1===f.indexOf("x")&&(t.xLabel=void 0),-1===f.indexOf("y")&&(t.yLabel=void 0),-1===f.indexOf("z")&&(t.zLabel=void 0),-1===f.indexOf("text")&&(t.text=void 0),-1===f.indexOf("name")&&(t.name=void 0)),t}function s(t,e){var r=e.hovermode,n=e.container,a=t[0],o=a.xa,i=a.ya,l=o.showspikes,s=i.showspikes;if(n.selectAll(".spikeline").remove(),"closest"===r&&(l||s)){var c=e.fullLayout,u=o._offset+(a.x0+a.x1)/2,f=i._offset+(a.y0+a.y1)/2,h=y.combine(c.plot_bgcolor,c.paper_bgcolor),p=d.readability(a.color,h)<1.5?y.contrast(h):a.color;if(s){var g=i.spikemode,m=i.spikethickness,x=i.spikecolor||p,b=i._boundingBox,_=(b.left+b.right)/2=0;n--){var a=r[n],o=t._hoverdata[n];if(a.curveNumber!==o.curveNumber||String(a.pointNumber)!==String(o.pointNumber))return!0}return!1}var u=t("d3"),f=t("fast-isnumeric"),d=t("tinycolor2"),h=t("../../lib"),p=t("../../lib/events"),g=t("../../lib/svg_text_utils"),m=t("../../lib/override_cursor"),v=t("../drawing"),y=t("../color"),x=t("../dragelement"),b=t("../../plots/cartesian/axes"),_=t("../../registry"),w=t("./helpers"),M=t("./constants"),k=M.YANGLE,A=Math.PI*k/180,T=1/Math.sin(A),L=Math.cos(A),C=Math.sin(A),S=M.HOVERARROWSIZE,z=M.HOVERTEXTPAD;r.hover=function(t,e,r,a){if("string"==typeof t&&(t=document.getElementById(t)),void 0===t._lastHoverTime&&(t._lastHoverTime=0),void 0!==t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),Date.now()>t._lastHoverTime+M.HOVERMINTIME)return n(t,e,r,a),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){n(t,e,r,a),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},M.HOVERMINTIME)},r.loneHover=function(t,e){var r={color:t.color||y.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0},n=u.select(e.container),o=e.outerContainer?u.select(e.outerContainer):n,l={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||y.background,container:n,outerContainer:o},s=a([r],l,e.gd);return i(s,l.rotateLabels),s.node()}},{"../../lib":156,"../../lib/events":149,"../../lib/override_cursor":165,"../../lib/svg_text_utils":173,"../../plots/cartesian/axes":192,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"./constants":77,"./helpers":79,d3:13,"fast-isnumeric":16,tinycolor2:22}],81:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r,a){a=a||{},r("hoverlabel.bgcolor",a.bgcolor),r("hoverlabel.bordercolor",a.bordercolor),n.coerceFont(r,"hoverlabel.font",a.font)}},{"../../lib":156}],82:[function(t,e,r){"use strict";function n(t){var e=l.isD3Selection(t)?t:i.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function a(t,e,r){return l.castOption(t,e,"hoverlabel."+r)}function o(t,e,r){function n(r){return l.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}return l.castOption(t,r,"hoverinfo",n)}var i=t("d3"),l=t("../../lib"),s=t("../dragelement"),c=t("./helpers"),u=t("./layout_attributes");e.exports={moduleType:"component",name:"fx",constants:t("./constants"),schema:{layout:u},attributes:t("./attributes"),layoutAttributes:u,supplyLayoutGlobalDefaults:t("./layout_global_defaults"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),getDistanceFunction:c.getDistanceFunction,getClosest:c.getClosest,inbox:c.inbox,appendArrayPointValue:c.appendArrayPointValue,castHoverOption:a,castHoverinfo:o,hover:t("./hover").hover,unhover:s.unhover,loneHover:t("./hover").loneHover,loneUnhover:n,click:t("./click")}},{"../../lib":156,"../dragelement":62,"./attributes":74,"./calc":75,"./click":76,"./constants":77,"./defaults":78,"./helpers":79,"./hover":80,"./layout_attributes":83,"./layout_defaults":84,"./layout_global_defaults":85,d3:13}],83:[function(t,e,r){"use strict";var n=t("../../lib/extend").extendFlat,a=t("../../plots/font_attributes"),o=t("./constants");e.exports={dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","orbit","turntable"],dflt:"zoom"},hovermode:{valType:"enumerated",values:["x","y","closest",!1]},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:{family:n({},a.family,{dflt:o.HOVERFONT}),size:n({},a.size,{dflt:o.HOVERFONTSIZE}),color:n({},a.color)}}}},{"../../lib/extend":150,"../../plots/font_attributes":216,"./constants":77}],84:[function(t,e,r){"use strict";function n(t){for(var e=!0,r=0;r=2/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],92:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:o({},n,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":150,"../../plots/font_attributes":216,"../color/attributes":40}],93:[function(t,e,r){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],94:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib"),o=t("./attributes"),i=t("../../plots/layout_attributes"),l=t("./helpers");e.exports=function(t,e,r){function s(t,e){return a.coerce(h,p,o,t,e)}for(var c,u,f,d,h=t.legend||{},p=e.legend={},g=0,m="normal",v=0;v1)){if(s("bgcolor",e.paper_bgcolor),s("bordercolor"),s("borderwidth"),a.coerceFont(s,"font",e.font),s("orientation"),"h"===p.orientation){var x=t.xaxis;x&&x.rangeslider&&x.rangeslider.visible?(c=0,f="left",u=1.1,d="bottom"):(c=0,f="left",u=-.1,d="top")}s("traceorder",m),l.isGrouped(e.legend)&&s("tracegroupgap"),s("x",c),s("xanchor",f),s("y",u),s("yanchor",d),a.noneOrAll(h,p,["x","y"])}}},{"../../lib":156,"../../plots/layout_attributes":231,"../../registry":241,"./attributes":92,"./helpers":97}],95:[function(t,e,r){"use strict";function n(t,e){function r(r){y.convertToTspans(r,e,function(){i(t,e)})}var n=t.data()[0][0],a=e._fullLayout,o=n.trace,l=p.traceIs(o,"pie"),s=o.index,c=l?n.label:o.name,u=c,d=t.selectAll("text.legendtext").data([0]),h=d.enter();h.append("title").text(c),h.append("text").classed("legendtext",!0),d.attr("text-anchor","start").classed("user-select-none",!0).call(m.font,a.legend.font).text(u),e._context.editable&&!l?d.call(y.makeEditable,{gd:e}).call(r).on("edit",function(t){this.text(t).call(r),this.text()||(t=" ");var a,o=n.trace._fullInput||{};if(-1!==["ohlc","candlestick"].indexOf(o.type)){var i=n.trace.transforms;a=i[i.length-1].direction+".name"}else a="name";f.restyle(e,a,t,s)}):d.call(r)}function a(t,e){var r,n=1,a=t.selectAll("rect").data([0]);a.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(v.fill,"rgba(0,0,0,0)"),a.on("mousedown",function(){r=(new Date).getTime(),r-e._legendMouseDownTimeL&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){o(t,e,n)},L):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,o(t,e,n))}})}function o(t,e,r){if(!e._dragged&&!e._editing){var n,a,o=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],i=t.data()[0][0],l=e._fullData,s=i.trace,c=s.legendgroup,h=[];if(1===r&&T&&e.data&&e._context.showTips?(d.notifier("Double click on legend to isolate individual trace","long"),T=!1):T=!1,p.traceIs(s,"pie")){var g=i.label,m=o.indexOf(g);1===r?-1===m?o.push(g):o.splice(m,1):2===r&&(o=[],e.calcdata[0].forEach(function(t){g!==t.label&&o.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===o.length&&-1===m&&(o=[])),f.relayout(e,"hiddenlabels",o)}else{var v,y=[],x=[];for(v=0;vn.width-(n.margin.r+n.margin.l)&&(y=0,p+=g,a.height=a.height+g,g=0),m.setTranslate(this,o+y,5+o+e.height/2+p),a.width+=i+r,a.height=Math.max(a.height,e.height),y+=i+r,g=Math.max(e.height,g)}),a.width+=2*o,a.height+=10+2*o,a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),r.each(function(e){var r=e[0];u.select(this).select(".legendtoggle").call(m.setRect,0,-r.height/2,t._context.editable?0:a.width,r.height)})}}function s(t){var e=t._fullLayout,r=e.legend,n="left";A.isRightAnchor(r)?n="right":A.isCenterAnchor(r)&&(n="center");var a="top";A.isBottomAnchor(r)?a="bottom":A.isMiddleAnchor(r)&&(a="middle"),h.autoMargin(t,"legend",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:r.height*({top:1,middle:.5}[a]||0),t:r.height*({bottom:1,middle:.5}[a]||0)})}function c(t){var e=t._fullLayout,r=e.legend,n="left";A.isRightAnchor(r)?n="right":A.isCenterAnchor(r)&&(n="center"),h.autoMargin(t,"legend",{x:r.x,y:.5,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:0,t:0})}var u=t("d3"),f=t("../../plotly"),d=t("../../lib"),h=t("../../plots/plots"),p=t("../../registry"),g=t("../dragelement"),m=t("../drawing"),v=t("../color"),y=t("../../lib/svg_text_utils"),x=t("./constants"),b=t("../../constants/interactions"),_=t("../../constants/alignment").LINE_SPACING,w=t("./get_legend_data"),M=t("./style"),k=t("./helpers"),A=t("./anchor_utils"),T=!0,L=b.DBLCLICKDELAY;e.exports=function(t){function e(t,e){S.attr("data-scroll",e).call(m.setTranslate,0,e),z.call(m.setRect,F,t,x.scrollBarWidth,x.scrollBarHeight),T.select("rect").attr({y:y.borderwidth-e})}var r=t._fullLayout,i="legend"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,b=r.showlegend&&w(t.calcdata,y),_=r.hiddenlabels||[];if(!r.showlegend||!b.length)return r._infolayer.selectAll(".legend").remove(),r._topdefs.select("#"+i).remove(),void h.autoMargin(t,"legend");var k=r._infolayer.selectAll("g.legend").data([0]);k.enter().append("g").attr({class:"legend","pointer-events":"all"});var T=r._topdefs.selectAll("#"+i).data([0]);T.enter().append("clipPath").attr("id",i).append("rect");var C=k.selectAll("rect.bg").data([0]);C.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),C.call(v.stroke,y.bordercolor),C.call(v.fill,y.bgcolor),C.style("stroke-width",y.borderwidth+"px");var S=k.selectAll("g.scrollbox").data([0]);S.enter().append("g").attr("class","scrollbox");var z=k.selectAll("rect.scrollbar").data([0]);z.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(v.fill,"#808BA4");var O=S.selectAll("g.groups").data(b);O.enter().append("g").attr("class","groups"),O.exit().remove();var P=O.selectAll("g.traces").data(d.identity);P.enter().append("g").attr("class","traces"),P.exit().remove(),P.call(M,t).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?-1!==_.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){u.select(this).call(n,t).call(a,t)});var D=0!==k.enter().size();D&&(l(t,O,P),s(t));var E=r.width,N=r.height;if(l(t,O,P),"v"===y.orientation&&y.width>.45*r.width||"h"===y.orientation&&y.height>.4*r.height)return r._infolayer.selectAll(".legend").remove(),void r._topdefs.select("#"+i).remove();y.height>N?c(t):s(t);var R=r._size,I=R.l+R.w*y.x,j=R.t+R.h*(1-y.y);A.isRightAnchor(y)?I-=y.width:A.isCenterAnchor(y)&&(I-=y.width/2),A.isBottomAnchor(y)?j-=y.height:A.isMiddleAnchor(y)&&(j-=y.height/2);var F=y.width;R.w;I+F>E&&(I=E-F),I<0&&(I=0),F=Math.min(E-I,y.width);var B=y.height,q=R.h;B>q?(j=R.t,B=q):(j+B>N&&(j=N-B),j<0&&(j=0),B=Math.min(N-j,y.height)),m.setTranslate(k,I,j);var H,V,U=B-x.scrollBarHeight-2*x.scrollBarMargin,G=y.height-B;if(y.height<=B||t._context.staticPlot)C.attr({width:F-y.borderwidth,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),m.setTranslate(S,0,0),T.select("rect").attr({width:F-2*y.borderwidth,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),S.call(m.setClipUrl,i);else{H=x.scrollBarMargin,V=S.attr("data-scroll")||0,C.attr({width:F-2*y.borderwidth+x.scrollBarWidth+x.scrollBarMargin,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),T.select("rect").attr({width:F-2*y.borderwidth+x.scrollBarWidth+x.scrollBarMargin,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-V}),S.call(m.setClipUrl,i),D&&e(H,V),k.on("wheel",null),k.on("wheel",function(){V=d.constrain(S.attr("data-scroll")-u.event.deltaY/U*G,-G,0),H=x.scrollBarMargin-V/G*U,e(H,V),0!==V&&V!==-G&&u.event.preventDefault()}),z.on(".drag",null),S.on(".drag",null);var Y=u.behavior.drag().on("drag",function(){H=d.constrain(u.event.y-x.scrollBarHeight/2,x.scrollBarMargin,x.scrollBarMargin+U),V=-(H-x.scrollBarMargin)/U*G,e(H,V)});z.call(Y),S.call(Y)}if(t._context.editable){var X,Z,W,$;k.classed("cursor-move",!0),g.init({element:k.node(),gd:t,prepFn:function(){var t=m.getTranslate(k);W=t.x,$=t.y},moveFn:function(t,e){var r=W+t,n=$+e;m.setTranslate(k,r,n),X=g.align(r,0,R.l,R.l+R.w,y.xanchor),Z=g.align(n,0,R.t+R.h,R.t,y.yanchor)},doneFn:function(e,n,a){if(e&&void 0!==X&&void 0!==Z)f.relayout(t,{"legend.x":X,"legend.y":Z});else{var i=r._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return a.clientX>=t.left&&a.clientX<=t.right&&a.clientY>=t.top&&a.clientY<=t.bottom});i.size()>0&&(1===n?k._clickTimeout=setTimeout(function(){o(i,t,n)},L):2===n&&(k._clickTimeout&&clearTimeout(k._clickTimeout),o(i,t,n)))}}})}}}},{"../../constants/alignment":137,"../../constants/interactions":138,"../../lib":156,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/plots":233,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"./anchor_utils":91,"./constants":93,"./get_legend_data":96,"./helpers":97,"./style":99,d3:13}],96:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("./helpers");e.exports=function(t,e){function r(t,r){if(""!==t&&a.isGrouped(e))-1===s.indexOf(t)?(s.push(t),c=!0,l[t]=[[r]]):l[t].push([r]);else{var n="~~i"+f;s.push(n),l[n]=[[r]],f++}}var o,i,l={},s=[],c=!1,u={},f=0;for(o=0;or[1])return r[1]}return a}function a(t){return t[0]}var l,c,u=t[0],f=u.trace,d=s.hasMarkers(f),h=s.hasText(f),p=s.hasLines(f);if(d||h||p){var g={},m={};d&&(g.mc=r("marker.color",a),g.mo=r("marker.opacity",o.mean,[.2,1]),g.ms=r("marker.size",o.mean,[2,16]),g.mlc=r("marker.line.color",a),g.mlw=r("marker.line.width",o.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),p&&(m.line={width:r("line.width",a,[0,10])}),h&&(g.tx="Aa",g.tp=r("textposition",a),g.ts=10,g.tc=r("textfont.color",a),g.tf=r("textfont.family",a)),l=[o.minExtend(u,g)],c=o.minExtend(f,m)}var v=n.select(this).select("g.legendpoints"),y=v.selectAll("path.scatterpts").data(d?l:[]);y.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),y.exit().remove(),y.call(i.pointStyle,c,e),d&&(l[0].mrc=3);var x=v.selectAll("g.pointtext").data(h?l:[]);x.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),x.exit().remove(),x.selectAll("text").call(i.textPointStyle,c,e)}function f(t){var e=t[0].trace,r=e.marker||{},o=r.line||{},i=n.select(this).select("g.legendpoints").selectAll("path.legendbar").data(a.traceIs(e,"bar")?[t]:[]);i.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),i.exit().remove(),i.each(function(t){var e=n.select(this),a=t[0],i=(a.mlw+1||o.width+1)-1;e.style("stroke-width",i+"px").call(l.fill,a.mc||r.color),i&&e.call(l.stroke,a.mlc||o.color)})}function d(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.traceIs(e,"box")&&e.visible?[t]:[]);r.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.each(function(){var t=e.line.width,r=n.select(this);r.style("stroke-width",t+"px").call(l.fill,e.fillcolor),t&&r.call(l.stroke,e.line.color)})}function h(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendpie").data(a.traceIs(e,"pie")&&e.visible?[t]:[]);r.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.size()&&r.call(c,t[0],e)}t.each(function(t){var e=n.select(this),r=e.selectAll("g.layers").data([0]);r.enter().append("g").classed("layers",!0),r.style("opacity",t[0].trace.opacity),r.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),r.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var a=r.selectAll("g.legendsymbols").data([t]);a.enter().append("g").classed("legendsymbols",!0),a.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(f).each(d).each(h).each(r).each(u)}},{"../../lib":156,"../../registry":241,"../../traces/pie/style_one":302,"../../traces/scatter/subtypes":324,"../color":41,"../drawing":65,d3:13}],100:[function(t,e,r){"use strict";function n(t,e){ -var r,n,a=e.currentTarget,o=a.getAttribute("data-attr"),i=a.getAttribute("data-val")||!0,l=t._fullLayout,s={},c=d.list(t,null,!0),f="on";if("zoom"===o){var h,p="in"===i?.5:2,g=(1+p)/2,m=(1-p)/2;for(n=0;n1)return n(["resetViews","toggleHover"]),i(m,r);u&&(n(["zoom3d","pan3d","orbitRotation","tableRotation"]),n(["resetCameraDefault3d","resetCameraLastSave3d"]),n(["hoverClosest3d"])),d&&(n(["zoomInGeo","zoomOutGeo","resetGeo"]),n(["hoverClosestGeo"]));var v=a(l),y=[];return((c||p)&&!v||g)&&(y=["zoom2d","pan2d"]),(c||g||p)&&o(s)&&(y.push("select2d"),y.push("lasso2d")),y.length&&n(y),!c&&!p||v||g||n(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),c&&h?n(["toggleHover"]):p?n(["hoverClosestGl2d"]):c?n(["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]):h&&n(["hoverClosestPie"]),i(m,r)}function a(t){for(var e=s.list({_fullLayout:t},null,!0),r=!0,n=0;n0)){var p=a(e,r,s);f("x",p[0]),f("y",p[1]),o.noneOrAll(t,e,["x","y"]),f("xanchor"),f("yanchor"),o.coerceFont(f,"font",r.font);var g=f("bgcolor");f("activecolor",i.contrast(g,c.lightAmount,c.darkAmount)),f("bordercolor"),f("borderwidth")}}},{"../../lib":156,"../color":41,"./attributes":104,"./button_attributes":105,"./constants":106}],108:[function(t,e,r){"use strict";function n(t){for(var e=v.list(t,"x",!0),r=[],n=0;np&&(p=d)));return p>=h?[h,p]:void 0}}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./constants"),l=t("./helpers");e.exports=function(t){var e=t._fullLayout,r=a.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var l=0;ls&&(t="X"),t});return n>s&&(c=c.replace(/[\s,]*X.*/,""),l.log("Ignoring extra params in segment "+t)),a+c})}var l=(t("../../plotly"),t("../../lib")),s=t("../../plots/cartesian/axes"),c=t("../color"),u=t("../drawing"),f=(t("../dragelement"),t("../../lib/setcursor"),t("./constants")),d=t("./helpers");e.exports={draw:n,drawOne:a}},{"../../lib":156,"../../lib/setcursor":171,"../../plotly":187,"../../plots/cartesian/axes":192,"../color":41,"../dragelement":62,"../drawing":65,"./constants":119,"./helpers":122}],122:[function(t,e,r){"use strict";r.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},r.getDataToPixel=function(t,e,n){var a,o=t._fullLayout._size;if(e){var i=r.shapePositionToRange(e);a=function(t){return e._offset+e.r2p(i(t,!0))},"date"===e.type&&(a=r.decodeDate(a))}else a=n?function(t){return o.t+o.h*(1-t)}:function(t){return o.l+o.w*t};return a},r.getPixelToData=function(t,e,n){var a,o=t._fullLayout._size;if(e){var i=r.rangeToShapePosition(e);a=function(t){return i(e.p2r(t-e._offset))}}else a=n?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a}},{}],123:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"./attributes":117,"./calc_autorange":118,"./defaults":120,"./draw":121}],124:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./attributes"),i=t("./helpers");e.exports=function(t,e,r,l,s){function c(r,a){return n.coerce(t,e,o,r,a)}if(l=l||{},s=s||{},!c("visible",!s.itemIsNotPlainObject))return e;c("layer"),c("opacity"),c("fillcolor"),c("line.color"),c("line.width"),c("line.dash");for(var u=t.path?"path":"rect",f=c("type",u),d=["x","y"],h=0;h<2;h++){var p=d[h],g={_fullLayout:r},m=a.coerceRef(t,e,g,p,"","paper");if("path"!==f){var v,y,x;"paper"!==m?(v=a.getFromId(g,m),x=i.rangeToShapePosition(v),y=i.shapePositionToRange(v)):y=x=n.identity;var b=p+"0",_=p+"1",w=t[b],M=t[_];t[b]=y(t[b],!0),t[_]=y(t[_],!0),a.coercePosition(e,g,c,m,b,.25),a.coercePosition(e,g,c,m,_,.75),e[b]=x(e[b]),e[_]=x(e[_]),t[b]=w,t[_]=M}}return"path"===f?c("path"):n.noneOrAll(t,e,["x0","x1","y0","y1"]),t.classes&&(e.classes=t.classes),e}},{"../../lib":156,"../../plots/cartesian/axes":192,"./attributes":117,"./helpers":122}],125:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../../plots/pad_attributes"),o=t("../../lib/extend").extendFlat,i=t("../../lib/extend").extendDeep,l=t("../../plots/animation_attributes"),s=t("./constants"),c={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i({},a,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:l.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:o({},n,{})},font:o({},n,{}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}},{"../../lib/extend":150,"../../plots/animation_attributes":188,"../../plots/font_attributes":216,"../../plots/pad_attributes":232,"./constants":126}],126:[function(t,e,r){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],127:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return o.coerce(t,e,l,r,n)}n("visible",a(t,e).length>0)&&(n("active"),n("x"),n("y"),o.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),o.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),o.coerceFont(n,"currentvalue.font",e.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen"))}function a(t,e){function r(t,e){return o.coerce(n,a,u,t,e)}for(var n,a,i=t.steps||[],l=e.steps=[],s=0;s=r.steps.length&&(r.active=0),e.call(l,r).call(b,r).call(u,r).call(p,r).call(x,t,r).call(s,t,r),A.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(m,r,r.active/(r.steps.length-1),!1),e.call(l,r)}function l(t,e,r){if(e.currentvalue.visible){var n,a,o=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":n=e.inputAreaLength-C.currentValueInset-e.currentValueMaxWidth,a="left";break;case"center":n=.5*e.inputAreaLength,a="middle";break;default:n=C.currentValueInset,a="left"}o.enter().append("text").classed(C.labelClass,!0).classed("user-select-none",!0).attr({"text-anchor":a,"data-notex":1});var i=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)i+=r;else{i+=e.steps[e.active].label}e.currentvalue.suffix&&(i+=e.currentvalue.suffix),o.call(A.font,e.currentvalue.font).text(i).call(T.convertToTspans,e.gd);var l=T.lineCount(o),s=(e.currentValueMaxLines+1-l)*e.currentvalue.font.size*S;return T.positionText(o,n,s),o}}function s(t,e,r){var n=t.selectAll("rect."+C.gripRectClass).data([0]);n.enter().append("rect").classed(C.gripRectClass,!0).call(h,e,t,r).style("pointer-events","all"),n.attr({width:C.gripWidth,height:C.gripHeight,rx:C.gripRadius,ry:C.gripRadius}).call(k.stroke,r.bordercolor).call(k.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function c(t,e,r){var n=t.selectAll("text").data([0]);return n.enter().append("text").classed(C.labelClass,!0).classed("user-select-none",!0).attr({"text-anchor":"middle","data-notex":1}),n.call(A.font,r.font).text(e.step.label).call(T.convertToTspans,r.gd),n}function u(t,e){var r=t.selectAll("g."+C.labelsClass).data([0]);r.enter().append("g").classed(C.labelsClass,!0);var n=r.selectAll("g."+C.labelGroupClass).data(e.labelSteps);n.enter().append("g").classed(C.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=w.select(this);r.call(c,t,e),A.setTranslate(r,v(e,t.fraction),C.tickOffset+e.ticklen+e.font.size*S+C.labelOffset+e.currentValueTotalHeight)})}function f(t,e,r,n,a){var o=Math.round(n*(r.steps.length-1));o!==r.active&&d(t,e,r,o,!0,a)}function d(t,e,r,n,a,o){var i=r.active;r._input.active=r.active=n;var s=r.steps[r.active];e.call(m,r,r.active/(r.steps.length-1),o),e.call(l,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:a,previousActive:i}),s&&s.method&&a&&(e._nextMethod?(e._nextMethod.step=s,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:s,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(r.execute&&M.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function h(t,e,r){function n(){return r.data()[0]}var a=r.node(),o=w.select(e);t.on("mousedown",function(){var t=n();e.emit("plotly_sliderstart",{slider:t});var i=r.select("."+C.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),i.call(k.fill,t.activebgcolor);var l=y(t,w.mouse(a)[0]);f(e,r,t,l,!0),t._dragging=!0,o.on("mousemove",function(){var t=n(),o=y(t,w.mouse(a)[0]);f(e,r,t,o,!1)}),o.on("mouseup",function(){var t=n();t._dragging=!1,i.call(k.fill,t.bgcolor),o.on("mouseup",null),o.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var r=t.selectAll("rect."+C.tickRectClass).data(e.steps);r.enter().append("rect").classed(C.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(t,r){var n=r%e.labelStride==0,a=w.select(this);a.attr({height:n?e.ticklen:e.minorticklen}).call(k.fill,e.tickcolor),A.setTranslate(a,v(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?C.tickOffset:C.minorTickOffset)+e.currentValueTotalHeight)})}function g(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r0&&(i=i.transition().duration(e.transition.duration).ease(e.transition.easing)),i.attr("transform","translate("+(o-.5*C.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+C.stepInset+(t.inputAreaLength-2*C.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-C.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*C.stepInset-2*t.inputAreaStart)))}function x(t,e,r){var n=t.selectAll("rect."+C.railTouchRectClass).data([0]);n.enter().append("rect").classed(C.railTouchRectClass,!0).call(h,e,t,r).style("pointer-events","all"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,C.tickOffset+r.ticklen+r.labelHeight)}).call(k.fill,r.bgcolor).attr("opacity",0),A.setTranslate(n,0,r.currentValueTotalHeight)}function b(t,e){var r=t.selectAll("rect."+C.railRectClass).data([0]);r.enter().append("rect").classed(C.railRectClass,!0);var n=e.inputAreaLength-2*C.railInset;r.attr({width:n,height:C.railWidth,rx:C.railRadius,ry:C.railRadius,"shape-rendering":"crispEdges"}).call(k.stroke,e.bordercolor).call(k.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),A.setTranslate(r,C.railInset,.5*(e.inputAreaWidth-C.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n0?[0]:[]);if(l.enter().append("g").classed(C.containerClassName,!0).style("cursor","ew-resize"),l.exit().remove(),l.exit().size()&&_(t),0!==r.length){var s=l.selectAll("g."+C.groupClassName).data(r,a);s.enter().append("g").classed(C.groupClassName,!0),s.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,C.autoMarginIdRoot+e._index)});for(var c=0;c0||d<0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[x.side];e.attr("transform","translate("+g+")")}}}var g=r.propContainer,m=r.propName,v=r.traceIndex,y=r.dfltName,x=r.avoid||{},b=r.attributes,_=r.transform,w=r.containerGroup,M=t._fullLayout,k=g.titlefont.family,A=g.titlefont.size,T=g.titlefont.color,L=1,C=!1,S=g.title.trim(),z=t._context.editable;z&&(g===M?z=t._context.editableMainTitle:g===M.xaxis?z=t._context.editableAxisXTitle:g===M.yaxis?z=t._context.editableAxisYTitle:g===M.yaxis2?z=t._context.editableAxisY2Title:g===M.xaxis2&&(z=t._context.editableAxisX2Title)),""===S&&(L=0),S.match(/Click to enter .+ title/)&&(L=.2,C=!0,z||(S=""));var O=S||z;w||(w=M._infolayer.selectAll(".g-"+e).data([0]),w.enter().append("g").classed("g-"+e,!0));var P=w.selectAll("text").data(O?[0]:[]);if(P.enter().append("text"),P.text(S).attr("class",e),P.exit().remove(),O){P.call(d);var D="Click to enter "+y+" title";z&&(S?P.on(".opacity",null):function(){L=0,C=!0,S=D,P.text(S).on("mouseover.opacity",function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)})}(),P.call(u.makeEditable,{gd:t}).on("edit",function(e){void 0!==v?o.restyle(t,m,e,v):o.relayout(t,m,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(d)}).on("input",function(t){this.text(t||" ").call(u.positionText,b.x,b.y)})),P.classed("js-placeholder",C),g._titleElement=P}}},{"../../constants/interactions":138,"../../lib":156,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/plots":233,"../color":41,"../drawing":65,d3:13,"fast-isnumeric":16}],131:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat,i=t("../../plots/pad_attributes"),l={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:l,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:o({},i,{}),font:o({},n,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":150,"../../plots/font_attributes":216,"../../plots/pad_attributes":232,"../color/attributes":40}],132:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},{}],133:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return o.coerce(t,e,l,r,n)}n("visible",a(t,e).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),o.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),o.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function a(t,e){function r(t,e){return o.coerce(n,a,u,t,e)}for(var n,a,i=t.buttons||[],l=e.buttons=[],s=0;s0?[0]:[]);if(o.enter().append("g").classed(S.containerClassName,!0).style("cursor","pointer"),o.exit().remove(),o.exit().size()&&_(t),0!==r.length){var u=o.selectAll("g."+S.headerGroupClassName).data(r,a);u.enter().append("g").classed(S.headerGroupClassName,!0);var f=o.selectAll("g."+S.dropdownButtonGroupClassName).data([0]);f.enter().append("g").classed(S.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var d=0;dM,T=n.barLength+2*n.barPad,L=n.barWidth+2*n.barPad,C=p,S=m+v;S+L>c&&(S=c-L);var z=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(o.fill,n.barColor),A?(this.hbar=z.attr({rx:n.barRadius,ry:n.barRadius,x:C,y:S,width:T,height:L}),this._hbarXMin=C+T/2,this._hbarTranslateMax=M-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=v>k,P=n.barWidth+2*n.barPad,D=n.barLength+2*n.barPad,E=p+g,N=m;E+P>s&&(E=s-P);var R=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(o.fill,n.barColor),O?(this.vbar=R.attr({rx:n.barRadius,ry:n.barRadius,x:E,y:N,width:P,height:D}),this._vbarYMin=N+D/2,this._vbarTranslateMax=k-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var I=this.id,j=u-.5,F=O?f+P+.5:f+.5,B=d-.5,q=A?h+L+.5:h+.5,H=l._topdefs.selectAll("#"+I).data(A||O?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",I).append("rect"),A||O?(this._clipRect=H.select("rect").attr({x:Math.floor(j),y:Math.floor(B),width:Math.ceil(F)-Math.floor(j),height:Math.ceil(q)-Math.floor(B)}),this.container.call(i.setClipUrl,I),this.bg.attr({x:p,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),A||O){var V=a.behavior.drag().on("dragstart",function(){a.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var U=a.behavior.drag().on("dragstart",function(){a.event.sourceEvent.preventDefault(),a.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(U),O&&this.vbar.on(".drag",null).call(U)}this.setTranslate(e,r)},n.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},n.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=a.event.dx),this.vbar&&(e-=a.event.dy),this.setTranslate(t,e)},n.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=a.event.deltaY),this.vbar&&(e+=a.event.deltaY),this.setTranslate(t,e)},n.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax;t=(l.constrain(a.event.x,r,n)-r)/(n-r)*(this.position.w-this._box.w)}if(this.vbar){var o=e+this._vbarYMin,i=o+this._vbarTranslateMax;e=(l.constrain(a.event.y,o,i)-o)/(i-o)*(this.position.h-this._box.h)}this.setTranslate(t,e)},n.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=l.constrain(t||0,0,r),e=l.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(i.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var a=t/r;this.hbar.call(i.setTranslate,t+a*this._hbarTranslateMax,e)}if(this.vbar){var o=e/n;this.vbar.call(i.setTranslate,t,e+o*this._vbarTranslateMax)}}},{"../../lib":156,"../color":41,"../drawing":65,d3:13}],137:[function(t,e,r){"use strict";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},LINE_SPACING:1.3}},{}],138:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],139:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6}},{}],140:[function(t,e,r){"use strict";e.exports={entityToUnicode:{mu:"\u03bc","#956":"\u03bc",amp:"&","#28":"&",lt:"<","#60":"<",gt:">","#62":">",nbsp:"\xa0","#160":"\xa0",times:"\xd7","#215":"\xd7",plusmn:"\xb1","#177":"\xb1",deg:"\xb0","#176":"\xb0"}}},{}],141:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],142:[function(t,e,r){"use strict";var n=t("./plotly");r.version="1.28.3-ion48",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.setPlotConfig=t("./plot_api/set_plot_config"),r.register=t("./plot_api/register"),r.toImage=t("./plot_api/to_image"),r.downloadImage=t("./snapshot/download"),r.validate=t("./plot_api/validate"),r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.register(t("./traces/scatter")),r.register([t("./components/fx"),t("./components/legend"),t("./components/annotations"),t("./components/annotations3d"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),r.Icons=t("../build/ploticon"),r.Plots=n.Plots,r.Fx=t("./components/fx"),r.Snapshot=t("./snapshot"),r.PlotSchema=t("./plot_api/plot_schema"),r.Queue=t("./lib/queue"),r.d3=t("d3");var a=t("./components/color");r.colorDefaults=a.overrideColorDefaults;var o=t("./lib/dates");r.dateTime2ms=o.dateTime2ms,r.ms2DateTimeLocal=o.ms2DateTimeLocal},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":39,"./components/annotations3d":28,"./components/color":41,"./components/fx":82,"./components/images":90,"./components/legend":98,"./components/rangeselector":110,"./components/rangeslider":116,"./components/shapes":123,"./components/sliders":129,"./components/updatemenus":135,"./fonts/mathjax_config":143,"./lib/dates":147,"./lib/queue":168,"./plot_api/plot_schema":181,"./plot_api/register":182,"./plot_api/set_plot_config":183,"./plot_api/to_image":185,"./plot_api/validate":186,"./plotly":187,"./snapshot":246,"./snapshot/download":243,"./traces/scatter":314,d3:13,"es6-promise":14}],143:[function(t,e,r){"use strict";"undefined"!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],144:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){Array.isArray(t)&&(e[r]=t[n])}},{}],145:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../constants/numerical").BADNUM;e.exports=function(t){return"string"==typeof t&&(t=t.replace(/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,"")),n(t)?Number(t):a}},{"../constants/numerical":139,"fast-isnumeric":16}],146:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../plots/attributes"),i=t("../components/colorscale/get_scale"),l=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),s=/^([2-9]|[1-9][0-9]+)$/;r.valObjects={data_array:{coerceFunction:function(t,e,r){Array.isArray(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;na.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,a){t%1||!n(t)||void 0!==a.min&&ta.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var a="number"==typeof t;!0!==n.strict&&a?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){a(t).isValid()?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(i(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){var n=r.length;if("string"==typeof t&&t.substr(0,n)===r&&s.test(t.substr(n)))return void e.set(t);e.set(r)},validateFunction:function(t,e){var r=e.dflt,n=r.length;return t===r||"string"==typeof t&&!(t.substr(0,n)!==r||!s.test(t.substr(n)))}},flaglist:{coerceFunction:function(t,e,r,n){if("string"!=typeof t)return void e.set(r);if(-1!==(n.extras||[]).indexOf(t))return void e.set(t);for(var a=t.split("+"),o=0;o0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}function s(t){return t.formatDate("yyyy")}function c(t){return t.formatDate("M yyyy")}function u(t){return t.formatDate("M d")}function f(t){return t.formatDate("M d, yyyy")}var d=t("d3"),h=t("fast-isnumeric"),p=t("./loggers").error,g=t("./mod"),m=t("../constants/numerical"),v=m.BADNUM,y=m.ONEDAY,x=m.ONEHOUR,b=m.ONEMIN,_=m.ONESEC,w=m.EPOCHJD,M=t("../registry"),k=d.time.format.utc,A=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?M.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:M.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},r.dfltRange=function(t){return n(t)?M.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},r.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var T,L;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*b,t>=T&&t<=L?t:v;if("string"!=typeof t&&"number"!=typeof t)return v;t=String(t);var a=n(e),o=t.charAt(0);!a||"G"!==o&&"g"!==o||(t=t.substr(1),e="");var i=a&&"chinese"===e.substr(0,7),l=t.match(i?/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m:/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m);if(!l)return v;var s=l[1],c=l[3]||"1",u=Number(l[5]||1),f=Number(l[7]||0),d=Number(l[9]||0),h=Number(l[11]||0);if(a){if(2===s.length)return v;s=Number(s);var p;try{var g=M.getComponentMethod("calendars","getCal")(e);if(i){var m="i"===c.charAt(c.length-1);c=parseInt(c,10),p=g.newDate(s,g.toMonthIndex(s,c,m),u)}else p=g.newDate(s,Number(c),u)}catch(t){return v}return p?(p.toJD()-w)*y+f*x+d*b+h*_:v}s=2===s.length?(Number(s)+2e3-A)%100+A:Number(s),c-=1;var k=new Date(Date.UTC(2e3,c,u,f,d));return k.setUTCFullYear(s),k.getUTCMonth()!==c?v:k.getUTCDate()!==u?v:k.getTime()+h*_},T=r.MIN_MS=r.dateTime2ms("-9999"),L=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==v};var C=90*y,S=3*x,z=5*b;r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=T&&t<=L))return v;e||(e=0);var a,i,l,s,c,u,f=Math.floor(10*g(t+.05,1)),d=Math.round(t-f/10);if(n(r)){var h=Math.floor(d/y)+w,p=Math.floor(g(t,y));try{a=M.getComponentMethod("calendars","getCal")(r).fromJD(h).formatDate("yyyy-mm-dd")}catch(t){a=k("G%Y-%m-%d")(new Date(d))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;i=e=T+y&&t<=L-y))return v;var e=Math.floor(10*g(t+.05,1)),r=new Date(Math.round(t-e/10));return o(d.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,a){if(r.isJSDate(t)||"number"==typeof t){if(n(a))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,a))return p("unrecognized date",t),e;return t};var O=/%\d?f/g,P=[59,59.9,59.99,59.999,59.9999],D=k("%Y"),E=k("%b %Y"),N=k("%b %-d"),R=k("%b %-d, %Y");r.formatDate=function(t,e,r,a){var o,d;if(a=n(a)&&a,e)return i(e,t,a);if(a)try{var h=Math.floor((t+.05)/y)+w,p=M.getComponentMethod("calendars","getCal")(a).fromJD(h);"y"===r?d=s(p):"m"===r?d=c(p):"d"===r?(o=s(p),d=u(p)):(o=f(p),d=l(t,r))}catch(t){return"Invalid"}else{var g=new Date(Math.floor(t+.05));"y"===r?d=D(g):"m"===r?d=E(g):"d"===r?(o=D(g),d=N(g)):(o=R(g),d=l(t,r))}return d+(o?"\n"+o:"")};var I=3*y;r.incrementMonth=function(t,e,r){r=n(r)&&r;var a=g(t,y);if(t=Math.round(t-a),r)try{var o=Math.round(t/y)+w,i=M.getComponentMethod("calendars","getCal")(r),l=i.fromJD(o);return e%12?i.add(l,e,"m"):i.add(l,e/12,"y"),(l.toJD()-w)*y+a}catch(e){p("invalid ms "+t+" in calendar "+r)}var s=new Date(t+I);return s.setUTCMonth(s.getUTCMonth()+e)+a-I},r.findExactDates=function(t,e){for(var r,a,o=0,i=0,l=0,s=0,c=n(e)&&M.getComponentMethod("calendars","getCal")(e),u=0;u0&&(a.push(o),o=[])}return o.length>0&&a.push(o),a},r.makeLine=function(t,e){var r={};return r=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(r.trace=e),r},r.makePolygon=function(t,e){var r={};if(1===t.length)r={type:"Polygon",coordinates:t};else{for(var n=new Array(t.length),a=0;ai?l:a(t)?Number(t):l):l},s.noop=t("./noop"),s.identity=t("./identity"),s.swapAttrs=function(t,e,r,n){r||(r="x"),n||(n="y");for(var a=0;ar?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},s.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},s.simpleMap=function(t,e,r,n){for(var a=t.length,o=new Array(a),i=0;i-1||u!==1/0&&u>=Math.pow(2,r)?t(e,r,n):s},s.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},s.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,a,o,i=t.length,l=2*i,s=2*e-1,c=new Array(s),u=new Array(i);for(r=0;r=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=i&&(a=l-1-a),o+=t[a]*c[n];u[r]=o}return u},s.syncOrAsync=function(t,e,r){function n(){return s.syncOrAsync(t,e,r)}for(var a,o;t.length;)if(o=t.splice(0,1)[0],(a=o(e))&&a.then)return a.then(n).then(void 0,s.promiseError);return r&&r(e)},s.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},s.noneOrAll=function(t,e,r){if(t){var n,a,o=!1,i=!0;for(n=0;n1?a+i[1]:"";if(o&&(i.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+o+"$2");return l+s}},{"../constants/numerical":139,"./clean_number":145,"./coerce":146,"./dates":147,"./ensure_array":148,"./extend":150,"./filter_unique":151,"./filter_visible":152,"./identity":155,"./is_array":157,"./is_plain_object":158,"./loggers":159,"./matrix":160,"./mod":161,"./nested_property":162,"./noop":163,"./notifier":164,"./push_unique":167,"./relink_private":169,"./search":170,"./stats":172,"./to_log_range":174,d3:13,"fast-isnumeric":16}],157:[function(t,e,r){"use strict";var n="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||n.isView(t)}},{}],158:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],159:[function(t,e,r){"use strict";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(n=t[e][0],o=t[e][1],s=!1,h(n))for(r=n.length-1;r>=0;r--)a(n[r],i(o,r))?s?n[r]=void 0:n.pop():s=!0;else if("object"==typeof n&&null!==n)for(l=Object.keys(n),s=!1,r=l.length-1;r>=0;r--)a(n[l[r]],i(o,l[r]))?delete n[l[r]]:s=!0;if(s)return}}function u(t){return void 0===t||null===t||"object"==typeof t&&(h(t)?!t.length:!Object.keys(t).length)}function f(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var d=t("fast-isnumeric"),h=t("./is_array"),p=t("./is_plain_object"),g=t("../plot_api/container_array_match");e.exports=function(t,e){if(d(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,a,i,l=0,s=e.split(".");l/g),l=0;li||n===a||ns)&&(!e||!u(t))}function r(t,e){var r=t[0],c=t[1];if(r===a||ri||c===a||cs)return!1;var u,f,d,h,p,g=n.length,m=n[0][0],v=n[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(d,v)))if(cu||Math.abs(n(i,d))>a)return!0;return!1};o.filter=function(t,e){function r(r){t.push(r);var l=n.length,s=a;n.splice(o+1);for(var c=s+1;c1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{"../constants/numerical":139,"./matrix":160}],167:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;ro.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},i.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},i.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},i.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function i(t,e){return t>=e}var l=t("fast-isnumeric"),s=t("./loggers");r.findBin=function(t,e,r){if(l(e.start))return r?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var c,u,f=0,d=e.length,h=0;for(u=e[e.length-1]>=e[0]?r?n:a:r?i:o;f90&&s.log("Long binary search..."),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,a=e[n]-e[0]||1,o=a/(n||1)/1e4,i=[e[0]],l=0;le[l]+o&&(a=Math.min(a,e[l+1]-e[l]),i.push(e[l+1]));return{vals:i,minDiff:a}},r.roundUp=function(t,e,r){for(var n,a=0,o=e.length-1,i=0,l=r?0:1,s=r?1:0,c=r?Math.ceil:Math.floor;at.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"fast-isnumeric":16}],173:[function(t,e,r){"use strict";function n(t,e){return t.node().getBoundingClientRect()[e]}function a(t){return t.replace(m,"\\lt ").replace(v,"\\gt ")}function o(t,e,r){var n="math-output-"+d.randstr([],64),o=f.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(a(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,o.node()],function(){var e=f.select("body").select("#MathJax_SVG_glyphs");if(o.select(".MathJax_SVG").empty()||!o.select("svg").node())d.log("There was an error in the tex syntax.",t),r();else{var n=o.select("svg").node().getBoundingClientRect();r(o.select(".MathJax_SVG"),e,n)}o.remove()})}function i(t,e){if(!t)return null;var r=t.match(e);return r&&(r[3]||r[4])}function l(t,e){if(!t)return"";for(var r=0;r1)for(var a=1;a doesnt match end tag <"+t+">. Pretending it did match.",e),o=c[c.length-1].node}(k);else{var N=M[4],R={type:k},I=i(N,S);if(I?(I=I.replace(D,"$1 fill:"),E&&(I+=";"+E)):E&&(I=E),I&&(R.style=I),"a"===k){l=!0;var j=i(N,z);if(j){var F=document.createElement("a");F.href=j,-1!==w.indexOf(F.protocol)&&(R.href=j,R.target=i(N,O)||"_blank",R.popup=i(N,P))}}n(R)}}return l}function u(t,e,r){var n,a,o,i=r.horizontalAlign,l=r.verticalAlign||"top",s=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===l?function(){return s.bottom-n.height}:"middle"===l?function(){return s.top+(s.height-n.height)/2}:function(){return s.top},o="right"===i?function(){return s.right-n.width}:"center"===i?function(){return s.left+(s.width-n.width)/2}:function(){return s.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:a()-c.top+"px",left:o()-c.left+"px","z-index":1e3}),this}}var f=t("d3"),d=t("../lib"),h=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings"),g=t("../constants/alignment").LINE_SPACING;r.convertToTspans=function(t,e,a){function i(){u.empty()||(d=t.attr("class")+"-math",u.select("svg."+d).remove()),t.text("").style("white-space","pre"),c(t.node(),l)&&t.style("pointer-events","all"),r.positionText(t),a&&a.call(t)}var l=t.text(),s=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&l.match(/([^$]*)([$]+[^$]*[$]+)([^$]*)/),u=f.select(t.node().parentNode);if(!u.empty()){var d=t.attr("class")?t.attr("class").split(" ")[0]:"text";return d+="-math",u.selectAll("svg."+d).remove(),u.selectAll("g."+d+"-group").remove(),t.style("display",null).attr({"data-unformatted":l,"data-math":"N"}),s?(e&&e._promises||[]).push(new Promise(function(e){t.style("display","none");var r={fontSize:parseInt(t.style("font-size"),10)};o(s[2],r,function(r,o,s){u.selectAll("svg."+d).remove(),u.selectAll("g."+d+"-group").remove();var c=r&&r.select("svg");if(!c||!c.node())return i(),void e();var f=u.append("g").classed(d+"-group",!0).attr({"pointer-events":"none","data-unformatted":l,"data-math":"Y"});f.node().appendChild(c.node()),o&&o.node()&&c.node().insertBefore(o.node().cloneNode(!0),c.node().firstChild),c.attr({class:d,height:s.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var h=t.style("fill")||"black";c.select("g").attr({fill:h,stroke:h});var p=n(c,"width"),g=n(c,"height"),m=+t.attr("x")-p*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],v=parseInt(t.style("font-size"),10)||n(t,"height"),y=-v/4;"y"===d[0]?(f.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+") translate("+[-p/2,y-g/2]+")"}),c.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===d[0]?c.attr({x:t.attr("x"),y:y-g/2}):"a"===d[0]?c.attr({x:0,y:y}):c.attr({x:m,y:+t.attr("y")+y-g/2}),a&&a.call(t,f),e(f)})})):i(),t}};var m=/(<|<|<)/g,v=/(>|>|>)/g,y={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},x={sub:"0.3em",sup:"-0.6em"},b={sub:"-0.21em",sup:"0.42em"},_="\u200b",w=["http:","https:","mailto:","",void 0,":"],M=new RegExp("]*)?/?>","g"),k=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),A=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,L=/<(\/?)([^ >]*)(\s+(.*))?>/i,C=//i,S=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,z=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,O=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,P=/(^|[\s"'])popup\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,D=/(^|;)\s*color:/;r.plainText=function(t){return(t||"").replace(M," ")},r.lineCount=function(t){return t.selectAll("tspan.line").size()||1},r.positionText=function(t,e,r){return t.each(function(){function t(t,e){return void 0===e?null===(e=n.attr(t))&&(n.attr(t,0),e=0):n.attr(t,e),e}var n=f.select(this),a=t("x",e),o=t("y",r);"text"===this.nodeName&&n.selectAll("tspan.line").attr({x:a,y:o})})},r.makeEditable=function(t,e){function r(){a(),t.style({opacity:0});var e,r=s.attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&f.select(t.node().parentNode).select(e).style({opacity:0})}function n(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}function a(){var r=f.select(o),a=r.select(".svg-container"),i=a.append("div");i.classed("plugin-editable editable",!0).style({position:"absolute","font-family":t.style("font-family")||"Arial","font-size":t.style("font-size")||12,color:e.fill||t.style("fill")||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(t.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(e.text||t.attr("data-unformatted")).call(u(t,a,e)).on("blur",function(){o._editing=!1,t.text(this.textContent).style({opacity:1});var e,r=f.select(this).attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&f.select(t.node().parentNode).select(e).style({opacity:0});var n=this.textContent;f.select(this).transition().duration(0).remove(),f.select(document).on("mouseup",null),l.edit.call(t,n)}).on("focus",function(){var t=this;o._editing=!0,f.select(document).on("mouseup",function(){if(f.event.target===t)return!1;document.activeElement===i.node()&&i.node().blur()})}).on("keyup",function(){27===f.event.which?(o._editing=!1,t.style({opacity:1}),f.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),l.cancel.call(t,this.textContent)):(l.input.call(t,this.textContent),f.select(this).call(u(t,a,e)))}).on("keydown",function(){13===f.event.which&&this.blur()}).call(n)}var o=e.gd,i=e.delegate,l=f.dispatch("edit","input","cancel"),s=i||t;if(t.style({"pointer-events":i?"none":"all"}),1!==t.size())throw new Error("boo");return e.immediate?r():s.on("click",r),f.rebind(t,l,"on")}},{"../constants/alignment":137,"../constants/string_mappings":140,"../constants/xmlns_namespaces":141,"../lib":156,d3:13}],174:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":16}],175:[function(t,e,r){"use strict";var n=e.exports={},a=t("../plots/geo/constants").locationmodeToLayer,o=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=a[t.locationmode],n=e.objects[r];return o(e,n).features}},{"../plots/geo/constants":218,"topojson-client":23}],176:[function(t,e,r){"use strict";var n=t("../registry");e.exports=function(t){for(var e,r,a=n.layoutArrayContainers,o=n.layoutArrayRegexes,i=t.split("[")[0],l=0;l0)return t.substr(0,e)}var l=t("fast-isnumeric"),s=t("gl-mat4/fromQuat"),c=t("../registry"),u=t("../lib"),f=t("../plots/plots"),d=t("../plots/cartesian/axes"),h=t("../components/color");r.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&u.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var a=d.list({_fullLayout:t});for(e=0;e3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=f.getSubplotIds(t,"gl3d");for(e=0;e1&&i.warn("Full array edits are incompatible with other edits",f);var y=r[""][""];if(u(y))e.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",f,y),!0;e.set(y)}return!g&&(d(m,v),h(t),!0)}var x,b,_,w,M,k,A,T=Object.keys(r).map(Number).sort(l),L=e.get(),C=L||[],S=n(v,f).get(),z=[],O=-1,P=C.length;for(x=0;xC.length-(A?0:1))i.warn("index out of range",f,_);else if(void 0!==k)M.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",f,_),u(k)?z.push(_):A?("add"===k&&(k={}),C.splice(_,0,k),S&&S.splice(_,0,{})):i.warn("Unrecognized full object edit value",f,_,k),-1===O&&(O=_);else for(b=0;b=0;x--)C.splice(z[x],1),S&&S.splice(z[x],1);if(C.length?L||e.set(C):e.set(null),g)return!1;if(d(m,v),p!==o){var D;if(-1===O)D=T;else{for(P=Math.max(C.length,P),D=[],x=0;x=O);x++)D.push(_);for(x=O;x=t.data.length||a<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(a,n+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function s(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),l(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&l(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function c(t,e,r){var n,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&sH.range[0]?[1,2]:[2,1]);else{var G=H.range[0],Y=H.range[1];V?(G<=0&&Y<=0&&r(R+".autorange",!0),G<=0?G=Y/1e6:Y<=0&&(Y=G/1e6),r(R+".range[0]",Math.log(G)/Math.LN10),r(R+".range[1]",Math.log(Y)/Math.LN10)):(r(R+".range[0]",Math.pow(10,G)),r(R+".range[1]",Math.pow(10,Y)))}else r(R+".autorange",!0);M.getComponentMethod("annotations","convertCoords")(t,F,L,r),M.getComponentMethod("images","convertCoords")(t,F,L,r)}else r(R+".autorange",!0);b.nestedProperty(c,R+"._inputRange").set(null)}else if(D.match(E.AX_NAME_PATTERN)){var X=b.nestedProperty(c,A).get(),Z=(L||{}).type;Z&&"-"!==Z||(Z="linear"),M.getComponentMethod("annotations","convertCoords")(t,X,Z,r),M.getComponentMethod("images","convertCoords")(t,X,Z,r)}var W=O.containerArrayMatch(A);if(W){o=W.array,i=W.index;var $=W.property,Q=b.nestedProperty(s,o),J=(Q||[])[i]||{};if(""===i)-1===A.indexOf("updatemenus")&&(v.docalc=!0);else if(""===$){var K=L;O.isAddVal(L)?_[A]=null:O.isRemoveVal(L)?(_[A]=J,K=J):b.warn("unrecognized full object value",e),(n(K,"x")||n(K,"y")&&-1===A.indexOf("updatemenus"))&&(v.docalc=!0)}else!n(J,"x")&&!n(J,"y")||b.containsAny(A,["color","opacity","align","dash","updatemenus"])||(v.docalc=!0);d[o]||(d[o]={});var tt=d[o][i];tt||(tt=d[o][i]={}),tt[$]=L,delete e[A]}else if("reverse"===D)I.range?I.range.reverse():(r(R+".autorange",!0),I.range=[1,0]),F.autorange?v.docalc=!0:v.doplot=!0;else{var et=String(T.parts[1]||"");0===z.indexOf("scene")?"camera"===T.parts[1]?v.docamera=!0:v.doplot=!0:0===z.indexOf("geo")?v.doplot=!0:0===z.indexOf("ternary")?v.doplot=!0:"paper_bgcolor"===A?v.doplot=!0:"margin"===z||"autorange"===et||"rangemode"===et||"type"===et||"domain"===et||"fixedrange"===et||"scaleanchor"===et||"scaleratio"===et||-1!==A.indexOf("calendar")||A.match(/^(bar|box|font)/)?v.docalc=!0:!c._has("gl2d")||-1===A.indexOf("axis")&&"plot_bgcolor"!==A?!c._has("gl2d")||"dragmode"!==A||"lasso"!==L&&"select"!==L||"lasso"===B||"select"===B?"hiddenlabels"===A?v.docalc=!0:-1!==z.indexOf("legend")?v.dolegend=!0:-1!==A.indexOf("title")?v.doticks=!0:-1!==z.indexOf("bgcolor")?v.dolayoutstyle=!0:C>1&&b.containsAny(et,["tick","exponent","grid","zeroline"])?v.doticks=!0:-1!==A.indexOf(".linewidth")&&-1!==A.indexOf("axis")?v.doticks=v.dolayoutstyle=!0:C>1&&-1!==et.indexOf("line")?v.dolayoutstyle=!0:C>1&&"mirror"===et?v.doticks=v.dolayoutstyle=!0:"margin.pad"===A?v.doticks=v.dolayoutstyle=!0:-1!==["hovermode","dragmode"].indexOf(A)||-1!==A.indexOf("spike")?v.domodebar=!0:-1===["height","width","autosize"].indexOf(A)&&(v.doplot=!0):v.docalc=!0:v.doplot=!0,T.set(L)}}}for(o in d){O.applyContainerArrayChanges(t,b.nestedProperty(s,o),d[o],v)||(v.doplot=!0)}var rt=c._axisConstraintGroups;for(m in w)for(i=0;i=l.length?l[0]:l[t]:l}function a(t){return Array.isArray(s)?t>=s.length?s[0]:s[t]:s}function o(t,e){var r=0;return function(){if(t&&++r===e)return t()}}if(t=P.getGraphDiv(t),!b.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var i=t._transitionData;i._frameQueue||(i._frameQueue=[]),r=k.supplyAnimationDefaults(r);var l=r.transition,s=r.frame;return void 0===i._frameWaitingCnt&&(i._frameWaitingCnt=0),new Promise(function(s,c){function u(){t.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}function f(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var e=i._currentFrame=i._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,i._lastFrameAt=Date.now(),i._timeToNext=e.frameOpts.duration,k.transition(t,e.frame.data,e.frame.layout,P.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else u()}function d(){t.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null;var e=function(){i._animationRaf=window.requestAnimationFrame(e),Date.now()-i._lastFrameAt>i._timeToNext&&f()};e()}function h(t){return Array.isArray(l)?m>=l.length?t.transitionOpts=l[m]:t.transitionOpts=l[0]:t.transitionOpts=l,m++,t}var p,g,m=0,v=[],y=void 0===e||null===e,x=Array.isArray(e);if(y||x||!b.isPlainObject(e)){if(y||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&MM)&&A.push(g);v=A}}v.length>0?function(e){if(0!==e.length){for(var l=0;l=0;a--)if(b.isPlainObject(e[a])){var d=(c[e[a].name]||{}).name,h=e[a].name;d&&h&&"number"==typeof h&&c[d]&&(n++,b.warn('addFrames: overwriting frame "'+c[d].name+'" with a frame whose name of type "number" also equates to "'+d+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&b.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f.push({frame:k.supplyFrameDefaults(e[a]),index:r&&void 0!==r[a]&&null!==r[a]?r[a]:u+a})}f.sort(function(t,e){return t.index>e.index?-1:t.index=0;a--){if(o=f[a].frame,"number"==typeof o.name&&b.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!o.name)for(;c[o.name="frame "+t._transitionData._counter++];);if(c[o.name]){for(i=0;i=0;r--)n=e[r],o.push({type:"delete",index:n}),i.unshift({type:"insert",index:n,value:a[n]});var l=k.modifyFrames,s=k.modifyFrames,c=[t,i],u=[t,o];return w&&w.add(t,l,c,s,u),k.modifyFrames(t,o)},x.purge=function(t){t=P.getGraphDiv(t);var e=t._fullLayout||{},r=t._fullData||[];return k.cleanPlot([],{},r,e),k.purge(t),_.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":65,"../components/errorbars":71,"../constants/xmlns_namespaces":141,"../lib":156,"../lib/events":149,"../lib/queue":168,"../lib/svg_text_utils":173,"../plotly":187,"../plots/cartesian/axis_ids":195,"../plots/cartesian/constants":197,"../plots/cartesian/constraints":199,"../plots/cartesian/graph_interact":201,"../plots/plots":233,"../plots/polar":236,"../registry":241,"./helpers":177,"./manage_arrays":178,"./subroutines":184,d3:13,"fast-isnumeric":16,"has-hover":18}],180:[function(t,e,r){"use strict";function n(t,r){try{t._fullLayout._paper.style("background",r)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1, -editableMainTitle:!0,editableAxisXTitle:!0,editableAxisX2Title:!0,editableAxisYTitle:!0,editableAxisY2Title:!0,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:n,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],181:[function(t,e,r){"use strict";function n(t){var e,r;"area"===t?(e={attributes:x},r={}):(e=h.modules[t]._module,r=e.basePlotModule);var n={};n.type=null,w(n,g),w(n,e.attributes),r.attributes&&w(n,r.attributes),Object.keys(h.componentsRegistry).forEach(function(e){var r=h.componentsRegistry[e];r.schema&&r.schema.traces&&r.schema.traces[t]&&Object.keys(r.schema.traces[t]).forEach(function(e){d(n,r.schema.traces[t][e],e)})}),n.type=t;var a={meta:e.meta||{},attributes:l(n)};if(e.layoutAttributes){var o={};w(o,e.layoutAttributes),a.layoutAttributes=l(o)}return a}function a(){var t={};return w(t,m),Object.keys(h.subplotsRegistry).forEach(function(e){var r=h.subplotsRegistry[e];if(r.layoutAttributes)if("cartesian"===r.name)f(t,r,"xaxis"),f(t,r,"yaxis");else{var n="subplot"===r.attr?r.name:r.attr;f(t,r,n)}}),t=u(t),Object.keys(h.componentsRegistry).forEach(function(e){var r=h.componentsRegistry[e];r.layoutAttributes&&(r.schema&&r.schema.layout?Object.keys(r.schema.layout).forEach(function(e){d(t,r.schema.layout[e],e)}):d(t,r.layoutAttributes,r.name))}),{layoutAttributes:l(t)}}function o(t){var e=h.transformsRegistry[t],r=w({},e.attributes);return Object.keys(h.componentsRegistry).forEach(function(e){var n=h.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){d(r,n.schema.transforms[t][e],e)})}),{attributes:l(r)}}function i(){var t={frames:p.extendDeep({},v)};return l(t),t.frames}function l(t){return s(t),c(t),t}function s(t){function e(t){return{valType:"string"}}function n(t,n,a){r.isValObject(t)?"data_array"===t.valType?(t.role="data",a[n+"src"]=e(n)):!0===t.arrayOk&&(a[n+"src"]=e(n)):p.isPlainObject(t)&&(t.role="object")}r.crawl(t,n)}function c(t){function e(t,e,r){if(t){var n=t[k];n&&(delete t[k],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}r.crawl(t,e)}function u(t){return _(t,{radialaxis:b.radialaxis,angularaxis:b.angularaxis}),_(t,b.layout),t}function f(t,e,r){var n=p.nestedProperty(t,r),a=w({},e.layoutAttributes);a[M]=!0,n.set(a)}function d(t,e,r){var n=p.nestedProperty(t,r);n.set(w(n.get()||{},e))}var h=t("../registry"),p=t("../lib"),g=t("../plots/attributes"),m=t("../plots/layout_attributes"),v=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),x=t("../plots/polar/area_attributes"),b=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,M="_isSubplotObj",k="_isLinkedToArray",A=[M,k,"_arrayAttrRegexps","_deprecated"];r.IS_SUBPLOT_OBJ=M,r.IS_LINKED_TO_ARRAY=k,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=A,r.get=function(){var t={};h.allTypes.concat("area").forEach(function(e){t[e]=n(e)});var e={};return Object.keys(h.transformsRegistry).forEach(function(t){e[t]=o(t)}),{defs:{valObjects:p.valObjects,metaKeys:A.concat(["description","role"])},traces:t,layout:a(),transforms:e,frames:i(),animation:l(y)}},r.crawl=function(t,e,n){var a=n||0;Object.keys(t).forEach(function(n){var o=t[n];-1===A.indexOf(n)&&(e(o,n,t,a),r.isValObject(o)||p.isPlainObject(o)&&r.crawl(o,e,a+1))})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,i,l){if(o=o.slice(0,l).concat([r]),e&&("data_array"===e.valType||!0===e.arrayOk)){var s=n(o),c=p.nestedProperty(t,s).get();Array.isArray(c)&&a.push(s)}}function n(t){return t.join(".")}var a=[],o=[];if(r.crawl(g,e),t._module&&t._module.attributes&&r.crawl(t._module.attributes,e),t.transforms)for(var i=t.transforms,l=0;l=t[1]||a[1]<=t[0])&&(o[0]e[0]))return!0}return!1}var a=t("d3"),o=t("../plotly"),i=t("../registry"),l=t("../plots/plots"),s=t("../lib"),c=t("../components/color"),u=t("../components/drawing"),f=t("../components/titles"),d=t("../components/modebar"),h=t("../plots/cartesian/graph_interact");r.layoutStyles=function(t){return s.syncOrAsync([l.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){var e,i=t._fullLayout,l=i._size,s=o.Axes.list(t);for(e=0;e1)};d(e.width)&&d(e.height)||n(new Error("Height and width should be pixel values."));var h=s(t,{format:"png",height:e.height,width:e.width}),p=h.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var g=l.getRedrawFunc(p);o.plot(p,h.data,h.layout,h.config).then(g).then(f).then(function(t){r(t)}).catch(function(t){n(t)})})}var a=t("fast-isnumeric"),o=t("../plotly"),i=t("../lib"),l=t("../snapshot/helpers"),s=t("../snapshot/cloneplot"),c=t("../snapshot/tosvg"),u=t("../snapshot/svgtoimg");e.exports=n},{"../lib":156,"../plotly":187,"../snapshot/cloneplot":242,"../snapshot/helpers":245,"../snapshot/svgtoimg":247,"../snapshot/tosvg":249,"fast-isnumeric":16}],186:[function(t,e,r){"use strict";function n(t,e,r,a,o,c){c=c||[];for(var u=Object.keys(t),d=0;d1&&s.push(i("object","layout"))),d.supplyDefaults(c);for(var u=c._fullData,m=r.length,v=0;v.3*f||o(n)||o(a))){var d=r.dtick/2;t+=t+d.8){var i=Number(r.substr(1));o.exactYears>.8&&i%12==0?t=N.tickIncrement(t,"M6","reverse")+1.5*O:o.exactMonths>.8?t=N.tickIncrement(t,"M1","reverse")+15.5*O:t-=O/2;var l=N.tickIncrement(t,r);if(l<=n)return l}return t}function o(t){var e,r,n=t.tickvals,a=t.ticktext,o=new Array(n.length),i=w.simpleMap(t.range,t.r2l),l=1.0001*i[0]-1e-4*i[1],c=1.0001*i[1]-1e-4*i[0],u=Math.min(l,c),f=Math.max(l,c),d=0;Array.isArray(a)||(a=[]);var h="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),r=0;ru&&e10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=O&&a<=10||e>=15*O)t._tickround="d";else if(e>=D&&a<=16||e>=P)t._tickround="M";else if(e>=E&&a<=19||e>=D)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20}}else if(x(e)||"L"===e.charAt(0)){var i=t.range.map(t.r2d||Number);x(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(i[0]),Math.abs(i[1])),s=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(s)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}function s(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}function c(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||t.tickformat;n&&(a=x(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var i,l=w.formatDate(e.x,o,a,t.calendar),s=l.indexOf("\n");-1!==s&&(i=l.substr(s+1),l=l.substr(0,s)),n&&("00:00:00"===l||"00:00"===l?(l=i,i=""):8===l.length&&(l=l.replace(/:00$/,""))),i&&(r?"d"===a?l+=", "+i:l=i+(l?", "+l:""):t._inCalcTicks&&i===t._prevDateHead||(l+="
"+i,t._prevDateHead=i)),e.text=l}function u(t,e,r,n,a){var o=t.dtick,i=e.x;if(!n||"string"==typeof o&&"L"===o.charAt(0)||(o="L3"),t.tickformat||"string"==typeof o&&"L"===o.charAt(0))e.text=h(Math.pow(10,i),t,a,n);else if(x(o)||"D"===o.charAt(0)&&w.mod(i+.01,1)<.1)if(-1!==["e","E","power"].indexOf(t.exponentformat)){var l=Math.round(i);e.text=0===l?1:1===l?"10":l>1?"10"+l+"":"10\u2212"+-l+"",e.fontSize*=1.25}else e.text=h(Math.pow(10,i),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==o.charAt(0))throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,w.mod(i,1)))),e.fontSize*=.75}if("D1"===t.dtick){var s=String(e.text).charAt(0);"0"!==s&&"1"!==s||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(i<0?.5:.25)))}}function f(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}function d(t,e,r,n,a){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide"),e.text=h(e.x,t,a,n)}function h(t,e,r,n){var a=t<0,o=e._tickround,i=r||e.exponentformat||"B",s=e._tickexponent,c=e.tickformat,u=e.separatethousands;if(n){var f={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:x(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};l(f),o=(Number(f._tickround)||0)+4,s=f._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return y.format(c)(t).replace(/-/g,"\u2212");var d=Math.pow(10,-o)/2;if("none"===i&&(s=0),(t=Math.abs(t))12||s<-15)?t+="e"+g:"E"===i?t+="E"+g:"power"===i?t+="\xd710"+g+"":"B"===i&&9===s?t+="B":"SI"!==i&&"B"!==i||(t+=U[s/3+5])}return a?"\u2212"+t:t}function p(t,e){var r,n,a=[];for(r=0;r1)for(n=1;n2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},N.getAutoRange=function(t){var e,r=[],n=t._min[0].val,a=t._max[0].val;for(e=1;e0&&u>0&&f/u>d&&(s=i,c=l,d=f/u);if(n===a){var g=n-1,m=n+1;r="tozero"===t.rangemode?n<0?[g,0]:[0,m]:"nonnegative"===t.rangemode?[Math.max(0,g),Math.max(0,m)]:[g,m]}else d&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(s.val>=0&&(s={val:0,pad:0}),c.val<=0&&(c={val:0,pad:0})):"nonnegative"===t.rangemode&&(s.val-d*s.pad<0&&(s={val:0,pad:0}),c.val<0&&(c={val:1,pad:0})),d=(c.val-s.val)/(t._length-s.pad-c.pad)),r=[s.val-d*s.pad,c.val+d*c.pad]);return r[0]===r[1]&&("tozero"===t.rangemode?r=r[0]<0?[r[0],0]:r[0]>0?[0,r[0]]:[0,1]:(r=[r[0]-1,r[0]+1],"nonnegative"===t.rangemode&&(r[0]=Math.max(0,r[0])))),h&&r.reverse(),w.simpleMap(r,t.l2r||Number)},N.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=N.getAutoRange(t),t._r=t.range.slice(),t._rl=w.simpleMap(t._r,t.r2l);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},N.saveRangeInitial=function(t,e){for(var r=N.list(t,"",!0),n=!1,a=0;a=d?h=!1:l.val>=c&&l.pad<=d&&(t._min.splice(i,1),i--);h&&t._min.push({val:c,pad:y&&0===c?0:d})}if(n(u)){for(h=!0,i=0;i=u&&l.pad>=f?h=!1:l.val<=u&&l.pad<=f&&(t._max.splice(i,1),i--);h&&t._max.push({val:u,pad:y&&0===u?0:f})}}}if((t.autorange||!!w.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),r||(r={}),t._m||t.setScale();var o,i,l,s,c,u,f,d,h,p,g,m=e.length,v=r.padded?.05*t._length:0,y=r.tozero&&("linear"===t.type||"-"===t.type);v&&"domain"===t.constrain&&t._inputDomain&&(v*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0]));var b=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),_=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),M=n(r.vpadplus||r.vpad),k=n(r.vpadminus||r.vpad);for(o=0;o<6;o++)a(o);for(o=m-1;o>5;o--)a(o)}},N.autoBin=function(t,e,r,o,i){var l=w.aggNums(Math.min,null,t),s=w.aggNums(Math.max,null,t);if(i||(i=e.calendar),"category"===e.type)return{start:l-.5,end:s+.5,size:1};var c;if(r)c=(s-l)/r;else{var u=w.distinctVals(t),f=Math.pow(10,Math.floor(Math.log(u.minDiff)/Math.LN10)),d=f*w.roundUp(u.minDiff/f,[.9,1.9,4.9,9.9],!0);c=Math.max(d,2*w.stdev(t)/Math.pow(t.length,o?.25:.4)),x(c)||(c=1)}var h;h="log"===e.type?{type:"linear",range:[l,s]}:{type:e.type,range:w.simpleMap([l,s],e.c2r,0,i),calendar:i},N.setConvert(h),N.autoTicks(h,c);var p,g=N.tickIncrement(N.tickFirst(h),h.dtick,"reverse",i);if("number"==typeof h.dtick){g=n(g,t,h,l,s);p=g+(1+Math.floor((s-g)/h.dtick))*h.dtick}else for("M"===h.dtick.charAt(0)&&(g=a(g,t,h.dtick,l,i)), -p=g;p<=s;)p=N.tickIncrement(p,h.dtick,!1,i);return{start:e.c2r(g,0,i),end:e.c2r(p,0,i),size:h.dtick}},N.calcTicks=function(t){var e=w.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=w.constrain(t._length/r,4,9)+1)),"array"===t.tickmode&&(n*=100),N.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),l(t),"array"===t.tickmode)return o(t);t._tmin=N.tickFirst(t);var a=e[1]=s:c<=s)&&(i.push(c),!(i.length>1e3));c=N.tickIncrement(c,t.dtick,a,t.calendar));t._tmax=i[i.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var u=new Array(i.length),f=0;fS?(e/=S,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*i(e,r,j)):n>z?(e/=z,t.dtick="M"+i(e,1,F)):n>O?(t.dtick=i(e,O,q),t.tick0=w.dateTick0(t.calendar,!0)):n>P?t.dtick=i(e,P,F):n>D?t.dtick=i(e,D,B):n>E?t.dtick=i(e,E,B):(r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=i(e,r,j))}else if("log"===t.type){t.tick0=0;var a=w.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(a[1]-a[0])<1){var o=1.5*Math.abs((a[1]-a[0])/e);e=Math.abs(Math.pow(10,a[1])-Math.pow(10,a[0]))/o,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+i(e,r,j)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=i(e,r,j));if(0===t.dtick&&(t.dtick=1),!x(t.dtick)&&"string"!=typeof t.dtick){var l=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(l)}},N.tickIncrement=function(t,e,r,n){var a=r?-1:1;if(x(e))return t+a*e;var o=e.charAt(0),i=a*Number(e.substr(1));if("M"===o)return w.incrementMonth(t,i,n);if("L"===o)return Math.log(Math.pow(10,t)+i)/Math.LN10;if("D"===o){var l="D2"===e?V:H,s=t+.01*a,c=w.roundUp(w.mod(s,1),l,r);return Math.floor(s)+Math.log(y.round(Math.pow(10,c),1))/Math.LN10}throw"unrecognized dtick "+String(e)},N.tickFirst=function(t){var e=t.r2l||Number,r=w.simpleMap(t.range,e),n=r[1]1&&ee+1){var o=t.text,i=Math.round(e/(a/o.length)),l=Math.floor(i/2),s=i-l-1;o=o.substr(0,l)+"\u2026"+o.substr(-s);r.select("text").text(o),r.insert("title","text").text(t.text)}})}function f(){var e,r,n,a,o,i=c._boundingBox,l=0,s=0;if("x"===c._id.charAt(0)?(e="height",a="r","2"===c._id.charAt(1)?(s=1,r="t"):r="b"):"y"===c._id.charAt(0)&&(e="width","2"===c._id.charAt(1)?(l=1,r="r"):r="l"),e&&r){if(n=i[e],c._titleElement){n+=c._titleElement.node().getBoundingClientRect()[e]+2}var u=.5*t._fullLayout[e];n=Math.min(n,u);var f={x:l,y:s,l:0,r:0,b:0,t:0};if(f[r]=n,"r"===a&&(0===c._lastangle&&(o=c._lastLabelWidth/2),o>0)){var d={x:1.01,y:0,l:0,r:o,b:0,t:0};b.autoMargin(t,"xaxis_on_r",d)}b.autoMargin(t,c._name,f)}}function d(){function e(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}var n=r.node().getBoundingClientRect(),a=t.getBoundingClientRect();if(c._boundingBox={width:n.width,height:n.height,left:n.left-a.left,right:n.right-a.left,top:n.top-a.top,bottom:n.bottom-a.top},v){var o=c._counterSpan=[1/0,-1/0];for(L=0;L2*a}function o(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,a=0,o=0;o2*n}var i=t("fast-isnumeric"),l=t("../../lib"),s=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return a(t,e)?"date":o(t)?"category":n(t)?"linear":"-"}},{"../../constants/numerical":139,"../../lib":156,"fast-isnumeric":16}],194:[function(t,e,r){"use strict";var n=t("tinycolor2").mix,a=t("../../registry"),o=t("../../lib"),i=t("../../components/color/attributes").lightFraction,l=t("./layout_attributes"),s=t("./tick_value_defaults"),c=t("./tick_mark_defaults"),u=t("./tick_label_defaults"),f=t("./category_order_defaults"),d=t("./set_convert"),h=t("./ordered_categories");e.exports=function(t,e,r,p,g){function m(r,n){return o.coerce2(t,e,l,r,n)}var v=p.letter,y=p.font||{},x="Click to enter "+(p.title||v.toUpperCase()+" axis")+" title",b=r("visible",!p.cheateronly),_=e.type;if("date"===_){a.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",p.calendar)}if(d(e,g),r("autorange",!e.isValidRange(t.range))&&r("rangemode"),r("range"),e.cleanRange(),f(t,e,r),e._initialCategories="category"===_?h(v,e.categoryorder,e.categoryarray,p.data):[],!b)return e;var w=r("color"),M=w===t.color?w:y.color;r("title",x),o.coerceFont(r,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:M}),s(t,e,r,_),u(t,e,r,_,p),c(t,e,r,p);var k=m("linecolor",w),A=m("linewidth"),T=r("showline",!!k||!!A);T||(delete e.linecolor,delete e.linewidth),(T||e.ticks)&&r("mirror");var L=m("gridcolor",n(w,p.bgColor,i).toRgbString()),C=m("gridwidth");r("showgrid",p.showGrid||!!L||!!C)||(delete e.gridcolor,delete e.gridwidth);var S=m("zerolinecolor",w),z=m("zerolinewidth");return r("zeroline",p.showGrid||!!S||!!z)||(delete e.zerolinecolor,delete e.zerolinewidth),e}},{"../../components/color/attributes":40,"../../lib":156,"../../registry":241,"./category_order_defaults":196,"./layout_attributes":203,"./ordered_categories":205,"./set_convert":209,"./tick_label_defaults":210,"./tick_mark_defaults":211,"./tick_value_defaults":212,tinycolor2:22}],195:[function(t,e,r){"use strict";function n(t,e,r){function n(t,r){for(var n=Object.keys(t),a=/^[xyz]axis[0-9]*/,o=[],i=0;i0;o&&(n="array");var i=r("categoryorder",n);"array"===i&&r("categoryarray"),o||"array"!==i||(e.categoryorder="trace")}}},{}],197:[function(t,e,r){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],198:[function(t,e,r){"use strict";function n(t,e,r,n){var a,o,l,s,c=n[i(e)].type,u=[];for(o=0;oi*v)||_)for(r=0;rO&&DS&&(S=D);var R=(S-C)/(2*z);f/=R,C=s.l2r(C),S=s.l2r(S),s.range=s._input.range=A=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function c(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function u(t,e,r,n,a){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",a+"Z")}function f(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:T.background,stroke:T.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function d(t){t.selectAll(".select-outline").remove()}function h(t,e,r,n,a,o){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),a||(t.transition().style("fill",o>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function p(t){b.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function g(t){return-1!==["lasso","select"].indexOf(t)}function m(t,e){return"M"+(t.l-.5)+","+(e-j-.5)+"h-3v"+(2*j+1)+"h3ZM"+(t.r+.5)+","+(e-j-.5)+"h3v"+(2*j+1)+"h-3Z"}function v(t,e){return"M"+(e-j-.5)+","+(t.t-.5)+"v-3h"+(2*j+1)+"v3ZM"+(e-j-.5)+","+(t.b+.5)+"v3h"+(2*j+1)+"v-3Z"}function y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,j)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function x(t,e,r){var n,a,o,i,l,s,c=!1,u={},f={};for(n=0;nj||l>j?(kt="xy",i/ot>l/it?(l=i*it/ot,xt>o?bt.t=xt-l:bt.b=xt+l):(i=l*ot/it,yt>a?bt.l=yt-i:bt.r=yt+i),Tt.attr("d",y(bt))):n():!st||l0&&(t.emit("plotly_zoom",l),l.userHandled||(J(kt),F&&t.data&&t._context.showTips&&(k.notifier("Double-click to
zoom back out","long"),F=!1),l.pre=!1,t.emit("plotly_zoom",l)))}function X(e,r){var n=1===(q+H).length;if(e)J();else if(2!==r||n){if(1===r&&n){var a=q?rt[0]:et[0],i="s"===q||"w"===H?0:1,l=a._name+".range["+i+"]",s=o(a,i),c="left",u="middle";if(a.fixedrange)return;q?(u="n"===q?"top":"bottom","right"===a.side&&(c="right")):"e"===H&&(c="right"),t._context.showAxisRangeEntryBoxes&&b.select(mt).call(A.makeEditable,{gd:t,immediate:!0,background:ht.paper_bgcolor,text:String(s),fill:a.tickfont?a.tickfont.color:"#444",horizontalAlign:c,verticalAlign:u}).on("edit",function(e){var r=a.d2r(e);void 0!==r&&w.relayout(t,l,r)})}}else Q()}function Z(e){function r(t,e,r){function n(e){return t.l2r(o+(e-o)*r)}if(!t.fixedrange){var a=k.simpleMap(t.range,t.r2l),o=a[0]+(a[1]-a[0])*e;t.range=a.map(n)}}if(t._context.scrollZoom||ht._enablescrollzoom){if(t._transitioningWithDuration)return k.pauseEvent(e);var n=t.querySelector(".plotly");if(V(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(St);var a=-e.deltaY;if(isFinite(a)||(a=e.wheelDelta/10),!isFinite(a))return void k.log("Did not find wheel motion attributes: ",e);var o,i=Math.exp(-Math.min(Math.max(a,-20),20)/100),l=Ot.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-l.left)/l.width,c=(l.bottom-e.clientY)/l.height;if(H||ut){for(H||(s=.5),o=0;ou[1]-.01&&(e.domain=[0,1]),a.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":156,"fast-isnumeric":16}],207:[function(t,e,r){"use strict";var n=t("../../constants/alignment").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],o=a[0]+(a[1]-a[0])*r;t.range=t._input.range=[t.l2r(o+(a[0]-o)*e),t.l2r(o+(a[1]-o)*e)]}},{"../../constants/alignment":137}],208:[function(t,e,r){"use strict";function n(t){return t._id}function a(t,e){if(Array.isArray(t))for(var r=e.cd[0].trace,n=0;n0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],a=t.range[1];return.5*(n+a-3*w*Math.abs(n-a))}return h}function f(e,r,n){var a=c(e,n||t.calendar);if(a===h){if(!o(e))return h;a=c(new Date(+e))}return a}function m(e,r,n){return s(e,r,n||t.calendar)}function v(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return h}function x(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if(o(e))return+e}function b(e){return o(e)?a.round(t._b+t._m*e,2):h}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?r:u,t.l2c="log"===t.type?n:u,t.l2p=b,t.p2l=_,t.c2p="log"===t.type?function(t,e){return b(r(t,e))}:b,t.p2c="log"===t.type?function(t){return n(_(t))}:_,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=u,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=_,t.cleanPos=u):"log"===t.type?(t.d2r=t.d2l=function(t,e){return r(l(t),e)},t.r2d=t.r2c=function(t){return n(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=u,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=_,t.cleanPos=u):"date"===t.type?(t.d2r=t.r2d=i.identity,t.d2c=t.r2c=t.d2l=t.r2l=f,t.c2d=t.c2r=t.l2d=t.l2r=m,t.d2p=t.r2p=function(e,r,n){return t.l2p(f(e,0,n))},t.p2d=t.p2r=function(t,e,r){return m(_(t),e,r)},t.cleanPos=function(e){return i.cleanDate(e,h,t.calendar)}):"category"===t.type&&(t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2r=t.d2l_noadd=x,t.r2c=function(e){var r=x(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=u,t.r2l=x,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return v(_(t))},t.r2p=t.d2p,t.p2r=_,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:u(t)}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e){e||(e="range");var r,n,a=i.nestedProperty(t,e).get(),l=(t._id||"x").charAt(0);if(n="date"===t.type?i.dfltRange(t.calendar):"y"===l?p.DFLTRANGEY:p.DFLTRANGEX,n=n.slice(),!a||2!==a.length)return void i.nestedProperty(t,e).set(n);for("date"===t.type&&(a[0]=i.cleanDate(a[0],h,t.calendar),a[1]=i.cleanDate(a[1],h,t.calendar)),r=0;r<2;r++)if("date"===t.type){if(!i.isDateTime(a[r],t.calendar)){t[e]=n;break}if(t.r2l(a[0])===t.r2l(a[1])){var s=i.constrain(t.r2l(a[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);a[0]=t.l2r(s-1e3),a[1]=t.l2r(s+1e3);break}}else{if(!o(a[r])){if(!o(a[1-r])){t[e]=n;break}a[r]=a[1-r]*(r?10:.1)}if(a[r]<-d?a[r]=-d:a[r]>d&&(a[r]=d),a[0]===a[1]){var c=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=c,a[1]+=c}}},t.setScale=function(r){var n=e._size,a=t._id.charAt(0);if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var o=g.getFromId({_fullLayout:e},t.overlaying);t.domain=o.domain}var l=r&&t._r?"_r":"range",s=t.calendar;t.cleanRange(l);var c=t.r2l(t[l][0],s),u=t.r2l(t[l][1],s);if("y"===a?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),!isFinite(t._m)||!isFinite(t._b))throw i.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,r){var n,a,o,i="date"===t.type&&e[r+"calendar"];if(r in e)for(n=e[r],a=new Array(n.length),o=0;o0?Number(u):c;else if("string"!=typeof u)e.dtick=c;else{var f=u.charAt(0),d=u.substr(1);d=n(d)?Number(d):0,(d<=0||!("date"===i&&"M"===f&&d===Math.round(d)||"log"===i&&"L"===f||"log"===i&&"D"===f&&(1===d||2===d)))&&(e.dtick=c)}var h="date"===i?a.dateTick0(e.calendar):0,p=r("tick0",h);"date"===i?e.tick0=a.cleanDate(p,h):n(p)&&"D1"!==u&&"D2"!==u?e.tick0=Number(p):e.tick0=h}else{var g=r("tickvals");void 0===g?e.tickmode="auto":r("ticktext")}}},{"../../constants/numerical":139,"../../lib":156,"fast-isnumeric":16}],213:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plotly"),o=t("../../registry"),i=t("../../components/drawing"),l=t("./axes"),s=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,r,c){function u(e,r){function n(e,r){for(a=0;ar.duration?(h(),k=window.cancelAnimationFrame(g)):k=window.requestAnimationFrame(g)}var m=t._fullLayout,v=[],y=function(t){var e,r,n,a,o,i={};for(e in t)if(r=e.split("."),n=r[0].match(s)){var l=n[1],c=l+"axis";if(a=m[c],o={},Array.isArray(t[e])?o.to=t[e].slice(0):Array.isArray(t[e].range)&&(o.to=t[e].range.slice(0)),!o.to)continue;o.axisName=c,o.length=a._length,v.push(l),i[l]=o}return i}(e),x=Object.keys(y),b=function(t,e,r){var n,a,o,i=t._plots,l=[];for(n in i){var s=i[n];if(-1===l.indexOf(s)){var c=s.xaxis._id,u=s.yaxis._id,f=s.xaxis.range,d=s.yaxis.range;s.xaxis._r=s.xaxis.range.slice(),s.yaxis._r=s.yaxis.range.slice(),a=r[c]?r[c].to:f,o=r[u]?r[u].to:d,f[0]===a[0]&&f[1]===a[1]&&d[0]===o[0]&&d[1]===o[1]||-1===e.indexOf(c)&&-1===e.indexOf(u)||l.push(s)}}return l}(m,x,y);if(!b.length)return!1;var _;c&&(_=c());var w,M,k,A=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(k),k=null,p()}),w=Date.now(),k=window.requestAnimationFrame(g),Promise.resolve()}},{"../../components/drawing":65,"../../plotly":187,"../../registry":241,"./axes":192,d3:13}],214:[function(t,e,r){"use strict";function n(t,e){if("-"===t.type){var r=t._id,n=r.charAt(0);-1!==r.indexOf("scene")&&(r=n);var c=a(e,r,n);if(c){if("histogram"===c.type&&n==={v:"y",h:"x"}[c.orientation||"v"])return void(t.type="linear");var u=n+"calendar",f=c[u];if(i(c,n)){for(var d,h=o(c),p=[],g=0;g0?".":"")+a;c.isPlainObject(o)?l(o,e,i,n+1):e(i,a,o)}})}var s=t("../plotly"),c=t("../lib");r.manageCommandObserver=function(t,e,a,o){var i={},l=!0;e&&e._commandObserver&&(i=e._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var s=r.hasSimpleAPICommandBindings(t,a,i.lookupTable);if(e&&e._commandObserver){if(s)return i;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,i}if(s){n(t,s,i.cache),i.check=function(){if(l){var e=n(t,s,i.cache);return e.changed&&o&&void 0!==i.lookupTable[e.value]&&(i.disable(),Promise.resolve(o({value:e.value,type:s.type,prop:s.prop,traces:s.traces,index:i.lookupTable[e.value]})).then(i.enable,i.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;fe*Math.PI/180},w.render=function(){function t(t){var e=r.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return r.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var r=this,n=r.framework,a=n.select("g.choroplethlayer"),o=n.select("g.scattergeolayer"),i=r.path;n.selectAll("path.basepath").attr("d",i),n.selectAll("path.graticulepath").attr("d",i),a.selectAll("path.choroplethlocation").attr("d",i),a.selectAll("path.basepath").attr("d",i),o.selectAll("path.js-line").attr("d",i),null!==r.clipAngle?(o.selectAll("path.point").style("opacity",e).attr("transform",t),o.selectAll("text").style("opacity",e).attr("transform",t)):(o.selectAll("path.point").attr("transform",t),o.selectAll("text").attr("transform",t))}},{"../../components/color":41,"../../components/drawing":65,"../../components/fx":82,"../../lib/topojson_utils":175,"../cartesian/axes":192,"../plots":233,"./constants":218,"./projections":226,"./set_scale":227,"./zoom":228,"./zoom_reset":229,d3:13,"topojson-client":23}],220:[function(t,e,r){"use strict";var n=t("./geo"),a=t("../../plots/plots");r.name="geo",r.attr="geo",r.idRoot="geo",r.idRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=a.getSubplotIds(e,"geo");void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var i=0;in^h>n&&r<(d-c)*(n-u)/(h-u)+c&&(a=!a)}return a}function i(t){return t?t/Math.sin(t):1}function l(t){return t>1?O:t<-1?-O:Math.asin(t)}function s(t){return t>1?0:t<-1?z:Math.acos(t)}function c(t,e){var r=(2+O)*Math.sin(e);e/=2;for(var n=0,a=1/0;n<10&&Math.abs(a)>C;n++){var o=Math.cos(e);e-=a=(e+Math.sin(e)*(o+2)-r)/(2*o*(1+o))}return[2/Math.sqrt(z*(4+z))*t*(1+Math.cos(e)),2*Math.sqrt(z/(4+z))*Math.sin(e)]}function u(t,e){function r(r,n){var a=R(r/e,n);return a[0]*=t,a}return arguments.length<2&&(e=t),1===e?R:e===1/0?d:(r.invert=function(r,n){var a=R.invert(r/t,n);return a[0]*=e,a},r)}function f(){var t=2,e=N(u),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}function d(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function h(t,e){return[3*t/(2*z)*Math.sqrt(z*z/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(z/4+.4*e))]}function g(t){return function(e){var r,n=t*Math.sin(e),a=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>C&&--a>0);return e/2}}function m(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function v(t,e){var r,n=Math.min(18,36*Math.abs(e)/z),a=Math.floor(n),o=n-a,i=(r=j[a])[0],l=r[1],s=(r=j[++a])[0],c=r[1],u=(r=j[Math.min(19,++a)])[0],f=r[1];return[t*(s+o*(u-i)/2+o*o*(u-2*s+i)/2),(e>0?O:-O)*(c+o*(f-l)/2+o*o*(f-2*c+l)/2)]}function y(t,e){return[t*Math.cos(e),e]}function x(t,e){var r=Math.cos(e),n=i(s(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function b(t,e){var r=x(t,e);return[(r[0]+t/O)/2,(r[1]+e)/2]}t.geo.project=function(t,e){var n=e.stream;if(!n)throw new Error("not yet supported");return(t&&_.hasOwnProperty(t.type)?_[t.type]:r)(t,n)};var _={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},w=[],M=[],k={point:function(t,e){w.push([t,e])},result:function(){var t=w.length?w.length<2?{type:"Point",coordinates:w[0]}:{type:"MultiPoint",coordinates:w}:null;return w=[],t}},A={lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){w.length&&(M.push(w),w=[])},result:function(){var t=M.length?M.length<2?{type:"LineString",coordinates:M[0]}:{type:"MultiLineString",coordinates:M}:null;return M=[],t}},T={polygonStart:n,lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){var t=w.length;if(t){do{w.push(w[0].slice())}while(++t<4);M.push(w),w=[]}},polygonEnd:n,result:function(){if(!M.length)return null;var t=[],e=[];return M.forEach(function(r){a(r)?t.push([r]):e.push(r)}),e.forEach(function(e){var r=e[0];t.some(function(t){if(o(t[0],r))return t.push(e),!0})||t.push([e])}),M=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},L={Point:k,MultiPoint:k,LineString:A,MultiLineString:A,Polygon:T,MultiPolygon:T,Sphere:T},C=1e-6,S=C*C,z=Math.PI,O=z/2,P=(Math.sqrt(z),z/180),D=180/z,E=t.geo.projection,N=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,a=s[+(r<0)],o=0,i=a.length-1;oa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],n*r>n*a[o][0][1]?a[o][0][1]:r)[0],l}function n(){l=s.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],a=e(t[2][0],t[2][1])[0],o=e(t[1][0],t[0][1])[1],i=e(t[1][0],t[1][1])[1];return o>i&&(r=o,o=i,i=r),[[n,o],[a,i]]})})}function a(){for(var e=1e-6,r=[],n=0,a=s[0].length;n=0;--n){var i=s[1][n],l=180*i[0][0]/z,c=180*i[0][1]/z,u=180*i[1][1]/z,f=180*i[2][0]/z,d=180*i[2][1]/z;r.push(o([[f-e,d-e],[f-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}function o(t,e){for(var r,n,a,o=-1,i=t.length,l=t[0],s=[];++oC&&--a>0);return[t/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return E(m)}).raw=m;var j=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];j.forEach(function(t){t[1]*=1.0144}),v.invert=function(t,e){var r=e/O,n=90*r,a=Math.min(18,Math.abs(n/5)),o=Math.max(0,Math.floor(a));do{var i=j[o][1],l=j[o+1][1],s=j[Math.min(19,o+2)][1],c=s-i,u=s-2*l+i,f=2*(Math.abs(r)-l)/c,d=u/c,h=f*(1-d*f*(1-2*d*f));if(h>=0||1===o){n=(e>=0?5:-5)*(h+a);var p,g=50;do{a=Math.min(18,Math.abs(n)/5),o=Math.floor(a),h=a-o,i=j[o][1],l=j[o+1][1],s=j[Math.min(19,o+2)][1],n-=(p=(e>=0?O:-O)*(l+h*(s-i)/2+h*h*(s-2*l+i)/2)-e)*D}while(Math.abs(p)>S&&--g>0);break}}while(--o>=0);var m=j[o][0],v=j[o+1][0],y=j[Math.min(19,o+2)][0];return[t/(v+h*(y-m)/2+h*h*(y-2*v+m)/2),n*P]},(t.geo.robinson=function(){return E(v)}).raw=v,y.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return E(y)}).raw=y,x.invert=function(t,e){if(!(t*t+4*e*e>z*z+C)){var r=t,n=e,a=25;do{var o,i=Math.sin(r),l=Math.sin(r/2),c=Math.cos(r/2),u=Math.sin(n),f=Math.cos(n),d=Math.sin(2*n),h=u*u,p=f*f,g=l*l,m=1-p*c*c,v=m?s(f*c)*Math.sqrt(o=1/m):o=0,y=2*v*f*l-t,x=v*u-e,b=o*(p*g+v*f*c*h),_=o*(.5*i*d-2*v*u*l),w=.25*o*(d*l-v*u*p*i),M=o*(h*c+v*g*f),k=_*w-M*b;if(!k)break;var A=(x*_-y*M)/k,T=(y*w-x*b)/k;r-=A,n-=T}while((Math.abs(A)>C||Math.abs(T)>C)&&--a>0);return[r,n]}},(t.geo.aitoff=function(){return E(x)}).raw=x,b.invert=function(t,e){var r=t,n=e,a=25;do{var o,i=Math.cos(n),l=Math.sin(n),c=Math.sin(2*n),u=l*l,f=i*i,d=Math.sin(r),h=Math.cos(r/2),p=Math.sin(r/2),g=p*p,m=1-f*h*h,v=m?s(i*h)*Math.sqrt(o=1/m):o=0,y=.5*(2*v*i*p+r/O)-t,x=.5*(v*l+n)-e,b=.5*o*(f*g+v*i*h*u)+.5/O,_=o*(d*c/4-v*l*p),w=.125*o*(c*p-v*l*f*d),M=.5*o*(u*h+v*g*i)+.5,k=_*w-M*b,A=(x*_-y*M)/k,T=(y*w-x*b)/k;r-=A,n-=T}while((Math.abs(A)>C||Math.abs(T)>C)&&--a>0);return[r,n]},(t.geo.winkel3=function(){return E(b)}).raw=b}e.exports=n},{}],227:[function(t,e,r){"use strict";function n(t,e){var r=t.projection,n=t.lonaxis,i=t.lataxis,s=t.domain,c=t.framewidth||0,u=e.w*(s.x[1]-s.x[0]),f=e.h*(s.y[1]-s.y[0]),d=n.range[0]+l,h=n.range[1]-l,p=i.range[0]+l,g=i.range[1]-l,m=n._fullRange[0]+l,v=n._fullRange[1]-l,y=i._fullRange[0]+l,x=i._fullRange[1]-l;r._translate0=[e.l+u/2,e.t+f/2];var b=h-d,_=g-p,w=[d+b/2,p+_/2],M=r._rotate;return r._center=[w[0]+M[0],w[1]+M[1]],function(e){function n(t){return Math.min(_*u/(t[1][0]-t[0][0]),_*f/(t[1][1]-t[0][1]))}var i,l,s,b,_=e.scale(),w=r._translate0,M=a(d,p,h,g),k=a(m,y,v,x);s=o(e,M),i=n(s),b=o(e,k),r._fullScale=n(b),e.scale(i),s=o(e,M),l=[w[0]-s[0][0]+c,w[1]-s[0][1]+c],r._translate=l,e.translate(l),s=o(e,M),t._isAlbersUsa||e.clipExtent(s),i=r.scale*i,r._scale=i,t._width=Math.round(s[1][0])+c,t._height=Math.round(s[1][1])+c,t._marginX=(u-Math.round(s[1][0]))/2,t._marginY=(f-Math.round(s[1][1]))/2}}function a(t,e,r,n){var a=(r-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,n],[t+a,n],[t+2*a,n],[t+3*a,n],[r,n],[r,e],[r-a,e],[r-2*a,e],[r-3*a,e],[t,e]]]}}function o(t,e){return i.geo.path().projection(t).bounds(e)}var i=t("d3"),l=t("./constants").clipPad;e.exports=n},{"./constants":218,d3:13}],228:[function(t,e,r){"use strict";function n(t,e){return(e._isScoped?o:e._clipAngle?l:i)(t,e.projection)}function a(t,e){var r=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*r,100*r])}function o(t,e){function r(){_.select(this).style(k)}function n(){var e=Math.max(s,_.event.scale);l.scale(e),i.scale(e).translate(_.event.translate),t.render()}function o(){_.select(this).style(A)}var i=t.projection,l=a(i,e),s=i.scale();return l.on("zoomstart",r).on("zoom",n).on("zoomend",o),l}function i(t,e){function r(t){return m.invert(t)}function n(t){var e=m(r(t));return Math.abs(e[0]-t[0])>x||Math.abs(e[1]-t[1])>x}function o(){_.select(this).style(k),s=_.mouse(this),c=m.rotate(),u=m.translate(),f=c,d=r(s)}function i(){if(h=_.mouse(this),n(s))return v.scale(m.scale()),void v.translate(m.translate());m.scale(Math.max(y,_.event.scale));var e=m.scale()*Math.PI,a=u[0]-e/2,o=e/2,i=Math.min(Math.max(_.event.translate[1],a),o);m.translate([u[0],i]),v.translate([u[0],i]),d?r(h)&&(g=r(h),p=[f[0]+(g[0]-d[0]),c[1],c[2]],m.rotate(p),f=p):(s=h,d=r(s)),t.render()}function l(){_.select(this).style(A)}var s,c,u,f,d,h,p,g,m=t.projection,v=a(m,e),y=m.scale(),x=2;return v.on("zoomstart",o).on("zoom",i).on("zoomend",l),v}function l(t,e){function r(t){v++||t({type:"zoomstart"})}function n(t){t({type:"zoom"})}function o(t){--v||t({type:"zoomend"})}var i,l=t.projection,h={r:l.rotate(),k:l.scale()},p=a(l,e),g=b(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(k);var t=_.mouse(this),e=l.rotate(),a=e,o=l.translate(),v=c(e);i=s(l,t),y.call(p,"zoom",function(){var r=_.mouse(this);if(l.scale(h.k=_.event.scale),i){if(s(l,r)){l.rotate(e).translate(o);var c=s(l,r),p=f(i,c),y=m(u(v,p)),x=h.r=d(y,i,a);isFinite(x[0])&&isFinite(x[1])&&isFinite(x[2])||(x=a),l.rotate(x),a=x}}else t=r,i=s(l,t);n(g.of(this,arguments))}),r(g.of(this,arguments))}).on("zoomend",function(){_.select(this).style(A),y.call(p,"zoom",null),o(g.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,g,"on")}function s(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&v(r)}function c(t){var e=.5*t[0]*w,r=.5*t[1]*w,n=.5*t[2]*w,a=Math.sin(e),o=Math.cos(e),i=Math.sin(r),l=Math.cos(r),s=Math.sin(n),c=Math.cos(n);return[o*l*c+a*i*s,a*l*c-o*i*s,o*i*c+a*l*s,o*l*s-a*i*c]}function u(t,e){var r=t[0],n=t[1],a=t[2],o=t[3],i=e[0],l=e[1],s=e[2],c=e[3];return[r*i-n*l-a*s-o*c,r*l+n*i+a*c-o*s,r*s-n*c+a*i+o*l,r*c+n*s-a*l+o*i]}function f(t,e){if(t&&e){var r=x(t,e),n=Math.sqrt(y(r,r)),a=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),o=Math.sin(a)/n;return n&&[Math.cos(a),r[2]*o,-r[1]*o,r[0]*o]}}function d(t,e,r){var n=g(e,2,t[0]);n=g(n,1,t[1]),n=g(n,0,t[2]-r[2]);var a,o,i=e[0],l=e[1],s=e[2],c=n[0],u=n[1],f=n[2],d=Math.atan2(l,i)*M,p=Math.sqrt(i*i+l*l);Math.abs(u)>p?(o=(u>0?90:-90)-d,a=0):(o=Math.asin(u/p)*M-d,a=Math.sqrt(p*p-u*u));var m=180-o-2*d,v=(Math.atan2(f,c)-Math.atan2(s,a))*M,y=(Math.atan2(f,c)-Math.atan2(s,-a))*M;return h(r[0],r[1],o,v)<=h(r[0],r[1],m,y)?[o,v,r[2]]:[m,y,r[2]]}function h(t,e,r,n){var a=p(r-t),o=p(n-e);return Math.sqrt(a*a+o*o)}function p(t){return(t%360+540)%360-180}function g(t,e,r){var n=r*w,a=t.slice(),o=0===e?1:0,i=2===e?1:2,l=Math.cos(n),s=Math.sin(n);return a[o]=t[o]*l-t[i]*s,a[i]=t[i]*l+t[o]*s,a}function m(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,r=t[1]*w,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function y(t,e){for(var r=0,n=0,a=t.length;n=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),r.attr(o);var i=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),c=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&n(t,i),l.text(i.text()&&c.text()?" - ":"")}},m.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",r=s.select(t).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return n.append("input").attr({type:"text",name:"data"}).node().value=m.graphJson(t,!1,"keepdata"),n.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1},m.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},o=t.layout||{},i=t._fullData||[],l=t._fullData=[],s=t.data||[];if(t._transitionData||m.createTransitionData(t),r._initialAutoSizeIsDone){var c=r.width,f=r.height;m.supplyLayoutGlobalDefaults(o,n),o.width||(n.width=c),o.height||(n.height=f)}else{m.supplyLayoutGlobalDefaults(o,n);var d=!o.width||!o.height,h=n.autosize,p=t._context&&t._context.autosizable;d&&(h||p)?m.plotAutoSize(t,o,n):d&&m.sanitizeMargins(t),!h&&d&&(o.width=n.width,o.height=n.height)}n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._globalTransforms=(t._context||{}).globalTransforms,m.supplyDataDefaults(s,l,o,n),n._has=m._hasPlotType.bind(n);var g=n._modules;for(e=0;e0){var u=i(t._boundingBoxMargins),f=u.left+u.right,d=u.bottom+u.top,p=1-2*l,g=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(p*(g.width-f)),a=Math.round(p*(g.height-d))}else{var v=s?window.getComputedStyle(t):{};n=parseFloat(v.width)||r.width,a=parseFloat(v.height)||r.height}var y=m.layoutAttributes.width.min,x=m.layoutAttributes.height.min;n1,_=!e.height&&Math.abs(r.height-a)>1;(_||b)&&(b&&(r.width=n),_&&(r.height=a)),t._initialAutoSize||(t._initialAutoSize={width:n,height:a}),m.sanitizeMargins(r)},m.supplyLayoutModuleDefaults=function(t,e,r,n){var a,o;u.Axes.supplyLayoutDefaults(t,e,r);var i=e._basePlotModules;for(a=0;a.45*n.width&&(r.l=r.r=0),r.b+r.t>.4*n.height&&(r.b=r.t=0),n._pushmargin[e]={l:{val:r.x,size:r.l+a},r:{val:r.x,size:r.r+a},b:{val:r.y,size:r.b+a},t:{val:r.y,size:r.t+a}}}else delete n._pushmargin[e];n._replotting||m.doAutoMargin(t)}},m.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var r=e._size,n=JSON.stringify(r),a=Math.max(e.margin.l||0,0),o=Math.max(e.margin.r||0,0),i=Math.max(e.margin.t||0,0),l=Math.max(e.margin.b||0,0),s=e._pushmargin;if(!1!==e.margin.autoexpand){s.base={l:{val:0,size:a},r:{val:1,size:o},t:{val:1,size:i},b:{val:0,size:l}};for(var f=Object.keys(s),d=0;dm){var k=(v*w+(M-e.width)*m)/(w-m),A=(M*(1-m)+(v-e.width)*(1-w))/(w-m);k>=0&&A>=0&&k+A>a+o&&(a=k,o=A)}}if(c(x)&&s[_].t){var T=s[_].t.val,L=s[_].t.size;if(T>y){var C=(x*T+(L-e.height)*y)/(T-y),S=(L*(1-y)+(x-e.height)*(1-T))/(T-y);C>=0&&S>=0&&C+S>l+i&&(l=C,i=S)}}}}if(r.l=Math.round(a),r.r=Math.round(o),r.t=Math.round(i),r.b=Math.round(l),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&"{}"!==n&&n!==JSON.stringify(e._size))return u.plot(t)},m.graphJson=function(t,e,r,n,a){function o(t){if("function"==typeof t)return null;if(h.isPlainObject(t)){var e,n,a={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!h.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;a[e]=o(t[e])}return a}return Array.isArray(t)?t.map(o):h.isJSDate(t)?h.ms2DateTimeLocal(+t):t}(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&m.supplyDefaults(t);var i=a?t._fullData:t.data,l=a?t._fullLayout:t.layout,s=(t._transitionData||{})._frames,c={data:(i||[]).map(function(t){var r=o(t);return e&&delete r.fit,r})};return e||(c.layout=o(l)),t.framework&&t.framework.isPolar&&(c=t.framework.getConfig()),s&&(c.frames=o(s)),"object"===n?c:JSON.stringify(c)},m.modifyFrames=function(t,e){var r,n,a,o=t._transitionData._frames,i=t._transitionData._frameHash;for(r=0;r0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){b=!0}),a.redraw&&t._transitionData._interruptCallbacks.push(function(){return u.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var i,l,s=0,c=0,d=t._fullLayout._basePlotModules,p=!1;if(r)for(l=0;l=0,C=L?f.angularAxis.domain:n.extent(M),S=Math.abs(M[1]-M[0]);A&&!k&&(S=0);var z=C.slice();T&&k&&(z[1]+=S);var O=f.angularAxis.ticksCount||4;O>8&&(O=O/(O/8)+O%8),f.angularAxis.ticksStep&&(O=(z[1]-z[0])/O);var P=f.angularAxis.ticksStep||(z[1]-z[0])/(O*(f.minorTicks+1));w&&(P=Math.max(Math.round(P),1)),z[2]||(z[2]=P);var D=n.range.apply(this,z);if(D=D.map(function(t,e){return parseFloat(t.toPrecision(12))}),l=n.scale.linear().domain(z.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=l.domain(),u.layout.angularAxis.endPadding=T?S:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var E=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),N=this.appendChild(this.ownerDocument.importNode(E.documentElement,!0));e=n.select(N)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,I=e.select(".chart-group"),j={fill:"none",stroke:f.tickColor},F={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var B=h.map(function(t,e){var r=i.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});i.Legend().config({data:h.map(function(t,e){return t.name||"Element"+e}),legendConfig:o({},i.Legend.defaultConfig().legendConfig,{container:R,elements:B,reverseOrder:f.legend.reverseOrder})})();var q=R.node().getBBox();x=Math.min(f.width-q.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],a.range([0,x]),u.layout.radialAxis.domain=a.domain(),R.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),I.attr("transform","translate("+_+")").style({cursor:"crosshair"});var H=[(f.width-(f.margin.left+f.margin.right+2*x+(q?q.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(H[0]=Math.max(0,H[0]),H[1]=Math.max(0,H[1]),e.select(".outer-group").attr("transform","translate("+H+")"),f.title){var V=e.select("g.title-group text").style(F).text(f.title),U=V.node().getBBox();V.attr({x:_[0]-U.width/2,y:_[1]-x-20})}var G=e.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var Y=G.selectAll("circle.grid-circle").data(a.ticks(5));Y.enter().append("circle").attr({class:"grid-circle"}).style(j),Y.attr("r",a),Y.exit().remove()}G.select("circle.outside-circle").attr({r:x}).style(j);var X=e.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});if(f.radialAxis.visible){var Z=n.svg.axis().scale(a).ticks(5).tickSize(5);G.call(Z).attr({transform:"rotate("+f.radialAxis.orientation+")"}),G.selectAll(".domain").style(j),G.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(F).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){ -return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,F["font-size"]]+")":"translate("+[0,F["font-size"]]+")"}}),G.selectAll("g>line").style({stroke:"black"})}var W=e.select(".angular.axis-group").selectAll("g.angular-tick").data(D),$=W.enter().append("g").classed("angular-tick",!0);W.attr({transform:function(t,e){return"rotate("+s(t,e)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),W.exit().remove(),$.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(j),$.selectAll(".minor").style({stroke:f.minorTickColor}),W.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),$.append("text").classed("axis-text",!0).style(F);var Q=W.select("text.axis-text").attr({x:x+f.labelOffset,dy:".35em",transform:function(t,e){var r=s(t,e),n=x+f.labelOffset,a=f.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-r+" "+n+" 0)":"radial"==a?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":w?w[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(F);f.angularAxis.rewriteTicks&&Q.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var J=n.max(I.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));R.attr({transform:"translate("+[x+J,f.margin.top]+")"});var K=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(h);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),h[0]||K){var et=[];h.forEach(function(t,e){var r={};r.radialScale=a,r.angularScale=l,r.container=tt.filter(function(t,r){return r==e}),r.geometry=t.geometry,r.orientation=f.orientation,r.direction=f.direction,r.index=e,et.push({data:t,geometryConfig:r})});var rt=n.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return o(i[r].defaultConfig(),t)});i[r]().config(n)()})}var at,ot,it=e.select(".guides-group"),lt=e.select(".tooltips-group"),st=i.tooltipPanel().config({container:lt,fontSize:8})(),ct=i.tooltipPanel().config({container:lt,fontSize:8})(),ut=i.tooltipPanel().config({container:lt,hasTick:!0})();if(!k){var ft=it.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});I.on("mousemove.angular-guide",function(t,e){var r=i.util.getMousePos(X).angle;ft.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-f.orientation)%360;at=l.invert(n);var a=i.util.convertToCartesian(x+12,r+180);st.text(i.util.round(at)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){it.select("line").style({opacity:0})})}var dt=it.select("circle").style({stroke:"grey",fill:"none"});I.on("mousemove.radial-guide",function(t,e){var r=i.util.getMousePos(X).radius;dt.attr({r:r}).style({opacity:.5}),ot=a.invert(i.util.getMousePos(X).radius);var n=i.util.convertToCartesian(r,f.radialAxis.orientation);ct.text(i.util.round(ot)).move([n[0]+_[0],n[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){dt.style({opacity:0}),ut.hide(),st.hide(),ct.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,r){var a=n.select(this),o=a.style("fill"),l="black",s=a.style("opacity")||1;if(a.attr({"data-opacity":s}),"none"!=o){a.attr({"data-fill":o}),l=n.hsl(o).darker().toString(),a.style({fill:l,opacity:1});var c={t:i.util.round(t[0]),r:i.util.round(t[1])};k&&(c.t=w[t[0]]);var u="t: "+c.t+", r: "+c.r,f=this.getBoundingClientRect(),d=e.node().getBoundingClientRect(),h=[f.left+f.width/2-H[0]-d.left,f.top+f.height/2-H[1]-d.top];ut.config({color:l}).text(u),ut.move(h)}else o=a.style("stroke"),a.attr({"data-stroke":o}),l=n.hsl(o).darker().toString(),a.style({stroke:l,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()}).on("mouseout.tooltip",function(t,e){ut.hide();var r=n.select(this),a=r.attr("data-fill");a?r.style({fill:a,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})}),d}var e,r,a,l,s={data:[],layout:{}},c={},u={},f=n.dispatch("hover"),d={};return d.render=function(e){return t(e),this},d.config=function(t){if(!arguments.length)return s;var e=i.util.cloneJson(t);return e.data.forEach(function(t,e){s.data[e]||(s.data[e]={}),o(s.data[e],i.Axis.defaultConfig().data[0]),o(s.data[e],t)}),o(s.layout,i.Axis.defaultConfig().layout),o(s.layout,e.layout),this},d.getLiveConfig=function(){return u},d.getinputConfig=function(){return c},d.radialScale=function(t){return a},d.angularScale=function(t){return l},d.svg=function(){return e},n.rebind(d,f,"on"),d},i.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},i.util={},i.DATAEXTENT="dataExtent",i.AREA="AreaChart",i.LINE="LinePlot",i.DOT="DotPlot",i.BAR="BarChart",i.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},i.util._extend=function(t,e){for(var r in t)e[r]=t[r]},i.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},i.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},i.util.dataFromEquation=function(t,e,r){var a=e||6,o=[],i=[];n.range(0,360+a,a).forEach(function(e,r){var n=e*Math.PI/180,a=t(n);o.push(e),i.push(a)});var l={t:o,r:i};return r&&(l.name=r),l},i.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},i.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=i.util.ensureArray(t[e],r)}),t},i.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},i.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},i.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},i.util.arrayLast=function(t){return t[t.length-1]},i.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},i.util.flattenArray=function(t){for(var e=[];!i.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},i.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},i.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},i.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},i.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],a=e[1],o={};return o.x=r,o.y=a,o.pos=e,o.angle=180*(Math.atan2(a,r)+Math.PI)/Math.PI,o.radius=Math.sqrt(r*r+a*a),o},i.util.duplicatesCount=function(t){for(var e,r={},n={},a=0,o=t.length;a0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:d(i),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return m.fill(r,a,o)},"fill-opacity":0,stroke:function(t,e){return m.stroke(r,a,o)},"stroke-width":function(t,e){return m["stroke-width"](r,a,o)},"stroke-dasharray":function(t,e){return m["stroke-dasharray"](r,a,o)},opacity:function(t,e){return m.opacity(r,a,o)},display:function(t,e){return m.display(r,a,o)}})}};var h=t.angularScale.range(),p=Math.abs(h[1]-h[0])/s[0].length*Math.PI/180,g=n.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(u+(e[2]||0))}).outerRadius(function(e){return t.radialScale(u+(e[2]||0))+t.radialScale(e[1])});f.arc=function(e,r,a){n.select(this).attr({class:"mark arc",d:g,transform:function(e,r){return"rotate("+(t.orientation+c(e[0])+90)+")"}})};var m={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,r,n){return a[e[n].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},v=n.select(this).selectAll("g.layer").data(s);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(m).each(f[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e=[i.PolyChart.defaultConfig()],r=n.dispatch("hover"),a={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,r){e[r]||(e[r]={}),o(e[r],i.PolyChart.defaultConfig()),o(e[r],t)}),this):e},t.getColorScale=function(){},n.rebind(t,r,"on"),t},i.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},i.BarChart=function(){return i.PolyChart()},i.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},i.AreaChart=function(){return i.PolyChart()},i.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},i.DotPlot=function(){return i.PolyChart()},i.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},i.LinePlot=function(){return i.PolyChart()},i.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},i.Legend=function(){function t(){var r=e.legendConfig,a=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var a=o({},r.elements[e]);return a.name=t,a.color=[].concat(r.elements[e].color)[n],a})}),i=n.merge(a);i=i.filter(function(t,e){return r.elements[e]&&(r.elements[e].visibleInLegend||void 0===r.elements[e].visibleInLegend)}),r.reverseOrder&&(i=i.reverse());var l=r.container;("string"==typeof l||l.nodeName)&&(l=n.select(l));var s=i.map(function(t,e){return t.color}),c=r.fontSize,u=null==r.isContinuous?"number"==typeof i[0]:r.isContinuous,f=u?r.height:c*i.length,d=l.classed("legend-group",!0),h=d.selectAll("svg").data([0]),p=h.enter().append("svg").attr({width:300,height:f+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var g=n.range(i.length),m=n.scale[u?"linear":"ordinal"]().domain(g).range(s),v=n.scale[u?"linear":"ordinal"]().domain(g)[u?"range":"rangePoints"]([0,f]),y=function(t,e){var r=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(t)?n.svg.symbol().type(t).size(r)():n.svg.symbol().type("square").size(r)()};if(u){var x=h.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(s);x.enter().append("stop"),x.attr({offset:function(t,e){return e/(s.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),h.append("rect").classed("legend-mark",!0).attr({height:r.height,width:r.colorBandWidth,fill:"url(#grad1)"})}else{var b=h.select(".legend-marks").selectAll("path.legend-mark").data(i);b.enter().append("path").classed("legend-mark",!0),b.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var r=t.symbol;return y(r,c)},fill:function(t,e){return m(e)}}),b.exit().remove()}var _=n.svg.axis().scale(v).orient("right"),w=h.select("g.legend-axis").attr({transform:"translate("+[u?r.colorBandWidth:c,c/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:u?r.textColor:"none"}),w.selectAll("text").style({fill:r.textColor,"font-size":r.fontSize}).text(function(t,e){return i[e].name}),t}var e=i.Legend.defaultConfig(),r=n.dispatch("hover");return t.config=function(t){return arguments.length?(o(e,t),this):e},n.rebind(t,r,"on"),t},i.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},i.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},l="tooltip-"+i.tooltipPanel.uid++,s=function(){t=a.container.selectAll("g."+l).data([0]);var n=t.enter().append("g").classed(l,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:a.padding+10,dy:.3*+a.fontSize}),s};return s.text=function(o){var i=n.hsl(a.color).l,l=i>=.5?"#aaa":"white",c=i>=.5?"black":"white",u=o||"";e.style({fill:c,"font-size":a.fontSize+"px"}).text(u);var f=a.padding,d=e.node().getBBox(),h={fill:a.color,stroke:l,"stroke-width":"2px"},p=d.width+2*f+10,g=d.height+2*f;return r.attr({d:"M"+[[10,-g/2],[10,-g/4],[a.hasTick?0:10,0],[10,g/4],[10,g/2],[p,g/2],[p,-g/2]].join("L")+"Z"}).style(h),t.attr({transform:"translate("+[10,-g/2+2*f]+")"}),t.style({display:"block"}),s},s.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),s},s.hide=function(){if(t)return t.style({display:"none"}),s},s.show=function(){if(t)return t.style({display:"block"}),s},s.config=function(t){return o(a,t),s},s},i.tooltipPanel.uid=1,i.adapter={},i.adapter.plotly=function(){var t={};return t.convert=function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=o({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){i.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var a=i.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var l=o({},t.layout);if([[l,["plot_bgcolor"],["backgroundColor"]],[l,["showlegend"],["showLegend"]],[l,["radialaxis"],["radialAxis"]],[l,["angularaxis"],["angularAxis"]],[l.angularaxis,["showline"],["gridLinesVisible"]],[l.angularaxis,["showticklabels"],["labelsVisible"]],[l.angularaxis,["nticks"],["ticksCount"]],[l.angularaxis,["tickorientation"],["tickOrientation"]],[l.angularaxis,["ticksuffix"],["ticksSuffix"]],[l.angularaxis,["range"],["domain"]],[l.angularaxis,["endpadding"],["endPadding"]],[l.radialaxis,["showline"],["gridLinesVisible"]],[l.radialaxis,["tickorientation"],["tickOrientation"]],[l.radialaxis,["ticksuffix"],["ticksSuffix"]],[l.radialaxis,["range"],["domain"]],[l.angularAxis,["showline"],["gridLinesVisible"]],[l.angularAxis,["showticklabels"],["labelsVisible"]],[l.angularAxis,["nticks"],["ticksCount"]],[l.angularAxis,["tickorientation"],["tickOrientation"]],[l.angularAxis,["ticksuffix"],["ticksSuffix"]],[l.angularAxis,["range"],["domain"]],[l.angularAxis,["endpadding"],["endPadding"]],[l.radialAxis,["showline"],["gridLinesVisible"]],[l.radialAxis,["tickorientation"],["tickOrientation"]],[l.radialAxis,["ticksuffix"],["ticksSuffix"]],[l.radialAxis,["range"],["domain"]],[l.font,["outlinecolor"],["outlineColor"]],[l.legend,["traceorder"],["reverseOrder"]],[l,["labeloffset"],["labelOffset"]],[l,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){i.util.translator.apply(null,t.concat(e))}),e?(void 0!==l.tickLength&&(l.angularaxis.ticklen=l.tickLength,delete l.tickLength),l.tickColor&&(l.angularaxis.tickcolor=l.tickColor,delete l.tickColor)):(l.angularAxis&&void 0!==l.angularAxis.ticklen&&(l.tickLength=l.angularAxis.ticklen),l.angularAxis&&void 0!==l.angularAxis.tickcolor&&(l.tickColor=l.angularAxis.tickcolor)),l.legend&&"boolean"!=typeof l.legend.reverseOrder&&(l.legend.reverseOrder="normal"!=l.legend.reverseOrder),l.legend&&"boolean"==typeof l.legend.traceorder&&(l.legend.traceorder=l.legend.traceorder?"reversed":"normal",delete l.legend.reverseOrder),l.margin&&void 0!==l.margin.t){var s=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};n.entries(l.margin).forEach(function(t,e){u[c[s.indexOf(t.key)]]=t.value}),l.margin=u}e&&(delete l.needsEndSpacing,delete l.minorTickColor,delete l.minorTicks,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksStep,delete l.angularaxis.rewriteTicks,delete l.angularaxis.nticks,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksStep,delete l.radialaxis.rewriteTicks,delete l.radialaxis.nticks),r.layout=l}return r},t}},{"../../lib":156,d3:13}],238:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),o=t("../../components/color"),i=t("./micropolar"),l=t("./undo_manager"),s=a.extendDeepAll,c=e.exports={};c.framework=function(t){function e(e,a){return a&&(f=a),n.select(n.select(f).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),r=r?s(r,e):e,o||(o=i.Axis()),u=i.adapter.plotly().convert(r),o.config(u).render(f),t.data=r.data,t.layout=r.layout,c.fillLayout(t),r}var r,a,o,u,f,d=new l;return e.isPolar=!0,e.svg=function(){return o.svg()},e.getConfig=function(){return r},e.getLiveConfig=function(){return i.adapter.plotly().convert(o.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:o.angularScale(),r:o.radialScale()}},e.setUndoPoint=function(){var t=this,e=i.util.cloneJson(r);!function(e,r){d.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,a),a=i.util.cloneJson(e)},e.undo=function(){d.undo()},e.redo=function(){d.redo()},e},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),i={width:800,height:600,paper_bgcolor:o.background,_container:e,_paperdiv:r,_paper:a};t._fullLayout=s(i,t.layout)}},{"../../components/color":41,"../../lib":156,"./micropolar":237,"./undo_manager":239,d3:13}],239:[function(t,e,r){"use strict";e.exports=function(){function t(t,e){return t?(a=!0,t[e](),a=!1,this):this}var e,r=[],n=-1,a=!1;return{add:function(t){return a?this:(r.splice(n+1,r.length-n),r.push(t),n=r.length-1,this)},setCallback:function(t){e=t},undo:function(){var a=r[n];return a?(t(a,"undo"),n-=1,e&&e(a.undo),this):this},redo:function(){var a=r[n+1];return a?(t(a,"redo"),n+=1,e&&e(a.redo),this):this},clear:function(){r=[],n=-1},hasUndo:function(){return-1!==n},hasRedo:function(){return n-1}var o=t("../lib"),i=t("../plots/plots"),l=o.extendFlat,s=o.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,o=t.data,c=t.layout,u=s([],o),f=s({},c,n(e.tileClass)),d=t._context||{};if(e.width&&(f.width=e.width),e.height&&(f.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){f.annotations=[];var h=Object.keys(f);for(r=0;r")?"":e.html(t).text()});return e.remove(),r}function a(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}var o=t("d3"),i=t("../components/drawing"),l=t("../components/color"),s=t("../constants/xmlns_namespaces"),c=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");e.exports=function(t,e){var r,u=t._fullLayout,f=u._paper,d=u._toppaper;f.insert("rect",":first-child").call(i.setRect,0,0,u.width,u.height).call(l.fill,u.paper_bgcolor);var h=u._basePlotModules||[];for(r=0;r0&&A>0,F=M<=R&&A<=I,B=M<=I&&A<=R,q="h"===v?R>=M*(I/A):I>=A*(R/M);j&&(F||B||q)?x="inside":(x="outside",b.remove(),b=null)}else x="inside";if(!b&&(b=g(e,y,"outside"===x?C:L),_=k.bBox(b.node()),M=_.width,A=_.height,M<=0||A<=0))return void b.remove();var H;H="outside"===x?o(i,d,h,p,_,v):a(i,d,h,p,_,v),b.attr("transform",H)}}}function a(t,e,r,n,a,o){var l,s,c,u,f,d=a.width,h=a.height,p=(a.left+a.right)/2,g=(a.top+a.bottom)/2,m=Math.abs(e-t),v=Math.abs(n-r);m>2*P&&v>2*P?(f=P,m-=2*f,v-=2*f):f=0;var y,x;return d<=m&&h<=v?(y=!1,x=1):d<=v&&h<=m?(y=!0,x=1):dr?(c=(t+e)/2,u=n-f-s/2):(c=(t+e)/2,u=n+f+s/2),i(p,g,c,u,x,y)}function o(t,e,r,n,a,o){var l,s="h"===o?Math.abs(n-r):Math.abs(e-t);s>2*P&&(l=P,s-=2*l);var c,u,f,d,h="h"===o?Math.min(1,s/a.height):Math.min(1,s/a.width),p=(a.left+a.right)/2,g=(a.top+a.bottom)/2;return c=h*a.width,u=h*a.height,"h"===o?er?(f=(t+e)/2,d=n+l+u/2):(f=(t+e)/2,d=n-l-u/2),i(p,g,f,d,h,!1)}function i(t,e,r,n,a,o){var i,l;return a<1?i="scale("+a+") ":(a=1,i=""),l=o?"rotate("+o+" "+t+" "+e+") ":"","translate("+(r-a*t)+" "+(n-a*e)+")"+i+l}function l(t,e){var r=h(t.text,e);return p(L,r)}function s(t,e){var r=h(t.textposition,e);return g(C,r)}function c(t,e,r){return d(S,t.textfont,e,r)}function u(t,e,r){return d(z,t.insidetextfont,e,r)}function f(t,e,r){return d(O,t.outsidetextfont,e,r)}function d(t,e,r,n){e=e||{};var a=h(e.family,r),o=h(e.size,r),i=h(e.color,r);return{family:p(t.family,a,n.family),size:m(t.size,o,n.size),color:v(t.color,i,n.color)}}function h(t,e){var r;return Array.isArray(t)?ea))return e}return void 0!==r?r:t.dflt}function v(t,e,r){return b(e).isValid()?e:void 0!==r?r:t.dflt}var y=t("d3"),x=t("fast-isnumeric"),b=t("tinycolor2"),_=t("../../lib"),w=t("../../lib/svg_text_utils"),M=t("../../components/color"),k=t("../../components/drawing"),A=t("../../components/errorbars"),T=t("./attributes"),L=T.text,C=T.textposition,S=T.textfont,z=T.insidetextfont,O=T.outsidetextfont,P=3;e.exports=function(t,e,r){var a=e.xaxis,o=e.yaxis,i=t._fullLayout,l=e.plot.select(".barlayer").selectAll("g.trace.bars").data(r);l.enter().append("g").attr("class","trace bars"),l.append("g").attr("class","points").each(function(e){var r=e[0].t,l=e[0].trace,s=r.poffset,c=Array.isArray(s);y.select(this).selectAll("g.point").data(_.identity).enter().append("g").classed("point",!0).each(function(r,u){function f(t){return 0===i.bargap&&0===i.bargroupgap?y.round(Math.round(t)-A,2):t}function d(t,e){return Math.abs(t-e)>=2?f(t):t>e?Math.ceil(t):Math.floor(t)}var h,p,g,m,v=r.p+(c?s[u]:s),b=v+r.w,_=r.b,w=_+r.s;if("h"===l.orientation?(g=o.c2p(v,!0),m=o.c2p(b,!0),h=a.c2p(_,!0),p=a.c2p(w,!0)):(h=a.c2p(v,!0),p=a.c2p(b,!0),g=o.c2p(_,!0),m=o.c2p(w,!0)),!(x(h)&&x(p)&&x(g)&&x(m)&&h!==p&&g!==m))return void y.select(this).remove();var k=(r.mlw+1||l.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,A=y.round(k/2%1,2);if(!t._context.staticPlot){var T=M.opacity(r.mc||l.marker.color),L=T<1||k>.01?f:d;h=L(h,p),p=L(p,h),g=L(g,m),m=L(m,g)}var C=y.select(this);C.append("path").attr("d","M"+h+","+g+"V"+m+"H"+p+"V"+g+"Z"),n(t,C,e,u,h,p,g,m)})}),l.call(A.plot,e)}},{"../../components/color":41,"../../components/drawing":65,"../../components/errorbars":71,"../../lib":156,"../../lib/svg_text_utils":173,"./attributes":251,d3:13,"fast-isnumeric":16,tinycolor2:22}],259:[function(t,e,r){"use strict";function n(t,e,r,n){if(n.length){var l,s,c,u,f,d=t._fullLayout.barmode,h="overlay"===d,p="group"===d;if(h)a(t,e,r,n);else if(p){for(l=[],s=[],c=0;cc+l||!y(s))&&(f=!0,d(u,t))}for(var a=r.traces,o=v(e),i="fraction"===t._fullLayout.barnorm?1:100,l=i/1e9,s=e.l2c(e.c2l(0)),c="stack"===t._fullLayout.barmode?i:s,u=[s,c],f=!1,h=0;h1||0===l.bargap&&0===l.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(t){var e=t[0].trace,r=e.marker,i=r.line,l=o.tryColorscale(r,""),s=o.tryColorscale(r,"line");n.select(this).selectAll("path").each(function(t){var e,o,c=(t.mlw+1||i.width+1)-1,u=n.select(this);e="mc"in t?t.mcc=l(t.mc):Array.isArray(r.color)?a.defaultLine:r.color,u.style("stroke-width",c+"px").call(a.fill,e),c&&(o="mlc"in t?t.mlcc=s(t.mlc):Array.isArray(i.color)?a.defaultLine:i.color,u.call(a.stroke,o))})}),e.call(i.style)}},{"../../components/color":41,"../../components/drawing":65,"../../components/errorbars":71,d3:13}],262:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/has_colorscale"),o=t("../../components/colorscale/defaults");e.exports=function(t,e,r,i,l){r("marker.color",i),a(t,"marker")&&o(t,e,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(t,"marker.line")&&o(t,e,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width")}},{"../../components/color":41,"../../components/colorscale/defaults":50,"../../components/colorscale/has_colorscale":54}],263:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../components/color/attributes"),o=t("../../lib/extend").extendFlat,i=n.marker,l=i.line;e.exports={y:{valType:"data_array"},x:{valType:"data_array"},x0:{valType:"any"},y0:{valType:"any"},xcalendar:n.xcalendar,ycalendar:n.ycalendar,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1},jitter:{valType:"number",min:0,max:1},pointpos:{valType:"number",min:-2,max:2},orientation:{valType:"enumerated",values:["v","h"]},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)"},symbol:o({},i.symbol,{arrayOk:!1}),opacity:o({},i.opacity,{arrayOk:!1,dflt:1}),size:o({},i.size,{arrayOk:!1}),color:o({},i.color,{arrayOk:!1}),line:{color:o({},l.color,{arrayOk:!1,dflt:a.defaultLine}),width:o({},l.width,{arrayOk:!1,dflt:0}),outliercolor:{valType:"color"},outlierwidth:{valType:"number",min:0,dflt:1}}},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2}},fillcolor:n.fillcolor}},{"../../components/color/attributes":40,"../../lib/extend":150,"../scatter/attributes":304}],264:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/cartesian/axes");e.exports=function(t,e){var r,i,l,s,c,u,f,d,h,p=o.getFromId(t,e.xaxis||"x"),g=o.getFromId(t,e.yaxis||"y"),m=e.orientation,v=[];"h"===m?(r=p,i="x",c=g,u="y"):(r=g,i="y",c=p,u="x"),l=r.makeCalcdata(e,i),o.expand(r,l,{padded:!0}),f=function(t,e,r,o,i){var l;return r in e?f=o.makeCalcdata(e,r):(l=r+"0"in e?e[r+"0"]:"name"in e&&("category"===o.type||n(e.name)&&-1!==["linear","log"].indexOf(o.type)||a.isDateTime(e.name)&&"date"===o.type)?e.name:t.numboxes,l=o.d2c(l,0,e[r+"calendar"]),f=i.map(function(){return l})),f}(t,e,u,c,l);var y=a.distinctVals(f);return d=y.vals,h=y.minDiff/2,s=function(t,e,r,o,i){var l,s,c,u,f=o.length,d=e.length,h=[],p=[];for(l=0;l=0&&c1,g=r.dPos*(1-u.boxgap)*(1-u.boxgroupgap)/(p?t.numboxes:1),m=p?2*r.dPos*((r.boxnum+.5)/t.numboxes-.5)*(1-u.boxgap):0,v=g*h.whiskerwidth;if(!0!==h.visible||r.emptybox)return void o.select(this).remove();"h"===h.orientation?(s=d,c=f):(s=f,c=d),r.bPos=m,r.bdPos=g,n(),o.select(this).selectAll("path.box").data(i.identity).enter().append("path").attr("class","box").each(function(t){var e=s.c2p(t.pos+m,!0),r=s.c2p(t.pos+m-g,!0),n=s.c2p(t.pos+m+g,!0),a=s.c2p(t.pos+m-v,!0),l=s.c2p(t.pos+m+v,!0),u=c.c2p(t.q1,!0),f=c.c2p(t.q3,!0),d=i.constrain(c.c2p(t.med,!0),Math.min(u,f)+1,Math.max(u,f)-1),p=c.c2p(!1===h.boxpoints?t.min:t.lf,!0),y=c.c2p(!1===h.boxpoints?t.max:t.uf,!0);"h"===h.orientation?o.select(this).attr("d","M"+d+","+r+"V"+n+"M"+u+","+r+"V"+n+"H"+f+"V"+r+"ZM"+u+","+e+"H"+p+"M"+f+","+e+"H"+y+(0===h.whiskerwidth?"":"M"+p+","+a+"V"+l+"M"+y+","+a+"V"+l)):o.select(this).attr("d","M"+r+","+d+"H"+n+"M"+r+","+u+"H"+n+"V"+f+"H"+r+"ZM"+e+","+u+"V"+p+"M"+e+","+f+"V"+y+(0===h.whiskerwidth?"":"M"+a+","+p+"H"+l+"M"+a+","+y+"H"+l))}),h.boxpoints&&o.select(this).selectAll("g.points").data(function(t){return t.forEach(function(t){t.t=r,t.trace=h}),t}).enter().append("g").attr("class","points").selectAll("path").data(function(t){var e,r,n,o,l,s,c,u="all"===h.boxpoints?t.val:t.val.filter(function(e){return et.uf}),f=Math.max((t.max-t.min)/10,t.q3-t.q1),d=1e-9*f,p=.01*f,v=[],y=0;if(h.jitter){if(0===f)for(y=1,v=new Array(u.length),e=0;et.lo&&(n.so=!0),n})}).enter().append("path").call(l.translatePoints,f,d),h.boxmean&&o.select(this).selectAll("path.mean").data(i.identity).enter().append("path").attr("class","mean").style("fill","none").each(function(t){var e=s.c2p(t.pos+m,!0),r=s.c2p(t.pos+m-g,!0),n=s.c2p(t.pos+m+g,!0),a=c.c2p(t.mean,!0),i=c.c2p(t.mean-t.sd,!0),l=c.c2p(t.mean+t.sd,!0);"h"===h.orientation?o.select(this).attr("d","M"+a+","+r+"V"+n+("sd"!==h.boxmean?"":"m0,0L"+i+","+e+"L"+a+","+r+"L"+l+","+e+"Z")):o.select(this).attr("d","M"+r+","+a+"H"+n+("sd"!==h.boxmean?"":"m0,0L"+e+","+i+"L"+r+","+a+"L"+e+","+l+"Z"))})})}},{"../../components/drawing":65,"../../lib":156,d3:13}],271:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../plots/cartesian/axes"),o=t("../../lib");e.exports=function(t,e){var r,i,l,s,c=t._fullLayout,u=e.xaxis,f=e.yaxis,d=["v","h"];for(i=0;is&&(e.z=u.slice(0,s)),l("locationmode"),l("text"),l("marker.line.color"),l("marker.line.width"),a(t,e,i,l,{prefix:"",cLetter:"z"})}},{"../../components/colorscale/defaults":50,"../../lib":156,"./attributes":277}],280:[function(t,e,r){"use strict";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],281:[function(t,e,r){"use strict";function n(t,e,r,n){var i=e.hoverinfo,l="all"===i?o.hoverinfo.flags:i.split("+"),s=-1!==l.indexOf("name"),c=-1!==l.indexOf("location"),u=-1!==l.indexOf("z"),f=-1!==l.indexOf("text"),d=!s&&c,h=[];d?t.nameOverride=r.id:(s&&(t.nameOverride=e.name),c&&h.push(r.id)),u&&h.push(function(t){return a.tickText(n,n.c2l(t),"hover").text}(r.z)),f&&h.push(r.tx),t.extraText=h.join("
")}var a=t("../../plots/cartesian/axes"),o=t("./attributes");e.exports=function(t){var e=t.cd,r=e[0].trace,a=t.subplot,o=a.choroplethHoverPt;if(o){var i=a.projection(o.properties.ct);return t.x0=t.x1=i[0],t.y0=t.y1=i[1],t.index=o.index,t.location=o.id,t.z=o.z,n(t,r,o,a.mockAxis),[t]}}},{"../../plots/cartesian/axes":192,"./attributes":277}],282:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../heatmap/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="choropleth",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","noOpacity"],n.meta={},e.exports=n},{"../../plots/geo":220,"../heatmap/colorbar":284,"./attributes":277,"./calc":278,"./defaults":279,"./event_data":280,"./hover":281,"./plot":283}],283:[function(t,e,r){"use strict";function n(t,e){for(var r,n=[],a=t.locations,o=a.length,i=c(t,e),l=(t.marker||{}).line||{},s=0;s0&&(n[0].trace=t),n}function a(t){t.framework.selectAll("g.trace.choropleth").each(function(t){var e=t[0].trace,r=o.select(this),n=e.marker||{},a=n.line||{},c=s.makeColorScaleFunc(s.extractScale(e.colorscale,e.zmin,e.zmax));r.selectAll("path.choroplethlocation").each(function(t){o.select(this).attr("fill",function(t){return c(t.z)}).call(i.stroke,t.mlc||a.color).call(l.dashLine,"",t.mlw||a.width||0)})})}var o=t("d3"),i=t("../../components/color"),l=t("../../components/drawing"),s=t("../../components/colorscale"),c=t("../../lib/topojson_utils").getTopojsonFeatures,u=t("../../lib/geo_location_utils").locationToFeature,f=t("../../lib/array_to_calc_item"),d=t("../../plots/geo/constants");e.exports=function(t,e,r){function i(t){return t[0].trace.uid}var l,s=t.framework,c=s.select("g.choroplethlayer"),u=s.select("g.baselayer"),f=s.select("g.baselayeroverchoropleth"),h=d.baseLayersOverChoropleth,p=c.selectAll("g.trace.choropleth").data(e,i);p.enter().append("g").attr("class","trace choropleth"),p.exit().remove(),p.each(function(e){var r=e[0].trace,a=n(r,t.topojson),i=o.select(this).selectAll("path.choroplethlocation").data(a);i.enter().append("path").classed("choroplethlocation",!0).on("mouseover",function(e){t.choroplethHoverPt=e}).on("mouseout",function(){t.choroplethHoverPt=null}),i.exit().remove()}),f.selectAll("*").remove();for(var g=0;gi?o=!0:e1)){var f=l.simpleMap(u.x,e.d2c,0,r.xcalendar),d=l.distinctVals(f).minDiff;o=Math.min(o,d)}}for(o===1/0&&(o=1),c=0;c");w.push(i,i,i,i,i,i,null)}(z,p[z],g[z],m[z],v[z]));e.x=b,e.y=_,e.text=w}},{"../../lib":156,"../../plots/cartesian/axes":192,"../../plots/cartesian/axis_ids":195,"./helpers":288,"fast-isnumeric":16}],292:[function(t,e,r){"use strict";var n=t("../../components/color/attributes"),a=t("../../plots/font_attributes"),o=t("../../plots/attributes"),i=t("../../lib/extend").extendFlat;e.exports={labels:{valType:"data_array"},label0:{valType:"number",dflt:0},dlabel:{valType:"number",dflt:1},values:{valType:"data_array"},marker:{colors:{valType:"data_array"},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}}},text:{valType:"data_array"},hovertext:{valType:"string",dflt:"",arrayOk:!0},scalegroup:{valType:"string",dflt:""},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"]},hoverinfo:i({},o.hoverinfo,{flags:["label","text","value","percent","name"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0},textfont:i({},a,{}),insidetextfont:i({},a,{}),outsidetextfont:i({},a,{}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},hole:{valType:"number",min:0,max:1,dflt:0},sort:{valType:"boolean",dflt:!0},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise"},rotation:{valType:"number",min:-360,max:360,dflt:0},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0}}},{"../../components/color/attributes":40,"../../lib/extend":150,"../../plots/attributes":190,"../../plots/font_attributes":216}],293:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n")}return g};var s},{"../../components/color":41,"./helpers":296,"fast-isnumeric":16,tinycolor2:22}],295:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes");e.exports=function(t,e,r,o){function i(r,o){return n.coerce(t,e,a,r,o)}var l=n.coerceFont,s=i("values");if(!Array.isArray(s)||!s.length)return void(e.visible=!1);var c=i("labels");Array.isArray(c)||(i("label0"),i("dlabel")),i("marker.line.width")&&i("marker.line.color");var u=i("marker.colors");Array.isArray(u)||(e.marker.colors=[]),i("scalegroup");var f=i("text"),d=i("textinfo",Array.isArray(f)?"text+percent":"percent");if(i("hovertext"),d&&"none"!==d){var h=i("textposition"),p=Array.isArray(h)||"auto"===h,g=p||"inside"===h,m=p||"outside"===h;if(g||m){var v=l(i,"textfont",o.font);g&&l(i,"insidetextfont",v),m&&l(i,"outsidetextfont",v)}}i("domain.x"),i("domain.y"),i("hole"),i("sort"),i("direction"),i("rotation"),i("pull")}},{"../../lib":156,"./attributes":292}],296:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)}},{"../../lib":156}],297:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("./layout_defaults"),n.layoutAttributes=t("./layout_attributes"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.styleOne=t("./style_one"),n.moduleType="trace",n.name="pie",n.basePlotModule=t("./base_plot"),n.categories=["pie","showLegend"],n.meta={},e.exports=n},{"./attributes":292,"./base_plot":293,"./calc":294,"./defaults":295,"./layout_attributes":298,"./layout_defaults":299,"./plot":300,"./style":301,"./style_one":302}],298:[function(t,e,r){"use strict";e.exports={hiddenlabels:{valType:"data_array"}}},{}],299:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){!function(r,o){n.coerce(t,e,a,r,o)}("hiddenlabels")}},{"../../lib":156,"./layout_attributes":298}],300:[function(t,e,r){"use strict";function n(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),o=t.width/t.height,i=Math.PI*Math.min(e.v/r.vTotal,.5),l=1-r.trace.hole,s=a(e,r),c={scale:s*r.r*2/n,rCenter:1-s,rotate:0};if(c.scale>=1)return c;var u=o+1/(2*Math.tan(i)),f=r.r*Math.min(1/(Math.sqrt(u*u+.5)+u),l/(Math.sqrt(o*o+l/2)+o)),d={scale:2*f/t.height,rCenter:Math.cos(f/r.r)-f*o/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},h=1/o,p=h+1/(2*Math.tan(i)),g=r.r*Math.min(1/(Math.sqrt(p*p+.5)+p),l/(Math.sqrt(h*h+l/2)+h)),m={scale:2*g/t.width,rCenter:Math.cos(g/r.r)-g/o/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},v=m.scale>d.scale?m:d;return c.scale<1&&v.scale>c.scale?v:c}function a(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function o(t,e){var r=e.pxmid[0],n=e.pxmid[1],a=t.width/2,o=t.height/2;return r<0&&(a*=-1),n<0&&(o*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(o)*(a>0?1:-1)/2,y:o/(1+r*r/(n*n)),outside:!0}}function i(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}var a,o,i,l,s,c,u,f,d,h,p,g,m;for(o=0;o<2;o++)for(i=o?r:n,s=o?Math.max:Math.min,u=o?1:-1,a=0;a<2;a++){for(l=a?Math.max:Math.min,c=a?1:-1,f=t[o][a],f.sort(i),d=t[1-o][a],h=d.concat(f),g=[],p=0;p0&&(t.labelExtraY=x),Array.isArray(e.pull))for(a=0;a=e.pull[i.i]||((t.pxmid[1]-i.pxmid[1])*u>0?(f=i.cyFinal+s(i.px0[1],i.px1[1]),(x=f-m-t.labelExtraY)*u>0&&(t.labelExtraY+=x)):(v+t.labelExtraY-y)*u>0&&(n=3*c*Math.abs(a-h.indexOf(t)),d=i.cxFinal+l(i.px0[0],i.px1[0]),(p=d+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*c>0&&(t.labelExtraX+=p)))}(g[p],v)}}}function l(t,e){var r,n,a,o,i,l,s,u,f,d,h=[];for(a=0;au&&(u=l.pull[o]);i.r=Math.min(r/c(l.tilt,Math.sin(s),l.depth),n/c(l.tilt,Math.cos(s),l.depth))/(2+2*u),i.cx=e.l+e.w*(l.domain.x[1]+l.domain.x[0])/2,i.cy=e.t+e.h*(2-l.domain.y[1]-l.domain.y[0])/2,l.scalegroup&&-1===h.indexOf(l.scalegroup)&&h.push(l.scalegroup)}for(o=0;of.vTotal/2?1:0)}function c(t,e,r){if(!t)return 1;var n=Math.sin(t*Math.PI/180);return Math.max(.01,r*n*Math.abs(e)+2*Math.sqrt(1-n*n*e*e))}var u=t("d3"),f=t("../../components/fx"),d=t("../../components/color"),h=t("../../components/drawing"),p=t("../../lib/svg_text_utils"),g=t("./helpers");e.exports=function(t,e){var r=t._fullLayout;l(e,r._size);var c=r._pielayer.selectAll("g.trace").data(e);c.enter().append("g").attr({"stroke-linejoin":"round",class:"trace"}),c.exit().remove(),c.order(),c.each(function(e){var l=u.select(this),c=e[0],m=c.trace,v=(m.depth||0)*c.r*Math.sin(0)/2,y=m.tiltaxis||0,x=y*Math.PI/180,b=[v*Math.sin(x),v*Math.cos(x)],_=c.r*Math.cos(0),w=l.selectAll("g.part").data(m.tilt?["top","sides"]:["top"]);w.enter().append("g").attr("class",function(t){return t+" part"}),w.exit().remove(),w.order(),s(e),l.selectAll(".top").each(function(){var l=u.select(this).selectAll("g.slice").data(e);l.enter().append("g").classed("slice",!0),l.exit().remove();var s=[[[],[]],[[],[]]],v=!1;l.each(function(e){function i(n){n.originalEvent=u.event;var o=t._fullLayout,i=t._fullData[m.index],l=f.castHoverinfo(i,o,e.i);if("all"===l&&(l="label+text+value+percent+name"),t._dragging||!1===o.hovermode||"none"===l||"skip"===l||!l)return void f.hover(t,n,"pie");var s=a(e,c),d=w+e.pxmid[0]*(1-s),h=M+e.pxmid[1]*(1-s),p=r.separators,v=[];-1!==l.indexOf("label")&&v.push(e.label),-1!==l.indexOf("text")&&(i.hovertext?v.push(Array.isArray(i.hovertext)?i.hovertext[e.i]:i.hovertext):i.text&&i.text[e.i]&&v.push(i.text[e.i])),-1!==l.indexOf("value")&&v.push(g.formatPieValue(e.v,p)),-1!==l.indexOf("percent")&&v.push(g.formatPiePercent(e.v/c.vTotal,p)),f.loneHover({x0:d-s*c.r,x1:d+s*c.r,y:h,text:v.join("
"),name:-1!==l.indexOf("name")?i.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:f.castHoverOption(m,e.i,"bgcolor")||e.color,borderColor:f.castHoverOption(m,e.i,"bordercolor"),fontFamily:f.castHoverOption(m,e.i,"font.family"),fontSize:f.castHoverOption(m,e.i,"font.size"),fontColor:f.castHoverOption(m,e.i,"font.color")},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t}),f.hover(t,n,"pie"),T=!0}function l(e){e.originalEvent=u.event,t.emit("plotly_unhover",{event:u.event,points:[e]}),T&&(f.loneUnhover(r._hoverlayer.node()),T=!1)}function d(){t._hoverdata=[e],e.curveNumber=c.trace.index,t._hoverdata.trace=c.trace,f.click(t,u.event||{target:!0})}function x(t,r,n,a){return"a"+a*c.r+","+a*_+" "+y+" "+e.largeArc+(n?" 1 ":" 0 ")+a*(r[0]-t[0])+","+a*(r[1]-t[1])}if(e.hidden)return void u.select(this).selectAll("path,g").remove();s[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var w=c.cx+b[0],M=c.cy+b[1],k=u.select(this),A=k.selectAll("path.surface").data([e]),T=!1;if(A.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),k.select("path.textline").remove(),k.on("mouseover",i).on("mouseout",l).on("mousedown",d),m.pull){var L=+(Array.isArray(m.pull)?m.pull[e.i]:m.pull)||0;L>0&&(w+=L*e.pxmid[0],M+=L*e.pxmid[1])}e.cxFinal=w,e.cyFinal=M;var C=m.hole;if(e.v===c.vTotal){var S="M"+(w+e.px0[0])+","+(M+e.px0[1])+x(e.px0,e.pxmid,!0,1)+x(e.pxmid,e.px0,!0,1)+"Z";C?A.attr("d","M"+(w+C*e.px0[0])+","+(M+C*e.px0[1])+x(e.px0,e.pxmid,!1,C)+x(e.pxmid,e.px0,!1,C)+"Z"+S):A.attr("d",S)}else{var z=x(e.px0,e.px1,!0,1);if(C){var O=1-C;A.attr("d","M"+(w+C*e.px1[0])+","+(M+C*e.px1[1])+x(e.px1,e.px0,!1,C)+"l"+O*e.px0[0]+","+O*e.px0[1]+z+"Z")}else A.attr("d","M"+w+","+M+"l"+e.px0[0]+","+e.px0[1]+z+"Z")}var P=Array.isArray(m.textposition)?m.textposition[e.i]:m.textposition,D=k.selectAll("g.slicetext").data(e.text&&"none"!==P?[0]:[]);D.enter().append("g").classed("slicetext",!0),D.exit().remove(),D.each(function(){var r=u.select(this).selectAll("text").data([0]);r.enter().append("text").attr("data-notex",1),r.exit().remove(),r.text(e.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(h.font,"outside"===P?m.outsidetextfont:m.insidetextfont).call(p.convertToTspans,t);var a,i=h.bBox(r.node());"outside"===P?a=o(i,e):(a=n(i,e,c),"auto"===P&&a.scale<1&&(r.call(h.font,m.outsidetextfont),m.outsidetextfont.family===m.insidetextfont.family&&m.outsidetextfont.size===m.insidetextfont.size||(i=h.bBox(r.node())),a=o(i,e)));var l=w+e.pxmid[0]*a.rCenter+(a.x||0),s=M+e.pxmid[1]*a.rCenter+(a.y||0);a.outside&&(e.yLabelMin=s-i.height/2,e.yLabelMid=s,e.yLabelMax=s+i.height/2,e.labelExtraX=0,e.labelExtraY=0,v=!0),r.attr("transform","translate("+l+","+s+")"+(a.scale<1?"scale("+a.scale+")":"")+(a.rotate?"rotate("+a.rotate+")":"")+"translate("+-(i.left+i.right)/2+","+-(i.top+i.bottom)/2+")")})}),v&&i(s,m),l.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=u.select(this),r=e.select("g.slicetext text");r.attr("transform","translate("+t.labelExtraX+","+t.labelExtraY+")"+r.attr("transform"));var n=t.cxFinal+t.pxmid[0],a=t.cyFinal+t.pxmid[1],o="M"+n+","+a,i=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var l=t.labelExtraX*t.pxmid[1]/t.pxmid[0],s=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(l)>Math.abs(s)?o+="l"+s*t.pxmid[0]/t.pxmid[1]+","+s+"H"+(n+t.labelExtraX+i):o+="l"+t.labelExtraX+","+l+"v"+(s-l)+"h"+i}else o+="V"+(t.yLabelMid+t.labelExtraY)+"h"+i;e.append("path").classed("textline",!0).call(d.stroke,m.outsidetextfont.color).attr({"stroke-width":Math.min(2,m.outsidetextfont.size/8),d:o,fill:"none"})}})})}),setTimeout(function(){c.selectAll("tspan").each(function(){var t=u.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)}},{"../../components/color":41,"../../components/drawing":65,"../../components/fx":82,"../../lib/svg_text_utils":173,"./helpers":296,d3:13}],301:[function(t,e,r){"use strict";var n=t("d3"),a=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0],r=e.trace,o=n.select(this);o.style({opacity:r.opacity}),o.selectAll(".top path.surface").each(function(t){n.select(this).call(a,t,r)})})}},{"./style_one":302,d3:13}],302:[function(t,e,r){"use strict";var n=t("../../components/color");e.exports=function(t,e,r){var a=r.marker.line.color;Array.isArray(a)&&(a=a[e.i]||n.defaultLine);var o=r.marker.line.width||0;Array.isArray(o)&&(o=o[e.i]||0),t.style({"stroke-width":o}).call(n.fill,e.color).call(n.stroke,a)}},{"../../components/color":41}],303:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;rg&&h.splice(g,h.length-g),p.length>g&&p.splice(g,p.length-g);var m={padded:!0},v={padded:!0};if(i.hasMarkers(e)){if(r=e.marker,c=r.size,Array.isArray(c)){var y={type:"linear"};a.setConvert(y),c=y.makeCalcdata(e.marker,"size"),c.length>g&&c.splice(g,c.length-g)}var x,b=1.6*(e.marker.sizeref||1);x="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/b),3)}:function(t){return Math.max((t||0)/b,3)},m.ppad=v.ppad=Array.isArray(c)?c.map(x):x(c)}l(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||h[0]===h[g-1]&&p[0]===p[g-1]?e.error_y.visible||-1===["tonexty","tozeroy"].indexOf(e.fill)&&(i.hasMarkers(e)||i.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||h[0]===h[g-1]&&p[0]===p[g-1]?-1!==["tonextx","tozerox"].indexOf(e.fill)&&(v.padded=!1):v.tozero=!0,a.expand(f,h,m),a.expand(d,p,v);var _=new Array(g);for(u=0;u=0;a--){var o=t[a];if("scatter"===o.type&&o.xaxis===r.xaxis&&o.yaxis===r.yaxis){o.opacity=void 0;break}}}}}},{}],307:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/plots"),i=t("../../components/colorscale"),l=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,s=r.marker,c="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+c).remove(),void 0===s||!s.showscale)return void o.autoMargin(t,c);var u=s.color,f=s.cmin,d=s.cmax;n(f)||(f=a.aggNums(Math.min,null,u)),n(d)||(d=a.aggNums(Math.max,null,u));var h=e[0].t.cb=l(t,c),p=i.makeColorScaleFunc(i.extractScale(s.colorscale,f,d),{noNumericCheck:!0});h.fillcolor(p).filllevels({start:f,end:d,size:(d-f)/254}).options(s.colorbar)()}},{"../../components/colorbar/draw":44,"../../components/colorscale":55,"../../lib":156,"../../plots/plots":233,"fast-isnumeric":16}],308:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/calc"),o=t("./subtypes");e.exports=function(t){o.hasLines(t)&&n(t,"line")&&a(t,t.line.color,"line","c"),o.hasMarkers(t)&&(n(t,"marker")&&a(t,t.marker.color,"marker","c"),n(t,"marker.line")&&a(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":47,"../../components/colorscale/has_colorscale":54,"./subtypes":324}],309:[function(t,e,r){"use strict";e.exports={PTS_LINESONLY:20}},{}],310:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),o=t("./constants"),i=t("./subtypes"),l=t("./xy_defaults"),s=t("./marker_defaults"),c=t("./line_defaults"),u=t("./line_shape_defaults"),f=t("./text_defaults"),d=t("./fillcolor_defaults"),h=t("../../components/errorbars/defaults");e.exports=function(t,e,r,p){function g(r,o){return n.coerce(t,e,a,r,o)}var m=l(t,e,p,g),v=mx[b].x0&&ex[b].y0&&rU!=R>=U&&(D=O[S-1][0],E=O[S][0],P=D+(E-D)*(U-N)/(R-N),B=Math.min(B,P),q=Math.max(q,P));B=Math.max(B,0),q=Math.min(q,d._length);var G=l.defaultLine;return l.opacity(f.fillcolor)?G=f.fillcolor:l.opacity((f.line||{}).color)&&(G=f.line.color),n.extendFlat(t,{distance:s+10,x0:B,x1:q,y0:U,y1:U,color:G}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{"../../components/color":41,"../../components/errorbars":71,"../../components/fx":82,"../../lib":156,"./get_trace_color":312}],314:[function(t,e,r){"use strict";var n={},a=t("./subtypes");n.hasLines=a.hasLines,n.hasMarkers=a.hasMarkers,n.hasText=a.hasText,n.isBubble=a.isBubble,n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.cleanData=t("./clean_data"),n.calc=t("./calc"),n.arraysToCalcdata=t("./arrays_to_calcdata"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.animatable=!0,n.moduleType="trace",n.name="scatter",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":202,"./arrays_to_calcdata":303,"./attributes":304,"./calc":305,"./clean_data":306,"./colorbar":307,"./defaults":310,"./hover":313,"./plot":321,"./select":322,"./style":323,"./subtypes":324}],315:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,i,l){var s=(t.marker||{}).color;if(i("line.color",r),n(t,"line"))a(t,e,o,i,{prefix:"line.",cLetter:"c"});else{i("line.color",!Array.isArray(s)&&s||r)}i("line.width"),(l||{}).noDash||i("line.dash")}},{"../../components/colorscale/defaults":50,"../../components/colorscale/has_colorscale":54}],316:[function(t,e,r){"use strict";var n=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function r(e){var r=_.c2p(t[e].x),a=w.c2p(t[e].y);return r!==n&&a!==n&&[r,a]}function a(t){var e=t[0]/_._length,r=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-r,r-1))*A}var o,i,l,s,c,u,f,d,h,p,g,m,v,y,x,b,_=e.xaxis,w=e.yaxis,M=e.simplify,k=e.connectGaps,A=e.baseTolerance,T=e.linear,L=[],C=.2,S=new Array(t.length),z=0;for(M||(A=C=-1),o=0;oa(u))break;l=u,v=p[0]*h[0]+p[1]*h[1],v>g?(g=v,s=u,d=!1):v=t.length||!u)break;S[z++]=u,i=u}}else S[z++]=s}L.push(S.slice(0,z))}return L}},{"../../constants/numerical":139}],317:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],318:[function(t,e,r){"use strict";e.exports=function(t,e,r){for(var n,a,o=null,i=0;i0?Math.max(e,a):0}}},{"fast-isnumeric":16}],320:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/has_colorscale"),o=t("../../components/colorscale/defaults"),i=t("./subtypes");e.exports=function(t,e,r,l,s,c){var u,f=i.isBubble(t),d=(t.line||{}).color;if(c=c||{},d&&(r=d),s("marker.symbol"),s("marker.opacity",f?.7:1),s("marker.size"),s("marker.color",r),a(t,"marker")&&o(t,e,l,s,{prefix:"marker.",cLetter:"c"}),c.noLine||(u=d&&!Array.isArray(d)&&e.marker.color!==d?d:f?n.background:n.defaultLine,s("marker.line.color",u),a(t,"marker.line")&&o(t,e,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",f?1:0)),f&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),c.gradient){"none"!==s("marker.gradient.type")&&s("marker.gradient.color")}}},{"../../components/color":41,"../../components/colorscale/defaults":50,"../../components/colorscale/has_colorscale":54,"./subtypes":324}],321:[function(t,e,r){"use strict";function n(t,e){var r;e.selectAll("g.trace").each(function(t){var e=i.select(this);if(r=t[0].trace,r._nexttrace){if(r._nextFill=e.select(".js-fill.js-tonext"),!r._nextFill.size()){var n=":first-child";e.select(".js-fill.js-tozero").size()&&(n+=" + *"),r._nextFill=e.insert("path",n).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),r._nextFill=null;r.fill&&("tozero"===r.fill.substr(0,6)||"toself"===r.fill||"to"===r.fill.substr(0,2)&&!r._prevtrace)?(r._ownFill=e.select(".js-fill.js-tozero"),r._ownFill.size()||(r._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),r._ownFill=null)})}function a(t,e,r,n,a,d,p){function g(t){return M?t.transition():t}function m(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(t){if(t.ids)return v}function x(){return!1}function b(e){var r,n,a,o=e[0].trace,c=i.select(this),f=u.hasMarkers(o),d=u.hasText(o),h=y(o),p=x,v=x;f&&(p=o.marker.maxdisplayed||o._needsCull?m:l.identity),d&&(v=o.marker.maxdisplayed||o._needsCull?m:l.identity),n=c.selectAll("path.point"),r=n.data(p,h);var b=r.enter().append("path").classed("point",!0);M&&b.call(s.pointStyle,o,t).call(s.translatePoints,k,A,o).style("opacity",0).transition().style("opacity",1);var _=f&&s.tryColorscale(o.marker,""),w=f&&s.tryColorscale(o.marker,"line");r.order(),r.each(function(e){var r=i.select(this),n=g(r);a=s.translatePoint(e,n,k,A),a?(s.singlePointStyle(e,n,o,_,w,t),o.customdata&&r.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):n.remove()}),M?r.exit().transition().style("opacity",0).remove():r.exit().remove(),n=c.selectAll("g"),r=n.data(v,h),r.enter().append("g").classed("textpoint",!0).append("text"),r.order(),r.each(function(t){var e=i.select(this),r=g(e.select("text"));(a=s.translatePoint(t,r,k,A))||e.remove()}),r.selectAll("text").call(s.textPointStyle,o,t).each(function(t){var e=t.xp||k.c2p(t.x),r=t.yp||A.c2p(t.y);i.select(this).selectAll("tspan.line").each(function(){g(i.select(this)).attr({x:e,y:r})})}),r.exit().remove()}var _,w;o(t,e,r,n,a);var M=!!p&&p.duration>0,k=r.xaxis,A=r.yaxis,T=n[0].trace,L=T.line,C=i.select(d);if(C.call(c.plot,r,p),!0===T.visible){g(C).style("opacity",T.opacity);var S,z,O=T.fill.charAt(T.fill.length-1);"x"!==O&&"y"!==O&&(O=""),n[0].node3=C;var P="",D=[],E=T._prevtrace;E&&(P=E._prevRevpath||"",z=E._nextFill,D=E._polygons);var N,R,I,j,F,B,q,H,V,U="",G="",Y=[],X=[],Z=l.noop;if(S=T._ownFill,u.hasLines(T)||"none"!==T.fill){for(z&&z.datum(n),-1!==["hv","vh","hvh","vhv"].indexOf(L.shape)?(I=s.steps(L.shape),j=s.steps(L.shape.split("").reverse().join(""))):I=j="spline"===L.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?s.smoothclosed(t.slice(1),L.smoothing):s.smoothopen(t,L.smoothing)}:function(t){return"M"+t.join("L")},F=function(t){return j(t.reverse())},Y=f(n,{xaxis:k,yaxis:A,connectGaps:T.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,linear:"linear"===L.shape,simplify:L.simplify}),V=T._polygons=new Array(Y.length),w=0;w1}),Z=function(t){return function(e){if(N=I(e),R=F(e),U?O?(U+="L"+N.substr(1),G=R+"L"+G.substr(1)):(U+="Z"+N,G=R+"Z"+G):(U=N,G=R),u.hasLines(T)&&e.length>1){var r=i.select(this);if(r.datum(n),t)g(r.style("opacity",0).attr("d",N).call(s.lineGroupStyle)).style("opacity",1);else{var a=g(r);a.attr("d",N),s.singleLineStyle(n,a)}}}}}var W=C.selectAll(".js-line").data(X);g(W.exit()).style("opacity",0).remove(),W.each(Z(!1)),W.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(Z(!0)),Y.length&&(S?B&&H&&(O?("y"===O?B[1]=H[1]=A.c2p(0,!0):"x"===O&&(B[0]=H[0]=k.c2p(0,!0)),g(S).attr("d","M"+H+"L"+B+"L"+U.substr(1)).call(s.singleFillStyle)):g(S).attr("d",U+"Z").call(s.singleFillStyle)):"tonext"===T.fill.substr(0,6)&&U&&P&&("tonext"===T.fill?g(z).attr("d",U+"Z"+P+"Z").call(s.singleFillStyle):g(z).attr("d",U+"L"+P.substr(1)+"Z").call(s.singleFillStyle),T._polygons=T._polygons.concat(D)),T._prevRevpath=G,T._prevPolygons=V);var $=C.selectAll(".points");_=$.data([n]),$.each(b),_.enter().append("g").classed("points",!0).each(b),_.exit().remove()}}function o(t,e,r,n,a){var o=r.xaxis,s=r.yaxis,c=i.extent(l.simpleMap(o.range,o.r2c)),f=i.extent(l.simpleMap(s.range,s.r2c)),d=n[0].trace;if(u.hasMarkers(d)){var h=d.marker.maxdisplayed;if(0!==h){var p=n.filter(function(t){return t.x>=c[0]&&t.x<=c[1]&&t.y>=f[0]&&t.y<=f[1]}),g=Math.ceil(p.length/h),m=0;a.forEach(function(t,r){var n=t[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;for(u=p.selectAll("g.trace"),f=u.data(r,function(t){return t[0].trace.uid}),f.enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),d(t,e,r),n(t,p),s=0,c={};sc[e[0].trace.uid]?1:-1}),m){l&&(h=l());i.transition().duration(o.duration).ease(o.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){p.selectAll("g.trace").each(function(n,i){a(t,i,e,n,r,this,o)})})}else p.selectAll("g.trace").each(function(n,i){a(t,i,e,n,r,this,o)});g&&f.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":65,"../../components/errorbars":71,"../../lib":156,"../../lib/polygon":166,"./line_points":316,"./link_traces":318,"./subtypes":324,d3:13}],322:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,a,o,i,l=t.cd,s=t.xaxis,c=t.yaxis,u=[],f=l[0].trace,d=f.marker,h=!n.hasMarkers(f)&&!n.hasText(f);if(!0===f.visible&&!h){var p=Array.isArray(d.opacity)?1:d.opacity;if(!1===e)for(r=0;r")}var a=t("../../components/fx"),o=t("../../plots/cartesian/axes"),i=t("../../constants/numerical").BADNUM,l=t("../scatter/get_trace_color"),s=t("./attributes");e.exports=function(t){function e(t){return f.projection(t)}function r(t){var r=t.lonlat;if(r[0]===i)return 1/0;if(f.isLonLatOverEdges(r))return 1/0;var n=e(r),a=c.c2p(),o=u.c2p(),l=Math.abs(a-n[0]),s=Math.abs(o-n[1]),d=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+s*s)-d,1-3/d)}var o=t.cd,s=o[0].trace,c=t.xa,u=t.ya,f=t.subplot;if(a.getClosest(o,r,t),!1!==t.index){var d=o[t.index],h=d.lonlat,p=e(h),g=d.mrc||1;return t.x0=p[0]-g,t.x1=p[0]+g,t.y0=p[1]-g,t.y1=p[1]+g,t.loc=d.loc,t.lon=h[0],t.lat=h[1],t.color=l(s,d),t.extraText=n(s,d,f.mockAxis),[t]}}},{"../../components/fx":82,"../../constants/numerical":139,"../../plots/cartesian/axes":192,"../scatter/get_trace_color":312,"./attributes":327}],332:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="scattergeo",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/geo":220,"../scatter/colorbar":307,"./attributes":327,"./calc":328,"./defaults":329,"./event_data":330,"./hover":331,"./plot":333}],333:[function(t,e,r){"use strict";function n(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=u(r,e),a=r.locationmode,o=0;o0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!a(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,o,l;if(!a(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,n=-1,r===e||a(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(l=o;l-- >0;)if(r[l]===e||r[l].listener&&r[l].listener===e){n=l;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],a(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?a(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(a(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],13:[function(t,e,r){function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(f===setTimeout)return setTimeout(t,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(d===clearTimeout)return clearTimeout(t);if((d===a||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function l(){m&&p&&(m=!1,p.length?g=p.concat(g):v=-1,g.length&&s())}function s(){if(!m){var t=o(l);m=!0;for(var e=g.length;e;){for(p=g,g=[];++v1)for(var r=1;re?1:t>=e?0:NaN}function o(t){return null===t?NaN:+t}function i(t){return!isNaN(t)}function l(t){return{left:function(e,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=e.length);n>>1;t(e[o],r)<0?n=o+1:a=o}return n},right:function(e,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=e.length);n>>1;t(e[o],r)>0?a=o:n=o+1}return n}}}function s(t){return t.length}function c(t){for(var e=1;t*e%1;)e*=10;return e}function u(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function f(){this._=Object.create(null)}function d(t){return(t+="")===_i||t[0]===wi?wi+t:t}function h(t){return(t+="")[0]===wi?t.slice(1):t}function p(t){return d(t)in this._}function g(t){return(t=d(t))in this._&&delete this._[t]}function m(){var t=[];for(var e in this._)t.push(h(e));return t}function v(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function x(){this._=Object.create(null)}function b(t){return t}function _(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function w(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=Mi.length;r=e&&(e=a+1);!(i=l[e])&&++e0&&(t=t.slice(0,l));var c=Di.get(t);return c&&(t=c,s=$),l?e?a:n:e?M:o}function W(t,e){return function(r){var n=ui.event;ui.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{ui.event=n}}}function $(t,e){var r=W(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}function Q(t){var r=".dragsuppress-"+ ++Ni,a="click"+r,o=ui.select(n(t)).on("touchmove"+r,T).on("dragstart"+r,T).on("selectstart"+r,T);if(null==Ei&&(Ei=!("onselectstart"in t)&&w(t.style,"userSelect")),Ei){var i=e(t).style,l=i[Ei];i[Ei]="none"}return function(t){if(o.on(r,null),Ei&&(i[Ei]=l),t){var e=function(){o.on(a,null)};o.on(a,function(){T(),e()},!0),setTimeout(e,0)}}}function J(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var a=r.createSVGPoint();if(Ri<0){var o=n(t);if(o.scrollX||o.scrollY){r=ui.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=r[0][0].getScreenCTM();Ri=!(i.f||i.e),r.remove()}}return Ri?(a.x=e.pageX,a.y=e.pageY):(a.x=e.clientX,a.y=e.clientY),a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}var l=t.getBoundingClientRect();return[e.clientX-l.left-t.clientLeft,e.clientY-l.top-t.clientTop]}function K(){return ui.event.changedTouches[0].identifier}function tt(t){return t>0?1:t<0?-1:0}function et(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function rt(t){return t>1?0:t<-1?Fi:Math.acos(t)}function nt(t){return t>1?Hi:t<-1?-Hi:Math.asin(t)}function at(t){return((t=Math.exp(t))-1/t)/2}function ot(t){return((t=Math.exp(t))+1/t)/2}function it(t){return((t=Math.exp(2*t))-1)/(t+1)}function lt(t){return(t=Math.sin(t/2))*t}function st(){}function ct(t,e,r){return this instanceof ct?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof ct?new ct(t.h,t.s,t.l):Mt(""+t,kt,ct):new ct(t,e,r)}function ut(t,e,r){function n(t){return t>360?t-=360:t<0&&(t+=360),t<60?o+(i-o)*t/60:t<180?i:t<240?o+(i-o)*(240-t)/60:o}function a(t){return Math.round(255*n(t))}var o,i;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,i=r<=.5?r*(1+e):r+e-r*e, +o=2*r-i,new xt(a(t+120),a(t),a(t-120))}function ft(t,e,r){return this instanceof ft?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof ft?new ft(t.h,t.c,t.l):t instanceof ht?gt(t.l,t.a,t.b):gt((t=At((t=ui.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ft(t,e,r)}function dt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ht(r,Math.cos(t*=Vi)*e,Math.sin(t)*e)}function ht(t,e,r){return this instanceof ht?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof ht?new ht(t.l,t.a,t.b):t instanceof ft?dt(t.h,t.c,t.l):At((t=xt(t)).r,t.g,t.b):new ht(t,e,r)}function pt(t,e,r){var n=(t+16)/116,a=n+e/500,o=n-r/200;return a=mt(a)*Ji,n=mt(n)*Ki,o=mt(o)*tl,new xt(yt(3.2404542*a-1.5371385*n-.4985314*o),yt(-.969266*a+1.8760108*n+.041556*o),yt(.0556434*a-.2040259*n+1.0572252*o))}function gt(t,e,r){return t>0?new ft(Math.atan2(r,e)*Ui,Math.sqrt(e*e+r*r),t):new ft(NaN,NaN,t)}function mt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function xt(t,e,r){return this instanceof xt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof xt?new xt(t.r,t.g,t.b):Mt(""+t,xt,ut):new xt(t,e,r)}function bt(t){return new xt(t>>16,t>>8&255,255&t)}function _t(t){return bt(t)+""}function wt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,r){var n,a,o,i=0,l=0,s=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(Lt(a[0]),Lt(a[1]),Lt(a[2]))}return(o=nl.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(i=(3840&o)>>4,i|=i>>4,l=240&o,l|=l>>4,s=15&o,s|=s<<4):7===t.length&&(i=(16711680&o)>>16,l=(65280&o)>>8,s=255&o)),e(i,l,s))}function kt(t,e,r){var n,a,o=Math.min(t/=255,e/=255,r/=255),i=Math.max(t,e,r),l=i-o,s=(i+o)/2;return l?(a=s<.5?l/(i+o):l/(2-i-o),n=t==i?(e-r)/l+(e0&&s<1?0:n),new ct(n,a,s)}function At(t,e,r){t=Tt(t),e=Tt(e),r=Tt(r);var n=vt((.4124564*t+.3575761*e+.1804375*r)/Ji),a=vt((.2126729*t+.7151522*e+.072175*r)/Ki);return ht(116*a-16,500*(n-a),200*(a-vt((.0193339*t+.119192*e+.9503041*r)/tl)))}function Tt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Lt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Ct(t){return"function"==typeof t?t:function(){return t}}function St(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),zt(e,r,t,n)}}function zt(t,e,r,n){function a(){var t,e=s.status;if(!e&&Pt(s)||e>=200&&e<300||304===e){try{t=r.call(o,s)}catch(t){return void i.error.call(o,t)}i.load.call(o,t)}else i.error.call(o,s)}var o={},i=ui.dispatch("beforesend","progress","load","error"),l={},s=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=a:s.onreadystatechange=function(){s.readyState>3&&a()},s.onprogress=function(t){var e=ui.event;ui.event=t;try{i.progress.call(o,s)}finally{ui.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return r=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(di(arguments)))}}),o.send=function(r,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),s.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),s.setRequestHeader)for(var u in l)s.setRequestHeader(u,l[u]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=c&&(s.responseType=c),null!=a&&o.on("error",a).on("load",function(t){a(null,t)}),i.beforesend.call(o,s),s.send(null==n?null:n),o},o.abort=function(){return s.abort(),o},ui.rebind(o,i,"on"),null==n?o:o.get(Ot(n))}function Ot(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}function Pt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Dt(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var a=r+e,o={c:t,t:a,n:null};return ol?ol.n=o:al=o,ol=o,il||(ll=clearTimeout(ll),il=1,sl(Et)),o}function Et(){var t=Nt(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(ll),ll=setTimeout(Et,e)),il=0):(il=1,sl(Et))}function Nt(){for(var t=Date.now(),e=al;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=al,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}function Ft(t){var e=t.decimal,r=t.thousands,n=t.grouping,a=t.currency,o=n&&r?function(t,e){for(var a=t.length,o=[],i=0,l=n[0],s=0;a>0&&l>0&&(s+l+1>e&&(l=Math.max(1,e-s)),o.push(t.substring(a-=l,a+l)),!((s+=l+1)>e));)l=n[i=(i+1)%n.length];return o.reverse().join(r)}:b;return function(t){var r=ul.exec(t),n=r[1]||" ",i=r[2]||">",l=r[3]||"-",s=r[4]||"",c=r[5],u=+r[6],f=r[7],d=r[8],h=r[9],p=1,g="",m="",v=!1,y=!0;switch(d&&(d=+d.substring(1)),(c||"0"===n&&"="===i)&&(c=n="0",i="="),h){case"n":f=!0,h="g";break;case"%":p=100,m="%",h="f";break;case"p":p=100,m="%",h="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+h.toLowerCase());case"c":y=!1;case"d":v=!0,d=0;break;case"s":p=-1,h="r"}"$"===s&&(g=a[0],m=a[1]),"r"!=h||d||(h="g"),null!=d&&("g"==h?d=Math.max(1,Math.min(21,d)):"e"!=h&&"f"!=h||(d=Math.max(0,Math.min(20,d)))),h=fl.get(h)||Bt;var x=c&&f;return function(t){var r=m;if(v&&t%1)return"";var a=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(p<0){var s=ui.formatPrefix(t,d);t=s.scale(t),r=s.symbol+m}else t*=p;t=h(t,d);var b,_,w=t.lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(b=t,_=""):(b=t.substring(0,M),_=t.substring(M))}else b=t.substring(0,w),_=e+t.substring(w+1);!c&&f&&(b=o(b,1/0));var k=g.length+b.length+_.length+(x?0:a.length),A=k"===i?A+a+t:"^"===i?A.substring(0,k>>=1)+a+t+A.substring(k):a+(x?t:A+t))+r}}}function Bt(t){return t+""}function qt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(t,e,r){function n(e){var r=t(e),n=o(r,1);return e-r1)for(;i=c)return-1;if(37===(a=e.charCodeAt(l++))){if(i=e.charAt(l++),!(o=S[i in gl?e.charAt(l++):i])||(n=o(t,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}function n(t,e,r){w.lastIndex=0;var n=w.exec(e.slice(r));return n?(t.w=M.get(n[0].toLowerCase()),r+n[0].length):-1}function a(t,e,r){b.lastIndex=0;var n=b.exec(e.slice(r));return n?(t.w=_.get(n[0].toLowerCase()),r+n[0].length):-1}function o(t,e,r){T.lastIndex=0;var n=T.exec(e.slice(r));return n?(t.m=L.get(n[0].toLowerCase()),r+n[0].length):-1}function i(t,e,r){k.lastIndex=0;var n=k.exec(e.slice(r));return n?(t.m=A.get(n[0].toLowerCase()),r+n[0].length):-1}function l(t,e,n){return r(t,C.c.toString(),e,n)}function s(t,e,n){return r(t,C.x.toString(),e,n)}function c(t,e,n){return r(t,C.X.toString(),e,n)}function u(t,e,r){var n=x.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)}var f=t.dateTime,d=t.date,h=t.time,p=t.periods,g=t.days,m=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function r(t){try{hl=qt;var e=new hl;return e._=t,n(e)}finally{hl=Date}}var n=e(t);return r.parse=function(t){try{hl=qt;var e=n.parse(t);return e&&e._}finally{hl=Date}},r.toString=n.toString,r},e.multi=e.utc.multi=ue;var x=ui.map(),b=Yt(g),_=Xt(g),w=Yt(m),M=Xt(m),k=Yt(v),A=Xt(v),T=Yt(y),L=Xt(y);p.forEach(function(t,e){x.set(t.toLowerCase(),e)});var C={a:function(t){return m[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(f),d:function(t,e){return Gt(t.getDate(),e,2)},e:function(t,e){return Gt(t.getDate(),e,2)},H:function(t,e){return Gt(t.getHours(),e,2)},I:function(t,e){return Gt(t.getHours()%12||12,e,2)},j:function(t,e){return Gt(1+dl.dayOfYear(t),e,3)},L:function(t,e){return Gt(t.getMilliseconds(),e,3)},m:function(t,e){return Gt(t.getMonth()+1,e,2)},M:function(t,e){return Gt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Gt(t.getSeconds(),e,2)},U:function(t,e){return Gt(dl.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Gt(dl.mondayOfYear(t),e,2)},x:e(d),X:e(h),y:function(t,e){return Gt(t.getFullYear()%100,e,2)},Y:function(t,e){return Gt(t.getFullYear()%1e4,e,4)},Z:se,"%":function(){return"%"}},S={a:n,A:a,b:o,B:i,c:l,d:re,e:re,H:ae,I:ae,j:ne,L:le,m:ee,M:oe,p:u,S:ie,U:Wt,w:Zt,W:$t,x:s,X:c,y:Jt,Y:Qt,Z:Kt,"%":ce};return e}function Gt(t,e,r){var n=t<0?"-":"",a=(n?-t:t)+"",o=a.length;return n+(o68?1900:2e3)}function ee(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function re(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ne(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function ae(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function oe(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function ie(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function le(t,e,r){ml.lastIndex=0;var n=ml.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function se(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=bi(e)/60|0,a=bi(e)%60;return r+Gt(n,"0",2)+Gt(a,"0",2)}function ce(t,e,r){vl.lastIndex=0;var n=vl.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ue(t){for(var e=t.length,r=-1;++r=0?1:-1,l=i*r,s=Math.cos(e),c=Math.sin(e),u=o*c,f=a*s+u*Math.cos(l),d=u*i*Math.sin(l);Ml.add(Math.atan2(d,f)),n=t,a=s,o=c}var e,r,n,a,o;kl.point=function(i,l){kl.point=t,n=(e=i)*Vi,a=Math.cos(l=(r=l)*Vi/2+Fi/4),o=Math.sin(l)},kl.lineEnd=function(){t(e,r)}}function ve(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function xe(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function be(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _e(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function we(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function ke(t,e){return bi(t[0]-e[0])=0;--l)a.point((f=u[l])[0],f[1])}else n(h.x,h.p.x,-1,a);h=h.p}h=h.o,u=h.z,p=!p}while(!h.v);a.lineEnd()}}}function De(t){if(e=t.length){for(var e,r,n=0,a=t[0];++n0){for(_||(o.polygonStart(),_=!0),o.lineStart();++i1&&2&e&&r.push(r.pop().concat(r.shift())),h.push(r.filter(Re))}var h,p,g,m=e(o),v=a.invert(n[0],n[1]),y={point:i,lineStart:s,lineEnd:c,polygonStart:function(){y.point=u,y.lineStart=f,y.lineEnd=d,h=[],p=[]},polygonEnd:function(){y.point=i,y.lineStart=s,y.lineEnd=c,h=ui.merge(h);var t=He(v,p);h.length?(_||(o.polygonStart(),_=!0),Pe(h,je,t,r,o)):t&&(_||(o.polygonStart(),_=!0),o.lineStart(),r(null,null,1,o),o.lineEnd()),_&&(o.polygonEnd(),_=!1),h=p=null},sphere:function(){o.polygonStart(),o.lineStart(),r(null,null,1,o),o.lineEnd(),o.polygonEnd()}},x=Ie(),b=e(x),_=!1;return y}}function Re(t){return t.length>1}function Ie(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:M,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function je(t,e){return((t=t.x)[0]<0?t[1]-Hi-Ii:Hi-t[1])-((e=e.x)[0]<0?e[1]-Hi-Ii:Hi-e[1])}function Fe(t){var e,r=NaN,n=NaN,a=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,i){var l=o>0?Fi:-Fi,s=bi(o-r);bi(s-Fi)0?Hi:-Hi),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(l,n),t.point(o,n),e=0):a!==l&&s>=Fi&&(bi(r-a)Ii?Math.atan((Math.sin(e)*(o=Math.cos(n))*Math.sin(r)-Math.sin(n)*(a=Math.cos(e))*Math.sin(t))/(a*o*i)):(e+n)/2}function qe(t,e,r,n){var a;if(null==t)a=r*Hi,n.point(-Fi,a),n.point(0,a),n.point(Fi,a),n.point(Fi,0),n.point(Fi,-a),n.point(0,-a),n.point(-Fi,-a),n.point(-Fi,0),n.point(-Fi,a);else if(bi(t[0]-e[0])>Ii){var o=t[0]=0?1:-1,M=w*_,k=M>Fi,A=p*x;if(Ml.add(Math.atan2(A*w*Math.sin(M),g*b+A*Math.cos(M))),o+=k?_+w*Bi:_,k^d>=r^v>=r){var T=xe(ve(f),ve(t));we(T);var L=xe(a,T);we(L);var C=(k^_>=0?-1:1)*nt(L[2]);(n>C||n===C&&(T[0]||T[1]))&&(i+=k^_>=0?1:-1)}if(!m++)break;d=v,p=x,g=b,f=t}}return(o<-Ii||oo}function r(t){var r,o,s,c,u;return{lineStart:function(){c=s=!1,u=1},point:function(f,d){var h,p=[f,d],g=e(f,d),m=i?g?0:a(f,d):g?a(f+(f<0?Fi:-Fi),d):0;if(!r&&(c=s=g)&&t.lineStart(),g!==s&&(h=n(r,p),(ke(r,h)||ke(p,h))&&(p[0]+=Ii,p[1]+=Ii,g=e(p[0],p[1]))),g!==s)u=0,g?(t.lineStart(),h=n(p,r),t.point(h[0],h[1])):(h=n(r,p),t.point(h[0],h[1]),t.lineEnd()),r=h;else if(l&&r&&i^g){var v;m&o||!(v=n(p,r,!0))||(u=0,i?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||r&&ke(r,p)||t.point(p[0],p[1]),r=p,s=g,o=m},lineEnd:function(){s&&t.lineEnd(),r=null},clean:function(){return u|(c&&s)<<1}}}function n(t,e,r){var n=ve(t),a=ve(e),i=[1,0,0],l=xe(n,a),s=ye(l,l),c=l[0],u=s-c*c;if(!u)return!r&&t;var f=o*s/u,d=-o*c/u,h=xe(i,l),p=_e(i,f);be(p,_e(l,d));var g=h,m=ye(p,g),v=ye(g,g),y=m*m-v*(ye(p,p)-1);if(!(y<0)){var x=Math.sqrt(y),b=_e(g,(-m-x)/v);if(be(b,p),b=Me(b),!r)return b;var _,w=t[0],M=e[0],k=t[1],A=e[1];M0^b[1]<(bi(b[0]-w)Fi^(w<=b[0]&&b[0]<=M)){var S=_e(g,(-m+x)/v);return be(S,p),[b,Me(S)]}}}function a(e,r){var n=i?t:Fi-t,a=0;return e<-n?a|=1:e>n&&(a|=2),r<-n?a|=4:r>n&&(a|=8),a}var o=Math.cos(t),i=o>0,l=bi(o)>Ii;return Ne(e,r,mr(t,6*Vi),i?[0,-t]:[-Fi,t-Fi])}function Ue(t,e,r,n){return function(a){var o,i=a.a,l=a.b,s=i.x,c=i.y,u=l.x,f=l.y,d=0,h=1,p=u-s,g=f-c;if(o=t-s,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=r-s,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>d&&(d=o)}else if(p>0){if(o0)){if(o/=g,g<0){if(o0){if(o>h)return;o>d&&(d=o)}if(o=n-c,g||!(o<0)){if(o/=g,g<0){if(o>h)return;o>d&&(d=o)}else if(g>0){if(o0&&(a.a={x:s+d*p,y:c+d*g}),h<1&&(a.b={x:s+h*p,y:c+h*g}),a}}}}}}function Ge(t,e,r,n){function a(n,a){return bi(n[0]-t)0?0:3:bi(n[0]-r)0?2:1:bi(n[1]-e)0?1:0:a>0?3:2}function o(t,e){return i(t.x,e.x)}function i(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(l){function s(t){for(var e=0,r=m.length,n=t[1],a=0;an&&et(c,o,t)>0&&++e:o[1]<=n&&et(c,o,t)<0&&--e,c=o;return 0!==e}function c(o,l,s,c){var u=0,f=0;if(null==o||(u=a(o,s))!==(f=a(l,s))||i(o,l)<0^s>0)do{c.point(0===u||3===u?t:r,u>1?n:e)}while((u=(u+s+4)%4)!==f);else c.point(l[0],l[1])}function u(a,o){return t<=a&&a<=r&&e<=o&&o<=n}function f(t,e){u(t,e)&&l.point(t,e)}function d(){S.point=p,m&&m.push(v=[]),k=!0,M=!1,_=w=NaN}function h(){g&&(p(y,x),b&&M&&L.rejoin(),g.push(L.buffer())),S.point=f,M&&l.lineEnd()}function p(t,e){t=Math.max(-jl,Math.min(jl,t)),e=Math.max(-jl,Math.min(jl,e));var r=u(t,e);if(m&&v.push([t,e]),k)y=t,x=e,b=r,k=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&M)l.point(t,e);else{var n={a:{x:_,y:w},b:{x:t,y:e}};C(n)?(M||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),A=!1):r&&(l.lineStart(),l.point(t,e),A=!1)}_=t,w=e,M=r}var g,m,v,y,x,b,_,w,M,k,A,T=l,L=Ie(),C=Ue(t,e,r,n),S={point:f,lineStart:d,lineEnd:h,polygonStart:function(){l=L,g=[],m=[],A=!0},polygonEnd:function(){l=T,g=ui.merge(g);var e=s([t,n]),r=A&&e,a=g.length;(r||a)&&(l.polygonStart(),r&&(l.lineStart(),c(null,null,1,l),l.lineEnd()),a&&Pe(g,o,e,c,l),l.polygonEnd()),g=m=v=null}};return S}}function Ye(t){var e=0,r=Fi/3,n=sr(t),a=n(e,r);return a.parallels=function(t){return arguments.length?n(e=t[0]*Fi/180,r=t[1]*Fi/180):[e/Fi*180,r/Fi*180]},a}function Xe(t,e){function r(t,e){var r=Math.sqrt(o-2*a*Math.sin(e))/a;return[r*Math.sin(t*=a),i-r*Math.cos(t)]}var n=Math.sin(t),a=(n+Math.sin(e))/2,o=1+n*(2*a-n),i=Math.sqrt(o)/a;return r.invert=function(t,e){var r=i-e;return[Math.atan2(t,r)/a,nt((o-(t*t+r*r)*a*a)/(2*a))]},r}function Ze(){function t(t,e){Bl+=a*t-n*e,n=t,a=e}var e,r,n,a;Gl.point=function(o,i){Gl.point=t,e=n=o,r=a=i},Gl.lineEnd=function(){t(e,r)}}function We(t,e){tVl&&(Vl=t),eUl&&(Ul=e)}function $e(){function t(t,e){i.push("M",t,",",e,o)}function e(t,e){i.push("M",t,",",e),l.point=r}function r(t,e){i.push("L",t,",",e)}function n(){l.point=t}function a(){i.push("Z")}var o=Qe(4.5),i=[],l={point:t,lineStart:function(){l.point=e},lineEnd:n,polygonStart:function(){l.lineEnd=a},polygonEnd:function(){l.lineEnd=n,l.point=t},pointRadius:function(t){return o=Qe(t),l},result:function(){if(i.length){var t=i.join("");return i=[],t}}};return l}function Qe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Je(t,e){Ll+=t,Cl+=e,++Sl}function Ke(){function t(t,n){var a=t-e,o=n-r,i=Math.sqrt(a*a+o*o);zl+=i*(e+t)/2,Ol+=i*(r+n)/2,Pl+=i,Je(e=t,r=n)}var e,r;Xl.point=function(n,a){Xl.point=t,Je(e=n,r=a)}}function tr(){Xl.point=Je}function er(){function t(t,e){var r=t-n,o=e-a,i=Math.sqrt(r*r+o*o);zl+=i*(n+t)/2,Ol+=i*(a+e)/2,Pl+=i,i=a*t-n*e,Dl+=i*(n+t),El+=i*(a+e),Nl+=3*i,Je(n=t,a=e)}var e,r,n,a;Xl.point=function(o,i){Xl.point=t,Je(e=n=o,r=a=i)},Xl.lineEnd=function(){t(e,r)}}function rr(t){function e(e,r){t.moveTo(e+i,r),t.arc(e,r,i,0,Bi)}function r(e,r){t.moveTo(e,r),l.point=n}function n(e,r){t.lineTo(e,r)}function a(){l.point=e}function o(){t.closePath()}var i=4.5,l={point:e,lineStart:function(){l.point=r},lineEnd:a,polygonStart:function(){l.lineEnd=o},polygonEnd:function(){l.lineEnd=a,l.point=e},pointRadius:function(t){return i=t,l},result:M};return l}function nr(t){function e(t){return(l?n:r)(t)}function r(e){return ir(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})}function n(e){function r(r,n){r=t(r,n),e.point(r[0],r[1])}function n(){x=NaN,k.point=o,e.lineStart()}function o(r,n){var o=ve([r,n]),i=t(r,n);a(x,b,y,_,w,M,x=i[0],b=i[1],y=r,_=o[0],w=o[1],M=o[2],l,e),e.point(x,b)}function i(){k.point=r,e.lineEnd()}function s(){n(),k.point=c,k.lineEnd=u}function c(t,e){o(f=t,d=e),h=x,p=b,g=_,m=w,v=M,k.point=o}function u(){a(x,b,y,_,w,M,h,p,f,g,m,v,l,e),k.lineEnd=i,i()}var f,d,h,p,g,m,v,y,x,b,_,w,M,k={point:r,lineStart:n,lineEnd:i,polygonStart:function(){e.polygonStart(),k.lineStart=s},polygonEnd:function(){e.polygonEnd(),k.lineStart=n}};return k}function a(e,r,n,l,s,c,u,f,d,h,p,g,m,v){var y=u-e,x=f-r,b=y*y+x*x;if(b>4*o&&m--){var _=l+h,w=s+p,M=c+g,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=bi(bi(M)-1)o||bi((y*z+x*O)/b-.5)>.3||l*h+s*p+c*g0&&16,e):Math.sqrt(o)},e}function ar(t){var e=nr(function(e,r){return t([e*Ui,r*Ui])});return function(t){return cr(e(t))}}function or(t){this.stream=t}function ir(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function lr(t){return sr(function(){return t})()}function sr(t){function e(t){return t=l(t[0]*Vi,t[1]*Vi),[t[0]*d+s,c-t[1]*d]}function r(t){return(t=l.invert((t[0]-s)/d,(c-t[1])/d))&&[t[0]*Ui,t[1]*Ui]}function n(){l=ze(i=dr(v,y,x),o);var t=o(g,m);return s=h-t[0]*d,c=p+t[1]*d,a()}function a(){return u&&(u.valid=!1,u=null),e}var o,i,l,s,c,u,f=nr(function(t,e){return t=o(t,e),[t[0]*d+s,c-t[1]*d]}),d=150,h=480,p=250,g=0,m=0,v=0,y=0,x=0,_=Il,w=b,M=null,k=null;return e.stream=function(t){return u&&(u.valid=!1),u=cr(_(i,f(w(t)))),u.valid=!0,u},e.clipAngle=function(t){return arguments.length?(_=null==t?(M=t,Il):Ve((M=+t)*Vi),a()):M},e.clipExtent=function(t){return arguments.length?(k=t,w=t?Ge(t[0][0],t[0][1],t[1][0],t[1][1]):b,a()):k},e.scale=function(t){return arguments.length?(d=+t,n()):d},e.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],n()):[h,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Vi,m=t[1]%360*Vi,n()):[g*Ui,m*Ui]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Vi,y=t[1]%360*Vi,x=t.length>2?t[2]%360*Vi:0,n()):[v*Ui,y*Ui,x*Ui]},ui.rebind(e,f,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&r,n()}}function cr(t){return ir(t,function(e,r){t.point(e*Vi,r*Vi)})}function ur(t,e){return[t,e]}function fr(t,e){return[t>Fi?t-Bi:t<-Fi?t+Bi:t,e]}function dr(t,e,r){return t?e||r?ze(pr(t),gr(e,r)):pr(t):e||r?gr(e,r):fr}function hr(t){return function(e,r){return e+=t,[e>Fi?e-Bi:e<-Fi?e+Bi:e,r]}}function pr(t){var e=hr(t);return e.invert=hr(-t),e}function gr(t,e){function r(t,e){var r=Math.cos(e),l=Math.cos(t)*r,s=Math.sin(t)*r,c=Math.sin(e),u=c*n+l*a;return[Math.atan2(s*o-u*i,l*n-c*a),nt(u*o+s*i)]}var n=Math.cos(t),a=Math.sin(t),o=Math.cos(e),i=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),l=Math.cos(t)*r,s=Math.sin(t)*r,c=Math.sin(e),u=c*o-s*i;return[Math.atan2(s*o+c*i,l*n+u*a),nt(u*n-l*a)]},r}function mr(t,e){var r=Math.cos(t),n=Math.sin(t);return function(a,o,i,l){var s=i*e;null!=a?(a=vr(r,a),o=vr(r,o),(i>0?ao)&&(a+=i*Bi)):(a=t+i*Bi,o=t-.5*s);for(var c,u=a;i>0?u>o:u0?e<-Hi+Ii&&(e=-Hi+Ii):e>Hi-Ii&&(e=Hi-Ii);var r=i/Math.pow(a(e),o);return[r*Math.sin(o*t),i-r*Math.cos(o*t)]}var n=Math.cos(t),a=function(t){return Math.tan(Fi/4+t/2)},o=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(a(e)/a(t)),i=n*Math.pow(a(t),o)/o;return o?(r.invert=function(t,e){var r=i-e,n=tt(o)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/o,2*Math.atan(Math.pow(i/n,1/o))-Hi]},r):Lr}function Tr(t,e){function r(t,e){var r=o-e;return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),a=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),o=n/a+t;return bi(a)1&&et(t[r[n-2]],t[r[n-1]],t[a])<=0;)--n;r[n++]=a}return r.slice(0,n)}function Dr(t,e){return t[0]-e[0]||t[1]-e[1]}function Er(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Nr(t,e,r,n){var a=t[0],o=r[0],i=e[0]-a,l=n[0]-o,s=t[1],c=r[1],u=e[1]-s,f=n[1]-c,d=(l*(s-c)-f*(a-o))/(f*i-l*u);return[a+d*i,s+d*u]}function Rr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function Ir(){an(this),this.edge=this.site=this.circle=null}function jr(t){var e=ls.pop()||new Ir;return e.site=t,e}function Fr(t){Wr(t),as.remove(t),ls.push(t),an(t)}function Br(t){var e=t.circle,r=e.x,n=e.cy,a={x:r,y:n},o=t.P,i=t.N,l=[t];Fr(t);for(var s=o;s.circle&&bi(r-s.circle.x)Ii)l=l.L;else{if(!((a=o-Vr(l,i))>Ii)){n>-Ii?(e=l.P,r=l):a>-Ii?(e=l,r=l.N):e=r=l;break}if(!l.R){e=l;break}l=l.R}var s=jr(t);if(as.insert(e,s),e||r){if(e===r)return Wr(e),r=jr(e.site), +as.insert(s,r),s.edge=r.edge=Kr(e.site,s.site),Zr(e),void Zr(r);if(!r)return void(s.edge=Kr(e.site,s.site));Wr(e),Wr(r);var c=e.site,u=c.x,f=c.y,d=t.x-u,h=t.y-f,p=r.site,g=p.x-u,m=p.y-f,v=2*(d*m-h*g),y=d*d+h*h,x=g*g+m*m,b={x:(m*y-h*x)/v+u,y:(d*x-g*y)/v+f};en(r.edge,c,p,b),s.edge=Kr(c,t,null,b),r.edge=Kr(t,p,null,b),Zr(e),Zr(r)}}function Hr(t,e){var r=t.site,n=r.x,a=r.y,o=a-e;if(!o)return n;var i=t.P;if(!i)return-1/0;r=i.site;var l=r.x,s=r.y,c=s-e;if(!c)return l;var u=l-n,f=1/o-1/c,d=u/c;return f?(-d+Math.sqrt(d*d-2*f*(u*u/(-2*c)-s+c/2+a-o/2)))/f+n:(n+l)/2}function Vr(t,e){var r=t.N;if(r)return Hr(r,e);var n=t.site;return n.y===e?n.x:1/0}function Ur(t){this.site=t,this.edges=[]}function Gr(t){for(var e,r,n,a,o,i,l,s,c,u,f=t[0][0],d=t[1][0],h=t[0][1],p=t[1][1],g=ns,m=g.length;m--;)if((o=g[m])&&o.prepare())for(l=o.edges,s=l.length,i=0;iIi||bi(a-r)>Ii)&&(l.splice(i,0,new rn(tn(o.site,u,bi(n-f)Ii?{x:f,y:bi(e-f)Ii?{x:bi(r-p)Ii?{x:d,y:bi(e-d)Ii?{x:bi(r-h)=-ji)){var h=s*s+c*c,p=u*u+f*f,g=(f*h-c*p)/d,m=(s*p-u*h)/d,f=m+l,v=ss.pop()||new Xr;v.arc=t,v.site=a,v.x=g+i,v.y=f+Math.sqrt(g*g+m*m),v.cy=f,t.circle=v;for(var y=null,x=is._;x;)if(v.y=l)return;if(d>p){if(o){if(o.y>=c)return}else o={x:m,y:s};r={x:m,y:c}}else{if(o){if(o.y1)if(d>p){if(o){if(o.y>=c)return}else o={x:(s-a)/n,y:s};r={x:(c-a)/n,y:c}}else{if(o){if(o.y=l)return}else o={x:i,y:n*i+a};r={x:l,y:n*l+a}}else{if(o){if(o.xo||f>i||d=b,M=r>=_,k=M<<1|w,A=k+4;ko&&(a=e.slice(o,a),l[i]?l[i]+=a:l[++i]=a),(r=r[0])===(n=n[0])?l[i]?l[i]+=n:l[++i]=n:(l[++i]=null,s.push({i:i,x:xn(r,n)})),o=fs.lastIndex;return o=0&&!(r=ui.interpolators[n](t,e)););return r}function wn(t,e){var r,n=[],a=[],o=t.length,i=e.length,l=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function kn(t){return function(e){return 1-t(1-e)}}function An(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Tn(t){return t*t}function Ln(t){return t*t*t}function Cn(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Sn(t){return function(e){return Math.pow(e,t)}}function zn(t){return 1-Math.cos(t*Hi)}function On(t){return Math.pow(2,10*(t-1))}function Pn(t){return 1-Math.sqrt(1-t*t)}function Dn(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Bi*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Bi/e)}}function En(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Nn(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rn(t,e){t=ui.hcl(t),e=ui.hcl(e);var r=t.h,n=t.c,a=t.l,o=e.h-r,i=e.c-n,l=e.l-a;return isNaN(i)&&(i=0,n=isNaN(n)?e.c:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return dt(r+o*t,n+i*t,a+l*t)+""}}function In(t,e){t=ui.hsl(t),e=ui.hsl(e);var r=t.h,n=t.s,a=t.l,o=e.h-r,i=e.s-n,l=e.l-a;return isNaN(i)&&(i=0,n=isNaN(n)?e.s:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return ut(r+o*t,n+i*t,a+l*t)+""}}function jn(t,e){t=ui.lab(t),e=ui.lab(e);var r=t.l,n=t.a,a=t.b,o=e.l-r,i=e.a-n,l=e.b-a;return function(t){return pt(r+o*t,n+i*t,a+l*t)+""}}function Fn(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Bn(t){var e=[t.a,t.b],r=[t.c,t.d],n=Hn(e),a=qn(e,r),o=Hn(Vn(r,e,-a))||0;e[0]*r[1]180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Un(r)+"rotate(",null,")")-2,x:xn(t,e)})):e&&r.push(Un(r)+"rotate("+e+")")}function Xn(t,e,r,n){t!==e?n.push({i:r.push(Un(r)+"skewX(",null,")")-2,x:xn(t,e)}):e&&r.push(Un(r)+"skewX("+e+")")}function Zn(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var a=r.push(Un(r)+"scale(",null,",",null,")");n.push({i:a-4,x:xn(t[0],e[0])},{i:a-2,x:xn(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Un(r)+"scale("+e+")")}function Wn(t,e){var r=[],n=[];return t=ui.transform(t),e=ui.transform(e),Gn(t.translate,e.translate,r,n),Yn(t.rotate,e.rotate,r,n),Xn(t.skew,e.skew,r,n),Zn(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,a=-1,o=n.length;++a=0;)r.push(a[n])}function sa(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(o=t.children)&&(a=o.length))for(var a,o,i=-1;++ia&&(n=r,a=e);return n}function xa(t){return t.reduce(ba,0)}function ba(t,e){return t+e[1]}function _a(t,e){return wa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wa(t,e){for(var r=-1,n=+t[0],a=(t[1]-n)/e,o=[];++r<=e;)o[r]=a*r+n;return o}function Ma(t){return[ui.min(t),ui.max(t)]}function ka(t,e){return t.value-e.value}function Aa(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ta(t,e){t._pack_next=e,e._pack_prev=t}function La(t,e){var r=e.x-t.x,n=e.y-t.y,a=t.r+e.r;return.999*a*a>r*r+n*n}function Ca(t){function e(t){u=Math.min(t.x-t.r,u),f=Math.max(t.x+t.r,f),d=Math.min(t.y-t.r,d),h=Math.max(t.y+t.r,h)}if((r=t.children)&&(c=r.length)){var r,n,a,o,i,l,s,c,u=1/0,f=-1/0,d=1/0,h=-1/0;if(r.forEach(Sa),n=r[0],n.x=-n.r,n.y=0,e(n),c>1&&(a=r[1],a.x=a.r,a.y=0,e(a),c>2))for(o=r[2],Pa(n,a,o),e(o),Aa(n,o),n._pack_prev=o,Aa(o,a),a=n._pack_next,i=3;i=0;)e=a[o],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}function ja(t,e,r){return t.a.parent===e.parent?t.a:r}function Fa(t){return 1+ui.max(t,function(t){return t.y})}function Ba(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function qa(t){var e=t.children;return e&&e.length?qa(e[0]):t}function Ha(t){var e,r=t.children;return r&&(e=r.length)?Ha(r[e-1]):t}function Va(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ua(t,e){var r=t.x+e[3],n=t.y+e[0],a=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return a<0&&(r+=a/2,a=0),o<0&&(n+=o/2,o=0),{x:r,y:n,dx:a,dy:o}}function Ga(t){var e=t[0],r=t[t.length-1];return e2?$a:Xa,s=n?Qn:$n;return i=a(t,e,s,r),l=a(e,t,s,_n),o}function o(t){return i(t)}var i,l;return o.invert=function(t){return l(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},o.range=function(t){return arguments.length?(e=t,a()):e},o.rangeRound=function(t){return o.range(t).interpolate(Fn)},o.clamp=function(t){return arguments.length?(n=t,a()):n},o.interpolate=function(t){return arguments.length?(r=t,a()):r},o.ticks=function(e){return eo(t,e)},o.tickFormat=function(e,r){return ro(t,e,r)},o.nice=function(e){return Ka(t,e),a()},o.copy=function(){return Qa(t,e,r,n)},a()}function Ja(t,e){return ui.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ka(t,e){return Za(t,Wa(to(t,e)[2])),Za(t,Wa(to(t,e)[2])),t}function to(t,e){null==e&&(e=10);var r=Ga(t),n=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),o=e/n*a;return o<=.15?a*=10:o<=.35?a*=5:o<=.75&&(a*=2),r[0]=Math.ceil(r[0]/a)*a,r[1]=Math.floor(r[1]/a)*a+.5*a,r[2]=a,r}function eo(t,e){return ui.range.apply(ui,to(t,e))}function ro(t,e,r){var n=to(t,e);if(r){var a=ul.exec(r);if(a.shift(),"s"===a[8]){var o=ui.formatPrefix(Math.max(bi(n[0]),bi(n[1])));return a[7]||(a[7]="."+no(o.scale(n[2]))),a[8]="f",r=ui.format(a.join("")),function(t){return r(o.scale(t))+o.symbol}}a[7]||(a[7]="."+ao(a[8],n)),r=a.join("")}else r=",."+no(n[2])+"f";return ui.format(r)}function no(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ao(t,e){var r=no(e[2]);return t in Ms?Math.abs(r-no(Math.max(bi(e[0]),bi(e[1]))))+ +("e"!==t):r-2*("%"===t)}function oo(t,e,r,n){function a(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function i(e){return t(a(e))}return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(a)),i):n},i.base=function(r){return arguments.length?(e=+r,t.domain(n.map(a)),i):e},i.nice=function(){var e=Za(n.map(a),r?Math:As);return t.domain(e),n=e.map(o),i},i.ticks=function(){var t=Ga(n),i=[],l=t[0],s=t[1],c=Math.floor(a(l)),u=Math.ceil(a(s)),f=e%1?2:e;if(isFinite(u-c)){if(r){for(;c0;d--)i.push(o(c)*d);for(c=0;i[c]s;u--);i=i.slice(c,u)}return i},i.tickFormat=function(t,r){if(!arguments.length)return ks;arguments.length<2?r=ks:"function"!=typeof r&&(r=ui.format(r));var n=Math.max(1,e*t/i.ticks().length);return function(t){var i=t/o(Math.round(a(t)));return i*e0?l[r-1]:t[0],r0?0:1}function _o(t,e,r,n,a){var o=t[0]-e[0],i=t[1]-e[1],l=(a?n:-n)/Math.sqrt(o*o+i*i),s=l*i,c=-l*o,u=t[0]+s,f=t[1]+c,d=e[0]+s,h=e[1]+c,p=(u+d)/2,g=(f+h)/2,m=d-u,v=h-f,y=m*m+v*v,x=r-n,b=u*h-d*f,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-m*_)/y,M=(-b*m-v*_)/y,k=(b*v+m*_)/y,A=(-b*m+v*_)/y,T=w-p,L=M-g,C=k-p,S=A-g;return T*T+L*L>C*C+S*S&&(w=k,M=A),[[w-s,M-c],[w*r/x,M*r/x]]}function wo(t){function e(e){function i(){c.push("M",o(t(u),l))}for(var s,c=[],u=[],f=-1,d=e.length,h=Ct(r),p=Ct(n);++f1?t.join("L"):t+"Z"}function ko(t){return t.join("L")+"Z"}function Ao(t){for(var e=0,r=t.length,n=t[0],a=[n[0],",",n[1]];++e1&&a.push("H",n[0]),a.join("")}function To(t){for(var e=0,r=t.length,n=t[0],a=[n[0],",",n[1]];++e1){l=e[1],o=t[s],s++,n+="C"+(a[0]+i[0])+","+(a[1]+i[1])+","+(o[0]-l[0])+","+(o[1]-l[1])+","+o[0]+","+o[1];for(var c=2;c9&&(a=3*e/Math.sqrt(a),i[l]=a*r,i[l+1]=a*n));for(l=-1;++l<=s;)a=(t[Math.min(s,l+1)][0]-t[Math.max(0,l-1)][0])/(6*(1+i[l]*i[l])),o.push([a||0,i[l]*a||0]);return o}function Ho(t){return t.length<3?Mo(t):t[0]+Oo(t,qo(t))}function Vo(t){for(var e,r,n,a=-1,o=t.length;++a0;)h[--l].call(t,i);if(o>=1)return g.event&&g.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var s,c,u,d,h,p=t[r]||(t[r]={active:0,count:0}),g=p[n];g||(s=a.time,c=Dt(o,0,s),g=p[n]={tween:new f,time:s,timer:c,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++p.count)}function ni(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function ai(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function oi(t){return t.toISOString()}function ii(t,e,r){function n(e){return t(e)}function a(t,r){var n=t[1]-t[0],a=n/r,o=ui.bisect($s,a);return o==$s.length?[e.year,to(t.map(function(t){return t/31536e6}),r)[2]]:o?e[a/$s[o-1]<$s[o]/a?o-1:o]:[Ks,to(t,r)[2]]}return n.invert=function(e){return li(t.invert(e))},n.domain=function(e){return arguments.length?(t.domain(e),n):t.domain().map(li)},n.nice=function(t,e){function r(r){return!isNaN(r)&&!t.range(r,li(+r+1),e).length}var o=n.domain(),i=Ga(o),l=null==t?a(i,10):"number"==typeof t&&a(i,t);return l&&(t=l[0],e=l[1]),n.domain(Za(o,e>1?{floor:function(e){for(;r(e=t.floor(e));)e=li(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=li(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Ga(n.domain()),o=null==t?a(r,10):"number"==typeof t?a(r,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(r[0],li(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return ii(t.copy(),e,r)},Ja(n,t)}function li(t){return new Date(t)}function si(t){return JSON.parse(t.responseText)}function ci(t){var e=hi.createRange();return e.selectNode(hi.body),e.createContextualFragment(t.responseText)}var ui={version:"3.5.17"},fi=[].slice,di=function(t){return fi.call(t)},hi=this.document;if(hi)try{di(hi.documentElement.childNodes)[0].nodeType}catch(t){di=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),hi)try{hi.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var pi=this.Element.prototype,gi=pi.setAttribute,mi=pi.setAttributeNS,vi=this.CSSStyleDeclaration.prototype,yi=vi.setProperty;pi.setAttribute=function(t,e){gi.call(this,t,e+"")},pi.setAttributeNS=function(t,e,r){mi.call(this,t,e,r+"")},vi.setProperty=function(t,e,r){yi.call(this,t,e+"",r)}}ui.ascending=a,ui.descending=function(t,e){return et?1:e>=t?0:NaN},ui.min=function(t,e){var r,n,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},ui.max=function(t,e){var r,n,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},ui.extent=function(t,e){var r,n,a,o=-1,i=t.length;if(1===arguments.length){for(;++o=n){r=a=n;break}for(;++on&&(r=n),a=n){r=a=n;break}for(;++on&&(r=n),a1)return s/(u-1)},ui.deviation=function(){var t=ui.variance.apply(this,arguments);return t?Math.sqrt(t):t};var xi=l(a);ui.bisectLeft=xi.left,ui.bisect=ui.bisectRight=xi.right,ui.bisector=function(t){return l(1===t.length?function(e,r){return a(t(e),r)}:t)},ui.shuffle=function(t,e,r){(o=arguments.length)<3&&(r=t.length,o<2&&(e=0));for(var n,a,o=r-e;o;)a=Math.random()*o--|0,n=t[o+e],t[o+e]=t[a+e],t[a+e]=n;return t},ui.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},ui.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],a=new Array(r<0?0:r);e=0;)for(n=t[a],e=n.length;--e>=0;)r[--i]=n[e];return r};var bi=Math.abs;ui.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,a=[],o=c(bi(r)),i=-1;if(t*=o,e*=o,r*=o,r<0)for(;(n=t+r*++i)>e;)a.push(n/o);else for(;(n=t+r*++i)=o.length)return n?n.call(a,i):r?i.sort(r):i;for(var s,c,u,d,h=-1,p=i.length,g=o[l++],m=new f;++h=o.length)return t;var n=[],a=i[r++];return t.forEach(function(t,a){n.push({key:t,values:e(a,r)})}),a?n.sort(function(t,e){return a(t.key,e.key)}):n}var r,n,a={},o=[],i=[];return a.map=function(e,r){return t(r,e,0)},a.entries=function(r){return e(t(ui.map,r,0),0)},a.key=function(t){return o.push(t),a},a.sortKeys=function(t){return i[o.length-1]=t,a},a.sortValues=function(t){return r=t,a},a.rollup=function(t){return n=t,a},a},ui.set=function(t){var e=new x;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},ui.event=null,ui.requote=function(t){return t.replace(ki,"\\$&")};var ki=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ai={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},Ti=function(t,e){return e.querySelector(t)},Li=function(t,e){return e.querySelectorAll(t)},Ci=function(t,e){var r=t.matches||t[w(t,"matchesSelector")];return(Ci=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Ti=function(t,e){return Sizzle(t,e)[0]||null},Li=Sizzle,Ci=Sizzle.matchesSelector),ui.selection=function(){return ui.select(hi.documentElement)};var Si=ui.selection.prototype=[];Si.select=function(t){var e,r,n,a,o=[];t=z(t);for(var i=-1,l=this.length;++i=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),Oi.hasOwnProperty(r)?{space:Oi[r],local:t}:t}},Si.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=ui.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(P(e,t[e]));return this}return this.each(P(t,e))},Si.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=N(t)).length,a=-1;if(e=r.classList){for(;++a=0;)(r=n[a])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},Si.sort=function(t){t=U.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.transition().duration(S)),e.call(t.event)}function l(){_&&_.domain(b.range().map(function(t){return(t-k.x)/k.k}).map(b.invert)),M&&M.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function s(t){z++||t({type:"zoomstart"})}function c(t){l(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function u(t){--z||(t({type:"zoomend"}),m=null)}function f(){function t(){l=1,o(ui.mouse(a),d),c(i)}function r(){f.on(P,null).on(D,null),h(l),u(i)}var a=this,i=N.of(a,arguments),l=0,f=ui.select(n(a)).on(P,t).on(D,r),d=e(ui.mouse(a)),h=Q(a);Bs.call(a),s(i)}function d(){function t(){var t=ui.touches(p);return h=k.k,t.forEach(function(t){t.identifier in m&&(m[t.identifier]=e(t))}),t}function r(){var e=ui.event.target;ui.select(e).on(b,n).on(_,l),w.push(e);for(var r=ui.event.changedTouches,a=0,o=r.length;a1){var u=s[0],f=s[1],d=u[0]-f[0],h=u[1]-f[1];v=d*d+h*h}}function n(){var t,e,r,n,i=ui.touches(p);Bs.call(p);for(var l=0,s=i.length;l=c)return i;if(a)return a=!1,o;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fl=ui.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=ui.round(t,It(t,e))).toFixed(Math.max(0,Math.min(20,It(t*(1+1e-15),e))))}}),dl=ui.time={},hl=Date;qt.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(){pl.setUTCDate.apply(this._,arguments)},setDay:function(){pl.setUTCDay.apply(this._,arguments)},setFullYear:function(){pl.setUTCFullYear.apply(this._,arguments)},setHours:function(){pl.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){pl.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){pl.setUTCMinutes.apply(this._,arguments)},setMonth:function(){pl.setUTCMonth.apply(this._,arguments)},setSeconds:function(){pl.setUTCSeconds.apply(this._,arguments)},setTime:function(){pl.setTime.apply(this._,arguments)}};var pl=Date.prototype;dl.year=Ht(function(t){return t=dl.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),dl.years=dl.year.range,dl.years.utc=dl.year.utc.range,dl.day=Ht(function(t){var e=new hl(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),dl.days=dl.day.range,dl.days.utc=dl.day.utc.range,dl.dayOfYear=function(t){var e=dl.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=dl[t]=Ht(function(t){return(t=dl.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=dl.year(t).getDay();return Math.floor((dl.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});dl[t+"s"]=r.range,dl[t+"s"].utc=r.utc.range,dl[t+"OfYear"]=function(t){var r=dl.year(t).getDay();return Math.floor((dl.dayOfYear(t)+(r+e)%7)/7)}}),dl.week=dl.sunday,dl.weeks=dl.sunday.range,dl.weeks.utc=dl.sunday.utc.range,dl.weekOfYear=dl.sundayOfYear;var gl={"-":"",_:" ",0:"0"},ml=/^\s*\d+/,vl=/^%/;ui.locale=function(t){return{numberFormat:Ft(t),timeFormat:Ut(t)}};var yl=ui.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"]});ui.format=yl.numberFormat,ui.geo={},fe.prototype={s:0,t:0,add:function(t){de(t,this.t,xl),de(xl.s,this.s,this),this.s?this.t+=xl.t:this.s=xl.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var xl=new fe;ui.geo.stream=function(t,e){t&&bl.hasOwnProperty(t.type)?bl[t.type](t,e):he(t,e)};var bl={Feature:function(t,e){he(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,a=r.length;++nh&&(h=e)}function e(e,r){var n=ve([e*Vi,r*Vi]);if(v){var a=xe(v,n),o=[a[1],-a[0],0],i=xe(o,a);we(i),i=Me(i);var s=e-p,c=s>0?1:-1,g=i[0]*Ui*c,m=bi(s)>180;if(m^(c*ph&&(h=y)}else if(g=(g+360)%360-180,m^(c*ph&&(h=r);m?el(u,d)&&(d=e):l(e,d)>l(u,d)&&(u=e):d>=u?(ed&&(d=e)):e>p?l(u,e)>l(u,d)&&(d=e):l(e,d)>l(u,d)&&(u=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){b[0]=u,b[1]=d,_.point=t,v=null}function a(t,r){if(v){var n=t-p;y+=bi(n)>180?n+(n>0?360:-360):n}else g=t,m=r;kl.point(t,r),e(t,r)}function o(){kl.lineStart()}function i(){a(g,m),kl.lineEnd(),bi(y)>Ii&&(u=-(d=180)),b[0]=u,b[1]=d,v=null}function l(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tIi?h=90:y<-Ii&&(f=-90),b[0]=u,b[1]=d}};return function(t){h=d=-(u=f=1/0),x=[],ui.geo.stream(t,_);var e=x.length;if(e){x.sort(s);for(var r,n=1,a=x[0],o=[a];nl(a[0],a[1])&&(a[1]=r[1]),l(r[0],a[1])>l(a[0],a[1])&&(a[0]=r[0])):o.push(a=r);for(var i,r,p=-1/0,e=o.length-1,n=0,a=o[e];n<=e;a=r,++n)r=o[n],(i=l(a[1],r[0]))>p&&(p=i,u=r[0],d=a[1])}return x=b=null,u===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[u,f],[d,h]]}}(),ui.geo.centroid=function(t){Al=Tl=Ll=Cl=Sl=zl=Ol=Pl=Dl=El=Nl=0,ui.geo.stream(t,Rl);var e=Dl,r=El,n=Nl,a=e*e+r*r+n*n;return a=.12&&a<.234&&n>=-.425&&n<-.214?i:a>=.166&&a<.234&&n>=-.214&&n<-.115?l:o).invert(t)},t.stream=function(t){var e=o.stream(t),r=i.stream(t),n=l.stream(t);return{point:function(t,a){e.point(t,a),r.point(t,a),n.point(t,a)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),i.precision(e),l.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),i.scale(.35*e),l.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var c=o.scale(),u=+e[0],f=+e[1];return r=o.translate(e).clipExtent([[u-.455*c,f-.238*c],[u+.455*c,f+.238*c]]).stream(s).point,n=i.translate([u-.307*c,f+.201*c]).clipExtent([[u-.425*c+Ii,f+.12*c+Ii],[u-.214*c-Ii,f+.234*c-Ii]]).stream(s).point,a=l.translate([u-.205*c,f+.212*c]).clipExtent([[u-.214*c+Ii,f+.166*c+Ii],[u-.115*c-Ii,f+.234*c-Ii]]).stream(s).point,t},t.scale(1070)};var Fl,Bl,ql,Hl,Vl,Ul,Gl={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Bl=0,Gl.lineStart=Ze},polygonEnd:function(){Gl.lineStart=Gl.lineEnd=Gl.point=M,Fl+=bi(Bl/2)}},Yl={point:We,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Xl={point:Je,lineStart:Ke,lineEnd:tr,polygonStart:function(){Xl.lineStart=er},polygonEnd:function(){Xl.point=Je,Xl.lineStart=Ke,Xl.lineEnd=tr}};ui.geo.path=function(){function t(t){return t&&("function"==typeof l&&o.pointRadius(+l.apply(this,arguments)),i&&i.valid||(i=a(o)),ui.geo.stream(t,i)),o.result()}function e(){return i=null,t}var r,n,a,o,i,l=4.5;return t.area=function(t){return Fl=0,ui.geo.stream(t,a(Gl)),Fl},t.centroid=function(t){return Ll=Cl=Sl=zl=Ol=Pl=Dl=El=Nl=0,ui.geo.stream(t,a(Xl)),Nl?[Dl/Nl,El/Nl]:Pl?[zl/Pl,Ol/Pl]:Sl?[Ll/Sl,Cl/Sl]:[NaN,NaN]},t.bounds=function(t){return Vl=Ul=-(ql=Hl=1/0),ui.geo.stream(t,a(Yl)),[[ql,Hl],[Vl,Ul]]},t.projection=function(t){return arguments.length?(a=(r=t)?t.stream||ar(t):b,e()):r},t.context=function(t){return arguments.length?(o=null==(n=t)?new $e:new rr(t),"function"!=typeof l&&o.pointRadius(l),e()):n},t.pointRadius=function(e){return arguments.length?(l="function"==typeof e?e:(o.pointRadius(+e),+e),t):l},t.projection(ui.geo.albersUsa()).context(null)},ui.geo.transform=function(t){return{stream:function(e){var r=new or(e);for(var n in t)r[n]=t[n];return r}}},or.prototype={point:function(t,e){this.stream.point(t,e)},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()}},ui.geo.projection=lr,ui.geo.projectionMutator=sr,(ui.geo.equirectangular=function(){return lr(ur)}).raw=ur.invert=ur,ui.geo.rotation=function(t){function e(e){return e=t(e[0]*Vi,e[1]*Vi),e[0]*=Ui,e[1]*=Ui,e}return t=dr(t[0]%360*Vi,t[1]*Vi,t.length>2?t[2]*Vi:0),e.invert=function(e){return e=t.invert(e[0]*Vi,e[1]*Vi),e[0]*=Ui,e[1]*=Ui,e},e},fr.invert=ur,ui.geo.circle=function(){function t(){var t="function"==typeof n?n.apply(this,arguments):n,e=dr(-t[0]*Vi,-t[1]*Vi,0).invert,a=[];return r(null,null,1,{point:function(t,r){a.push(t=e(t,r)),t[0]*=Ui,t[1]*=Ui}}),{type:"Polygon",coordinates:[a]}}var e,r,n=[0,0],a=6;return t.origin=function(e){return arguments.length?(n=e,t):n},t.angle=function(n){return arguments.length?(r=mr((e=+n)*Vi,a*Vi),t):e},t.precision=function(n){return arguments.length?(r=mr(e*Vi,(a=+n)*Vi),t):a},t.angle(90)},ui.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Vi,a=t[1]*Vi,o=e[1]*Vi,i=Math.sin(n),l=Math.cos(n),s=Math.sin(a),c=Math.cos(a),u=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((r=f*i)*r+(r=c*u-s*f*l)*r),s*u+c*f*l)},ui.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return ui.range(Math.ceil(o/m)*m,a,m).map(d).concat(ui.range(Math.ceil(c/v)*v,s,v).map(h)).concat(ui.range(Math.ceil(n/p)*p,r,p).filter(function(t){return bi(t%m)>Ii}).map(u)).concat(ui.range(Math.ceil(l/g)*g,i,g).filter(function(t){return bi(t%v)>Ii}).map(f))}var r,n,a,o,i,l,s,c,u,f,d,h,p=10,g=p,m=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(h(s).slice(1),d(a).reverse().slice(1),h(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],a=+e[1][0],c=+e[0][1],s=+e[1][1],o>a&&(e=o,o=a,a=e),c>s&&(e=c,c=s,s=e),t.precision(y)):[[o,c],[a,s]]},t.minorExtent=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],l=+e[0][1],i=+e[1][1],n>r&&(e=n,n=r,r=e),l>i&&(e=l,l=i,i=e),t.precision(y)):[[n,l],[r,i]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(m=+e[0],v=+e[1],t):[m,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(y=+e,u=yr(l,i,90),f=xr(n,r,y),d=yr(c,s,90),h=xr(o,a,y),t):y},t.majorExtent([[-180,-90+Ii],[180,90-Ii]]).minorExtent([[-180,-80-Ii],[180,80+Ii]])},ui.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||a.apply(this,arguments)]}}var e,r,n=br,a=_r;return t.distance=function(){return ui.geo.distance(e||n.apply(this,arguments),r||a.apply(this,arguments))},t.source=function(r){return arguments.length?(n=r,e="function"==typeof r?null:r,t):n},t.target=function(e){return arguments.length?(a=e,r="function"==typeof e?null:e,t):a},t.precision=function(){return arguments.length?t:0},t},ui.geo.interpolate=function(t,e){return wr(t[0]*Vi,t[1]*Vi,e[0]*Vi,e[1]*Vi)},ui.geo.length=function(t){return Zl=0,ui.geo.stream(t,Wl),Zl};var Zl,Wl={sphere:M,point:M,lineStart:Mr,lineEnd:M,polygonStart:M,polygonEnd:M},$l=kr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(ui.geo.azimuthalEqualArea=function(){return lr($l)}).raw=$l;var Ql=kr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},b);(ui.geo.azimuthalEquidistant=function(){return lr(Ql)}).raw=Ql,(ui.geo.conicConformal=function(){return Ye(Ar)}).raw=Ar,(ui.geo.conicEquidistant=function(){return Ye(Tr)}).raw=Tr;var Jl=kr(function(t){return 1/t},Math.atan);(ui.geo.gnomonic=function(){return lr(Jl)}).raw=Jl,Lr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Hi]},(ui.geo.mercator=function(){return Cr(Lr)}).raw=Lr;var Kl=kr(function(){return 1},Math.asin);(ui.geo.orthographic=function(){return lr(Kl)}).raw=Kl;var ts=kr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(ui.geo.stereographic=function(){return lr(ts)}).raw=ts,Sr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Hi]},(ui.geo.transverseMercator=function(){var t=Cr(Sr),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):(t=r(),[t[0],t[1],t[2]-90])},r([0,0,90])}).raw=Sr,ui.geom={},ui.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,a=Ct(r),o=Ct(n),i=t.length,l=[],s=[];for(e=0;e=0;--e)h.push(t[l[c[e]][2]]);for(e=+f;e=n&&c.x<=o&&c.y>=a&&c.y<=i?[[n,i],[o,i],[o,a],[n,a]]:[]).point=t[l]}),e}function r(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Ii)*Ii,y:Math.round(i(t,e)/Ii)*Ii,i:e}})}var n=zr,a=Or,o=n,i=a,l=cs;return t?e(t):(e.links=function(t){return cn(r(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return cn(r(t)).cells.forEach(function(r,n){for(var a,o=r.site,i=r.edges.sort(Yr),l=-1,s=i.length,c=i[s-1].edge,u=c.l===o?c.r:c.l;++l=c,d=n>=u,h=d<<1|f;t.leaf=!1,t=t.nodes[h]||(t.nodes[h]=pn()),f?a=c:l=c,d?i=u:s=u,o(t,e,r,n,a,i,l,s)}var u,f,d,h,p,g,m,v,y,x=Ct(l),b=Ct(s);if(null!=e)g=e,m=r,v=n,y=a;else if(v=y=-(g=m=1/0),f=[],d=[],p=t.length,i)for(h=0;hv&&(v=u.x),u.y>y&&(y=u.y),f.push(u.x),d.push(u.y);else for(h=0;hv&&(v=_),w>y&&(y=w),f.push(_),d.push(w)}var M=v-g,k=y-m;M>k?y=m+M:v=g+k;var A=pn();if(A.add=function(t){o(A,t,+x(t,++h),+b(t,h),g,m,v,y)},A.visit=function(t){gn(t,A,g,m,v,y)},A.find=function(t){return mn(A,t[0],t[1],g,m,v,y)},h=-1,null==e){for(;++h=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=hs.get(r)||ds,n=ps.get(n)||b,Mn(n(r.apply(null,fi.call(arguments,1))))},ui.interpolateHcl=Rn,ui.interpolateHsl=In,ui.interpolateLab=jn,ui.interpolateRound=Fn,ui.transform=function(t){var e=hi.createElementNS(ui.ns.prefix.svg,"g");return(ui.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Bn(r?r.matrix:gs)})(t)},Bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gs={a:1,b:0,c:0,d:1,e:0,f:0};ui.interpolateTransform=Wn,ui.layout={},ui.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r0?a=t:(r.c=null,r.t=NaN,r=null,c.end({type:"end",alpha:a=0})):t>0&&(c.start({type:"start",alpha:a=t}),r=Dt(s.tick)),s):a},s.start=function(){function t(t,n){if(!r){for(r=new Array(a),s=0;s=0;)i.push(u=c[s]),u.parent=o,u.depth=o.depth+1;n&&(o.value=0),o.children=c}else n&&(o.value=+n.call(t,o,o.depth)||0),delete o.children;return sa(a,function(t){var r,a;e&&(r=t.children)&&r.sort(e),n&&(a=t.parent)&&(a.value+=t.value)}),l}var e=fa,r=ca,n=ua;return t.sort=function(r){return arguments.length?(e=r,t):e},t.children=function(e){return arguments.length?(r=e,t):r},t.value=function(e){return arguments.length?(n=e,t):n},t.revalue=function(e){return n&&(la(e,function(t){t.children&&(t.value=0)}),sa(e,function(e){var r;e.children||(e.value=+n.call(t,e,e.depth)||0),(r=e.parent)&&(r.value+=e.value)})),e},t},ui.layout.partition=function(){function t(e,r,n,a){var o=e.children;if(e.x=r,e.y=e.depth*a,e.dx=n,e.dy=a,o&&(i=o.length)){var i,l,s,c=-1;for(n=e.value?n/e.value:0;++cl&&(l=n),i.push(n)}for(r=0;r0)for(o=-1;++o=u[0]&&l<=u[1]&&(i=s[ui.bisect(f,l,1,h)-1],i.y+=p,i.push(t[o]));return s}var e=!0,r=Number,n=Ma,a=_a;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=Ct(e),t):n},t.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return wa(t,e)}:Ct(e),t):a},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},ui.layout.pack=function(){function t(t,o){var i=r.call(this,t,o),l=i[0],s=a[0],c=a[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(l.x=l.y=0,sa(l,function(t){t.r=+u(t.value)}),sa(l,Ca),n){var f=n*(e?1:Math.max(2*l.r/s,2*l.r/c))/2;sa(l,function(t){t.r+=f}),sa(l,Ca),sa(l,function(t){t.r-=f})}return Oa(l,s/2,c/2,e?1:1/Math.max(2*l.r/s,2*l.r/c)),i}var e,r=ui.layout.hierarchy().sort(ka),n=0,a=[1,1];return t.size=function(e){return arguments.length?(a=e,t):a},t.radius=function(r){return arguments.length?(e=null==r||"function"==typeof r?r:+r,t):e},t.padding=function(e){return arguments.length?(n=+e,t):n},ia(t,r)},ui.layout.tree=function(){function t(t,a){var u=i.call(this,t,a),f=u[0],d=e(f);if(sa(d,r),d.parent.m=-d.z,la(d,n),c)la(f,o);else{var h=f,p=f,g=f;la(f,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var m=l(h,p)/2-h.x,v=s[0]/(p.x+l(p,h)/2+m),y=s[1]/(g.depth||1);la(f,function(t){t.x=(t.x+m)*v,t.y=t.depth*y})}return u}function e(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var a,o=e.children,i=0,l=o.length;i0&&(Ra(ja(i,t,r),t,n),c+=n,u+=n),f+=i.m,c+=a.m,d+=s.m,u+=o.m;i&&!Na(o)&&(o.t=i,o.m+=f-u),a&&!Ea(s)&&(s.t=a,s.m+=c-d,r=t)}return r}function o(t){t.x*=s[0],t.y=t.depth*s[1]}var i=ui.layout.hierarchy().sort(null).value(null),l=Da,s=[1,1],c=null;return t.separation=function(e){return arguments.length?(l=e,t):l},t.size=function(e){return arguments.length?(c=null==(s=e)?o:null,t):c?null:s},t.nodeSize=function(e){return arguments.length?(c=null==(s=e)?null:o,t):c?s:null},ia(t,i)},ui.layout.cluster=function(){function t(t,o){var i,l=e.call(this,t,o),s=l[0],c=0;sa(s,function(t){var e=t.children;e&&e.length?(t.x=Ba(e),t.y=Fa(e)):(t.x=i?c+=r(t,i):0,t.y=0,i=t)});var u=qa(s),f=Ha(s),d=u.x-r(u,f)/2,h=f.x+r(f,u)/2;return sa(s,a?function(t){t.x=(t.x-s.x)*n[0],t.y=(s.y-t.y)*n[1]}:function(t){t.x=(t.x-d)/(h-d)*n[0],t.y=(1-(s.y?t.y/s.y:1))*n[1]}),l}var e=ui.layout.hierarchy().sort(null).value(null),r=Da,n=[1,1],a=!1;return t.separation=function(e){return arguments.length?(r=e,t):r},t.size=function(e){return arguments.length?(a=null==(n=e),t):a?null:n},t.nodeSize=function(e){return arguments.length?(a=null!=(n=e),t):a?n:null},ia(t,e)},ui.layout.treemap=function(){function t(t,e){for(var r,n,a=-1,o=t.length;++a0;)u.push(i=d[s-1]),u.area+=i.area,"squarify"!==h||(l=n(u,g))<=p?(d.pop(),p=l):(u.area-=u.pop().area,a(u,g,c,!1),g=Math.min(c.dx,c.dy),u.length=u.area=0,p=1/0);u.length&&(a(u,g,c,!0),u.length=u.area=0),o.forEach(e)}}function r(e){var n=e.children;if(n&&n.length){var o,i=f(e),l=n.slice(),s=[];for(t(l,i.dx*i.dy/e.value),s.area=0;o=l.pop();)s.push(o),s.area+=o.area,null!=o.z&&(a(s,o.z?i.dx:i.dy,i,!l.length),s.length=s.area=0);n.forEach(r)}}function n(t,e){for(var r,n=t.area,a=0,o=1/0,i=-1,l=t.length;++ia&&(a=r));return n*=n,e*=e,n?Math.max(e*a*p/n,n/(e*o*p)):1/0}function a(t,e,r,n){var a,o=-1,i=t.length,l=r.x,c=r.y,u=e?s(t.area/e):0;if(e==r.dx){for((n||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=ui.random.normal.apply(ui,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=ui.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;rf?0:1;if(c=qi)return e(c,h)+(t?e(t,1-h):"")+"Z";var p,g,m,v,y,x,b,_,w,M,k,A,T=0,L=0,C=[];if((v=(+s.apply(this,arguments)||0)/2)&&(m=o===zs?Math.sqrt(t*t+c*c):+o.apply(this,arguments),h||(L*=-1),c&&(L=nt(m/c*Math.sin(v))),t&&(T=nt(m/t*Math.sin(v)))),c){y=c*Math.cos(u+L),x=c*Math.sin(u+L),b=c*Math.cos(f-L),_=c*Math.sin(f-L);var S=Math.abs(f-u-2*L)<=Fi?0:1;if(L&&bo(y,x,b,_)===h^S){var z=(u+f)/2;y=c*Math.cos(z),x=c*Math.sin(z),b=_=null}}else y=x=0;if(t){w=t*Math.cos(f-T),M=t*Math.sin(f-T),k=t*Math.cos(u+T),A=t*Math.sin(u+T);var O=Math.abs(u-f+2*T)<=Fi?0:1;if(T&&bo(w,M,k,A)===1-h^O){var P=(u+f)/2;w=t*Math.cos(P),M=t*Math.sin(P),k=A=null}}else w=M=0;if(d>Ii&&(p=Math.min(Math.abs(c-t)/2,+a.apply(this,arguments)))>.001){g=tFi)+",1 "+e}function a(t,e,r,n){return"Q 0,0 "+n}var o=br,i=_r,l=Go,s=vo,c=yo;return t.radius=function(e){return arguments.length?(l=Ct(e),t):l},t.source=function(e){return arguments.length?(o=Ct(e),t):o},t.target=function(e){return arguments.length?(i=Ct(e),t):i},t.startAngle=function(e){return arguments.length?(s=Ct(e),t):s},t.endAngle=function(e){return arguments.length?(c=Ct(e),t):c},t},ui.svg.diagonal=function(){function t(t,a){var o=e.call(this,t,a),i=r.call(this,t,a),l=(o.y+i.y)/2,s=[o,{x:o.x,y:l},{x:i.x,y:l},i];return s=s.map(n),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=br,r=_r,n=Yo;return t.source=function(r){return arguments.length?(e=Ct(r),t):e},t.target=function(e){return arguments.length?(r=Ct(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},ui.svg.diagonal.radial=function(){var t=ui.svg.diagonal(),e=Yo,r=t.projection;return t.projection=function(t){return arguments.length?r(Xo(e=t)):e},t},ui.svg.symbol=function(){function t(t,n){return(Ns.get(e.call(this,t,n))||$o)(r.call(this,t,n))}var e=Wo,r=Zo;return t.type=function(r){return arguments.length?(e=Ct(r),t):e},t.size=function(e){return arguments.length?(r=Ct(e),t):r},t};var Ns=ui.map({circle:$o,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Is)),r=e*Is;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rs),r=e*Rs/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rs),r=e*Rs/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});ui.svg.symbolTypes=Ns.keys();var Rs=Math.sqrt(3),Is=Math.tan(30*Vi);Si.transition=function(t){for(var e,r,n=js||++Hs,a=ei(t),o=[],i=Fs||{time:Date.now(),ease:Cn,delay:0,duration:250},l=-1,s=this.length;++lrect,.s>rect").attr("width",f[1]-f[0])}function a(t){t.select(".extent").attr("y",d[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function o(){function o(){32==ui.event.keyCode&&(S||(x=null,O[0]-=f[1],O[1]-=d[1],S=2),T())}function g(){32==ui.event.keyCode&&2==S&&(O[0]+=f[1],O[1]+=d[1],S=0,T())}function m(){var t=ui.mouse(_),n=!1;b&&(t[0]+=b[0],t[1]+=b[1]),S||(ui.event.altKey?(x||(x=[(f[0]+f[1])/2,(d[0]+d[1])/2]),O[0]=f[+(t[0]13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{}],18:[function(t,e,r){function n(t,e){var r=e[0],n=e[1],a=e[2],o=e[3],i=r+r,l=n+n,s=a+a,c=r*i,u=n*i,f=n*l,d=a*i,h=a*l,p=a*s,g=o*i,m=o*l,v=o*s;return t[0]=1-f-p,t[1]=u+v,t[2]=d-m,t[3]=0,t[4]=u-v,t[5]=1-c-p,t[6]=h+g,t[7]=0,t[8]=d+m,t[9]=h-g,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}e.exports=n},{}],19:[function(t,e,r){(function(r){"use strict";var n,a=t("is-browser");n="function"==typeof r.matchMedia?!r.matchMedia("(hover: none)").matches:a,e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"is-browser":20}],20:[function(t,e,r){e.exports=!0},{}],21:[function(t,e,r){function n(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n=t.clientX||0,o=t.clientY||0,i=a(e);return r[0]=n-i.left,r[1]=o-i.top,r}function a(t){return t===window||t===document||t===document.body?o:t.getBoundingClientRect()}var o={left:0,top:0};e.exports=n},{}],22:[function(e,r,n){!function(e){function n(t,e){if(t=t||"",e=e||{},t instanceof n)return t;if(!(this instanceof n))return new n(t,e);var r=a(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=H(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=H(this._r)),this._g<1&&(this._g=H(this._g)),this._b<1&&(this._b=H(this._b)),this._ok=r.ok,this._tc_id=q++}function a(t){var e={r:0,g:0,b:0},r=1,n=null,a=null,i=null,s=!1,u=!1;return"string"==typeof t&&(t=I(t)),"object"==typeof t&&(R(t.r)&&R(t.g)&&R(t.b)?(e=o(t.r,t.g,t.b),s=!0,u="%"===String(t.r).substr(-1)?"prgb":"rgb"):R(t.h)&&R(t.s)&&R(t.v)?(n=D(t.s),a=D(t.v),e=c(t.h,n,a),s=!0,u="hsv"):R(t.h)&&R(t.s)&&R(t.l)&&(n=D(t.s),i=D(t.l),e=l(t.h,n,i),s=!0,u="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=T(r),{ok:s,format:t.format||u,r:V(255,U(e.r,0)),g:V(255,U(e.g,0)),b:V(255,U(e.b,0)),a:r}}function o(t,e,r){return{r:255*L(t,255),g:255*L(e,255),b:255*L(r,255)}}function i(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,a,o=U(t,e,r),i=V(t,e,r),l=(o+i)/2;if(o==i)n=a=0;else{var s=o-i;switch(a=l>.5?s/(2-o-i):s/(o+i),o){case t:n=(e-r)/s+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var a,o,i;if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)a=o=i=r;else{var l=r<.5?r*(1+e):r+e-r*e,s=2*r-l;a=n(s,l,t+1/3),o=n(s,l,t),i=n(s,l,t-1/3)}return{r:255*a,g:255*o,b:255*i}}function s(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,a,o=U(t,e,r),i=V(t,e,r),l=o,s=o-i;if(a=0===o?0:s/o,o==i)n=0;else{switch(o){case t:n=(e-r)/s+(e>1)+720)%360;--e;)a.h=(a.h+o)%360,i.push(n(a));return i}function A(t,e){e=e||6;for(var r=n(t).toHsv(),a=r.h,o=r.s,i=r.v,l=[],s=1/e;e--;)l.push(n({h:a,s:o,v:i})),i=(i+s)%1;return l}function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(t,r){z(t)&&(t="100%");var n=O(t);return t=V(r,U(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function C(t){return V(1,U(0,t))}function S(t){return parseInt(t,16)}function z(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function O(t){return"string"==typeof t&&-1!=t.indexOf("%")}function P(t){return 1==t.length?"0"+t:""+t}function D(t){return t<=1&&(t=100*t+"%"),t}function E(t){return e.round(255*parseFloat(t)).toString(16)}function N(t){return S(t)/255}function R(t){return!!Z.CSS_UNIT.exec(t)}function I(t){t=t.replace(F,"").replace(B,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Z.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=Z.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Z.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=Z.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Z.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=Z.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Z.hex8.exec(t))?{r:S(r[1]),g:S(r[2]),b:S(r[3]),a:N(r[4]),format:e?"name":"hex8"}:(r=Z.hex6.exec(t))?{r:S(r[1]),g:S(r[2]),b:S(r[3]),format:e?"name":"hex"}:(r=Z.hex4.exec(t))?{r:S(r[1]+""+r[1]),g:S(r[2]+""+r[2]),b:S(r[3]+""+r[3]),a:N(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=Z.hex3.exec(t))&&{r:S(r[1]+""+r[1]),g:S(r[2]+""+r[2]),b:S(r[3]+""+r[3]),format:e?"name":"hex"}}function j(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var F=/^\s+/,B=/\s+$/,q=0,H=e.round,V=e.min,U=e.max,G=e.random;n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,n,a,o,i,l=this.toRgb();return t=l.r/255,r=l.g/255,n=l.b/255,a=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),o=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),i=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),.2126*a+.7152*o+.0722*i},setAlpha:function(t){return this._a=T(t),this._roundA=H(100*this._a)/100,this},toHsv:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=s(this._r,this._g,this._b),e=H(360*t.h),r=H(100*t.s),n=H(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=H(360*t.h),r=H(100*t.s),n=H(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return u(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return f(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:H(this._r),g:H(this._g),b:H(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+H(this._r)+", "+H(this._g)+", "+H(this._b)+")":"rgba("+H(this._r)+", "+H(this._g)+", "+H(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:H(100*L(this._r,255))+"%",g:H(100*L(this._g,255))+"%",b:H(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+H(100*L(this._r,255))+"%, "+H(100*L(this._g,255))+"%, "+H(100*L(this._b,255))+"%)":"rgba("+H(100*L(this._r,255))+"%, "+H(100*L(this._g,255))+"%, "+H(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){ +return 0===this._a?"transparent":!(this._a<1)&&(X[u(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+d(this._r,this._g,this._b,this._a),r=e,a=this._gradientType?"GradientType = 1, ":"";if(t){var o=n(t);r="#"+d(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]="a"===a?t[a]:D(t[a]));t=r}return n(t,e)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:G(),g:G(),b:G()})},n.mix=function(t,e,r){r=0===r?0:r||50;var a=n(t).toRgb(),o=n(e).toRgb(),i=r/100;return n({r:(o.r-a.r)*i+a.r,g:(o.g-a.g)*i+a.g,b:(o.b-a.b)*i+a.b,a:(o.a-a.a)*i+a.a})},n.readability=function(t,r){var a=n(t),o=n(r);return(e.max(a.getLuminance(),o.getLuminance())+.05)/(e.min(a.getLuminance(),o.getLuminance())+.05)},n.isReadable=function(t,e,r){var a,o,i=n.readability(t,e);switch(o=!1,a=j(r),a.level+a.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},n.mostReadable=function(t,e,r){var a,o,i,l,s=null,c=0;r=r||{},o=r.includeFallbackColors,i=r.level,l=r.size;for(var u=0;uc&&(c=a,s=n(e[u]));return n.isReadable(t,s,{level:i,size:l})||!o?s:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var Y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},X=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(Y),Z=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();void 0!==r&&r.exports?r.exports=n:"function"==typeof t&&t.amd?t(function(){return n}):window.tinycolor=n}(Math)},{}],23:[function(e,r,n){!function(e,a){"object"==typeof n&&void 0!==r?a(n):"function"==typeof t&&t.amd?t(["exports"],a):a(e.topojson=e.topojson||{})}(this,function(t){"use strict";function e(t,e){var n=e.id,a=e.bbox,o=null==e.properties?{}:e.properties,i=r(t,e);return null==n&&null==a?{type:"Feature",properties:o,geometry:i}:null==a?{type:"Feature",id:n,properties:o,geometry:i}:{type:"Feature",id:n,bbox:a,properties:o,geometry:i}}function r(t,e){function r(t,e){e.length&&e.pop();for(var r=f[t<0?~t:t],n=0,a=r.length;n1)n=a(t,e,r);else for(o=0,n=new Array(i=t.arcs.length);o1)for(var a,o,s=1,c=i(n[0]);sc&&(o=n[0],n[0]=n[s],n[s]=o,c=a);return n})}}var l=function(t){return t},s=function(t){if(null==(e=t.transform))return l;var e,r,n,a=e.scale[0],o=e.scale[1],i=e.translate[0],s=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*a+i,t[1]=(n+=t[1])*o+s,t}},c=function(t){function e(t){l[0]=t[0],l[1]=t[1],i(l),l[0]f&&(f=l[0]),l[1]d&&(d=l[1])}function r(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(r);break;case"Point":e(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(e)}}var n=t.bbox;if(!n){var a,o,i=s(t),l=new Array(2),c=1/0,u=c,f=-c,d=-c;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++ef&&(f=l[0]),l[1]d&&(d=l[1])});for(o in t.objects)r(t.objects[o]);n=t.bbox=[c,u,f,d]}return n},u=function(t,e){for(var r,n=t.length,a=n-e;a<--n;)r=t[a],t[a++]=t[n],t[n]=r},f=function(t,r){return"GeometryCollection"===r.type?{type:"FeatureCollection",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},d=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],a=n[0];return t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1],e<0?[r,a]:[a,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){a[t<0?~t:t]=1}),l.push(n)}}var a={},o={},i={},l=[],s=-1;return e.forEach(function(r,n){var a,o=t.arcs[r<0?~r:r];o.length<3&&!o[1][0]&&!o[1][1]&&(a=e[++s],e[s]=r,e[n]=a)}),e.forEach(function(t){var e,n,a=r(t),l=a[0],s=a[1];if(e=i[l])if(delete i[e.end],e.push(t),e.end=s,n=o[s]){delete o[n.start];var c=n===e?e:e.concat(n);o[c.start=e.start]=i[c.end=n.end]=c}else o[e.start]=i[e.end]=e;else if(e=o[s])if(delete o[e.start],e.unshift(t),e.start=l,n=i[l]){delete i[n.end];var u=n===e?e:n.concat(e);o[u.start=n.start]=i[u.end=e.end]=u}else o[e.start]=i[e.end]=e;else e=[t],o[e.start=l]=i[e.end=s]=e}),n(i,o),n(o,i),e.forEach(function(t){a[t<0?~t:t]||l.push([t])}),l},h=function(t){return r(t,n.apply(this,arguments))},p=function(t){return r(t,i.apply(this,arguments))},g=function(t,e){for(var r=0,n=t.length;r>>1;t[a]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var a,o=c(t),i=o[0],l=(o[2]-i)/(e-1)||1,s=o[1],u=(o[3]-s)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,a=1,o=1,c=t.length,f=t[0],d=f[0]=Math.round((f[0]-i)/l),h=f[1]=Math.round((f[1]-s)/u);a1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+l+'"]').remove():(s.pdata=a(t.glplot.cameraParams,[e.xaxis.r2l(s.x)*r[0],e.yaxis.r2l(s.y)*r[1],e.zaxis.r2l(s.z)*r[2]]),n(t.graphDiv,s,l,t.id,s._xa,s._ya))}}},{"../../plots/gl3d/project":230,"../annotations/draw":37}],28:[function(t,e,r){"use strict";e.exports={moduleType:"component",name:"annotations3d",schema:{layout:{"scene.annotations":t("./attributes")}},layoutAttributes:t("./attributes"),handleDefaults:t("./defaults"),convert:t("./convert"),draw:t("./draw")}},{"./attributes":24,"./convert":25,"./defaults":26,"./draw":27}],29:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./common_defaults"),i=t("./attributes");e.exports=function(t,e,r,l,s){function c(r,a){return n.coerce(t,e,i,r,a)}l=l||{},s=s||{};var u=c("visible",!s.itemIsNotPlainObject),f=c("clicktoshow");if(!u&&!f)return e;o(t,e,r,c);for(var d=e.showarrow,h=["x","y"],p=[-10,-30],g={_fullLayout:r},m=0;m<2;m++){var v=h[m],y=a.coerceRef(t,e,g,v,"","paper");if(a.coercePosition(e,g,c,y,v,.5),d){var x="a"+v,b=a.coerceRef(t,e,g,x,"pixel");"pixel"!==b&&b!==y&&(b=e[x]="pixel");var _="pixel"===b?p[m]:.4;a.coercePosition(e,g,c,b,x,_)}c(v+"anchor"),c(v+"shift")}if(n.noneOrAll(t,e,["x","y"]),d&&n.noneOrAll(t,e,["ax","ay"]),t.classes&&(e.classes=t.classes),f){var w=c("xclick"),M=c("yclick");e._xclick=void 0===w?e.x:a.cleanPosition(w,g,e.xref),e._yclick=void 0===M?e.y:a.cleanPosition(M,g,e.yref)}return e}},{"../../lib":156,"../../plots/cartesian/axes":192,"./attributes":31,"./common_defaults":34}],30:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0},{path:"M2,2V-2H-2V2Z",backoff:0}]},{}],31:[function(t,e,r){"use strict";var n=t("./arrow_paths"),a=t("../../plots/font_attributes"),o=t("../../plots/cartesian/constants"),i=t("../../lib/extend").extendFlat;e.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",dflt:!0},text:{valType:"string"},textangle:{valType:"angle",dflt:0},font:i({},a,{}),width:{valType:"number",min:1,dflt:null},height:{valType:"number",min:1,dflt:null},opacity:{valType:"number",min:0,max:1,dflt:1},align:{valType:"enumerated",values:["left","center","right"],dflt:"center"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)"},borderpad:{valType:"number",min:0,dflt:1},borderwidth:{valType:"number",min:0,dflt:1},showarrow:{valType:"boolean",dflt:!0},arrowcolor:{valType:"color"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1},arrowsize:{valType:"number",min:.3,dflt:1},arrowwidth:{valType:"number",min:.1},standoff:{valType:"number",min:0,dflt:0},ax:{valType:"any"},ay:{valType:"any"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()]},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()]},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()]},x:{valType:"any"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},xshift:{valType:"number",dflt:0},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()]},y:{valType:"any"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"},yshift:{valType:"number",dflt:0},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1},xclick:{valType:"any"},yclick:{valType:"any"},hovertext:{valType:"string"},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:i({},a,{})},captureevents:{valType:"boolean"},_deprecated:{ref:{valType:"string"}}}},{"../../lib/extend":150,"../../plots/cartesian/constants":197,"../../plots/font_attributes":216,"./arrow_paths":30}],32:[function(t,e,r){"use strict";function n(t){var e=t._fullLayout;a.filterVisible(e.annotations).forEach(function(e){var r,n,a=o.getFromId(t,e.xref),i=o.getFromId(t,e.yref),l=3*e.arrowsize*e.arrowwidth||0;a&&a.autorange&&(r=l+e.xshift,n=l-e.xshift,e.axref===e.xref?(o.expand(a,[a.r2c(e.x)],{ppadplus:r,ppadminus:n}),o.expand(a,[a.r2c(e.ax)],{ppadplus:e._xpadplus,ppadminus:e._xpadminus})):o.expand(a,[a.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,r),ppadminus:Math.max(e._xpadminus,n)})),i&&i.autorange&&(r=l-e.yshift,n=l+e.yshift,e.ayref===e.yref?(o.expand(i,[i.r2c(e.y)],{ppadplus:r,ppadminus:n}),o.expand(i,[i.r2c(e.ay)],{ppadplus:e._ypadplus,ppadminus:e._ypadminus})):o.expand(i,[i.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,r),ppadminus:Math.max(e._ypadminus,n)}))})}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./draw").draw;e.exports=function(t){var e=t._fullLayout,r=a.filterVisible(e.annotations);if(r.length&&t._fullData.length){var l={};r.forEach(function(t){l[t.xref]=!0,l[t.yref]=!0});if(o.list(t).filter(function(t){return t.autorange&&l[t._id]}).length)return a.syncOrAsync([i,n],t)}}},{"../../lib":156,"../../plots/cartesian/axes":192,"./draw":37}],33:[function(t,e,r){"use strict";function n(t,e){var r=o(t,e);return r.on.length>0||r.explicitOff.length>0}function a(t,e){var r,n=o(t,e),a=n.on,i=n.off.concat(n.explicitOff),s={};if(a.length||i.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}var l=R.selectAll("a");if(1===l.size()&&l.text()===R.text()){C.insert("a",":first-child").attr({"xlink:xlink:href":l.attr("xlink:href"),"xlink:xlink:show":l.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(P.node())}var c=C.select(".annotation-text-math-group"),f=!c.empty(),p=h.bBox((f?c:R).node()),x=p.width,z=p.height,N=e.width||x,I=e.height||z,j=Math.round(N+2*O),F=Math.round(I+2*O);e._w=N,e._h=I;for(var B=!1,q=["x","y"],H=0;H1)&&($===W?((ot=Q.r2fraction(e["a"+Z]))<0||ot>1)&&(B=!0):B=!0,B))continue;V=Q._offset+Q.r2p(e[Z]),Y=.5}else"x"===Z?(G=e[Z],V=w.l+w.w*G):(G=1-e[Z],V=w.t+w.h*G),Y=e.showarrow?.5:G;if(e.showarrow){at.head=V;var it=e["a"+Z];X=K*r(.5,e.xanchor)-tt*r(.5,e.yanchor),$===W?(at.tail=Q._offset+Q.r2p(it),U=X):(at.tail=V+it,U=X+it),at.text=at.tail+X;var lt=_["x"===Z?"width":"height"];if("paper"===W&&(at.head=u.constrain(at.head,1,lt-1)),"pixel"===$){var st=-Math.max(at.tail-3,at.text),ct=Math.min(at.tail+3,at.text)-lt;st>0?(at.tail+=st,at.text+=st):ct>0&&(at.tail-=ct,at.text-=ct)}at.tail+=nt,at.head+=nt}else X=et*r(Y,rt),U=X,at.text=V+X;at.text+=nt,X+=nt,U+=nt,e["_"+Z+"padplus"]=et/2+U,e["_"+Z+"padminus"]=et/2-U,e["_"+Z+"size"]=et,e["_"+Z+"shift"]=X}if(B)return void C.remove();var ut=0,ft=0;if("left"!==e.align&&(ut=(N-x)*("center"===e.align?.5:1)),"top"!==e.valign&&(ft=(I-z)*("middle"===e.valign?.5:1)),f)c.select("svg").attr({x:O+ut-1,y:O+ft}).call(h.setClipUrl,D?M:null);else{var dt=O+ft-p.top,ht=O+ut-p.left;R.call(g.positionText,ht,dt).call(h.setClipUrl,D?M:null)}E.select("rect").call(h.setRect,O,O,N,I),P.call(h.setRect,S/2,S/2,j-S,F-S),C.call(h.setTranslate,Math.round(k.x.text-j/2),Math.round(k.y.text-F/2)),L.attr({transform:"rotate("+A+","+k.x.text+","+k.y.text+")"});var pt=function(r,l){T.selectAll(".annotation-arrow-g").remove();var c=k.x.head,f=k.y.head,p=k.x.tail+r,g=k.y.tail+l,m=k.x.text+r,x=k.y.text+l,_=u.rotationXYMatrix(A,m,x),M=u.apply2DTransform(_),S=u.apply2DTransform2(_),z=+P.attr("width"),O=+P.attr("height"),D=m-.5*z,E=D+z,N=x-.5*O,R=N+O,I=[[D,N,D,R],[D,R,E,R],[E,R,E,N],[E,N,D,N]].map(S);if(!I.reduce(function(t,e){return t^!!i(c,f,c+1e6,f+1e6,e[0],e[1],e[2],e[3])},!1)){I.forEach(function(t){var e=i(p,g,c,f,t[0],t[1],t[2],t[3]);e&&(p=e.x,g=e.y)});var j=e.arrowwidth,F=e.arrowcolor,B=T.append("g").style({opacity:d.opacity(F)}).classed("annotation-arrow-g",!0),q=B.append("path").attr("d","M"+p+","+g+"L"+c+","+f).style("stroke-width",j+"px").call(d.stroke,d.rgb(F));if(y(q,e.arrowhead,"end",e.arrowsize,e.standoff),t._context.editable&&q.node().parentNode&&!n){var H=c,V=f;if(e.standoff){var U=Math.sqrt(Math.pow(c-p,2)+Math.pow(f-g,2));H+=e.standoff*(p-c)/U,V+=e.standoff*(g-f)/U}var G,Y,X,Z=B.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(p-H)+","+(g-V),transform:"translate("+H+","+V+")"}).style("stroke-width",j+6+"px").call(d.stroke,"rgba(0,0,0,0)").call(d.fill,"rgba(0,0,0,0)");v.init({element:Z.node(),gd:t,prepFn:function(){var t=h.getTranslate(C);Y=t.x,X=t.y,G={},a&&a.autorange&&(G[a._name+".autorange"]=!0),o&&o.autorange&&(G[o._name+".autorange"]=!0)},moveFn:function(t,r){var n=M(Y,X),i=n[0]+t,l=n[1]+r;C.call(h.setTranslate,i,l),G[b+".x"]=a?a.p2r(a.r2p(e.x)+t):e.x+t/w.w,G[b+".y"]=o?o.p2r(o.r2p(e.y)+r):e.y-r/w.h,e.axref===e.xref&&(G[b+".ax"]=a.p2r(a.r2p(e.ax)+t)),e.ayref===e.yref&&(G[b+".ay"]=o.p2r(o.r2p(e.ay)+r)),B.attr("transform","translate("+t+","+r+")"),L.attr({transform:"rotate("+A+","+i+","+l+")"})},doneFn:function(e){if(e){s.relayout(t,G);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}};if(e.showarrow&&pt(0,0),t._context.editable){var gt,mt;v.init({element:C.node(),gd:t,prepFn:function(){mt=L.attr("transform"),gt={}},moveFn:function(t,r){var i="pointer";if(e.showarrow)e.axref===e.xref?gt[b+".ax"]=a.p2r(a.r2p(e.ax)+t):gt[b+".ax"]=e.ax+t,e.ayref===e.yref?gt[b+".ay"]=o.p2r(o.r2p(e.ay)+r):gt[b+".ay"]=e.ay+r,pt(t,r);else{if(n)return;if(a)gt[b+".x"]=e.x+t/a._m;else{var l=e._xsize/w.w,s=e.x+(e._xshift-e.xshift)/w.w-l/2;gt[b+".x"]=v.align(s+t/w.w,l,0,1,e.xanchor)}if(o)gt[b+".y"]=e.y+r/o._m;else{var c=e._ysize/w.h,u=e.y-(e._yshift+e.yshift)/w.h-c/2;gt[b+".y"]=v.align(u-r/w.h,c,0,1,e.yanchor)}a&&o||(i=v.getCursor(a?.5:gt[b+".x"],o?.5:gt[b+".y"],e.xanchor,e.yanchor))}L.attr({transform:"translate("+t+","+r+")"+mt}),m(C,i)},doneFn:function(e){if(m(C),e){s.relayout(t,gt);var r=document.querySelector(".js-notes-box-panel");r&&r.redraw(r.selectedObj)}}})}}var x,b,_=t._fullLayout,w=t._fullLayout._size;n?(x="annotation-"+n,b=n+".annotations["+r+"]"):(x="annotation",b="annotations["+r+"]"),_._infolayer.selectAll("."+x+'[data-index="'+r+'"]').remove();var M="clip"+_._uid+"_ann"+r;if(!e._input||!1===e.visible)return void l.selectAll("#"+M).remove();var k={x:{},y:{}},A=+e.textangle||0,T=_._infolayer.append("g").classed(x,!0).attr("data-index",String(r)).style("opacity",e.opacity);e.classes&&T.classed(e.classes,!0);var L=T.append("g").classed("annotation-text-g",!0),C=L.append("g").style("pointer-events",e.captureevents?"all":null).call(m,"default").on("click",function(){t._dragging=!1;var a={index:r,annotation:e._input,fullAnnotation:e,event:l.event};n&&(a.subplotId=n),t.emit("plotly_clickannotation",a)});e.hovertext&&C.on("mouseover",function(){var r=e.hoverlabel,n=r.font,a=this.getBoundingClientRect(),o=t.getBoundingClientRect();p.loneHover({x0:a.left-o.left,x1:a.right-o.left,y:(a.top+a.bottom)/2-o.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:t})}).on("mouseout",function(){p.loneUnhover(_._hoverlayer.node())});var S=e.borderwidth,z=e.borderpad,O=S+z,P=C.append("rect").attr("class","bg").style("stroke-width",S+"px").call(d.stroke,e.bordercolor).call(d.fill,e.bgcolor),D=e.width||e.height,E=_._defs.select(".clips").selectAll("#"+M).data(D?[0]:[]);E.enter().append("clipPath").classed("annclip",!0).attr("id",M).append("rect"),E.exit().remove();var N=e.font,R=C.append("text").classed("annotation-text",!0).text(e.text);t._context.editable?R.call(g.makeEditable,{delegate:C,gd:t}).call(c).on("edit",function(r){e.text=r,this.call(c);var n={};n[b+".text"]=e.text,a&&a.autorange&&(n[a._name+".autorange"]=!0),o&&o.autorange&&(n[o._name+".autorange"]=!0),s.relayout(t,n)}):R.call(c)}function i(t,e,r,n,a,o,i,l){var s=r-t,c=a-t,u=i-a,f=n-e,d=o-e,h=l-o,p=s*h-u*f;if(0===p)return null;var g=(c*h-u*d)/p,m=(c*f-s*d)/p;return m<0||m>1||g<0||g>1?null:{x:t+s*g,y:e+f*g}}var l=t("d3"),s=t("../../plotly"),c=t("../../plots/plots"),u=t("../../lib"),f=t("../../plots/cartesian/axes"),d=t("../color"),h=t("../drawing"),p=t("../fx"),g=t("../../lib/svg_text_utils"),m=t("../../lib/setcursor"),v=t("../dragelement"),y=t("./draw_arrow_head");e.exports={draw:n,drawOne:a,drawRaw:o}},{"../../lib":156,"../../lib/setcursor":171,"../../lib/svg_text_utils":173, +"../../plotly":187,"../../plots/cartesian/axes":192,"../../plots/plots":233,"../color":41,"../dragelement":62,"../drawing":65,"../fx":82,"./draw_arrow_head":38,d3:15}],38:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),o=t("../color"),i=t("../drawing"),l=t("./arrow_paths");e.exports=function(t,e,r,s,c){function u(){t.style("stroke-dasharray","0px,100px")}function f(r,a){h.path&&(e>5&&(a=0),n.select(d.parentNode).append("path").attr({class:t.attr("class"),d:h.path,transform:"translate("+r.x+","+r.y+")rotate("+180*a/Math.PI+")scale("+y+")"}).style({fill:x,opacity:b,"stroke-width":0}))}a(s)||(s=1);var d=t.node(),h=l[e||0];"string"==typeof r&&r||(r="end");var p,g,m,v,y=(i.getPx(t,"stroke-width")||1)*s,x=t.style("stroke")||o.defaultLine,b=t.style("stroke-opacity")||1,_=r.indexOf("start")>=0,w=r.indexOf("end")>=0,M=h.backoff*y+c;if("line"===d.nodeName){p={x:+t.attr("x1"),y:+t.attr("y1")},g={x:+t.attr("x2"),y:+t.attr("y2")};var k=p.x-g.x,A=p.y-g.y;if(m=Math.atan2(A,k),v=m+Math.PI,M){if(M*M>k*k+A*A)return void u();var T=M*Math.cos(m),L=M*Math.sin(m);_&&(p.x-=T,p.y-=L,t.attr({x1:p.x,y1:p.y})),w&&(g.x+=T,g.y+=L,t.attr({x2:g.x,y2:g.y}))}}else if("path"===d.nodeName){var C=d.getTotalLength(),S="";if(C=0))return t;if(3===i)n[i]>1&&(n[i]=1);else if(n[i]>=1)return t}var l=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+l+", "+n[3]+")":"rgb("+l+")"}var a=t("tinycolor2"),o=t("fast-isnumeric"),i=e.exports={},l=t("./attributes");i.defaults=l.defaults;var s=i.defaultLine=l.defaultLine;i.lightLine=l.lightLine;var c=i.background=l.background;i.overrideColorDefaults=function(t){if(void 0===t)return i.defaults;i.defaults=t},i.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},i.rgb=function(t){return i.tinyRGB(a(t))},i.opacity=function(t){return t?a(t).getAlpha():0},i.addOpacity=function(t,e){var r=a(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},i.combine=function(t,e){var r=a(t).toRgb();if(1===r.a)return a(t).toRgbString();var n=a(e||c).toRgb(),o=1===n.a?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},i={r:o.r*(1-r.a)+r.r*r.a,g:o.g*(1-r.a)+r.g*r.a,b:o.b*(1-r.a)+r.b*r.a};return a(i).toRgbString()},i.contrast=function(t,e,r){var n=a(t);return 1!==n.getAlpha()&&(n=a(i.combine(t,c))),(n.isDark()?e?n.lighten(e):c:r?n.darken(r):s).toString()},i.stroke=function(t,e){var r=a(e);t.style({stroke:i.tinyRGB(r),"stroke-opacity":r.getAlpha()})},i.fill=function(t,e){var r=a(e);t.style({fill:i.tinyRGB(r),"fill-opacity":r.getAlpha()})},i.clean=function(t){if(t&&"object"==typeof t){var e,r,a,o,l=Object.keys(t);for(e=0;el&&(o[1]-=(ct-l)/2):r.node()&&!r.classed("js-placeholder")&&(ct=h.bBox(r.node()).height),ct){if(ct+=5,"top"===M.titleside)et.domain[1]-=ct/C.h,o[1]*=-1;else{et.domain[0]+=ct/C.h;var c=m.lineCount(r);o[1]+=(1-c)*l}e.attr("transform","translate("+o+")"),et.setScale()}}lt.selectAll(".cbfills,.cblines,.cbaxis").attr("transform","translate(0,"+Math.round(C.h*(1-et.domain[1]))+")");var f=lt.select(".cbfills").selectAll("rect.cbfill").data(P);f.enter().append("rect").classed("cbfill",!0).style("stroke","none"),f.exit().remove(),f.each(function(t,e){var r=[0===e?z[0]:(P[e]+P[e-1])/2,e===P.length-1?z[1]:(P[e]+P[e+1])/2].map(et.c2p).map(Math.round);e!==P.length-1&&(r[1]+=r[1]>r[0]?1:-1);var o=E(t).replace("e-",""),i=a(o).toHexString();n.select(this).attr({x:W,width:Math.max(H,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:i})});var d=lt.select(".cblines").selectAll("path.cbline").data(M.line.color&&M.line.width?O:[]);return d.enter().append("path").classed("cbline",!0),d.exit().remove(),d.each(function(t){n.select(this).attr("d","M"+W+","+(Math.round(et.c2p(t))+M.line.width/2%1)+"h"+H).call(h.lineGroupStyle,M.line.width,D(t),M.line.dash)}),et._axislayer.selectAll("g."+et._id+"tick,path").remove(),et._pos=W+H+(M.outlinewidth||0)/2-("outside"===M.ticks?1:0),et.side="right",u.syncOrAsync([function(){return s.doTicks(t,et,!0)},function(){if(-1===["top","bottom"].indexOf(M.titleside)){var e=et.titlefont.size,r=et._offset+et._length/2,a=C.l+(et.position||0)*C.w+("right"===et.side?10+e*(et.showticklabels?1:.5):-10-e*(et.showticklabels?.5:0));A("h"+et._id+"title",{avoid:{selection:n.select(t).selectAll("g."+et._id+"tick"),side:M.titleside,offsetLeft:C.l,offsetTop:C.t,maxShift:L.width},attributes:{x:a,y:r,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])}function A(e,r){var n,a=w();n=l.traceIs(a,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var o={propContainer:et,propName:n,traceIndex:a.index,dfltName:"colorscale",containerGroup:lt.select(".cbtitle")},i="h"===e.charAt(0)?e.substr(1):"h"+e;lt.selectAll("."+i+",."+i+"-math-group").remove(),g.draw(t,e,f(o,r||{}))}function T(){var r=H+M.outlinewidth/2+h.bBox(et._axislayer.node()).width;if(F=st.select("text"),F.node()&&!F.classed("js-placeholder")){var n,a=st.select(".h"+et._id+"title-math-group").node();n=a&&-1!==["top","bottom"].indexOf(M.titleside)?h.bBox(a).width:h.bBox(st.node()).right-W-C.l,r=Math.max(r,n)}var o=2*M.xpad+r+M.borderwidth+M.outlinewidth/2,l=J-K;lt.select(".cbbg").attr({x:W-M.xpad-(M.borderwidth+M.outlinewidth)/2,y:K-X,width:Math.max(o,2),height:Math.max(l+2*X,2)}).call(p.fill,M.bgcolor).call(p.stroke,M.bordercolor).style({"stroke-width":M.borderwidth}),lt.selectAll(".cboutline").attr({x:W,y:K+M.ypad+("top"===M.titleside?ct:0),width:Math.max(H,2),height:Math.max(l-2*M.ypad-ct,2)}).call(p.stroke,M.outlinecolor).style({fill:"None","stroke-width":M.outlinewidth});var s=({center:.5,right:1}[M.xanchor]||0)*o;lt.attr("transform","translate("+(C.l-s)+","+C.t+")"),i.autoMargin(t,e,{x:M.x,y:M.y,l:o*({right:1,center:.5}[M.xanchor]||0),r:o*({left:1,center:.5}[M.xanchor]||0),t:l*({bottom:1,middle:.5}[M.yanchor]||0),b:l*({top:1,middle:.5}[M.yanchor]||0)})}var L=t._fullLayout,C=L._size;if("function"!=typeof M.fillcolor&&"function"!=typeof M.line.color)return void L._infolayer.selectAll("g."+e).remove();var S,z=n.extent(("function"==typeof M.fillcolor?M.fillcolor:M.line.color).domain()),O=[],P=[],D="function"==typeof M.line.color?M.line.color:function(){return M.line.color},E="function"==typeof M.fillcolor?M.fillcolor:function(){return M.fillcolor},N=M.levels.end+M.levels.size/100,R=M.levels.size,I=1.001*z[0]-.001*z[1],j=1.001*z[1]-.001*z[0];for(S=M.levels.start;(S-N)*R<0;S+=R)S>I&&Sz[0]&&S1){var it=Math.pow(10,Math.floor(Math.log(ot)/Math.LN10));nt*=it*u.roundUp(ot/it,[2,5,10]),(Math.abs(M.levels.start)/M.levels.size+1e-6)%1<2e-6&&(et.tick0=0)}et.dtick=nt}et.domain=[Q+Z,Q+G-Z],et.setScale();var lt=L._infolayer.selectAll("g."+e).data([0]);lt.enter().append("g").classed(e,!0).each(function(){var t=n.select(this);t.append("rect").classed("cbbg",!0),t.append("g").classed("cbfills",!0),t.append("g").classed("cblines",!0),t.append("g").classed("cbaxis",!0).classed("crisp",!0),t.append("g").classed("cbtitleunshift",!0).append("g").classed("cbtitle",!0),t.append("rect").classed("cboutline",!0),t.select(".cbtitle").datum(0)}),lt.attr("transform","translate("+Math.round(C.l)+","+Math.round(C.t)+")");var st=lt.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(C.l)+",-"+Math.round(C.t)+")");et._axislayer=lt.select(".cbaxis");var ct=0;if(-1!==["top","bottom"].indexOf(M.titleside)){var ut,ft=C.l+(M.x+Y)*C.w,dt=et.titlefont.size;ut="top"===M.titleside?(1-(Q+G-Z))*C.h+C.t+3+.75*dt:(1-(Q+Z))*C.h+C.t-3-.25*dt,A(et._id+"title",{attributes:{x:ft,y:ut,"text-anchor":"start"}})}var ht=u.syncOrAsync([i.previousPromises,k,i.previousPromises,T],t);if(ht&&ht.then&&(t._promises||[]).push(ht),t._context.editable){var pt,gt,mt;c.init({element:lt.node(),gd:t,prepFn:function(){pt=lt.attr("transform"),d(lt)},moveFn:function(t,e){lt.attr("transform",pt+" translate("+t+","+e+")"),gt=c.align($+t/C.w,V,0,1,M.xanchor),mt=c.align(Q-e/C.h,G,0,1,M.yanchor);var r=c.getCursor(gt,mt,M.xanchor,M.yanchor);d(lt,r)},doneFn:function(e){d(lt),e&&void 0!==gt&&void 0!==mt&&o.restyle(t,{"colorbar.x":gt,"colorbar.y":mt},w().index)}})}return ht}function w(){var r,n,a=e.substr(2);for(r=0;r=0?a.Reds:a.Blues,s.colorscale=g,l.reversescale&&(g=o(g)),l.colorscale=g)}},{"../../lib":156,"./flip_scale":52,"./scales":59}],48:[function(t,e,r){"use strict";var n=t("./attributes"),a=t("../../lib/extend").extendDeep;t("./scales.js");e.exports=function(t){return{color:{valType:"color",arrayOk:!0},colorscale:a({},n.colorscale,{}),cauto:a({},n.zauto,{}),cmax:a({},n.zmax,{}),cmin:a({},n.zmin,{}),autocolorscale:a({},n.autocolorscale,{}),reversescale:a({},n.reversescale,{})}}},{"../../lib/extend":150,"./attributes":46,"./scales.js":59}],49:[function(t,e,r){"use strict";var n=t("./scales");e.exports=n.RdBu},{"./scales":59}],50:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),o=t("../colorbar/has_colorbar"),i=t("../colorbar/defaults"),l=t("./is_valid_scale"),s=t("./flip_scale");e.exports=function(t,e,r,c,u){var f=u.prefix,d=u.cLetter,h=f.slice(0,f.length-1),p=f?a.nestedProperty(t,h).get()||{}:t,g=f?a.nestedProperty(e,h).get()||{}:e,m=p[d+"min"],v=p[d+"max"],y=p.colorscale;c(f+d+"auto",!(n(m)&&n(v)&&m=0;a--,o++)e=t[a],n[o]=[1-e[0],e[1]];return n}},{}],53:[function(t,e,r){"use strict";var n=t("./scales"),a=t("./default_scale"),o=t("./is_valid_scale_array");e.exports=function(t,e){function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return e||(e=a),t?("string"==typeof t&&(r(),"string"==typeof t&&r()),o(t)?t:e):e}},{"./default_scale":49,"./is_valid_scale_array":57,"./scales":59}],54:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),o=t("./is_valid_scale");e.exports=function(t,e){var r=e?a.nestedProperty(t,e).get()||{}:t,i=r.color,l=!1;if(Array.isArray(i))for(var s=0;s4/3-l?i:l}},{}],61:[function(t,e,r){"use strict";var n=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,o){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:n.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":156}],62:[function(t,e,r){"use strict";function n(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function a(t){t._dragging=!1,t._replotPending&&s.plot(t)}function o(t){return i(t.changedTouches?t.changedTouches[0]:t,document.body)}var i=t("mouse-event-offset"),l=t("has-hover"),s=t("../../plotly"),c=t("../../lib"),u=t("../../plots/cartesian/constants"),f=t("../../constants/interactions"),d=e.exports={};d.align=t("./align"),d.getCursor=t("./cursor");var h=t("./unhover");d.unhover=h.wrapped,d.unhoverRaw=h.raw,d.init=function(t){function e(){var t=b&&b._fullLayout;return t&&"pan"===t.dragmode}function r(r,n){var a=function(t){return t&&t._input&&t._input.fixedrange};if(e()){var o=t&&t.plotinfo;if(a(o.yaxis)&&!r)return!1;if(a(o.xaxis)&&!n)return!1}return!0}function i(r){b._dragged=!1,b._dragging=!0;var a=o(r);if(p=a[0],g=a[1],x=r.target,m=(new Date).getTime(),m-b._mouseDownTimew&&(_=Math.max(_-1,1)),t.doneFn&&t.doneFn(b._dragged,_,r),!b._dragged){var n;try{n=new MouseEvent("click",r)}catch(t){var i=o(r);n=document.createEvent("MouseEvents"),n.initMouseEvent("click",r.bubbles,r.cancelable,r.view,r.detail,r.screenX,r.screenY,i[0],i[1],r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.button,r.relatedTarget)}x.dispatchEvent(n)}return a(b),b._dragged=!1,e()?void 0:c.pauseEvent(r)}var p,g,m,v,y,x,b=t.gd,_=1,w=f.DBLCLICKDELAY;b._mouseDownTime||(b._mouseDownTime=0),t.element.style.pointerEvents="all",t.element.onmousedown=i,t.element.ontouchstart=i},d.coverSlip=n},{"../../constants/interactions":138,"../../lib":156,"../../plotly":187,"../../plots/cartesian/constants":197,"./align":60,"./cursor":61,"./unhover":63,"has-hover":19,"mouse-event-offset":21}],63:[function(t,e,r){"use strict";var n=t("../../lib/events"),a=e.exports={};a.wrapped=function(t,e,r){"string"==typeof t&&(t=document.getElementById(t)),t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),a.raw(t,e,r)},a.raw=function(t,e){var r=t._fullLayout,a=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&a&&t.emit("plotly_unhover",{event:e,points:a}))}},{"../../lib/events":149}],64:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid"}},{}],65:[function(t,e,r){"use strict";function n(t,e,r,n,a,o,i,l){if(c.traceIs(r,"symbols")){var s=y(r);e.attr("d",function(t){var e;e="various"===t.ms||"various"===o.size?3:v.isBubble(r)?s(t.ms):(o.size||6)/2,t.mrc=e;var n=x.symbolNumber(t.mx||o.symbol)||0,a=n%100;return t.om=n%200>=100,x.symbolFuncs[a](e)+(n>=200?w:"")}).style("opacity",function(t){return(t.mo+1||o.opacity+1)-1})}var f,d,h,p=!1;if(t.so?(h=i.outlierwidth,d=i.outliercolor,f=o.outliercolor):(h=(t.mlw+1||i.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,d="mlc"in t?t.mlcc=a(t.mlc):Array.isArray(i.color)?u.defaultLine:i.color,Array.isArray(o.color)&&(f=u.defaultLine,p=!0),f="mc"in t?t.mcc=n(t.mc):o.color||"rgba(0,0,0,0)"),t.om)e.call(u.stroke,f).style({"stroke-width":(h||1)+"px",fill:"none"});else{e.style("stroke-width",h+"px");var g=o.gradient,m=t.mgt;if(m?p=!0:m=g&&g.type,m&&"none"!==m){var b=t.mgc;b?p=!0:b=g.color;var _="g"+l._fullLayout._uid+"-"+r.uid;p&&(_+="-"+t.i),e.call(x.gradient,l,_,m,f,b)}else e.call(u.fill,f);h&&e.call(u.stroke,d)}}function a(t,e,r,n){var a=t[0]-e[0],o=t[1]-e[1],l=r[0]-e[0],s=r[1]-e[1],c=Math.pow(a*a+o*o,T/2),u=Math.pow(l*l+s*s,T/2),f=(u*u*a-c*c*l)*n,d=(u*u*o-c*c*s)*n,h=3*u*(c+u),p=3*c*(c+u);return[[i.round(e[0]+(h&&f/h),2),i.round(e[1]+(h&&d/h),2)],[i.round(e[0]-(p&&f/p),2),i.round(e[1]-(p&&d/p),2)]]}function o(t){var e=t.getAttribute("data-unformatted");if(null!==e)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}var i=t("d3"),l=t("fast-isnumeric"),s=t("tinycolor2"),c=t("../../registry"),u=t("../color"),f=t("../colorscale"),d=t("../../lib"),h=t("../../lib/svg_text_utils"),p=t("../../constants/xmlns_namespaces"),g=t("../../constants/alignment"),m=g.LINE_SPACING,v=t("../../traces/scatter/subtypes"),y=t("../../traces/scatter/make_bubble_size_func"),x=e.exports={};x.font=function(t,e,r,n){e&&e.family&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(u.fill,n)},x.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},x.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},x.setRect=function(t,e,r,n,a){t.call(x.setPosition,e,r).call(x.setSize,n,a)},x.translatePoint=function(t,e,r,n){var a=t.xp||r.c2p(t.x),o=t.yp||n.c2p(t.y);return!!(l(a)&&l(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",a).attr("y",o):e.attr("transform","translate("+a+","+o+")"),!0)},x.translatePoints=function(t,e,r,n){t.each(function(t){var a=i.select(this);x.translatePoint(t,a,e,r,n)})},x.getPx=function(t,e){return Number(t.style(e).replace(/px$/,""))},x.crispRound=function(t,e,r){return e&&l(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,a){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},i=r||o.width||0,l=a||o.dash||"";u.stroke(e,n||o.color),x.dashLine(e,l,i)},x.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,l=n||a.dash||"" +;i.select(this).call(u.stroke,r||a.color).call(x.dashLine,l,o)})},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},x.singleFillStyle=function(t){var e=i.select(t.node()),r=e.data(),n=(((r[0]||[])[0]||{}).trace||{}).fillcolor;n&&t.call(u.fill,n)},x.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(e){var r=i.select(this);try{r.call(u.fill,e[0].trace.fillcolor)}catch(e){d.error(e,t),r.remove()}})};var b=t("./symbol_defs");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolList=[],Object.keys(b).forEach(function(t){var e=b[t];x.symbolList=x.symbolList.concat([e.n,t,e.n+100,t+"-open"]),x.symbolNames[e.n]=t,x.symbolFuncs[e.n]=e.f,e.needLine&&(x.symbolNeedLines[e.n]=!0),e.noDot?x.symbolNoDot[e.n]=!0:x.symbolList=x.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"])});var _=x.symbolNames.length,w="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";x.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=x.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var M={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0};x.gradient=function(t,e,r,n,a,o){var l=e._fullLayout._defs.select(".gradients").selectAll("#"+r).data([n+a+o],d.identity);l.exit().remove(),l.enter().append("radial"===n?"radialGradient":"linearGradient").each(function(){var t=i.select(this);"horizontal"===n?t.attr(M):"vertical"===n&&t.attr(k),t.attr("id",r);var e=s(a),l=s(o);t.append("stop").attr({offset:"0%","stop-color":u.tinyRGB(l),"stop-opacity":l.getAlpha()}),t.append("stop").attr({offset:"100%","stop-color":u.tinyRGB(e),"stop-opacity":e.getAlpha()})}),t.style({fill:"url(#"+r+")","fill-opacity":null})},x.initGradients=function(t){var e=t._fullLayout._defs.selectAll(".gradients").data([0]);e.enter().append("g").classed("gradients",!0),e.selectAll("linearGradient,radialGradient").remove()},x.singlePointStyle=function(t,e,r,a,o,i){var l=r.marker;n(t,e,r,a,o,l,l.line,i)},x.pointStyle=function(t,e,r){if(t.size()){var n=e.marker,a=x.tryColorscale(n,""),o=x.tryColorscale(n,"line");t.each(function(t){x.singlePointStyle(t,i.select(this),e,a,o,r)})}},x.tryColorscale=function(t,e){var r=e?d.nestedProperty(t,e).get():t,n=r.colorscale,a=r.color;return n&&Array.isArray(a)?f.makeColorScaleFunc(f.extractScale(n,r.cmin,r.cmax)):d.identity};var A={start:1,end:-1,middle:0,bottom:1,top:-1};x.textPointStyle=function(t,e,r){t.each(function(t){var n=i.select(this),a=t.tx||e.text;if(!a||Array.isArray(a))return void n.remove();var o=t.tp||e.textposition,s=-1!==o.indexOf("top")?"top":-1!==o.indexOf("bottom")?"bottom":"middle",c=-1!==o.indexOf("left")?"end":-1!==o.indexOf("right")?"start":"middle",u=t.ts||e.textfont.size,f=t.mrc?t.mrc/.8+1:0;u=l(u)&&u>0?u:0,n.call(x.font,t.tf||e.textfont.family,u,t.tc||e.textfont.color).attr("text-anchor",c).text(a).call(h.convertToTspans,r);var d=i.select(this.parentNode),p=(h.lineCount(n)-1)*m+1,g=A[c]*f,v=.75*u+A[s]*f+(A[s]-1)*p*u/2;d.attr("transform","translate("+g+","+v+")")})};var T=.5;x.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],o=[];for(r=1;r=1e4&&(x.savedBBoxes={},S=0),e&&(x.savedBBoxes[e]=m),S++,d.extendFlat({},m)},x.setClipUrl=function(t,e){if(!e)return void t.attr("clip-path",null);var r="#"+e,n=i.select("base");n.size()&&n.attr("href")&&(r=window.location.href.split("#")[0]+r),t.attr("clip-path","url("+r+")")},x.getTranslate=function(t){var e=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=t.attr?"attr":"getAttribute",n=t[r]("transform")||"",a=n.replace(e,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}},x.setTranslate=function(t,e,r){var n=/(\btranslate\(.*?\);?)/,a=t.attr?"attr":"getAttribute",o=t.attr?"attr":"setAttribute",i=t[a]("transform")||"";return e=e||0,r=r||0,i=i.replace(n,"").trim(),i+=" translate("+e+", "+r+")",i=i.trim(),t[o]("transform",i),i},x.getScale=function(t){var e=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=t.attr?"attr":"getAttribute",n=t[r]("transform")||"",a=n.replace(e,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}},x.setScale=function(t,e,r){var n=/(\bscale\(.*?\);?)/,a=t.attr?"attr":"getAttribute",o=t.attr?"attr":"setAttribute",i=t[a]("transform")||"";return e=e||1,r=r||1,i=i.replace(n,"").trim(),i+=" scale("+e+", "+r+")",i=i.trim(),t[o]("transform",i),i},x.setPointGroupScale=function(t,e,r){var n,a,o;return e=e||1,r=r||1,a=1===e&&1===r?"":" scale("+e+","+r+")",o=/\s*sc.*/,t.each(function(){n=(this.getAttribute("transform")||"").replace(o,""),n+=a,n=n.trim(),this.setAttribute("transform",n)}),a};var z=/translate\([^)]*\)\s*$/;x.setTextPointsScale=function(t,e,r){t.each(function(){var t,n=i.select(this),a=n.select("text"),o=parseFloat(a.attr("x")||0),l=parseFloat(a.attr("y")||0),s=(n.attr("transform")||"").match(z);t=1===e&&1===r?[]:["translate("+o+","+l+")","scale("+e+","+r+")","translate("+-o+","+-l+")"],s&&t.push(s),n.attr("transform",t.join(" "))})}},{"../../constants/alignment":137,"../../constants/xmlns_namespaces":141,"../../lib":156,"../../lib/svg_text_utils":173,"../../registry":241,"../../traces/scatter/make_bubble_size_func":319,"../../traces/scatter/subtypes":324,"../color":41,"../colorscale":55,"./symbol_defs":66,d3:15,"fast-isnumeric":17,tinycolor2:22}],66:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,a="l"+e+",-"+e,o="l-"+e+",-"+e,i="l-"+e+","+e;return"M0,"+e+r+a+o+a+o+i+o+i+r+i+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),a=n.round(-t,2),o=n.round(-.309*t,2);return"M"+e+","+o+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+o+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+e+"L-"+a+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+e+",0L"+r+",-"+a+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),a=n.round(.951*e,2),o=n.round(.363*e,2),i=n.round(.588*e,2),l=n.round(-e,2),s=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return"M"+r+","+s+"H"+a+"L"+o+","+c+"L"+i+","+u+"L0,"+n.round(.382*e,2)+"L-"+i+","+u+"L-"+o+","+c+"L-"+a+","+s+"H-"+r+"L0,"+l+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),a=n.round(.76*t,2);return"M-"+a+",0l-"+r+",-"+e+"h"+a+"l"+r+",-"+e+"l"+r+","+e+"h"+a+"l-"+r+","+e+"l"+r+","+e+"h-"+a+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),a=n.round(1.6*t,2),o=n.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M-"+e+","+r+i+e+","+r+i+"0,-"+a+i+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),a=n.round(1.6*t,2),o=n.round(4*t,2),i="A "+o+","+o+" 0 0 1 ";return"M"+e+",-"+r+i+"-"+e+",-"+r+i+"0,"+a+i+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),a=n.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0}}},{d3:15}],67:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"]},symmetric:{valType:"boolean"},array:{valType:"data_array"},arrayminus:{valType:"data_array"},value:{valType:"number",min:0,dflt:10},valueminus:{valType:"number",min:0,dflt:10},traceref:{valType:"integer",min:0,dflt:0},tracerefminus:{valType:"integer",min:0,dflt:0},copy_ystyle:{valType:"boolean"},copy_zstyle:{valType:"boolean"},color:{valType:"color"},thickness:{valType:"number",min:0,dflt:2},width:{valType:"number",min:0},_deprecated:{opacity:{valType:"number"}}}},{}],68:[function(t,e,r){"use strict";function n(t,e,r,n){var o=e["error_"+n]||{},s=o.visible&&-1!==["linear","log"].indexOf(r.type),c=[];if(s){for(var u=l(o),f=0;f0;t.each(function(t){var e,f=t[0].trace,d=f.error_x||{},h=f.error_y||{};f.ids&&(e=function(t){return t.id});var p=i.hasMarkers(f)&&f.marker.maxdisplayed>0;if(h.visible||d.visible){var g=a.select(this).selectAll("g.errorbar").data(t,e);g.exit().remove(),g.style("opacity",1);var m=g.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(r.duration).style("opacity",1),g.each(function(t){var e=a.select(this),i=n(t,s,c);if(!p||t.vis){var f;if(h.visible&&o(i.x)&&o(i.yh)&&o(i.ys)){var g=h.width;f="M"+(i.x-g)+","+i.yh+"h"+2*g+"m-"+g+",0V"+i.ys,i.noYS||(f+="m-"+g+",0h"+2*g);var m=e.select("path.yerror");l=!m.size(),l?m=e.append("path").classed("yerror",!0):u&&(m=m.transition().duration(r.duration).ease(r.easing)),m.attr("d",f)}if(d.visible&&o(i.y)&&o(i.xh)&&o(i.xs)){var v=(d.copy_ystyle?h:d).width;f="M"+i.xh+","+(i.y-v)+"v"+2*v+"m0,-"+v+"H"+i.xs,i.noXS||(f+="m0,-"+v+"v"+2*v);var y=e.select("path.xerror");l=!y.size(),l?y=e.append("path").classed("xerror",!0):u&&(y=y.transition().duration(r.duration).ease(r.easing)),y.attr("d",f)}}})}})}},{"../../traces/scatter/subtypes":324,d3:15,"fast-isnumeric":17}],73:[function(t,e,r){"use strict";var n=t("d3"),a=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},o=e.error_x||{},i=n.select(this);i.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),o.copy_ystyle&&(o=r),i.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(a.stroke,o.color)})}},{"../color":41,d3:15}],74:[function(t,e,r){"use strict";var n=t("../../lib/extend").extendFlat,a=t("../../plots/font_attributes");e.exports={hoverlabel:{bgcolor:{valType:"color",arrayOk:!0},bordercolor:{valType:"color",arrayOk:!0},font:{family:n({},a.family,{arrayOk:!0}),size:n({},a.size,{arrayOk:!0}),color:n({},a.color,{arrayOk:!0})}}}},{"../../lib/extend":150,"../../plots/font_attributes":216}],75:[function(t,e,r){"use strict";function n(t,e,r,n){n=n||a.identity,Array.isArray(t)&&(e[0][r]=n(t))}var a=t("../../lib"),o=t("../../registry");e.exports=function(t){for(var e=t.calcdata,r=t._fullLayout,i=0;i=0&&r.indexJ.width||$<0||$>J.height)return x.unhoverRaw(t,e)}if(E="xval"in e?w.flat(d,e.xval):w.p2c(L,W),N="yval"in e?w.flat(d,e.yval):w.p2c(C,$),!f(E[0])||!f(N[0]))return h.warn("Fx.hover failed",e,t),x.unhoverRaw(t,e)}var K=1/0;for(I=0;IY&&(X.splice(0,Y),K=X[0].distance)}if(0===X.length)return x.unhoverRaw(t,e);X.sort(function(t,e){return t.distance-e.distance});var at=t._hoverdata,ot=[];for(R=0;R1,ct=y.combine(g.plot_bgcolor||y.background,g.paper_bgcolor),ut={hovermode:D,rotateLabels:st,bgColor:ct,container:g._hoverlayer,outerContainer:g._paperdiv,commonLabelOpts:g.hoverlabel},ft=a(X,ut,t,e,t.layout.hoverFollowsMouse);if(o(X,st?"xa":"ya"),i(ft,st),e.target&&e.target.tagName){var dt=_.getComponentMethod("annotations","hasClickToShow")(t,ot);m(u.select(e.target),dt?"pointer":"")}e.target&&!n&&c(t,e,at)&&(at&&t.emit("plotly_unhover",{event:e,points:at}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:L,yaxes:C,xvals:E,yvals:N}))}function a(t,e,r,n,a){var o,i,l=e.hovermode,s=e.rotateLabels,c=e.bgColor,f=e.container,d=e.outerContainer,h=e.commonLabelOpts||{},p=e.fontFamily||M.HOVERFONT,m=e.fontSize||M.HOVERFONTSIZE,x=t[0],b=x.xa,_=x.ya,w="y"===l?"yLabel":"xLabel",A=x[w],T=(String(A)||"").split(" ")[0],L=d.node().getBoundingClientRect(),C=L.top,O=L.width,P=L.height,D=x.distance<=M.MAXDIST&&("x"===l||"y"===l);for(o=0;o15&&(o=o.substr(0,12)+"...")),void 0!==t.extraText&&(i+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(i+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(i+="y: "+t.yLabel+"
"),i+=(i?"z: ":"")+t.zLabel):D&&t[l+"Label"]===A?i=t[("x"===l?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&(i=t.yLabel):i=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",t.text&&!Array.isArray(t.text)&&(i+=(i?"
":"")+t.text),""===i&&(""===o&&e.remove(),i=o);var x=e.select("text.nums").call(v.font,t.fontFamily||p,t.fontSize||m,t.fontColor||h).text(i).attr("data-notex",1).call(g.positionText,0,0).call(g.convertToTspans,r),b=e.select("text.name"),_=0;o&&o!==i?(b.call(v.font,t.fontFamily||p,t.fontSize||m,d).text(o).attr("data-notex",1).call(g.positionText,0,0).call(g.convertToTspans,r),_=b.node().getBoundingClientRect().width+2*z):(b.remove(),e.select("rect").remove()),e.select("path").style({fill:d,stroke:h});var w,M,T=x.node().getBoundingClientRect(),L=t.xa._offset+(t.x0+t.x1)/2,E=t.ya._offset+(t.y0+t.y1)/2,N=Math.abs(t.x1-t.x0),R=Math.abs(t.y1-t.y0),I=T.width+S+z+_;t.ty0=C-T.top,t.bx=T.width+2*z,t.by=T.height+2*z,t.anchor="start",t.txwidth=T.width,t.tx2width=_,t.offset=0,a&&"closest"===l&&n&&n.offsetX&&n.offsetY&&(L=n.offsetX,E=n.offsetY),s?(t.pos=L,w=E+R/2+I<=P,M=E-R/2-I>=0,"top"!==t.idealAlign&&w||!M?w?(E+=R/2,t.anchor="start"):t.anchor="middle":(E-=R/2,t.anchor="end")):(t.pos=E,w=L+N/2+I<=O,M=L-N/2-I>=0,"left"!==t.idealAlign&&w||!M?w?(L+=N/2,t.anchor="start"):t.anchor="middle":(L-=N/2,t.anchor="end")),x.attr("text-anchor",t.anchor),_&&b.attr("text-anchor",t.anchor),e.attr("transform","translate("+L+","+E+")"+(s?"rotate("+k+")":""))}),R}function o(t,e){function r(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;n=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;n=!1}if(n){var c=0;for(i=0;ie.pmax&&c++;for(i=t.length-1;i>=0&&!(c<=0);i--)s=t[i],s.pos>e.pmax-1&&(s.del=!0,c--);for(i=0;i=0;l--)t[l].dp-=o;for(i=t.length-1;i>=0&&!(c<=0);i--)s=t[i],s.pos+s.dp+s.size>e.pmax&&(s.del=!0,c--)}}}for(var n,a,o,i,l,s,c,u=0,f=t.map(function(t,r){var n=t[e];return[{i:r,dp:0,pos:t.pos,posref:t.posref,size:t.by*("x"===n._id.charAt(0)?T:1)/2,pmin:n._offset,pmax:n._offset+n._length}]}).sort(function(t,e){return t[0].posref-e[0].posref});!n&&u<=t.length;){for(u++,n=!0,i=0;i.01&&p.pmin===g.pmin&&p.pmax===g.pmax){for(l=h.length-1;l>=0;l--)h[l].dp+=a;for(d.push.apply(d,h),f.splice(i+1,1),c=0, +l=d.length-1;l>=0;l--)c+=d[l].dp;for(o=c/d.length,l=d.length-1;l>=0;l--)d[l].dp-=o;n=!1}else i++}f.forEach(r)}for(i=f.length-1;i>=0;i--){var m=f[i];for(l=m.length-1;l>=0;l--){var v=m[l],y=t[v.i];y.offset=v.dp,y.del=v.del}}}function i(t,e){t.each(function(t){var r=u.select(this);if(t.del)return void r.remove();var n="end"===t.anchor?-1:1,a=r.select("text.nums"),o={start:1,end:-1,middle:0}[t.anchor],i=o*(S+z),l=i+o*(t.txwidth+z),s=0,c=t.offset;"middle"===t.anchor&&(i-=t.tx2width/2,l-=t.tx2width/2),e&&(c*=-C,s=t.offset*L),r.select("path").attr("d","middle"===t.anchor?"M-"+t.bx/2+",-"+t.by/2+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(n*S+s)+","+(S+c)+"v"+(t.by/2-S)+"h"+n*t.bx+"v-"+t.by+"H"+(n*S+s)+"V"+(c-S)+"Z"),a.call(g.positionText,i+s,c+t.ty0-t.by/2+z),t.tx2width&&(r.select("text.name").call(g.positionText,l+o*z+s,c+t.ty0-t.by/2+z),r.select("rect").call(v.setRect,l+(o-1)*t.tx2width/2+s,c-t.by/2-1,t.tx2width,t.by+2))})}function l(t,e){function r(e,r,i){var l;if(o[r])l=o[r];else if(a[r]){var s=a[r];Array.isArray(s)&&Array.isArray(s[t.index[0]])&&(l=s[t.index[0]][t.index[1]])}else l=h.nestedProperty(n,i).get();l&&(t[e]=l)}var n=t.trace||{},a=t.cd[0],o=t.cd[t.index]||{};r("hoverinfo","hi","hoverinfo"),r("color","hbg","hoverlabel.bgcolor"),r("borderColor","hbc","hoverlabel.bordercolor"),r("fontFamily","htf","hoverlabel.font.family"),r("fontSize","hts","hoverlabel.font.size"),r("fontColor","htc","hoverlabel.font.color"),t.posref="y"===e?(t.x0+t.x1)/2:(t.y0+t.y1)/2,t.x0=h.constrain(t.x0,0,t.xa._length),t.x1=h.constrain(t.x1,0,t.xa._length),t.y0=h.constrain(t.y0,0,t.ya._length),t.y1=h.constrain(t.y1,0,t.ya._length);var i;if(void 0!==t.xLabelVal){i="log"===t.xa.type&&t.xLabelVal<=0;var l=b.tickText(t.xa,t.xa.c2l(i?-t.xLabelVal:t.xLabelVal),"hover");i?0===t.xLabelVal?t.xLabel="0":t.xLabel="-"+l.text:t.xLabel=l.text,t.xVal=t.xa.c2d(t.xLabelVal)}if(void 0!==t.yLabelVal){i="log"===t.ya.type&&t.yLabelVal<=0;var s=b.tickText(t.ya,t.ya.c2l(i?-t.yLabelVal:t.yLabelVal),"hover");i?0===t.yLabelVal?t.yLabel="0":t.yLabel="-"+s.text:t.yLabel=s.text,t.yVal=t.ya.c2d(t.yLabelVal)}if(void 0!==t.zLabelVal&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var c=b.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+c+" / -"+b.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+c,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var u=b.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+u+" / -"+b.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+u,"y"===e&&(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return"all"!==f&&(f=f.split("+"),-1===f.indexOf("x")&&(t.xLabel=void 0),-1===f.indexOf("y")&&(t.yLabel=void 0),-1===f.indexOf("z")&&(t.zLabel=void 0),-1===f.indexOf("text")&&(t.text=void 0),-1===f.indexOf("name")&&(t.name=void 0)),t}function s(t,e){var r=e.hovermode,n=e.container,a=t[0],o=a.xa,i=a.ya,l=o.showspikes,s=i.showspikes;if(n.selectAll(".spikeline").remove(),"closest"===r&&(l||s)){var c=e.fullLayout,u=o._offset+(a.x0+a.x1)/2,f=i._offset+(a.y0+a.y1)/2,h=y.combine(c.plot_bgcolor,c.paper_bgcolor),p=d.readability(a.color,h)<1.5?y.contrast(h):a.color;if(s){var g=i.spikemode,m=i.spikethickness,x=i.spikecolor||p,b=i._boundingBox,_=(b.left+b.right)/2=0;n--){var a=r[n],o=t._hoverdata[n];if(a.curveNumber!==o.curveNumber||String(a.pointNumber)!==String(o.pointNumber))return!0}return!1}var u=t("d3"),f=t("fast-isnumeric"),d=t("tinycolor2"),h=t("../../lib"),p=t("../../lib/events"),g=t("../../lib/svg_text_utils"),m=t("../../lib/override_cursor"),v=t("../drawing"),y=t("../color"),x=t("../dragelement"),b=t("../../plots/cartesian/axes"),_=t("../../registry"),w=t("./helpers"),M=t("./constants"),k=M.YANGLE,A=Math.PI*k/180,T=1/Math.sin(A),L=Math.cos(A),C=Math.sin(A),S=M.HOVERARROWSIZE,z=M.HOVERTEXTPAD;r.hover=function(t,e,r,a){if("string"==typeof t&&(t=document.getElementById(t)),void 0===t._lastHoverTime&&(t._lastHoverTime=0),void 0!==t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=void 0),Date.now()>t._lastHoverTime+M.HOVERMINTIME)return n(t,e,r,a),void(t._lastHoverTime=Date.now());t._hoverTimer=setTimeout(function(){n(t,e,r,a),t._lastHoverTime=Date.now(),t._hoverTimer=void 0},M.HOVERMINTIME)},r.loneHover=function(t,e){var r={color:t.color||y.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0},n=u.select(e.container),o=e.outerContainer?u.select(e.outerContainer):n,l={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||y.background,container:n,outerContainer:o},s=a([r],l,e.gd);return i(s,l.rotateLabels),s.node()}},{"../../lib":156,"../../lib/events":149,"../../lib/override_cursor":165,"../../lib/svg_text_utils":173,"../../plots/cartesian/axes":192,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"./constants":77,"./helpers":79,d3:15,"fast-isnumeric":17,tinycolor2:22}],81:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r,a){a=a||{},r("hoverlabel.bgcolor",a.bgcolor),r("hoverlabel.bordercolor",a.bordercolor),n.coerceFont(r,"hoverlabel.font",a.font)}},{"../../lib":156}],82:[function(t,e,r){"use strict";function n(t){var e=l.isD3Selection(t)?t:i.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function a(t,e,r){return l.castOption(t,e,"hoverlabel."+r)}function o(t,e,r){function n(r){return l.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}return l.castOption(t,r,"hoverinfo",n)}var i=t("d3"),l=t("../../lib"),s=t("../dragelement"),c=t("./helpers"),u=t("./layout_attributes");e.exports={moduleType:"component",name:"fx",constants:t("./constants"),schema:{layout:u},attributes:t("./attributes"),layoutAttributes:u,supplyLayoutGlobalDefaults:t("./layout_global_defaults"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),getDistanceFunction:c.getDistanceFunction,getClosest:c.getClosest,inbox:c.inbox,appendArrayPointValue:c.appendArrayPointValue,castHoverOption:a,castHoverinfo:o,hover:t("./hover").hover,unhover:s.unhover,loneHover:t("./hover").loneHover,loneUnhover:n,click:t("./click")}},{"../../lib":156,"../dragelement":62,"./attributes":74,"./calc":75,"./click":76,"./constants":77,"./defaults":78,"./helpers":79,"./hover":80,"./layout_attributes":83,"./layout_defaults":84,"./layout_global_defaults":85,d3:15}],83:[function(t,e,r){"use strict";var n=t("../../lib/extend").extendFlat,a=t("../../plots/font_attributes"),o=t("./constants");e.exports={dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","orbit","turntable"],dflt:"zoom"},hovermode:{valType:"enumerated",values:["x","y","closest",!1]},hoverlabel:{bgcolor:{valType:"color"},bordercolor:{valType:"color"},font:{family:n({},a.family,{dflt:o.HOVERFONT}),size:n({},a.size,{dflt:o.HOVERFONTSIZE}),color:n({},a.color)}}}},{"../../lib/extend":150,"../../plots/font_attributes":216,"./constants":77}],84:[function(t,e,r){"use strict";function n(t){for(var e=!0,r=0;r=2/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],92:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat;e.exports={bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.defaultLine},borderwidth:{valType:"number",min:0,dflt:0},font:o({},n,{}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"]},tracegroupgap:{valType:"number",min:0,dflt:10},x:{valType:"number",min:-2,max:3,dflt:1.02},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto"}}},{"../../lib/extend":150,"../../plots/font_attributes":216,"../color/attributes":40}],93:[function(t,e,r){"use strict";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],94:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib"),o=t("./attributes"),i=t("../../plots/layout_attributes"),l=t("./helpers");e.exports=function(t,e,r){function s(t,e){return a.coerce(h,p,o,t,e)}for(var c,u,f,d,h=t.legend||{},p=e.legend={},g=0,m="normal",v=0;v1)){if(s("bgcolor",e.paper_bgcolor),s("bordercolor"),s("borderwidth"),a.coerceFont(s,"font",e.font),s("orientation"),"h"===p.orientation){var x=t.xaxis;x&&x.rangeslider&&x.rangeslider.visible?(c=0,f="left",u=1.1,d="bottom"):(c=0,f="left",u=-.1,d="top")}s("traceorder",m),l.isGrouped(e.legend)&&s("tracegroupgap"),s("x",c),s("xanchor",f),s("y",u),s("yanchor",d),a.noneOrAll(h,p,["x","y"])}}},{"../../lib":156,"../../plots/layout_attributes":231,"../../registry":241,"./attributes":92,"./helpers":97}],95:[function(t,e,r){"use strict";function n(t,e){function r(r){y.convertToTspans(r,e,function(){i(t,e)})}var n=t.data()[0][0],a=e._fullLayout,o=n.trace,l=p.traceIs(o,"pie"),s=o.index,c=l?n.label:o.name,u=c,d=t.selectAll("text.legendtext").data([0]),h=d.enter();h.append("title").text(c),h.append("text").classed("legendtext",!0),d.attr("text-anchor","start").classed("user-select-none",!0).call(m.font,a.legend.font).text(u),e._context.editable&&!l?d.call(y.makeEditable,{gd:e}).call(r).on("edit",function(t){this.text(t).call(r),this.text()||(t=" ");var a,o=n.trace._fullInput||{};if(-1!==["ohlc","candlestick"].indexOf(o.type)){var i=n.trace.transforms;a=i[i.length-1].direction+".name"}else a="name";f.restyle(e,a,t,s)}):d.call(r)}function a(t,e){var r,n=1,a=t.selectAll("rect").data([0]);a.enter().append("rect").classed("legendtoggle",!0).style("cursor","pointer").attr("pointer-events","all").call(v.fill,"rgba(0,0,0,0)"),a.on("mousedown",function(){r=(new Date).getTime(),r-e._legendMouseDownTimeL&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){o(t,e,n)},L):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,o(t,e,n))}})}function o(t,e,r){if(!e._dragged&&!e._editing){var n,a,o=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],i=t.data()[0][0],l=e._fullData,s=i.trace,c=s.legendgroup,h=[];if(1===r&&T&&e.data&&e._context.showTips?(d.notifier("Double click on legend to isolate individual trace","long"),T=!1):T=!1,p.traceIs(s,"pie")){var g=i.label,m=o.indexOf(g);1===r?-1===m?o.push(g):o.splice(m,1):2===r&&(o=[],e.calcdata[0].forEach(function(t){g!==t.label&&o.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===o.length&&-1===m&&(o=[])),f.relayout(e,"hiddenlabels",o)}else{var v,y=[],x=[];for(v=0;vn.width-(n.margin.r+n.margin.l)&&(y=0,p+=g,a.height=a.height+g,g=0),m.setTranslate(this,o+y,5+o+e.height/2+p),a.width+=i+r,a.height=Math.max(a.height,e.height),y+=i+r,g=Math.max(e.height,g)}),a.width+=2*o,a.height+=10+2*o,a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),r.each(function(e){var r=e[0];u.select(this).select(".legendtoggle").call(m.setRect,0,-r.height/2,t._context.editable?0:a.width,r.height)})}}function s(t){var e=t._fullLayout,r=e.legend,n="left";A.isRightAnchor(r)?n="right":A.isCenterAnchor(r)&&(n="center");var a="top";A.isBottomAnchor(r)?a="bottom":A.isMiddleAnchor(r)&&(a="middle"),h.autoMargin(t,"legend",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:r.height*({top:1,middle:.5}[a]||0),t:r.height*({bottom:1,middle:.5}[a]||0)})}function c(t){var e=t._fullLayout,r=e.legend,n="left";A.isRightAnchor(r)?n="right":A.isCenterAnchor(r)&&(n="center"),h.autoMargin(t,"legend",{x:r.x,y:.5,l:r.width*({right:1,center:.5}[n]||0),r:r.width*({left:1,center:.5}[n]||0),b:0,t:0})}var u=t("d3"),f=t("../../plotly"),d=t("../../lib"),h=t("../../plots/plots"),p=t("../../registry"),g=t("../dragelement"),m=t("../drawing"),v=t("../color"),y=t("../../lib/svg_text_utils"),x=t("./constants"),b=t("../../constants/interactions"),_=t("../../constants/alignment").LINE_SPACING,w=t("./get_legend_data"),M=t("./style"),k=t("./helpers"),A=t("./anchor_utils"),T=!0,L=b.DBLCLICKDELAY;e.exports=function(t){function e(t,e){S.attr("data-scroll",e).call(m.setTranslate,0,e),z.call(m.setRect,F,t,x.scrollBarWidth,x.scrollBarHeight),T.select("rect").attr({y:y.borderwidth-e})}var r=t._fullLayout,i="legend"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,b=r.showlegend&&w(t.calcdata,y),_=r.hiddenlabels||[];if(!r.showlegend||!b.length)return r._infolayer.selectAll(".legend").remove(),r._topdefs.select("#"+i).remove(),void h.autoMargin(t,"legend");var k=r._infolayer.selectAll("g.legend").data([0]);k.enter().append("g").attr({class:"legend","pointer-events":"all"});var T=r._topdefs.selectAll("#"+i).data([0]);T.enter().append("clipPath").attr("id",i).append("rect");var C=k.selectAll("rect.bg").data([0]);C.enter().append("rect").attr({class:"bg","shape-rendering":"crispEdges"}),C.call(v.stroke,y.bordercolor),C.call(v.fill,y.bgcolor),C.style("stroke-width",y.borderwidth+"px");var S=k.selectAll("g.scrollbox").data([0]);S.enter().append("g").attr("class","scrollbox");var z=k.selectAll("rect.scrollbar").data([0]);z.enter().append("rect").attr({class:"scrollbar",rx:20,ry:2,width:0,height:0}).call(v.fill,"#808BA4");var O=S.selectAll("g.groups").data(b);O.enter().append("g").attr("class","groups"),O.exit().remove();var P=O.selectAll("g.traces").data(d.identity);P.enter().append("g").attr("class","traces"),P.exit().remove(),P.call(M,t).style("opacity",function(t){var e=t[0].trace;return p.traceIs(e,"pie")?-1!==_.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){u.select(this).call(n,t).call(a,t)});var D=0!==k.enter().size();D&&(l(t,O,P),s(t));var E=r.width,N=r.height;if(l(t,O,P),"v"===y.orientation&&y.width>.45*r.width||"h"===y.orientation&&y.height>.4*r.height)return r._infolayer.selectAll(".legend").remove(),void r._topdefs.select("#"+i).remove();y.height>N?c(t):s(t);var R=r._size,I=R.l+R.w*y.x,j=R.t+R.h*(1-y.y);A.isRightAnchor(y)?I-=y.width:A.isCenterAnchor(y)&&(I-=y.width/2),A.isBottomAnchor(y)?j-=y.height:A.isMiddleAnchor(y)&&(j-=y.height/2);var F=y.width;R.w;I+F>E&&(I=E-F),I<0&&(I=0),F=Math.min(E-I,y.width);var B=y.height,q=R.h;B>q?(j=R.t,B=q):(j+B>N&&(j=N-B),j<0&&(j=0),B=Math.min(N-j,y.height)),m.setTranslate(k,I,j);var H,V,U=B-x.scrollBarHeight-2*x.scrollBarMargin,G=y.height-B;if(y.height<=B||t._context.staticPlot)C.attr({width:F-y.borderwidth,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),m.setTranslate(S,0,0),T.select("rect").attr({width:F-2*y.borderwidth,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),S.call(m.setClipUrl,i);else{H=x.scrollBarMargin,V=S.attr("data-scroll")||0,C.attr({width:F-2*y.borderwidth+x.scrollBarWidth+x.scrollBarMargin,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),T.select("rect").attr({width:F-2*y.borderwidth+x.scrollBarWidth+x.scrollBarMargin,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-V}),S.call(m.setClipUrl,i),D&&e(H,V),k.on("wheel",null),k.on("wheel",function(){V=d.constrain(S.attr("data-scroll")-u.event.deltaY/U*G,-G,0),H=x.scrollBarMargin-V/G*U,e(H,V),0!==V&&V!==-G&&u.event.preventDefault()}),z.on(".drag",null),S.on(".drag",null);var Y=u.behavior.drag().on("drag",function(){H=d.constrain(u.event.y-x.scrollBarHeight/2,x.scrollBarMargin,x.scrollBarMargin+U),V=-(H-x.scrollBarMargin)/U*G,e(H,V)});z.call(Y),S.call(Y)}if(t._context.editable){var X,Z,W,$;k.classed("cursor-move",!0),g.init({element:k.node(),gd:t,prepFn:function(){var t=m.getTranslate(k);W=t.x,$=t.y},moveFn:function(t,e){var r=W+t,n=$+e;m.setTranslate(k,r,n),X=g.align(r,0,R.l,R.l+R.w,y.xanchor),Z=g.align(n,0,R.t+R.h,R.t,y.yanchor)},doneFn:function(e,n,a){if(e&&void 0!==X&&void 0!==Z)f.relayout(t,{"legend.x":X,"legend.y":Z});else{var i=r._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return a.clientX>=t.left&&a.clientX<=t.right&&a.clientY>=t.top&&a.clientY<=t.bottom});i.size()>0&&(1===n?k._clickTimeout=setTimeout(function(){o(i,t,n)},L):2===n&&(k._clickTimeout&&clearTimeout(k._clickTimeout),o(i,t,n)))}}})}}}},{"../../constants/alignment":137,"../../constants/interactions":138,"../../lib":156,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/plots":233,"../../registry":241,"../color":41,"../dragelement":62,"../drawing":65,"./anchor_utils":91,"./constants":93,"./get_legend_data":96,"./helpers":97,"./style":99,d3:15}],96:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("./helpers");e.exports=function(t,e){function r(t,r){if(""!==t&&a.isGrouped(e))-1===s.indexOf(t)?(s.push(t),c=!0,l[t]=[[r]]):l[t].push([r]);else{var n="~~i"+f;s.push(n),l[n]=[[r]],f++}}var o,i,l={},s=[],c=!1,u={},f=0;for(o=0;or[1])return r[1]}return a}function a(t){return t[0]}var l,c,u=t[0],f=u.trace,d=s.hasMarkers(f),h=s.hasText(f),p=s.hasLines(f);if(d||h||p){var g={},m={};d&&(g.mc=r("marker.color",a),g.mo=r("marker.opacity",o.mean,[.2,1]),g.ms=r("marker.size",o.mean,[2,16]),g.mlc=r("marker.line.color",a),g.mlw=r("marker.line.width",o.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),p&&(m.line={width:r("line.width",a,[0,10])}),h&&(g.tx="Aa",g.tp=r("textposition",a),g.ts=10,g.tc=r("textfont.color",a),g.tf=r("textfont.family",a)),l=[o.minExtend(u,g)],c=o.minExtend(f,m)}var v=n.select(this).select("g.legendpoints"),y=v.selectAll("path.scatterpts").data(d?l:[]);y.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),y.exit().remove(),y.call(i.pointStyle,c,e),d&&(l[0].mrc=3);var x=v.selectAll("g.pointtext").data(h?l:[]);x.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),x.exit().remove(),x.selectAll("text").call(i.textPointStyle,c,e)}function f(t){var e=t[0].trace,r=e.marker||{},o=r.line||{},i=n.select(this).select("g.legendpoints").selectAll("path.legendbar").data(a.traceIs(e,"bar")?[t]:[]);i.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),i.exit().remove(),i.each(function(t){var e=n.select(this),a=t[0],i=(a.mlw+1||o.width+1)-1;e.style("stroke-width",i+"px").call(l.fill,a.mc||r.color),i&&e.call(l.stroke,a.mlc||o.color)})}function d(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.traceIs(e,"box")&&e.visible?[t]:[]);r.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.each(function(){var t=e.line.width,r=n.select(this);r.style("stroke-width",t+"px").call(l.fill,e.fillcolor),t&&r.call(l.stroke,e.line.color)})}function h(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendpie").data(a.traceIs(e,"pie")&&e.visible?[t]:[]);r.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),r.exit().remove(),r.size()&&r.call(c,t[0],e)}t.each(function(t){var e=n.select(this),r=e.selectAll("g.layers").data([0]);r.enter().append("g").classed("layers",!0),r.style("opacity",t[0].trace.opacity),r.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),r.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var a=r.selectAll("g.legendsymbols").data([t]);a.enter().append("g").classed("legendsymbols",!0),a.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(f).each(d).each(h).each(r).each(u)}},{"../../lib":156,"../../registry":241,"../../traces/pie/style_one":302,"../../traces/scatter/subtypes":324,"../color":41,"../drawing":65,d3:15}],100:[function(t,e,r){"use strict";function n(t,e){ +var r,n,a=e.currentTarget,o=a.getAttribute("data-attr"),i=a.getAttribute("data-val")||!0,l=t._fullLayout,s={},c=d.list(t,null,!0),f="on";if("zoom"===o){var h,p="in"===i?.5:2,g=(1+p)/2,m=(1-p)/2;for(n=0;n1)return n(["resetViews","toggleHover"]),i(m,r);u&&(n(["zoom3d","pan3d","orbitRotation","tableRotation"]),n(["resetCameraDefault3d","resetCameraLastSave3d"]),n(["hoverClosest3d"])),d&&(n(["zoomInGeo","zoomOutGeo","resetGeo"]),n(["hoverClosestGeo"]));var v=a(l),y=[];return((c||p)&&!v||g)&&(y=["zoom2d","pan2d"]),(c||g||p)&&o(s)&&(y.push("select2d"),y.push("lasso2d")),y.length&&n(y),!c&&!p||v||g||n(["zoomIn2d","zoomOut2d","autoScale2d","resetScale2d"]),c&&h?n(["toggleHover"]):p?n(["hoverClosestGl2d"]):c?n(["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]):h&&n(["hoverClosestPie"]),i(m,r)}function a(t){for(var e=s.list({_fullLayout:t},null,!0),r=!0,n=0;n0)){var p=a(e,r,s);f("x",p[0]),f("y",p[1]),o.noneOrAll(t,e,["x","y"]),f("xanchor"),f("yanchor"),o.coerceFont(f,"font",r.font);var g=f("bgcolor");f("activecolor",i.contrast(g,c.lightAmount,c.darkAmount)),f("bordercolor"),f("borderwidth")}}},{"../../lib":156,"../color":41,"./attributes":104,"./button_attributes":105,"./constants":106}],108:[function(t,e,r){"use strict";function n(t){for(var e=v.list(t,"x",!0),r=[],n=0;np&&(p=d)));return p>=h?[h,p]:void 0}}var a=t("../../lib"),o=t("../../plots/cartesian/axes"),i=t("./constants"),l=t("./helpers");e.exports=function(t){var e=t._fullLayout,r=a.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var l=0;ls&&(t="X"),t});return n>s&&(c=c.replace(/[\s,]*X.*/,""),l.log("Ignoring extra params in segment "+t)),a+c})}var l=(t("../../plotly"),t("../../lib")),s=t("../../plots/cartesian/axes"),c=t("../color"),u=t("../drawing"),f=(t("../dragelement"),t("../../lib/setcursor"),t("./constants")),d=t("./helpers");e.exports={draw:n,drawOne:a}},{"../../lib":156,"../../lib/setcursor":171,"../../plotly":187,"../../plots/cartesian/axes":192,"../color":41,"../dragelement":62,"../drawing":65,"./constants":119,"./helpers":122}],122:[function(t,e,r){"use strict";r.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},r.getDataToPixel=function(t,e,n){var a,o=t._fullLayout._size;if(e){var i=r.shapePositionToRange(e);a=function(t){return e._offset+e.r2p(i(t,!0))},"date"===e.type&&(a=r.decodeDate(a))}else a=n?function(t){return o.t+o.h*(1-t)}:function(t){return o.l+o.w*t};return a},r.getPixelToData=function(t,e,n){var a,o=t._fullLayout._size;if(e){var i=r.rangeToShapePosition(e);a=function(t){return i(e.p2r(t-e._offset))}}else a=n?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a}},{}],123:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"./attributes":117,"./calc_autorange":118,"./defaults":120,"./draw":121}],124:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("./attributes"),i=t("./helpers");e.exports=function(t,e,r,l,s){function c(r,a){return n.coerce(t,e,o,r,a)}if(l=l||{},s=s||{},!c("visible",!s.itemIsNotPlainObject))return e;c("layer"),c("opacity"),c("fillcolor"),c("line.color"),c("line.width"),c("line.dash");for(var u=t.path?"path":"rect",f=c("type",u),d=["x","y"],h=0;h<2;h++){var p=d[h],g={_fullLayout:r},m=a.coerceRef(t,e,g,p,"","paper");if("path"!==f){var v,y,x;"paper"!==m?(v=a.getFromId(g,m),x=i.rangeToShapePosition(v),y=i.shapePositionToRange(v)):y=x=n.identity;var b=p+"0",_=p+"1",w=t[b],M=t[_];t[b]=y(t[b],!0),t[_]=y(t[_],!0),a.coercePosition(e,g,c,m,b,.25),a.coercePosition(e,g,c,m,_,.75),e[b]=x(e[b]),e[_]=x(e[_]),t[b]=w,t[_]=M}}return"path"===f?c("path"):n.noneOrAll(t,e,["x0","x1","y0","y1"]),t.classes&&(e.classes=t.classes),e}},{"../../lib":156,"../../plots/cartesian/axes":192,"./attributes":117,"./helpers":122}],125:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../../plots/pad_attributes"),o=t("../../lib/extend").extendFlat,i=t("../../lib/extend").extendDeep,l=t("../../plots/animation_attributes"),s=t("./constants"),c={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}};e.exports={_isLinkedToArray:"slider",visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i({},a,{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:l.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:o({},n,{})},font:o({},n,{}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}},{"../../lib/extend":150,"../../plots/animation_attributes":188,"../../plots/font_attributes":216,"../../plots/pad_attributes":232,"./constants":126}],126:[function(t,e,r){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],127:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return o.coerce(t,e,l,r,n)}n("visible",a(t,e).length>0)&&(n("active"),n("x"),n("y"),o.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),o.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),o.coerceFont(n,"currentvalue.font",e.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen"))}function a(t,e){function r(t,e){return o.coerce(n,a,u,t,e)}for(var n,a,i=t.steps||[],l=e.steps=[],s=0;s=r.steps.length&&(r.active=0),e.call(l,r).call(b,r).call(u,r).call(p,r).call(x,t,r).call(s,t,r),A.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(m,r,r.active/(r.steps.length-1),!1),e.call(l,r)}function l(t,e,r){if(e.currentvalue.visible){var n,a,o=t.selectAll("text").data([0]);switch(e.currentvalue.xanchor){case"right":n=e.inputAreaLength-C.currentValueInset-e.currentValueMaxWidth,a="left";break;case"center":n=.5*e.inputAreaLength,a="middle";break;default:n=C.currentValueInset,a="left"}o.enter().append("text").classed(C.labelClass,!0).classed("user-select-none",!0).attr({"text-anchor":a,"data-notex":1});var i=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)i+=r;else{i+=e.steps[e.active].label}e.currentvalue.suffix&&(i+=e.currentvalue.suffix),o.call(A.font,e.currentvalue.font).text(i).call(T.convertToTspans,e.gd);var l=T.lineCount(o),s=(e.currentValueMaxLines+1-l)*e.currentvalue.font.size*S;return T.positionText(o,n,s),o}}function s(t,e,r){var n=t.selectAll("rect."+C.gripRectClass).data([0]);n.enter().append("rect").classed(C.gripRectClass,!0).call(h,e,t,r).style("pointer-events","all"),n.attr({width:C.gripWidth,height:C.gripHeight,rx:C.gripRadius,ry:C.gripRadius}).call(k.stroke,r.bordercolor).call(k.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function c(t,e,r){var n=t.selectAll("text").data([0]);return n.enter().append("text").classed(C.labelClass,!0).classed("user-select-none",!0).attr({"text-anchor":"middle","data-notex":1}),n.call(A.font,r.font).text(e.step.label).call(T.convertToTspans,r.gd),n}function u(t,e){var r=t.selectAll("g."+C.labelsClass).data([0]);r.enter().append("g").classed(C.labelsClass,!0);var n=r.selectAll("g."+C.labelGroupClass).data(e.labelSteps);n.enter().append("g").classed(C.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=w.select(this);r.call(c,t,e),A.setTranslate(r,v(e,t.fraction),C.tickOffset+e.ticklen+e.font.size*S+C.labelOffset+e.currentValueTotalHeight)})}function f(t,e,r,n,a){var o=Math.round(n*(r.steps.length-1));o!==r.active&&d(t,e,r,o,!0,a)}function d(t,e,r,n,a,o){var i=r.active;r._input.active=r.active=n;var s=r.steps[r.active];e.call(m,r,r.active/(r.steps.length-1),o),e.call(l,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:a,previousActive:i}),s&&s.method&&a&&(e._nextMethod?(e._nextMethod.step=s,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:s,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(r.execute&&M.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function h(t,e,r){function n(){return r.data()[0]}var a=r.node(),o=w.select(e);t.on("mousedown",function(){var t=n();e.emit("plotly_sliderstart",{slider:t});var i=r.select("."+C.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),i.call(k.fill,t.activebgcolor);var l=y(t,w.mouse(a)[0]);f(e,r,t,l,!0),t._dragging=!0,o.on("mousemove",function(){var t=n(),o=y(t,w.mouse(a)[0]);f(e,r,t,o,!1)}),o.on("mouseup",function(){var t=n();t._dragging=!1,i.call(k.fill,t.bgcolor),o.on("mouseup",null),o.on("mousemove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})})})}function p(t,e){var r=t.selectAll("rect."+C.tickRectClass).data(e.steps);r.enter().append("rect").classed(C.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(t,r){var n=r%e.labelStride==0,a=w.select(this);a.attr({height:n?e.ticklen:e.minorticklen}).call(k.fill,e.tickcolor),A.setTranslate(a,v(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?C.tickOffset:C.minorTickOffset)+e.currentValueTotalHeight)})}function g(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r0&&(i=i.transition().duration(e.transition.duration).ease(e.transition.easing)),i.attr("transform","translate("+(o-.5*C.gripWidth)+","+e.currentValueTotalHeight+")")}}function v(t,e){return t.inputAreaStart+C.stepInset+(t.inputAreaLength-2*C.stepInset)*Math.min(1,Math.max(0,e))}function y(t,e){return Math.min(1,Math.max(0,(e-C.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*C.stepInset-2*t.inputAreaStart)))}function x(t,e,r){var n=t.selectAll("rect."+C.railTouchRectClass).data([0]);n.enter().append("rect").classed(C.railTouchRectClass,!0).call(h,e,t,r).style("pointer-events","all"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,C.tickOffset+r.ticklen+r.labelHeight)}).call(k.fill,r.bgcolor).attr("opacity",0),A.setTranslate(n,0,r.currentValueTotalHeight)}function b(t,e){var r=t.selectAll("rect."+C.railRectClass).data([0]);r.enter().append("rect").classed(C.railRectClass,!0);var n=e.inputAreaLength-2*C.railInset;r.attr({width:n,height:C.railWidth,rx:C.railRadius,ry:C.railRadius,"shape-rendering":"crispEdges"}).call(k.stroke,e.bordercolor).call(k.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),A.setTranslate(r,C.railInset,.5*(e.inputAreaWidth-C.railWidth)+e.currentValueTotalHeight)}function _(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n0?[0]:[]);if(l.enter().append("g").classed(C.containerClassName,!0).style("cursor","ew-resize"),l.exit().remove(),l.exit().size()&&_(t),0!==r.length){var s=l.selectAll("g."+C.groupClassName).data(r,a);s.enter().append("g").classed(C.groupClassName,!0),s.exit().each(function(e){w.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,M.autoMargin(t,C.autoMarginIdRoot+e._index)});for(var c=0;c0||d<0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[b.side];e.attr("transform","translate("+g+")")}}}var m=r.propContainer,v=r.propName,y=r.traceIndex,x=r.dfltName,b=r.avoid||{},_=r.attributes,w=r.transform,M=r.containerGroup,k=t._fullLayout,A=m.titlefont.family,T=m.titlefont.size,L=m.titlefont.color,C=1,S=!1,z=m.title.trim(),O=t._context.editable;O&&(m===k?O=t._context.editableMainTitle:m===k.xaxis?O=t._context.editableAxisXTitle:m===k.yaxis?O=t._context.editableAxisYTitle:m===k.yaxis2?O=t._context.editableAxisY2Title:m===k.xaxis2&&(O=t._context.editableAxisX2Title)),""===z&&(C=0),z.match(d)&&(C=.2,S=!0,O||(z=""));var P=z||O;M||(M=k._infolayer.selectAll(".g-"+e).data([0]),M.enter().append("g").classed("g-"+e,!0));var D=M.selectAll("text").data(P?[0]:[]);if(D.enter().append("text"),D.text(z).attr("class",e),D.exit().remove(),P){D.call(h);var E="Click to enter "+x+" title";O&&(z?D.on(".opacity",null):function(){C=0,S=!0,z=E,D.text(z).on("mouseover.opacity",function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)})}(),D.call(u.makeEditable,{gd:t}).on("edit",function(e){void 0!==y?o.restyle(t,v,e,y):o.relayout(t,v,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(h)}).on("input",function(t){this.text(t||" ").call(u.positionText,_.x,_.y)})),D.classed("js-placeholder",S),m._titleElement=D}}},{"../../constants/interactions":138,"../../lib":156,"../../lib/svg_text_utils":173,"../../plotly":187,"../../plots/plots":233,"../color":41,"../drawing":65,d3:15,"fast-isnumeric":17}],131:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../color/attributes"),o=t("../../lib/extend").extendFlat,i=t("../../plots/pad_attributes"),l={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}};e.exports={_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:l,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:o({},i,{}),font:o({},n,{}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1}}},{"../../lib/extend":150,"../../plots/font_attributes":216,"../../plots/pad_attributes":232,"../color/attributes":40}],132:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},{}],133:[function(t,e,r){"use strict";function n(t,e,r){function n(r,n){return o.coerce(t,e,l,r,n)}n("visible",a(t,e).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),o.noneOrAll(t,e,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),o.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function a(t,e){function r(t,e){return o.coerce(n,a,u,t,e)}for(var n,a,i=t.buttons||[],l=e.buttons=[],s=0;s0?[0]:[]);if(o.enter().append("g").classed(S.containerClassName,!0).style("cursor","pointer"),o.exit().remove(),o.exit().size()&&_(t),0!==r.length){var u=o.selectAll("g."+S.headerGroupClassName).data(r,a);u.enter().append("g").classed(S.headerGroupClassName,!0);var f=o.selectAll("g."+S.dropdownButtonGroupClassName).data([0]);f.enter().append("g").classed(S.dropdownButtonGroupClassName,!0).style("pointer-events","all");for(var d=0;dM,T=n.barLength+2*n.barPad,L=n.barWidth+2*n.barPad,C=p,S=m+v;S+L>c&&(S=c-L);var z=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(o.fill,n.barColor),A?(this.hbar=z.attr({rx:n.barRadius,ry:n.barRadius,x:C,y:S,width:T,height:L}),this._hbarXMin=C+T/2,this._hbarTranslateMax=M-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=v>k,P=n.barWidth+2*n.barPad,D=n.barLength+2*n.barPad,E=p+g,N=m;E+P>s&&(E=s-P);var R=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(o.fill,n.barColor),O?(this.vbar=R.attr({rx:n.barRadius,ry:n.barRadius,x:E,y:N,width:P,height:D}),this._vbarYMin=N+D/2,this._vbarTranslateMax=k-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var I=this.id,j=u-.5,F=O?f+P+.5:f+.5,B=d-.5,q=A?h+L+.5:h+.5,H=l._topdefs.selectAll("#"+I).data(A||O?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",I).append("rect"),A||O?(this._clipRect=H.select("rect").attr({x:Math.floor(j),y:Math.floor(B),width:Math.ceil(F)-Math.floor(j),height:Math.ceil(q)-Math.floor(B)}),this.container.call(i.setClipUrl,I),this.bg.attr({x:p,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),A||O){var V=a.behavior.drag().on("dragstart",function(){a.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var U=a.behavior.drag().on("dragstart",function(){a.event.sourceEvent.preventDefault(),a.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(U),O&&this.vbar.on(".drag",null).call(U)}this.setTranslate(e,r)},n.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},n.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=a.event.dx),this.vbar&&(e-=a.event.dy),this.setTranslate(t,e)},n.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=a.event.deltaY),this.vbar&&(e+=a.event.deltaY),this.setTranslate(t,e)},n.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax;t=(l.constrain(a.event.x,r,n)-r)/(n-r)*(this.position.w-this._box.w)}if(this.vbar){var o=e+this._vbarYMin,i=o+this._vbarTranslateMax;e=(l.constrain(a.event.y,o,i)-o)/(i-o)*(this.position.h-this._box.h)}this.setTranslate(t,e)},n.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=l.constrain(t||0,0,r),e=l.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(i.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var a=t/r;this.hbar.call(i.setTranslate,t+a*this._hbarTranslateMax,e)}if(this.vbar){var o=e/n;this.vbar.call(i.setTranslate,t,e+o*this._vbarTranslateMax)}}},{"../../lib":156,"../color":41,"../drawing":65,d3:15}],137:[function(t,e,r){"use strict";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},LINE_SPACING:1.3}},{}],138:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300}},{}],139:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6}},{}],140:[function(t,e,r){"use strict";e.exports={entityToUnicode:{mu:"\u03bc","#956":"\u03bc",amp:"&","#28":"&",lt:"<","#60":"<",gt:">","#62":">",nbsp:"\xa0","#160":"\xa0",times:"\xd7","#215":"\xd7",plusmn:"\xb1","#177":"\xb1",deg:"\xb0","#176":"\xb0"}}},{}],141:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],142:[function(t,e,r){"use strict";var n=t("./plotly");r.version="1.28.3-ion48",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config"),r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.setPlotConfig=t("./plot_api/set_plot_config"),r.register=t("./plot_api/register"),r.toImage=t("./plot_api/to_image"),r.downloadImage=t("./snapshot/download"),r.validate=t("./plot_api/validate"),r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.register(t("./traces/scatter")),r.register([t("./components/fx"),t("./components/legend"),t("./components/annotations"),t("./components/annotations3d"),t("./components/shapes"),t("./components/images"),t("./components/updatemenus"),t("./components/sliders"),t("./components/rangeslider"),t("./components/rangeselector")]),r.Icons=t("../build/ploticon"),r.Plots=n.Plots,r.Fx=t("./components/fx"),r.Snapshot=t("./snapshot"),r.PlotSchema=t("./plot_api/plot_schema"),r.Queue=t("./lib/queue"),r.d3=t("d3");var a=t("./components/color");r.colorDefaults=a.overrideColorDefaults;var o=t("./lib/dates");r.dateTime2ms=o.dateTime2ms},{"../build/plotcss":1,"../build/ploticon":2,"./components/annotations":39,"./components/annotations3d":28,"./components/color":41,"./components/fx":82,"./components/images":90,"./components/legend":98,"./components/rangeselector":110,"./components/rangeslider":116,"./components/shapes":123,"./components/sliders":129,"./components/updatemenus":135,"./fonts/mathjax_config":143,"./lib/dates":147,"./lib/queue":168,"./plot_api/plot_schema":181,"./plot_api/register":182,"./plot_api/set_plot_config":183,"./plot_api/to_image":185,"./plot_api/validate":186,"./plotly":187,"./snapshot":246,"./snapshot/download":243,"./traces/scatter":314,d3:15,"es6-promise":16}],143:[function(t,e,r){"use strict";"undefined"!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],144:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){Array.isArray(t)&&(e[r]=t[n])}},{}],145:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../constants/numerical").BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;e.exports=function(t){return"string"==typeof t&&(t=t.replace(o,"")),n(t)?Number(t):a}},{"../constants/numerical":139,"fast-isnumeric":17}],146:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../plots/attributes"),i=t("../components/colorscale/get_scale"),l=(Object.keys(t("../components/colorscale/scales")),t("./nested_property")),s=/^([2-9]|[1-9][0-9]+)$/;r.valObjects={data_array:{coerceFunction:function(t,e,r){Array.isArray(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;na.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,a){t%1||!n(t)||void 0!==a.min&&ta.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var a="number"==typeof t;!0!==n.strict&&a?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){a(t).isValid()?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(i(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?(Math.abs(t)>180&&(t-=360*Math.round(t/360)),e.set(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){var n=r.length;if("string"==typeof t&&t.substr(0,n)===r&&s.test(t.substr(n)))return void e.set(t);e.set(r)},validateFunction:function(t,e){var r=e.dflt,n=r.length;return t===r||"string"==typeof t&&!(t.substr(0,n)!==r||!s.test(t.substr(n)))}},flaglist:{coerceFunction:function(t,e,r,n){if("string"!=typeof t)return void e.set(r);if(-1!==(n.extras||[]).indexOf(t))return void e.set(t);for(var a=t.split("+"),o=0;o0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}function s(t){return t.formatDate("yyyy")}function c(t){return t.formatDate("M yyyy")}function u(t){return t.formatDate("M d")}function f(t){return t.formatDate("M d, yyyy")}var d=t("d3"),h=t("fast-isnumeric"),p=t("./loggers").error,g=t("./mod"),m=t("../constants/numerical"),v=m.BADNUM,y=m.ONEDAY,x=m.ONEHOUR,b=m.ONEMIN,_=m.ONESEC,w=m.EPOCHJD,M=t("../registry"),k=d.time.format.utc,A=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m,T=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m,L=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?M.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:M.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"},r.dfltRange=function(t){return n(t)?M.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},r.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime};var C,S;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return t=Number(t)-t.getTimezoneOffset()*b,t>=C&&t<=S?t:v;if("string"!=typeof t&&"number"!=typeof t)return v;t=String(t);var a=n(e),o=t.charAt(0);!a||"G"!==o&&"g"!==o||(t=t.substr(1),e="");var i=a&&"chinese"===e.substr(0,7),l=t.match(i?T:A);if(!l)return v;var s=l[1],c=l[3]||"1",u=Number(l[5]||1),f=Number(l[7]||0),d=Number(l[9]||0),h=Number(l[11]||0);if(a){if(2===s.length)return v;s=Number(s);var p;try{var g=M.getComponentMethod("calendars","getCal")(e);if(i){var m="i"===c.charAt(c.length-1);c=parseInt(c,10),p=g.newDate(s,g.toMonthIndex(s,c,m),u)}else p=g.newDate(s,Number(c),u)}catch(t){return v}return p?(p.toJD()-w)*y+f*x+d*b+h*_:v}s=2===s.length?(Number(s)+2e3-L)%100+L:Number(s),c-=1;var k=new Date(Date.UTC(2e3,c,u,f,d));return k.setUTCFullYear(s),k.getUTCMonth()!==c?v:k.getUTCDate()!==u?v:k.getTime()+h*_},C=r.MIN_MS=r.dateTime2ms("-9999"),S=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==v};var z=90*y,O=3*x,P=5*b;r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=C&&t<=S))return v;e||(e=0);var a,i,l,s,c,u,f=Math.floor(10*g(t+.05,1)),d=Math.round(t-f/10);if(n(r)){var h=Math.floor(d/y)+w,p=Math.floor(g(t,y));try{a=M.getComponentMethod("calendars","getCal")(r).fromJD(h).formatDate("yyyy-mm-dd")}catch(t){a=k("G%Y-%m-%d")(new Date(d))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;i=e=C+y&&t<=S-y))return v;var e=Math.floor(10*g(t+.05,1)),r=new Date(Math.round(t-e/10));return o(d.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,a){if(r.isJSDate(t)||"number"==typeof t){if(n(a))return p("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,a))return p("unrecognized date",t),e;return t};var D=/%\d?f/g,E=[59,59.9,59.99,59.999,59.9999],N=k("%Y"),R=k("%b %Y"),I=k("%b %-d"),j=k("%b %-d, %Y");r.formatDate=function(t,e,r,a){var o,d;if(a=n(a)&&a,e)return i(e,t,a);if(a)try{var h=Math.floor((t+.05)/y)+w,p=M.getComponentMethod("calendars","getCal")(a).fromJD(h);"y"===r?d=s(p):"m"===r?d=c(p):"d"===r?(o=s(p),d=u(p)):(o=f(p),d=l(t,r))}catch(t){return"Invalid"}else{var g=new Date(Math.floor(t+.05));"y"===r?d=N(g):"m"===r?d=R(g):"d"===r?(o=N(g),d=I(g)):(o=j(g),d=l(t,r))}return d+(o?"\n"+o:"")};var F=3*y;r.incrementMonth=function(t,e,r){r=n(r)&&r;var a=g(t,y);if(t=Math.round(t-a),r)try{var o=Math.round(t/y)+w,i=M.getComponentMethod("calendars","getCal")(r),l=i.fromJD(o);return e%12?i.add(l,e,"m"):i.add(l,e/12,"y"),(l.toJD()-w)*y+a}catch(e){p("invalid ms "+t+" in calendar "+r)}var s=new Date(t+F);return s.setUTCMonth(s.getUTCMonth()+e)+a-F},r.findExactDates=function(t,e){for(var r,a,o=0,i=0,l=0,s=0,c=n(e)&&M.getComponentMethod("calendars","getCal")(e),u=0;u0&&(a.push(o),o=[])}return o.length>0&&a.push(o),a},r.makeLine=function(t,e){var r={};return r=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t},e&&(r.trace=e),r},r.makePolygon=function(t,e){var r={};if(1===t.length)r={type:"Polygon",coordinates:t};else{for(var n=new Array(t.length),a=0;ai?l:a(t)?Number(t):l):l},s.noop=t("./noop"),s.identity=t("./identity"),s.swapAttrs=function(t,e,r,n){r||(r="x"),n||(n="y");for(var a=0;ar?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},s.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},s.simpleMap=function(t,e,r,n){for(var a=t.length,o=new Array(a),i=0;i-1||u!==1/0&&u>=Math.pow(2,r)?t(e,r,n):s},s.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},s.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,a,o,i=t.length,l=2*i,s=2*e-1,c=new Array(s),u=new Array(i);for(r=0;r=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=i&&(a=l-1-a),o+=t[a]*c[n];u[r]=o}return u},s.syncOrAsync=function(t,e,r){function n(){return s.syncOrAsync(t,e,r)}for(var a,o;t.length;)if(o=t.splice(0,1)[0],(a=o(e))&&a.then)return a.then(n).then(void 0,s.promiseError);return r&&r(e)},s.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},s.noneOrAll=function(t,e,r){if(t){var n,a,o=!1,i=!0;for(n=0;n1?a+i[1]:"";if(o&&(i.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+o+"$2");return l+s}},{"../constants/numerical":139,"./clean_number":145,"./coerce":146,"./dates":147,"./ensure_array":148,"./extend":150,"./filter_unique":151,"./filter_visible":152,"./identity":155,"./is_array":157,"./is_plain_object":158,"./loggers":159,"./matrix":160,"./mod":161,"./nested_property":162,"./noop":163,"./notifier":164,"./push_unique":167,"./relink_private":169,"./search":170,"./stats":172,"./to_log_range":174,d3:15,"fast-isnumeric":17}],157:[function(t,e,r){"use strict";var n="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}};e.exports=function(t){return Array.isArray(t)||n.isView(t)}},{}],158:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],159:[function(t,e,r){"use strict";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;e=0;e--){if(n=t[e][0],o=t[e][1],s=!1,h(n))for(r=n.length-1;r>=0;r--)a(n[r],i(o,r))?s?n[r]=void 0:n.pop():s=!0;else if("object"==typeof n&&null!==n)for(l=Object.keys(n),s=!1,r=l.length-1;r>=0;r--)a(n[l[r]],i(o,l[r]))?delete n[l[r]]:s=!0;if(s)return}}function u(t){return void 0===t||null===t||"object"==typeof t&&(h(t)?!t.length:!Object.keys(t).length)}function f(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var d=t("fast-isnumeric"),h=t("./is_array"),p=t("./is_plain_object"),g=t("../plot_api/container_array_match");e.exports=function(t,e){if(d(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,a,i,l=0,s=e.split(".");l/g),l=0;li||n===a||ns)&&(!e||!u(t))}function r(t,e){var r=t[0],c=t[1];if(r===a||ri||c===a||cs)return!1;var u,f,d,h,p,g=n.length,m=n[0][0],v=n[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(d,v)))if(cu||Math.abs(n(i,d))>a)return!0;return!1};o.filter=function(t,e){function r(r){t.push(r);var l=n.length,s=a;n.splice(o+1);for(var c=s+1;c1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{"../constants/numerical":139,"./matrix":160}],167:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;ro.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},i.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},i.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},i.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)return void t.framework.undo();if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function i(t,e){return t>=e}var l=t("fast-isnumeric"),s=t("./loggers");r.findBin=function(t,e,r){if(l(e.start))return r?Math.ceil((t-e.start)/e.size)-1:Math.floor((t-e.start)/e.size);var c,u,f=0,d=e.length,h=0;for(u=e[e.length-1]>=e[0]?r?n:a:r?i:o;f90&&s.log("Long binary search..."),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,a=e[n]-e[0]||1,o=a/(n||1)/1e4,i=[e[0]],l=0;le[l]+o&&(a=Math.min(a,e[l+1]-e[l]),i.push(e[l+1]));return{vals:i,minDiff:a}},r.roundUp=function(t,e,r){for(var n,a=0,o=e.length-1,i=0,l=r?0:1,s=r?1:0,c=r?Math.ceil:Math.floor;at.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"fast-isnumeric":17}],173:[function(t,e,r){"use strict";function n(t,e){return t.node().getBoundingClientRect()[e]}function a(t){return t.replace(v,"\\lt ").replace(y,"\\gt ")}function o(t,e,r){var n="math-output-"+d.randstr([],64),o=f.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(a(t));MathJax.Hub.Queue(["Typeset",MathJax.Hub,o.node()],function(){var e=f.select("body").select("#MathJax_SVG_glyphs");if(o.select(".MathJax_SVG").empty()||!o.select("svg").node())d.log("There was an error in the tex syntax.",t),r();else{var n=o.select("svg").node().getBoundingClientRect();r(o.select(".MathJax_SVG"),e,n)}o.remove()})}function i(t,e){if(!t)return null;var r=t.match(e);return r&&(r[3]||r[4])}function l(t,e){if(!t)return"";for(var r=0;r1)for(var a=1;a doesnt match end tag <"+t+">. Pretending it did match.",e),o=c[c.length-1].node}(k);else{var N=y[4],R={type:k},I=i(N,z);if(I?(I=I.replace(E,"$1 fill:"),A&&(I+=";"+A)):A&&(I=A),I&&(R.style=I),"a"===k){l=!0;var j=i(N,O);if(j){var F=document.createElement("a");F.href=j,-1!==M.indexOf(F.protocol)&&(R.href=j,R.target=i(N,P)||"_blank",R.popup=i(N,D))}}n(R)}}return l}function u(t,e,r){var n,a,o,i=r.horizontalAlign,l=r.verticalAlign||"top",s=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===l?function(){return s.bottom-n.height}:"middle"===l?function(){return s.top+(s.height-n.height)/2}:function(){return s.top},o="right"===i?function(){return s.right-n.width}:"center"===i?function(){return s.left+(s.width-n.width)/2}:function(){return s.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:a()-c.top+"px",left:o()-c.left+"px","z-index":1e3}),this}}var f=t("d3"),d=t("../lib"),h=t("../constants/xmlns_namespaces"),p=t("../constants/string_mappings"),g=t("../constants/alignment").LINE_SPACING,m=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,a){function i(){u.empty()||(d=t.attr("class")+"-math",u.select("svg."+d).remove()),t.text("").style("white-space","pre"),c(t.node(),l)&&t.style("pointer-events","all"),r.positionText(t),a&&a.call(t)}var l=t.text(),s=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&l.match(m),u=f.select(t.node().parentNode);if(!u.empty()){var d=t.attr("class")?t.attr("class").split(" ")[0]:"text";return d+="-math",u.selectAll("svg."+d).remove(),u.selectAll("g."+d+"-group").remove(),t.style("display",null).attr({"data-unformatted":l,"data-math":"N"}),s?(e&&e._promises||[]).push(new Promise(function(e){t.style("display","none");var r={fontSize:parseInt(t.style("font-size"),10)};o(s[2],r,function(r,o,s){u.selectAll("svg."+d).remove(),u.selectAll("g."+d+"-group").remove();var c=r&&r.select("svg");if(!c||!c.node())return i(),void e();var f=u.append("g").classed(d+"-group",!0).attr({"pointer-events":"none","data-unformatted":l,"data-math":"Y"});f.node().appendChild(c.node()),o&&o.node()&&c.node().insertBefore(o.node().cloneNode(!0),c.node().firstChild),c.attr({class:d,height:s.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var h=t.style("fill")||"black";c.select("g").attr({fill:h,stroke:h});var p=n(c,"width"),g=n(c,"height"),m=+t.attr("x")-p*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],v=parseInt(t.style("font-size"),10)||n(t,"height"),y=-v/4;"y"===d[0]?(f.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+") translate("+[-p/2,y-g/2]+")"}),c.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===d[0]?c.attr({x:t.attr("x"),y:y-g/2}):"a"===d[0]?c.attr({x:0,y:y}):c.attr({x:m,y:+t.attr("y")+y-g/2}),a&&a.call(t,f),e(f)})})):i(),t}};var v=/(<|<|<)/g,y=/(>|>|>)/g,x={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},b={sub:"0.3em",sup:"-0.6em"},_={sub:"-0.21em",sup:"0.42em"},w="\u200b",M=["http:","https:","mailto:","",void 0,":"],k=new RegExp("]*)?/?>","g"),A=Object.keys(p.entityToUnicode).map(function(t){return{regExp:new RegExp("&"+t+";","g"),sub:p.entityToUnicode[t]}}),T=/(\r\n?|\n)/g,L=/(<[^<>]*>)/,C=/<(\/?)([^ >]*)(\s+(.*))?>/i,S=//i,z=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,O=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,P=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,D=/(^|[\s"'])popup\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,E=/(^|;)\s*color:/;r.plainText=function(t){return(t||"").replace(k," ")},r.lineCount=function(t){return t.selectAll("tspan.line").size()||1},r.positionText=function(t,e,r){return t.each(function(){function t(t,e){return void 0===e?null===(e=n.attr(t))&&(n.attr(t,0),e=0):n.attr(t,e),e}var n=f.select(this),a=t("x",e),o=t("y",r);"text"===this.nodeName&&n.selectAll("tspan.line").attr({x:a,y:o})})},r.makeEditable=function(t,e){function r(){a(),t.style({opacity:0});var e,r=s.attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&f.select(t.node().parentNode).select(e).style({opacity:0})}function n(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}function a(){var r=f.select(o),a=r.select(".svg-container"),i=a.append("div");i.classed("plugin-editable editable",!0).style({position:"absolute","font-family":t.style("font-family")||"Arial","font-size":t.style("font-size")||12,color:e.fill||t.style("fill")||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-parseFloat(t.style("font-size"))/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(e.text||t.attr("data-unformatted")).call(u(t,a,e)).on("blur",function(){o._editing=!1,t.text(this.textContent).style({opacity:1});var e,r=f.select(this).attr("class");(e=r?"."+r.split(" ")[0]+"-math-group":"[class*=-math-group]")&&f.select(t.node().parentNode).select(e).style({opacity:0});var n=this.textContent;f.select(this).transition().duration(0).remove(),f.select(document).on("mouseup",null),l.edit.call(t,n)}).on("focus",function(){var t=this;o._editing=!0,f.select(document).on("mouseup",function(){if(f.event.target===t)return!1;document.activeElement===i.node()&&i.node().blur()})}).on("keyup",function(){27===f.event.which?(o._editing=!1,t.style({opacity:1}),f.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),l.cancel.call(t,this.textContent)):(l.input.call(t,this.textContent),f.select(this).call(u(t,a,e)))}).on("keydown",function(){13===f.event.which&&this.blur()}).call(n)}var o=e.gd,i=e.delegate,l=f.dispatch("edit","input","cancel"),s=i||t;if(t.style({"pointer-events":i?"none":"all"}),1!==t.size())throw new Error("boo");return e.immediate?r():s.on("click",r),f.rebind(t,l,"on")}},{"../constants/alignment":137,"../constants/string_mappings":140,"../constants/xmlns_namespaces":141,"../lib":156,d3:15}],174:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":17}],175:[function(t,e,r){"use strict";var n=e.exports={},a=t("../plots/geo/constants").locationmodeToLayer,o=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=a[t.locationmode],n=e.objects[r];return o(e,n).features}},{"../plots/geo/constants":218,"topojson-client":23}],176:[function(t,e,r){"use strict";var n=t("../registry");e.exports=function(t){for(var e,r,a=n.layoutArrayContainers,o=n.layoutArrayRegexes,i=t.split("[")[0],l=0;l0)return t.substr(0,e)}var l=t("fast-isnumeric"),s=t("gl-mat4/fromQuat"),c=t("../registry"),u=t("../lib"),f=t("../plots/plots"),d=t("../plots/cartesian/axes"),h=t("../components/color");r.getGraphDiv=function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null===t||void 0===t)throw new Error("DOM element provided is null or undefined");return t},r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&u.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1);var a=d.list({_fullLayout:t});for(e=0;e3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var v=f.getSubplotIds(t,"gl3d");for(e=0;e1&&i.warn("Full array edits are incompatible with other edits",f);var y=r[""][""];if(u(y))e.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",f,y),!0;e.set(y)}return!g&&(d(m,v),h(t),!0)}var x,b,_,w,M,k,A,T=Object.keys(r).map(Number).sort(l),L=e.get(),C=L||[],S=n(v,f).get(),z=[],O=-1,P=C.length;for(x=0;xC.length-(A?0:1))i.warn("index out of range",f,_);else if(void 0!==k)M.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",f,_),u(k)?z.push(_):A?("add"===k&&(k={}),C.splice(_,0,k),S&&S.splice(_,0,{})):i.warn("Unrecognized full object edit value",f,_,k),-1===O&&(O=_);else for(b=0;b=0;x--)C.splice(z[x],1),S&&S.splice(z[x],1);if(C.length?L||e.set(C):e.set(null),g)return!1;if(d(m,v),p!==o){var D;if(-1===O)D=T;else{for(P=Math.max(C.length,P),D=[],x=0;x=O);x++)D.push(_);for(x=O;x=t.data.length||a<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(a,n+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function s(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),l(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&l(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function c(t,e,r){var n,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&sH.range[0]?[1,2]:[2,1]);else{var G=H.range[0],Y=H.range[1];V?(G<=0&&Y<=0&&r(R+".autorange",!0),G<=0?G=Y/1e6:Y<=0&&(Y=G/1e6),r(R+".range[0]",Math.log(G)/Math.LN10),r(R+".range[1]",Math.log(Y)/Math.LN10)):(r(R+".range[0]",Math.pow(10,G)),r(R+".range[1]",Math.pow(10,Y)))}else r(R+".autorange",!0);M.getComponentMethod("annotations","convertCoords")(t,F,L,r),M.getComponentMethod("images","convertCoords")(t,F,L,r)}else r(R+".autorange",!0);b.nestedProperty(c,R+"._inputRange").set(null)}else if(D.match(E.AX_NAME_PATTERN)){var X=b.nestedProperty(c,A).get(),Z=(L||{}).type;Z&&"-"!==Z||(Z="linear"),M.getComponentMethod("annotations","convertCoords")(t,X,Z,r),M.getComponentMethod("images","convertCoords")(t,X,Z,r)}var W=O.containerArrayMatch(A);if(W){o=W.array,i=W.index;var $=W.property,Q=b.nestedProperty(s,o),J=(Q||[])[i]||{};if(""===i)-1===A.indexOf("updatemenus")&&(v.docalc=!0);else if(""===$){var K=L;O.isAddVal(L)?_[A]=null:O.isRemoveVal(L)?(_[A]=J,K=J):b.warn("unrecognized full object value",e),(n(K,"x")||n(K,"y")&&-1===A.indexOf("updatemenus"))&&(v.docalc=!0)}else!n(J,"x")&&!n(J,"y")||b.containsAny(A,["color","opacity","align","dash","updatemenus"])||(v.docalc=!0);d[o]||(d[o]={});var tt=d[o][i];tt||(tt=d[o][i]={}),tt[$]=L,delete e[A]}else if("reverse"===D)I.range?I.range.reverse():(r(R+".autorange",!0),I.range=[1,0]),F.autorange?v.docalc=!0:v.doplot=!0;else{var et=String(T.parts[1]||"");0===z.indexOf("scene")?"camera"===T.parts[1]?v.docamera=!0:v.doplot=!0:0===z.indexOf("geo")?v.doplot=!0:0===z.indexOf("ternary")?v.doplot=!0:"paper_bgcolor"===A?v.doplot=!0:"margin"===z||"autorange"===et||"rangemode"===et||"type"===et||"domain"===et||"fixedrange"===et||"scaleanchor"===et||"scaleratio"===et||-1!==A.indexOf("calendar")||A.match(/^(bar|box|font)/)?v.docalc=!0:!c._has("gl2d")||-1===A.indexOf("axis")&&"plot_bgcolor"!==A?!c._has("gl2d")||"dragmode"!==A||"lasso"!==L&&"select"!==L||"lasso"===B||"select"===B?"hiddenlabels"===A?v.docalc=!0:-1!==z.indexOf("legend")?v.dolegend=!0:-1!==A.indexOf("title")?v.doticks=!0:-1!==z.indexOf("bgcolor")?v.dolayoutstyle=!0:C>1&&b.containsAny(et,["tick","exponent","grid","zeroline"])?v.doticks=!0:-1!==A.indexOf(".linewidth")&&-1!==A.indexOf("axis")?v.doticks=v.dolayoutstyle=!0:C>1&&-1!==et.indexOf("line")?v.dolayoutstyle=!0:C>1&&"mirror"===et?v.doticks=v.dolayoutstyle=!0:"margin.pad"===A?v.doticks=v.dolayoutstyle=!0:-1!==["hovermode","dragmode"].indexOf(A)||-1!==A.indexOf("spike")?v.domodebar=!0:-1===["height","width","autosize"].indexOf(A)&&(v.doplot=!0):v.docalc=!0:v.doplot=!0,T.set(L)}}}for(o in d){O.applyContainerArrayChanges(t,b.nestedProperty(s,o),d[o],v)||(v.doplot=!0)}var rt=c._axisConstraintGroups;for(m in w)for(i=0;i=l.length?l[0]:l[t]:l}function a(t){return Array.isArray(s)?t>=s.length?s[0]:s[t]:s}function o(t,e){var r=0;return function(){if(t&&++r===e)return t()}}if(t=P.getGraphDiv(t),!b.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var i=t._transitionData;i._frameQueue||(i._frameQueue=[]),r=k.supplyAnimationDefaults(r);var l=r.transition,s=r.frame;return void 0===i._frameWaitingCnt&&(i._frameWaitingCnt=0),new Promise(function(s,c){function u(){t.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}function f(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var e=i._currentFrame=i._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,i._lastFrameAt=Date.now(),i._timeToNext=e.frameOpts.duration,k.transition(t,e.frame.data,e.frame.layout,P.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else u()}function d(){t.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null;var e=function(){i._animationRaf=window.requestAnimationFrame(e),Date.now()-i._lastFrameAt>i._timeToNext&&f()};e()}function h(t){return Array.isArray(l)?m>=l.length?t.transitionOpts=l[m]:t.transitionOpts=l[0]:t.transitionOpts=l,m++,t}var p,g,m=0,v=[],y=void 0===e||null===e,x=Array.isArray(e);if(y||x||!b.isPlainObject(e)){if(y||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&MM)&&A.push(g);v=A}}v.length>0?function(e){if(0!==e.length){for(var l=0;l=0;a--)if(b.isPlainObject(e[a])){var d=(c[e[a].name]||{}).name,h=e[a].name;d&&h&&"number"==typeof h&&c[d]&&(n++,b.warn('addFrames: overwriting frame "'+c[d].name+'" with a frame whose name of type "number" also equates to "'+d+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&b.warn("addFrames: This API call has yielded too many warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f.push({frame:k.supplyFrameDefaults(e[a]),index:r&&void 0!==r[a]&&null!==r[a]?r[a]:u+a})}f.sort(function(t,e){return t.index>e.index?-1:t.index=0;a--){if(o=f[a].frame,"number"==typeof o.name&&b.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!o.name)for(;c[o.name="frame "+t._transitionData._counter++];);if(c[o.name]){for(i=0;i=0;r--)n=e[r],o.push({type:"delete",index:n}),i.unshift({type:"insert",index:n,value:a[n]});var l=k.modifyFrames,s=k.modifyFrames,c=[t,i],u=[t,o];return w&&w.add(t,l,c,s,u),k.modifyFrames(t,o)},x.purge=function(t){t=P.getGraphDiv(t);var e=t._fullLayout||{},r=t._fullData||[];return k.cleanPlot([],{},r,e),k.purge(t),_.purge(t),e._container&&e._container.remove(),delete t._context,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,delete t._hmpixcount,delete t._hmlumcount,t}},{"../components/drawing":65,"../components/errorbars":71,"../constants/xmlns_namespaces":141,"../lib":156,"../lib/events":149,"../lib/queue":168,"../lib/svg_text_utils":173,"../plotly":187,"../plots/cartesian/axis_ids":195,"../plots/cartesian/constants":197,"../plots/cartesian/constraints":199,"../plots/cartesian/graph_interact":201,"../plots/plots":233,"../plots/polar":236,"../registry":241,"./helpers":177,"./manage_arrays":178,"./subroutines":184,d3:15,"fast-isnumeric":17,"has-hover":19}],180:[function(t,e,r){"use strict";function n(t,r){try{t._fullLayout._paper.style("background",r)}catch(t){e.exports.logging>0&&console.error(t)}}e.exports={staticPlot:!1,editable:!1,editableMainTitle:!0,editableAxisXTitle:!0, +editableAxisX2Title:!0,editableAxisYTitle:!0,editableAxisY2Title:!0,autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:n,topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:!1,globalTransforms:[]}},{}],181:[function(t,e,r){"use strict";function n(t){var e,r;"area"===t?(e={attributes:x},r={}):(e=h.modules[t]._module,r=e.basePlotModule);var n={};n.type=null,w(n,g),w(n,e.attributes),r.attributes&&w(n,r.attributes),Object.keys(h.componentsRegistry).forEach(function(e){var r=h.componentsRegistry[e];r.schema&&r.schema.traces&&r.schema.traces[t]&&Object.keys(r.schema.traces[t]).forEach(function(e){d(n,r.schema.traces[t][e],e)})}),n.type=t;var a={meta:e.meta||{},attributes:l(n)};if(e.layoutAttributes){var o={};w(o,e.layoutAttributes),a.layoutAttributes=l(o)}return a}function a(){var t={};return w(t,m),Object.keys(h.subplotsRegistry).forEach(function(e){var r=h.subplotsRegistry[e];if(r.layoutAttributes)if("cartesian"===r.name)f(t,r,"xaxis"),f(t,r,"yaxis");else{var n="subplot"===r.attr?r.name:r.attr;f(t,r,n)}}),t=u(t),Object.keys(h.componentsRegistry).forEach(function(e){var r=h.componentsRegistry[e];r.layoutAttributes&&(r.schema&&r.schema.layout?Object.keys(r.schema.layout).forEach(function(e){d(t,r.schema.layout[e],e)}):d(t,r.layoutAttributes,r.name))}),{layoutAttributes:l(t)}}function o(t){var e=h.transformsRegistry[t],r=w({},e.attributes);return Object.keys(h.componentsRegistry).forEach(function(e){var n=h.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){d(r,n.schema.transforms[t][e],e)})}),{attributes:l(r)}}function i(){var t={frames:p.extendDeep({},v)};return l(t),t.frames}function l(t){return s(t),c(t),t}function s(t){function e(t){return{valType:"string"}}function n(t,n,a){r.isValObject(t)?"data_array"===t.valType?(t.role="data",a[n+"src"]=e(n)):!0===t.arrayOk&&(a[n+"src"]=e(n)):p.isPlainObject(t)&&(t.role="object")}r.crawl(t,n)}function c(t){function e(t,e,r){if(t){var n=t[k];n&&(delete t[k],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}r.crawl(t,e)}function u(t){return _(t,{radialaxis:b.radialaxis,angularaxis:b.angularaxis}),_(t,b.layout),t}function f(t,e,r){var n=p.nestedProperty(t,r),a=w({},e.layoutAttributes);a[M]=!0,n.set(a)}function d(t,e,r){var n=p.nestedProperty(t,r);n.set(w(n.get()||{},e))}var h=t("../registry"),p=t("../lib"),g=t("../plots/attributes"),m=t("../plots/layout_attributes"),v=t("../plots/frame_attributes"),y=t("../plots/animation_attributes"),x=t("../plots/polar/area_attributes"),b=t("../plots/polar/axis_attributes"),_=p.extendFlat,w=p.extendDeep,M="_isSubplotObj",k="_isLinkedToArray",A=[M,k,"_arrayAttrRegexps","_deprecated"];r.IS_SUBPLOT_OBJ=M,r.IS_LINKED_TO_ARRAY=k,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=A,r.get=function(){var t={};h.allTypes.concat("area").forEach(function(e){t[e]=n(e)});var e={};return Object.keys(h.transformsRegistry).forEach(function(t){e[t]=o(t)}),{defs:{valObjects:p.valObjects,metaKeys:A.concat(["description","role"])},traces:t,layout:a(),transforms:e,frames:i(),animation:l(y)}},r.crawl=function(t,e,n){var a=n||0;Object.keys(t).forEach(function(n){var o=t[n];-1===A.indexOf(n)&&(e(o,n,t,a),r.isValObject(o)||p.isPlainObject(o)&&r.crawl(o,e,a+1))})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,i,l){if(o=o.slice(0,l).concat([r]),e&&("data_array"===e.valType||!0===e.arrayOk)){var s=n(o),c=p.nestedProperty(t,s).get();Array.isArray(c)&&a.push(s)}}function n(t){return t.join(".")}var a=[],o=[];if(r.crawl(g,e),t._module&&t._module.attributes&&r.crawl(t._module.attributes,e),t.transforms)for(var i=t.transforms,l=0;l=t[1]||a[1]<=t[0])&&(o[0]e[0]))return!0}return!1}var a=t("d3"),o=t("../plotly"),i=t("../registry"),l=t("../plots/plots"),s=t("../lib"),c=t("../components/color"),u=t("../components/drawing"),f=t("../components/titles"),d=t("../components/modebar"),h=t("../plots/cartesian/graph_interact");r.layoutStyles=function(t){return s.syncOrAsync([l.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){var e,i=t._fullLayout,l=i._size,s=o.Axes.list(t);for(e=0;e1)};d(e.width)&&d(e.height)||n(new Error("Height and width should be pixel values."));var h=s(t,{format:"png",height:e.height,width:e.width}),p=h.gd;p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var g=l.getRedrawFunc(p);o.plot(p,h.data,h.layout,h.config).then(g).then(f).then(function(t){r(t)}).catch(function(t){n(t)})})}var a=t("fast-isnumeric"),o=t("../plotly"),i=t("../lib"),l=t("../snapshot/helpers"),s=t("../snapshot/cloneplot"),c=t("../snapshot/tosvg"),u=t("../snapshot/svgtoimg");e.exports=n},{"../lib":156,"../plotly":187,"../snapshot/cloneplot":242,"../snapshot/helpers":245,"../snapshot/svgtoimg":247,"../snapshot/tosvg":249,"fast-isnumeric":17}],186:[function(t,e,r){"use strict";function n(t,e,r,a,o,c){c=c||[];for(var u=Object.keys(t),d=0;d1&&s.push(i("object","layout"))),d.supplyDefaults(c);for(var u=c._fullData,m=r.length,v=0;v.3*f||o(n)||o(a))){var d=r.dtick/2;t+=t+d.8){var i=Number(r.substr(1));o.exactYears>.8&&i%12==0?t=N.tickIncrement(t,"M6","reverse")+1.5*O:o.exactMonths>.8?t=N.tickIncrement(t,"M1","reverse")+15.5*O:t-=O/2;var l=N.tickIncrement(t,r);if(l<=n)return l}return t}function o(t){var e,r,n=t.tickvals,a=t.ticktext,o=new Array(n.length),i=w.simpleMap(t.range,t.r2l),l=1.0001*i[0]-1e-4*i[1],c=1.0001*i[1]-1e-4*i[0],u=Math.min(l,c),f=Math.max(l,c),d=0;Array.isArray(a)||(a=[]);var h="category"===t.type?t.d2l_noadd:t.d2l;for("log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1)),r=0;ru&&e10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=O&&a<=10||e>=15*O)t._tickround="d";else if(e>=D&&a<=16||e>=P)t._tickround="M";else if(e>=E&&a<=19||e>=D)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20}}else if(x(e)||"L"===e.charAt(0)){var i=t.range.map(t.r2d||Number);x(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(i[0]),Math.abs(i[1])),s=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(s)>3&&("SI"===t.exponentformat||"B"===t.exponentformat?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}function s(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}function c(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||t.tickformat;n&&(a=x(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var i,l=w.formatDate(e.x,o,a,t.calendar),s=l.indexOf("\n");-1!==s&&(i=l.substr(s+1),l=l.substr(0,s)),n&&("00:00:00"===l||"00:00"===l?(l=i,i=""):8===l.length&&(l=l.replace(/:00$/,""))),i&&(r?"d"===a?l+=", "+i:l=i+(l?", "+l:""):t._inCalcTicks&&i===t._prevDateHead||(l+="
"+i,t._prevDateHead=i)),e.text=l}function u(t,e,r,n,a){var o=t.dtick,i=e.x;if(!n||"string"==typeof o&&"L"===o.charAt(0)||(o="L3"),t.tickformat||"string"==typeof o&&"L"===o.charAt(0))e.text=h(Math.pow(10,i),t,a,n);else if(x(o)||"D"===o.charAt(0)&&w.mod(i+.01,1)<.1)if(-1!==["e","E","power"].indexOf(t.exponentformat)){var l=Math.round(i);e.text=0===l?1:1===l?"10":l>1?"10"+l+"":"10\u2212"+-l+"",e.fontSize*=1.25}else e.text=h(Math.pow(10,i),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6);else{if("D"!==o.charAt(0))throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,w.mod(i,1)))),e.fontSize*=.75}if("D1"===t.dtick){var s=String(e.text).charAt(0);"0"!==s&&"1"!==s||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(i<0?.5:.25)))}}function f(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}function d(t,e,r,n,a){"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide"),e.text=h(e.x,t,a,n)}function h(t,e,r,n){var a=t<0,o=e._tickround,i=r||e.exponentformat||"B",s=e._tickexponent,c=e.tickformat,u=e.separatethousands;if(n){var f={exponentformat:e.exponentformat,dtick:"none"===e.showexponent?e.dtick:x(t)?Math.abs(t)||1:1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};l(f),o=(Number(f._tickround)||0)+4,s=f._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return y.format(c)(t).replace(/-/g,"\u2212");var d=Math.pow(10,-o)/2;if("none"===i&&(s=0),(t=Math.abs(t))12||s<-15)?t+="e"+g:"E"===i?t+="E"+g:"power"===i?t+="\xd710"+g+"":"B"===i&&9===s?t+="B":"SI"!==i&&"B"!==i||(t+=U[s/3+5])}return a?"\u2212"+t:t}function p(t,e){var r,n,a=[];for(r=0;r1)for(n=1;n2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},N.getAutoRange=function(t){var e,r=[],n=t._min[0].val,a=t._max[0].val;for(e=1;e0&&u>0&&f/u>d&&(s=i,c=l,d=f/u);if(n===a){var g=n-1,m=n+1;r="tozero"===t.rangemode?n<0?[g,0]:[0,m]:"nonnegative"===t.rangemode?[Math.max(0,g),Math.max(0,m)]:[g,m]}else d&&("linear"!==t.type&&"-"!==t.type||("tozero"===t.rangemode?(s.val>=0&&(s={val:0,pad:0}),c.val<=0&&(c={val:0,pad:0})):"nonnegative"===t.rangemode&&(s.val-d*s.pad<0&&(s={val:0,pad:0}),c.val<0&&(c={val:1,pad:0})),d=(c.val-s.val)/(t._length-s.pad-c.pad)),r=[s.val-d*s.pad,c.val+d*c.pad]);return r[0]===r[1]&&("tozero"===t.rangemode?r=r[0]<0?[r[0],0]:r[0]>0?[0,r[0]]:[0,1]:(r=[r[0]-1,r[0]+1],"nonnegative"===t.rangemode&&(r[0]=Math.max(0,r[0])))),h&&r.reverse(),w.simpleMap(r,t.l2r||Number)},N.doAutoRange=function(t){t._length||t.setScale();var e=t._min&&t._max&&t._min.length&&t._max.length;if(t.autorange&&e){t.range=N.getAutoRange(t),t._r=t.range.slice(),t._rl=w.simpleMap(t._r,t.r2l);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},N.saveRangeInitial=function(t,e){for(var r=N.list(t,"",!0),n=!1,a=0;a=d?h=!1:l.val>=c&&l.pad<=d&&(t._min.splice(i,1),i--);h&&t._min.push({val:c,pad:y&&0===c?0:d})}if(n(u)){for(h=!0,i=0;i=u&&l.pad>=f?h=!1:l.val<=u&&l.pad<=f&&(t._max.splice(i,1),i--);h&&t._max.push({val:u,pad:y&&0===u?0:f})}}}if((t.autorange||!!w.nestedProperty(t,"rangeslider.autorange").get())&&e){t._min||(t._min=[]),t._max||(t._max=[]),r||(r={}),t._m||t.setScale();var o,i,l,s,c,u,f,d,h,p,g,m=e.length,v=r.padded?.05*t._length:0,y=r.tozero&&("linear"===t.type||"-"===t.type);v&&"domain"===t.constrain&&t._inputDomain&&(v*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0]));var b=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),_=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),M=n(r.vpadplus||r.vpad),k=n(r.vpadminus||r.vpad);for(o=0;o<6;o++)a(o);for(o=m-1;o>5;o--)a(o)}},N.autoBin=function(t,e,r,o,i){var l=w.aggNums(Math.min,null,t),s=w.aggNums(Math.max,null,t);if(i||(i=e.calendar),"category"===e.type)return{start:l-.5,end:s+.5,size:1};var c;if(r)c=(s-l)/r;else{var u=w.distinctVals(t),f=Math.pow(10,Math.floor(Math.log(u.minDiff)/Math.LN10)),d=f*w.roundUp(u.minDiff/f,[.9,1.9,4.9,9.9],!0);c=Math.max(d,2*w.stdev(t)/Math.pow(t.length,o?.25:.4)),x(c)||(c=1)}var h;h="log"===e.type?{type:"linear",range:[l,s]}:{type:e.type,range:w.simpleMap([l,s],e.c2r,0,i),calendar:i},N.setConvert(h),N.autoTicks(h,c);var p,g=N.tickIncrement(N.tickFirst(h),h.dtick,"reverse",i);if("number"==typeof h.dtick){g=n(g,t,h,l,s);p=g+(1+Math.floor((s-g)/h.dtick))*h.dtick}else for("M"===h.dtick.charAt(0)&&(g=a(g,t,h.dtick,l,i)),p=g;p<=s;)p=N.tickIncrement(p,h.dtick,!1,i);return{start:e.c2r(g,0,i), +end:e.c2r(p,0,i),size:h.dtick}},N.calcTicks=function(t){var e=w.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=w.constrain(t._length/r,4,9)+1)),"array"===t.tickmode&&(n*=100),N.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}if(t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),l(t),"array"===t.tickmode)return o(t);t._tmin=N.tickFirst(t);var a=e[1]=s:c<=s)&&(i.push(c),!(i.length>1e3));c=N.tickIncrement(c,t.dtick,a,t.calendar));t._tmax=i[i.length-1],t._prevDateHead="",t._inCalcTicks=!0;for(var u=new Array(i.length),f=0;fS?(e/=S,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="M"+12*i(e,r,j)):n>z?(e/=z,t.dtick="M"+i(e,1,F)):n>O?(t.dtick=i(e,O,q),t.tick0=w.dateTick0(t.calendar,!0)):n>P?t.dtick=i(e,P,F):n>D?t.dtick=i(e,D,B):n>E?t.dtick=i(e,E,B):(r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=i(e,r,j))}else if("log"===t.type){t.tick0=0;var a=w.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(a[1]-a[0])<1){var o=1.5*Math.abs((a[1]-a[0])/e);e=Math.abs(Math.pow(10,a[1])-Math.pow(10,a[0]))/o,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick="L"+i(e,r,j)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):(t.tick0=0,r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),t.dtick=i(e,r,j));if(0===t.dtick&&(t.dtick=1),!x(t.dtick)&&"string"!=typeof t.dtick){var l=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(l)}},N.tickIncrement=function(t,e,r,n){var a=r?-1:1;if(x(e))return t+a*e;var o=e.charAt(0),i=a*Number(e.substr(1));if("M"===o)return w.incrementMonth(t,i,n);if("L"===o)return Math.log(Math.pow(10,t)+i)/Math.LN10;if("D"===o){var l="D2"===e?V:H,s=t+.01*a,c=w.roundUp(w.mod(s,1),l,r);return Math.floor(s)+Math.log(y.round(Math.pow(10,c),1))/Math.LN10}throw"unrecognized dtick "+String(e)},N.tickFirst=function(t){var e=t.r2l||Number,r=w.simpleMap(t.range,e),n=r[1]1&&ee+1){var o=t.text,i=Math.round(e/(a/o.length)),l=Math.floor(i/2),s=i-l-1;o=o.substr(0,l)+"\u2026"+o.substr(-s);r.select("text").text(o),r.insert("title","text").text(t.text)}})}function f(){var e,r,n,a,o,i=c._boundingBox,l=0,s=0;if("x"===c._id.charAt(0)?(e="height",a="r","2"===c._id.charAt(1)?(s=1,r="t"):r="b"):"y"===c._id.charAt(0)&&(e="width","2"===c._id.charAt(1)?(l=1,r="r"):r="l"),e&&r){if(n=i[e],c._titleElement){n+=c._titleElement.node().getBoundingClientRect()[e]+2}var u=.5*t._fullLayout[e];n=Math.min(n,u);var f={x:l,y:s,l:0,r:0,b:0,t:0};if(f[r]=n,"r"===a&&(0===c._lastangle&&(o=c._lastLabelWidth/2),o>0)){var d={x:1.01,y:0,l:0,r:o,b:0,t:0};b.autoMargin(t,"xaxis_on_r",d)}b.autoMargin(t,c._name,f)}}function d(){function e(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}var n=r.node().getBoundingClientRect(),a=t.getBoundingClientRect();if(c._boundingBox={width:n.width,height:n.height,left:n.left-a.left,right:n.right-a.left,top:n.top-a.top,bottom:n.bottom-a.top},v){var o=c._counterSpan=[1/0,-1/0];for(L=0;L2*a}function o(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,a=0,o=0;o2*n}var i=t("fast-isnumeric"),l=t("../../lib"),s=t("../../constants/numerical").BADNUM;e.exports=function(t,e){return a(t,e)?"date":o(t)?"category":n(t)?"linear":"-"}},{"../../constants/numerical":139,"../../lib":156,"fast-isnumeric":17}],194:[function(t,e,r){"use strict";var n=t("tinycolor2").mix,a=t("../../registry"),o=t("../../lib"),i=t("../../components/color/attributes").lightFraction,l=t("./layout_attributes"),s=t("./tick_value_defaults"),c=t("./tick_mark_defaults"),u=t("./tick_label_defaults"),f=t("./category_order_defaults"),d=t("./set_convert"),h=t("./ordered_categories");e.exports=function(t,e,r,p,g){function m(r,n){return o.coerce2(t,e,l,r,n)}var v=p.letter,y=p.font||{},x="Click to enter "+(p.title||v.toUpperCase()+" axis")+" title",b=r("visible",!p.cheateronly),_=e.type;if("date"===_){a.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",p.calendar)}if(d(e,g),r("autorange",!e.isValidRange(t.range))&&r("rangemode"),r("range"),e.cleanRange(),f(t,e,r),e._initialCategories="category"===_?h(v,e.categoryorder,e.categoryarray,p.data):[],!b)return e;var w=r("color"),M=w===t.color?w:y.color;r("title",x),o.coerceFont(r,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:M}),s(t,e,r,_),u(t,e,r,_,p),c(t,e,r,p);var k=m("linecolor",w),A=m("linewidth"),T=r("showline",!!k||!!A);T||(delete e.linecolor,delete e.linewidth),(T||e.ticks)&&r("mirror");var L=m("gridcolor",n(w,p.bgColor,i).toRgbString()),C=m("gridwidth");r("showgrid",p.showGrid||!!L||!!C)||(delete e.gridcolor,delete e.gridwidth);var S=m("zerolinecolor",w),z=m("zerolinewidth");return r("zeroline",p.showGrid||!!S||!!z)||(delete e.zerolinecolor,delete e.zerolinewidth),e}},{"../../components/color/attributes":40,"../../lib":156,"../../registry":241,"./category_order_defaults":196,"./layout_attributes":203,"./ordered_categories":205,"./set_convert":209,"./tick_label_defaults":210,"./tick_mark_defaults":211,"./tick_value_defaults":212,tinycolor2:22}],195:[function(t,e,r){"use strict";function n(t,e,r){function n(t,r){for(var n=Object.keys(t),a=/^[xyz]axis[0-9]*/,o=[],i=0;i0;o&&(n="array");var i=r("categoryorder",n);"array"===i&&r("categoryarray"),o||"array"!==i||(e.categoryorder="trace")}}},{}],197:[function(t,e,r){"use strict";e.exports={idRegex:{x:/^x([2-9]|[1-9][0-9]+)?$/,y:/^y([2-9]|[1-9][0-9]+)?$/},attrRegex:{x:/^xaxis([2-9]|[1-9][0-9]+)?$/,y:/^yaxis([2-9]|[1-9][0-9]+)?$/},xAxisMatch:/^xaxis[0-9]*$/,yAxisMatch:/^yaxis[0-9]*$/,AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4]}},{}],198:[function(t,e,r){"use strict";function n(t,e,r,n){var a,o,l,s,c=n[i(e)].type,u=[];for(o=0;oi*v)||_)for(r=0;rO&&DS&&(S=D);var R=(S-C)/(2*z);f/=R,C=s.l2r(C),S=s.l2r(S),s.range=s._input.range=A=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function c(t,e){return t?"nsew"===t?"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function u(t,e,r,n,a){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",a+"Z")}function f(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:T.background,stroke:T.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function d(t){t.selectAll(".select-outline").remove()}function h(t,e,r,n,a,o){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),a||(t.transition().style("fill",o>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function p(t){b.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function g(t){return-1!==["lasso","select"].indexOf(t)}function m(t,e){return"M"+(t.l-.5)+","+(e-j-.5)+"h-3v"+(2*j+1)+"h3ZM"+(t.r+.5)+","+(e-j-.5)+"h3v"+(2*j+1)+"h-3Z"}function v(t,e){return"M"+(e-j-.5)+","+(t.t-.5)+"v-3h"+(2*j+1)+"v3ZM"+(e-j-.5)+","+(t.b+.5)+"v3h"+(2*j+1)+"v-3Z"}function y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,j)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function x(t,e,r){var n,a,o,i,l,s,c=!1,u={},f={};for(n=0;nj||l>j?(kt="xy",i/ot>l/it?(l=i*it/ot,xt>o?bt.t=xt-l:bt.b=xt+l):(i=l*ot/it,yt>a?bt.l=yt-i:bt.r=yt+i),Tt.attr("d",y(bt))):n():!st||l0&&(t.emit("plotly_zoom",l),l.userHandled||(J(kt),F&&t.data&&t._context.showTips&&(k.notifier("Double-click to
zoom back out","long"),F=!1),l.pre=!1,t.emit("plotly_zoom",l)))}function X(e,r){var n=1===(q+H).length;if(e)J();else if(2!==r||n){if(1===r&&n){var a=q?rt[0]:et[0],i="s"===q||"w"===H?0:1,l=a._name+".range["+i+"]",s=o(a,i),c="left",u="middle";if(a.fixedrange)return;q?(u="n"===q?"top":"bottom","right"===a.side&&(c="right")):"e"===H&&(c="right"),t._context.showAxisRangeEntryBoxes&&b.select(mt).call(A.makeEditable,{gd:t,immediate:!0,background:ht.paper_bgcolor,text:String(s),fill:a.tickfont?a.tickfont.color:"#444",horizontalAlign:c,verticalAlign:u}).on("edit",function(e){var r=a.d2r(e);void 0!==r&&w.relayout(t,l,r)})}}else Q()}function Z(e){function r(t,e,r){function n(e){return t.l2r(o+(e-o)*r)}if(!t.fixedrange){var a=k.simpleMap(t.range,t.r2l),o=a[0]+(a[1]-a[0])*e;t.range=a.map(n)}}if(t._context.scrollZoom||ht._enablescrollzoom){if(t._transitioningWithDuration)return k.pauseEvent(e);var n=t.querySelector(".plotly");if(V(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(St);var a=-e.deltaY;if(isFinite(a)||(a=e.wheelDelta/10),!isFinite(a))return void k.log("Did not find wheel motion attributes: ",e);var o,i=Math.exp(-Math.min(Math.max(a,-20),20)/100),l=Ot.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-l.left)/l.width,c=(l.bottom-e.clientY)/l.height;if(H||ut){for(H||(s=.5),o=0;ou[1]-.01&&(e.domain=[0,1]),a.noneOrAll(t.domain,e.domain,[0,1])}return e}},{"../../lib":156,"fast-isnumeric":17}],207:[function(t,e,r){"use strict";var n=t("../../constants/alignment").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],o=a[0]+(a[1]-a[0])*r;t.range=t._input.range=[t.l2r(o+(a[0]-o)*e),t.l2r(o+(a[1]-o)*e)]}},{"../../constants/alignment":137}],208:[function(t,e,r){"use strict";function n(t){return t._id}function a(t,e){if(Array.isArray(t))for(var r=e.cd[0].trace,n=0;n0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],a=t.range[1];return.5*(n+a-3*w*Math.abs(n-a))}return h}function f(e,r,n){var a=c(e,n||t.calendar);if(a===h){if(!o(e))return h;a=c(new Date(+e))}return a}function m(e,r,n){return s(e,r,n||t.calendar)}function v(e){return t._categories[Math.round(e)]}function y(e){if(null!==e&&void 0!==e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return h}function x(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if(o(e))return+e}function b(e){return o(e)?a.round(t._b+t._m*e,2):h}function _(e){return(e-t._b)/t._m}e=e||{};var w=10;t.c2l="log"===t.type?r:u,t.l2c="log"===t.type?n:u,t.l2p=b,t.p2l=_,t.c2p="log"===t.type?function(t,e){return b(r(t,e))}:b,t.p2c="log"===t.type?function(t){return n(_(t))}:_,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=u,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=_,t.cleanPos=u):"log"===t.type?(t.d2r=t.d2l=function(t,e){return r(l(t),e)},t.r2d=t.r2c=function(t){return n(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=u,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=_,t.cleanPos=u):"date"===t.type?(t.d2r=t.r2d=i.identity,t.d2c=t.r2c=t.d2l=t.r2l=f,t.c2d=t.c2r=t.l2d=t.l2r=m,t.d2p=t.r2p=function(e,r,n){return t.l2p(f(e,0,n))},t.p2d=t.p2r=function(t,e,r){return m(_(t),e,r)},t.cleanPos=function(e){return i.cleanDate(e,h,t.calendar)}):"category"===t.type&&(t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2r=t.d2l_noadd=x,t.r2c=function(e){var r=x(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=u,t.r2l=x,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return v(_(t))},t.r2p=t.d2p,t.p2r=_,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:u(t)}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e){e||(e="range");var r,n,a=i.nestedProperty(t,e).get(),l=(t._id||"x").charAt(0);if(n="date"===t.type?i.dfltRange(t.calendar):"y"===l?p.DFLTRANGEY:p.DFLTRANGEX,n=n.slice(),!a||2!==a.length)return void i.nestedProperty(t,e).set(n);for("date"===t.type&&(a[0]=i.cleanDate(a[0],h,t.calendar),a[1]=i.cleanDate(a[1],h,t.calendar)),r=0;r<2;r++)if("date"===t.type){if(!i.isDateTime(a[r],t.calendar)){t[e]=n;break}if(t.r2l(a[0])===t.r2l(a[1])){var s=i.constrain(t.r2l(a[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);a[0]=t.l2r(s-1e3),a[1]=t.l2r(s+1e3);break}}else{if(!o(a[r])){if(!o(a[1-r])){t[e]=n;break}a[r]=a[1-r]*(r?10:.1)}if(a[r]<-d?a[r]=-d:a[r]>d&&(a[r]=d),a[0]===a[1]){var c=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=c,a[1]+=c}}},t.setScale=function(r){var n=e._size,a=t._id.charAt(0);if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var o=g.getFromId({_fullLayout:e},t.overlaying);t.domain=o.domain}var l=r&&t._r?"_r":"range",s=t.calendar;t.cleanRange(l);var c=t.r2l(t[l][0],s),u=t.r2l(t[l][1],s);if("y"===a?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),!isFinite(t._m)||!isFinite(t._b))throw i.notifier("Something went wrong with axis scaling","long"),e._replotting=!1,new Error("axis scaling")},t.makeCalcdata=function(e,r){var n,a,o,i="date"===t.type&&e[r+"calendar"];if(r in e)for(n=e[r],a=new Array(n.length),o=0;o0?Number(u):c;else if("string"!=typeof u)e.dtick=c;else{var f=u.charAt(0),d=u.substr(1);d=n(d)?Number(d):0,(d<=0||!("date"===i&&"M"===f&&d===Math.round(d)||"log"===i&&"L"===f||"log"===i&&"D"===f&&(1===d||2===d)))&&(e.dtick=c)}var h="date"===i?a.dateTick0(e.calendar):0,p=r("tick0",h);"date"===i?e.tick0=a.cleanDate(p,h):n(p)&&"D1"!==u&&"D2"!==u?e.tick0=Number(p):e.tick0=h}else{var g=r("tickvals");void 0===g?e.tickmode="auto":r("ticktext")}}},{"../../constants/numerical":139,"../../lib":156,"fast-isnumeric":17}],213:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plotly"),o=t("../../registry"),i=t("../../components/drawing"),l=t("./axes"),s=/((x|y)([2-9]|[1-9][0-9]+)?)axis$/;e.exports=function(t,e,r,c){function u(e,r){function n(e,r){for(a=0;ar.duration?(h(),k=window.cancelAnimationFrame(g)):k=window.requestAnimationFrame(g)}var m=t._fullLayout,v=[],y=function(t){var e,r,n,a,o,i={};for(e in t)if(r=e.split("."),n=r[0].match(s)){var l=n[1],c=l+"axis";if(a=m[c],o={},Array.isArray(t[e])?o.to=t[e].slice(0):Array.isArray(t[e].range)&&(o.to=t[e].range.slice(0)),!o.to)continue;o.axisName=c,o.length=a._length,v.push(l),i[l]=o}return i}(e),x=Object.keys(y),b=function(t,e,r){var n,a,o,i=t._plots,l=[];for(n in i){var s=i[n];if(-1===l.indexOf(s)){var c=s.xaxis._id,u=s.yaxis._id,f=s.xaxis.range,d=s.yaxis.range;s.xaxis._r=s.xaxis.range.slice(),s.yaxis._r=s.yaxis.range.slice(),a=r[c]?r[c].to:f,o=r[u]?r[u].to:d,f[0]===a[0]&&f[1]===a[1]&&d[0]===o[0]&&d[1]===o[1]||-1===e.indexOf(c)&&-1===e.indexOf(u)||l.push(s)}}return l}(m,x,y);if(!b.length)return!1;var _;c&&(_=c());var w,M,k,A=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(k),k=null,p()}),w=Date.now(),k=window.requestAnimationFrame(g),Promise.resolve()}},{"../../components/drawing":65,"../../plotly":187,"../../registry":241,"./axes":192,d3:15}],214:[function(t,e,r){"use strict";function n(t,e){if("-"===t.type){var r=t._id,n=r.charAt(0);-1!==r.indexOf("scene")&&(r=n);var c=a(e,r,n);if(c){if("histogram"===c.type&&n==={v:"y",h:"x"}[c.orientation||"v"])return void(t.type="linear");var u=n+"calendar",f=c[u];if(i(c,n)){for(var d,h=o(c),p=[],g=0;g0?".":"")+a;c.isPlainObject(o)?l(o,e,i,n+1):e(i,a,o)}})}var s=t("../plotly"),c=t("../lib");r.manageCommandObserver=function(t,e,a,o){var i={},l=!0;e&&e._commandObserver&&(i=e._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var s=r.hasSimpleAPICommandBindings(t,a,i.lookupTable);if(e&&e._commandObserver){if(s)return i;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,i}if(s){n(t,s,i.cache),i.check=function(){if(l){var e=n(t,s,i.cache);return e.changed&&o&&void 0!==i.lookupTable[e.value]&&(i.disable(),Promise.resolve(o({value:e.value,type:s.type,prop:s.prop,traces:s.traces,index:i.lookupTable[e.value]})).then(i.enable,i.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;fe*Math.PI/180},w.render=function(){function t(t){var e=r.projection(t.lonlat);return e?"translate("+e[0]+","+e[1]+")":null}function e(t){return r.isLonLatOverEdges(t.lonlat)?"0":"1.0"}var r=this,n=r.framework,a=n.select("g.choroplethlayer"),o=n.select("g.scattergeolayer"),i=r.path;n.selectAll("path.basepath").attr("d",i),n.selectAll("path.graticulepath").attr("d",i),a.selectAll("path.choroplethlocation").attr("d",i),a.selectAll("path.basepath").attr("d",i),o.selectAll("path.js-line").attr("d",i),null!==r.clipAngle?(o.selectAll("path.point").style("opacity",e).attr("transform",t),o.selectAll("text").style("opacity",e).attr("transform",t)):(o.selectAll("path.point").attr("transform",t),o.selectAll("text").attr("transform",t))}},{"../../components/color":41,"../../components/drawing":65,"../../components/fx":82,"../../lib/topojson_utils":175,"../cartesian/axes":192,"../plots":233,"./constants":218,"./projections":226,"./set_scale":227,"./zoom":228,"./zoom_reset":229,d3:15,"topojson-client":23}],220:[function(t,e,r){"use strict";var n=t("./geo"),a=t("../../plots/plots");r.name="geo",r.attr="geo",r.idRoot="geo",r.idRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attrRegex=/^geo([2-9]|[1-9][0-9]+)?$/,r.attributes=t("./layout/attributes"),r.layoutAttributes=t("./layout/layout_attributes"),r.supplyLayoutDefaults=t("./layout/defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=a.getSubplotIds(e,"geo");void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var i=0;in^h>n&&r<(d-c)*(n-u)/(h-u)+c&&(a=!a)}return a}function i(t){return t?t/Math.sin(t):1}function l(t){return t>1?O:t<-1?-O:Math.asin(t)}function s(t){return t>1?0:t<-1?z:Math.acos(t)}function c(t,e){var r=(2+O)*Math.sin(e);e/=2;for(var n=0,a=1/0;n<10&&Math.abs(a)>C;n++){var o=Math.cos(e);e-=a=(e+Math.sin(e)*(o+2)-r)/(2*o*(1+o))}return[2/Math.sqrt(z*(4+z))*t*(1+Math.cos(e)),2*Math.sqrt(z/(4+z))*Math.sin(e)]}function u(t,e){function r(r,n){var a=R(r/e,n);return a[0]*=t,a}return arguments.length<2&&(e=t),1===e?R:e===1/0?d:(r.invert=function(r,n){var a=R.invert(r/t,n);return a[0]*=e,a},r)}function f(){var t=2,e=N(u),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}function d(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function h(t,e){return[3*t/(2*z)*Math.sqrt(z*z/3-e*e),e]}function p(t,e){return[t,1.25*Math.log(Math.tan(z/4+.4*e))]}function g(t){return function(e){var r,n=t*Math.sin(e),a=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>C&&--a>0);return e/2}}function m(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function v(t,e){var r,n=Math.min(18,36*Math.abs(e)/z),a=Math.floor(n),o=n-a,i=(r=j[a])[0],l=r[1],s=(r=j[++a])[0],c=r[1],u=(r=j[Math.min(19,++a)])[0],f=r[1];return[t*(s+o*(u-i)/2+o*o*(u-2*s+i)/2),(e>0?O:-O)*(c+o*(f-l)/2+o*o*(f-2*c+l)/2)]}function y(t,e){return[t*Math.cos(e),e]}function x(t,e){var r=Math.cos(e),n=i(s(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function b(t,e){var r=x(t,e);return[(r[0]+t/O)/2,(r[1]+e)/2]}t.geo.project=function(t,e){var n=e.stream;if(!n)throw new Error("not yet supported");return(t&&_.hasOwnProperty(t.type)?_[t.type]:r)(t,n)};var _={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},w=[],M=[],k={point:function(t,e){w.push([t,e])},result:function(){var t=w.length?w.length<2?{type:"Point",coordinates:w[0]}:{type:"MultiPoint",coordinates:w}:null;return w=[],t}},A={lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){w.length&&(M.push(w),w=[])},result:function(){var t=M.length?M.length<2?{type:"LineString",coordinates:M[0]}:{type:"MultiLineString",coordinates:M}:null;return M=[],t}},T={polygonStart:n,lineStart:n,point:function(t,e){w.push([t,e])},lineEnd:function(){var t=w.length;if(t){do{w.push(w[0].slice())}while(++t<4);M.push(w),w=[]}},polygonEnd:n,result:function(){if(!M.length)return null;var t=[],e=[];return M.forEach(function(r){a(r)?t.push([r]):e.push(r)}),e.forEach(function(e){var r=e[0];t.some(function(t){if(o(t[0],r))return t.push(e),!0})||t.push([e])}),M=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},L={Point:k,MultiPoint:k,LineString:A,MultiLineString:A,Polygon:T,MultiPolygon:T,Sphere:T},C=1e-6,S=C*C,z=Math.PI,O=z/2,P=(Math.sqrt(z),z/180),D=180/z,E=t.geo.projection,N=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,a=s[+(r<0)],o=0,i=a.length-1;oa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],n*r>n*a[o][0][1]?a[o][0][1]:r)[0],l}function n(){l=s.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],a=e(t[2][0],t[2][1])[0],o=e(t[1][0],t[0][1])[1],i=e(t[1][0],t[1][1])[1];return o>i&&(r=o,o=i,i=r),[[n,o],[a,i]]})})}function a(){for(var e=1e-6,r=[],n=0,a=s[0].length;n=0;--n){var i=s[1][n],l=180*i[0][0]/z,c=180*i[0][1]/z,u=180*i[1][1]/z,f=180*i[2][0]/z,d=180*i[2][1]/z;r.push(o([[f-e,d-e],[f-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}function o(t,e){for(var r,n,a,o=-1,i=t.length,l=t[0],s=[];++oC&&--a>0);return[t/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return E(m)}).raw=m;var j=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];j.forEach(function(t){t[1]*=1.0144}),v.invert=function(t,e){var r=e/O,n=90*r,a=Math.min(18,Math.abs(n/5)),o=Math.max(0,Math.floor(a));do{var i=j[o][1],l=j[o+1][1],s=j[Math.min(19,o+2)][1],c=s-i,u=s-2*l+i,f=2*(Math.abs(r)-l)/c,d=u/c,h=f*(1-d*f*(1-2*d*f));if(h>=0||1===o){n=(e>=0?5:-5)*(h+a);var p,g=50;do{a=Math.min(18,Math.abs(n)/5),o=Math.floor(a),h=a-o,i=j[o][1],l=j[o+1][1],s=j[Math.min(19,o+2)][1],n-=(p=(e>=0?O:-O)*(l+h*(s-i)/2+h*h*(s-2*l+i)/2)-e)*D}while(Math.abs(p)>S&&--g>0);break}}while(--o>=0);var m=j[o][0],v=j[o+1][0],y=j[Math.min(19,o+2)][0];return[t/(v+h*(y-m)/2+h*h*(y-2*v+m)/2),n*P]},(t.geo.robinson=function(){return E(v)}).raw=v,y.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return E(y)}).raw=y,x.invert=function(t,e){if(!(t*t+4*e*e>z*z+C)){var r=t,n=e,a=25;do{var o,i=Math.sin(r),l=Math.sin(r/2),c=Math.cos(r/2),u=Math.sin(n),f=Math.cos(n),d=Math.sin(2*n),h=u*u,p=f*f,g=l*l,m=1-p*c*c,v=m?s(f*c)*Math.sqrt(o=1/m):o=0,y=2*v*f*l-t,x=v*u-e,b=o*(p*g+v*f*c*h),_=o*(.5*i*d-2*v*u*l),w=.25*o*(d*l-v*u*p*i),M=o*(h*c+v*g*f),k=_*w-M*b;if(!k)break;var A=(x*_-y*M)/k,T=(y*w-x*b)/k;r-=A,n-=T}while((Math.abs(A)>C||Math.abs(T)>C)&&--a>0);return[r,n]}},(t.geo.aitoff=function(){return E(x)}).raw=x,b.invert=function(t,e){var r=t,n=e,a=25;do{var o,i=Math.cos(n),l=Math.sin(n),c=Math.sin(2*n),u=l*l,f=i*i,d=Math.sin(r),h=Math.cos(r/2),p=Math.sin(r/2),g=p*p,m=1-f*h*h,v=m?s(i*h)*Math.sqrt(o=1/m):o=0,y=.5*(2*v*i*p+r/O)-t,x=.5*(v*l+n)-e,b=.5*o*(f*g+v*i*h*u)+.5/O,_=o*(d*c/4-v*l*p),w=.125*o*(c*p-v*l*f*d),M=.5*o*(u*h+v*g*i)+.5,k=_*w-M*b,A=(x*_-y*M)/k,T=(y*w-x*b)/k;r-=A,n-=T}while((Math.abs(A)>C||Math.abs(T)>C)&&--a>0);return[r,n]},(t.geo.winkel3=function(){return E(b)}).raw=b}e.exports=n},{}],227:[function(t,e,r){"use strict";function n(t,e){var r=t.projection,n=t.lonaxis,i=t.lataxis,s=t.domain,c=t.framewidth||0,u=e.w*(s.x[1]-s.x[0]),f=e.h*(s.y[1]-s.y[0]),d=n.range[0]+l,h=n.range[1]-l,p=i.range[0]+l,g=i.range[1]-l,m=n._fullRange[0]+l,v=n._fullRange[1]-l,y=i._fullRange[0]+l,x=i._fullRange[1]-l;r._translate0=[e.l+u/2,e.t+f/2];var b=h-d,_=g-p,w=[d+b/2,p+_/2],M=r._rotate;return r._center=[w[0]+M[0],w[1]+M[1]],function(e){function n(t){return Math.min(_*u/(t[1][0]-t[0][0]),_*f/(t[1][1]-t[0][1]))}var i,l,s,b,_=e.scale(),w=r._translate0,M=a(d,p,h,g),k=a(m,y,v,x);s=o(e,M),i=n(s),b=o(e,k),r._fullScale=n(b),e.scale(i),s=o(e,M),l=[w[0]-s[0][0]+c,w[1]-s[0][1]+c],r._translate=l,e.translate(l),s=o(e,M),t._isAlbersUsa||e.clipExtent(s),i=r.scale*i,r._scale=i,t._width=Math.round(s[1][0])+c,t._height=Math.round(s[1][1])+c,t._marginX=(u-Math.round(s[1][0]))/2,t._marginY=(f-Math.round(s[1][1]))/2}}function a(t,e,r,n){var a=(r-t)/4;return{type:"Polygon",coordinates:[[[t,e],[t,n],[t+a,n],[t+2*a,n],[t+3*a,n],[r,n],[r,e],[r-a,e],[r-2*a,e],[r-3*a,e],[t,e]]]}}function o(t,e){return i.geo.path().projection(t).bounds(e)}var i=t("d3"),l=t("./constants").clipPad;e.exports=n},{"./constants":218,d3:15}],228:[function(t,e,r){"use strict";function n(t,e){return(e._isScoped?o:e._clipAngle?l:i)(t,e.projection)}function a(t,e){var r=e._fullScale;return _.behavior.zoom().translate(t.translate()).scale(t.scale()).scaleExtent([.5*r,100*r])}function o(t,e){function r(){_.select(this).style(k)}function n(){var e=Math.max(s,_.event.scale);l.scale(e),i.scale(e).translate(_.event.translate),t.render()}function o(){_.select(this).style(A)}var i=t.projection,l=a(i,e),s=i.scale();return l.on("zoomstart",r).on("zoom",n).on("zoomend",o),l}function i(t,e){function r(t){return m.invert(t)}function n(t){var e=m(r(t));return Math.abs(e[0]-t[0])>x||Math.abs(e[1]-t[1])>x}function o(){_.select(this).style(k),s=_.mouse(this),c=m.rotate(),u=m.translate(),f=c,d=r(s)}function i(){if(h=_.mouse(this),n(s))return v.scale(m.scale()),void v.translate(m.translate());m.scale(Math.max(y,_.event.scale));var e=m.scale()*Math.PI,a=u[0]-e/2,o=e/2,i=Math.min(Math.max(_.event.translate[1],a),o);m.translate([u[0],i]),v.translate([u[0],i]),d?r(h)&&(g=r(h),p=[f[0]+(g[0]-d[0]),c[1],c[2]],m.rotate(p),f=p):(s=h,d=r(s)),t.render()}function l(){_.select(this).style(A)}var s,c,u,f,d,h,p,g,m=t.projection,v=a(m,e),y=m.scale(),x=2;return v.on("zoomstart",o).on("zoom",i).on("zoomend",l),v}function l(t,e){function r(t){v++||t({type:"zoomstart"})}function n(t){t({type:"zoom"})}function o(t){--v||t({type:"zoomend"})}var i,l=t.projection,h={r:l.rotate(),k:l.scale()},p=a(l,e),g=b(p,"zoomstart","zoom","zoomend"),v=0,y=p.on;return p.on("zoomstart",function(){_.select(this).style(k);var t=_.mouse(this),e=l.rotate(),a=e,o=l.translate(),v=c(e);i=s(l,t),y.call(p,"zoom",function(){var r=_.mouse(this);if(l.scale(h.k=_.event.scale),i){if(s(l,r)){l.rotate(e).translate(o);var c=s(l,r),p=f(i,c),y=m(u(v,p)),x=h.r=d(y,i,a);isFinite(x[0])&&isFinite(x[1])&&isFinite(x[2])||(x=a),l.rotate(x),a=x}}else t=r,i=s(l,t);n(g.of(this,arguments))}),r(g.of(this,arguments))}).on("zoomend",function(){_.select(this).style(A),y.call(p,"zoom",null),o(g.of(this,arguments))}).on("zoom.redraw",function(){t.render()}),_.rebind(p,g,"on")}function s(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&v(r)}function c(t){var e=.5*t[0]*w,r=.5*t[1]*w,n=.5*t[2]*w,a=Math.sin(e),o=Math.cos(e),i=Math.sin(r),l=Math.cos(r),s=Math.sin(n),c=Math.cos(n);return[o*l*c+a*i*s,a*l*c-o*i*s,o*i*c+a*l*s,o*l*s-a*i*c]}function u(t,e){var r=t[0],n=t[1],a=t[2],o=t[3],i=e[0],l=e[1],s=e[2],c=e[3];return[r*i-n*l-a*s-o*c,r*l+n*i+a*c-o*s,r*s-n*c+a*i+o*l,r*c+n*s-a*l+o*i]}function f(t,e){if(t&&e){var r=x(t,e),n=Math.sqrt(y(r,r)),a=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),o=Math.sin(a)/n;return n&&[Math.cos(a),r[2]*o,-r[1]*o,r[0]*o]}}function d(t,e,r){var n=g(e,2,t[0]);n=g(n,1,t[1]),n=g(n,0,t[2]-r[2]);var a,o,i=e[0],l=e[1],s=e[2],c=n[0],u=n[1],f=n[2],d=Math.atan2(l,i)*M,p=Math.sqrt(i*i+l*l);Math.abs(u)>p?(o=(u>0?90:-90)-d,a=0):(o=Math.asin(u/p)*M-d,a=Math.sqrt(p*p-u*u));var m=180-o-2*d,v=(Math.atan2(f,c)-Math.atan2(s,a))*M,y=(Math.atan2(f,c)-Math.atan2(s,-a))*M;return h(r[0],r[1],o,v)<=h(r[0],r[1],m,y)?[o,v,r[2]]:[m,y,r[2]]}function h(t,e,r,n){var a=p(r-t),o=p(n-e);return Math.sqrt(a*a+o*o)}function p(t){return(t%360+540)%360-180}function g(t,e,r){var n=r*w,a=t.slice(),o=0===e?1:0,i=2===e?1:2,l=Math.cos(n),s=Math.sin(n);return a[o]=t[o]*l-t[i]*s,a[i]=t[i]*l+t[o]*s,a}function m(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*M,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*M]}function v(t){var e=t[0]*w,r=t[1]*w,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function y(t,e){for(var r=0,n=0,a=t.length;n=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),r.attr(o);var i=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),c=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&n(t,i),l.text(i.text()&&c.text()?" - ":"")}},m.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",r=s.select(t).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return n.append("input").attr({type:"text",name:"data"}).node().value=m.graphJson(t,!1,"keepdata"),n.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1},m.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},o=t.layout||{},i=t._fullData||[],l=t._fullData=[],s=t.data||[];if(t._transitionData||m.createTransitionData(t),r._initialAutoSizeIsDone){var c=r.width,f=r.height;m.supplyLayoutGlobalDefaults(o,n),o.width||(n.width=c),o.height||(n.height=f)}else{m.supplyLayoutGlobalDefaults(o,n);var d=!o.width||!o.height,h=n.autosize,p=t._context&&t._context.autosizable;d&&(h||p)?m.plotAutoSize(t,o,n):d&&m.sanitizeMargins(t),!h&&d&&(o.width=n.width,o.height=n.height)}n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._globalTransforms=(t._context||{}).globalTransforms,m.supplyDataDefaults(s,l,o,n),n._has=m._hasPlotType.bind(n);var g=n._modules;for(e=0;e0){var u=i(t._boundingBoxMargins),f=u.left+u.right,d=u.bottom+u.top,p=1-2*l,g=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(p*(g.width-f)),a=Math.round(p*(g.height-d))}else{var v=s?window.getComputedStyle(t):{};n=parseFloat(v.width)||r.width,a=parseFloat(v.height)||r.height}var y=m.layoutAttributes.width.min,x=m.layoutAttributes.height.min;n1,_=!e.height&&Math.abs(r.height-a)>1;(_||b)&&(b&&(r.width=n),_&&(r.height=a)),t._initialAutoSize||(t._initialAutoSize={width:n,height:a}),m.sanitizeMargins(r)},m.supplyLayoutModuleDefaults=function(t,e,r,n){var a,o;u.Axes.supplyLayoutDefaults(t,e,r);var i=e._basePlotModules;for(a=0;a.45*n.width&&(r.l=r.r=0),r.b+r.t>.4*n.height&&(r.b=r.t=0),n._pushmargin[e]={l:{val:r.x,size:r.l+a},r:{val:r.x,size:r.r+a},b:{val:r.y,size:r.b+a},t:{val:r.y,size:r.t+a}}}else delete n._pushmargin[e];n._replotting||m.doAutoMargin(t)}},m.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),e._pushmargin||(e._pushmargin={});var r=e._size,n=JSON.stringify(r),a=Math.max(e.margin.l||0,0),o=Math.max(e.margin.r||0,0),i=Math.max(e.margin.t||0,0),l=Math.max(e.margin.b||0,0),s=e._pushmargin;if(!1!==e.margin.autoexpand){s.base={l:{val:0,size:a},r:{val:1,size:o},t:{val:1,size:i},b:{val:0,size:l}};for(var f=Object.keys(s),d=0;dm){var k=(v*w+(M-e.width)*m)/(w-m),A=(M*(1-m)+(v-e.width)*(1-w))/(w-m);k>=0&&A>=0&&k+A>a+o&&(a=k,o=A)}}if(c(x)&&s[_].t){var T=s[_].t.val,L=s[_].t.size;if(T>y){var C=(x*T+(L-e.height)*y)/(T-y),S=(L*(1-y)+(x-e.height)*(1-T))/(T-y);C>=0&&S>=0&&C+S>l+i&&(l=C,i=S)}}}}if(r.l=Math.round(a),r.r=Math.round(o),r.t=Math.round(i),r.b=Math.round(l),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&"{}"!==n&&n!==JSON.stringify(e._size))return u.plot(t)},m.graphJson=function(t,e,r,n,a){function o(t){if("function"==typeof t)return null;if(h.isPlainObject(t)){var e,n,a={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!h.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;a[e]=o(t[e])}return a}return Array.isArray(t)?t.map(o):h.isJSDate(t)?h.ms2DateTimeLocal(+t):t}(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&m.supplyDefaults(t);var i=a?t._fullData:t.data,l=a?t._fullLayout:t.layout,s=(t._transitionData||{})._frames,c={data:(i||[]).map(function(t){var r=o(t);return e&&delete r.fit,r})};return e||(c.layout=o(l)),t.framework&&t.framework.isPolar&&(c=t.framework.getConfig()),s&&(c.frames=o(s)),"object"===n?c:JSON.stringify(c)},m.modifyFrames=function(t,e){var r,n,a,o=t._transitionData._frames,i=t._transitionData._frameHash;for(r=0;r0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){b=!0}),a.redraw&&t._transitionData._interruptCallbacks.push(function(){return u.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var i,l,s=0,c=0,d=t._fullLayout._basePlotModules,p=!1;if(r)for(l=0;l=0,C=L?f.angularAxis.domain:n.extent(M),S=Math.abs(M[1]-M[0]);A&&!k&&(S=0);var z=C.slice();T&&k&&(z[1]+=S);var O=f.angularAxis.ticksCount||4;O>8&&(O=O/(O/8)+O%8),f.angularAxis.ticksStep&&(O=(z[1]-z[0])/O);var P=f.angularAxis.ticksStep||(z[1]-z[0])/(O*(f.minorTicks+1));w&&(P=Math.max(Math.round(P),1)),z[2]||(z[2]=P);var D=n.range.apply(this,z);if(D=D.map(function(t,e){return parseFloat(t.toPrecision(12))}),l=n.scale.linear().domain(z.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=l.domain(),u.layout.angularAxis.endPadding=T?S:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var E=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),N=this.appendChild(this.ownerDocument.importNode(E.documentElement,!0));e=n.select(N)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,I=e.select(".chart-group"),j={fill:"none",stroke:f.tickColor},F={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var B=h.map(function(t,e){var r=i.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend=void 0===t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});i.Legend().config({data:h.map(function(t,e){return t.name||"Element"+e}),legendConfig:o({},i.Legend.defaultConfig().legendConfig,{container:R,elements:B,reverseOrder:f.legend.reverseOrder})})();var q=R.node().getBBox();x=Math.min(f.width-q.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],a.range([0,x]),u.layout.radialAxis.domain=a.domain(),R.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),I.attr("transform","translate("+_+")").style({cursor:"crosshair"});var H=[(f.width-(f.margin.left+f.margin.right+2*x+(q?q.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(H[0]=Math.max(0,H[0]),H[1]=Math.max(0,H[1]),e.select(".outer-group").attr("transform","translate("+H+")"),f.title){var V=e.select("g.title-group text").style(F).text(f.title),U=V.node().getBBox();V.attr({x:_[0]-U.width/2,y:_[1]-x-20})}var G=e.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var Y=G.selectAll("circle.grid-circle").data(a.ticks(5));Y.enter().append("circle").attr({class:"grid-circle"}).style(j),Y.attr("r",a),Y.exit().remove()}G.select("circle.outside-circle").attr({r:x}).style(j);var X=e.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});if(f.radialAxis.visible){var Z=n.svg.axis().scale(a).ticks(5).tickSize(5);G.call(Z).attr({transform:"rotate("+f.radialAxis.orientation+")"}),G.selectAll(".domain").style(j),G.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(F).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,F["font-size"]]+")":"translate("+[0,F["font-size"]]+")"}}),G.selectAll("g>line").style({stroke:"black"})} +var W=e.select(".angular.axis-group").selectAll("g.angular-tick").data(D),$=W.enter().append("g").classed("angular-tick",!0);W.attr({transform:function(t,e){return"rotate("+s(t,e)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),W.exit().remove(),$.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(j),$.selectAll(".minor").style({stroke:f.minorTickColor}),W.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),$.append("text").classed("axis-text",!0).style(F);var Q=W.select("text.axis-text").attr({x:x+f.labelOffset,dy:".35em",transform:function(t,e){var r=s(t,e),n=x+f.labelOffset,a=f.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-r+" "+n+" 0)":"radial"==a?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":w?w[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(F);f.angularAxis.rewriteTicks&&Q.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var J=n.max(I.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));R.attr({transform:"translate("+[x+J,f.margin.top]+")"});var K=e.select("g.geometry-group").selectAll("g").size()>0,tt=e.select("g.geometry-group").selectAll("g.geometry").data(h);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),h[0]||K){var et=[];h.forEach(function(t,e){var r={};r.radialScale=a,r.angularScale=l,r.container=tt.filter(function(t,r){return r==e}),r.geometry=t.geometry,r.orientation=f.orientation,r.direction=f.direction,r.index=e,et.push({data:t,geometryConfig:r})});var rt=n.nest().key(function(t,e){return void 0!==t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return o(i[r].defaultConfig(),t)});i[r]().config(n)()})}var at,ot,it=e.select(".guides-group"),lt=e.select(".tooltips-group"),st=i.tooltipPanel().config({container:lt,fontSize:8})(),ct=i.tooltipPanel().config({container:lt,fontSize:8})(),ut=i.tooltipPanel().config({container:lt,hasTick:!0})();if(!k){var ft=it.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});I.on("mousemove.angular-guide",function(t,e){var r=i.util.getMousePos(X).angle;ft.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-f.orientation)%360;at=l.invert(n);var a=i.util.convertToCartesian(x+12,r+180);st.text(i.util.round(at)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){it.select("line").style({opacity:0})})}var dt=it.select("circle").style({stroke:"grey",fill:"none"});I.on("mousemove.radial-guide",function(t,e){var r=i.util.getMousePos(X).radius;dt.attr({r:r}).style({opacity:.5}),ot=a.invert(i.util.getMousePos(X).radius);var n=i.util.convertToCartesian(r,f.radialAxis.orientation);ct.text(i.util.round(ot)).move([n[0]+_[0],n[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){dt.style({opacity:0}),ut.hide(),st.hide(),ct.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,r){var a=n.select(this),o=a.style("fill"),l="black",s=a.style("opacity")||1;if(a.attr({"data-opacity":s}),"none"!=o){a.attr({"data-fill":o}),l=n.hsl(o).darker().toString(),a.style({fill:l,opacity:1});var c={t:i.util.round(t[0]),r:i.util.round(t[1])};k&&(c.t=w[t[0]]);var u="t: "+c.t+", r: "+c.r,f=this.getBoundingClientRect(),d=e.node().getBoundingClientRect(),h=[f.left+f.width/2-H[0]-d.left,f.top+f.height/2-H[1]-d.top];ut.config({color:l}).text(u),ut.move(h)}else o=a.style("stroke"),a.attr({"data-stroke":o}),l=n.hsl(o).darker().toString(),a.style({stroke:l,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()}).on("mouseout.tooltip",function(t,e){ut.hide();var r=n.select(this),a=r.attr("data-fill");a?r.style({fill:a,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})}),d}var e,r,a,l,s={data:[],layout:{}},c={},u={},f=n.dispatch("hover"),d={};return d.render=function(e){return t(e),this},d.config=function(t){if(!arguments.length)return s;var e=i.util.cloneJson(t);return e.data.forEach(function(t,e){s.data[e]||(s.data[e]={}),o(s.data[e],i.Axis.defaultConfig().data[0]),o(s.data[e],t)}),o(s.layout,i.Axis.defaultConfig().layout),o(s.layout,e.layout),this},d.getLiveConfig=function(){return u},d.getinputConfig=function(){return c},d.radialScale=function(t){return a},d.angularScale=function(t){return l},d.svg=function(){return e},n.rebind(d,f,"on"),d},i.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},i.util={},i.DATAEXTENT="dataExtent",i.AREA="AreaChart",i.LINE="LinePlot",i.DOT="DotPlot",i.BAR="BarChart",i.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},i.util._extend=function(t,e){for(var r in t)e[r]=t[r]},i.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},i.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},i.util.dataFromEquation=function(t,e,r){var a=e||6,o=[],i=[];n.range(0,360+a,a).forEach(function(e,r){var n=e*Math.PI/180,a=t(n);o.push(e),i.push(a)});var l={t:o,r:i};return r&&(l.name=r),l},i.util.ensureArray=function(t,e){if(void 0===t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},i.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=i.util.ensureArray(t[e],r)}),t},i.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},i.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},i.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},i.util.arrayLast=function(t){return t[t.length-1]},i.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},i.util.flattenArray=function(t){for(var e=[];!i.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},i.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},i.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},i.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},i.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],a=e[1],o={};return o.x=r,o.y=a,o.pos=e,o.angle=180*(Math.atan2(a,r)+Math.PI)/Math.PI,o.radius=Math.sqrt(r*r+a*a),o},i.util.duplicatesCount=function(t){for(var e,r={},n={},a=0,o=t.length;a0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:d(i),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return m.fill(r,a,o)},"fill-opacity":0,stroke:function(t,e){return m.stroke(r,a,o)},"stroke-width":function(t,e){return m["stroke-width"](r,a,o)},"stroke-dasharray":function(t,e){return m["stroke-dasharray"](r,a,o)},opacity:function(t,e){return m.opacity(r,a,o)},display:function(t,e){return m.display(r,a,o)}})}};var h=t.angularScale.range(),p=Math.abs(h[1]-h[0])/s[0].length*Math.PI/180,g=n.svg.arc().startAngle(function(t){return-p/2}).endAngle(function(t){return p/2}).innerRadius(function(e){return t.radialScale(u+(e[2]||0))}).outerRadius(function(e){return t.radialScale(u+(e[2]||0))+t.radialScale(e[1])});f.arc=function(e,r,a){n.select(this).attr({class:"mark arc",d:g,transform:function(e,r){return"rotate("+(t.orientation+c(e[0])+90)+")"}})};var m={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,r,n){return a[e[n].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},v=n.select(this).selectAll("g.layer").data(s);v.enter().append("g").attr({class:"layer"});var y=v.selectAll("path.mark").data(function(t,e){return t});y.enter().append("path").attr({class:"mark"}),y.style(m).each(f[t.geometryType]),y.exit().remove(),v.exit().remove()})}var e=[i.PolyChart.defaultConfig()],r=n.dispatch("hover"),a={solid:"none",dash:[5,2],dot:[2,5]};return t.config=function(t){return arguments.length?(t.forEach(function(t,r){e[r]||(e[r]={}),o(e[r],i.PolyChart.defaultConfig()),o(e[r],t)}),this):e},t.getColorScale=function(){},n.rebind(t,r,"on"),t},i.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},i.BarChart=function(){return i.PolyChart()},i.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},i.AreaChart=function(){return i.PolyChart()},i.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},i.DotPlot=function(){return i.PolyChart()},i.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},i.LinePlot=function(){return i.PolyChart()},i.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},i.Legend=function(){function t(){var r=e.legendConfig,a=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var a=o({},r.elements[e]);return a.name=t,a.color=[].concat(r.elements[e].color)[n],a})}),i=n.merge(a);i=i.filter(function(t,e){return r.elements[e]&&(r.elements[e].visibleInLegend||void 0===r.elements[e].visibleInLegend)}),r.reverseOrder&&(i=i.reverse());var l=r.container;("string"==typeof l||l.nodeName)&&(l=n.select(l));var s=i.map(function(t,e){return t.color}),c=r.fontSize,u=null==r.isContinuous?"number"==typeof i[0]:r.isContinuous,f=u?r.height:c*i.length,d=l.classed("legend-group",!0),h=d.selectAll("svg").data([0]),p=h.enter().append("svg").attr({width:300,height:f+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var g=n.range(i.length),m=n.scale[u?"linear":"ordinal"]().domain(g).range(s),v=n.scale[u?"linear":"ordinal"]().domain(g)[u?"range":"rangePoints"]([0,f]),y=function(t,e){var r=3*e;return"line"===t?"M"+[[-e/2,-e/12],[e/2,-e/12],[e/2,e/12],[-e/2,e/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(t)?n.svg.symbol().type(t).size(r)():n.svg.symbol().type("square").size(r)()};if(u){var x=h.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(s);x.enter().append("stop"),x.attr({offset:function(t,e){return e/(s.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),h.append("rect").classed("legend-mark",!0).attr({height:r.height,width:r.colorBandWidth,fill:"url(#grad1)"})}else{var b=h.select(".legend-marks").selectAll("path.legend-mark").data(i);b.enter().append("path").classed("legend-mark",!0),b.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var r=t.symbol;return y(r,c)},fill:function(t,e){return m(e)}}),b.exit().remove()}var _=n.svg.axis().scale(v).orient("right"),w=h.select("g.legend-axis").attr({transform:"translate("+[u?r.colorBandWidth:c,c/2]+")"}).call(_);return w.selectAll(".domain").style({fill:"none",stroke:"none"}),w.selectAll("line").style({fill:"none",stroke:u?r.textColor:"none"}),w.selectAll("text").style({fill:r.textColor,"font-size":r.fontSize}).text(function(t,e){return i[e].name}),t}var e=i.Legend.defaultConfig(),r=n.dispatch("hover");return t.config=function(t){return arguments.length?(o(e,t),this):e},n.rebind(t,r,"on"),t},i.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},i.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},l="tooltip-"+i.tooltipPanel.uid++,s=function(){t=a.container.selectAll("g."+l).data([0]);var n=t.enter().append("g").classed(l,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:a.padding+10,dy:.3*+a.fontSize}),s};return s.text=function(o){var i=n.hsl(a.color).l,l=i>=.5?"#aaa":"white",c=i>=.5?"black":"white",u=o||"";e.style({fill:c,"font-size":a.fontSize+"px"}).text(u);var f=a.padding,d=e.node().getBBox(),h={fill:a.color,stroke:l,"stroke-width":"2px"},p=d.width+2*f+10,g=d.height+2*f;return r.attr({d:"M"+[[10,-g/2],[10,-g/4],[a.hasTick?0:10,0],[10,g/4],[10,g/2],[p,g/2],[p,-g/2]].join("L")+"Z"}).style(h),t.attr({transform:"translate("+[10,-g/2+2*f]+")"}),t.style({display:"block"}),s},s.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),s},s.hide=function(){if(t)return t.style({display:"none"}),s},s.show=function(){if(t)return t.style({display:"block"}),s},s.config=function(t){return o(a,t),s},s},i.tooltipPanel.uid=1,i.adapter={},i.adapter.plotly=function(){var t={};return t.convert=function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=o({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){i.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var a=i.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var l=o({},t.layout);if([[l,["plot_bgcolor"],["backgroundColor"]],[l,["showlegend"],["showLegend"]],[l,["radialaxis"],["radialAxis"]],[l,["angularaxis"],["angularAxis"]],[l.angularaxis,["showline"],["gridLinesVisible"]],[l.angularaxis,["showticklabels"],["labelsVisible"]],[l.angularaxis,["nticks"],["ticksCount"]],[l.angularaxis,["tickorientation"],["tickOrientation"]],[l.angularaxis,["ticksuffix"],["ticksSuffix"]],[l.angularaxis,["range"],["domain"]],[l.angularaxis,["endpadding"],["endPadding"]],[l.radialaxis,["showline"],["gridLinesVisible"]],[l.radialaxis,["tickorientation"],["tickOrientation"]],[l.radialaxis,["ticksuffix"],["ticksSuffix"]],[l.radialaxis,["range"],["domain"]],[l.angularAxis,["showline"],["gridLinesVisible"]],[l.angularAxis,["showticklabels"],["labelsVisible"]],[l.angularAxis,["nticks"],["ticksCount"]],[l.angularAxis,["tickorientation"],["tickOrientation"]],[l.angularAxis,["ticksuffix"],["ticksSuffix"]],[l.angularAxis,["range"],["domain"]],[l.angularAxis,["endpadding"],["endPadding"]],[l.radialAxis,["showline"],["gridLinesVisible"]],[l.radialAxis,["tickorientation"],["tickOrientation"]],[l.radialAxis,["ticksuffix"],["ticksSuffix"]],[l.radialAxis,["range"],["domain"]],[l.font,["outlinecolor"],["outlineColor"]],[l.legend,["traceorder"],["reverseOrder"]],[l,["labeloffset"],["labelOffset"]],[l,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){i.util.translator.apply(null,t.concat(e))}),e?(void 0!==l.tickLength&&(l.angularaxis.ticklen=l.tickLength,delete l.tickLength),l.tickColor&&(l.angularaxis.tickcolor=l.tickColor,delete l.tickColor)):(l.angularAxis&&void 0!==l.angularAxis.ticklen&&(l.tickLength=l.angularAxis.ticklen),l.angularAxis&&void 0!==l.angularAxis.tickcolor&&(l.tickColor=l.angularAxis.tickcolor)),l.legend&&"boolean"!=typeof l.legend.reverseOrder&&(l.legend.reverseOrder="normal"!=l.legend.reverseOrder),l.legend&&"boolean"==typeof l.legend.traceorder&&(l.legend.traceorder=l.legend.traceorder?"reversed":"normal",delete l.legend.reverseOrder),l.margin&&void 0!==l.margin.t){var s=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};n.entries(l.margin).forEach(function(t,e){u[c[s.indexOf(t.key)]]=t.value}),l.margin=u}e&&(delete l.needsEndSpacing,delete l.minorTickColor,delete l.minorTicks,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksCount,delete l.angularaxis.ticksStep,delete l.angularaxis.rewriteTicks,delete l.angularaxis.nticks,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksCount,delete l.radialaxis.ticksStep,delete l.radialaxis.rewriteTicks,delete l.radialaxis.nticks),r.layout=l}return r},t}},{"../../lib":156,d3:15}],238:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),o=t("../../components/color"),i=t("./micropolar"),l=t("./undo_manager"),s=a.extendDeepAll,c=e.exports={};c.framework=function(t){function e(e,a){return a&&(f=a),n.select(n.select(f).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),r=r?s(r,e):e,o||(o=i.Axis()),u=i.adapter.plotly().convert(r),o.config(u).render(f),t.data=r.data,t.layout=r.layout,c.fillLayout(t),r}var r,a,o,u,f,d=new l;return e.isPolar=!0,e.svg=function(){return o.svg()},e.getConfig=function(){return r},e.getLiveConfig=function(){return i.adapter.plotly().convert(o.getLiveConfig(),!0)},e.getLiveScales=function(){return{t:o.angularScale(),r:o.radialScale()}},e.setUndoPoint=function(){var t=this,e=i.util.cloneJson(r);!function(e,r){d.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,a),a=i.util.cloneJson(e)},e.undo=function(){d.undo()},e.redo=function(){d.redo()},e},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),i={width:800,height:600,paper_bgcolor:o.background,_container:e,_paperdiv:r,_paper:a};t._fullLayout=s(i,t.layout)}},{"../../components/color":41,"../../lib":156,"./micropolar":237,"./undo_manager":239,d3:15}],239:[function(t,e,r){"use strict";e.exports=function(){function t(t,e){return t?(a=!0,t[e](),a=!1,this):this}var e,r=[],n=-1,a=!1;return{add:function(t){return a?this:(r.splice(n+1,r.length-n),r.push(t),n=r.length-1,this)},setCallback:function(t){e=t},undo:function(){var a=r[n];return a?(t(a,"undo"),n-=1,e&&e(a.undo),this):this},redo:function(){var a=r[n+1];return a?(t(a,"redo"),n+=1,e&&e(a.redo),this):this},clear:function(){r=[],n=-1},hasUndo:function(){return-1!==n},hasRedo:function(){return n-1}var o=t("../lib"),i=t("../plots/plots"),l=o.extendFlat,s=o.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,o=t.data,c=t.layout,u=s([],o),f=s({},c,n(e.tileClass)),d=t._context||{};if(e.width&&(f.width=e.width),e.height&&(f.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){f.annotations=[];var h=Object.keys(f);for(r=0;r")?"":e.html(t).text()});return e.remove(),r}function a(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}var o=t("d3"),i=t("../components/drawing"),l=t("../components/color"),s=t("../constants/xmlns_namespaces"),c=/"/g,u=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");e.exports=function(t,e){var r,f=t._fullLayout,d=f._paper,h=f._toppaper;d.insert("rect",":first-child").call(i.setRect,0,0,f.width,f.height).call(l.fill,f.paper_bgcolor);var p=f._basePlotModules||[];for(r=0;r0&&A>0,F=M<=R&&A<=I,B=M<=I&&A<=R,q="h"===v?R>=M*(I/A):I>=A*(R/M);j&&(F||B||q)?x="inside":(x="outside",b.remove(),b=null)}else x="inside";if(!b&&(b=g(e,y,"outside"===x?C:L),_=k.bBox(b.node()),M=_.width,A=_.height,M<=0||A<=0))return void b.remove();var H;H="outside"===x?o(i,d,h,p,_,v):a(i,d,h,p,_,v),b.attr("transform",H)}}}function a(t,e,r,n,a,o){var l,s,c,u,f,d=a.width,h=a.height,p=(a.left+a.right)/2,g=(a.top+a.bottom)/2,m=Math.abs(e-t),v=Math.abs(n-r);m>2*P&&v>2*P?(f=P,m-=2*f,v-=2*f):f=0;var y,x;return d<=m&&h<=v?(y=!1,x=1):d<=v&&h<=m?(y=!0,x=1):dr?(c=(t+e)/2,u=n-f-s/2):(c=(t+e)/2,u=n+f+s/2),i(p,g,c,u,x,y)}function o(t,e,r,n,a,o){var l,s="h"===o?Math.abs(n-r):Math.abs(e-t);s>2*P&&(l=P,s-=2*l);var c,u,f,d,h="h"===o?Math.min(1,s/a.height):Math.min(1,s/a.width),p=(a.left+a.right)/2,g=(a.top+a.bottom)/2;return c=h*a.width,u=h*a.height,"h"===o?er?(f=(t+e)/2,d=n+l+u/2):(f=(t+e)/2,d=n-l-u/2),i(p,g,f,d,h,!1)}function i(t,e,r,n,a,o){var i,l;return a<1?i="scale("+a+") ":(a=1,i=""),l=o?"rotate("+o+" "+t+" "+e+") ":"","translate("+(r-a*t)+" "+(n-a*e)+")"+i+l}function l(t,e){var r=h(t.text,e);return p(L,r)}function s(t,e){var r=h(t.textposition,e);return g(C,r)}function c(t,e,r){return d(S,t.textfont,e,r)}function u(t,e,r){return d(z,t.insidetextfont,e,r)}function f(t,e,r){return d(O,t.outsidetextfont,e,r)}function d(t,e,r,n){e=e||{};var a=h(e.family,r),o=h(e.size,r),i=h(e.color,r);return{family:p(t.family,a,n.family),size:m(t.size,o,n.size),color:v(t.color,i,n.color)}}function h(t,e){var r;return Array.isArray(t)?ea))return e}return void 0!==r?r:t.dflt}function v(t,e,r){return b(e).isValid()?e:void 0!==r?r:t.dflt}var y=t("d3"),x=t("fast-isnumeric"),b=t("tinycolor2"),_=t("../../lib"),w=t("../../lib/svg_text_utils"),M=t("../../components/color"),k=t("../../components/drawing"),A=t("../../components/errorbars"),T=t("./attributes"),L=T.text,C=T.textposition,S=T.textfont,z=T.insidetextfont,O=T.outsidetextfont,P=3;e.exports=function(t,e,r){var a=e.xaxis,o=e.yaxis,i=t._fullLayout,l=e.plot.select(".barlayer").selectAll("g.trace.bars").data(r);l.enter().append("g").attr("class","trace bars"),l.append("g").attr("class","points").each(function(e){var r=e[0].t,l=e[0].trace,s=r.poffset,c=Array.isArray(s);y.select(this).selectAll("g.point").data(_.identity).enter().append("g").classed("point",!0).each(function(r,u){function f(t){return 0===i.bargap&&0===i.bargroupgap?y.round(Math.round(t)-A,2):t}function d(t,e){return Math.abs(t-e)>=2?f(t):t>e?Math.ceil(t):Math.floor(t)}var h,p,g,m,v=r.p+(c?s[u]:s),b=v+r.w,_=r.b,w=_+r.s;if("h"===l.orientation?(g=o.c2p(v,!0),m=o.c2p(b,!0),h=a.c2p(_,!0),p=a.c2p(w,!0)):(h=a.c2p(v,!0),p=a.c2p(b,!0),g=o.c2p(_,!0),m=o.c2p(w,!0)),!(x(h)&&x(p)&&x(g)&&x(m)&&h!==p&&g!==m))return void y.select(this).remove();var k=(r.mlw+1||l.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,A=y.round(k/2%1,2);if(!t._context.staticPlot){var T=M.opacity(r.mc||l.marker.color),L=T<1||k>.01?f:d;h=L(h,p),p=L(p,h),g=L(g,m),m=L(m,g)}var C=y.select(this);C.append("path").attr("d","M"+h+","+g+"V"+m+"H"+p+"V"+g+"Z"),n(t,C,e,u,h,p,g,m)})}),l.call(A.plot,e)}},{"../../components/color":41,"../../components/drawing":65,"../../components/errorbars":71,"../../lib":156,"../../lib/svg_text_utils":173,"./attributes":251,d3:15,"fast-isnumeric":17,tinycolor2:22}],259:[function(t,e,r){"use strict";function n(t,e,r,n){if(n.length){var l,s,c,u,f,d=t._fullLayout.barmode,h="overlay"===d,p="group"===d;if(h)a(t,e,r,n);else if(p){for(l=[],s=[],c=0;cc+l||!y(s))&&(f=!0,d(u,t))}for(var a=r.traces,o=v(e),i="fraction"===t._fullLayout.barnorm?1:100,l=i/1e9,s=e.l2c(e.c2l(0)),c="stack"===t._fullLayout.barmode?i:s,u=[s,c],f=!1,h=0;h1||0===l.bargap&&0===l.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(t){var e=t[0].trace,r=e.marker,i=r.line,l=o.tryColorscale(r,""),s=o.tryColorscale(r,"line");n.select(this).selectAll("path").each(function(t){var e,o,c=(t.mlw+1||i.width+1)-1,u=n.select(this);e="mc"in t?t.mcc=l(t.mc):Array.isArray(r.color)?a.defaultLine:r.color,u.style("stroke-width",c+"px").call(a.fill,e),c&&(o="mlc"in t?t.mlcc=s(t.mlc):Array.isArray(i.color)?a.defaultLine:i.color,u.call(a.stroke,o))})}),e.call(i.style)}},{"../../components/color":41,"../../components/drawing":65,"../../components/errorbars":71,d3:15}],262:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/has_colorscale"),o=t("../../components/colorscale/defaults");e.exports=function(t,e,r,i,l){r("marker.color",i),a(t,"marker")&&o(t,e,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(t,"marker.line")&&o(t,e,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width")}},{"../../components/color":41,"../../components/colorscale/defaults":50,"../../components/colorscale/has_colorscale":54}],263:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../components/color/attributes"),o=t("../../lib/extend").extendFlat,i=n.marker,l=i.line;e.exports={y:{valType:"data_array"},x:{valType:"data_array"},x0:{valType:"any"},y0:{valType:"any"},xcalendar:n.xcalendar,ycalendar:n.ycalendar,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1},jitter:{valType:"number",min:0,max:1},pointpos:{valType:"number",min:-2,max:2},orientation:{valType:"enumerated",values:["v","h"]},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)"},symbol:o({},i.symbol,{arrayOk:!1}),opacity:o({},i.opacity,{arrayOk:!1,dflt:1}),size:o({},i.size,{arrayOk:!1}),color:o({},i.color,{arrayOk:!1}),line:{color:o({},l.color,{arrayOk:!1,dflt:a.defaultLine}),width:o({},l.width,{arrayOk:!1,dflt:0}),outliercolor:{valType:"color"},outlierwidth:{valType:"number",min:0,dflt:1}}},line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:2}},fillcolor:n.fillcolor}},{"../../components/color/attributes":40,"../../lib/extend":150,"../scatter/attributes":304}],264:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/cartesian/axes");e.exports=function(t,e){var r,i,l,s,c,u,f,d,h,p=o.getFromId(t,e.xaxis||"x"),g=o.getFromId(t,e.yaxis||"y"),m=e.orientation,v=[];"h"===m?(r=p,i="x",c=g,u="y"):(r=g,i="y",c=p,u="x"),l=r.makeCalcdata(e,i),o.expand(r,l,{padded:!0}),f=function(t,e,r,o,i){var l;return r in e?f=o.makeCalcdata(e,r):(l=r+"0"in e?e[r+"0"]:"name"in e&&("category"===o.type||n(e.name)&&-1!==["linear","log"].indexOf(o.type)||a.isDateTime(e.name)&&"date"===o.type)?e.name:t.numboxes,l=o.d2c(l,0,e[r+"calendar"]),f=i.map(function(){return l})),f}(t,e,u,c,l);var y=a.distinctVals(f);return d=y.vals,h=y.minDiff/2,s=function(t,e,r,o,i){var l,s,c,u,f=o.length,d=e.length,h=[],p=[];for(l=0;l=0&&c1,g=r.dPos*(1-u.boxgap)*(1-u.boxgroupgap)/(p?t.numboxes:1),m=p?2*r.dPos*((r.boxnum+.5)/t.numboxes-.5)*(1-u.boxgap):0,v=g*h.whiskerwidth;if(!0!==h.visible||r.emptybox)return void o.select(this).remove();"h"===h.orientation?(s=d,c=f):(s=f,c=d),r.bPos=m,r.bdPos=g,n(),o.select(this).selectAll("path.box").data(i.identity).enter().append("path").attr("class","box").each(function(t){var e=s.c2p(t.pos+m,!0),r=s.c2p(t.pos+m-g,!0),n=s.c2p(t.pos+m+g,!0),a=s.c2p(t.pos+m-v,!0),l=s.c2p(t.pos+m+v,!0),u=c.c2p(t.q1,!0),f=c.c2p(t.q3,!0),d=i.constrain(c.c2p(t.med,!0),Math.min(u,f)+1,Math.max(u,f)-1),p=c.c2p(!1===h.boxpoints?t.min:t.lf,!0),y=c.c2p(!1===h.boxpoints?t.max:t.uf,!0);"h"===h.orientation?o.select(this).attr("d","M"+d+","+r+"V"+n+"M"+u+","+r+"V"+n+"H"+f+"V"+r+"ZM"+u+","+e+"H"+p+"M"+f+","+e+"H"+y+(0===h.whiskerwidth?"":"M"+p+","+a+"V"+l+"M"+y+","+a+"V"+l)):o.select(this).attr("d","M"+r+","+d+"H"+n+"M"+r+","+u+"H"+n+"V"+f+"H"+r+"ZM"+e+","+u+"V"+p+"M"+e+","+f+"V"+y+(0===h.whiskerwidth?"":"M"+a+","+p+"H"+l+"M"+a+","+y+"H"+l))}),h.boxpoints&&o.select(this).selectAll("g.points").data(function(t){return t.forEach(function(t){t.t=r,t.trace=h}),t}).enter().append("g").attr("class","points").selectAll("path").data(function(t){var e,r,n,o,l,s,c,u="all"===h.boxpoints?t.val:t.val.filter(function(e){return et.uf}),f=Math.max((t.max-t.min)/10,t.q3-t.q1),d=1e-9*f,p=.01*f,v=[],y=0;if(h.jitter){if(0===f)for(y=1,v=new Array(u.length),e=0;et.lo&&(n.so=!0),n})}).enter().append("path").call(l.translatePoints,f,d),h.boxmean&&o.select(this).selectAll("path.mean").data(i.identity).enter().append("path").attr("class","mean").style("fill","none").each(function(t){var e=s.c2p(t.pos+m,!0),r=s.c2p(t.pos+m-g,!0),n=s.c2p(t.pos+m+g,!0),a=c.c2p(t.mean,!0),i=c.c2p(t.mean-t.sd,!0),l=c.c2p(t.mean+t.sd,!0);"h"===h.orientation?o.select(this).attr("d","M"+a+","+r+"V"+n+("sd"!==h.boxmean?"":"m0,0L"+i+","+e+"L"+a+","+r+"L"+l+","+e+"Z")):o.select(this).attr("d","M"+r+","+a+"H"+n+("sd"!==h.boxmean?"":"m0,0L"+e+","+i+"L"+r+","+a+"L"+e+","+l+"Z"))})})}},{"../../components/drawing":65,"../../lib":156,d3:15}],271:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../plots/cartesian/axes"),o=t("../../lib");e.exports=function(t,e){var r,i,l,s,c=t._fullLayout,u=e.xaxis,f=e.yaxis,d=["v","h"];for(i=0;is&&(e.z=u.slice(0,s)),l("locationmode"),l("text"),l("marker.line.color"),l("marker.line.width"),a(t,e,i,l,{prefix:"",cLetter:"z"})}},{"../../components/colorscale/defaults":50,"../../lib":156,"./attributes":277}],280:[function(t,e,r){"use strict";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],281:[function(t,e,r){"use strict";function n(t,e,r,n){var i=e.hoverinfo,l="all"===i?o.hoverinfo.flags:i.split("+"),s=-1!==l.indexOf("name"),c=-1!==l.indexOf("location"),u=-1!==l.indexOf("z"),f=-1!==l.indexOf("text"),d=!s&&c,h=[];d?t.nameOverride=r.id:(s&&(t.nameOverride=e.name),c&&h.push(r.id)),u&&h.push(function(t){return a.tickText(n,n.c2l(t),"hover").text}(r.z)),f&&h.push(r.tx),t.extraText=h.join("
")}var a=t("../../plots/cartesian/axes"),o=t("./attributes");e.exports=function(t){var e=t.cd,r=e[0].trace,a=t.subplot,o=a.choroplethHoverPt;if(o){var i=a.projection(o.properties.ct);return t.x0=t.x1=i[0],t.y0=t.y1=i[1],t.index=o.index,t.location=o.id,t.z=o.z,n(t,r,o,a.mockAxis),[t]}}},{"../../plots/cartesian/axes":192,"./attributes":277}],282:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../heatmap/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="choropleth",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","noOpacity"],n.meta={},e.exports=n},{"../../plots/geo":220,"../heatmap/colorbar":284,"./attributes":277,"./calc":278,"./defaults":279,"./event_data":280,"./hover":281,"./plot":283}],283:[function(t,e,r){"use strict";function n(t,e){for(var r,n=[],a=t.locations,o=a.length,i=c(t,e),l=(t.marker||{}).line||{},s=0;s0&&(n[0].trace=t),n}function a(t){t.framework.selectAll("g.trace.choropleth").each(function(t){var e=t[0].trace,r=o.select(this),n=e.marker||{},a=n.line||{},c=s.makeColorScaleFunc(s.extractScale(e.colorscale,e.zmin,e.zmax));r.selectAll("path.choroplethlocation").each(function(t){o.select(this).attr("fill",function(t){return c(t.z)}).call(i.stroke,t.mlc||a.color).call(l.dashLine,"",t.mlw||a.width||0)})})}var o=t("d3"),i=t("../../components/color"),l=t("../../components/drawing"),s=t("../../components/colorscale"),c=t("../../lib/topojson_utils").getTopojsonFeatures,u=t("../../lib/geo_location_utils").locationToFeature,f=t("../../lib/array_to_calc_item"),d=t("../../plots/geo/constants");e.exports=function(t,e,r){function i(t){return t[0].trace.uid}var l,s=t.framework,c=s.select("g.choroplethlayer"),u=s.select("g.baselayer"),f=s.select("g.baselayeroverchoropleth"),h=d.baseLayersOverChoropleth,p=c.selectAll("g.trace.choropleth").data(e,i);p.enter().append("g").attr("class","trace choropleth"),p.exit().remove(),p.each(function(e){var r=e[0].trace,a=n(r,t.topojson),i=o.select(this).selectAll("path.choroplethlocation").data(a);i.enter().append("path").classed("choroplethlocation",!0).on("mouseover",function(e){t.choroplethHoverPt=e}).on("mouseout",function(){t.choroplethHoverPt=null}),i.exit().remove()}),f.selectAll("*").remove();for(var g=0;gi?o=!0:e1)){var f=l.simpleMap(u.x,e.d2c,0,r.xcalendar),d=l.distinctVals(f).minDiff;o=Math.min(o,d)}}for(o===1/0&&(o=1),c=0;c");w.push(i,i,i,i,i,i,null)}(z,p[z],g[z],m[z],v[z]));e.x=b,e.y=_,e.text=w}},{"../../lib":156,"../../plots/cartesian/axes":192,"../../plots/cartesian/axis_ids":195,"./helpers":288,"fast-isnumeric":17}],292:[function(t,e,r){"use strict";var n=t("../../components/color/attributes"),a=t("../../plots/font_attributes"),o=t("../../plots/attributes"),i=t("../../lib/extend").extendFlat;e.exports={labels:{valType:"data_array"},label0:{valType:"number",dflt:0},dlabel:{valType:"number",dflt:1},values:{valType:"data_array"},marker:{colors:{valType:"data_array"},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}}},text:{valType:"data_array"},hovertext:{valType:"string",dflt:"",arrayOk:!0},scalegroup:{valType:"string",dflt:""},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"]},hoverinfo:i({},o.hoverinfo,{flags:["label","text","value","percent","name"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0},textfont:i({},a,{}),insidetextfont:i({},a,{}),outsidetextfont:i({},a,{}),domain:{x:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]},y:{valType:"info_array",items:[{valType:"number",min:0,max:1},{valType:"number",min:0,max:1}],dflt:[0,1]}},hole:{valType:"number",min:0,max:1,dflt:0},sort:{valType:"boolean",dflt:!0},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise"},rotation:{valType:"number",min:-360,max:360,dflt:0},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0}}},{"../../components/color/attributes":40,"../../lib/extend":150,"../../plots/attributes":190,"../../plots/font_attributes":216}],293:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n")}return g};var s},{"../../components/color":41,"./helpers":296,"fast-isnumeric":17,tinycolor2:22}],295:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes");e.exports=function(t,e,r,o){function i(r,o){return n.coerce(t,e,a,r,o)}var l=n.coerceFont,s=i("values");if(!Array.isArray(s)||!s.length)return void(e.visible=!1);var c=i("labels");Array.isArray(c)||(i("label0"),i("dlabel")),i("marker.line.width")&&i("marker.line.color");var u=i("marker.colors");Array.isArray(u)||(e.marker.colors=[]),i("scalegroup");var f=i("text"),d=i("textinfo",Array.isArray(f)?"text+percent":"percent");if(i("hovertext"),d&&"none"!==d){var h=i("textposition"),p=Array.isArray(h)||"auto"===h,g=p||"inside"===h,m=p||"outside"===h;if(g||m){var v=l(i,"textfont",o.font);g&&l(i,"insidetextfont",v),m&&l(i,"outsidetextfont",v)}}i("domain.x"),i("domain.y"),i("hole"),i("sort"),i("direction"),i("rotation"),i("pull")}},{"../../lib":156,"./attributes":292}],296:[function(t,e,r){"use strict";var n=t("../../lib");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,e)}},{"../../lib":156}],297:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.supplyLayoutDefaults=t("./layout_defaults"),n.layoutAttributes=t("./layout_attributes"),n.calc=t("./calc"),n.plot=t("./plot"),n.style=t("./style"),n.styleOne=t("./style_one"),n.moduleType="trace",n.name="pie",n.basePlotModule=t("./base_plot"),n.categories=["pie","showLegend"],n.meta={},e.exports=n},{"./attributes":292,"./base_plot":293,"./calc":294,"./defaults":295,"./layout_attributes":298,"./layout_defaults":299,"./plot":300,"./style":301,"./style_one":302}],298:[function(t,e,r){"use strict";e.exports={hiddenlabels:{valType:"data_array"}}},{}],299:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){!function(r,o){n.coerce(t,e,a,r,o)}("hiddenlabels")}},{"../../lib":156,"./layout_attributes":298}],300:[function(t,e,r){"use strict";function n(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),o=t.width/t.height,i=Math.PI*Math.min(e.v/r.vTotal,.5),l=1-r.trace.hole,s=a(e,r),c={scale:s*r.r*2/n,rCenter:1-s,rotate:0};if(c.scale>=1)return c;var u=o+1/(2*Math.tan(i)),f=r.r*Math.min(1/(Math.sqrt(u*u+.5)+u),l/(Math.sqrt(o*o+l/2)+o)),d={scale:2*f/t.height,rCenter:Math.cos(f/r.r)-f*o/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},h=1/o,p=h+1/(2*Math.tan(i)),g=r.r*Math.min(1/(Math.sqrt(p*p+.5)+p),l/(Math.sqrt(h*h+l/2)+h)),m={scale:2*g/t.width,rCenter:Math.cos(g/r.r)-g/o/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},v=m.scale>d.scale?m:d;return c.scale<1&&v.scale>c.scale?v:c}function a(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function o(t,e){var r=e.pxmid[0],n=e.pxmid[1],a=t.width/2,o=t.height/2;return r<0&&(a*=-1),n<0&&(o*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(o)*(a>0?1:-1)/2,y:o/(1+r*r/(n*n)),outside:!0}}function i(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}var a,o,i,l,s,c,u,f,d,h,p,g,m;for(o=0;o<2;o++)for(i=o?r:n,s=o?Math.max:Math.min,u=o?1:-1,a=0;a<2;a++){for(l=a?Math.max:Math.min,c=a?1:-1,f=t[o][a],f.sort(i),d=t[1-o][a],h=d.concat(f),g=[],p=0;p0&&(t.labelExtraY=x),Array.isArray(e.pull))for(a=0;a=e.pull[i.i]||((t.pxmid[1]-i.pxmid[1])*u>0?(f=i.cyFinal+s(i.px0[1],i.px1[1]),(x=f-m-t.labelExtraY)*u>0&&(t.labelExtraY+=x)):(v+t.labelExtraY-y)*u>0&&(n=3*c*Math.abs(a-h.indexOf(t)),d=i.cxFinal+l(i.px0[0],i.px1[0]),(p=d+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*c>0&&(t.labelExtraX+=p)))}(g[p],v)}}}function l(t,e){var r,n,a,o,i,l,s,u,f,d,h=[];for(a=0;au&&(u=l.pull[o]);i.r=Math.min(r/c(l.tilt,Math.sin(s),l.depth),n/c(l.tilt,Math.cos(s),l.depth))/(2+2*u),i.cx=e.l+e.w*(l.domain.x[1]+l.domain.x[0])/2,i.cy=e.t+e.h*(2-l.domain.y[1]-l.domain.y[0])/2,l.scalegroup&&-1===h.indexOf(l.scalegroup)&&h.push(l.scalegroup)}for(o=0;of.vTotal/2?1:0)}function c(t,e,r){if(!t)return 1;var n=Math.sin(t*Math.PI/180);return Math.max(.01,r*n*Math.abs(e)+2*Math.sqrt(1-n*n*e*e))}var u=t("d3"),f=t("../../components/fx"),d=t("../../components/color"),h=t("../../components/drawing"),p=t("../../lib/svg_text_utils"),g=t("./helpers");e.exports=function(t,e){var r=t._fullLayout;l(e,r._size);var c=r._pielayer.selectAll("g.trace").data(e);c.enter().append("g").attr({"stroke-linejoin":"round",class:"trace"}),c.exit().remove(),c.order(),c.each(function(e){var l=u.select(this),c=e[0],m=c.trace,v=(m.depth||0)*c.r*Math.sin(0)/2,y=m.tiltaxis||0,x=y*Math.PI/180,b=[v*Math.sin(x),v*Math.cos(x)],_=c.r*Math.cos(0),w=l.selectAll("g.part").data(m.tilt?["top","sides"]:["top"]);w.enter().append("g").attr("class",function(t){return t+" part"}),w.exit().remove(),w.order(),s(e),l.selectAll(".top").each(function(){var l=u.select(this).selectAll("g.slice").data(e);l.enter().append("g").classed("slice",!0),l.exit().remove();var s=[[[],[]],[[],[]]],v=!1;l.each(function(e){function i(n){n.originalEvent=u.event;var o=t._fullLayout,i=t._fullData[m.index],l=f.castHoverinfo(i,o,e.i);if("all"===l&&(l="label+text+value+percent+name"),t._dragging||!1===o.hovermode||"none"===l||"skip"===l||!l)return void f.hover(t,n,"pie");var s=a(e,c),d=w+e.pxmid[0]*(1-s),h=M+e.pxmid[1]*(1-s),p=r.separators,v=[];-1!==l.indexOf("label")&&v.push(e.label),-1!==l.indexOf("text")&&(i.hovertext?v.push(Array.isArray(i.hovertext)?i.hovertext[e.i]:i.hovertext):i.text&&i.text[e.i]&&v.push(i.text[e.i])),-1!==l.indexOf("value")&&v.push(g.formatPieValue(e.v,p)),-1!==l.indexOf("percent")&&v.push(g.formatPiePercent(e.v/c.vTotal,p)),f.loneHover({x0:d-s*c.r,x1:d+s*c.r,y:h,text:v.join("
"),name:-1!==l.indexOf("name")?i.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:f.castHoverOption(m,e.i,"bgcolor")||e.color,borderColor:f.castHoverOption(m,e.i,"bordercolor"),fontFamily:f.castHoverOption(m,e.i,"font.family"),fontSize:f.castHoverOption(m,e.i,"font.size"),fontColor:f.castHoverOption(m,e.i,"font.color")},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t}),f.hover(t,n,"pie"),T=!0}function l(e){e.originalEvent=u.event,t.emit("plotly_unhover",{event:u.event,points:[e]}),T&&(f.loneUnhover(r._hoverlayer.node()),T=!1)}function d(){t._hoverdata=[e],e.curveNumber=c.trace.index,t._hoverdata.trace=c.trace,f.click(t,u.event||{target:!0})}function x(t,r,n,a){return"a"+a*c.r+","+a*_+" "+y+" "+e.largeArc+(n?" 1 ":" 0 ")+a*(r[0]-t[0])+","+a*(r[1]-t[1])}if(e.hidden)return void u.select(this).selectAll("path,g").remove();s[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var w=c.cx+b[0],M=c.cy+b[1],k=u.select(this),A=k.selectAll("path.surface").data([e]),T=!1;if(A.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),k.select("path.textline").remove(),k.on("mouseover",i).on("mouseout",l).on("mousedown",d),m.pull){var L=+(Array.isArray(m.pull)?m.pull[e.i]:m.pull)||0;L>0&&(w+=L*e.pxmid[0],M+=L*e.pxmid[1])}e.cxFinal=w,e.cyFinal=M;var C=m.hole;if(e.v===c.vTotal){var S="M"+(w+e.px0[0])+","+(M+e.px0[1])+x(e.px0,e.pxmid,!0,1)+x(e.pxmid,e.px0,!0,1)+"Z";C?A.attr("d","M"+(w+C*e.px0[0])+","+(M+C*e.px0[1])+x(e.px0,e.pxmid,!1,C)+x(e.pxmid,e.px0,!1,C)+"Z"+S):A.attr("d",S)}else{var z=x(e.px0,e.px1,!0,1);if(C){var O=1-C;A.attr("d","M"+(w+C*e.px1[0])+","+(M+C*e.px1[1])+x(e.px1,e.px0,!1,C)+"l"+O*e.px0[0]+","+O*e.px0[1]+z+"Z")}else A.attr("d","M"+w+","+M+"l"+e.px0[0]+","+e.px0[1]+z+"Z")}var P=Array.isArray(m.textposition)?m.textposition[e.i]:m.textposition,D=k.selectAll("g.slicetext").data(e.text&&"none"!==P?[0]:[]);D.enter().append("g").classed("slicetext",!0),D.exit().remove(),D.each(function(){var r=u.select(this).selectAll("text").data([0]);r.enter().append("text").attr("data-notex",1),r.exit().remove(),r.text(e.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(h.font,"outside"===P?m.outsidetextfont:m.insidetextfont).call(p.convertToTspans,t);var a,i=h.bBox(r.node());"outside"===P?a=o(i,e):(a=n(i,e,c),"auto"===P&&a.scale<1&&(r.call(h.font,m.outsidetextfont),m.outsidetextfont.family===m.insidetextfont.family&&m.outsidetextfont.size===m.insidetextfont.size||(i=h.bBox(r.node())),a=o(i,e)));var l=w+e.pxmid[0]*a.rCenter+(a.x||0),s=M+e.pxmid[1]*a.rCenter+(a.y||0);a.outside&&(e.yLabelMin=s-i.height/2,e.yLabelMid=s,e.yLabelMax=s+i.height/2,e.labelExtraX=0,e.labelExtraY=0,v=!0),r.attr("transform","translate("+l+","+s+")"+(a.scale<1?"scale("+a.scale+")":"")+(a.rotate?"rotate("+a.rotate+")":"")+"translate("+-(i.left+i.right)/2+","+-(i.top+i.bottom)/2+")")})}),v&&i(s,m),l.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=u.select(this),r=e.select("g.slicetext text");r.attr("transform","translate("+t.labelExtraX+","+t.labelExtraY+")"+r.attr("transform"));var n=t.cxFinal+t.pxmid[0],a=t.cyFinal+t.pxmid[1],o="M"+n+","+a,i=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var l=t.labelExtraX*t.pxmid[1]/t.pxmid[0],s=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(l)>Math.abs(s)?o+="l"+s*t.pxmid[0]/t.pxmid[1]+","+s+"H"+(n+t.labelExtraX+i):o+="l"+t.labelExtraX+","+l+"v"+(s-l)+"h"+i}else o+="V"+(t.yLabelMid+t.labelExtraY)+"h"+i;e.append("path").classed("textline",!0).call(d.stroke,m.outsidetextfont.color).attr({"stroke-width":Math.min(2,m.outsidetextfont.size/8),d:o,fill:"none"})}})})}),setTimeout(function(){c.selectAll("tspan").each(function(){var t=u.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)}},{"../../components/color":41,"../../components/drawing":65,"../../components/fx":82,"../../lib/svg_text_utils":173,"./helpers":296,d3:15}],301:[function(t,e,r){"use strict";var n=t("d3"),a=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0],r=e.trace,o=n.select(this);o.style({opacity:r.opacity}),o.selectAll(".top path.surface").each(function(t){n.select(this).call(a,t,r)})})}},{"./style_one":302,d3:15}],302:[function(t,e,r){"use strict";var n=t("../../components/color");e.exports=function(t,e,r){var a=r.marker.line.color;Array.isArray(a)&&(a=a[e.i]||n.defaultLine);var o=r.marker.line.width||0;Array.isArray(o)&&(o=o[e.i]||0),t.style({"stroke-width":o}).call(n.fill,e.color).call(n.stroke,a)}},{"../../components/color":41}],303:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;rg&&h.splice(g,h.length-g),p.length>g&&p.splice(g,p.length-g);var m={padded:!0},v={padded:!0};if(i.hasMarkers(e)){if(r=e.marker,c=r.size,Array.isArray(c)){var y={type:"linear"};a.setConvert(y),c=y.makeCalcdata(e.marker,"size"), +c.length>g&&c.splice(g,c.length-g)}var x,b=1.6*(e.marker.sizeref||1);x="area"===e.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/b),3)}:function(t){return Math.max((t||0)/b,3)},m.ppad=v.ppad=Array.isArray(c)?c.map(x):x(c)}l(e),!("tozerox"===e.fill||"tonextx"===e.fill&&t.firstscatter)||h[0]===h[g-1]&&p[0]===p[g-1]?e.error_y.visible||-1===["tonexty","tozeroy"].indexOf(e.fill)&&(i.hasMarkers(e)||i.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!("tozeroy"===e.fill||"tonexty"===e.fill&&t.firstscatter)||h[0]===h[g-1]&&p[0]===p[g-1]?-1!==["tonextx","tozerox"].indexOf(e.fill)&&(v.padded=!1):v.tozero=!0,a.expand(f,h,m),a.expand(d,p,v);var _=new Array(g);for(u=0;u=0;a--){var o=t[a];if("scatter"===o.type&&o.xaxis===r.xaxis&&o.yaxis===r.yaxis){o.opacity=void 0;break}}}}}},{}],307:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),o=t("../../plots/plots"),i=t("../../components/colorscale"),l=t("../../components/colorbar/draw");e.exports=function(t,e){var r=e[0].trace,s=r.marker,c="cb"+r.uid;if(t._fullLayout._infolayer.selectAll("."+c).remove(),void 0===s||!s.showscale)return void o.autoMargin(t,c);var u=s.color,f=s.cmin,d=s.cmax;n(f)||(f=a.aggNums(Math.min,null,u)),n(d)||(d=a.aggNums(Math.max,null,u));var h=e[0].t.cb=l(t,c),p=i.makeColorScaleFunc(i.extractScale(s.colorscale,f,d),{noNumericCheck:!0});h.fillcolor(p).filllevels({start:f,end:d,size:(d-f)/254}).options(s.colorbar)()}},{"../../components/colorbar/draw":44,"../../components/colorscale":55,"../../lib":156,"../../plots/plots":233,"fast-isnumeric":17}],308:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/calc"),o=t("./subtypes");e.exports=function(t){o.hasLines(t)&&n(t,"line")&&a(t,t.line.color,"line","c"),o.hasMarkers(t)&&(n(t,"marker")&&a(t,t.marker.color,"marker","c"),n(t,"marker.line")&&a(t,t.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":47,"../../components/colorscale/has_colorscale":54,"./subtypes":324}],309:[function(t,e,r){"use strict";e.exports={PTS_LINESONLY:20}},{}],310:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),o=t("./constants"),i=t("./subtypes"),l=t("./xy_defaults"),s=t("./marker_defaults"),c=t("./line_defaults"),u=t("./line_shape_defaults"),f=t("./text_defaults"),d=t("./fillcolor_defaults"),h=t("../../components/errorbars/defaults");e.exports=function(t,e,r,p){function g(r,o){return n.coerce(t,e,a,r,o)}var m=l(t,e,p,g),v=mx[b].x0&&ex[b].y0&&rU!=R>=U&&(D=O[S-1][0],E=O[S][0],P=D+(E-D)*(U-N)/(R-N),B=Math.min(B,P),q=Math.max(q,P));B=Math.max(B,0),q=Math.min(q,d._length);var G=l.defaultLine;return l.opacity(f.fillcolor)?G=f.fillcolor:l.opacity((f.line||{}).color)&&(G=f.line.color),n.extendFlat(t,{distance:s+10,x0:B,x1:q,y0:U,y1:U,color:G}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{"../../components/color":41,"../../components/errorbars":71,"../../components/fx":82,"../../lib":156,"./get_trace_color":312}],314:[function(t,e,r){"use strict";var n={},a=t("./subtypes");n.hasLines=a.hasLines,n.hasMarkers=a.hasMarkers,n.hasText=a.hasText,n.isBubble=a.isBubble,n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.cleanData=t("./clean_data"),n.calc=t("./calc"),n.arraysToCalcdata=t("./arrays_to_calcdata"),n.plot=t("./plot"),n.colorbar=t("./colorbar"),n.style=t("./style"),n.hoverPoints=t("./hover"),n.selectPoints=t("./select"),n.animatable=!0,n.moduleType="trace",n.name="scatter",n.basePlotModule=t("../../plots/cartesian"),n.categories=["cartesian","symbols","markerColorscale","errorBarsOK","showLegend"],n.meta={},e.exports=n},{"../../plots/cartesian":202,"./arrays_to_calcdata":303,"./attributes":304,"./calc":305,"./clean_data":306,"./colorbar":307,"./defaults":310,"./hover":313,"./plot":321,"./select":322,"./style":323,"./subtypes":324}],315:[function(t,e,r){"use strict";var n=t("../../components/colorscale/has_colorscale"),a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,i,l){var s=(t.marker||{}).color;if(i("line.color",r),n(t,"line"))a(t,e,o,i,{prefix:"line.",cLetter:"c"});else{i("line.color",!Array.isArray(s)&&s||r)}i("line.width"),(l||{}).noDash||i("line.dash")}},{"../../components/colorscale/defaults":50,"../../components/colorscale/has_colorscale":54}],316:[function(t,e,r){"use strict";var n=t("../../constants/numerical").BADNUM;e.exports=function(t,e){function r(e){var r=_.c2p(t[e].x),a=w.c2p(t[e].y);return r!==n&&a!==n&&[r,a]}function a(t){var e=t[0]/_._length,r=t[1]/w._length;return(1+10*Math.max(0,-e,e-1,-r,r-1))*A}var o,i,l,s,c,u,f,d,h,p,g,m,v,y,x,b,_=e.xaxis,w=e.yaxis,M=e.simplify,k=e.connectGaps,A=e.baseTolerance,T=e.linear,L=[],C=.2,S=new Array(t.length),z=0;for(M||(A=C=-1),o=0;oa(u))break;l=u,v=p[0]*h[0]+p[1]*h[1],v>g?(g=v,s=u,d=!1):v=t.length||!u)break;S[z++]=u,i=u}}else S[z++]=s}L.push(S.slice(0,z))}return L}},{"../../constants/numerical":139}],317:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],318:[function(t,e,r){"use strict";e.exports=function(t,e,r){for(var n,a,o=null,i=0;i0?Math.max(e,a):0}}},{"fast-isnumeric":17}],320:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/has_colorscale"),o=t("../../components/colorscale/defaults"),i=t("./subtypes");e.exports=function(t,e,r,l,s,c){var u,f=i.isBubble(t),d=(t.line||{}).color;if(c=c||{},d&&(r=d),s("marker.symbol"),s("marker.opacity",f?.7:1),s("marker.size"),s("marker.color",r),a(t,"marker")&&o(t,e,l,s,{prefix:"marker.",cLetter:"c"}),c.noLine||(u=d&&!Array.isArray(d)&&e.marker.color!==d?d:f?n.background:n.defaultLine,s("marker.line.color",u),a(t,"marker.line")&&o(t,e,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",f?1:0)),f&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),c.gradient){"none"!==s("marker.gradient.type")&&s("marker.gradient.color")}}},{"../../components/color":41,"../../components/colorscale/defaults":50,"../../components/colorscale/has_colorscale":54,"./subtypes":324}],321:[function(t,e,r){"use strict";function n(t,e){var r;e.selectAll("g.trace").each(function(t){var e=i.select(this);if(r=t[0].trace,r._nexttrace){if(r._nextFill=e.select(".js-fill.js-tonext"),!r._nextFill.size()){var n=":first-child";e.select(".js-fill.js-tozero").size()&&(n+=" + *"),r._nextFill=e.insert("path",n).attr("class","js-fill js-tonext")}}else e.selectAll(".js-fill.js-tonext").remove(),r._nextFill=null;r.fill&&("tozero"===r.fill.substr(0,6)||"toself"===r.fill||"to"===r.fill.substr(0,2)&&!r._prevtrace)?(r._ownFill=e.select(".js-fill.js-tozero"),r._ownFill.size()||(r._ownFill=e.insert("path",":first-child").attr("class","js-fill js-tozero"))):(e.selectAll(".js-fill.js-tozero").remove(),r._ownFill=null)})}function a(t,e,r,n,a,d,p){function g(t){return M?t.transition():t}function m(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(t){if(t.ids)return v}function x(){return!1}function b(e){var r,n,a,o=e[0].trace,c=i.select(this),f=u.hasMarkers(o),d=u.hasText(o),h=y(o),p=x,v=x;f&&(p=o.marker.maxdisplayed||o._needsCull?m:l.identity),d&&(v=o.marker.maxdisplayed||o._needsCull?m:l.identity),n=c.selectAll("path.point"),r=n.data(p,h);var b=r.enter().append("path").classed("point",!0);M&&b.call(s.pointStyle,o,t).call(s.translatePoints,k,A,o).style("opacity",0).transition().style("opacity",1);var _=f&&s.tryColorscale(o.marker,""),w=f&&s.tryColorscale(o.marker,"line");r.order(),r.each(function(e){var r=i.select(this),n=g(r);a=s.translatePoint(e,n,k,A),a?(s.singlePointStyle(e,n,o,_,w,t),o.customdata&&r.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):n.remove()}),M?r.exit().transition().style("opacity",0).remove():r.exit().remove(),n=c.selectAll("g"),r=n.data(v,h),r.enter().append("g").classed("textpoint",!0).append("text"),r.order(),r.each(function(t){var e=i.select(this),r=g(e.select("text"));(a=s.translatePoint(t,r,k,A))||e.remove()}),r.selectAll("text").call(s.textPointStyle,o,t).each(function(t){var e=t.xp||k.c2p(t.x),r=t.yp||A.c2p(t.y);i.select(this).selectAll("tspan.line").each(function(){g(i.select(this)).attr({x:e,y:r})})}),r.exit().remove()}var _,w;o(t,e,r,n,a);var M=!!p&&p.duration>0,k=r.xaxis,A=r.yaxis,T=n[0].trace,L=T.line,C=i.select(d);if(C.call(c.plot,r,p),!0===T.visible){g(C).style("opacity",T.opacity);var S,z,O=T.fill.charAt(T.fill.length-1);"x"!==O&&"y"!==O&&(O=""),n[0].node3=C;var P="",D=[],E=T._prevtrace;E&&(P=E._prevRevpath||"",z=E._nextFill,D=E._polygons);var N,R,I,j,F,B,q,H,V,U="",G="",Y=[],X=[],Z=l.noop;if(S=T._ownFill,u.hasLines(T)||"none"!==T.fill){for(z&&z.datum(n),-1!==["hv","vh","hvh","vhv"].indexOf(L.shape)?(I=s.steps(L.shape),j=s.steps(L.shape.split("").reverse().join(""))):I=j="spline"===L.shape?function(t){var e=t[t.length-1];return t[0][0]===e[0]&&t[0][1]===e[1]?s.smoothclosed(t.slice(1),L.smoothing):s.smoothopen(t,L.smoothing)}:function(t){return"M"+t.join("L")},F=function(t){return j(t.reverse())},Y=f(n,{xaxis:k,yaxis:A,connectGaps:T.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,linear:"linear"===L.shape,simplify:L.simplify}),V=T._polygons=new Array(Y.length),w=0;w1}),Z=function(t){return function(e){if(N=I(e),R=F(e),U?O?(U+="L"+N.substr(1),G=R+"L"+G.substr(1)):(U+="Z"+N,G=R+"Z"+G):(U=N,G=R),u.hasLines(T)&&e.length>1){var r=i.select(this);if(r.datum(n),t)g(r.style("opacity",0).attr("d",N).call(s.lineGroupStyle)).style("opacity",1);else{var a=g(r);a.attr("d",N),s.singleLineStyle(n,a)}}}}}var W=C.selectAll(".js-line").data(X);g(W.exit()).style("opacity",0).remove(),W.each(Z(!1)),W.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(Z(!0)),Y.length&&(S?B&&H&&(O?("y"===O?B[1]=H[1]=A.c2p(0,!0):"x"===O&&(B[0]=H[0]=k.c2p(0,!0)),g(S).attr("d","M"+H+"L"+B+"L"+U.substr(1)).call(s.singleFillStyle)):g(S).attr("d",U+"Z").call(s.singleFillStyle)):"tonext"===T.fill.substr(0,6)&&U&&P&&("tonext"===T.fill?g(z).attr("d",U+"Z"+P+"Z").call(s.singleFillStyle):g(z).attr("d",U+"L"+P.substr(1)+"Z").call(s.singleFillStyle),T._polygons=T._polygons.concat(D)),T._prevRevpath=G,T._prevPolygons=V);var $=C.selectAll(".points");_=$.data([n]),$.each(b),_.enter().append("g").classed("points",!0).each(b),_.exit().remove()}}function o(t,e,r,n,a){var o=r.xaxis,s=r.yaxis,c=i.extent(l.simpleMap(o.range,o.r2c)),f=i.extent(l.simpleMap(s.range,s.r2c)),d=n[0].trace;if(u.hasMarkers(d)){var h=d.marker.maxdisplayed;if(0!==h){var p=n.filter(function(t){return t.x>=c[0]&&t.x<=c[1]&&t.y>=f[0]&&t.y<=f[1]}),g=Math.ceil(p.length/h),m=0;a.forEach(function(t,r){var n=t[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;for(u=p.selectAll("g.trace"),f=u.data(r,function(t){return t[0].trace.uid}),f.enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),d(t,e,r),n(t,p),s=0,c={};sc[e[0].trace.uid]?1:-1}),m){l&&(h=l());i.transition().duration(o.duration).ease(o.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){p.selectAll("g.trace").each(function(n,i){a(t,i,e,n,r,this,o)})})}else p.selectAll("g.trace").each(function(n,i){a(t,i,e,n,r,this,o)});g&&f.exit().remove(),p.selectAll("path:not([d])").remove()}},{"../../components/drawing":65,"../../components/errorbars":71,"../../lib":156,"../../lib/polygon":166,"./line_points":316,"./link_traces":318,"./subtypes":324,d3:15}],322:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,a,o,i,l=t.cd,s=t.xaxis,c=t.yaxis,u=[],f=l[0].trace,d=f.marker,h=!n.hasMarkers(f)&&!n.hasText(f);if(!0===f.visible&&!h){var p=Array.isArray(d.opacity)?1:d.opacity;if(!1===e)for(r=0;r")}var a=t("../../components/fx"),o=t("../../plots/cartesian/axes"),i=t("../../constants/numerical").BADNUM,l=t("../scatter/get_trace_color"),s=t("./attributes");e.exports=function(t){function e(t){return f.projection(t)}function r(t){var r=t.lonlat;if(r[0]===i)return 1/0;if(f.isLonLatOverEdges(r))return 1/0;var n=e(r),a=c.c2p(),o=u.c2p(),l=Math.abs(a-n[0]),s=Math.abs(o-n[1]),d=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+s*s)-d,1-3/d)}var o=t.cd,s=o[0].trace,c=t.xa,u=t.ya,f=t.subplot;if(a.getClosest(o,r,t),!1!==t.index){var d=o[t.index],h=d.lonlat,p=e(h),g=d.mrc||1;return t.x0=p[0]-g,t.x1=p[0]+g,t.y0=p[1]-g,t.y1=p[1]+g,t.loc=d.loc,t.lon=h[0],t.lat=h[1],t.color=l(s,d),t.extraText=n(s,d,f.mockAxis),[t]}}},{"../../components/fx":82,"../../constants/numerical":139,"../../plots/cartesian/axes":192,"../scatter/get_trace_color":312,"./attributes":327}],332:[function(t,e,r){"use strict";var n={};n.attributes=t("./attributes"),n.supplyDefaults=t("./defaults"),n.colorbar=t("../scatter/colorbar"),n.calc=t("./calc"),n.plot=t("./plot"),n.hoverPoints=t("./hover"),n.eventData=t("./event_data"),n.moduleType="trace",n.name="scattergeo",n.basePlotModule=t("../../plots/geo"),n.categories=["geo","symbols","markerColorscale","showLegend"],n.meta={},e.exports=n},{"../../plots/geo":220,"../scatter/colorbar":307,"./attributes":327,"./calc":328,"./defaults":329,"./event_data":330,"./hover":331,"./plot":333}],333:[function(t,e,r){"use strict";function n(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=u(r,e),a=r.locationmode,o=0;o