{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
\n", "\n", "
\n", "\"DRILSDOWN\n", "
\n", "\n", "
\n", "\"Earthcube\n", "
\n", "\n", "\n", "

Understanding eddy momentum flux II: Profiles

\n", "

from 7km G5NR data, using G5NRutils.py

\n", "

Suvarchal Cheedela and Brian Mapes, Oct 2017

\n", "\n", "Part of [this nbviewer repo](http://nbviewer.jupyter.org/github/suvarchal/G5NR_Interactive_notebooks/tree/master/)\n", "\n", "-------------\n", "\n", "
\n", "
\n", "\n", "
\n", "\n", "\n", "### Sections\n", "Open your case file (.zidv)\n", "1. Plan view: u',v',w'\n", "2. SKEdot's underlying profiles: u'w', v'w', div(eddyflux)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import holoviews as hv\n", "import geoviews as gv\n", "import geoviews.feature as gf\n", "from cartopy import crs as ccrs\n", "import xarray as xr\n", "import numpy as np\n", "from datetime import datetime\n", "from holoviews import streams" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import G5NR_utils" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/javascript": [ "\n", "(function(root) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = true;\n", "\n", " if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", " root._bokeh_onload_callbacks = [];\n", " root._bokeh_is_loading = undefined;\n", " }\n", "\n", " var JS_MIME_TYPE = 'application/javascript';\n", " var HTML_MIME_TYPE = 'text/html';\n", " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", " var CLASS_NAME = 'output_bokeh rendered_html';\n", "\n", " /**\n", " * Render data to the DOM node\n", " */\n", " function render(props, node) {\n", " var script = document.createElement(\"script\");\n", " node.appendChild(script);\n", " }\n", "\n", " /**\n", " * Handle when an output is cleared or removed\n", " */\n", " function handleClearOutput(event, handle) {\n", " var cell = handle.cell;\n", "\n", " var id = cell.output_area._bokeh_element_id;\n", " var server_id = cell.output_area._bokeh_server_id;\n", " // Clean up Bokeh references\n", " if (id !== undefined) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", "\n", " if (server_id !== undefined) {\n", " // Clean up Bokeh references\n", " var cmd = \"from bokeh.io import _state; print(_state.uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", " cell.notebook.kernel.execute(cmd, {\n", " iopub: {\n", " output: function(msg) {\n", " var element_id = msg.content.text.trim();\n", " Bokeh.index[element_id].model.document.clear();\n", " delete Bokeh.index[element_id];\n", " }\n", " }\n", " });\n", " // Destroy server and session\n", " var cmd = \"from bokeh import io; io._destroy_server('\" + server_id + \"')\";\n", " cell.notebook.kernel.execute(cmd);\n", " }\n", " }\n", "\n", " /**\n", " * Handle when a new output is added\n", " */\n", " function handleAddOutput(event, handle) {\n", " var output_area = handle.output_area;\n", " var output = handle.output;\n", "\n", " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", " return\n", " }\n", "\n", " var toinsert = output_area.element.find(`.${CLASS_NAME.split(' ')[0]}`);\n", "\n", " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", " toinsert[0].firstChild.textContent = output.data[JS_MIME_TYPE];\n", " // store reference to embed id on output_area\n", " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", " }\n", " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", " var bk_div = document.createElement(\"div\");\n", " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", " var script_attrs = bk_div.children[0].attributes;\n", " for (var i = 0; i < script_attrs.length; i++) {\n", " toinsert[0].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", " }\n", " // store reference to server id on output_area\n", " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", " }\n", " }\n", "\n", " function register_renderer(events, OutputArea) {\n", "\n", " function append_mime(data, metadata, element) {\n", " // create a DOM node to render to\n", " var toinsert = this.create_output_subarea(\n", " metadata,\n", " CLASS_NAME,\n", " EXEC_MIME_TYPE\n", " );\n", " this.keyboard_manager.register_events(toinsert);\n", " // Render to node\n", " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", " render(props, toinsert[0]);\n", " element.append(toinsert);\n", " return toinsert\n", " }\n", "\n", " /* Handle when an output is cleared or removed */\n", " events.on('clear_output.CodeCell', handleClearOutput);\n", " events.on('delete.Cell', handleClearOutput);\n", "\n", " /* Handle when a new output is added */\n", " events.on('output_added.OutputArea', handleAddOutput);\n", "\n", " /**\n", " * Register the mime type and append_mime function with output_area\n", " */\n", " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", " /* Is output safe? */\n", " safe: true,\n", " /* Index of renderer in `output_area.display_order` */\n", " index: 0\n", " });\n", " }\n", "\n", " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", " if (root.Jupyter !== undefined) {\n", " var events = require('base/js/events');\n", " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", "\n", " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", " register_renderer(events, OutputArea);\n", " }\n", " }\n", "\n", " \n", " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", " root._bokeh_timeout = Date.now() + 5000;\n", " root._bokeh_failed_load = false;\n", " }\n", "\n", " var NB_LOAD_WARNING = {'data': {'text/html':\n", " \"
\\n\"+\n", " \"

\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"

\\n\"+\n", " \"\\n\"+\n", " \"\\n\"+\n", " \"from bokeh.resources import INLINE\\n\"+\n", " \"output_notebook(resources=INLINE)\\n\"+\n", " \"\\n\"+\n", " \"
\"}};\n", "\n", " function display_loaded() {\n", " var el = document.getElementById(null);\n", " if (el != null) {\n", " el.textContent = \"BokehJS is loading...\";\n", " }\n", " if (root.Bokeh !== undefined) {\n", " if (el != null) {\n", " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", " }\n", " } else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(display_loaded, 100)\n", " }\n", " }\n", "\n", "\n", " function run_callbacks() {\n", " try {\n", " root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", " }\n", " finally {\n", " delete root._bokeh_onload_callbacks\n", " }\n", " console.info(\"Bokeh: all callbacks have finished\");\n", " }\n", "\n", " function load_libs(js_urls, callback) {\n", " root._bokeh_onload_callbacks.push(callback);\n", " if (root._bokeh_is_loading > 0) {\n", " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", " return null;\n", " }\n", " if (js_urls == null || js_urls.length === 0) {\n", " run_callbacks();\n", " return null;\n", " }\n", " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", " root._bokeh_is_loading = js_urls.length;\n", " for (var i = 0; i < js_urls.length; i++) {\n", " var url = js_urls[i];\n", " var s = document.createElement('script');\n", " s.src = url;\n", " s.async = false;\n", " s.onreadystatechange = s.onload = function() {\n", " root._bokeh_is_loading--;\n", " if (root._bokeh_is_loading === 0) {\n", " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", " run_callbacks()\n", " }\n", " };\n", " s.onerror = function() {\n", " console.warn(\"failed to load library \" + url);\n", " };\n", " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", " }\n", " };\n", "\n", " var js_urls = [];\n", "\n", " var inline_js = [\n", " function(Bokeh) {\n", " /* BEGIN bokeh.min.js */\n", " !function(t,e){t.Bokeh=e()}(this,function(){var t;return function(t,e,r){var n={},i=function(r){var o=null!=e[r]?e[r]:r;if(!n[o]){if(!t[o]){var s=new Error(\"Cannot find module '\"+r+\"'\");throw s.code=\"MODULE_NOT_FOUND\",s}var a=n[o]={exports:{}};t[o].call(a.exports,i,a,a.exports)}return n[o].exports},o=i(r);return o.require=i,o.register_plugin=function(r,n,s){for(var a in r)t[a]=r[a];for(var a in n)e[a]=n[a];var l=i(s);for(var a in l)o[a]=l[a];return l},o}([function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(132),i=t(29);r.overrides={};var o=i.clone(n);r.Models=function(t){var e=r.overrides[t]||o[t];if(null==e)throw new Error(\"Model '\"+t+\"' does not exist. This could be due to a widget\\n or a custom model not being registered before first usage.\");return e},r.Models.register=function(t,e){r.overrides[t]=e},r.Models.unregister=function(t){delete r.overrides[t]},r.Models.register_models=function(t,e,r){if(void 0===e&&(e=!1),null!=t)for(var n in t){var i=t[n];e||!o.hasOwnProperty(n)?o[n]=i:null!=r?r(n):console.warn(\"Model '\"+n+\"' was already registered\")}},r.register_models=r.Models.register_models,r.Models.registered_names=function(){return Object.keys(o)},r.index={}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(299),i=t(13),o=t(46),s=t(242),a=t(243),l=t(2);r.DEFAULT_SERVER_WEBSOCKET_URL=\"ws://localhost:5006/ws\",r.DEFAULT_SESSION_ID=\"default\",r.ClientConnection=function(){function t(e,n,o,s,l){this.url=e,this.id=n,this.args_string=o,this._on_have_session_hook=s,this._on_closed_permanently_hook=l,this._number=t._connection_count,t._connection_count=this._number+1,null==this.url&&(this.url=r.DEFAULT_SERVER_WEBSOCKET_URL),null==this.id&&(this.id=r.DEFAULT_SESSION_ID),i.logger.debug(\"Creating websocket \"+this._number+\" to '\"+this.url+\"' session '\"+this.id+\"'\"),this.socket=null,this.session=null,this.closed_permanently=!1,this._current_handler=null,this._pending_ack=null,this._pending_replies={},this._receiver=new a.Receiver}return t._connection_count=0,t.prototype.connect=function(){var t,e,r;if(this.closed_permanently)return n.Promise.reject(new Error(\"Cannot connect() a closed ClientConnection\"));if(null!=this.socket)return n.Promise.reject(new Error(\"Already connected\"));this._pending_replies={},this._current_handler=null;try{return r=this.url+\"?bokeh-protocol-version=1.0&bokeh-session-id=\"+this.id,(null!=(e=this.args_string)?e.length:void 0)>0&&(r+=\"&\"+this.args_string),null!=window.MozWebSocket?this.socket=new MozWebSocket(r):this.socket=new WebSocket(r),new n.Promise(function(t){return function(e,r){return t.socket.binaryType=\"arraybuffer\",t.socket.onopen=function(){return t._on_open(e,r)},t.socket.onmessage=function(e){return t._on_message(e)},t.socket.onclose=function(e){return t._on_close(e)},t.socket.onerror=function(){return t._on_error(r)}}}(this))}catch(o){return t=o,i.logger.error(\"websocket creation failed to url: \"+this.url),i.logger.error(\" - \"+t),n.Promise.reject(t)}},t.prototype.close=function(){if(!this.closed_permanently&&(i.logger.debug(\"Permanently closing websocket connection \"+this._number),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,\"close method called on ClientConnection \"+this._number),this.session._connection_closed(),null!=this._on_closed_permanently_hook))return this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null},t.prototype._schedule_reconnect=function(t){var e;return e=function(t){return function(){t.closed_permanently||i.logger.info(\"Websocket connection \"+t._number+\" disconnected, will not attempt to reconnect\")}}(this),setTimeout(e,t)},t.prototype.send=function(t){if(null===this.socket)throw new Error(\"not connected so cannot send \"+t);return t.send(this.socket)},t.prototype.send_with_reply=function(t){var e;return e=new n.Promise(function(e){return function(r,n){return e._pending_replies[t.msgid()]=[r,n],e.send(t)}}(this)),e.then(function(t){if(\"ERROR\"===t.msgtype())throw new Error(\"Error reply \"+t.content.text);return t},function(t){throw t})},t.prototype._pull_doc_json=function(){var t,e;return t=s.Message.create(\"PULL-DOC-REQ\",{}),e=this.send_with_reply(t),e.then(function(t){if(!(\"doc\"in t.content))throw new Error(\"No 'doc' field in PULL-DOC-REPLY\");return t.content.doc},function(t){throw t})},t.prototype._repull_session_doc=function(){return null===this.session?i.logger.debug(\"Pulling session for first time\"):i.logger.debug(\"Repulling session\"),this._pull_doc_json().then(function(t){return function(e){var r,n,a;return null!==t.session?(t.session.document.replace_with_json(e),i.logger.debug(\"Updated existing session with new pulled doc\")):t.closed_permanently?i.logger.debug(\"Got new document after connection was already closed\"):(r=o.Document.from_json(e),n=o.Document._compute_patch_since_json(e,r),n.events.length>0&&(i.logger.debug(\"Sending \"+n.events.length+\" changes from model construction back to server\"),a=s.Message.create(\"PATCH-DOC\",{},n),t.send(a)),t.session=new l.ClientSession(t,r,t.id),i.logger.debug(\"Created a new session from new pulled doc\"),null!=t._on_have_session_hook?(t._on_have_session_hook(t.session),t._on_have_session_hook=null):void 0)}}(this),function(t){throw t})[\"catch\"](function(t){return null!=console.trace&&console.trace(t),i.logger.error(\"Failed to repull session \"+t)})},t.prototype._on_open=function(t,e){return i.logger.info(\"Websocket connection \"+this._number+\" is now open\"),this._pending_ack=[t,e],this._current_handler=function(t){return function(e){return t._awaiting_ack_handler(e)}}(this)},t.prototype._on_message=function(t){var e,r,n;null==this._current_handler&&i.logger.error(\"Got a message with no current handler set\");try{this._receiver.consume(t.data)}catch(o){e=o,this._close_bad_protocol(e.toString())}return null===this._receiver.message?null:(r=this._receiver.message,n=r.problem(),null!==n&&this._close_bad_protocol(n),this._current_handler(r))},t.prototype._on_close=function(t){var e,r;for(i.logger.info(\"Lost websocket \"+this._number+\" connection, \"+t.code+\" (\"+t.reason+\")\"),this.socket=null,null!=this._pending_ack&&(this._pending_ack[1](new Error(\"Lost websocket connection, \"+t.code+\" (\"+t.reason+\")\")),this._pending_ack=null),e=function(t){return function(){var e,r,n;r=t._pending_replies;for(n in r)return e=r[n],delete t._pending_replies[n],e;return null}}(this),r=e();null!==r;)r[1](\"Disconnected\"),r=e();if(!this.closed_permanently)return this._schedule_reconnect(2e3)},t.prototype._on_error=function(t){return i.logger.debug(\"Websocket error on socket \"+this._number),t(new Error(\"Could not open websocket\"))},t.prototype._close_bad_protocol=function(t){if(i.logger.error(\"Closing connection: \"+t),null!=this.socket)return this.socket.close(1002,t)},t.prototype._awaiting_ack_handler=function(t){return\"ACK\"!==t.msgtype()?this._close_bad_protocol(\"First message was not an ACK\"):(this._current_handler=function(t){return function(e){return t._steady_state_handler(e)}}(this),this._repull_session_doc(),null!=this._pending_ack?(this._pending_ack[0](this),this._pending_ack=null):void 0)},t.prototype._steady_state_handler=function(t){var e;return t.reqid()in this._pending_replies?(e=this._pending_replies[t.reqid()],delete this._pending_replies[t.reqid()],e[0](t)):this.session.handle(t)},t}(),r.pull_session=function(t,e,o){var s,a,l;return l=null,s=null,a=new n.Promise(function(n,a){return s=new r.ClientConnection(t,e,o,function(t){var e;try{return n(t)}catch(r){throw e=r,i.logger.error(\"Promise handler threw an error, closing session \"+error),t.close(),e}},function(){return a(new Error(\"Connection was closed before we successfully pulled a session\"))}),s.connect().then(function(t){},function(t){throw i.logger.error(\"Failed to connect to Bokeh server \"+t),t})}),a.close=function(){return s.close()},a}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(13),i=t(46),o=t(242);r.ClientSession=function(){function t(t,e,r){this._connection=t,this.document=e,this.id=r,this.document_listener=function(t){return function(e){return t._document_changed(e)}}(this),this.document.on_change(this.document_listener),this.event_manager=this.document.event_manager,this.event_manager.session=this}return t.prototype.handle=function(t){var e;return e=t.msgtype(),\"PATCH-DOC\"===e?this._handle_patch(t):\"OK\"===e?this._handle_ok(t):\"ERROR\"===e?this._handle_error(t):n.logger.debug(\"Doing nothing with message \"+t.msgtype())},t.prototype.close=function(){return this._connection.close()},t.prototype.send_event=function(t){var e;return e=o.Message.create(\"EVENT\",{},JSON.stringify(t)),this._connection.send(e)},t.prototype._connection_closed=function(){return this.document.remove_on_change(this.document_listener)},t.prototype.request_server_info=function(){var t,e;return t=o.Message.create(\"SERVER-INFO-REQ\",{}),e=this._connection.send_with_reply(t),e.then(function(t){return t.content})},t.prototype.force_roundtrip=function(){return this.request_server_info().then(function(t){})},t.prototype._document_changed=function(t){var e;if(t.setter_id!==this.id&&(!(t instanceof i.ModelChangedEvent)||t.attr in t.model.serializable_attributes()))return e=o.Message.create(\"PATCH-DOC\",{},this.document.create_json_patch([t])),this._connection.send(e)},t.prototype._handle_patch=function(t){return this.document.apply_json_patch(t.content,t.buffers,this.id)},t.prototype._handle_ok=function(t){return n.logger.trace(\"Unhandled OK reply to \"+t.reqid())},t.prototype._handle_error=function(t){return n.logger.error(\"Unhandled ERROR reply to \"+t.reqid()+\": \"+t.content.text)},t}()},function(t,e,r){\"use strict\";function n(t){return function(e){e.prototype.event_name=t,l[t]=e}}function i(t){for(var e=[],r=1;ru;a=0<=u?++l:--l)this.properties[n[a]].change.emit(s[n[a]]);if(i)return this;if(!c&&!e.no_change)for(;this._pending;)this._pending=!1,this.change.emit();return this._pending=!1,this._changing=!1,this},t.prototype.setv=function(t,e,r){var n,o,s,a,l;d.isObject(t)||null===t?(n=t,r=e):(n={},n[t]=e),null==r&&(r={});for(t in n)if(i.call(n,t)){if(l=n[t],s=t,null==this.props[s])throw new Error(\"property \"+this.type+\".\"+s+\" wasn't declared\");null!=r&&r.defaults||(this._set_after_defaults[t]=!0)}if(!p.isEmpty(n)){o={};for(t in n)e=n[t],o[t]=this.getv(t);if(this._setv(n,r),null==(null!=r?r.silent:void 0)){a=[];for(t in n)e=n[t],a.push(this._tell_document_about_change(t,o[t],this.getv(t),r));return a}}},t.prototype.set=function(t,e,r){return s.logger.warn(\"HasProps.set('prop_name', value) is deprecated, use HasProps.prop_name = value instead\"),this.setv(t,e,r)},t.prototype.get=function(t){return s.logger.warn(\"HasProps.get('prop_name') is deprecated, use HasProps.prop_name instead\"),this.getv(t)},t.prototype.getv=function(t){if(null==this.props[t])throw new Error(\"property \"+this.type+\".\"+t+\" wasn't declared\");return this.attributes[t]},t.prototype.ref=function(){return u.create_ref(this)},t.prototype.set_subtype=function(t){return this._subtype=t},t.prototype.attribute_is_serializable=function(t){var e;if(e=this.props[t],null==e)throw new Error(this.type+\".attribute_is_serializable('\"+t+\"'): \"+t+\" wasn't declared\");return!e.internal},t.prototype.serializable_attributes=function(){var t,e,r,n;t={},r=this.attributes;for(e in r)n=r[e],this.attribute_is_serializable(e)&&(t[e]=n);return t},t._value_to_json=function(e,r,n){var o,s,a,l,u,c,_;if(r instanceof t)return r.ref();if(d.isArray(r)){for(l=[],o=s=0,a=r.length;sa;i=0<=a?++s:--s)u=r[i],_=n[i],co&&(r=[o,i],i=r[0],o=r[1]),s>a&&(n=[a,s],s=n[0],a=n[1]),{minX:i,minY:s,maxX:o,maxY:a}},o=function(t){return t*t},r.dist_2_pts=function(t,e,r,n){return o(t-r)+o(e-n)},n=function(t,e,n){var i,o;return i=r.dist_2_pts(e.x,e.y,n.x,n.y),0===i?r.dist_2_pts(t.x,t.y,e.x,e.y):(o=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/i,o<0?r.dist_2_pts(t.x,t.y,e.x,e.y):o>1?r.dist_2_pts(t.x,t.y,n.x,n.y):r.dist_2_pts(t.x,t.y,e.x+o*(n.x-e.x),e.y+o*(n.y-e.y)))},r.dist_to_segment=function(t,e,r){return Math.sqrt(n(t,e,r))},r.check_2_segments_intersect=function(t,e,r,n,i,o,s,a){var l,u,c,_,h,p,d;return c=(a-o)*(r-t)-(s-i)*(n-e),0===c?{hit:!1,x:null,y:null}:(l=e-o,u=t-i,_=(s-i)*l-(a-o)*u,h=(r-t)*l-(n-e)*u,l=_/c,u=h/c,p=t+l*(r-t),d=e+l*(n-e),{hit:l>0&&l<1&&u>0&&u<1,x:p,y:d})}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(12),s=t(49);r.LayoutCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LayoutCanvas\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._top=new o.Variable(this.toString()+\".top\"),this._left=new o.Variable(this.toString()+\".left\"),this._width=new o.Variable(this.toString()+\".width\"),this._height=new o.Variable(this.toString()+\".height\"),this._right=new o.Variable(this.toString()+\".right\"),this._bottom=new o.Variable(this.toString()+\".bottom\"),this._hcenter=new o.Variable(this.toString()+\".hcenter\"),this._vcenter=new o.Variable(this.toString()+\".vcenter\")},e.prototype.get_editables=function(){return[]},e.prototype.get_constraints=function(){return[o.GE(this._top),o.GE(this._bottom),o.GE(this._left),o.GE(this._right),o.GE(this._width),o.GE(this._height),o.EQ(this._left,this._width,[-1,this._right]),o.EQ(this._bottom,this._height,[-1,this._top]),o.EQ([2,this._hcenter],[-1,this._left],[-1,this._right]),o.EQ([2,this._vcenter],[-1,this._bottom],[-1,this._top])]},e.getters({layout_bbox:function(){return{top:this._top.value,left:this._left.value,width:this._width.value,height:this._height.value,right:this._right.value,bottom:this._bottom.value,hcenter:this._hcenter.value,\n", " vcenter:this._vcenter.value}}}),e}(s.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m=function(t,e){function r(){this.constructor=t}for(var n in e)v.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},v={}.hasOwnProperty,g=t(12),b=t(10),w=t(14),x=t(13),k=t(41);y=Math.PI/2,n=\"alphabetic\",c=\"top\",i=\"bottom\",l=\"middle\",s=\"hanging\",a=\"left\",u=\"right\",o=\"center\",d={above:{parallel:0,normal:-y,horizontal:0,vertical:-y},below:{parallel:0,normal:y,horizontal:0,vertical:y},left:{parallel:-y,normal:0,horizontal:0,vertical:-y},right:{parallel:y,normal:0,horizontal:0,vertical:y}},f={above:{justified:c,parallel:n,normal:l,horizontal:n,vertical:l},below:{justified:i,parallel:s,normal:l,horizontal:s,vertical:l},left:{justified:c,parallel:n,normal:l,horizontal:l,vertical:n},right:{justified:c,parallel:n,normal:l,horizontal:l,vertical:n}},_={above:{justified:o,parallel:o,normal:a,horizontal:o,vertical:a},below:{justified:o,parallel:o,normal:a,horizontal:o,vertical:a},left:{justified:o,parallel:o,normal:u,horizontal:u,vertical:o},right:{justified:o,parallel:o,normal:a,horizontal:a,vertical:o}},h={above:u,below:a,left:u,right:a},p={above:a,below:u,left:u,right:a},r.update_panel_constraints=function(t){var e;if(null==t.model.props.visible||t.model.visible)return e=t.solver,null!=t._size_constraint&&e.has_constraint(t._size_constraint)&&e.remove_constraint(t._size_constraint),t._size_constraint=g.EQ(t.model.panel._size,-t._get_size()),e.add_constraint(t._size_constraint)},r.SidePanel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return m(e,t),e.prototype.type=\"SidePanel\",e.internal({side:[w.String],plot:[w.Instance]}),e.prototype.toString=function(){return this.type+\"(\"+this.id+\", \"+this.side+\")\"},e.prototype.initialize=function(t,r){switch(e.__super__.initialize.call(this,t,r),this.side){case\"above\":return this._dim=0,this._normals=[0,-1],this._size=this._height;case\"below\":return this._dim=0,this._normals=[0,1],this._size=this._height;case\"left\":return this._dim=1,this._normals=[-1,0],this._size=this._width;case\"right\":return this._dim=1,this._normals=[1,0],this._size=this._width;default:return x.logger.error(\"unrecognized side: '\"+this.side+\"'\")}},e.getters({is_horizontal:function(){return\"above\"===this.side||\"below\"===this.side},is_vertical:function(){return\"left\"===this.side||\"right\"===this.side}}),e.prototype.apply_label_text_heuristics=function(t,e){var r,n,i;return i=this.side,k.isString(e)?(n=f[i][e],r=_[i][e]):0===e?(n=f[i][e],r=_[i][e]):e<0?(n=\"middle\",r=h[i]):e>0&&(n=\"middle\",r=p[i]),t.textBaseline=n,t.textAlign=r,t},e.prototype.get_label_angle_heuristic=function(t){var e;return e=this.side,d[e][t]},e}(b.LayoutCanvas)},function(t,e,r){\"use strict\";function n(t){return function(){for(var e=[],r=0;r0){var n=s[e];return null==n&&(s[e]=n=new t(e,r)),n}throw new TypeError(\"Logger.get() expects a non-empty string name and an optional log-level\")},Object.defineProperty(t.prototype,\"level\",{get:function(){return this.get_level()},enumerable:!0,configurable:!0}),t.prototype.get_level=function(){return this._log_level},t.prototype.set_level=function(e){if(e instanceof a)this._log_level=e;else{if(!o.isString(e)||null==t.log_levels[e])throw new Error(\"Logger.set_level() expects a log-level object or a string name of a log-level\");this._log_level=t.log_levels[e]}var r=\"[\"+this._name+\"]\";for(var i in t.log_levels){var s=t.log_levels[i];s.levele;r=0<=e?++t:--t)i.push(o);return i}());return null!=this.spec.transform&&(i=this.spec.transform.v_compute(i)),i},t.prototype._init=function(){var t,e,r,n;if(n=this.obj,null==n)throw new Error(\"missing property object\");if(null==n.properties)throw new Error(\"property object must be a HasProps\");if(t=this.attr,null==t)throw new Error(\"missing property attr\");if(e=n.getv(t),void 0===e&&(r=this.default_value,e=function(){switch(!1){case void 0!==r:return null;case!h.isArray(r):return _.copy(r);case!h.isFunction(r):return r(n);default:return r}}(),n.setv(t,e,{silent:!0,defaults:!0})),h.isArray(e)?this.spec={value:e}:h.isObject(e)&&(void 0===e.value?0:1)+(void 0===e.field?0:1)+(void 0===e.expr?0:1)===1?this.spec=e:this.spec={value:e},null!=this.spec.field&&!h.isString(this.spec.field))throw new Error(\"field value for property '\"+t+\"' is not a string\");return null!=this.spec.value&&this.validate(this.spec.value),this.init()},t.prototype.toString=function(){return this.name+\"(\"+this.obj+\".\"+this.attr+\", spec: \"+n(this.spec)+\")\"},t}(),r.simple_prop=function(t,e){var o;return o=function(r){function o(){return o.__super__.constructor.apply(this,arguments)}return i(o,r),o.prototype.name=t,o.prototype.validate=function(r){if(!e(r))throw new Error(t+\" property '\"+this.attr+\"' given invalid value: \"+n(r))},o}(r.Property)},r.Any=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Any\",function(t){return!0})),r.Array=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Array\",function(t){return h.isArray(t)||t instanceof Float64Array})),r.Bool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Bool\",h.isBoolean)),r.Boolean=r.Bool,r.Color=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Color\",function(t){return null!=u[t.toLowerCase()]||\"#\"===t.substring(0,1)||c.valid_rgb(t)})),r.Instance=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Instance\",function(t){return null!=t.properties})),r.Number=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Number\",function(t){return h.isNumber(t)||h.isBoolean(t)})),r.Int=r.Number,r.Percent=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Number\",function(t){return(h.isNumber(t)||h.isBoolean(t))&&0<=t&&t<=1})),r.String=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"String\",h.isString)),r.Font=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.String),r.enum_prop=function(t,e){var n;return n=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return i(r,e),r.prototype.name=t,r}(r.simple_prop(t,function(t){return s.call(e,t)>=0}))},r.Anchor=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Anchor\",l.LegendLocation)),r.AngleUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"AngleUnits\",l.AngleUnits)),r.Direction=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.transform=function(t){var e,r,n,i;for(i=new Uint8Array(t.length),e=r=0,n=t.length;0<=n?rn;e=0<=n?++r:--r)switch(t[e]){case\"clock\":i[e]=!1;break;case\"anticlock\":i[e]=!0}return i},e}(r.enum_prop(\"Direction\",l.Direction)),r.Dimension=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Dimension\",l.Dimension)),r.Dimensions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Dimensions\",l.Dimensions)),r.FontStyle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"FontStyle\",l.FontStyle)),r.LatLon=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LatLon\",l.LatLon)),r.LineCap=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LineCap\",l.LineCap)),r.LineJoin=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LineJoin\",l.LineJoin)),r.LegendLocation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LegendLocation\",l.LegendLocation)),r.Location=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Location\",l.Location)),r.OutputBackend=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"OutputBackend\",l.OutputBackend)),r.Orientation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Orientation\",l.Orientation)),r.TextAlign=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TextAlign\",l.TextAlign)),r.TextBaseline=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TextBaseline\",l.TextBaseline)),r.RenderLevel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"RenderLevel\",l.RenderLevel)),r.RenderMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"RenderMode\",l.RenderMode)),r.SizingMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"SizingMode\",l.SizingMode)),r.SpatialUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"SpatialUnits\",l.SpatialUnits)),r.Distribution=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Distribution\",l.DistributionTypes)),r.TransformStepMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TransformStepMode\",l.TransformStepModes)),r.PaddingUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"PaddingUnits\",l.PaddingUnits)),r.StartEnd=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"StartEnd\",l.StartEnd)),r.units_prop=function(t,e,n){var o;return o=function(r){function o(){return o.__super__.constructor.apply(this,arguments)}return i(o,r),o.prototype.name=t,o.prototype.init=function(){var r;if(null==this.spec.units&&(this.spec.units=n),this.units=this.spec.units,r=this.spec.units,s.call(e,r)<0)throw new Error(t+\" units must be one of \"+e+\", given invalid value: \"+r)},o}(r.Number)},r.Angle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.transform=function(t){var r;return\"deg\"===this.spec.units&&(t=function(){var e,n,i;for(i=[],e=0,n=t.length;e0)&&\"pinch\"===e?(o.logger.debug(\"Registering scroll on touch screen\"),i.connect(this.scroll,function(t){if(t.id===r)return i._scroll(t.e)})):void 0},t.prototype._hit_test_renderers=function(t,e){var r,n,i,o;for(n=this.plot_view.get_renderer_views(),r=n.length-1;r>=0;r+=-1)if(o=n[r],(\"annotation\"===(i=o.model.level)||\"overlay\"===i)&&null!=o.bbox&&o.bbox().contains(t,e))return o;return null},t.prototype._hit_test_frame=function(t,e){var r,n,i;return r=this.plot_view.canvas,n=r.sx_to_vx(t),i=r.sy_to_vy(e),this.plot_view.frame.contains(n,i)},t.prototype._trigger=function(t,e){var r,n,i,o,s,a,u,c,_,h,p;switch(a=t.name,o=a.split(\":\")[0],p=this._hit_test_renderers(e.bokeh.sx,e.bokeh.sy),o){case\"move\":for(n=this.toolbar.inspectors.filter(function(t){return t.active}),s=\"default\",null!=p?(null!=p.model.cursor&&(s=p.model.cursor()),l.isEmpty(n)||(t=this.move_exit,a=t.name)):this._hit_test_frame(e.bokeh.sx,e.bokeh.sy)&&(l.isEmpty(n)||(s=\"crosshair\")),this.plot_view.set_cursor(s),h=[],u=0,_=n.length;u<_;u++)c=n[u],h.push(this.trigger(t,e,c.id));return h;case\"tap\":if(null!=p&&\"function\"==typeof p.on_hit&&p.on_hit(e.bokeh.sx,e.bokeh.sy),r=this.toolbar.gestures[o].active,null!=r)return this.trigger(t,e,r.id);break;case\"scroll\":if(i=\"ontouchstart\"in window||navigator.maxTouchPoints>0?\"pinch\":\"scroll\",r=this.toolbar.gestures[i].active,null!=r)return e.preventDefault(),e.stopPropagation(),this.trigger(t,e,r.id);break;default:if(r=this.toolbar.gestures[o].active,null!=r)return this.trigger(t,e,r.id)}},t.prototype.trigger=function(t,e,r){return null==r&&(r=null),t.emit({id:r,e:e})},t.prototype._bokify_hammer=function(t,e){var r,n,i,a,c,_;return null==e&&(e={}),\"mouse\"===t.pointerType?(c=t.srcEvent.pageX,_=t.srcEvent.pageY):(c=t.pointers[0].pageX,_=t.pointers[0].pageY),i=s.offset(t.target),n=i.left,a=i.top,t.bokeh={sx:c-n,sy:_-a},t.bokeh=l.extend(t.bokeh,e),r=u.BokehEvent.event_class(t),null!=r?this.plot.trigger_event(r.from_event(t)):o.logger.debug(\"Unhandled event of type \"+t.type)},t.prototype._bokify_point_event=function(t,e){var r,n,i,a;return null==e&&(e={}),i=s.offset(t.currentTarget),n=i.left,a=i.top,t.bokeh={sx:t.pageX-n,sy:t.pageY-a},t.bokeh=l.extend(t.bokeh,e),r=u.BokehEvent.event_class(t),null!=r?this.plot.trigger_event(r.from_event(t)):o.logger.debug(\"Unhandled event of type \"+t.type)},t.prototype._tap=function(t){return this._bokify_hammer(t),this._trigger(this.tap,t)},t.prototype._doubletap=function(t){return this._bokify_hammer(t),this.trigger(this.doubletap,t)},t.prototype._press=function(t){return this._bokify_hammer(t),this._trigger(this.press,t)},t.prototype._pan_start=function(t){return this._bokify_hammer(t),t.bokeh.sx-=t.deltaX,t.bokeh.sy-=t.deltaY,this._trigger(this.pan_start,t)},t.prototype._pan=function(t){return this._bokify_hammer(t),this._trigger(this.pan,t)},t.prototype._pan_end=function(t){return this._bokify_hammer(t),this._trigger(this.pan_end,t)},t.prototype._pinch_start=function(t){return this._bokify_hammer(t),this._trigger(this.pinch_start,t)},t.prototype._pinch=function(t){return this._bokify_hammer(t),this._trigger(this.pinch,t)},t.prototype._pinch_end=function(t){return this._bokify_hammer(t),this._trigger(this.pinch_end,t)},t.prototype._rotate_start=function(t){return this._bokify_hammer(t),this._trigger(this.rotate_start,t)},t.prototype._rotate=function(t){return this._bokify_hammer(t),this._trigger(this.rotate,t)},t.prototype._rotate_end=function(t){return this._bokify_hammer(t),this._trigger(this.rotate_end,t)},t.prototype._mouse_enter=function(t){return this._bokify_point_event(t),this._trigger(this.move_enter,t);\n", " },t.prototype._mouse_move=function(t){return this._bokify_point_event(t),this._trigger(this.move,t)},t.prototype._mouse_exit=function(t){return this._bokify_point_event(t),this._trigger(this.move_exit,t)},t.prototype._mouse_wheel=function(t){return this._bokify_point_event(t,{delta:a.getDeltaY(t)}),this._trigger(this.scroll,t)},t.prototype._key_down=function(t){return this.trigger(this.keydown,t)},t.prototype._key_up=function(t){return this.trigger(this.keyup,t)},t}()},function(t,e,r){\"use strict\";function n(t){return t[t.length-1]}function i(t){return I.call(t)}function o(t){return(e=[]).concat.apply(e,t);var e}function s(t,e){return t.indexOf(e)!==-1}function a(t,e){return t[e>=0?e:t.length+e]}function l(t,e){for(var r=Math.min(t.length,e.length),n=new Array(r),i=0;ir&&(r=e);return r}function v(t,e){if(0==t.length)throw new Error(\"maxBy() called with an empty array\");for(var r=t[0],n=e(r),i=1,o=t.length;in&&(r=s,n=a)}return r}function g(t){return y(c(t.length),function(e){return t[e]})}function b(t){return v(c(t.length),function(e){return t[e]})}function w(t,e){for(var r=0,n=t;r0?0:n-1;i>=0&&in||void 0===r)return 1;if(r=this.x0&&t<=this.x1&&e>=this.y0&&e<=this.y1},t.prototype.union=function(e){return new t({x0:Math.min(this.x0,e.x0),y0:Math.min(this.y0,e.y0),x1:Math.max(this.x1,e.x1),y1:Math.max(this.y1,e.y1)})},t}();r.BBox=a},function(t,e,r){\"use strict\";function n(t,e){return setTimeout(t,e)}function i(t){return a(t)}function o(t,e,r){void 0===r&&(r={});var n,i,o,s=null,a=0,l=function(){a=r.leading===!1?0:Date.now(),s=null,o=t.apply(n,i),s||(n=i=null)};return function(){var u=Date.now();a||r.leading!==!1||(a=u);var c=e-(u-a);return n=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),a=u,o=t.apply(n,i),s||(n=i=null)):s||r.trailing===!1||(s=setTimeout(l,c)),o}}function s(t){var e,r=!1;return function(){return r||(r=!0,e=t()),e}}\n", " // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n", " // Underscore may be freely distributed under the MIT license.\n", " Object.defineProperty(r,\"__esModule\",{value:!0}),r.delay=n;var a=\"function\"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;r.defer=i,r.throttle=o,r.once=s},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a;o=function(t){if(t.setLineDash||(t.setLineDash=function(e){return t.mozDash=e,t.webkitLineDash=e}),!t.getLineDash)return t.getLineDash=function(){return t.mozDash}},s=function(t){return t.setLineDashOffset=function(e){return t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}},i=function(t){return t.setImageSmoothingEnabled=function(e){return t.imageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.oImageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e},t.getImageSmoothingEnabled=function(){var e;return null==(e=t.imageSmoothingEnabled)||e}},a=function(t){if(t.measureText&&null==t.html5MeasureText)return t.html5MeasureText=t.measureText,t.measureText=function(e){var r;return r=t.html5MeasureText(e),r.ascent=1.6*t.html5MeasureText(\"m\").width,r}},n=function(t){var e;if(e=function(e,r,n,i,o,s,a,l){var u,c,_;null==l&&(l=!1),u=.551784,t.translate(e,r),t.rotate(o),c=n,_=i,l&&(c=-n,_=-i),t.moveTo(-c,0),t.bezierCurveTo(-c,_*u,-c*u,_,0,_),t.bezierCurveTo(c*u,_,c,_*u,c,0),t.bezierCurveTo(c,-_*u,c*u,-_,0,-_),t.bezierCurveTo(-c*u,-_,-c,-_*u,-c,0),t.rotate(-o),t.translate(-e,-r)},!t.ellipse)return t.ellipse=e},r.fixup_ctx=function(t){return o(t),s(t),i(t),a(t),n(t)},r.get_scale_ratio=function(t,e,r){var n,i;return\"svg\"===r?1:e?(i=window.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,i/n):1}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=[].indexOf||function(t){for(var e=0,r=this.length;e=0)throw new Error(\"color expects rgb to have value between 0 and 255\");return!0}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(21),i=t(27),o=t(41),s=function(){function t(){this._dict={}}return t.prototype._existing=function(t){return t in this._dict?this._dict[t]:null},t.prototype.add_value=function(t,e){var r=this._existing(t);null==r?this._dict[t]=e:o.isArray(r)?r.push(e):this._dict[t]=[r,e]},t.prototype.remove_value=function(t,e){var r=this._existing(t);if(o.isArray(r)){var s=n.difference(r,[e]);s.length>0?this._dict[t]=s:delete this._dict[t]}else i.isEqual(r,e)&&delete this._dict[t]},t.prototype.get_one=function(t,e){var r=this._existing(t);if(o.isArray(r)){if(1===r.length)return r[0];throw new Error(e)}return r},t}();r.MultiDict=s;var a=function(){function t(e){null==e?this.values=[]:e instanceof t?this.values=n.copy(e.values):this.values=this._compact(e)}return t.prototype._compact=function(t){for(var e=[],r=0,n=t;r2*Math.PI;)t-=2*Math.PI;return t}function i(t,e){return Math.abs(n(t-e))}function o(t,e,r,o){var s=n(t),a=i(e,r),l=i(e,s)<=a&&i(s,r)<=a;return\"anticlock\"==o?l:!l}function s(){return Math.random()}function a(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}function l(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])}function u(t,e){for(var r,n;;)if(r=s(),n=s(),n=(2*n-1)*Math.sqrt(2*(1/Math.E)),-4*r*r*Math.log(r)>=n*n)break;var i=n/r;return i=t+e*i}function c(t,e,r){return t>r?r:t0?e[\"1d\"].indices:e[\"2d\"].indices.length>0?e[\"2d\"].indices:[]}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l,u=t(41);r.ARRAY_TYPES={float32:Float32Array,float64:Float64Array,uint8:Uint8Array,int8:Int8Array,uint16:Uint16Array,int16:Int16Array,uint32:Uint32Array,int32:Int32Array},r.DTYPES={};for(a in r.ARRAY_TYPES)l=r.ARRAY_TYPES[a],r.DTYPES[l.name]=a;i=new ArrayBuffer(2),s=new Uint8Array(i),o=new Uint16Array(i),s[0]=170,s[1]=187,n=48042===o[0]?\"little\":\"big\",r.BYTE_ORDER=n,r.swap16=function(t){var e,r,n,i,o;for(o=new Uint8Array(t.buffer,t.byteOffset,2*t.length),e=r=0,n=o.length;rs;n=0<=s?++i:--i)r[n]=e.charCodeAt(n);return r.buffer},r.decode_base64=function(t){var e,n,i,o;return n=r.base64ToArrayBuffer(t.__ndarray__),i=t.dtype,i in r.ARRAY_TYPES&&(e=new r.ARRAY_TYPES[i](n)),o=t.shape,[e,o]},r.encode_base64=function(t,e){var n,i,o;return n=r.arrayBufferToBase64(t.buffer),o=r.DTYPES[t.constructor.name],i={__ndarray__:n,shape:e,dtype:o}},r.decode_column_data=function(t,e){var n,i,o,s,c,_,h,p,d,f,y;c={},_={};for(a in t)if(l=t[a],u.isArray(l)){if(0===l.length||!u.isObject(l[0])&&!u.isArray(l[0])){c[a]=l;continue}for(i=[],y=[],o=0,s=l.length;oc;n=0<=c?++i:--i)(null!=(_=l[n])?_.buffer:void 0)instanceof ArrayBuffer?o.push(r.encode_base64(l[n],null!=e&&null!=(h=e[a])?h[n]:void 0)):o.push(l[n]);l=o}s[a]=l}return s}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(361),i=t(358),o=function(){function t(){}return t}();r.SpatialIndex=o;var s=function(t){function e(e){var r=t.call(this)||this;return r.index=i(),r.index.load(e),r}return n.__extends(e,t),Object.defineProperty(e.prototype,\"bbox\",{get:function(){var t=this.index.toJSON(),e=t.minX,r=t.minY,n=t.maxX,i=t.maxY;return{minX:e,minY:r,maxX:n,maxY:i}},enumerable:!0,configurable:!0}),e.prototype.search=function(t){return this.index.search(t)},e.prototype.indices=function(t){for(var e=this.search(t),r=e.length,n=new Array(r),i=0;i\"'`])/g,function(t){switch(t){case\"&\":return\"&\";case\"<\":return\"<\";case\">\":return\">\";case'\"':return\""\";case\"'\":return\"'\";case\"`\":return\"`\";default:return t}})}Object.defineProperty(r,\"__esModule\",{value:!0});var a=t(18);r.startsWith=n,r.uuid4=i;var l=1e3;r.uniqueId=o,r.escape=s},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.indianred=\"#CD5C5C\",r.lightcoral=\"#F08080\",r.salmon=\"#FA8072\",r.darksalmon=\"#E9967A\",r.lightsalmon=\"#FFA07A\",r.crimson=\"#DC143C\",r.red=\"#FF0000\",r.firebrick=\"#B22222\",r.darkred=\"#8B0000\",r.pink=\"#FFC0CB\",r.lightpink=\"#FFB6C1\",r.hotpink=\"#FF69B4\",r.deeppink=\"#FF1493\",r.mediumvioletred=\"#C71585\",r.palevioletred=\"#DB7093\",r.coral=\"#FF7F50\",r.tomato=\"#FF6347\",r.orangered=\"#FF4500\",r.darkorange=\"#FF8C00\",r.orange=\"#FFA500\",r.gold=\"#FFD700\",r.yellow=\"#FFFF00\",r.lightyellow=\"#FFFFE0\",r.lemonchiffon=\"#FFFACD\",r.lightgoldenrodyellow=\"#FAFAD2\",r.papayawhip=\"#FFEFD5\",r.moccasin=\"#FFE4B5\",r.peachpuff=\"#FFDAB9\",r.palegoldenrod=\"#EEE8AA\",r.khaki=\"#F0E68C\",r.darkkhaki=\"#BDB76B\",r.lavender=\"#E6E6FA\",r.thistle=\"#D8BFD8\",r.plum=\"#DDA0DD\",r.violet=\"#EE82EE\",r.orchid=\"#DA70D6\",r.fuchsia=\"#FF00FF\",r.magenta=\"#FF00FF\",r.mediumorchid=\"#BA55D3\",r.mediumpurple=\"#9370DB\",r.blueviolet=\"#8A2BE2\",r.darkviolet=\"#9400D3\",r.darkorchid=\"#9932CC\",r.darkmagenta=\"#8B008B\",r.purple=\"#800080\",r.indigo=\"#4B0082\",r.slateblue=\"#6A5ACD\",r.darkslateblue=\"#483D8B\",r.mediumslateblue=\"#7B68EE\",r.greenyellow=\"#ADFF2F\",r.chartreuse=\"#7FFF00\",r.lawngreen=\"#7CFC00\",r.lime=\"#00FF00\",r.limegreen=\"#32CD32\",r.palegreen=\"#98FB98\",r.lightgreen=\"#90EE90\",r.mediumspringgreen=\"#00FA9A\",r.springgreen=\"#00FF7F\",r.mediumseagreen=\"#3CB371\",r.seagreen=\"#2E8B57\",r.forestgreen=\"#228B22\",r.green=\"#008000\",r.darkgreen=\"#006400\",r.yellowgreen=\"#9ACD32\",r.olivedrab=\"#6B8E23\",r.olive=\"#808000\",r.darkolivegreen=\"#556B2F\",r.mediumaquamarine=\"#66CDAA\",r.darkseagreen=\"#8FBC8F\",r.lightseagreen=\"#20B2AA\",r.darkcyan=\"#008B8B\",r.teal=\"#008080\",r.aqua=\"#00FFFF\",r.cyan=\"#00FFFF\",r.lightcyan=\"#E0FFFF\",r.paleturquoise=\"#AFEEEE\",r.aquamarine=\"#7FFFD4\",r.turquoise=\"#40E0D0\",r.mediumturquoise=\"#48D1CC\",r.darkturquoise=\"#00CED1\",r.cadetblue=\"#5F9EA0\",r.steelblue=\"#4682B4\",r.lightsteelblue=\"#B0C4DE\",r.powderblue=\"#B0E0E6\",r.lightblue=\"#ADD8E6\",r.skyblue=\"#87CEEB\",r.lightskyblue=\"#87CEFA\",r.deepskyblue=\"#00BFFF\",r.dodgerblue=\"#1E90FF\",r.cornflowerblue=\"#6495ED\",r.royalblue=\"#4169E1\",r.blue=\"#0000FF\",r.mediumblue=\"#0000CD\",r.darkblue=\"#00008B\",r.navy=\"#000080\",r.midnightblue=\"#191970\",r.cornsilk=\"#FFF8DC\",r.blanchedalmond=\"#FFEBCD\",r.bisque=\"#FFE4C4\",r.navajowhite=\"#FFDEAD\",r.wheat=\"#F5DEB3\",r.burlywood=\"#DEB887\",r.tan=\"#D2B48C\",r.rosybrown=\"#BC8F8F\",r.sandybrown=\"#F4A460\",r.goldenrod=\"#DAA520\",r.darkgoldenrod=\"#B8860B\",r.peru=\"#CD853F\",r.chocolate=\"#D2691E\",r.saddlebrown=\"#8B4513\",r.sienna=\"#A0522D\",r.brown=\"#A52A2A\",r.maroon=\"#800000\",r.white=\"#FFFFFF\",r.snow=\"#FFFAFA\",r.honeydew=\"#F0FFF0\",r.mintcream=\"#F5FFFA\",r.azure=\"#F0FFFF\",r.aliceblue=\"#F0F8FF\",r.ghostwhite=\"#F8F8FF\",r.whitesmoke=\"#F5F5F5\",r.seashell=\"#FFF5EE\",r.beige=\"#F5F5DC\",r.oldlace=\"#FDF5E6\",r.floralwhite=\"#FFFAF0\",r.ivory=\"#FFFFF0\",r.antiquewhite=\"#FAEBD7\",r.linen=\"#FAF0E6\",r.lavenderblush=\"#FFF0F5\",r.mistyrose=\"#FFE4E1\",r.gainsboro=\"#DCDCDC\",r.lightgray=\"#D3D3D3\",r.lightgrey=\"#D3D3D3\",r.silver=\"#C0C0C0\",r.darkgray=\"#A9A9A9\",r.darkgrey=\"#A9A9A9\",r.gray=\"#808080\",r.grey=\"#808080\",r.dimgray=\"#696969\",r.dimgrey=\"#696969\",r.lightslategray=\"#778899\",r.lightslategrey=\"#778899\",r.slategray=\"#708090\",r.slategrey=\"#708090\",r.darkslategray=\"#2F4F4F\",r.darkslategrey=\"#2F4F4F\",r.black=\"#000000\"},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=t(359),o=t(329),s=t(360),a=t(36),l=t(41);n=function(t){var e;return l.isNumber(t)?(e=function(){switch(!1){case Math.floor(t)!==t:return\"%d\";case!(Math.abs(t)>.1&&Math.abs(t)<1e3):return\"%0.3f\";default:return\"%0.3e\"}}(),i.sprintf(e,t)):\"\"+t},r.replace_placeholders=function(t,e,r,l,u){return null==u&&(u={}),t=t.replace(/(^|[^\\$])\\$(\\w+)/g,function(t){return function(t,e,r){return e+\"@$\"+r}}(this)),t=t.replace(/(^|[^@])@(?:(\\$?\\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(t){return function(t,c,_,h,p){var d,f,y;if(_=null!=h?h:_,y=\"$\"===_[0]?u[_.substring(1)]:null!=(d=e.get_column(_))?d[r]:void 0,f=null,null==y)f=\"???\";else{if(\"safe\"===p)return\"\"+c+y;if(null!=p)if(null!=l&&_ in l)if(\"numeral\"===l[_])f=o.format(y,p);else if(\"datetime\"===l[_])f=s(y,p);else{if(\"printf\"!==l[_])throw new Error(\"Unknown tooltip field formatter type '\"+l[_]+\"'\");f=i.sprintf(p,y)}else f=o.format(y,p);else f=n(y)}return f=\"\"+c+a.escape(f)}}(this))}},function(t,e,r){\"use strict\";function n(t){if(null!=o[t])return o[t];var e=i.span({style:{font:t}},\"Hg\"),r=i.div({style:{display:\"inline-block\",width:\"1px\",height:\"0px\"}}),n=i.div({},e,r);document.body.appendChild(n);try{r.style.verticalAlign=\"baseline\";var s=i.offset(r).top-i.offset(e).top;r.style.verticalAlign=\"bottom\";var a=i.offset(r).top-i.offset(e).top,l={height:a,ascent:s,descent:a-s};return o[t]=l,l}finally{document.body.removeChild(n)}}Object.defineProperty(r,\"__esModule\",{value:!0});var i=t(5),o={};r.get_text_height=n},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i;n=function(t){return t()},i=(\"undefined\"!=typeof window&&null!==window?window.requestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.mozRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.webkitRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.msRequestAnimationFrame:void 0)||n,r.throttle=function(t,e){var r,n,o,s,a,l,u,c;return l=[null,null,null,null],n=l[0],r=l[1],c=l[2],u=l[3],a=0,s=!1,o=function(){return a=new Date,c=null,s=!1,u=t.apply(n,r)},function(){var t,l;return t=new Date,l=e-(t-a),n=this,r=arguments,l<=0&&!s?(clearTimeout(c),s=!0,i(o)):c||s||(c=setTimeout(function(){return i(o)},l)),u}}},function(t,e,r){\"use strict\";function n(t){return t===!0||t===!1||\"[object Boolean]\"===_.call(t)}function i(t){return\"[object Number]\"===_.call(t)}function o(t){return i(t)&&isFinite(t)&&Math.floor(t)===t}function s(t){return\"[object String]\"===_.call(t)}function a(t){return i(t)&&t!==+t}function l(t){return\"[object Function]\"===_.call(t)}function u(t){return Array.isArray(t)}function c(t){var e=typeof t;return\"function\"===e||\"object\"===e&&!!t}\n", " // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n", " // Underscore may be freely distributed under the MIT license.\n", " Object.defineProperty(r,\"__esModule\",{value:!0});var _=Object.prototype.toString;r.isBoolean=n,r.isNumber=i,r.isInteger=o,r.isString=s,r.isStrictNaN=a,r.isFunction=l,r.isArray=u,r.isObject=c},function(t,e,r){\"use strict\";function n(t){var e=getComputedStyle(t).fontSize;return null!=e?parseInt(e,10):null}function i(t){var e=t.offsetParent||document.body;return n(e)||n(t)||16}function o(t){return t.clientHeight}function s(t){var e=-t.deltaY;if(t.target instanceof HTMLElement)switch(t.deltaMode){case t.DOM_DELTA_LINE:e*=i(t.target);break;case t.DOM_DELTA_PAGE:e*=o(t.target)}return e}/*!\n", " * jQuery Mousewheel 3.1.13\n", " *\n", " * Copyright jQuery Foundation and other contributors\n", " * Released under the MIT license\n", " * http://jquery.org/license\n", " */\n", " Object.defineProperty(r,\"__esModule\",{value:!0}),r.getDeltaY=s},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(28);r.scale_highlow=function(t,e,r){var n,i,o,s,a,l;return null==r&&(r=null),o=[t.start,t.end],i=o[0],n=o[1],s=null!=r?r:(n+i)/2,a=i-(i-s)*e,l=n-(n-s)*e,[a,l]},r.get_info=function(t,e){var r,n,i,o,s,a,l,u;l=e[0],u=e[1],n={};for(i in t)s=t[i],o=s.v_invert([l,u]),a=o[0],r=o[1],n[i]={start:a,end:r};return n},r.scale_range=function(t,e,i,o,s){var a,l,u,c,_,h,p,d,f,y;return null==i&&(i=!0),null==o&&(o=!0),null==s&&(s=null),e=n.clamp(e,-.9,.9),a=i?e:0,l=r.scale_highlow(t.h_range,a,null!=s?s.x:void 0),_=l[0],h=l[1],f=r.get_info(t.xscales,[_,h]),c=o?e:0,u=r.scale_highlow(t.v_range,c,null!=s?s.y:void 0),p=u[0],d=u[1],y=r.get_info(t.yscales,[p,d]),{xrs:f,yrs:y,factor:e}}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(19),s=t(36);r.View=function(){function t(t){var e;if(null==t&&(t={}),this.removed=new o.Signal(this,\"removed\"),null==t.model)throw new Error(\"model of a view wasn't configured\");this.model=t.model,this._parent=t.parent,this.id=null!=(e=t.id)?e:s.uniqueId(),this.initialize(t)}return n(t.prototype,o.Signalable),t.getters=function(t){var e,r,n;n=[];for(r in t)e=t[r],n.push(Object.defineProperty(this.prototype,r,{get:e}));return n},t.prototype.initialize=function(t){},t.prototype.remove=function(){return this._parent=void 0,this.disconnect_signals(),this.removed.emit()},t.prototype.toString=function(){return this.model.type+\"View(\"+this.id+\")\"},t.getters({parent:function(){if(void 0!==this._parent)return this._parent;throw new Error(\"parent of a view wasn't configured\")},is_root:function(){return null===this.parent},root:function(){return this.is_root?this:this.parent.root}}),t.prototype.connect_signals=function(){},t.prototype.disconnect_signals=function(){return o.Signal.disconnectReceiver(this)},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(15),a=t(25);n=function(){function t(t,e){var r,n,i,o,s;for(null==e&&(e=\"\"),this.obj=t,this.prefix=e,this.cache={},n=t.properties[e+this.do_attr].spec,this.doit=null!==n.value,s=this.attrs,i=0,o=s.length;i0;)t.push(this.remove_root(this._roots[0]));return t}finally{this._pop_all_models_freeze()}},t.prototype.destructively_move=function(t){var e,r,n,i,o,s,a,l,u;if(t===this)throw new Error(\"Attempted to overwrite a document with itself\");for(t.clear(),u=[],l=this._roots,e=0,n=l.length;e=0)){this._push_all_models_freeze();try{this._roots.push(t)}finally{this._pop_all_models_freeze()}return this._trigger_on_change(new r.RootAddedEvent(this,t,e))}},t.prototype.remove_root=function(t,e){var n;if(n=this._roots.indexOf(t),!(n<0)){this._push_all_models_freeze();try{this._roots.splice(n,1)}finally{this._pop_all_models_freeze()}return this._trigger_on_change(new r.RootRemovedEvent(this,t,e))}},t.prototype.title=function(){return this._title},t.prototype.set_title=function(t,e){if(t!==this._title)return this._title=t,this._trigger_on_change(new r.TitleChangedEvent(this,t,e))},t.prototype.get_model_by_id=function(t){return t in this._all_models?this._all_models[t]:null},t.prototype.get_model_by_name=function(t){return this._all_models_by_name.get_one(t,\"Multiple models are named '\"+t+\"'\")},t.prototype.on_change=function(t){if(!(s.call(this._callbacks,t)>=0))return this._callbacks.push(t)},t.prototype.remove_on_change=function(t){var e;if(e=this._callbacks.indexOf(t),e>=0)return this._callbacks.splice(e,1)},t.prototype._trigger_on_change=function(t){var e,r,n,i,o;for(i=this._callbacks,o=[],r=0,n=i.length;r0||f.difference(k,o).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");T={},n=[],g=r._all_models;for(a in g)p=g[a],a in i&&(S=t._events_to_sync_objects(i[a],x[a],r,T),n=n.concat(S));return{events:n,references:t._references_json(y.values(T),l=!1)}},t.prototype.to_json_string=function(t){return null==t&&(t=!0),JSON.stringify(this.to_json(t))},t.prototype.to_json=function(e){var r,n,i,o,s,a;for(null==e&&(e=!0),s=[],o=this._roots,r=0,n=o.length;r0&&y.set_log_level(r.bokehLogLevel),null!=r.bokehDocId&&r.bokehDocId.length>0&&(e.docid=r.bokehDocId),null!=r.bokehModelId&&r.bokehModelId.length>0&&(e.modelid=r.bokehModelId),null!=r.bokehSessionId&&r.bokehSessionId.length>0&&(e.sessionid=r.bokehSessionId),y.logger.info(\"Will inject Bokeh script tag with params \"+JSON.stringify(e))},r.embed_items=function(t,e,n,i){var o,a,l,u,d,f,g,b,w,x,k,M,S,T,O;M=\"ws:\",\"https:\"===window.location.protocol&&(M=\"wss:\"),x=null!=i?new URL(i):window.location,null!=n?\"/\"===n&&(n=\"\"):n=x.pathname.replace(/\\/+$/,\"\"),O=M+\"//\"+x.host+n+\"/ws\",y.logger.debug(\"embed: computed ws url: \"+O),u={};for(l in t)u[l]=m.Document.from_json(t[l]);for(S=[],g=0,w=e.length;g\");if(\"SCRIPT\"===d.tagName&&(p(d,b),a=v.div({\"class\":r.BOKEH_ROOT}),v.replaceWith(d,a),o=v.div(),a.appendChild(o),d=o),T=null!=b.use_for_title&&b.use_for_title,k=null,null!=b.modelid)if(null!=b.docid)h(d,b.modelid,u[b.docid]);else{if(null==b.sessionid)throw new Error(\"Error rendering Bokeh model \"+b.modelid+\" to element \"+f+\": no document ID or session ID specified\");k=_(d,O,b.modelid,b.sessionid)}else if(null!=b.docid)r.add_document_static(d,u[b.docid],T);else{if(null==b.sessionid)throw new Error(\"Error rendering Bokeh document to element \"+f+\": no document ID or session ID specified\");k=c(d,O,b.sessionid,T)}null!==k?S.push(k.then(function(t){return console.log(\"Bokeh items were rendered successfully\")},function(t){return console.log(\"Error rendering Bokeh items \",t)})):S.push(void 0)}return S}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),t(241);var n=t(245);r.version=n.version;var i=t(47);r.embed=i;var o=t(13);r.logger=o.logger,r.set_log_level=o.set_log_level;var s=t(18);r.settings=s.settings;var a=t(0);r.Models=a.Models,r.index=a.index;var l=t(46);r.documents=l.documents;var u=t(244);r.safely=u.safely},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(8),s=t(14),a=t(41),l=t(29),u=t(13);r.Model=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Model\",e.define({tags:[s.Array,[]],name:[s.String],js_property_callbacks:[s.Any,{}],js_event_callbacks:[s.Any,{}],subscribed_events:[s.Array,[]]}),e.prototype.connect_signals=function(){var t,r,n,i,o,s,a,l,u;e.__super__.connect_signals.call(this),a=this.js_property_callbacks;for(i in a)for(r=a[i],l=i.split(\":\"),i=l[0],t=null!=(u=l[1])?u:null,o=0,s=r.length;on;e=0<=n?++r:--r)this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(this.start[0][e],this.start[1][e]),t.lineTo(this.end[0][e],this.end[1][e]),i.push(t.stroke());return i}},e.prototype._arrow_head=function(t,e,r,n,i){var o,s,a,l,c;for(c=[],s=a=0,l=this._x_start.length;0<=l?al;s=0<=l?++a:--a)o=Math.PI/2+u.atan2([n[0][s],n[1][s]],[i[0][s],i[1][s]]),t.save(),t.translate(i[0][s],i[1][s]),t.rotate(o),\"render\"===e?r.render(t):\"clip\"===e&&r.clip(t),c.push(t.restore());return c},e}(o.AnnotationView),r.Arrow=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.ArrowView,e.prototype.type=\"Arrow\",e.mixins([\"line\"]),e.define({x_start:[l.NumberSpec],y_start:[l.NumberSpec],start_units:[l.String,\"data\"],start:[l.Instance,null],x_end:[l.NumberSpec],y_end:[l.NumberSpec],end_units:[l.String,\"data\"],end:[l.Instance,new s.OpenHead({})],source:[l.Instance],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(45),a=t(14);r.ArrowHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ArrowHead\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.visuals=new s.Visuals(this)},e.prototype.render=function(t,e){return null},e.prototype.clip=function(t,e){return null},e}(o.Annotation),r.OpenHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"OpenHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(0,0),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.stroke()},e.mixins([\"line\"]),e.define({size:[a.Number,25]}),e}(r.ArrowHead),r.NormalHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"NormalHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,e),this._normal(t,e),t.fill()),this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),this._normal(t,e),t.stroke()},e.prototype._normal=function(t,e){return t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.closePath()},e.mixins([\"line\",\"fill\"]),e.define({size:[a.Number,25]}),e.override({fill_color:\"black\"}),e}(r.ArrowHead),r.VeeHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"VeeHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(0,.5*this.size),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,e),this._vee(t,e),t.fill()),this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),this._vee(t,e),t.stroke()},e.prototype._vee=function(t,e){return t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.lineTo(0,.5*this.size),t.closePath()},e.mixins([\"line\",\"fill\"]),e.define({size:[a.Number,25]}),e.override({fill_color:\"black\"}),e}(r.ArrowHead),r.TeeHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"TeeHead\",e.prototype.render=function(t,e){if(this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(.5*this.size,0),t.lineTo(-.5*this.size,0),t.stroke()},e.mixins([\"line\"]),e.define({size:[a.Number,25]}),e}(r.ArrowHead)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(170),a=t(14);r.BandView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,n,i,o,s,a,l,u,c,_;return c=this.plot_view.frame.xscales[this.model.x_range_name],_=this.plot_view.frame.yscales[this.model.y_range_name],l=\"height\"===this.model.dimension?_:c,o=\"height\"===this.model.dimension?c:_,r=\"data\"===this.model.lower.units?l.v_compute(this._lower):this._lower,i=\"data\"===this.model.upper.units?l.v_compute(this._upper):this._upper,t=\"data\"===this.model.base.units?o.v_compute(this._base):this._base,u=this.model._normals(),s=u[0],a=u[1],e=[r,t],n=[i,t],this._lower_sx=this.plot_model.canvas.v_vx_to_sx(e[s]),this._lower_sy=this.plot_model.canvas.v_vy_to_sy(e[a]),this._upper_sx=this.plot_model.canvas.v_vx_to_sx(n[s]),this._upper_sy=this.plot_model.canvas.v_vy_to_sy(n[a])},e.prototype.render=function(){var t,e,r,n,i,o,s,a,l,u;if(this.model.visible){for(this._map_data(),t=this.plot_view.canvas_view.ctx,t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]),e=r=0,s=this._lower_sx.length;0<=s?rs;e=0<=s?++r:--r)t.lineTo(this._lower_sx[e],this._lower_sy[e]);for(e=n=a=this._upper_sx.length-1;a<=0?n<=0:n>=0;e=a<=0?++n:--n)t.lineTo(this._upper_sx[e],this._upper_sy[e]);for(t.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(t),t.fill()),t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]),e=i=0,l=this._lower_sx.length;0<=l?il;e=0<=l?++i:--i)t.lineTo(this._lower_sx[e],this._lower_sy[e]);for(this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),t.beginPath(),t.moveTo(this._upper_sx[0],this._upper_sy[0]),e=o=0,u=this._upper_sx.length;0<=u?ou;e=0<=u?++o:--o)t.lineTo(this._upper_sx[e],this._upper_sy[e]);return this.visuals.line.doit?(this.visuals.line.set_value(t),t.stroke()):void 0}},e}(o.AnnotationView),r.Band=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.BandView,e.prototype.type=\"Band\",e.mixins([\"line\",\"fill\"]),e.define({lower:[a.DistanceSpec],upper:[a.DistanceSpec],base:[a.DistanceSpec],dimension:[a.Dimension,\"height\"],source:[a.Instance,function(){return new s.ColumnDataSource}],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype._normals=function(){var t,e,r,n;return\"height\"===this.dimension?(r=[1,0],t=r[0],e=r[1]):(n=[0,1],t=n[0],e=n[1]),[t,e]},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(19),a=t(5),l=t(14),u=t(41);r.BoxAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.classList.add(\"bk-shading\"),a.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?(this.connect(this.model.change,function(){return this.render()}),this.connect(this.model.data_update,function(){return this.render()})):(this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.data_update,function(t){return function(){return t.plot_view.request_render()}}(this)))},e.prototype.render=function(){var t,e,r,n,i,o,s,l;if(this.model.visible||\"css\"!==this.model.render_mode||a.hide(this.el),this.model.visible)return null==this.model.left&&null==this.model.right&&null==this.model.top&&null==this.model.bottom?(a.hide(this.el),null):(e=this.plot_model.frame,t=this.plot_model.canvas,s=this.plot_view.frame.xscales[this.model.x_range_name],l=this.plot_view.frame.yscales[this.model.y_range_name],n=t.vx_to_sx(this._calc_dim(this.model.left,this.model.left_units,s,e.h_range.start)),i=t.vx_to_sx(this._calc_dim(this.model.right,this.model.right_units,s,e.h_range.end)),r=t.vy_to_sy(this._calc_dim(this.model.bottom,this.model.bottom_units,l,e.v_range.start)),o=t.vy_to_sy(this._calc_dim(this.model.top,this.model.top_units,l,e.v_range.end)),\"css\"===this.model.render_mode?this._css_box(n,i,r,o):this._canvas_box(n,i,r,o))},e.prototype._css_box=function(t,e,r,n){var i,o,s;return s=Math.abs(e-t),o=Math.abs(r-n),this.el.style.left=t+\"px\",this.el.style.width=s+\"px\",this.el.style.top=n+\"px\",this.el.style.height=o+\"px\",this.el.style.borderWidth=this.model.line_width.value+\"px\",this.el.style.borderColor=this.model.line_color.value,this.el.style.backgroundColor=this.model.fill_color.value,this.el.style.opacity=this.model.fill_alpha.value,i=this.model.line_dash,u.isArray(i)&&(i=i.length<2?\"solid\":\"dashed\"),u.isString(i)&&(this.el.style.borderStyle=i),a.show(this.el)},e.prototype._canvas_box=function(t,e,r,n){var i;return i=this.plot_view.canvas_view.ctx,i.save(),i.beginPath(),i.rect(t,n,e-t,r-n),this.visuals.fill.set_value(i),i.fill(),this.visuals.line.set_value(i),i.stroke(),i.restore()},e.prototype._calc_dim=function(t,e,r,n){var i;return i=null!=t?\"data\"===e?r.compute(t):t:n},e}(o.AnnotationView),r.BoxAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.BoxAnnotationView,e.prototype.type=\"BoxAnnotation\",e.mixins([\"line\",\"fill\"]),e.define({render_mode:[l.RenderMode,\"canvas\"],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"],top:[l.Number,null],top_units:[l.SpatialUnits,\"data\"],bottom:[l.Number,null],bottom_units:[l.SpatialUnits,\"data\"],left:[l.Number,null],left_units:[l.SpatialUnits,\"data\"],right:[l.Number,null],right_units:[l.SpatialUnits,\"data\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.data_update=new s.Signal(this,\"data_update\")},e.prototype.update=function(t){var e,r,n,i;return r=t.left,n=t.right,i=t.top,e=t.bottom,this.setv({left:r,right:n,top:i,bottom:e},{silent:!0}),this.data_update.emit()},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(50),u=t(177),c=t(89),_=t(143),h=t(165),p=t(166),d=t(157),f=t(14),y=t(39),m=t(21),v=t(29),g=t(41);o=25,i=.3,n=.8,r.ColorBarView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._set_canvas_image()},e.prototype.connect_signals=function(){if(e.__super__.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.ticker.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.formatter.change,function(t){return function(){return t.plot_view.request_render()}}(this)),null!=this.model.color_mapper)return this.connect(this.model.color_mapper.change,function(){return this._set_canvas_image(),this.plot_view.request_render()})},e.prototype._get_panel_offset=function(){var t,e;return t=this.model.panel._left.value,e=this.model.panel._top.value,{x:t,y:-e}},e.prototype._get_size=function(){var t,e;if(null!=this.model.color_mapper)return t=this.compute_legend_dimensions(),e=this.model.panel.side,\"above\"===e||\"below\"===e?t.height:\"left\"===e||\"right\"===e?t.width:void 0},e.prototype._set_canvas_image=function(){var t,e,r,n,i,o,s,a,l,u,c,h,p;if(null!=this.model.color_mapper){switch(a=this.model.color_mapper.palette,\"vertical\"===this.model.orientation&&(a=a.slice(0).reverse()),this.model.orientation){case\"vertical\":l=[1,a.length],p=l[0],i=l[1];break;case\"horizontal\":u=[a.length,1],p=u[0],i=u[1]}return r=document.createElement(\"canvas\"),c=[p,i],r.width=c[0],r.height=c[1],o=r.getContext(\"2d\"),s=o.getImageData(0,0,p,i),n=new _.LinearColorMapper({palette:a}),t=n.v_map_screen(function(){h=[];for(var t=0,e=a.length;0<=e?te;0<=e?t++:t--)h.push(t);return h}.apply(this)),e=new Uint8Array(t),s.data.set(e),o.putImageData(s,0,0),this.image=r}},e.prototype.compute_legend_dimensions=function(){var t,e,r,n,i,o,s,a,l,u;switch(t=this.model._computed_image_dimensions(),a=[t.height,t.width],e=a[0],r=a[1],n=this._get_label_extent(),u=this.model._title_extent(),l=this.model._tick_extent(),s=this.model.padding,this.model.orientation){case\"vertical\":i=e+u+2*s,o=r+l+n+2*s;break;case\"horizontal\":i=e+u+l+n+2*s,o=r+2*s}return{height:i,width:o}},e.prototype.compute_legend_location=function(){var t,e,r,n,i,o,s,a,l,u,c,_;if(e=this.compute_legend_dimensions(),s=[e.height,e.width],r=s[0],i=s[1],n=this.model.margin,o=this.model.location,t=this.plot_view.frame.h_range,u=this.plot_view.frame.v_range,g.isString(o))switch(o){case\"top_left\":c=t.start+n,_=u.end-n;break;case\"top_center\":c=(t.end+t.start)/2-i/2,_=u.end-n;break;case\"top_right\":c=t.end-n-i,_=u.end-n;break;case\"center_right\":c=t.end-n-i,_=(u.end+u.start)/2+r/2;break;case\"bottom_right\":c=t.end-n-i,_=u.start+n+r;break;case\"bottom_center\":c=(t.end+t.start)/2-i/2,_=u.start+n+r;break;case\"bottom_left\":c=t.start+n,_=u.start+n+r;break;case\"center_left\":c=t.start+n,_=(u.end+u.start)/2+r/2;break;case\"center\":c=(t.end+t.start)/2-i/2,_=(u.end+u.start)/2+r/2}else g.isArray(o)&&2===o.length&&(c=o[0],_=o[1]);return a=this.plot_view.canvas.vx_to_sx(c),l=this.plot_view.canvas.vy_to_sy(_),{sx:a,sy:l}},e.prototype.render=function(){var t,e,r,n,i,o;if(this.model.visible&&null!=this.model.color_mapper)return t=this.plot_view.canvas_view.ctx,t.save(),null!=this.model.panel&&(i=this._get_panel_offset(),t.translate(i.x,i.y),e=this._get_frame_offset(),t.translate(e.x,e.y)),n=this.compute_legend_location(),t.translate(n.sx,n.sy),this._draw_bbox(t),r=this._get_image_offset(),t.translate(r.x,r.y),this._draw_image(t),null!=this.model.color_mapper.low&&null!=this.model.color_mapper.high&&(o=this.model.tick_info(),this._draw_major_ticks(t,o),this._draw_minor_ticks(t,o),this._draw_major_labels(t,o)),this.model.title&&this._draw_title(t),t.restore()},e.prototype._draw_bbox=function(t){var e;return e=this.compute_legend_dimensions(),t.save(),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fillRect(0,0,e.width,e.height)),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.strokeRect(0,0,e.width,e.height)),t.restore()},e.prototype._draw_image=function(t){var e;return e=this.model._computed_image_dimensions(),t.save(),t.setImageSmoothingEnabled(!1),t.globalAlpha=this.model.scale_alpha,t.drawImage(this.image,0,0,e.width,e.height),this.visuals.bar_line.doit&&(this.visuals.bar_line.set_value(t),t.strokeRect(0,0,e.width,e.height)),t.restore()},e.prototype._draw_major_ticks=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y;if(this.visuals.major_tick_line.doit){for(a=this.model._normals(),o=a[0],s=a[1],n=this.model._computed_image_dimensions(),l=[n.width*o,n.height*s],f=l[0],y=l[1],u=e.coords.major,_=u[0],h=u[1],p=this.model.major_tick_in,d=this.model.major_tick_out,t.save(),t.translate(f,y),this.visuals.major_tick_line.set_value(t),r=i=0,c=_.length;0<=c?ic;r=0<=c?++i:--i)t.beginPath(),t.moveTo(Math.round(_[r]+o*d),Math.round(h[r]+s*d)),t.lineTo(Math.round(_[r]-o*p),Math.round(h[r]-s*p)),t.stroke();return t.restore()}},e.prototype._draw_minor_ticks=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y;if(this.visuals.minor_tick_line.doit){for(a=this.model._normals(),o=a[0],s=a[1],n=this.model._computed_image_dimensions(),l=[n.width*o,n.height*s],f=l[0],y=l[1],u=e.coords.minor,_=u[0],h=u[1],p=this.model.minor_tick_in,d=this.model.minor_tick_out,t.save(),t.translate(f,y),this.visuals.minor_tick_line.set_value(t),r=i=0,c=_.length;0<=c?ic;r=0<=c?++i:--i)t.beginPath(),t.moveTo(Math.round(_[r]+o*d),Math.round(h[r]+s*d)),t.lineTo(Math.round(_[r]-o*p),Math.round(h[r]-s*p)),t.stroke();return t.restore()}},e.prototype._draw_major_labels=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g;if(this.visuals.major_label_text.doit){for(l=this.model._normals(),s=l[0],a=l[1],i=this.model._computed_image_dimensions(),u=[i.width*s,i.height*a],y=u[0],v=u[1],p=this.model.label_standoff+this.model._tick_extent(),c=[p*s,p*a],m=c[0],g=c[1],_=e.coords.major,d=_[0],f=_[1],r=e.labels.major,this.visuals.major_label_text.set_value(t),t.save(),t.translate(y+m,v+g),n=o=0,h=d.length;0<=h?oh;n=0<=h?++o:--o)t.fillText(r[n],Math.round(d[n]+s*this.model.label_standoff),Math.round(f[n]+a*this.model.label_standoff));return t.restore()}},e.prototype._draw_title=function(t){if(this.visuals.title_text.doit)return t.save(),this.visuals.title_text.set_value(t),t.fillText(this.model.title,0,-this.model.title_standoff),t.restore()},e.prototype._get_label_extent=function(){var t,e,r,n;if(n=this.model.tick_info().labels.major,null==this.model.color_mapper.low||null==this.model.color_mapper.high||v.isEmpty(n))r=0;else{switch(t=this.plot_view.canvas_view.ctx,t.save(),this.visuals.major_label_text.set_value(t),this.model.orientation){case\"vertical\":r=m.max(function(){var r,i,o;for(o=[],r=0,i=n.length;rs;n=0<=s?++i:--i)e[n]in this.major_label_overrides&&(r[n]=this.major_label_overrides[e[n]]);return r},e.prototype.tick_info=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w;switch(o=this._computed_image_dimensions(),this.orientation){case\"vertical\":g=o.height;break;case\"horizontal\":g=o.width}for(v=this._tick_coordinate_scale(g),d=this._normals(),n=d[0],s=d[1],f=[this.color_mapper.low,this.color_mapper.high],b=f[0],r=f[1],w=this.ticker.get_ticks(b,r,null,null,this.ticker.desired_num_ticks),e={major:[[],[]],minor:[[],[]]},_=w.major,p=w.minor,c=e.major,h=e.minor,i=a=0,y=_.length;0<=y?ay;i=0<=y?++a:--a)_[i]r||(c[n].push(_[i]),c[s].push(0));for(i=l=0,m=p.length;0<=m?lm;i=0<=m?++l:--l)p[i]r||(h[n].push(p[i]),h[s].push(0));return u={major:this._format_major_labels(c[n].slice(0),_)},c[n]=v.v_compute(c[n]),h[n]=v.v_compute(h[n]),\"vertical\"===this.orientation&&(c[n]=new Float64Array(function(){var e,r,i,o;for(i=c[n],o=[],r=0,e=i.length;ri;r=0<=i?++n:--n)this.title_div=a.div({\"class\":\"bk-annotation-child\",style:{display:\"none\"}}),o.push(this.el.appendChild(this.title_div));return o}},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?(this.connect(this.model.change,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source),this.render()})):(this.connect(this.model.change,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source),this.plot_view.request_render()}))},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t)},e.prototype._map_data=function(){var t,e,r,n,i,o;return i=this.plot_view.frame.xscales[this.model.x_range_name],o=this.plot_view.frame.yscales[this.model.y_range_name],r=\"data\"===this.model.x_units?i.v_compute(this._x):this._x.slice(0),t=this.canvas.v_vx_to_sx(r),n=\"data\"===this.model.y_units?o.v_compute(this._y):this._y.slice(0),e=this.canvas.v_vy_to_sy(n),[t,e]},e.prototype.render=function(){var t,e,r,n,i,o,s,l,u,c,_;if(this.model.visible||\"css\"!==this.model.render_mode||a.hide(this.el),this.model.visible){if(t=this.plot_view.canvas_view.ctx,i=this._map_data(),c=i[0],_=i[1],\"canvas\"===this.model.render_mode){for(l=[],e=r=0,o=this._text.length;0<=o?ro;e=0<=o?++r:--r)l.push(this._v_canvas_text(t,e,this._text[e],c[e]+this._x_offset[e],_[e]-this._y_offset[e],this._angle[e]));return l}for(u=[],e=n=0,s=this._text.length;0<=s?ns;e=0<=s?++n:--n)u.push(this._v_css_text(t,e,this._text[e],c[e]+this._x_offset[e],_[e]-this._y_offset[e],this._angle[e]));return u}},e.prototype._get_size=function(){var t,e,r,n;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),r=this.model.panel.side,\"above\"===r||\"below\"===r?e=t.measureText(this._text[0]).ascent:\"left\"===r||\"right\"===r?n=t.measureText(this._text[0]).width:void 0},e.prototype._v_canvas_text=function(t,e,r,n,i,o){var s;return this.visuals.text.set_vectorize(t,e),s=this._calculate_bounding_box_dimensions(t,r),t.save(),t.beginPath(),t.translate(n,i),t.rotate(o),t.rect(s[0],s[1],s[2],s[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_vectorize(t,e),t.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_vectorize(t,e),t.stroke()),this.visuals.text.doit&&(this.visuals.text.set_vectorize(t,e),t.fillText(r,0,0)),t.restore()},e.prototype._v_css_text=function(t,e,r,n,i,o){var s,l,c,_;return l=this.el.childNodes[e],l.textContent=r,this.visuals.text.set_vectorize(t,e),s=this._calculate_bounding_box_dimensions(t,r),c=this.visuals.border_line.line_dash.value(),u.isArray(c)&&(_=c.length<2?\"solid\":\"dashed\"),u.isString(c)&&(_=c),this.visuals.border_line.set_vectorize(t,e),this.visuals.background_fill.set_vectorize(t,e),l.style.position=\"absolute\",l.style.left=n+s[0]+\"px\",l.style.top=i+s[1]+\"px\",l.style.color=\"\"+this.visuals.text.text_color.value(),l.style.opacity=\"\"+this.visuals.text.text_alpha.value(),l.style.font=\"\"+this.visuals.text.font_value(),l.style.lineHeight=\"normal\",o&&(l.style.transform=\"rotate(\"+o+\"rad)\"),this.visuals.background_fill.doit&&(l.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(l.style.borderStyle=\"\"+_,l.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",l.style.borderColor=\"\"+this.visuals.border_line.color_value()),a.show(l)},e}(o.TextAnnotationView),r.LabelSet=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.LabelSetView,e.prototype.type=\"Label\",e.mixins([\"text\",\"line:border_\",\"fill:background_\"]),e.define({x:[l.NumberSpec],y:[l.NumberSpec],x_units:[l.SpatialUnits,\"data\"],y_units:[l.SpatialUnits,\"data\"],text:[l.StringSpec,{field:\"text\"}],angle:[l.AngleSpec,0],x_offset:[l.NumberSpec,{value:0}],y_offset:[l.NumberSpec,{value:0}],source:[l.Instance,function(){return new s.ColumnDataSource;\n", " }],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"],render_mode:[l.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e}(o.TextAnnotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(14),a=t(39),l=t(22),u=t(21),c=t(29),_=t(41);r.LegendView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.getters({legend_padding:function(){return null!=this.visuals.border_line.line_color.value()?this.model.padding:0}}),e.prototype.compute_legend_bbox=function(){var t,e,r,n,i,o,s,l,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P;for(d=this.model.get_legend_names(),e=this.model.glyph_height,r=this.model.glyph_width,o=this.model.label_height,l=this.model.label_width,this.max_label_height=u.max([a.get_text_height(this.visuals.label_text.font_value()).height,o,e]),t=this.plot_view.canvas_view.ctx,t.save(),this.visuals.label_text.set_value(t),this.text_widths={},i=0,v=d.length;ii;r=0<=i?++n:--n)\"screen\"===this.model.xs_units&&(a=u[r]),\"screen\"===this.model.ys_units&&(l=c[r]),o=e.vx_to_sx(a),s=e.vy_to_sy(l),0===r?(t.beginPath(),t.moveTo(o,s)):t.lineTo(o,s);return t.closePath(),this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),this.visuals.fill.doit?(this.visuals.fill.set_value(t),t.fill()):void 0}},e}(o.AnnotationView),r.PolyAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.PolyAnnotationView,e.prototype.type=\"PolyAnnotation\",e.mixins([\"line\",\"fill\"]),e.define({xs:[a.Array,[]],xs_units:[a.SpatialUnits,\"data\"],ys:[a.Array,[]],ys_units:[a.SpatialUnits,\"data\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.data_update=new s.Signal(this,\"data_update\")},e.prototype.update=function(t){var e,r;return e=t.xs,r=t.ys,this.setv({xs:e,ys:r},{silent:!0}),this.data_update.emit()},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(5),a=t(14);r.SpanView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.position=\"absolute\",s.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.model.for_hover?this.connect(this.model.properties.computed_location.change,function(){return this._draw_span()}):\"canvas\"===this.model.render_mode?(this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.properties.location.change,function(t){return function(){return t.plot_view.request_render()}}(this))):(this.connect(this.model.change,function(){return this.render()}),this.connect(this.model.properties.location.change,function(){return this._draw_span()}))},e.prototype.render=function(){if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible)return this._draw_span()},e.prototype._draw_span=function(){var t,e,r,n,i,o,a,l,u,c;return i=this.model.for_hover?this.model.computed_location:this.model.location,null==i?void s.hide(this.el):(r=this.plot_model.frame,t=this.plot_model.canvas,u=this.plot_view.frame.xscales[this.model.x_range_name],c=this.plot_view.frame.yscales[this.model.y_range_name],\"width\"===this.model.dimension?(a=t.vy_to_sy(this._calc_dim(i,c)),o=t.vx_to_sx(r._left.value),l=r._width.value,n=this.model.properties.line_width.value()):(a=t.vy_to_sy(r._top.value),o=t.vx_to_sx(this._calc_dim(i,u)),l=this.model.properties.line_width.value(),n=r._height.value),\"css\"===this.model.render_mode?(this.el.style.top=a+\"px\",this.el.style.left=o+\"px\",this.el.style.width=l+\"px\",this.el.style.height=n+\"px\",this.el.style.zIndex=1e3,this.el.style.backgroundColor=this.model.properties.line_color.value(),this.el.style.opacity=this.model.properties.line_alpha.value(),s.show(this.el)):\"canvas\"===this.model.render_mode?(e=this.plot_view.canvas_view.ctx,e.save(),e.beginPath(),this.visuals.line.set_value(e),e.moveTo(o,a),\"width\"===this.model.dimension?e.lineTo(o+l,a):e.lineTo(o,a+n),e.stroke(),e.restore()):void 0)},e.prototype._calc_dim=function(t,e){var r;return r=\"data\"===this.model.location_units?e.compute(t):t},e}(o.AnnotationView),r.Span=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.SpanView,e.prototype.type=\"Span\",e.mixins([\"line\"]),e.define({render_mode:[a.RenderMode,\"canvas\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],location:[a.Number,null],location_units:[a.SpatialUnits,\"data\"],dimension:[a.Dimension,\"width\"]}),e.override({line_color:\"black\"}),e.internal({for_hover:[a.Boolean,!1],computed_location:[a.Number,null]}),e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(5),a=t(41),l=t(39);r.TextAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),this.canvas=this.plot_model.canvas,this.frame=this.plot_model.frame,\"css\"===this.model.render_mode)return this.el.classList.add(\"bk-annotation\"),this.plot_view.canvas_overlays.appendChild(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?this.connect(this.model.change,function(){return this.render()}):this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype._calculate_text_dimensions=function(t,e){var r,n;return n=t.measureText(e).width,r=l.get_text_height(this.visuals.text.font_value()).height,[n,r]},e.prototype._calculate_bounding_box_dimensions=function(t,e){var r,n,i,o,s;switch(n=this._calculate_text_dimensions(t,e),i=n[0],r=n[1],t.textAlign){case\"left\":o=0;break;case\"center\":o=-i/2;break;case\"right\":o=-i}switch(t.textBaseline){case\"top\":s=0;break;case\"middle\":s=-.5*r;break;case\"bottom\":s=-1*r;break;case\"alphabetic\":s=-.8*r;break;case\"hanging\":s=-.17*r;break;case\"ideographic\":s=-.83*r}return[o,s,i,r]},e.prototype._get_size=function(){var t;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),t.measureText(this.model.text).ascent},e.prototype.render=function(){return null},e.prototype._canvas_text=function(t,e,r,n,i){var o;return this.visuals.text.set_value(t),o=this._calculate_bounding_box_dimensions(t,e),t.save(),t.beginPath(),t.translate(r,n),i&&t.rotate(i),t.rect(o[0],o[1],o[2],o[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.stroke()),this.visuals.text.doit&&(this.visuals.text.set_value(t),t.fillText(e,0,0)),t.restore()},e.prototype._css_text=function(t,e,r,n,i){var o,l,u;return s.hide(this.el),this.visuals.text.set_value(t),o=this._calculate_bounding_box_dimensions(t,e),l=this.visuals.border_line.line_dash.value(),a.isArray(l)&&(u=l.length<2?\"solid\":\"dashed\"),a.isString(l)&&(u=l),this.visuals.border_line.set_value(t),this.visuals.background_fill.set_value(t),this.el.style.position=\"absolute\",this.el.style.left=r+o[0]+\"px\",this.el.style.top=n+o[1]+\"px\",this.el.style.color=\"\"+this.visuals.text.text_color.value(),this.el.style.opacity=\"\"+this.visuals.text.text_alpha.value(),this.el.style.font=\"\"+this.visuals.text.font_value(),this.el.style.lineHeight=\"normal\",i&&(this.el.style.transform=\"rotate(\"+i+\"rad)\"),this.visuals.background_fill.doit&&(this.el.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(this.el.style.borderStyle=\"\"+u,this.el.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",this.el.style.borderColor=\"\"+this.visuals.border_line.color_value()),this.el.textContent=e,s.show(this.el)},e}(o.AnnotationView),r.TextAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"TextAnnotation\",e.prototype.default_view=r.TextAnnotationView,e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(63),s=t(5),a=t(14),l=t(45);r.TitleView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this.visuals.text=new l.Text(this.model),r=this.plot_view.canvas_view.ctx,r.save(),this.model.panel.apply_label_text_heuristics(r,\"justified\"),this.model.text_baseline=r.textBaseline,this.model.text_align=this.model.align,r.restore()},e.prototype._get_computed_location=function(){var t,e,r,n,i,o,s;switch(e=this._calculate_text_dimensions(this.plot_view.canvas_view.ctx,this.text),s=e[0],t=e[1],this.model.panel.side){case\"left\":i=this.model.panel._left.value,o=this._get_text_location(this.model.align,this.frame.v_range)+this.model.offset;break;case\"right\":i=this.model.panel._right.value,o=this.canvas._height.value-this._get_text_location(this.model.align,this.frame.v_range)-this.model.offset;break;case\"above\":i=this._get_text_location(this.model.align,this.frame.h_range)+this.model.offset,o=this.model.panel._top.value-10;break;case\"below\":i=this._get_text_location(this.model.align,this.frame.h_range)+this.model.offset,o=this.model.panel._bottom.value}return r=this.canvas.vx_to_sx(i),n=this.canvas.vy_to_sy(o),[r,n]},e.prototype._get_text_location=function(t,e){var r;switch(t){case\"left\":r=e.start;break;case\"center\":r=(e.end+e.start)/2;break;case\"right\":r=e.end}return r},e.prototype.render=function(){var t,e,r,n,i;if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible&&(t=this.model.panel.get_label_angle_heuristic(\"parallel\"),r=this._get_computed_location(),n=r[0],i=r[1],e=this.plot_view.canvas_view.ctx,\"\"!==this.model.text&&null!==this.model.text))return\"canvas\"===this.model.render_mode?this._canvas_text(e,this.model.text,n,i,t):this._css_text(e,this.model.text,n,i,t)},e.prototype._get_size=function(){var t,e;return e=this.model.text,\"\"===e||null===e?0:(t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),t.measureText(e).ascent+10)},e}(o.TextAnnotationView),r.Title=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.TitleView,e.prototype.type=\"Title\",e.mixins([\"line:border_\",\"fill:background_\"]),e.define({text:[a.String],text_font:[a.Font,\"helvetica\"],text_font_size:[a.FontSizeSpec,\"10pt\"],text_font_style:[a.FontStyle,\"bold\"],text_color:[a.ColorSpec,\"#444444\"],text_alpha:[a.NumberSpec,1],align:[a.TextAlign,\"left\"],offset:[a.Number,0],render_mode:[a.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e.internal({text_align:[a.TextAlign,\"left\"],text_baseline:[a.TextBaseline,\"bottom\"]}),e}(o.TextAnnotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(5),a=t(14);r.TooltipView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-tooltip\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.zIndex=1010,s.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.data.change,function(){return this._draw_tips()})},e.prototype.render=function(){if(this.model.visible)return this._draw_tips()},e.prototype._draw_tips=function(){var t,e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v;if(i=this.model.data,s.empty(this.el),s.hide(this.el),this.model.custom?this.el.classList.add(\"bk-tooltip-custom\"):this.el.classList.remove(\"bk-tooltip-custom\"),0!==i.length){for(a=0,u=i.length;a0?(this.el.style.top=d+\"px\",this.el.style.left=l+\"px\"):s.hide(this.el)}},e}(o.AnnotationView),r.Tooltip=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.TooltipView,e.prototype.type=\"Tooltip\",e.define({attachment:[a.String,\"horizontal\"],inner_only:[a.Bool,!0],show_arrow:[a.Bool,!0]}),e.override({level:\"overlay\"}),e.internal({data:[a.Any,[]],custom:[a.Any]}),e.prototype.clear=function(){return this.data=[]},e.prototype.add=function(t,e,r){var n;return n=this.data,n.push([t,e,r]),this.data=n,this.properties.data.change.emit()},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(170),a=t(52),l=t(14);r.WhiskerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,n,i,o,s,a,l,u,c,_;return c=this.plot_view.frame.xscales[this.model.x_range_name],_=this.plot_view.frame.yscales[this.model.y_range_name],l=\"height\"===this.model.dimension?_:c,o=\"height\"===this.model.dimension?c:_,r=\"data\"===this.model.lower.units?l.v_compute(this._lower):this._lower,i=\"data\"===this.model.upper.units?l.v_compute(this._upper):this._upper,t=\"data\"===this.model.base.units?o.v_compute(this._base):this._base,u=this.model._normals(),s=u[0],a=u[1],e=[r,t],n=[i,t],this._lower_sx=this.plot_model.canvas.v_vx_to_sx(e[s]),this._lower_sy=this.plot_model.canvas.v_vy_to_sy(e[a]),this._upper_sx=this.plot_model.canvas.v_vx_to_sx(n[s]),this._upper_sy=this.plot_model.canvas.v_vy_to_sy(n[a])},e.prototype.render=function(){var t,e,r,n,i,o,s,a,l,u;if(this.model.visible){if(this._map_data(),e=this.plot_view.canvas_view.ctx,this.visuals.line.doit)for(r=n=0,s=this._lower_sx.length;0<=s?ns;r=0<=s?++n:--n)this.visuals.line.set_vectorize(e,r),e.beginPath(),e.moveTo(this._lower_sx[r],this._lower_sy[r]),e.lineTo(this._upper_sx[r],this._upper_sy[r]),e.stroke();if(t=\"height\"===this.model.dimension?0:Math.PI/2,null!=this.model.lower_head)for(r=i=0,a=this._lower_sx.length;0<=a?ia;r=0<=a?++i:--i)e.save(),e.translate(this._lower_sx[r],this._lower_sy[r]),e.rotate(t+Math.PI),this.model.lower_head.render(e,r),e.restore();if(null!=this.model.upper_head){for(u=[],r=o=0,l=this._upper_sx.length;0<=l?ol;r=0<=l?++o:--o)e.save(),e.translate(this._upper_sx[r],this._upper_sy[r]),e.rotate(t),this.model.upper_head.render(e,r),u.push(e.restore());return u}}},e}(o.AnnotationView),r.Whisker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.WhiskerView,e.prototype.type=\"Whisker\",e.mixins([\"line\"]),e.define({lower:[l.DistanceSpec],lower_head:[l.Instance,function(){return new a.TeeHead({level:\"underlay\",size:10})}],upper:[l.DistanceSpec],upper_head:[l.Instance,function(){return new a.TeeHead({level:\"underlay\",size:10})}],base:[l.DistanceSpec],dimension:[l.Dimension,\"height\"],source:[l.Instance,function(){return new s.ColumnDataSource}],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),e.override({level:\"underlay\"}),e.prototype._normals=function(){var t,e,r,n;return\"height\"===this.dimension?(r=[1,0],t=r[0],e=r[1]):(n=[0,1],t=n[0],e=n[1]),[t,e]},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(11),s=t(160),a=t(162),l=t(13),u=t(14),c=t(21),_=t(41);r.AxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.render=function(){var t,e,r;if(this.model.visible!==!1)return e={tick:this._tick_extent(),tick_label:this._tick_label_extents(),axis_label:this._axis_label_extent()},r=this.model.tick_coords,t=this.plot_view.canvas_view.ctx,t.save(),this._draw_rule(t,e),this._draw_major_ticks(t,e,r),this._draw_minor_ticks(t,e,r),this._draw_major_labels(t,e,r),this._draw_axis_label(t,e,r),null!=this._render&&this._render(t,e,r),t.restore()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype._get_size=function(){return this._tick_extent()+this._tick_label_extent()+this._axis_label_extent()},e.prototype._draw_rule=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m;if(this.visuals.axis_line.doit){for(a=this.model.rule_coords,d=a[0],y=a[1],l=this.plot_view.map_to_screen(d,y,this.model.x_range_name,this.model.y_range_name),h=l[0],p=l[1],u=this.model.normals,o=u[0],s=u[1],c=this.model.offsets,f=c[0],m=c[1],this.visuals.axis_line.set_value(t),t.beginPath(),t.moveTo(Math.round(h[0]+o*f),Math.round(p[0]+s*m)),n=i=1,_=h.length;1<=_?i<_:i>_;n=1<=_?++i:--i)h=Math.round(h[n]+o*f),p=Math.round(p[n]+s*m),t.lineTo(h,p);t.stroke()}},e.prototype._draw_major_ticks=function(t,e,r){var n,i,o;n=this.model.major_tick_in,i=this.model.major_tick_out,o=this.visuals.major_tick_line,this._draw_ticks(t,r.major,n,i,o)},e.prototype._draw_minor_ticks=function(t,e,r){var n,i,o;n=this.model.minor_tick_in,i=this.model.minor_tick_out,o=this.visuals.minor_tick_line,this._draw_ticks(t,r.minor,n,i,o)},e.prototype._draw_major_labels=function(t,e,r){var n,i,o,s,a;n=r.major,i=this.model.compute_labels(n[this.model.dimension]),o=this.model.major_label_orientation,s=e.tick+this.model.major_label_standoff,a=this.visuals.major_label_text,this._draw_oriented_labels(t,i,n,o,this.model.panel_side,s,a)},e.prototype._draw_axis_label=function(t,e,r){var n,i,o,s,a;if(null!=this.model.axis_label){switch(this.model.panel.side){case\"above\":s=this.model.panel._hcenter.value,a=this.model.panel._bottom.value;break;case\"below\":s=this.model.panel._hcenter.value,a=this.model.panel._top.value;break;case\"left\":s=this.model.panel._right.value,a=this.model.panel._vcenter._value;break;case\"right\":s=this.model.panel._left.value,a=this.model.panel._vcenter._value}n=[[s],[a]],i=e.tick+c.sum(e.tick_label)+this.model.axis_label_standoff,o=this.visuals.axis_label_text,this._draw_oriented_labels(t,[this.model.axis_label],n,\"parallel\",this.model.panel_side,i,o,\"screen\")}},e.prototype._draw_ticks=function(t,e,r,n,i){var o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P;if(i.doit&&0!==e.length)for(S=e[0],O=e[1],p=this.plot_view.map_to_screen(S,O,this.model.x_range_name,this.model.y_range_name),w=p[0],M=p[1],d=this.model.normals,a=d[0],c=d[1],f=this.model.offsets,T=f[0],P=f[1],y=[a*(T-r),c*(P-r)],l=y[0],_=y[1],m=[a*(T+n),c*(P+n)],u=m[0],h=m[1],i.set_value(t),o=s=0,v=w.length;0<=v?sv;o=0<=v?++s:--s)g=Math.round(w[o]+u),x=Math.round(M[o]+h),b=Math.round(w[o]+l),k=Math.round(M[o]+_),t.beginPath(),t.moveTo(g,x),t.lineTo(b,k),t.stroke()},e.prototype._draw_oriented_labels=function(t,e,r,n,i,o,s,a){var l,u,c,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E;if(null==a&&(a=\"data\"),s.doit&&0!==e.length)for(\"screen\"===a?(O=r[0],P=r[1],v=[this.plot_view.canvas.v_vx_to_sx(O),this.plot_view.canvas.v_vy_to_sy(P)],M=v[0],T=v[1]):(u=r[0],c=r[1],g=this.plot_view.map_to_screen(u,c,this.model.x_range_name,this.model.y_range_name),M=g[0],T=g[1]),b=this.model.normals,d=b[0],y=b[1],w=this.model.offsets,A=w[0],E=w[1],f=d*(A+o),m=y*(E+o),s.set_value(t),this.model.panel.apply_label_text_heuristics(t,n),l=_.isString(n)?this.model.panel.get_label_angle_heuristic(n):-n,h=p=0,x=M.length;0<=x?px;h=0<=x?++p:--p)k=Math.round(M[h]+f),S=Math.round(T[h]+m),t.translate(k,S),t.rotate(l),t.fillText(e[h],0,0),t.rotate(-l),t.translate(-k,-S)},e.prototype._axis_label_extent=function(){var t,e;return null==this.model.axis_label||\"\"===this.model.axis_label?0:(t=this.model.axis_label_standoff,e=this.visuals.axis_label_text,this._oriented_labels_extent([this.model.axis_label],\"parallel\",this.model.panel_side,t,e))},e.prototype._tick_extent=function(){return this.model.major_tick_out},e.prototype._tick_label_extent=function(){return c.sum(this._tick_label_extents())},e.prototype._tick_label_extents=function(){var t,e,r,n,i;return t=this.model.tick_coords.major,e=this.model.compute_labels(t[this.model.dimension]),\n", " r=this.model.major_label_orientation,n=this.model.major_label_standoff,i=this.visuals.major_label_text,[this._oriented_labels_extent(e,r,this.model.panel_side,n,i)]},e.prototype._tick_label_extent=function(){return c.sum(this._tick_label_extents())},e.prototype._oriented_labels_extent=function(t,e,r,n,i){var o,s,a,l,u,c,h,p,d,f,y,m;if(0===t.length)return 0;for(a=this.plot_view.canvas_view.ctx,i.set_value(a),_.isString(e)?(c=1,o=this.model.panel.get_label_angle_heuristic(e)):(c=2,o=-e),o=Math.abs(o),s=Math.cos(o),f=Math.sin(o),l=0,h=p=0,d=t.length;0<=d?pd;h=0<=d?++p:--p)m=1.1*a.measureText(t[h]).width,u=.9*a.measureText(t[h]).ascent,y=\"above\"===r||\"below\"===r?m*f+u/c*s:m*s+u/c*f,y>l&&(l=y);return l>0&&(l+=n),l},e}(a.RendererView),r.Axis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.AxisView,e.prototype.type=\"Axis\",e.mixins([\"line:axis_\",\"line:major_tick_\",\"line:minor_tick_\",\"text:major_label_\",\"text:axis_label_\"]),e.define({bounds:[u.Any,\"auto\"],ticker:[u.Instance,null],formatter:[u.Instance,null],x_range_name:[u.String,\"default\"],y_range_name:[u.String,\"default\"],axis_label:[u.String,\"\"],axis_label_standoff:[u.Int,5],major_label_standoff:[u.Int,5],major_label_orientation:[u.Any,\"horizontal\"],major_label_overrides:[u.Any,{}],major_tick_in:[u.Number,2],major_tick_out:[u.Number,6],minor_tick_in:[u.Number,0],minor_tick_out:[u.Number,4]}),e.override({axis_line_color:\"black\",major_tick_line_color:\"black\",minor_tick_line_color:\"black\",major_label_text_font_size:\"8pt\",major_label_text_align:\"center\",major_label_text_baseline:\"alphabetic\",axis_label_text_font_size:\"10pt\",axis_label_text_font_style:\"italic\"}),e.internal({panel_side:[u.Any]}),e.prototype.compute_labels=function(t){var e,r,n,i;for(n=this.formatter.doFormat(t,this),e=r=0,i=t.length;0<=i?ri;e=0<=i?++r:--r)t[e]in this.major_label_overrides&&(n[e]=this.major_label_overrides[t[e]]);return n},e.prototype.label_info=function(t){var e,r;return r=this.major_label_orientation,e={dim:this.dimension,coords:t,side:this.panel_side,orient:r,standoff:this.major_label_standoff}},e.getters({computed_bounds:function(){return this._computed_bounds()},rule_coords:function(){return this._rule_coords()},tick_coords:function(){return this._tick_coords()},ranges:function(){return this._ranges()},normals:function(){return this.panel._normals},dimension:function(){return this.panel._dim},offsets:function(){return this._offsets()},loc:function(){return this._get_loc()}}),e.prototype.add_panel=function(t){return this.panel=new o.SidePanel({side:t}),this.panel.attach_document(this.document),this.panel_side=t},e.prototype._offsets=function(){var t,e,r,n,i;switch(r=this.panel_side,e=[0,0],n=e[0],i=e[1],t=this.plot.plot_canvas.frame,r){case\"below\":i=Math.abs(this.panel._top.value-t._bottom.value);break;case\"above\":i=Math.abs(this.panel._bottom.value-t._top.value);break;case\"right\":n=Math.abs(this.panel._left.value-t._right.value);break;case\"left\":n=Math.abs(this.panel._right.value-t._left.value)}return[n,i]},e.prototype._ranges=function(){var t,e,r,n;return e=this.dimension,r=(e+1)%2,t=this.plot.plot_canvas.frame,n=[t.x_ranges[this.x_range_name],t.y_ranges[this.y_range_name]],[n[e],n[r]]},e.prototype._computed_bounds=function(){var t,e,r,n,i,o,s,a;return i=this.ranges,r=i[0],t=i[1],a=null!=(o=this.bounds)?o:\"auto\",n=[r.min,r.max],\"auto\"===a?n:_.isArray(a)?(Math.abs(a[0]-a[1])>Math.abs(n[0]-n[1])?(s=Math.max(Math.min(a[0],a[1]),n[0]),e=Math.min(Math.max(a[0],a[1]),n[1])):(s=Math.min(a[0],a[1]),e=Math.max(a[0],a[1])),[s,e]):(l.logger.error(\"user bounds '\"+a+\"' not understood\"),null)},e.prototype._rule_coords=function(){var t,e,r,n,i,o,s,a,l,u,c;return n=this.dimension,i=(n+1)%2,s=this.ranges,o=s[0],e=s[1],a=this.computed_bounds,l=a[0],r=a[1],u=new Array(2),c=new Array(2),t=[u,c],t[n][0]=Math.max(l,o.min),t[n][1]=Math.min(r,o.max),t[n][0]>t[n][1]&&(t[n][0]=t[n][1]=NaN),t[i][0]=this.loc,t[i][1]=this.loc,t},e.prototype._tick_coords=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M;for(n=this.dimension,o=(n+1)%2,y=this.ranges,p=y[0],e=y[1],m=this.computed_bounds,w=m[0],r=m[1],x=this.ticker.get_ticks(w,r,p,this.loc,{}),l=x.major,h=x.minor,k=[],M=[],t=[k,M],c=[],_=[],u=[c,_],v=[p.min,p.max],f=v[0],d=v[1],i=s=0,g=l.length;0<=g?sg;i=0<=g?++s:--s)l[i]d||(t[n].push(l[i]),t[o].push(this.loc));for(i=a=0,b=h.length;0<=b?ab;i=0<=b?++a:--a)h[i]d||(u[n].push(h[i]),u[o].push(this.loc));return{major:t,minor:u}},e.prototype._get_loc=function(){var t,e,r,n,i,o;switch(i=this.ranges,n=i[0],e=i[1],r=e.start,t=e.end,o=this.panel_side){case\"left\":case\"below\":return e.start;case\"right\":case\"above\":return e.end}},e}(s.GuideRenderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(67),s=t(90),a=t(178);r.CategoricalAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._render=function(t,e,r){return this._draw_group_separators(t,e,r)},e.prototype._draw_group_separators=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O;if(v=this.model.ranges,m=v[0],o=v[1],g=this.model.computed_bounds,S=g[0],a=g[1],f=this.model.loc,O=this.model.ticker.get_ticks(S,a,m,f,{}),b=this.model.ranges,m=b[0],o=b[1],m.tops&&!(m.tops.length<2)&&this.visuals.separator_line.doit){for(s=this.model.dimension,n=(s+1)%2,i=[[],[]],c=0,u=h=0,w=m.tops.length-1;0<=w?hw;u=0<=w?++h:--h){for(_=p=x=c,k=m.factors.length;x<=k?pk;_=x<=k?++p:--p)if(m.factors[_][0]===m.tops[u+1]){M=[m.factors[_-1],m.factors[_]],l=M[0],d=M[1],c=_;break}y=(m.synthetic(l)+m.synthetic(d))/2,y>S&&yh;s=0<=h?++l:--l)p=a[s],u=p[0],i=p[1],_=p[2],f=p[3],this._draw_oriented_labels(t,u,i,_,this.model.panel_side,d,f),d+=e.tick_label[s]},e.prototype._tick_label_extents=function(){var t,e,r,n,i,o,s,a,l,u;for(n=this._get_factor_info(),r=[],i=0,s=n.length;i1&&(t.tops[n]=u.tops,t.tops[i]=function(){var t,e,r,n;for(r=u.tops,n=[],t=0,e=r.length;tn;e=0<=n?++r:--r)i.push(this[e]=t[e]);return i}),r.CanvasView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-canvas-wrapper\",e.prototype.initialize=function(t){switch(e.__super__.initialize.call(this,t),this.map_el=this.model.map?this.el.appendChild(c.div({\"class\":\"bk-canvas-map\"})):null,this.events_el=this.el.appendChild(c.div({\"class\":\"bk-canvas-events\"})),this.overlays_el=this.el.appendChild(c.div({\"class\":\"bk-canvas-overlays\"})),this.model.output_backend){case\"canvas\":case\"webgl\":this.canvas_el=this.el.appendChild(c.canvas({\"class\":\"bk-canvas\"})),this._ctx=this.canvas_el.getContext(\"2d\");break;case\"svg\":this._ctx=new h,this.canvas_el=this.el.appendChild(this._ctx.getSvg())}return this.ctx=this.get_ctx(),_.fixup_ctx(this.ctx),l.logger.debug(\"CanvasView initialized\")},e.prototype.get_ctx=function(){return this._ctx},e.prototype.get_canvas_element=function(){return this.canvas_el},e.prototype.prepare_canvas=function(){var t,e,r;return r=this.model._width.value,t=this.model._height.value,this.el.style.width=r+\"px\",this.el.style.height=t+\"px\",e=_.get_scale_ratio(this.ctx,this.model.use_hidpi,this.model.output_backend),this.model.pixel_ratio=e,this.canvas_el.style.width=r+\"px\",this.canvas_el.style.height=t+\"px\",this.canvas_el.setAttribute(\"width\",r*e),this.canvas_el.setAttribute(\"height\",t*e),l.logger.debug(\"Rendering CanvasView with width: \"+r+\", height: \"+t+\", pixel ratio: \"+e)},e.prototype.set_dims=function(t){var e,r;if(r=t[0],e=t[1],0!==r&&0!==e)return null!=this._width_constraint&&this.solver.has_constraint(this._width_constraint)&&this.solver.remove_constraint(this._width_constraint),null!=this._height_constraint&&this.solver.has_constraint(this._height_constraint)&&this.solver.remove_constraint(this._height_constraint),this._width_constraint=a.EQ(this.model._width,-r),this.solver.add_constraint(this._width_constraint),this._height_constraint=a.EQ(this.model._height,-e),this.solver.add_constraint(this._height_constraint),this.solver.update_variables()},e}(s.DOMView),r.Canvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Canvas\",e.prototype.default_view=r.CanvasView,e.internal({map:[u.Boolean,!1],initial_width:[u.Number],initial_height:[u.Number],use_hidpi:[u.Boolean,!0],pixel_ratio:[u.Number,1],output_backend:[u.OutputBackend,\"canvas\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.panel=this},e.prototype.vx_to_sx=function(t){return t},e.prototype.vy_to_sy=function(t){return this._height.value-t},e.prototype.v_vx_to_sx=function(t){return new Float64Array(t)},e.prototype.v_vy_to_sy=function(t){var e,r,n,i,o,s;for(e=new Float64Array(t.length),r=this._height.value,n=i=0,o=t.length;i=this._left.value&&t<=this._right.value&&e>=this._bottom.value&&e<=this._top.value},e.prototype.map_to_screen=function(t,e,r,n,i){var o,s,a,l;return null==n&&(n=\"default\"),null==i&&(i=\"default\"),a=this.xscales[n].v_compute(t),o=r.v_vx_to_sx(a),l=this.yscales[i].v_compute(e),s=r.v_vy_to_sy(l),[o,s]},e.prototype._get_ranges=function(t,e){var r,n,i;if(i={},i[\"default\"]=t,null!=e)for(n in e)r=e[n],i[n]=r;return i},e.prototype._get_scales=function(t,e,r){var n,i,_,h;h={};for(n in e){if(i=e[n],i instanceof u.DataRange1d||i instanceof l.Range1d){if(!(t instanceof a.LogScale||t instanceof s.LinearScale))throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type);if(t instanceof o.CategoricalScale)throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type)}if(i instanceof c.FactorRange&&!(t instanceof o.CategoricalScale))throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type);t instanceof a.LogScale&&i instanceof u.DataRange1d&&(i.scale_hint=\"log\"),_=t.clone(),_.setv({source_range:i,target_range:r}),h[n]=_}return h},e.prototype._configure_frame_ranges=function(){return this._h_range=new l.Range1d({start:this._left.value,end:this._left.value+this._width.value}),this._v_range=new l.Range1d({start:this._bottom.value,end:this._bottom.value+this._height.value})},e.prototype._configure_scales=function(){return this._configure_frame_ranges(),this._x_ranges=this._get_ranges(this.x_range,this.extra_x_ranges),this._y_ranges=this._get_ranges(this.y_range,this.extra_y_ranges),this._xscales=this._get_scales(this.x_scale,this._x_ranges,this._h_range),this._yscales=this._get_scales(this.y_scale,this._y_ranges,this._v_range)},e.prototype._update_scales=function(){var t,e,r,n;this._configure_frame_ranges(),e=this._xscales;for(t in e)n=e[t],n.target_range=this._h_range;r=this._yscales;for(t in r)n=r[t],n.target_range=this._v_range;return null},e.getters({h_range:function(){return this._h_range},v_range:function(){return this._v_range},x_ranges:function(){return this._x_ranges},y_ranges:function(){return this._y_ranges},xscales:function(){return this._xscales},yscales:function(){return this._yscales},x_mappers:function(){return h.logger.warn(\"x_mappers attr is deprecated, use xscales\"),this._xscales},y_mappers:function(){return h.logger.warn(\"y_mappers attr is deprecated, use yscales\"),this._yscales}}),e.internal({extra_x_ranges:[p.Any,{}],extra_y_ranges:[p.Any,{}],x_range:[p.Instance],y_range:[p.Instance],x_scale:[p.Instance],y_scale:[p.Instance]}),e}(_.LayoutCanvas)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(77);r.Canvas=n.Canvas;var i=t(78);r.CartesianFrame=i.CartesianFrame},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49);r.Expression=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._connected={},this._result={}},e.prototype._v_compute=function(t){return null==this._connected[t.id]&&(this.connect(t.change,function(){return this._result[t.id]=null}),this._connected[t.id]=!0),null!=this._result[t.id]?this._result[t.id]:(this._result[t.id]=this.v_compute(t),this._result[t.id])},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(80);r.Expression=n.Expression;var i=t(82);r.Stack=i.Stack},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(80),s=t(14);r.Stack=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({fields:[s.Array,[]]}),e.prototype.v_compute=function(t){var e,r,n,i,o,s,a,l,u,c;for(u=new Float64Array(t.get_length()),a=this.fields,n=0,o=a.length;n0?l.all(this.booleans,u.isBoolean)?(this.booleans.length!==t.get_length()&&a.logger.warn(\"BooleanFilter \"+this.id+\": length of booleans doesn't match data source\"),function(){var t,r,n,i;for(n=l.range(0,this.booleans.length),i=[],t=0,r=n.length;t=0?l.all(this.filter,a.isBoolean)?function(){var e,r,n,i;for(n=l.range(0,this.filter.length),i=[],e=0,r=n.length;ei;r=0<=i?++n:--n)e[r]===this.group&&o.push(r);return o}.call(this),0===this.indices.length&&a.logger.warn(\"group filter: group '\"+this.group+\"' did not match any values in column '\"+this.column_name+\"'\"),this.indices)},e}(o.Filter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(83);r.BooleanFilter=n.BooleanFilter;var i=t(84);r.CustomJSFilter=i.CustomJSFilter;var o=t(85);r.Filter=o.Filter;var s=t(86);r.GroupFilter=s.GroupFilter;var a=t(88);r.IndexFilter=a.IndexFilter},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(85),s=t(14),a=t(13),l=t(41),u=t(21);r.IndexFilter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"IndexFilter\",e.define({indices:[s.Array,null]}),e.prototype.compute_indices=function(t){var e;return(null!=(e=this.indices)?e.length:void 0)>=0?u.all(this.indices,l.isInteger)?this.indices:(a.logger.warn(\"IndexFilter \"+this.id+\": indices should be array of integers, defaulting to no filtering\"),null):(a.logger.warn(\"IndexFilter \"+this.id+\": indices was not set, defaulting to no filtering\"),null)},e}(o.Filter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(98),s=t(14),a=t(41);r.BasicTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"BasicTickFormatter\",e.define({precision:[s.Any,\"auto\"],use_scientific:[s.Bool,!0],power_limit_high:[s.Number,5],power_limit_low:[s.Number,-3]}),e.getters({scientific_limit_low:function(){return Math.pow(10,this.power_limit_low)},scientific_limit_high:function(){return Math.pow(10,this.power_limit_high)}}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.last_precision=3},e.prototype.doFormat=function(t,e){var r,n,i,o,s,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k;if(0===t.length)return[];if(k=0,t.length>=2&&(k=Math.abs(t[1]-t[0])/1e4),h=!1,this.use_scientific)for(i=0,u=t.length;ik&&(w>=this.scientific_limit_high||w<=this.scientific_limit_low)){h=!0;break}if(d=this.precision,null==d||a.isNumber(d)){if(l=new Array(t.length),h)for(r=o=0,f=t.length;0<=f?of;r=0<=f?++o:--o)l[r]=t[r].toExponential(d||void 0);else for(r=s=0,y=t.length;0<=y?sy;r=0<=y?++s:--s)l[r]=t[r].toFixed(d||void 0).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");return l}if(\"auto\"===d)for(l=new Array(t.length),x=c=m=this.last_precision;m<=15?c<=15:c>=15;x=m<=15?++c:--c){if(n=!0,h){for(r=_=0,v=t.length;0<=v?_v;r=0<=v?++_:--_)if(l[r]=t[r].toExponential(x),r>0&&l[r]===l[r-1]){n=!1;break}if(n)break}else{for(r=p=0,g=t.length;0<=g?pg;r=0<=g?++p:--p)if(l[r]=t[r].toFixed(x).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\"),r>0&&l[r]===l[r-1]){n=!1;break}if(n)break}if(n)return this.last_precision=x,l}return l},e}(o.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(98);r.CategoricalTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"CategoricalTickFormatter\",e.prototype.doFormat=function(t,e){return t},e}(o.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(359),u=t(360),c=t(98),_=t(13),h=t(14),p=t(21),d=t(41);o=function(t){return Math.round(t/1e3%1*1e6)},n=function(t){return u(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map(function(t){return parseInt(t,10)})},i=function(t,e){var r;return d.isFunction(e)?e(t):(r=l.sprintf(\"$1%06d\",o(t)),e=e.replace(/((^|[^%])(%%)*)%f/,r),e.indexOf(\"%\")===-1?e:u(t,e))},r.DatetimeTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type=\"DatetimeTickFormatter\",e.define({microseconds:[h.Array,[\"%fus\"]],milliseconds:[h.Array,[\"%3Nms\",\"%S.%3Ns\"]],seconds:[h.Array,[\"%Ss\"]],minsec:[h.Array,[\":%M:%S\"]],minutes:[h.Array,[\":%M\",\"%Mm\"]],hourmin:[h.Array,[\"%H:%M\"]],hours:[h.Array,[\"%Hh\",\"%H:%M\"]],days:[h.Array,[\"%m/%d\",\"%a%d\"]],months:[h.Array,[\"%m/%Y\",\"%b%y\"]],years:[h.Array,[\"%Y\"]]}),e.prototype.format_order=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"],e.prototype.strip_leading_zeros=!0,e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._update_width_formats()},e.prototype._update_width_formats=function(){var t,e;return e=u(new Date),t=function(t){var r,n,o;return n=function(){var n,o,s;for(s=[],n=0,o=t.length;n=60?\"minsec\":\"seconds\";case!(r<3600):return e>=3600?\"hourmin\":\"minutes\";case!(r<86400):return\"hours\";case!(r<2678400):return\"days\";case!(r<31536e3):return\"months\";default:return\"years\"}},e.prototype.doFormat=function(t,e,r,o,s,a){var l,u,c,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F;if(null==r&&(r=null),null==o&&(o=null),null==s&&(s=.3),null==a&&(a=null),0===t.length)return[];if(j=Math.abs(t[t.length-1]-t[0])/1e3,M=a?a.resolution:j/(t.length-1),P=this._get_resolution_str(M,j),S=this._width_formats[P],F=S[0],h=S[1],c=h[0],o){for(p=[],f=y=0,T=F.length;0<=T?yT;f=0<=T?++y:--y)F[f]*t.length0&&(c=p[p.length-1])}for(g=[],A=this.format_order.indexOf(P),N={},O=this.format_order,m=0,b=O.length;ms;n=0<=s?++i:--i)if(o[n]=r+\"^\"+Math.round(Math.log(t[n])/Math.log(r)),n>0&&o[n]===o[n-1]){a=!0;break}return a&&(o=this.basic_formatter.doFormat(t)),o},e}(s.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(89),s=t(14),a=t(30);r.MercatorTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"MercatorTickFormatter\",e.define({dimension:[s.LatLon]}),e.prototype.doFormat=function(t,r){var n,i,o,s,l,u,c,_,h,p;if(null==this.dimension)throw new Error(\"MercatorTickFormatter.dimension not configured\");if(0===t.length)return[];if(u=new Array(t.length),\"lon\"===this.dimension)for(n=i=0,c=t.length;0<=c?ic;n=0<=c?++i:--i)_=a.proj4(a.mercator).inverse([t[n],r.loc]),l=_[0],s=_[1],u[n]=l;else for(n=o=0,h=t.length;0<=h?oh;n=0<=h?++o:--o)p=a.proj4(a.mercator).inverse([r.loc,t[n]]),l=p[0],s=p[1],u[n]=s;return e.__super__.doFormat.call(this,u,r)},e}(o.BasicTickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(329),s=t(98),a=t(14);r.NumeralTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"NumeralTickFormatter\",e.define({format:[a.String,\"0,0\"],language:[a.String,\"en\"],rounding:[a.String,\"round\"]}),e.prototype.doFormat=function(t,e){var r,n,i,s,a;return r=this.format,i=this.language,s=function(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}.call(this),n=function(){var e,n,l;for(l=[],e=0,n=t.length;er;t=0<=r?++e:--e)n.push(this._angle[t]=this._end_angle[t]-this._start_angle[t]);return n},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p;for(h=r.sx,p=r.sy,i=r._start_angle,n=r._angle,c=r.sinner_radius,_=r.souter_radius,o=this.model.properties.direction.value(),u=[],a=0,l=e.length;a=c&&n.push([u,o]);for(i=this.model.properties.direction.value(),a=[],h=0,d=n.length;h=0||navigator.userAgent.indexOf(\"Trident\")>0||navigator.userAgent.indexOf(\"Edge\")>0,this.visuals.fill.doit){if(this.visuals.fill.set_vectorize(t,i),t.beginPath(),o)for(c=[!1,!0],a=0,u=c.length;a=o&&n.push([i,r]);return s.create_1d_hit_test_result(n)},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){var s,a,l,u,c,_,h;return a=[o],_={},_[o]=(e+r)/2,h={},h[o]=(n+i)/2,l=.5*Math.min(Math.abs(r-e),Math.abs(i-n)),u={},u[o]=.4*l,c={},c[o]=.8*l,s={sx:_,sy:h,sinner_radius:u,souter_radius:c},this._render(t,a,s)},e}(o.XYGlyphView),r.Annulus=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.AnnulusView,e.prototype.type=\"Annulus\",e.mixins([\"line\",\"fill\"]),e.define({inner_radius:[a.DistanceSpec],outer_radius:[a.DistanceSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(14);r.ArcView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._map_data=function(){return\"data\"===this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;if(_=r.sx,h=r.sy,c=r.sradius,i=r._start_angle,n=r._end_angle,this.visuals.line.doit){for(o=this.model.properties.direction.value(),u=[],a=0,l=e.length;ai;t=0<=i?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t]+this._cx0[t]+this._cy0[t]+this._cx1[t]+this._cy1[t])||(o=n(this._x0[t],this._y0[t],this._x1[t],this._y1[t],this._cx0[t],this._cy0[t],this._cx1[t],this._cy1[t]),a=o[0],u=o[1],l=o[2],c=o[3],r.push({minX:a,minY:u,maxX:l,maxY:c,i:t}));return new s.RBush(r)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f;if(h=r.sx0,d=r.sy0,p=r.sx1,f=r.sy1,a=r.scx,l=r.scx0,c=r.scy0,u=r.scx1,_=r.scy1,this.visuals.line.doit){for(s=[],i=0,o=e.length;il;r=0<=l?++n:--n)u=this._lrtb(r),i=u[0],a=u[1],c=u[2],e=u[3],!isNaN(i+a+c+e)&&isFinite(i+a+c+e)&&s.push({minX:i,minY:e,maxX:a,maxY:c,i:r});return new o.RBush(s)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c;for(l=r.sleft,u=r.sright,c=r.stop,a=r.sbottom,s=[],i=0,o=e.length;ie;0<=e?t++:t--)c.push(t);return c}.apply(this),r=[],n=o=0,l=e.length;0<=l?ol;n=0<=l?++o:--o)i=e[n],s.point_in_poly(this.sx[n],this.sy[n],_,h)&&r.push(i);return u=s.create_hit_test_result(),u[\"1d\"].indices=r,u},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){var s,a,l,u,c;return a=[o],u={},u[o]=(e+r)/2,c={},c[o]=(n+i)/2,l={},l[o]=.2*Math.min(Math.abs(r-e),Math.abs(i-n)),s={sx:u,sy:c,sradius:l},this._render(t,a,s)},e}(o.XYGlyphView),r.Circle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.CircleView,e.prototype.type=\"Circle\",e.mixins([\"line\",\"fill\"]),e.define({angle:[a.AngleSpec,0],size:[a.DistanceSpec,{units:\"screen\",value:4}],radius:[a.DistanceSpec,null],radius_dimension:[a.String,\"x\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.properties.radius.optional=!0},e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(14);r.EllipseView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._set_data=function(){if(this.max_w2=0,\"data\"===this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"===this.model.properties.height.units)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){return\"data\"===this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"):this.sw=this._width,\"data\"===this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"):this.sh=this._height},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c;for(u=r.sx,c=r.sy,l=r.sw,a=r.sh,s=[],i=0,o=e.length;i1?(_[o]=s,c[o]=s/u):(_[o]=s*u,c[o]=s),a={sx:h,sy:p,sw:_,sh:c},this._render(t,l,a)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(o.XYGlyphView),r.Ellipse=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.EllipseView,e.prototype.type=\"Ellipse\",e.mixins([\"line\",\"fill\"]),e.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(22),a=t(31),l=t(44),u=t(49),c=t(45),_=t(13),h=t(29),p=t(41),d=t(112);r.GlyphView=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.initialize=function(e){var n,i,o,s;if(r.__super__.initialize.call(this,e),this._nohit_warned={},this.renderer=e.renderer,this.visuals=new c.Visuals(this.model),i=this.renderer.plot_view.canvas_view.ctx,null!=i.glcanvas){try{s=t(422)}catch(a){if(o=a,\"MODULE_NOT_FOUND\"!==o.code)throw o;_.logger.warn(\"WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.\"),s=null}if(null!=s&&(n=s[this.model.type+\"GLGlyph\"],null!=n))return this.glglyph=new n(i.glcanvas.gl,this)}},r.prototype.set_visuals=function(t){if(this.visuals.warm_cache(t),null!=this.glglyph)return this.glglyph.set_visuals_changed()},r.prototype.render=function(t,e,r){if(t.beginPath(),null==this.glglyph||!this.glglyph.render(t,e,r))return this._render(t,e,r)},r.prototype.has_finished=function(){return!0},r.prototype.notify_finished=function(){return this.renderer.notify_finished()},r.prototype.bounds=function(){return null==this.index?s.empty():this._bounds(this.index.bbox)},r.prototype.log_bounds=function(){var t,e,r,n,i,o,a,l,u;if(null==this.index)return s.empty();for(t=s.empty(),o=this.index.search(s.positive_x()),a=this.index.search(s.positive_y()),e=0,n=o.length;et.maxX&&(t.maxX=l.maxX);for(r=0,i=a.length;rt.maxY&&(t.maxY=u.maxY);return this._bounds(t)},r.prototype.max_wh2_bounds=function(t){return{minX:t.minX-this.max_w2,maxX:t.maxX+this.max_w2,minY:t.minY-this.max_h2,maxY:t.maxY+this.max_h2}},r.prototype.get_anchor_point=function(t,e,r){var n,i;switch(n=r[0],i=r[1],t){case\"center\":return{x:this.scx(e,n,i),y:this.scy(e,n,i)};default:return null}},r.prototype.scx=function(t){return this.sx[t]},r.prototype.scy=function(t){return this.sy[t]},r.prototype.sdist=function(t,e,r,n,i){var o,s,a,l,u,c,_;return null==n&&(n=\"edge\"),null==i&&(i=!1),null!=t.source_range.v_synthetic&&(e=t.source_range.v_synthetic(e)),\"center\"===n?(s=function(){var t,e,n;for(n=[],t=0,e=r.length;tr;a=0<=r?++t:--t)n.push(e[a]-s[a]);return n}(),u=function(){var t,r,n;for(n=[],a=t=0,r=e.length;0<=r?tr;a=0<=r?++t:--t)n.push(e[a]+s[a]);return n}()):(l=e,u=function(){var t,e,n;for(n=[],a=t=0,e=l.length;0<=e?te;a=0<=e?++t:--t)n.push(l[a]+r[a]);return n}()),c=t.v_compute(l),_=t.v_compute(u),i?function(){var t,e,r;for(r=[],a=t=0,e=c.length;0<=e?te;a=0<=e?++t:--t)r.push(Math.ceil(Math.abs(_[a]-c[a])));return r}():function(){var t,e,r;for(r=[],a=t=0,e=c.length;0<=e?te;a=0<=e?++t:--t)r.push(Math.abs(_[a]-c[a]));return r}()},r.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return null},r.prototype._generic_line_legend=function(t,e,r,n,i,o){return t.save(),t.beginPath(),t.moveTo(e,(n+i)/2),t.lineTo(r,(n+i)/2),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,o),t.stroke()),t.restore()},r.prototype._generic_area_legend=function(t,e,r,n,i,o){var s,a,l,u,c,_,h,p,d;if(u=[o],d=Math.abs(r-e),a=.1*d,l=Math.abs(i-n),s=.1*l,c=e+a,_=r-a,h=n+s,p=i-s,this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,o),t.fillRect(c,h,_-c,p-h)),this.visuals.line.doit)return t.beginPath(),t.rect(c,h,_-c,p-h),this.visuals.line.set_vectorize(t,o),t.stroke()},r.prototype.hit_test=function(t){var e,r;return r=null,e=\"_hit_\"+t.type,null!=this[e]?r=this[e](t):null==this._nohit_warned[t.type]&&(_.logger.debug(\"'\"+t.type+\"' selection not available for \"+this.model.type),this._nohit_warned[t.type]=!0),r},r.prototype.set_data=function(t,e,r){var n,i,o,s,l,u,c,_,p,f,y,m,v,g,b;if(n=this.model.materialize_dataspecs(t),e&&!(this instanceof d.LineView)){i={};for(l in n)y=n[l],\"_\"===l.charAt(0)?i[l]=function(){var t,r,n;for(n=[],t=0,r=e.length;tc;t=0<=c?++r:--r)_=this.map_to_screen(this[v][t],this[g][t]),d=_[0],y=_[1],this[f].push(d),this[m].push(y);else h=this.map_to_screen(this[v],this[g]),this[f]=h[0],this[m]=h[1];return this._map_data()},r.prototype._map_data=function(){},r.prototype.map_to_screen=function(t,e){return this.renderer.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},r}(l.View),r.Glyph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._coords=[],e.coords=function(t){var e,r,n,i,s,a,l;for(e=this.prototype._coords.concat(t),this.prototype._coords=e,s={},r=0,n=t.length;rr;t=0<=r?++e:--e)this.stop.push(this.sy[t]-this.sh[t]/2),this.sbottom.push(this.sy[t]+this.sh[t]/2);return null},e}(o.BoxView),r.HBar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.HBarView,e.prototype.type=\"HBar\",e.coords([[\"left\",\"y\"]]),e.define({height:[s.DistanceSpec],right:[s.NumberSpec]}),e.override({left:0}),e}(o.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(125),a=t(143),l=t(14),u=t(21);r.ImageView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.color_mapper.change,function(){return this._update_image()})},e.prototype._update_image=function(){if(null!=this.image_data)return this._set_data(),this.renderer.plot_view.request_render()},e.prototype._set_data=function(){var t,e,r,n,i,o,s,a,l,c,_,h;for(null!=this.image_data&&this.image_data.length===this._image.length||(this.image_data=new Array(this._image.length)),null!=this._width&&this._width.length===this._image.length||(this._width=new Array(this._image.length)),null!=this._height&&this._height.length===this._image.length||(this._height=new Array(this._image.length)),_=[],o=l=0,c=this._image.length;0<=c?lc;o=0<=c?++l:--l)h=[],null!=this._image_shape&&(h=this._image_shape[o]),h.length>0?(a=this._image[o],this._height[o]=h[0],this._width[o]=h[1]):(a=u.concat(this._image[o]),this._height[o]=this._image[o].length,this._width[o]=this._image[o][0].length),null!=this.image_data[o]&&this.image_data[o].width===this._width[o]&&this.image_data[o].height===this._height[o]?r=this.image_data[o]:(r=document.createElement(\"canvas\"),r.width=this._width[o],r.height=this._height[o]),i=r.getContext(\"2d\"),s=i.getImageData(0,0,this._width[o],this._height[o]),n=this.model.color_mapper,t=n.v_map_screen(a,!0),e=new Uint8Array(t),s.data.set(e),i.putImageData(s,0,0),this.image_data[o]=r,this.max_dw=0,\"data\"===this._dw.units&&(this.max_dw=u.max(this._dw)),this.max_dh=0,\"data\"===this._dh.units?_.push(this.max_dh=u.max(this._dh)):_.push(void 0);return _},e.prototype._map_data=function(){switch(this.model.properties.dw.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,\"edge\",this.model.dilate);break;case\"screen\":this.sw=this._dw}switch(this.model.properties.dh.units){case\"data\":return this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);case\"screen\":return this.sh=this._dh}},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;for(i=r.image_data,c=r.sx,_=r.sy,u=r.sw,l=r.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),o=0,s=e.length;od;u=0<=d?++h:--h)if(!(null!=e&&e.indexOf(u)<0)){if(m=[],null!=this._image_shape&&(m=this._image_shape[u]),m.length>0)r=this._image[u].buffer,this._height[u]=m[0],this._width[u]=m[1];else{for(l=a.concat(this._image[u]),r=new ArrayBuffer(4*l.length),o=new Uint32Array(r),_=p=0,f=l.length;0<=f?pf;_=0<=f?++p:--p)o[_]=l[_];this._height[u]=this._image[u].length,this._width[u]=this._image[u][0].length}null!=this.image_data[u]&&this.image_data[u].width===this._width[u]&&this.image_data[u].height===this._height[u]?i=this.image_data[u]:(i=document.createElement(\"canvas\"),i.width=this._width[u],i.height=this._height[u]),s=i.getContext(\"2d\"),c=s.getImageData(0,0,this._width[u],this._height[u]),n=new Uint8Array(r),c.data.set(n),s.putImageData(c,0,0),this.image_data[u]=i,this.max_dw=0,\"data\"===this._dw.units&&(this.max_dw=a.max(this._dw)),this.max_dh=0,\"data\"===this._dh.units?y.push(this.max_dh=a.max(this._dh)):y.push(void 0)}return y},e.prototype._map_data=function(){switch(this.model.properties.dw.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,\"edge\",this.model.dilate);break;case\"screen\":this.sw=this._dw}switch(this.model.properties.dh.units){case\"data\":return this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);case\"screen\":return this.sh=this._dh}},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;for(i=r.image_data,c=r.sx,_=r.sy,u=r.sw,l=r.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),o=0,s=e.length;on;t=0<=n?++r:--r)null!=this._url[t]&&(e=new Image,e.onerror=function(t){return function(e,r){return function(){return t.retries[e]>0?(s.logger.trace(\"ImageURL failed to load \"+t._url[e]+\" image, retrying in \"+a+\" ms\"),setTimeout(function(){return r.src=t._url[e]},a)):s.logger.warn(\"ImageURL unable to load \"+t._url[e]+\" image after \"+o+\" retries\"),t.retries[e]-=1}}}(this)(t,e),e.onload=function(t){return function(e,r){return function(){return t.image[r]=e,t.renderer.request_render()}}}(this)(e,t),i.push(e.src=this._url[t]));return i},e.prototype.has_finished=function(){return e.__super__.has_finished.call(this)&&this._images_rendered===!0},e.prototype._map_data=function(){var t,e,r;switch(e=function(){var t,e,n,i;if(null!=this.model.w)return this._w;for(n=this._x,i=[],t=0,e=n.length;t1&&(t.stroke(),n=!1)}n?t.lineTo(l[i],u[i]):(t.beginPath(),t.moveTo(l[i],u[i]),n=!0),s=i}if(n)return t.stroke()},e.prototype._hit_point=function(t){var e,r,n,i,o,a,l,u,c,_,h;for(c=s.create_hit_test_result(),a={x:this.renderer.plot_view.canvas.vx_to_sx(t.vx),y:this.renderer.plot_view.canvas.vy_to_sy(t.vy)},_=9999,h=Math.max(2,this.visuals.line.line_width.value()/2),r=n=0,l=this.sx.length-1;0<=l?nl;r=0<=l?++n:--n)u=[{x:this.sx[r],y:this.sy[r]},{x:this.sx[r+1],y:this.sy[r+1]}],i=u[0],o=u[1],e=s.dist_to_segment(a,i,o),ei;e=0<=i?++r:--r)(l[e]<=a&&a<=l[e+1]||l[e+1]<=a&&a<=l[e])&&(o[\"0d\"].glyph=this.model,o[\"0d\"].get_view=function(){return this}.bind(this),o[\"0d\"].flag=!0,o[\"0d\"].indices.push(e));return o},e.prototype.get_interpolation_hit=function(t,e){var r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w;return r=[e.vx,e.vy],h=r[0],p=r[1],n=[this._x[t],this._y[t],this._x[t+1],this._y[t+1]],y=n[0],b=n[1],m=n[2],w=n[3],\"point\"===e.type?(i=this.renderer.yscale.v_invert([p-1,p+1]),v=i[0],g=i[1],o=this.renderer.xscale.v_invert([h-1,h+1]),d=o[0],f=o[1]):\"v\"===e.direction?(a=this.renderer.yscale.v_invert([p,p]),v=a[0],g=a[1],l=[y,m],d=l[0],f=l[1]):(u=this.renderer.xscale.v_invert([h,h]),d=u[0],f=u[1],c=[b,w],v=c[0],g=c[1]),_=s.check_2_segments_intersect(d,v,f,g,y,b,m,w),[_.x,_.y]},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_line_legend(t,e,r,n,i,o)},e}(o.XYGlyphView),r.Line=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.LineView,e.prototype.type=\"Line\",e.mixins([\"line\"]),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(35),s=t(9),a=t(21),l=t(41),u=t(106);r.MultiLineView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._index_data=function(){var t,e,r,n,i,s,u,c;for(r=[],t=e=0,n=this._xs.length;0<=n?en;t=0<=n?++e:--e)null!==this._xs[t]&&0!==this._xs[t].length&&(s=function(){var e,r,n,o;for(n=this._xs[t],o=[],e=0,r=n.length;eu;i=0<=u?++s:--s)0!==i?isNaN(_[i])||isNaN(p[i])?(t.stroke(),t.beginPath()):t.lineTo(_[i],p[i]):(t.beginPath(),t.moveTo(_[i],p[i]));c.push(t.stroke())}return c},e.prototype._hit_point=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m;for(f=s.create_hit_test_result(),c={x:this.renderer.plot_view.canvas.vx_to_sx(t.vx),y:this.renderer.plot_view.canvas.vy_to_sy(t.vy)},y=9999,r={},n=o=0,h=this.sxs.length;0<=h?oh;n=0<=h?++o:--o){for(m=Math.max(2,this.visuals.line.cache_select(\"line_width\",n)/2),_=null,i=a=0,p=this.sxs[n].length-1;0<=p?ap;i=0<=p?++a:--a)d=[{x:this.sxs[n][i],y:this.sys[n][i]},{x:this.sxs[n][i+1],y:this.sys[n][i+1]}],l=d[0],u=d[1],e=s.dist_to_segment(c,l,u),eu;r=0<=u?++i:--i){for(a=[],n=o=0,c=p[r].length-1;0<=c?oc;n=0<=c?++o:--o)p[r][n]<=h&&h<=p[r][n+1]&&a.push(n);a.length>0&&(e[r]=a)}return _[\"1d\"].indices=function(){var t,n,i,o;for(i=Object.keys(e),o=[],n=0,t=i.length;n1?(_[o]=s,c[o]=s/u):(_[o]=s*u,c[o]=s),a={sx:h,sy:p,sw:_,sh:c},this._render(t,l,a)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(o.XYGlyphView),r.Oval=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.OvalView,e.prototype.type=\"Oval\",e.mixins([\"line\",\"fill\"]),e.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125);r.PatchView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u;if(l=r.sx,u=r.sy,this.visuals.fill.doit){for(this.visuals.fill.set_value(t),i=0,s=e.length;i_;n=0<=_?++i:--i)for(r[n]=[],u=a.copy(t[n]);u.length>0;)o=a.findLastIndex(u,function(t){return l.isStrictNaN(t)}),o>=0?c=u.splice(o):(c=u,u=[]),e=function(){var t,e,r;for(r=[],t=0,e=c.length;ts;t=0<=s?++r:--r)for(e=n=0,l=c[t].length;0<=l?nl;e=0<=l?++n:--n)u=c[t][e],_=h[t][e],0!==u.length&&i.push({minX:a.min(u),minY:a.min(_),maxX:a.max(u),maxY:a.max(_),i:t});return new o.RBush(i)},e.prototype._mask_data=function(t){var e,r,n,i,o,s,a,l,c;return s=this.renderer.plot_view.frame.x_ranges[\"default\"],r=[s.min,s.max],i=r[0],o=r[1],c=this.renderer.plot_view.frame.y_ranges[\"default\"],n=[c.min,c.max],a=n[0],l=n[1],e=u.validate_bbox_coords([i,o],[a,l]),this.index.indices(e)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y;for(d=r.sxs,y=r.sys,this.renderer.sxss=this._build_discontinuous_object(d),this.renderer.syss=this._build_discontinuous_object(y),h=[],o=0,a=e.length;oc;i=0<=c?++s:--s)0!==i?isNaN(p[i]+f[i])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(p[i],f[i]):(t.beginPath(),t.moveTo(p[i],f[i]));t.closePath(),t.fill()}if(this.visuals.line.doit){for(this.visuals.line.set_vectorize(t,n),i=l=0,_=p.length;0<=_?l<_:l>_;i=0<=_?++l:--l)0!==i?isNaN(p[i]+f[i])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(p[i],f[i]):(t.beginPath(),t.moveTo(p[i],f[i]));t.closePath(),h.push(t.stroke())}else h.push(void 0)}return h},e.prototype._hit_point=function(t){var e,r,n,i,o,s,a,l,c,_,h,p,d,f,y,m,v,g,b;for(l=[t.vx,t.vy],m=l[0],v=l[1],p=this.renderer.plot_view.canvas.vx_to_sx(m),f=this.renderer.plot_view.canvas.vy_to_sy(v),g=this.renderer.xscale.invert(m),b=this.renderer.yscale.invert(v),e=this.index.indices({minX:g,minY:b,maxX:g,maxY:b}),r=[],n=s=0,c=e.length;0<=c?sc;n=0<=c?++s:--s)for(i=e[n],d=this.renderer.sxss[i],y=this.renderer.syss[i],o=a=0,_=d.length;0<=_?a<_:a>_;o=0<=_?++a:--a)u.point_in_poly(p,f,d[o],y[o])&&r.push(i);return h=u.create_hit_test_result(),h[\"1d\"].indices=r,h},e.prototype._get_snap_coord=function(t){var e,r,n,i;for(i=0,e=0,r=t.length;eo;n=0<=o?++i:--i)if(u.point_in_poly(e,r,s[n],a[n]))return this._get_snap_coord(s[n]);return null},e.prototype.scy=function(t,e,r){var n,i,o,s,a;if(1===this.renderer.syss[t].length)return this._get_snap_coord(this.sys[t]);for(s=this.renderer.sxss[t],a=this.renderer.syss[t],n=i=0,o=s.length;0<=o?io;n=0<=o?++i:--i)if(u.point_in_poly(e,r,s[n],a[n]))return this._get_snap_coord(a[n])},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_area_legend(t,e,r,n,i,o)},e}(s.GlyphView),r.Patches=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.PatchesView,e.prototype.type=\"Patches\",e.coords([[\"xs\",\"ys\"]]),e.mixins([\"line\",\"fill\"]),e}(s.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(103);r.QuadView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.get_anchor_point=function(t,e,r){var n,i,o,s;switch(i=Math.min(this.sleft[e],this.sright[e]),o=Math.max(this.sright[e],this.sleft[e]),s=Math.min(this.stop[e],this.sbottom[e]),n=Math.max(this.sbottom[e],this.stop[e]),t){case\"top_left\":return{x:i,y:s};case\"top_center\":return{x:(i+o)/2,y:s};case\"top_right\":return{x:o,y:s};case\"center_right\":return{x:o,y:(s+n)/2};case\"bottom_right\":return{x:o,y:n};case\"bottom_center\":return{x:(i+o)/2,y:n};case\"bottom_left\":return{x:i,y:n};case\"center_left\":return{x:i,y:(s+n)/2};case\"center\":return{x:(i+o)/2,y:(s+n)/2}}},e.prototype.scx=function(t){return(this.sleft[t]+this.sright[t])/2},e.prototype.scy=function(t){return(this.stop[t]+this.sbottom[t])/2},e.prototype._index_data=function(){return this._index_box(this._right.length)},e.prototype._lrtb=function(t){var e,r,n,i;return r=this._left[t],n=this._right[t],i=this._top[t],e=this._bottom[t],[r,n,i,e]},e}(o.BoxView),r.Quad=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.QuadView,e.prototype.type=\"Quad\",e.coords([[\"right\",\"bottom\"],[\"left\",\"top\"]]),e}(o.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(35),a=t(106);n=function(t,e,r){var n,i;return e===(t+r)/2?[t,r]:(i=(t-e)/(t-2*e+r),n=t*Math.pow(1-i,2)+2*e*(1-i)*i+r*Math.pow(i,2),[Math.min(t,r,n),Math.max(t,r,n)])},r.QuadraticView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._index_data=function(){var t,e,r,i,o,a,l,u,c,_;for(r=[],t=e=0,i=this._x0.length;0<=i?ei;t=0<=i?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t]+this._cx[t]+this._cy[t])||(o=n(this._x0[t],this._cx[t],this._x1[t]),l=o[0],u=o[1],a=n(this._y0[t],this._cy[t],this._y1[t]),c=a[0],_=a[1],r.push({minX:l,minY:c,maxX:u,maxY:_,i:t}));return new s.RBush(r)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;if(u=r.sx0,_=r.sy0,c=r.sx1,h=r.sy1,a=r.scx,l=r.scy,this.visuals.line.doit){for(s=[],i=0,o=e.length;ic;o=0<=c?++a:--a)0===h[o]&&(h[o]=s);\n", " for(_=[],l=0,u=e.length;lr;e=0<=r?++t:--t)n.push(this.sx[e]-this.sw[e]/2);return n}.call(this)),\"data\"===this.model.properties.height.units?(n=this._map_dist_corner_for_data_side_length(this._y,this._height,this.renderer.yscale,t,1),this.sh=n[0],this.sy1=n[1]):(this.sh=this._height,this.sy1=function(){var t,r,n;for(n=[],e=t=0,r=this.sy.length;0<=r?tr;e=0<=r?++t:--t)n.push(this.sy[e]-this.sh[e]/2);return n}.call(this)),this.ssemi_diag=function(){var t,r,n;for(n=[],e=t=0,r=this.sw.length;0<=r?tr;e=0<=r?++t:--t)n.push(Math.sqrt(this.sw[e]/2*this.sw[e]/2+this.sh[e]/2*this.sh[e]/2));return n}.call(this)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d;if(_=r.sx,p=r.sy,h=r.sx0,d=r.sy1,c=r.sw,u=r.sh,n=r._angle,this.visuals.fill.doit)for(o=0,a=e.length;oe;a=0<=e?++t:--t)r.push(this.sx0[a]+this.sw[a]/2);return r}.call(this),b=function(){var t,e,r;for(r=[],a=t=0,e=this.sy1.length;0<=e?te;a=0<=e?++t:--t)r.push(this.sy1[a]+this.sh[a]/2);return r}.call(this),_=l.max(this._ddist(0,g,this.ssemi_diag)),h=l.max(this._ddist(1,b,this.ssemi_diag)),O=T-_,P=T+_,E=A-h,j=A+h,o=[],e=s.validate_bbox_coords([O,P],[E,j]),y=this.index.indices(e),u=0,c=y.length;u=0,i=x-this.sy1[a]<=this.sh[a]&&x-this.sy1[a]>=0),i&&S&&o.push(a);return m=s.create_hit_test_result(),m[\"1d\"].indices=o,m},e.prototype._map_dist_corner_for_data_side_length=function(t,e,r,n,i){var o,s,a,l,u,c,_,h;return null!=r.source_range.synthetic&&(t=function(){var e,n,i;for(i=[],e=0,n=t.length;en;o=0<=n?++r:--r)i.push(Number(t[o])-e[o]/2);return i}(),a=function(){var r,n,i;for(i=[],o=r=0,n=t.length;0<=n?rn;o=0<=n?++r:--r)i.push(Number(t[o])+e[o]/2);return i}(),u=r.v_compute(s),c=r.v_compute(a),l=this.sdist(r,s,e,\"edge\",this.model.dilate),0===i?(_=u[0]e;n=0<=e?++t:--t)i.push(a[n]+r[n]);return i}(),i=s.v_invert(a),o=s.v_invert(l),function(){var t,e,r;for(r=[],n=t=0,e=i.length;0<=e?te;n=0<=e?++t:--t)r.push(Math.abs(o[n]-i[n]));return r}()},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_area_legend(t,e,r,n,i,o)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(o.XYGlyphView),r.Rect=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.RectView,e.prototype.type=\"Rect\",e.mixins([\"line\",\"fill\"]),e.define({angle:[a.AngleSpec,0],width:[a.DistanceSpec],height:[a.DistanceSpec],dilate:[a.Bool,!1]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(9),s=t(35),a=t(106);r.SegmentView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._index_data=function(){var t,e,r,n;for(r=[],t=e=0,n=this._x0.length;0<=n?en;t=0<=n?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t])||r.push({minX:Math.min(this._x0[t],this._x1[t]),minY:Math.min(this._y0[t],this._y1[t]),maxX:Math.max(this._x0[t],this._x1[t]),maxY:Math.max(this._y0[t],this._y1[t]),i:t});return new s.RBush(r)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c;if(a=r.sx0,u=r.sy0,l=r.sx1,c=r.sy1,this.visuals.line.doit){for(s=[],i=0,o=e.length;ir;t=0<=r?++e:--e)this.sleft.push(this.sx[t]-this.sw[t]/2),this.sright.push(this.sx[t]+this.sw[t]/2);return null},e}(o.BoxView),r.VBar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.VBarView,e.prototype.type=\"VBar\",e.coords([[\"x\",\"bottom\"]]),e.define({width:[s.DistanceSpec],top:[s.NumberSpec]}),e.override({bottom:0}),e}(o.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9),a=t(14),l=t(28);r.WedgeView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._map_data=function(){return\"data\"===this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;for(_=r.sx,h=r.sy,c=r.sradius,i=r._start_angle,n=r._end_angle,o=this.model.properties.direction.value(),u=[],a=0,l=e.length;an;t=0<=n?++e:--e)i=this._x[t],s=this._y[t],!isNaN(i+s)&&isFinite(i+s)&&r.push({minX:i,minY:s,maxX:i,maxY:s,i:t});return new o.RBush(r)},e}(s.GlyphView),r.XYGlyph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"XYGlyph\",e.prototype.default_view=r.XYGlyphView,e.coords([[\"x\",\"y\"]]),e}(s.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(21),a=t(9);r.GraphHitTestPolicy=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.do_selection=function(t,e,r,n){return!1},e.prototype.do_inspection=function(t,e,r,n){return!1},e}(o.Model),r.NodesOnly=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"NodesOnly\",e.prototype._do=function(t,e,r,n){var i,o;return o=e.node_view,i=o.glyph.hit_test(t),null!==i&&(this._node_selector.update(i,r,n),!this._node_selector.indices.is_empty())},e.prototype.do_selection=function(t,e,r,n){var i;return this._node_selector=e.node_view.model.data_source.selection_manager.selector,i=this._do(t,e,r,n),e.node_view.model.data_source.selected=this._node_selector.indices,e.node_view.model.data_source.select.emit(),i},e.prototype.do_inspection=function(t,e,r,n){var i;return this._node_selector=e.model.get_selection_manager().get_or_create_inspector(e.node_view.model),i=this._do(t,e,r,n),e.node_view.model.data_source.setv({inspected:this._node_selector.indices},{silent:!0}),e.node_view.model.data_source.inspect.emit([e.node_view,{geometry:t}]),i},e}(r.GraphHitTestPolicy),r.NodesAndLinkedEdges=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"NodesAndLinkedEdges\",e.prototype._do=function(t,e,r,n){var i,o,l,u,c,_,h,p,d,f,y,m,v;if(m=[e.node_view,e.edge_view],y=m[0],l=m[1],u=y.glyph.hit_test(t),null===u)return!1;for(this._node_selector.update(u,r,n),f=function(){var t,e,r,n;for(r=u[\"1d\"].indices,n=[],t=0,e=r.length;tv;c=0<=v?++_:--_)(s.contains(f,o.data.start[c])||s.contains(f,o.data.end[c]))&&i.push(c);for(d=a.create_hit_test_result(),h=0,p=i.length;hl;i=0<=l?++s:--s)o=null!=this.graph_layout[h[i]]&&null!=this.graph_layout[r[i]],n&&o?(p.push(t.data.xs[i]),d.push(t.data.ys[i])):(o?(u=[this.graph_layout[h[i]],this.graph_layout[r[i]]],_=u[0],e=u[1]):(c=[[NaN,NaN],[NaN,NaN]],_=c[0],e=c[1]),p.push([_[0],e[0]]),d.push([_[1],e[1]]));return[p,d]},e.define({graph_layout:[s.Any,{}]}),e}(o.LayoutProvider)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(160),s=t(162),a=t(14),l=t(41);r.GridView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._x_range_name=this.model.x_range_name,this._y_range_name=this.model.y_range_name},e.prototype.render=function(){var t;if(this.model.visible!==!1)return t=this.plot_view.canvas_view.ctx,t.save(),this._draw_regions(t),this._draw_minor_grids(t),this._draw_grids(t),t.restore()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()})},e.prototype._draw_regions=function(t){var e,r,n,i,o,s,a,l,u,c,_,h;if(this.visuals.band_fill.doit)for(n=this.model.grid_coords(\"major\",!1),_=n[0],h=n[1],this.visuals.band_fill.set_value(t),e=r=0,i=_.length-1;0<=i?ri;e=0<=i?++r:--r)e%2===1&&(o=this.plot_view.map_to_screen(_[e],h[e],this._x_range_name,this._y_range_name),a=o[0],u=o[1],s=this.plot_view.map_to_screen(_[e+1],h[e+1],this._x_range_name,this._y_range_name),l=s[0],c=s[1],t.fillRect(a[0],u[0],l[1]-a[0],c[1]-u[0]),t.fill())},e.prototype._draw_grids=function(t){var e,r,n;if(this.visuals.grid_line.doit)return e=this.model.grid_coords(\"major\"),r=e[0],n=e[1],this._draw_grid_helper(t,this.visuals.grid_line,r,n)},e.prototype._draw_minor_grids=function(t){var e,r,n;if(this.visuals.minor_grid_line.doit)return e=this.model.grid_coords(\"minor\"),r=e[0],n=e[1],this._draw_grid_helper(t,this.visuals.minor_grid_line,r,n)},e.prototype._draw_grid_helper=function(t,e,r,n){var i,o,s,a,l,u,c,_;for(e.set_value(t),i=o=0,a=r.length;0<=a?oa;i=0<=a?++o:--o){for(l=this.plot_view.map_to_screen(r[i],n[i],this._x_range_name,this._y_range_name),c=l[0],_=l[1],t.beginPath(),t.moveTo(Math.round(c[0]),Math.round(_[0])),i=s=1,u=c.length;1<=u?su;i=1<=u?++s:--s)t.lineTo(Math.round(c[i]),Math.round(_[i]));t.stroke()}},e}(s.RendererView),r.Grid=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.GridView,e.prototype.type=\"Grid\",e.mixins([\"line:grid_\",\"line:minor_grid_\",\"fill:band_\"]),e.define({bounds:[a.Any,\"auto\"],dimension:[a.Number,0],ticker:[a.Instance],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({level:\"underlay\",band_fill_color:null,band_fill_alpha:0,grid_line_color:\"#e5e5e5\",minor_grid_line_color:null}),e.prototype.ranges=function(){var t,e,r,n;return e=this.dimension,r=(e+1)%2,t=this.plot.plot_canvas.frame,n=[t.x_ranges[this.x_range_name],t.y_ranges[this.y_range_name]],[n[e],n[r]]},e.prototype.computed_bounds=function(){var t,e,r,n,i,o,s;return i=this.ranges(),r=i[0],t=i[1],s=this.bounds,n=[r.min,r.max],l.isArray(s)?(o=Math.min(s[0],s[1]),e=Math.max(s[0],s[1]),on[1]&&(o=null),e>n[1]?e=n[1]:ex;_=0<=x?++p:--p)if(S[_]!==m&&S[_]!==y||!e){for(a=[],l=[],r=2,v=d=0,k=r;0<=k?dk;v=0<=k?++d:--d)f=i+(n-i)/(r-1)*v,a.push(S[_]),l.push(f);o[c].push(a),o[h].push(l)}return o},e}(o.GuideRenderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(130);r.Grid=n.Grid},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(361);n.__exportStar(t(56),r),n.__exportStar(t(71),r),n.__exportStar(t(75),r),n.__exportStar(t(79),r),n.__exportStar(t(81),r),n.__exportStar(t(87),r),n.__exportStar(t(93),r),n.__exportStar(t(111),r),n.__exportStar(t(127),r),n.__exportStar(t(131),r),n.__exportStar(t(135),r),n.__exportStar(t(142),r),n.__exportStar(t(235),r),n.__exportStar(t(145),r),n.__exportStar(t(149),r),n.__exportStar(t(155),r),n.__exportStar(t(161),r),n.__exportStar(t(164),r),n.__exportStar(t(174),r),n.__exportStar(t(184),r),n.__exportStar(t(196),r),n.__exportStar(t(223),r)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e_;n=1<=_?++o:--o)u=this._info(e[n].get_constrained_variables()),a.span.size&&r.push(s.EQ(a.span.start,a.span.size,[-1,u.span.start])),r.push(s.WEAK_EQ(a.whitespace.after,u.whitespace.before,0-this.spacing)),r.push(s.GE(a.whitespace.after,u.whitespace.before,0-this.spacing)),a=u;return this._horizontal?null!=h.width&&r.push(s.EQ(a.span.start,a.span.size,[-1,this._width])):null!=h.height&&r.push(s.EQ(a.span.start,a.span.size,[-1,this._height])),r=r.concat(this._align_outer_edges_constraints(!0),this._align_outer_edges_constraints(!1),this._align_inner_cell_edges_constraints(),this._box_equal_size_bounds(!0),this._box_equal_size_bounds(!1),this._box_cell_align_bounds(!0),this._box_cell_align_bounds(!1),this._box_whitespace(!0),this._box_whitespace(!1))},e.prototype._child_rect=function(t){return{x:t.origin_x,y:t.origin_y,width:t.width,height:t.height}},e.prototype._span=function(t){return this._horizontal?{start:t.x,size:t.width}:{start:t.y,size:t.height}},e.prototype._info=function(t){var e,r;return r=this._horizontal?{\n", " before:t.whitespace_left,after:t.whitespace_right}:{before:t.whitespace_top,after:t.whitespace_bottom},e=this._span(this._child_rect(t)),{span:e,whitespace:r}},e.prototype._flatten_cell_edge_variables=function(t){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x;for(w=t?e._top_bottom_inner_cell_edge_variables:e._left_right_inner_cell_edge_variables,r=t!==this._horizontal,l=this.get_layoutable_children(),i=l.length,c={},o=0,_=0,f=l.length;_1?g[1]:\"\",u=this._horizontal?\"row\":\"col\",v=d+\" \"+u+\"-\"+i+\"-\"+o+\"-\"+b):v=p,v in c?c[v]=c[v].concat(x):c[v]=x;o+=1}return c},e.prototype._align_inner_cell_edges_constraints=function(){var t,e,r,n,i,a,l,u;if(t=[],null!=this.document&&o.call(this.document.roots(),this)>=0){e=this._flatten_cell_edge_variables(this._horizontal);for(i in e)if(u=e[i],u.length>1)for(a=u[0],r=n=1,l=u.length;1<=l?nl;r=1<=l?++n:--n)t.push(s.EQ(u[r],[-1,a]))}return t},e.prototype._find_edge_leaves=function(t){var r,n,i,o,s,a,l,u;if(i=this.get_layoutable_children(),a=[[],[]],i.length>0)if(this._horizontal===t)u=i[0],o=i[i.length-1],u instanceof e?a[0]=a[0].concat(u._find_edge_leaves(t)[0]):a[0].push(u),o instanceof e?a[1]=a[1].concat(o._find_edge_leaves(t)[1]):a[1].push(o);else for(s=0,l=i.length;s1){for(r=t[0],n=i=1,o=t.length;1<=o?io;n=1<=o?++i:--i)e=t[n],l.push(s.EQ([-1,r],e));return null}},e(u),e(n),l},e.prototype._box_insets_from_child_insets=function(t,e,r,n){var i,o,a,l,u,c,_,h,p;return c=this._find_edge_leaves(t),h=c[0],o=c[1],t?(p=e+\"_left\",a=e+\"_right\",u=this[r+\"_left\"],l=this[r+\"_right\"]):(p=e+\"_top\",a=e+\"_bottom\",u=this[r+\"_top\"],l=this[r+\"_bottom\"]),_=[],i=function(t,e,r){var i,o,a,l,u;for(i=[],o=0,l=e.length;o0;)r=n.shift(),r instanceof e&&n.push.apply(n,r.get_layoutable_children()),t[r.toString()]=r.layout_bbox;return console.table(t)},e.prototype.get_all_constraints=function(){var t,e,r,n,i;for(e=this.get_constraints(),i=this.get_layoutable_children(),r=0,n=i.length;r0?this.model._width.value-20+\"px\":\"100%\",this.el.style.width=t)},e.prototype.get_height=function(){var t,e,r,n;e=0,n=this.child_views;for(r in n)i.call(n,r)&&(t=n[r],e+=t.el.scrollHeight);return e+20},e.prototype.get_width=function(){var t,e,r,n,o;if(null!=this.model.width)return this.model.width;o=this.el.scrollWidth+20,n=this.child_views;for(r in n)i.call(n,r)&&(t=n[r],e=t.el.scrollWidth,e>o&&(o=e));return o},e}(l.LayoutDOMView),r.WidgetBox=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"WidgetBox\",e.prototype.default_view=r.WidgetBoxView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),\"fixed\"===this.sizing_mode&&null===this.width&&(this.width=300,o.logger.info(\"WidgetBox mode is fixed, but no width specified. Using default of 300.\")),\"scale_height\"===this.sizing_mode)return o.logger.warn(\"sizing_mode `scale_height` is not experimental for WidgetBox. Please report your results to the bokeh dev team so we can improve.\")},e.prototype.get_constrained_variables=function(){var t;return t=a.extend({},e.__super__.get_constrained_variables.call(this),{on_edge_align_top:this._top,on_edge_align_bottom:this._height_minus_bottom,on_edge_align_left:this._left,on_edge_align_right:this._width_minus_right,box_cell_align_top:this._top,box_cell_align_bottom:this._height_minus_bottom,box_cell_align_left:this._left,box_cell_align_right:this._width_minus_right,box_equal_size_top:this._top,box_equal_size_bottom:this._height_minus_bottom}),\"fixed\"!==this.sizing_mode&&(t.box_equal_size_left=this._left,t.box_equal_size_right=this._width_minus_right),t},e.prototype.get_layoutable_children=function(){return this.children},e.define({children:[s.Array,[]]}),e}(l.LayoutDOM)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(141),a=t(14),l=t(21),u=t(41);n=function(t,e){var r,n,i;if(t.length!==e.length)return!1;for(r=n=0,i=t.length;0<=i?ni;r=0<=i?++n:--n)if(t[r]!==e[r])return!1;return!0},r.CategoricalColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"CategoricalColorMapper\",e.define({factors:[a.Array],start:[a.Number,0],end:[a.Number]}),e.prototype._get_values=function(t,e){var r,i,o,s,a,c;for(c=[],o=0,a=t.length;o=e.length?this.nan_color:e[s],c.push(r);return c},e}(s.ColorMapper)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(240),a=t(41);r.ColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ColorMapper\",e.define({palette:[o.Any],nan_color:[o.Color,\"gray\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._little_endian=this._is_little_endian(),this._palette=this._build_palette(this.palette),this.connect(this.change,function(){return this._palette=this._build_palette(this.palette)})},e.prototype.v_map_screen=function(t,e){var r,n,i,o,s,a,l,u,c,_;if(null==e&&(e=!1),_=this._get_values(t,this._palette,e),r=new ArrayBuffer(4*t.length),this._little_endian)for(n=new Uint8Array(r),i=s=0,l=t.length;0<=l?sl;i=0<=l?++s:--s)c=_[i],o=4*i,n[o]=Math.floor(c/4278190080*255),n[o+1]=(16711680&c)>>16,n[o+2]=(65280&c)>>8,n[o+3]=255&c;else for(n=new Uint32Array(r),i=a=0,u=t.length;0<=u?au;i=0<=u?++a:--a)c=_[i],n[i]=c<<8|255;return r},e.prototype.compute=function(t){return null},e.prototype.v_compute=function(t){var e;return e=this._get_values(t,this.palette)},e.prototype._get_values=function(t,e,r){return null==r&&(r=!1),[]},e.prototype._is_little_endian=function(){var t,e,r,n;return t=new ArrayBuffer(4),r=new Uint8Array(t),e=new Uint32Array(t),e[1]=168496141,n=!0,10===r[4]&&11===r[5]&&12===r[6]&&13===r[7]&&(n=!1),n},e.prototype._build_palette=function(t){var e,r,n,i,o;for(i=new Uint32Array(t.length),e=function(t){return a.isNumber(t)?t:(9!==t.length&&(t+=\"ff\"),parseInt(t.slice(1),16))},r=n=0,o=t.length;0<=o?no;r=0<=o?++n:--n)i[r]=e(t[r]);return i},e}(s.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(140);r.CategoricalColorMapper=n.CategoricalColorMapper;var i=t(141);r.ColorMapper=i.ColorMapper;var o=t(143);r.LinearColorMapper=o.LinearColorMapper;var s=t(144);r.LogColorMapper=s.LogColorMapper},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(25),a=t(21),l=t(141);r.LinearColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LinearColorMapper\",e.define({high:[o.Number],low:[o.Number],high_color:[o.Color],low_color:[o.Color]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._nan_color=this._build_palette([s.color2hex(this.nan_color)])[0],this._high_color=null!=this.high_color?this._build_palette([s.color2hex(this.high_color)])[0]:void 0,this._low_color=null!=this.low_color?this._build_palette([s.color2hex(this.low_color)])[0]:void 0},e.prototype._get_values=function(t,e,r){var n,i,o,s,l,u,c,_,h,p,d,f,y,m,v,g;for(null==r&&(r=!1),c=null!=(m=this.low)?m:a.min(t),i=null!=(v=this.high)?v:a.max(t),h=e.length-1,g=[],p=r?this._nan_color:this.nan_color,_=r?this._low_color:this.low_color,o=r?this._high_color:this.high_color,d=1/(i-c),y=1/e.length,s=0,u=t.length;sh?null!=this.high_color?g.push(o):g.push(e[h]):g.push(e[l])):g.push(e[h]);return g},e}(l.ColorMapper)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o=function(t,e){function r(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=t(14),l=t(25),u=t(21),c=t(141);n=null!=(i=Math.log1p)?i:function(t){return Math.log(1+t)},r.LogColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LogColorMapper\",e.define({high:[a.Number],low:[a.Number],high_color:[a.Color],low_color:[a.Color]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._nan_color=this._build_palette([l.color2hex(this.nan_color)])[0],this._high_color=null!=this.high_color?this._build_palette([l.color2hex(this.high_color)])[0]:void 0,this._low_color=null!=this.low_color?this._build_palette([l.color2hex(this.low_color)])[0]:void 0},e.prototype._get_values=function(t,e,r){var i,o,s,a,l,c,_,h,p,d,f,y,m,v,g,b;for(null==r&&(r=!1),f=e.length,h=null!=(m=this.low)?m:u.min(t),o=null!=(v=this.high)?v:u.max(t),g=f/(n(o)-n(h)),d=e.length-1,b=[],y=r?this._nan_color:this.nan_color,s=r?this._high_color:this.high_color,p=r?this._low_color:this.low_color,a=0,c=t.length;ao?null!=this.high_color?b.push(s):b.push(e[d]):i!==o?id&&(l=d),b.push(e[l])):b.push(e[d]);return b},e}(c.ColorMapper)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w=function(t,e){function r(){this.constructor=t}for(var n in e)x.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},x={}.hasOwnProperty,k=t(146);n=Math.sqrt(3),l=function(t,e){return t.moveTo(-e,e),t.lineTo(e,-e),t.moveTo(-e,-e),t.lineTo(e,e)},o=function(t,e){return t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-e,0),t.lineTo(e,0)},s=function(t,e){return t.moveTo(0,e),t.lineTo(e/1.5,0),t.lineTo(0,-e),t.lineTo(-e/1.5,0),t.closePath()},a=function(t,e){var r,i;return i=e*n,r=i/3,t.moveTo(-e,r),t.lineTo(e,r),t.lineTo(0,r-i),t.closePath()},u=function(t,e,r,n,i,s,a){var u;u=.65*i,o(t,i),l(t,u),s.doit&&(s.set_vectorize(t,e),t.stroke())},c=function(t,e,r,n,i,s,a){t.arc(0,0,i,0,2*Math.PI,!1),a.doit&&(a.set_vectorize(t,e),t.fill()),s.doit&&(s.set_vectorize(t,e),o(t,i),t.stroke())},_=function(t,e,r,n,i,o,s){t.arc(0,0,i,0,2*Math.PI,!1),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),l(t,i),t.stroke())},h=function(t,e,r,n,i,s,a){o(t,i),s.doit&&(s.set_vectorize(t,e),t.stroke())},p=function(t,e,r,n,i,o,a){s(t,i),a.doit&&(a.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),t.stroke())},d=function(t,e,r,n,i,a,l){s(t,i),l.doit&&(l.set_vectorize(t,e),t.fill()),a.doit&&(a.set_vectorize(t,e),o(t,i),t.stroke())},f=function(t,e,r,n,i,o,s){t.rotate(Math.PI),a(t,i),t.rotate(-Math.PI),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),t.stroke())},y=function(t,e,r,n,i,o,s){var a;a=2*i,t.rect(-i,-i,a,a),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),t.stroke())},m=function(t,e,r,n,i,s,a){var l;l=2*i,t.rect(-i,-i,l,l),a.doit&&(a.set_vectorize(t,e),t.fill()),s.doit&&(s.set_vectorize(t,e),o(t,i),t.stroke())},v=function(t,e,r,n,i,o,s){var a;a=2*i,t.rect(-i,-i,a,a),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),l(t,i),t.stroke())},g=function(t,e,r,n,i,o,s){a(t,i),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),t.stroke())},b=function(t,e,r,n,i,o,s){l(t,i),o.doit&&(o.set_vectorize(t,e),t.stroke())},i=function(t,e){var r,n;return n=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return w(r,t),r.prototype._render_one=e,r}(k.MarkerView),r=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return w(r,e),r.prototype.default_view=n,r.prototype.type=t,r}(k.Marker)},r.Asterisk=i(\"Asterisk\",u),r.CircleCross=i(\"CircleCross\",c),r.CircleX=i(\"CircleX\",_),r.Cross=i(\"Cross\",h),r.Diamond=i(\"Diamond\",p),r.DiamondCross=i(\"DiamondCross\",d),r.InvertedTriangle=i(\"InvertedTriangle\",f),r.Square=i(\"Square\",y),r.SquareCross=i(\"SquareCross\",m),r.SquareX=i(\"SquareX\",v),r.Triangle=i(\"Triangle\",g),r.X=i(\"X\",b)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9),a=t(14);r.MarkerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){var s,a,l,u,c,_;return l=[o],c={},c[o]=(e+r)/2,_={},_[o]=(n+i)/2,u={},u[o]=.4*Math.min(Math.abs(r-e),Math.abs(i-n)),s={},s[o]=this._angle[o],a={sx:c,sy:_,_size:u,_angle:s},this._render(t,l,a)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_;for(c=r.sx,_=r.sy,i=r._size,n=r._angle,u=[],s=0,a=e.length;se;0<=e?t++:t--)c.push(t);return c}.apply(this),r=[],n=o=0,l=e.length;0<=l?ol;n=0<=l?++o:--o)i=e[n],s.point_in_poly(this.sx[n],this.sy[n],_,h)&&r.push(i);return u=s.create_hit_test_result(),u[\"1d\"].indices=r,u},e}(o.XYGlyphView),r.Marker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mixins([\"line\",\"fill\"]),e.define({size:[a.DistanceSpec,{units:\"screen\",value:4}],angle:[a.AngleSpec,0]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(13),s=t(148),a=t(150),l=t(14),u=t(49);r.MapOptions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"MapOptions\",e.define({lat:[l.Number],lng:[l.Number],zoom:[l.Number,12]}),e}(u.Model),r.GMapOptions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"GMapOptions\",e.define({map_type:[l.String,\"roadmap\"],scale_control:[l.Bool,!1],styles:[l.String]}),e}(r.MapOptions),r.GMapPlotView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(a.PlotView),r.GMapPlot=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"GMapPlot\",e.prototype.default_view=r.GMapPlotView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),!this.api_key)return o.logger.error(\"api_key is required. See https://developers.google.com/maps/documentation/javascript/get-api-key for more information on how to obtain your own.\");\n", " },e.prototype._init_plot_canvas=function(){return new s.GMapPlotCanvas({plot:this})},e.define({map_options:[l.Instance],api_key:[l.String]}),e}(a.Plot)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o=function(t,e){return function(){return t.apply(e,arguments)}},s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(30),u=t(151),c=t(19);n=new c.Signal(this,\"gmaps_ready\"),i=function(t){var e;return window._bokeh_gmaps_callback=function(){return n.emit()},e=document.createElement(\"script\"),e.type=\"text/javascript\",e.src=\"https://maps.googleapis.com/maps/api/js?key=\"+t+\"&callback=_bokeh_gmaps_callback\",document.body.appendChild(e)},r.GMapPlotCanvasView=function(t){function e(){return this._set_bokeh_ranges=o(this._set_bokeh_ranges,this),this._get_projected_bounds=o(this._get_projected_bounds,this),this._get_latlon_bounds=o(this._get_latlon_bounds,this),e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){var r,o;return this.pause(),e.__super__.initialize.call(this,t),this._tiles_loaded=!1,this.zoom_count=0,r=this.model.plot.map_options,this.initial_zoom=r.zoom,this.initial_lat=r.lat,this.initial_lng=r.lng,this.canvas_view.map_el.style.position=\"absolute\",null==(null!=(o=window.google)?o.maps:void 0)&&(null==window._bokeh_gmaps_callback&&i(this.model.plot.api_key),n.connect(function(t){return function(){return t.request_render()}}(this))),this.unpause()},e.prototype.update_range=function(t){var r,n,i,o,s,a,l,u,c;if(null==t)r=this.model.plot.map_options,this.map.setCenter({lat:this.initial_lat,lng:this.initial_lng}),this.map.setOptions({zoom:this.initial_zoom}),e.__super__.update_range.call(this,null);else if(null!=t.sdx||null!=t.sdy)this.map.panBy(t.sdx,t.sdy),e.__super__.update_range.call(this,t);else if(null!=t.factor){if(10!==this.zoom_count)return void(this.zoom_count+=1);this.zoom_count=0,this.pause(),e.__super__.update_range.call(this,t),c=t.factor<0?-1:1,i=this.map.getZoom(),n=i+c,n>=2&&(this.map.setZoom(n),u=this._get_projected_bounds(),s=u[0],o=u[1],l=u[2],a=u[3],o-s<0&&this.map.setZoom(i)),this.unpause()}return this._set_bokeh_ranges()},e.prototype._build_map=function(){var t,e,r;return e=window.google.maps,this.map_types={satellite:e.MapTypeId.SATELLITE,terrain:e.MapTypeId.TERRAIN,roadmap:e.MapTypeId.ROADMAP,hybrid:e.MapTypeId.HYBRID},r=this.model.plot.map_options,t={center:new e.LatLng(r.lat,r.lng),zoom:r.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[r.map_type],scaleControl:r.scale_control},null!=r.styles&&(t.styles=JSON.parse(r.styles)),this.map=new e.Map(this.canvas_view.map_el,t),e.event.addListener(this.map,\"idle\",function(t){return function(){return t._set_bokeh_ranges()}}(this)),e.event.addListener(this.map,\"bounds_changed\",function(t){return function(){return t._set_bokeh_ranges()}}(this)),e.event.addListenerOnce(this.map,\"tilesloaded\",function(t){return function(){return t._render_finished()}}(this)),this.connect(this.model.plot.properties.map_options.change,function(t){return function(){return t._update_options()}}(this)),this.connect(this.model.plot.map_options.properties.styles.change,function(t){return function(){return t._update_styles()}}(this)),this.connect(this.model.plot.map_options.properties.lat.change,function(t){return function(){return t._update_center(\"lat\")}}(this)),this.connect(this.model.plot.map_options.properties.lng.change,function(t){return function(){return t._update_center(\"lng\")}}(this)),this.connect(this.model.plot.map_options.properties.zoom.change,function(t){return function(){return t._update_zoom()}}(this)),this.connect(this.model.plot.map_options.properties.map_type.change,function(t){return function(){return t._update_map_type()}}(this)),this.connect(this.model.plot.map_options.properties.scale_control.change,function(t){return function(){return t._update_scale_control()}}(this))},e.prototype._render_finished=function(){return this._tiles_loaded=!0,this.notify_finished()},e.prototype.has_finished=function(){return e.__super__.has_finished.call(this)&&this._tiles_loaded===!0},e.prototype._get_latlon_bounds=function(){var t,e,r,n,i,o,s;return e=this.map.getBounds(),r=e.getNorthEast(),t=e.getSouthWest(),i=t.lng(),n=r.lng(),s=t.lat(),o=r.lat(),[i,n,s,o]},e.prototype._get_projected_bounds=function(){var t,e,r,n,i,o,s,a,u,c,_;return i=this._get_latlon_bounds(),u=i[0],a=i[1],_=i[2],c=i[3],o=l.proj4(l.mercator,[u,_]),e=o[0],n=o[1],s=l.proj4(l.mercator,[a,c]),t=s[0],r=s[1],[e,t,n,r]},e.prototype._set_bokeh_ranges=function(){var t,e,r,n,i;return i=this._get_projected_bounds(),e=i[0],t=i[1],n=i[2],r=i[3],this.frame.x_range.setv({start:e,end:t}),this.frame.y_range.setv({start:n,end:r})},e.prototype._update_center=function(t){var e;return e=this.map.getCenter().toJSON(),e[t]=this.model.plot.map_options[t],this.map.setCenter(e),this._set_bokeh_ranges()},e.prototype._update_map_type=function(){var t;return t=window.google.maps,this.map.setOptions({mapTypeId:this.map_types[this.model.plot.map_options.map_type]})},e.prototype._update_scale_control=function(){var t;return t=window.google.maps,this.map.setOptions({scaleControl:this.model.plot.map_options.scale_control})},e.prototype._update_options=function(){return this._update_styles(),this._update_center(\"lat\"),this._update_center(\"lng\"),this._update_zoom(),this._update_map_type()},e.prototype._update_styles=function(){return this.map.setOptions({styles:JSON.parse(this.model.plot.map_options.styles)})},e.prototype._update_zoom=function(){return this.map.setOptions({zoom:this.model.plot.map_options.zoom}),this._set_bokeh_ranges()},e.prototype._map_hook=function(t,e){var r,n,i,o,s;if(n=e[0],o=e[1],s=e[2],r=e[3],this.canvas_view.map_el.style.top=o+\"px\",this.canvas_view.map_el.style.left=n+\"px\",this.canvas_view.map_el.style.width=s+\"px\",this.canvas_view.map_el.style.height=r+\"px\",null==this.map&&null!=(null!=(i=window.google)?i.maps:void 0))return this._build_map()},e.prototype._paint_empty=function(t,e){var r,n,i,o,s,a;return s=this.canvas._width.value,o=this.canvas._height.value,i=e[0],a=e[1],n=e[2],r=e[3],t.clearRect(0,0,s,o),t.beginPath(),t.moveTo(0,0),t.lineTo(0,o),t.lineTo(s,o),t.lineTo(s,0),t.lineTo(0,0),t.moveTo(i,a),t.lineTo(i+n,a),t.lineTo(i+n,a+r),t.lineTo(i,a+r),t.lineTo(i,a),t.closePath(),t.fillStyle=this.model.plot.border_fill_color,t.fill()},e}(u.PlotCanvasView),r.GMapPlotCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type=\"GMapPlotCanvas\",e.prototype.default_view=r.GMapPlotCanvasView,e.prototype.initialize=function(t,r){return this.use_map=!0,e.__super__.initialize.call(this,t,r)},e}(u.PlotCanvas)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(147);r.MapOptions=n.MapOptions;var i=t(147);r.GMapOptions=i.GMapOptions;var o=t(147);r.GMapPlot=o.GMapPlot;var s=t(148);r.GMapPlotCanvas=s.GMapPlotCanvas;var a=t(150);r.Plot=a.Plot;var l=t(151);r.PlotCanvas=l.PlotCanvas},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(12),a=t(13),l=t(14),u=t(29),c=t(41),_=t(136),h=t(64),p=t(165),d=t(230),f=t(151),y=t(170),m=t(158),v=t(3);r.PlotView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-plot-layout\",e.prototype.connect_signals=function(){var t;return e.__super__.connect_signals.call(this),t=\"Title object cannot be replaced. Try changing properties on title to update it after initialization.\",this.connect(this.model.properties.title.change,function(e){return function(){return a.logger.warn(t)}}(this))},e.prototype.render=function(){var t,r,n;if(e.__super__.render.call(this),\"scale_both\"===this.model.sizing_mode)return r=this.get_width_height(),n=r[0],t=r[1],this.solver.suggest_value(this.model._width,n),this.solver.suggest_value(this.model._height,t),this.solver.update_variables(),this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"},e.prototype.get_width_height=function(){var t,e,r,n,i,o,s,a,l;return s=this.el.parentNode.clientHeight,a=this.el.parentNode.clientWidth,t=this.model.get_aspect_ratio(),i=a,r=a/t,o=s*t,n=s,i=0},e.prototype.can_redo=function(){return this.state.index=0?a.push(e.selected=t[s.id]):a.push(void 0)):a.push(e.selection_manager.clear()));return a},e.prototype.reset_selection=function(){return this.update_selection(null)},e.prototype._update_ranges_together=function(t){var e,r,n,i,o,s,a,l,u,c;for(c=1,e=0,n=t.length;ey.end,r||(m=this._get_weight_to_constrain_interval(y,_),m<1&&(_.start=m*_.start+(1-m)*y.start,_.end=m*_.end+(1-m)*y.end)),null!=y.bounds&&(u=y.bounds[0],l=y.bounds[1],c=Math.abs(_.end-_.start),f?(null!=u&&u>=_.end&&(n=!0,_.end=u,null==e&&null==r||(_.start=u+c)),null!=l&&l<=_.start&&(n=!0,_.start=l,null==e&&null==r||(_.end=l-c))):(null!=u&&u>=_.start&&(n=!0,_.start=u,null==e&&null==r||(_.end=u+c)),null!=l&&l<=_.end&&(n=!0,_.end=l,null==e&&null==r||(_.start=l-c))));if(!r||!n){for(d=[],o=0,a=t.length;o0&&a0&&a>n&&(c=(n-l)/(a-l)),c=Math.max(0,Math.min(1,c))),c},e.prototype.update_range=function(t,e,r){var n,i,o,s,a,l,u;if(this.pause(),null==t){o=this.frame.x_ranges;for(n in o)u=o[n],u.reset();s=this.frame.y_ranges;for(n in s)u=s[n],u.reset();this.update_dataranges()}else{i=[],a=this.frame.x_ranges;for(n in a)u=a[n],i.push([u,t.xrs[n]]);l=this.frame.y_ranges;for(n in l)u=l[n],i.push([u,t.yrs[n]]);r&&this._update_ranges_together(i),this._update_ranges_individually(i,e,r)}return this.unpause()},e.prototype.reset_range=function(){return this.update_range(null)},e.prototype.build_levels=function(){var t,e,r,n,i,o,s,a,l,u,c;for(l=this.model.plot.all_renderers,a=Object.keys(this.renderer_views),s=v.build_views(this.renderer_views,l,this.view_options()),u=E.difference(a,function(){var t,e,r;for(r=[],t=0,e=l.length;ti&&(t.interactive=!1),t.request_render()}}(this),i)):(this.interactive=!1,this.lod_started&&(this.model.plot.trigger_event(new b.LODEnd({})),this.lod_started=!1)),s=this.renderer_views;for(n in s)if(a=s[n],null==this.range_update_timestamp||a.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}return this.model.frame._update_scales(),t=this.canvas_view.ctx,t.pixel_ratio=o=this.canvas.pixel_ratio,t.save(),t.scale(o,o),t.translate(.5,.5),e=[this.canvas.vx_to_sx(this.frame._left.value),this.canvas.vy_to_sy(this.frame._top.value),this.frame._width.value,this.frame._height.value],this._map_hook(t,e),this._paint_empty(t,e),this.prepare_webgl(o,e),t.save(),this.visuals.outline_line.doit&&(this.visuals.outline_line.set_value(t),u=e[0],c=e[1],l=e[2],r=e[3],u+l===this.canvas._width.value&&(l-=1),c+r===this.canvas._height.value&&(r-=1),t.strokeRect(u,c,l,r)),t.restore(),this._paint_levels(t,[\"image\",\"underlay\",\"glyph\"],e),this.blit_webgl(o),this._paint_levels(t,[\"annotation\"],e),this._paint_levels(t,[\"overlay\"]),null==this.initial_range_info&&this.set_initial_range(),t.restore(),this._has_finished?void 0:(this._has_finished=!0,this.notify_finished())}},e.prototype._paint_levels=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y;for(t.save(),null!=r&&\"canvas\"===this.model.plot.output_backend&&(t.beginPath(),t.rect.apply(t,r),t.clip()),i={},h=this.model.plot.renderers,n=o=0,a=h.length;o0)for(e(M.EQ(i(t).panel._bottom,[-1,this.above_panel._bottom])),e(M.LE(m(t).panel._top,[-1,this.above_panel._top])),e.apply(null,E.pairwise(t,function(t,e){return M.EQ(t.panel._top,[-1,e.panel._bottom])})),o=0,l=t.length;o0)for(e(M.EQ(i(r).panel._top,[-1,this.below_panel._top])),e(M.GE(m(r).panel._bottom,[-1,this.below_panel._bottom])),e.apply(null,E.pairwise(r,function(t,e){return M.EQ(t.panel._bottom,[-1,e.panel._top])})),s=0,u=r.length;s0)for(e(M.EQ(i(a).panel._right,[-1,this.left_panel._right])),e(M.GE(m(a).panel._left,[-1,this.left_panel._left])),e.apply(null,E.pairwise(a,function(t,e){return M.EQ(t.panel._left,[-1,e.panel._right])})),p=0,c=a.length;p0)for(e(M.EQ(i(y).panel._left,[-1,this.right_panel._left])),e(M.LE(m(y).panel._right,[-1,this.right_panel._right])),e.apply(null,E.pairwise(y,function(t,e){return M.EQ(t.panel._right,[-1,e.panel._left])})),d=0,h=y.length;d0&&(_=function(){var t,e,r;for(r=[],t=0,e=_.length;t=0&&r.push(u);return r}()),a.logger.debug(\"computed \"+_.length+\" renderers for DataRange1d \"+this.id),r=0,i=_.length;ri&&(\"start\"===this.follow?n=f+o*i:\"end\"===this.follow&&(f=n-o*i)),[f,n]},e.prototype.update=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p;if(!this.have_updated_interactively)return h=this.computed_renderers(),this.plot_bounds[r]=this._compute_plot_bounds(h,t),u=this._compute_min_max(this.plot_bounds,e),a=u[0],s=u[1],c=this._compute_range(a,s),p=c[0],o=c[1],null!=this._initial_start&&(\"log\"===this.scale_hint?this._initial_start>0&&(p=this._initial_start):p=this._initial_start),null!=this._initial_end&&(\"log\"===this.scale_hint?this._initial_end>0&&(o=this._initial_end):o=this._initial_end),_=[this.start,this.end],i=_[0],n=_[1],p===i&&o===n||(l={},p!==i&&(l.start=p),o!==n&&(l.end=o),this.setv(l)),\"auto\"===this.bounds&&this.setv({bounds:[p,o]},{silent:!0}),this.change.emit()},e.prototype.reset=function(){return this.have_updated_interactively=!1,this.setv({range_padding:this._initial_range_padding,range_padding_units:this._initial_range_padding_units,follow:this._initial_follow,follow_interval:this._initial_follow_interval,default_span:this._initial_default_span},{silent:!0}),this.change.emit()},e}(o.DataRange)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(156),s=t(14),a=t(21),l=t(41);r.map_one_level=function(t,e,r){var n,i,o,s,a;for(null==r&&(r=0),a={},i=o=0,s=t.length;o=0,a=o.call(r.mixins,\"line\")>=0,i=p.clone(r.attributes),delete i.id,c=function(t){var e;return e=p.clone(i),s&&p.extend(e,t.fill),a&&p.extend(e,t.line),new r.constructor(e)},this.glyph=this.build_glyph_view(r),d=this.model.selection_glyph,null==d?d=c({fill:{},line:{}}):\"auto\"===d&&(d=c(this.model.selection_defaults)),this.selection_glyph=this.build_glyph_view(d),h=this.model.nonselection_glyph,null==h?h=c({fill:{},line:{}}):\"auto\"===h&&(h=c(this.model.nonselection_defaults)),this.nonselection_glyph=this.build_glyph_view(h),u=this.model.hover_glyph,null!=u&&(this.hover_glyph=this.build_glyph_view(u)),_=this.model.muted_glyph,null!=_&&(this.muted_glyph=this.build_glyph_view(_)),n=c(this.model.decimated_defaults),this.decimated_glyph=this.build_glyph_view(n),this.xscale=this.plot_view.frame.xscales[this.model.x_range_name],this.yscale=this.plot_view.frame.yscales[this.model.y_range_name],this.set_data(!1),this.model.data_source instanceof l.RemoteDataSource)return this.model.data_source.setup()},e.getters({xmapper:function(){return log.warning(\"xmapper attr is deprecated, use xscale\"),this.xscale},ymapper:function(){return log.warning(\"ymapper attr is deprecated, use yscale\"),this.yscale}}),e.prototype.build_glyph_view=function(t){return new t.default_view({model:t,renderer:this,plot_view:this.plot_view,parent:this})},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()}),this.connect(this.model.glyph.change,function(){return this.set_data()}),this.connect(this.model.data_source.change,function(){return this.set_data()}),this.connect(this.model.data_source.streaming,function(){return this.set_data()}),this.connect(this.model.data_source.patching,function(t){return this.set_data(!0,t)}),this.connect(this.model.data_source.select,function(){return this.request_render()}),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,function(){return this.request_render()}),this.connect(this.model.properties.view.change,function(){return this.set_data()}),this.connect(this.model.view.change,function(){return this.set_data()}),this.connect(this.model.glyph.transformchange,function(){return this.set_data()})},e.prototype.have_selection_glyphs=function(){return null!=this.selection_glyph&&null!=this.nonselection_glyph},e.prototype.set_data=function(t,e){var r,n,i,o,s,a,l;for(null==t&&(t=!0),l=Date.now(),a=this.model.data_source,this.all_indices=this.model.view.indices,this.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.glyph.set_data(a,this.all_indices,e),this.glyph.set_visuals(a),this.decimated_glyph.set_visuals(a),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(a),this.nonselection_glyph.set_visuals(a)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(a),null!=this.muted_glyph&&this.muted_glyph.set_visuals(a),o=this.plot_model.plot.lod_factor,this.decimated=[],n=i=0,s=Math.floor(this.all_indices.length/o);0<=s?is;n=0<=s?++i:--i)this.decimated.push(this.all_indices[n*o]);if(r=Date.now()-l,c.logger.debug(this.glyph.model.type+\" GlyphRenderer (\"+this.model.id+\"): set_data finished in \"+r+\"ms\"),this.set_data_timestamp=Date.now(),t)return this.request_render()},e.prototype.render=function(){var t,e,r,n,i,s,l,u,_,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A;if(this.model.visible){if(S=Date.now(),l=this.glyph.glglyph,T=Date.now(),this.glyph.map_data(),e=Date.now()-S,O=Date.now(),p=this.glyph.mask_data(this.all_indices),r=Date.now()-O,t=this.plot_view.canvas_view.ctx,t.save(),x=this.model.data_source.selected,x=x&&0!==x.length?x[\"0d\"].glyph?this.glyph instanceof a.LineView?p:this.model.view.convert_indices_from_subset(p):x[\"1d\"].indices.length>0?x[\"1d\"].indices:function(){var t,e,r,n;for(r=Object.keys(x[\"2d\"].indices),n=[],t=0,e=r.length;t0?d[\"1d\"].indices:function(){var t,e,r,n;for(r=Object.keys(d[\"2d\"].indices),n=[],t=0,e=r.length;t=0&&n.push(_);return n}.call(this),g=this.plot_model.plot.lod_threshold,this.plot_view.interactive&&!l&&null!=g&&this.all_indices.length>g?(p=this.decimated,u=this.decimated_glyph,w=this.decimated_glyph,M=this.selection_glyph):(u=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,w=this.nonselection_glyph,M=this.selection_glyph),null!=this.hover_glyph&&d.length&&(p=h.difference(p,d)),x.length&&this.have_selection_glyphs()){for(A=Date.now(),k={},f=0,m=x.length;f0&&(i=n))),i},e.prototype.hit_test_helper=function(t,e,r,n,i){var o,s,a,l;return!!this.visible&&(o=e.glyph.hit_test(t),null!==o&&(s=this.view.convert_selection_from_subset(o),\"select\"===i?(l=this.data_source.selection_manager.selector,l.update(s,r,n),this.data_source.selected=l.indices,this.data_source.select.emit()):(a=this.data_source.selection_manager.get_or_create_inspector(this),a.update(s,!0,!1,!0),this.data_source.setv({inspected:a.indices},{silent:!0}),this.data_source.inspect.emit([e,{geometry:t}])),!s.is_empty()))},e.prototype.get_selection_manager=function(){return this.data_source.selection_manager},e.define({x_range_name:[_.String,\"default\"],y_range_name:[_.String,\"default\"],data_source:[_.Instance],view:[_.Instance,function(){return new u.CDSView}],glyph:[_.Instance],hover_glyph:[_.Instance],nonselection_glyph:[_.Any,\"auto\"],selection_glyph:[_.Any,\"auto\"],muted_glyph:[_.Instance],muted:[_.Bool,!1]}),e.override({level:\"glyph\"}),e.prototype.selection_defaults={fill:{},line:{}},e.prototype.decimated_defaults={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},e.prototype.nonselection_defaults={fill:{fill_alpha:.2,line_alpha:.2},line:{}},e}(s.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(162),s=t(126),a=t(14),l=t(4);r.GraphRendererView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this.xscale=this.plot_view.frame.xscales[\"default\"],this.yscale=this.plot_view.frame.yscales[\"default\"],this._renderer_views={},r=l.build_views(this._renderer_views,[this.model.node_renderer,this.model.edge_renderer],this.plot_view.view_options()),this.node_view=r[0],this.edge_view=r[1],this.set_data()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.layout_provider.change,function(){return this.set_data()}),this.connect(this.model.node_renderer.data_source.select,function(){return this.set_data()}),this.connect(this.model.node_renderer.data_source.inspect,function(){return this.set_data()}),this.connect(this.model.edge_renderer.data_source.select,function(){return this.set_data()}),this.connect(this.model.edge_renderer.data_source.inspect,function(){return this.set_data()})},e.prototype.set_data=function(t){var e,r;if(null==t&&(t=!0),this.node_view.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.edge_view.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),e=this.model.layout_provider.get_node_coordinates(this.model.node_renderer.data_source),this.node_view.glyph._x=e[0],this.node_view.glyph._y=e[1],r=this.model.layout_provider.get_edge_coordinates(this.model.edge_renderer.data_source),this.edge_view.glyph._xs=r[0],this.edge_view.glyph._ys=r[1],this.node_view.glyph.index=this.node_view.glyph._index_data(),this.edge_view.glyph.index=this.edge_view.glyph._index_data(),t)return this.request_render()},e.prototype.render=function(){return this.edge_view.render(),this.node_view.render()},e.prototype.hit_test=function(t,e,r,n){var i,o,s;return null==n&&(n=\"select\"),!!this.model.visible&&(i=!1,i=\"select\"===n?null!=(o=this.model.selection_policy)?o.do_selection(t,this,e,r):void 0:null!=(s=this.model.inspection_policy)?s.do_inspection(t,this,e,r):void 0)},e}(o.RendererView),r.GraphRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.GraphRendererView,e.prototype.type=\"GraphRenderer\",e.prototype.get_selection_manager=function(){return this.node_renderer.data_source.selection_manager},e.define({x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],layout_provider:[a.Instance],node_renderer:[a.Instance],edge_renderer:[a.Instance],selection_policy:[a.Instance,function(){return new s.NodesOnly}],inspection_policy:[a.Instance,function(){return new s.NodesOnly}]}),e.override({level:\"glyph\"}),e}(o.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(162),s=t(14);r.GuideRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"GuideRenderer\",e.define({plot:[s.Instance]}),e.override({level:\"overlay\"}),e}(o.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(158);r.GlyphRenderer=n.GlyphRenderer;var i=t(159);r.GraphRenderer=i.GraphRenderer;var o=t(160);r.GuideRenderer=o.GuideRenderer;var s=t(162);r.Renderer=s.Renderer},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(6),s=t(45),a=t(14),l=t(31),u=t(29),c=t(49);r.RendererView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view=t.plot_view,this.visuals=new s.Visuals(this.model),this._has_finished=!0},e.getters({plot_model:function(){return this.plot_view.model}}),e.prototype.request_render=function(){return this.plot_view.request_render()},e.prototype.set_data=function(t){var e,r,n;if(e=this.model.materialize_dataspecs(t),u.extend(this,e),this.plot_model.use_map&&(null!=this._x&&(r=l.project_xy(this._x,this._y),this._x=r[0],this._y=r[1]),null!=this._xs))return n=l.project_xsys(this._xs,this._ys),this._xs=n[0],this._ys=n[1],n},e.prototype.map_to_screen=function(t,e){return this.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},e}(o.DOMView),r.Renderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Renderer\",e.define({level:[a.RenderLevel,null],visible:[a.Bool,!0]}),e}(c.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(165);r.CategoricalScale=function(t){function e(){\n", " return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"CategoricalScale\",e.prototype.compute=function(t){return e.__super__.compute.call(this,this.source_range.synthetic(t))},e.prototype.v_compute=function(t){return e.__super__.v_compute.call(this,this.source_range.v_synthetic(t))},e}(o.LinearScale)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(163);r.CategoricalScale=n.CategoricalScale;var i=t(165);r.LinearScale=i.LinearScale;var o=t(166);r.LogScale=o.LogScale;var s=t(167);r.Scale=s.Scale},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(167);r.LinearScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LinearScale\",e.prototype.compute=function(t){var e,r,n;return n=this._compute_state(),e=n[0],r=n[1],e*t+r},e.prototype.v_compute=function(t){var e,r,n,i,o,s,a,l;for(s=this._compute_state(),e=s[0],o=s[1],a=new Float64Array(t.length),n=r=0,i=t.length;rc;n=0<=c?++s:--s)h[n]=0;else for(n=a=0,_=t.length;0<=_?a<_:a>_;n=0<=_?++a:--a)e=(Math.log(t[n])-o)/i,p=isFinite(e)?e*r+l:NaN,h[n]=p;return h},e.prototype.invert=function(t){var e,r,n,i,o,s;return o=this._compute_state(),e=o[0],i=o[1],r=o[2],n=o[3],s=(t-i)/e,Math.exp(r*s+n)},e.prototype.v_invert=function(t){var e,r,n,i,o,s,a,l,u,c;for(a=this._compute_state(),e=a[0],s=a[1],n=a[2],i=a[3],u=new Float64Array(t.length),r=o=0,l=t.length;0<=l?ol;r=0<=l?++o:--o)c=(t[r]-s)/e,u[r]=Math.exp(n*c+i);return u},e.prototype._get_safe_factor=function(t,e){var r,n,i,o;return o=t<0?0:t,r=e<0?0:e,o===r&&(0===o?(i=[1,10],o=i[0],r=i[1]):(n=Math.log(o)/Math.log(10),o=Math.pow(10,Math.floor(n)),r=Math.ceil(n)!==Math.floor(n)?Math.pow(10,Math.ceil(n)):Math.pow(10,Math.ceil(n)+1))),[o,r]},e.prototype._compute_state=function(){var t,e,r,n,i,o,s,a,l,u,c,_;return l=this.source_range.start,a=this.source_range.end,_=this.target_range.start,c=this.target_range.end,s=c-_,o=this._get_safe_factor(l,a),u=o[0],t=o[1],0===u?(r=Math.log(t),n=0):(r=Math.log(t)-Math.log(u),n=Math.log(u)),e=s,i=_,[e,i,r,n]},e}(o.Scale)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(235),s=t(14);r.Scale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.internal({source_range:[s.Any],target_range:[s.Any]}),e.prototype.map_to_target=function(t){return this.compute(t)},e.prototype.v_map_to_target=function(t){return this.v_compute(t)},e.prototype.map_from_target=function(t){return this.invert(t)},e.prototype.v_map_from_target=function(t){return this.v_invert(t)},e}(o.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(175),a=t(13),l=t(14);r.AjaxDataSource=function(t){function e(){return this.get_data=n(this.get_data,this),this.setup=n(this.setup,this),this.destroy=n(this.destroy,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"AjaxDataSource\",e.define({mode:[l.String,\"replace\"],content_type:[l.String,\"application/json\"],http_headers:[l.Any,{}],max_size:[l.Number],method:[l.String,\"POST\"],if_modified:[l.Bool,!1]}),e.prototype.destroy=function(){if(null!=this.interval)return clearInterval(this.interval)},e.prototype.setup=function(){if(null==this.initialized&&(this.initialized=!0,this.get_data(this.mode),this.polling_interval))return this.interval=setInterval(this.get_data,this.polling_interval,this.mode,this.max_size,this.if_modified)},e.prototype.get_data=function(t,e,r){var n,i,o,s;null==e&&(e=0),null==r&&(r=!1),s=new XMLHttpRequest,s.open(this.method,this.data_url,!0),s.withCredentials=!1,s.setRequestHeader(\"Content-Type\",this.content_type),i=this.http_headers;for(n in i)o=i[n],s.setRequestHeader(n,o);return s.addEventListener(\"load\",function(r){return function(){var n,i,o,a,l,u;if(200===s.status)switch(i=JSON.parse(s.responseText),t){case\"replace\":return r.data=i;case\"append\":for(l=r.data,u=r.columns(),o=0,a=u.length;o0?this.indices=a.intersection.apply(this,e):this.source instanceof l.ColumnarDataSource&&(this.indices=null!=(n=this.source)?n.get_indices():void 0),this.indices_map_to_subset()},e.prototype.indices_map_to_subset=function(){var t,e,r,n;for(this.indices_map={},n=[],t=e=0,r=this.indices.length;0<=r?er;t=0<=r?++e:--e)n.push(this.indices_map[this.indices[t]]=t);return n},e.prototype.convert_selection_from_subset=function(t){var e,r;return r=function(){var r,n,i,o;for(i=t[\"1d\"].indices,o=[],r=0,n=i.length;rn&&(t=t.slice(-n)),t;if(p=t.length+e.length,null!=n&&p>n){for(_=p-n,i=t.length,t.lengthu;o=l<=u?++s:--s)t[o-_]=t[o];for(o=a=0,c=e.length;0<=c?ac;o=0<=c?++a:--a)t[o+(i-_)]=e[o];return t}return h=new t.constructor(e),r.concat_typed_arrays(t,h)},r.slice=function(t,e){var r,n,i,o,s,a,l;return c.isObject(t)?[null!=(r=t.start)?r:0,null!=(n=t.stop)?n:e,null!=(i=t.step)?i:1]:(o=[t,t+1,1],s=o[0],l=o[1],a=o[2],o)},r.patch_to_column=function(t,e,n){var i,o,s,a,u,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C;for(w=new l.Set,x=!1,m=0,v=e.length;m0?gO;o=g+=P)for(p=b=A=d,E=y,j=f;j>0?bE;p=b+=j)x&&w.push(p),h[o*z[1]+p]=C[i],i++;return w},r.ColumnDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ColumnDataSource\",e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),r=u.decode_column_data(this.data),this.data=r[0],this._shapes=r[1],r},e.define({data:[a.Any,{}]}),e.prototype.attributes_as_json=function(t,r){var n,o,s,a;null==t&&(t=!0),null==r&&(r=e._value_to_json),n={},s=this.serializable_attributes();for(o in s)i.call(s,o)&&(a=s[o],\"data\"===o&&(a=u.encode_column_data(a,this._shapes)),t?n[o]=a:o in this._set_after_defaults&&(n[o]=a));return r(\"attributes\",n,this)},e._value_to_json=function(t,e,r){return c.isObject(e)&&\"data\"===t?u.encode_column_data(e,r._shapes):s.HasProps._value_to_json(t,e,r)},e.prototype.stream=function(t,e){var n,i,o;n=this.data;for(i in t)o=t[i],n[i]=r.stream_to_column(n[i],t[i],e);return this.setv(\"data\",n,{silent:!0}),this.streaming.emit()},e.prototype.patch=function(t){var e,n,i,o;e=this.data,o=new l.Set;for(n in t)i=t[n],o=o.union(r.patch_to_column(e[n],i,this._shapes[n]));return this.setv(\"data\",e,{silent:!0}),this.patching.emit(o.values)},e}(o.ColumnarDataSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(172),s=t(19),a=t(13),l=t(16),u=t(14),c=t(21);r.ColumnarDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ColumnarDataSource\",e.define({column_names:[u.Array,[]]}),e.internal({selection_manager:[u.Instance,function(t){return new l.SelectionManager({source:t})}],inspected:[u.Any],_shapes:[u.Any,{}]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.select=new s.Signal(this,\"select\"),this.inspect=new s.Signal(this,\"inspect\"),this.streaming=new s.Signal(this,\"streaming\"),this.patching=new s.Signal(this,\"patching\")},e.prototype.get_column=function(t){var e;return null!=(e=this.data[t])?e:null},e.prototype.columns=function(){return Object.keys(this.data)},e.prototype.get_length=function(t){var e,r,n,i;switch(null==t&&(t=!0),r=c.uniq(function(){var t,r;t=this.data,r=[];for(e in t)i=t[e],r.push(i.length);return r}.call(this)),r.length){case 0:return null;case 1:return r[0];default:if(n=\"data source has columns of inconsistent lengths\",t)return a.logger.warn(n),r.sort()[0];throw new Error(n)}},e.prototype.get_indices=function(){var t,e;return t=this.get_length(),null==t&&(t=1),function(){e=[];for(var r=0;0<=t?rt;0<=t?r++:r--)e.push(r);return e}.apply(this)},e}(o.DataSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(9),a=t(14),l=t(41);r.DataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"DataSource\",e.define({selected:[a.Any,s.create_hit_test_result()],callback:[a.Any]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.properties.selected.change,function(t){return function(){var e;if(e=t.callback,null!=e)return l.isFunction(e)?e(t):e.execute(t)}}(this))},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(171),s=t(13),a=t(14);r.GeoJSONDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"GeoJSONDataSource\",e.define({geojson:[a.Any]}),e.internal({data:[a.Any,{}]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._update_data(),this.connect(this.properties.geojson.change,function(t){return function(){return t._update_data()}}(this))},e.prototype._update_data=function(){return this.data=this.geojson_to_column_data()},e.prototype._get_new_list_array=function(t){var e,r,n,i;for(i=[],e=r=0,n=t;0<=n?rn;e=0<=n?++r:--r)i.push([]);return i},e.prototype._get_new_nan_array=function(t){var e,r,n,i;for(i=[],e=r=0,n=t;0<=n?rn;e=0<=n?++r:--r)i.push(NaN);return i},e.prototype._flatten_function=function(t,e){return t.concat([[NaN,NaN,NaN]]).concat(e)},e.prototype._add_properties=function(t,e,r,n){var i,o;o=[];for(i in t.properties)e.hasOwnProperty(i)||(e[i]=this._get_new_nan_array(n)),o.push(e[i][r]=t.properties[i]);return o},e.prototype._add_geometry=function(t,e,r){var n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E;switch(t.type){case\"Point\":return i=t.coordinates,e.x[r]=i[0],e.y[r]=i[1],e.z[r]=null!=(w=i[2])?w:NaN;case\"LineString\":for(n=t.coordinates,O=[],u=c=0,h=n.length;c1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),o=t.coordinates[0],P=[],u=_=0,p=o.length;_1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),a.push(b[0]);for(l=a.reduce(this._flatten_function),E=[],u=g=0,y=l.length;gr&&io)break;return n},r.DaysTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type=\"DaysTicker\",e.define({days:[_.Array,[]]}),e.prototype.initialize=function(t,r){var i,o;return t.num_minor_ticks=0,e.__super__.initialize.call(this,t,r),i=this.days,o=i.length>1?(i[1]-i[0])*n:31*n,this.interval=o},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var s,a,l,u,c,_,p,d,f;return d=o(t,e),c=this.days,_=function(t){return function(t,e){var r,n,o,s,a,l;for(r=[],a=0,l=c.length;a0&&D.length>0){for(S=_/A,T=function(){var t,e,r;for(r=[],c=t=0,e=A;0<=e?te;c=0<=e?++t:--t)r.push(c*S);return r}(),j=T.slice(1,+T.length+1||9e9),h=0,f=j.length;h0&&D.length>0){for(S=Math.pow(i,_)/A,T=function(){var t,e,r;for(r=[],c=t=1,e=A;1<=e?t<=e:t>=e;c=1<=e?++t:--t)r.push(c*S);return r}(),M=0,v=T.length;Mo)break;return n},r.MonthsTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type=\"MonthsTicker\",e.define({months:[_.Array,[]]}),e.prototype.initialize=function(t,r){var i,o;return e.__super__.initialize.call(this,t,r),o=this.months,i=o.length>1?(o[1]-o[0])*n:12*n,this.interval=i},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var s,a,l,u,c,_,p,d;return d=o(t,e),c=this.months,_=function(t){return c.map(function(e){var r;return r=i(t),r.setUTCMonth(e),r})},u=h.concat(function(){\n", " var t,e,r;for(r=[],t=0,e=d.length;t0&&M.length>0){for(m=c/b,v=function(){var t,e,r;for(r=[],u=t=0,e=b;0<=e?te;u=0<=e?++t:--t)r.push(u*m);return r}(),w=v.slice(1,+v.length+1||9e9),_=0,d=w.length;_50))return t.constructor===Array?Array.prototype.push.apply(this.images,t):this.images.push(t)},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(49);r.ImageSource=function(t){function e(t){null==t&&(t={}),e.__super__.constructor.apply(this,arguments),this.images={},this.normalize_case()}return n(e,t),e.prototype.type=\"ImageSource\",e.define({url:[o.String,\"\"],extra_url_vars:[o.Any,{}]}),e.prototype.normalize_case=function(){\"Note: should probably be refactored into subclasses.\";var t;return t=this.url,t=t.replace(\"{xmin}\",\"{XMIN}\"),t=t.replace(\"{ymin}\",\"{YMIN}\"),t=t.replace(\"{xmax}\",\"{XMAX}\"),t=t.replace(\"{ymax}\",\"{YMAX}\"),t=t.replace(\"{height}\",\"{HEIGHT}\"),t=t.replace(\"{width}\",\"{WIDTH}\"),this.url=t},e.prototype.string_lookup_replace=function(t,e){var r,n,i;n=t;for(r in e)i=e[r],n=n.replace(\"{\"+r+\"}\",i.toString());return n},e.prototype.add_image=function(t){return this.images[t.cache_key]=t},e.prototype.remove_image=function(t){return delete this.images[t.cache_key]},e.prototype.get_image_url=function(t,e,r,n,i,o){var s;return s=this.string_lookup_replace(this.url,this.extra_url_vars),s.replace(\"{XMIN}\",t).replace(\"{YMIN}\",e).replace(\"{XMAX}\",r).replace(\"{YMAX}\",n).replace(\"{WIDTH}\",o).replace(\"{HEIGHT}\",i)},e}(s.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(192);r.BBoxTileSource=n.BBoxTileSource;var i=t(193);r.DynamicImageRenderer=i.DynamicImageRenderer;var o=t(195);r.ImageSource=o.ImageSource;var s=t(197);r.MercatorTileSource=s.MercatorTileSource;var a=t(198);r.QUADKEYTileSource=a.QUADKEYTileSource;var l=t(199);r.TileRenderer=l.TileRenderer;var u=t(200);r.TileSource=u.TileSource;var c=t(202);r.TMSTileSource=c.TMSTileSource;var _=t(203);r.WMTSTileSource=_.WMTSTileSource},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e=n;r=e<=n?++t:--t)i.push(this.get_resolution(r));return i}.call(this)},e.prototype._computed_initial_resolution=function(){return null!=this.initial_resolution?this.initial_resolution:2*Math.PI*6378137/this.tile_size},e.prototype.is_valid_tile=function(t,e,r){return!(!this.wrap_around&&(t<0||t>=Math.pow(2,r)))&&!(e<0||e>=Math.pow(2,r))},e.prototype.retain_children=function(t){var e,r,n,i,o,s,a;i=t.quadkey,n=i.length,r=n+3,o=this.tiles,s=[];for(e in o)a=o[e],0===a.quadkey.indexOf(i)&&a.quadkey.length>n&&a.quadkey.length<=r?s.push(a.retain=!0):s.push(void 0);return s},e.prototype.retain_neighbors=function(t){var e,r,n,i,s,a,l,u,c,_,h,p,d,f,y;r=4,s=t.tile_coords,h=s[0],p=s[1],d=s[2],n=function(){var t,e,n,i;for(i=[],f=t=e=h-r,n=h+r;e<=n?t<=n:t>=n;f=e<=n?++t:--t)i.push(f);return i}(),i=function(){var t,e,n,i;for(i=[],y=t=e=p-r,n=p+r;e<=n?t<=n:t>=n;y=e<=n?++t:--t)i.push(y);return i}(),a=this.tiles,c=[];for(e in a)_=a[e],_.tile_coords[2]===d&&(l=_.tile_coords[0],o.call(n,l)>=0)&&(u=_.tile_coords[1],o.call(i,u)>=0)?c.push(_.retain=!0):c.push(void 0);return c},e.prototype.retain_parents=function(t){var e,r,n,i,o;r=t.quadkey,n=this.tiles,i=[];for(e in n)o=n[e],i.push(o.retain=0===r.indexOf(o.quadkey));return i},e.prototype.children_by_tile_xyz=function(t,e,r){var n,i,o,s,a,l,u,c,_;for(_=this.calculate_world_x_by_tile_xyz(t,e,r),0!==_&&(l=this.normalize_xyz(t,e,r),t=l[0],e=l[1],r=l[2]),a=this.tile_xyz_to_quadkey(t,e,r),i=[],o=s=0;s<=3;o=s+=1)u=this.quadkey_to_tile_xyz(a+o.toString()),t=u[0],e=u[1],r=u[2],0!==_&&(c=this.denormalize_xyz(t,e,r,_),t=c[0],e=c[1],r=c[2]),n=this.get_tile_meter_bounds(t,e,r),null!=n&&i.push([t,e,r,n]);return i},e.prototype.parent_by_tile_xyz=function(t,e,r){var n,i;return i=this.tile_xyz_to_quadkey(t,e,r),n=i.substring(0,i.length-1),this.quadkey_to_tile_xyz(n)},e.prototype.get_resolution=function(t){return this._computed_initial_resolution()/Math.pow(2,t)},e.prototype.get_resolution_by_extent=function(t,e,r){var n,i;return n=(t[2]-t[0])/r,i=(t[3]-t[1])/e,[n,i]},e.prototype.get_level_by_extent=function(t,e,r){var n,i,o,s,a,l,u,c;for(u=(t[2]-t[0])/r,c=(t[3]-t[1])/e,l=Math.max(u,c),n=0,a=this._resolutions,i=0,o=a.length;is){if(0===n)return 0;if(n>0)return n-1}n+=1}},e.prototype.get_closest_level_by_extent=function(t,e,r){var n,i,o,s,a;return s=(t[2]-t[0])/r,a=(t[3]-t[1])/e,i=Math.max(s,a),o=this._resolutions,n=this._resolutions.reduce(function(t,e){return Math.abs(e-i)=l;f=n+=-1)for(h=i=u=d,c=p;i<=c;h=i+=1)this.is_valid_tile(h,f,e)&&_.push([h,f,e,this.get_tile_meter_bounds(h,f,e)]);return _=this.sort_tiles_from_center(_,[d,m,p,y])},e.prototype.quadkey_to_tile_xyz=function(t){\"Computes tile x, y and z values based on quadKey.\";var e,r,n,i,o,s,a,l;for(o=0,s=0,a=t.length,e=r=i=a;r>0;e=r+=-1)switch(l=t.charAt(a-e),n=1<0;i=o+=-1)n=0,s=1<0;)if(n=n.substring(0,n.length-1),o=this.quadkey_to_tile_xyz(n),t=o[0],e=o[1],r=o[2],s=this.denormalize_xyz(t,e,r,a),t=s[0],e=s[1],r=s[2],this.tile_xyz_to_key(t,e,r)in this.tiles)return[t,e,r];return[0,0,0]},e.prototype.normalize_xyz=function(t,e,r){var n;return this.wrap_around?(n=Math.pow(2,r),[(t%n+n)%n,e,r]):[t,e,r]},e.prototype.denormalize_xyz=function(t,e,r,n){return[t+n*Math.pow(2,r),e,r]},e.prototype.denormalize_meters=function(t,e,r,n){return[t+2*n*Math.PI*6378137,e]},e.prototype.calculate_world_x_by_tile_xyz=function(t,e,r){return Math.floor(t/Math.pow(2,r))},e}(s.TileSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(197);r.QUADKEYTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"QUADKEYTileSource\",e.prototype.get_image_url=function(t,e,r){var n,i,o;return n=this.string_lookup_replace(this.url,this.extra_url_vars),o=this.tms_to_wmts(t,e,r),t=o[0],e=o[1],r=o[2],i=this.tile_xyz_to_quadkey(t,e,r),n.replace(\"{Q}\",i)},e}(o.MercatorTileSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e0)return null==this.attributionEl&&(i=this.plot_model.canvas._right.value-this.plot_model.frame._right.value,e=this.plot_model.frame._bottom.value,r=this.map_frame._width.value,this.attributionEl=c.div({\"class\":\"bk-tile-attribution\",style:{position:\"absolute\",bottom:e+\"px\",right:i+\"px\",\"max-width\":r+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.8)\",\"font-size\":\"9pt\",\"font-family\":\"sans-serif\"}}),n=this.plot_view.canvas_view.events_el,n.appendChild(this.attributionEl)),this.attributionEl.innerHTML=t},e.prototype._map_data=function(){var t,e;return this.initial_extent=this.get_extent(),e=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value),t=this.model.tile_source.snap_to_zoom(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value,e),this.x_range.start=t[0],this.y_range.start=t[1],this.x_range.end=t[2],this.y_range.end=t[3],this._add_attribution()},e.prototype._on_tile_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.current=!0,e.loaded=!0,this.request_render()},e.prototype._on_tile_cache_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.loaded=!0,e.finished=!0,this.notify_finished()},e.prototype._on_tile_error=function(t){var e;return e=t.target.tile_data,e.finished=!0},e.prototype._create_tile=function(t,e,r,n,i){var o,s,a;return null==i&&(i=!1),o=this.model.tile_source.normalize_xyz(t,e,r),a=this.pool.pop(),i?a.onload=this._on_tile_cache_load:a.onload=this._on_tile_load,a.onerror=this._on_tile_error,a.alt=\"\",a.tile_data={tile_coords:[t,e,r],normalized_coords:o,quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,r),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,r),bounds:n,loaded:!1,finished:!1,x_coord:n[0],y_coord:n[3]},this.model.tile_source.tiles[a.tile_data.cache_key]=a.tile_data,a.src=(s=this.model.tile_source).get_image_url.apply(s,o),this._tiles.push(a),a},e.prototype._enforce_aspect_ratio=function(){var t,e,r;return(this._last_height!==this.map_frame._height.value||this._last_width!==this.map_frame._width.value)&&(t=this.get_extent(),r=this.model.tile_source.get_level_by_extent(t,this.map_frame._height.value,this.map_frame._width.value),e=this.model.tile_source.snap_to_zoom(t,this.map_frame._height.value,this.map_frame._width.value,r),this.x_range.setv({start:e[0],end:e[2]}),this.y_range.setv({start:e[1],end:e[3]}),this.extent=e,this._last_height=this.map_frame._height.value,this._last_width=this.map_frame._width.value,!0)},e.prototype.has_finished=function(){var t,r,n,i;if(!e.__super__.has_finished.call(this))return!1;if(0===this._tiles.length)return!1;for(n=this._tiles,t=0,r=n.length;tg&&(c=this.extent,B=g,A=!0),A&&(this.x_range.setv({x_range:{start:c[0],end:c[2]}}),this.y_range.setv({start:c[1],end:c[3]}),this.extent=c),this.extent=c,C=z.get_tiles_by_extent(c,B),M=[],w=[],r=[],o=[],h=0,y=C.length;h=n?(u=[1,p/n],g=u[0],b=u[1]):(c=[n/p,1],g=c[0],b=c[1]),t[0]<=e[0]?(l=t[0],_=t[0]+m*g,_>s&&(_=s)):(_=t[0],l=t[0]-m*g,ld&&(h=d)):(h=t[1],i=t[1]-m/n,in.end&&(a=n.end),as.end&&(l=s.end),ln.end)&&(this.v_axis_only=!0),(si.end)&&(this.h_axis_only=!0)),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan=function(t){return this._update(t.deltaX,-t.deltaY),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan_end=function(t){if(this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info)return this.plot_view.push_state(\"pan\",{range:this.pan_info})},e.prototype._update=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P;i=this.plot_view.frame,l=t-this.last_dx,u=e-this.last_dy,o=i.h_range,w=o.start-l,b=o.end-l,T=i.v_range,S=T.start-u,M=T.end-u,r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||this.v_axis_only?(v=o.start,g=o.end,f=0):(v=w,g=b,f=-l),\"height\"!==r&&\"both\"!==r||this.h_axis_only?(x=T.start,k=T.end,y=0):(x=S,k=M,y=u),this.last_dx=t,this.last_dy=e,O={},c=i.xscales;for(a in c)d=c[a],_=d.v_invert([v,g]),m=_[0],n=_[1],O[a]={start:m,end:n};P={},h=i.yscales;for(a in h)d=h[a],p=d.v_invert([x,k]),m=p[0],n=p[1],P[a]={start:m,end:n};return this.pan_info={xrs:O,yrs:P,sdx:f,sdy:y},this.plot_view.update_range(this.pan_info,s=!0),null},e}(o.GestureToolView),r.PanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.PanToolView,e.prototype.type=\"PanTool\",e.prototype.tool_name=\"Pan\",e.prototype.event_type=\"pan\",e.prototype.default_order=10,e.define({dimensions:[s.Dimensions,\"both\"]}),e.getters({tooltip:function(){return this._get_dim_tooltip(\"Pan\",this.dimensions)},icon:function(){var t;return t=function(){switch(this.dimensions){case\"both\":return\"pan\";case\"width\":return\"xpan\";case\"height\":return\"ypan\"}}.call(this),\"bk-tool-icon-\"+t}}),e}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(219),a=t(61),l=t(14),u=t(21);r.PolySelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.properties.active.change,function(){return this._active_change()}),this.data={vx:[],vy:[]}},e.prototype._active_change=function(){if(!this.model.active)return this._clear_data()},e.prototype._keyup=function(t){if(13===t.keyCode)return this._clear_data()},e.prototype._doubletap=function(t){var e,r;return e=null!=(r=t.srcEvent.shiftKey)&&r,this._do_select(this.data.vx,this.data.vy,!0,e),this.plot_view.push_state(\"poly_select\",{selection:this.plot_view.get_selection()}),this._clear_data()},e.prototype._clear_data=function(){return this.data={vx:[],vy:[]},this.model.overlay.update({xs:[],ys:[]})},e.prototype._tap=function(t){var e,r,n;return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),n=e.sy_to_vy(t.bokeh.sy),this.data.vx.push(r),this.data.vy.push(n),this.model.overlay.update({xs:u.copy(this.data.vx),ys:u.copy(this.data.vy)})},e.prototype._do_select=function(t,e,r,n){var i;return i={type:\"poly\",vx:t,vy:e},this._select(i,r,n)},e.prototype._emit_callback=function(t){var e,r,n,i,o;n=this.computed_renderers[0],e=this.plot_model.canvas,r=this.plot_model.frame,t.sx=e.v_vx_to_sx(t.vx),t.sy=e.v_vx_to_sx(t.vy),i=r.xscales[n.x_range_name],o=r.yscales[n.y_range_name],t.x=i.v_invert(t.vx),t.y=i.v_invert(t.vy),this.model.callback.execute(this.model,{geometry:t})},e}(s.SelectToolView),n=function(){return new a.PolyAnnotation({level:\"overlay\",xs_units:\"screen\",ys_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},r.PolySelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.PolySelectToolView,e.prototype.type=\"PolySelectTool\",e.prototype.tool_name=\"Poly Select\",e.prototype.icon=\"bk-tool-icon-polygon-select\",e.prototype.event_type=\"tap\",e.prototype.default_order=11,e.define({callback:[l.Instance],overlay:[l.Instance,n]}),e}(s.SelectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(215),s=t(158),a=t(159),l=t(13),u=t(14),c=t(29),_=t(3);r.SelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.getters({computed_renderers:function(){var t,e,r,n;return n=this.model.renderers,e=this.model.names,0===n.length&&(t=this.plot_model.plot.renderers,n=function(){var e,n,i;for(i=[],e=0,n=t.length;e0&&(n=function(){var t,i,o;for(o=[],t=0,i=n.length;t=0&&o.push(r);return o}()),n}}),e.prototype._computed_renderers_by_data_source=function(){var t,e,r,n,i,o;for(i={},n=this.computed_renderers,t=0,e=n.length;to;n=0<=o?++i:--i)r.x[n]=s.invert(r.vx[n]),r.y[n]=a.invert(r.vy[n]);break;default:l.logger.debug(\"Unrecognized selection geometry type: '\"+r.type+\"'\")}return this.plot_model.plot.trigger_event(new _.SelectionGeometry({geometry:r,\"final\":e}))},e}(o.GestureToolView),r.SelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({renderers:[u.Array,[]],names:[u.Array,[]]}),e.internal({multi_select_modifier:[u.String,\"shift\"]}),e}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(219),s=t(14),a=t(41);r.TapToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._tap=function(t){var e,r,n,i,o;return r=this.plot_view.canvas,i=r.sx_to_vx(t.bokeh.sx),o=r.sy_to_vy(t.bokeh.sy),e=null!=(n=t.srcEvent.shiftKey)&&n,this._select(i,o,!0,e)},e.prototype._select=function(t,e,r,n){var i,o,s,l,u,c,_,h,p,d,f,y,m;if(u={type:\"point\",vx:t,vy:e},o=this.model.callback,s={geometries:u},\"select\"===this.model.behavior){y=this._computed_renderers_by_data_source();for(i in y)f=y[i],m=f[0].get_selection_manager(),p=function(){var t,e,r;for(r=[],t=0,e=f.length;t.9?e=.9:e<-.9&&(e=-.9),this._update_ranges(e)},e.prototype._update_ranges=function(t){var e,r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T;switch(r=this.plot_model.frame,n=r.h_range,v=r.v_range,s=[n.start,n.end],b=s[0],g=s[1],a=[v.start,v.end],k=a[0],x=a[1],this.model.dimension){case\"height\":M=Math.abs(x-k),d=b,f=g,y=k+M*t,m=x+M*t;break;case\"width\":w=Math.abs(g-b),d=b-w*t,f=g-w*t,y=k,m=x}S={},l=r.xscales;for(i in l)h=l[i],u=h.v_invert([d,f]),p=u[0],e=u[1],S[i]={start:p,end:e};T={},c=r.yscales;for(i in c)h=c[i],_=h.v_invert([y,m]),p=_[0],e=_[1],T[i]={start:p,end:e};return o={xrs:S,yrs:T,factor:t},this.plot_view.push_state(\"wheel_pan\",{range:o}),this.plot_view.update_range(o,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(o.GestureToolView),r.WheelPanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"WheelPanTool\",e.prototype.default_view=r.WheelPanToolView,e.prototype.tool_name=\"Wheel Pan\",e.prototype.icon=\"bk-tool-icon-wheel-pan\",e.prototype.event_type=\"scroll\",e.prototype.default_order=12,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimension)}}),e.define({dimension:[s.Dimension,\"width\"]}),e.internal({speed:[s.Number,.001]}),e}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(215),a=t(43),l=t(14);\"undefined\"!=typeof n&&null!==n||(n={}),r.WheelZoomToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._pinch=function(t){var e;return e=t.scale>=1?20*(t.scale-1):-20/t.scale,t.bokeh.delta=e,this._scroll(t)},e.prototype._scroll=function(t){var e,r,n,i,o,s,l,u,c,_;return n=this.plot_model.frame,o=n.h_range,l=n.v_range,u=this.plot_view.canvas.sx_to_vx(t.bokeh.sx),c=this.plot_view.canvas.sy_to_vy(t.bokeh.sy),e=this.model.dimensions,i=(\"width\"===e||\"both\"===e)&&o.min0?\"pinch\":\"scroll\",e.prototype.default_order=10,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({dimensions:[l.Dimensions,\"both\"]}),e.internal({speed:[l.Number,1/600]}),e}(s.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(204);r.ActionTool=n.ActionTool;var i=t(205);r.HelpTool=i.HelpTool;var o=t(206);r.RedoTool=o.RedoTool;var s=t(207);r.ResetTool=s.ResetTool;var a=t(208);r.SaveTool=a.SaveTool;var l=t(209);r.UndoTool=l.UndoTool;var u=t(210);r.ZoomInTool=u.ZoomInTool;var c=t(211);r.ZoomOutTool=c.ZoomOutTool;var _=t(212);r.ButtonTool=_.ButtonTool;var h=t(213);r.BoxSelectTool=h.BoxSelectTool;var p=t(214);r.BoxZoomTool=p.BoxZoomTool;var d=t(215);r.GestureTool=d.GestureTool;var f=t(216);r.LassoSelectTool=f.LassoSelectTool;var y=t(217);\n", " r.PanTool=y.PanTool;var m=t(218);r.PolySelectTool=m.PolySelectTool;var v=t(219);r.SelectTool=v.SelectTool;var g=t(220);r.TapTool=g.TapTool;var b=t(221);r.WheelPanTool=b.WheelPanTool;var w=t(222);r.WheelZoomTool=w.WheelZoomTool;var x=t(224);r.CrosshairTool=x.CrosshairTool;var k=t(225);r.HoverTool=k.HoverTool;var M=t(226);r.InspectTool=M.InspectTool;var S=t(228);r.Tool=S.Tool;var T=t(229);r.ToolProxy=T.ToolProxy;var O=t(230);r.Toolbar=O.Toolbar;var P=t(231);r.ToolbarBase=P.ToolbarBase;var A=t(232);r.ToolbarBoxToolbar=A.ToolbarBoxToolbar;var E=t(232);r.ToolbarBox=E.ToolbarBox},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(226),s=t(62),a=t(14),l=t(29);r.CrosshairToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._move=function(t){var e,r,n,i;if(this.model.active)return r=this.plot_model.frame,e=this.plot_model.canvas,n=e.sx_to_vx(t.bokeh.sx),i=e.sy_to_vy(t.bokeh.sy),r.contains(n,i)||(n=i=null),this._update_spans(n,i)},e.prototype._move_exit=function(t){return this._update_spans(null,null)},e.prototype._update_spans=function(t,e){var r;if(r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||(this.model.spans.width.computed_location=e),\"height\"===r||\"both\"===r)return this.model.spans.height.computed_location=t},e}(o.InspectToolView),r.CrosshairTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.CrosshairToolView,e.prototype.type=\"CrosshairTool\",e.prototype.tool_name=\"Crosshair\",e.prototype.icon=\"bk-tool-icon-crosshair\",e.define({dimensions:[a.Dimensions,\"both\"],line_color:[a.Color,\"black\"],line_width:[a.Number,1],line_alpha:[a.Number,1]}),e.internal({location_units:[a.SpatialUnits,\"screen\"],render_mode:[a.RenderMode,\"css\"],spans:[a.Any]}),e.getters({tooltip:function(){return this._get_dim_tooltip(\"Crosshair\",this.dimensions)},synthetic_renderers:function(){return l.values(this.spans)}}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.spans={width:new s.Span({for_hover:!0,dimension:\"width\",render_mode:this.render_mode,location_units:this.location_units,line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha}),height:new s.Span({for_hover:!0,dimension:\"height\",render_mode:this.render_mode,location_units:this.location_units,line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha})}},e}(o.InspectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(226),a=t(65),l=t(158),u=t(159),c=t(9),_=t(38),h=t(5),p=t(14),d=t(29),f=t(41),y=t(4);n=function(t){var e,r,n,i,o;return\"#\"===t.substr(0,1)?t:(r=/(.*?)rgb\\((\\d+), (\\d+), (\\d+)\\)/.exec(t),i=parseInt(r[2]),n=parseInt(r[3]),e=parseInt(r[4]),o=e|n<<8|i<<16,r[1]+\"#\"+o.toString(16))},r.HoverToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.ttviews={}},e.prototype.remove=function(){return y.remove_views(this.ttviews),e.__super__.remove.call(this)},e.prototype.connect_signals=function(){var t,r,n,i;for(e.__super__.connect_signals.call(this),i=this.computed_renderers,t=0,r=i.length;t0&&(n=function(){var t,i,o;for(o=[],t=0,i=n.length;t=0&&o.push(r);return o}()),n},e.prototype._compute_ttmodels=function(){var t,e,r,n,i,o,s,c,_,h,p;if(h={},_=this.model.tooltips,null!=_)for(s=this.computed_renderers,t=0,r=s.length;t=0){if(g=M.match(/\\$color(\\[.*\\])?:(\\w*)/),y=g[0],m=g[1],o=g[2],a=t.get_column(o),null==a){l=h.span({},o+\" unknown\"),i.appendChild(l);continue}if(u=(null!=m?m.indexOf(\"hex\"):void 0)>=0,x=(null!=m?m.indexOf(\"swatch\"):void 0)>=0,s=a[e],null==s){l=h.span({},\"(null)\"),i.appendChild(l);continue}u&&(s=n(s)),l=h.span({},s),i.appendChild(l),x&&(l=h.span({\"class\":\"bk-tooltip-color-block\",style:{backgroundColor:s}},\" \"),i.appendChild(l))}else M=M.replace(\"$~\",\"$data_\"),l=h.span(),l.innerHTML=_.replace_placeholders(M,t,e,this.model.formatters,r),i.appendChild(l);return w},e}(s.InspectToolView),r.HoverTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.HoverToolView,e.prototype.type=\"HoverTool\",e.prototype.tool_name=\"Hover\",e.prototype.icon=\"bk-tool-icon-hover\",e.define({tooltips:[p.Any,[[\"index\",\"$index\"],[\"data (x, y)\",\"($x, $y)\"],[\"canvas (x, y)\",\"($sx, $sy)\"]]],formatters:[p.Any,{}],renderers:[p.Array,[]],names:[p.Array,[]],mode:[p.String,\"mouse\"],point_policy:[p.String,\"snap_to_data\"],line_policy:[p.String,\"nearest\"],show_arrow:[p.Boolean,!0],anchor:[p.String,\"center\"],attachment:[p.String,\"horizontal\"],callback:[p.Any]}),e}(s.InspectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(212);r.InspectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(s.ButtonToolView),r.InspectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.event_type=\"move\",e.define({toggleable:[o.Bool,!0]}),e.override({active:!0}),e}(s.ButtonTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(212);r.OnOffButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.model.active?this.el.classList.add(\"bk-active\"):this.el.classList.remove(\"bk-active\")},e.prototype._clicked=function(){var t;return t=this.model.active,this.model.active=!t},e}(o.ButtonToolButtonView)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(44),a=t(21),l=t(49);r.ToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view=t.plot_view},e.getters({plot_model:function(){return this.plot_view.model}}),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.active.change,function(t){return function(){return t.model.active?t.activate():t.deactivate()}}(this))},e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(s.View),r.Tool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.getters({synthetic_renderers:function(){return[]}}),e.internal({active:[o.Boolean,!1]}),e.prototype._get_dim_tooltip=function(t,e){switch(e){case\"width\":return t+\" (x-axis)\";case\"height\":return t+\" (y-axis)\";case\"both\":return t}},e.prototype._get_dim_limits=function(t,e,r,n){var i,o,s,l,u,c,_,h;return s=t[0],c=t[1],l=e[0],_=e[1],i=r.h_range,\"width\"===n||\"both\"===n?(u=[a.min([s,l]),a.max([s,l])],u=[a.max([u[0],i.min]),a.min([u[1],i.max])]):u=[i.min,i.max],o=r.v_range,\"height\"===n||\"both\"===n?(h=[a.min([c,_]),a.max([c,_])],h=[a.max([h[0],o.min]),a.min([h[1],o.max])]):h=[o.min,o.max],[u,h]},e}(l.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(19),a=t(49);r.ToolProxy=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this[\"do\"]=new s.Signal(this,\"do\"),this.connect(this[\"do\"],function(){return this.doit()}),this.connect(this.properties.active.change,function(){return this.set_active()})},e.prototype.doit=function(){var t,e,r,n;for(r=this.tools,t=0,e=r.length;t0&&(x=g(C),this.gestures[n].tools.push(x),this.connect(x.properties.active.change,this._active_change.bind(null,x)))}this.actions=[];for(z in t)C=t[z],C.length>0&&this.actions.push(g(C));this.inspectors=[];for(z in c)C=c[z],C.length>0&&this.inspectors.push(g(C,e=!0));E=[];for(r in this.gestures)C=this.gestures[r].tools,0!==C.length&&(this.gestures[r].tools=a.sortBy(C,function(t){return t.default_order}),\"pinch\"!==r&&\"scroll\"!==r?E.push(this.gestures[r].tools[0].active=!0):E.push(void 0));return E},e}(h.ToolbarBase),r.ToolbarBoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-toolbar-box\",e.prototype.get_width=function(){return this.model._horizontal===!0?30:null},e.prototype.get_height=function(){return 30},e}(d.BoxView),r.ToolbarBox=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ToolbarBox\",e.prototype.default_view=r.ToolbarBoxView,e.prototype.initialize=function(t){var n;return e.__super__.initialize.call(this,t),this._toolbar=new r.ToolbarBoxToolbar(t),this._horizontal=\"left\"===(n=this.toolbar_location)||\"right\"===n,this._sizeable=this._horizontal?this._width:this._height},e.prototype._doc_attached=function(){return this._toolbar.attach_document(this.document),e.__super__._doc_attached.call(this)},e.prototype.get_layoutable_children=function(){return[this._toolbar]},e.define({toolbar_location:[s.Location,\"right\"],merge_tools:[s.Bool,!0],tools:[s.Any,[]],logo:[s.String,\"normal\"]}),e}(d.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(240),a=t(14),l=t(29);r.CustomJSTransform=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,e),i.prototype.type=\"CustomJSTransform\",i.define({args:[a.Any,{}],func:[a.String,\"\"],v_func:[a.String,\"\"]}),i.getters({values:function(){return this._make_values()},scalar_transform:function(){return this._make_transform(\"x\",this.func)},vector_transform:function(){return this._make_transform(\"xs\",this.v_func)}}),i.prototype.compute=function(e){return this.scalar_transform.apply(this,o.call(this.values).concat([e],[t],[r]))},i.prototype.v_compute=function(e){return this.vector_transform.apply(this,o.call(this.values).concat([e],[t],[r]))},i.prototype._make_transform=function(t,e){return function(t,e,r){r.prototype=t.prototype;var n=new r,i=t.apply(n,e);return Object(i)===i?i:n}(Function,o.call(Object.keys(this.args)).concat([t],[\"require\"],[\"exports\"],[e]),function(){})},i.prototype._make_values=function(){return l.values(this.args)},i}(s.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(240),s=t(14);r.Dodge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({value:[s.Number,0],range:[s.Instance]}),e.prototype.compute=function(t,e){var r;return null==e&&(e=!0),null!=(null!=(r=this.range)?r.synthetic:void 0)&&e&&(t=this.range.synthetic(t)),t+this.value},e}(o.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(233);r.CustomJSTransform=n.CustomJSTransform;var i=t(234);r.Dodge=i.Dodge;var o=t(236);r.Interpolator=o.Interpolator;var s=t(237);r.Jitter=s.Jitter;var a=t(238);r.LinearInterpolator=a.LinearInterpolator;var l=t(239);r.StepInterpolator=l.StepInterpolator;var u=t(240);r.Transform=u.Transform},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;ee.x)?r:-{1:null!=(n=t.x===e.x)?n:{0:1}}}),s=n=0,c=a.length;0<=c?nc;s=0<=c?++n:--n)this._x_sorted[s]=a[s].x,this._y_sorted[s]=a[s].y;return this._sorted_dirty=!1}},e}(s.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(240),s=t(14),a=t(28);r.Jitter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({mean:[s.Number,0],width:[s.Number,1],distribution:[s.Distribution,\"uniform\"],range:[s.Instance]}),e.prototype.compute=function(t,e){var r;return null==e&&(e=!0),null!=(null!=(r=this.range)?r.synthetic:void 0)&&e&&(t=this.range.synthetic(t)),\"uniform\"===this.distribution?t+this.mean+(a.random()-.5)*this.width:\"normal\"===this.distribution?t+a.rnorm(this.mean,this.width):void 0},e}(o.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(21),s=t(236);r.LinearInterpolator=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.compute=function(t){var e,r,n,i,s,a,l;if(this.sort(e=!1),this.clip===!0){\n", " if(tthis._x_sorted[this._x_sorted.length-1])return null}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}return t===this._x_sorted[0]?this._y_sorted[0]:(r=o.findLastIndex(this._x_sorted,function(e){return ethis._x_sorted[this._x_sorted.length-1])return null}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}return n=-1,\"after\"===this.mode&&(n=a.findLastIndex(this._x_sorted,function(e){return t>=e})),\"before\"===this.mode&&(n=a.findIndex(this._x_sorted,function(e){return t<=e})),\"center\"===this.mode&&(r=function(){var e,r,n,i;for(n=this._x_sorted,i=[],e=0,r=n.length;e=1<<28)throw new RangeError(\"repeat count must not overflow maximum string size\");for(var r=\"\";1==(1&t)&&(r+=e),t>>>=1,0!=t;)e+=e;return r})},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(36);r.Message=function(){function t(t,e,r){this.header=t,this.metadata=e,this.content=r,this.buffers=[]}return t.assemble=function(e,r,n){var i,o,s;return o=JSON.parse(e),s=JSON.parse(r),i=JSON.parse(n),new t(o,s,i)},t.prototype.assemble_buffer=function(t,e){var r;if(r=null!=this.header.num_buffers?this.header.num_buffers:0,r<=this.buffers.length)throw new Error(\"too many buffers received, expecting \"+r);return this.buffers.push([t,e])},t.create=function(e,r,n){var i;return null==n&&(n={}),i=t.create_header(e),new t(i,r,n)},t.create_header=function(t){return{msgid:n.uniqueId(),msgtype:t}},t.prototype.complete=function(){return null!=this.header&&null!=this.metadata&&null!=this.content&&(!(\"num_buffers\"in this.header)||this.buffers.length===this.header.num_buffers)},t.prototype.send=function(t){var e,r,n,i;if(i=null!=this.header.num_buffers?this.header.num_buffers:0,i>0)throw new Error(\"BokehJS only supports receiving buffers, not sending\");return r=JSON.stringify(this.header),n=JSON.stringify(this.metadata),e=JSON.stringify(this.content),t.send(r),t.send(n),t.send(e)},t.prototype.msgid=function(){return this.header.msgid},t.prototype.msgtype=function(){return this.header.msgtype},t.prototype.reqid=function(){return this.header.reqid},t.prototype.problem=function(){return\"msgid\"in this.header?\"msgtype\"in this.header?null:\"No msgtype in header\":\"No msgid in header\"},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(242);r.Receiver=function(){function t(){this.message=null,this._current_consumer=this._HEADER}return t.prototype.consume=function(t){return this._current_consumer(t),null},t.prototype._HEADER=function(t){return this._assume_text(t),this.message=null,this._partial=null,this._fragments=[t],this._buf_header=null,this._current_consumer=this._METADATA,null},t.prototype._METADATA=function(t){return this._assume_text(t),this._fragments.push(t),this._current_consumer=this._CONTENT,null},t.prototype._CONTENT=function(t){var e,r,i,o;return this._assume_text(t),this._fragments.push(t),o=this._fragments.slice(0,3),r=o[0],i=o[1],e=o[2],this._partial=n.Message.assemble(r,i,e),this._check_complete(),null},t.prototype._BUFFER_HEADER=function(t){return this._assume_text(t),this._buf_header=t,this._current_consumer=this._BUFFER_PAYLOAD,null},t.prototype._BUFFER_PAYLOAD=function(t){return this._assume_binary(t),this._partial.assemble_buffer(this._buf_header,t),this._check_complete(),null},t.prototype._assume_text=function(t){if(t instanceof ArrayBuffer)throw new Error(\"Expected text fragment but received binary fragment\")},t.prototype._assume_binary=function(t){if(!(t instanceof ArrayBuffer))throw new Error(\"Expected binary fragment but received text fragment\")},t.prototype._check_complete=function(){return this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER,null},t}()},function(t,e,r){\"use strict\";function n(t){var e=document.createElement(\"div\");e.style.backgroundColor=\"#f2dede\",e.style.border=\"1px solid #a94442\",e.style.borderRadius=\"4px\",e.style.display=\"inline-block\",e.style.fontFamily=\"sans-serif\",e.style.marginTop=\"5px\",e.style.minWidth=\"200px\",e.style.padding=\"5px 5px 5px 10px\";var r=document.createElement(\"span\");r.style.backgroundColor=\"#a94442\",r.style.borderRadius=\"0px 4px 0px 0px\",r.style.color=\"white\",r.style.cursor=\"pointer\",r.style.cssFloat=\"right\",r.style.fontSize=\"0.8em\",r.style.margin=\"-6px -6px 0px 0px\",r.style.padding=\"2px 5px 4px 5px\",r.title=\"close\",r.setAttribute(\"aria-label\",\"close\"),r.appendChild(document.createTextNode(\"x\")),r.addEventListener(\"click\",function(){return o.removeChild(e)});var n=document.createElement(\"h3\");n.style.color=\"#a94442\",n.style.margin=\"8px 0px 0px 0px\",n.style.padding=\"0px\",n.appendChild(document.createTextNode(\"Bokeh Error\"));var i=document.createElement(\"pre\");i.style.whiteSpace=\"unset\",i.style.overflowX=\"auto\",i.appendChild(document.createTextNode(t.message||t)),e.appendChild(r),e.appendChild(n),e.appendChild(i);var o=document.getElementsByTagName(\"body\")[0];o.insertBefore(e,o.firstChild)}function i(t,e){void 0===e&&(e=!1);try{return t()}catch(r){if(n(r),e)return;throw r}}Object.defineProperty(r,\"__esModule\",{value:!0}),r.safely=i},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.version=\"0.12.9\"},function(t,e,r){!function(){\"use strict\";function t(t,e){var r,n=Object.keys(e);for(r=0;r1?(e=r,e.width=arguments[0],e.height=arguments[1]):e=t?t:r,this instanceof a?(this.width=e.width||r.width,this.height=e.height||r.height,this.enableMirroring=void 0!==e.enableMirroring?e.enableMirroring:r.enableMirroring,this.canvas=this,this.__document=e.document||document,e.ctx?this.__ctx=e.ctx:(this.__canvas=this.__document.createElement(\"canvas\"),this.__ctx=this.__canvas.getContext(\"2d\")),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\"),this.__root.setAttribute(\"version\",1.1),this.__root.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\"),this.__root.setAttributeNS(\"http://www.w3.org/2000/xmlns/\",\"xmlns:xlink\",\"http://www.w3.org/1999/xlink\"),this.__root.setAttribute(\"width\",this.width),this.__root.setAttribute(\"height\",this.height),this.__ids={},this.__defs=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"defs\"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\"),void this.__root.appendChild(this.__currentElement)):new a(e)},a.prototype.__createElement=function(t,e,r){\"undefined\"==typeof e&&(e={});var n,i,o=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",t),s=Object.keys(e);for(r&&(o.setAttribute(\"fill\",\"none\"),o.setAttribute(\"stroke\",\"none\")),n=0;n0){\"path\"===this.__currentElement.nodeName&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());var r=this.__createElement(\"g\");e.appendChild(r),this.__currentElement=r}var n=this.__currentElement.getAttribute(\"transform\");n?n+=\" \":n=\"\",n+=t,this.__currentElement.setAttribute(\"transform\",n)},a.prototype.scale=function(e,r){void 0===r&&(r=e),this.__addTransform(t(\"scale({x},{y})\",{x:e,y:r}))},a.prototype.rotate=function(e){var r=180*e/Math.PI;this.__addTransform(t(\"rotate({angle},{cx},{cy})\",{angle:r,cx:0,cy:0}))},a.prototype.translate=function(e,r){this.__addTransform(t(\"translate({x},{y})\",{x:e,y:r}))},a.prototype.transform=function(e,r,n,i,o,s){this.__addTransform(t(\"matrix({a},{b},{c},{d},{e},{f})\",{a:e,b:r,c:n,d:i,e:o,f:s}))},a.prototype.beginPath=function(){var t,e;this.__currentDefaultPath=\"\",this.__currentPosition={},t=this.__createElement(\"path\",{},!0),e=this.__closestGroupOrSvg(),e.appendChild(t),this.__currentElement=t},a.prototype.__applyCurrentDefaultPath=function(){var t=this.__currentElement;\"path\"===t.nodeName?t.setAttribute(\"d\",this.__currentDefaultPath):console.error(\"Attempted to apply path command to node\",t.nodeName)},a.prototype.__addPathCommand=function(t){this.__currentDefaultPath+=\" \",this.__currentDefaultPath+=t},a.prototype.moveTo=function(e,r){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.__currentPosition={x:e,y:r},this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:r}))},a.prototype.closePath=function(){this.__currentDefaultPath&&this.__addPathCommand(\"Z\")},a.prototype.lineTo=function(e,r){this.__currentPosition={x:e,y:r},this.__currentDefaultPath.indexOf(\"M\")>-1?this.__addPathCommand(t(\"L {x} {y}\",{x:e,y:r})):this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:r}))},a.prototype.bezierCurveTo=function(e,r,n,i,o,s){this.__currentPosition={x:o,y:s},this.__addPathCommand(t(\"C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}\",{cp1x:e,cp1y:r,cp2x:n,cp2y:i,x:o,y:s}))},a.prototype.quadraticCurveTo=function(e,r,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(t(\"Q {cpx} {cpy} {x} {y}\",{cpx:e,cpy:r,x:n,y:i}))};var _=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]};a.prototype.arcTo=function(t,e,r,n,i){var o=this.__currentPosition&&this.__currentPosition.x,s=this.__currentPosition&&this.__currentPosition.y;if(\"undefined\"!=typeof o&&\"undefined\"!=typeof s){if(i<0)throw new Error(\"IndexSizeError: The radius provided (\"+i+\") is negative.\");if(o===t&&s===e||t===r&&e===n||0===i)return void this.lineTo(t,e);var a=_([o-t,s-e]),l=_([r-t,n-e]);if(a[0]*l[1]===a[1]*l[0])return void this.lineTo(t,e);var u=a[0]*l[0]+a[1]*l[1],c=Math.acos(Math.abs(u)),h=_([a[0]+l[0],a[1]+l[1]]),p=i/Math.sin(c/2),d=t+p*h[0],f=e+p*h[1],y=[-a[1],a[0]],m=[l[1],-l[0]],v=function(t){var e=t[0],r=t[1];return r>=0?Math.acos(e):-Math.acos(e)},g=v(y),b=v(m);this.lineTo(d+y[0]*i,f+y[1]*i),this.arc(d,f,i,g,b)}},a.prototype.stroke=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"fill stroke markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"stroke\")},a.prototype.fill=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"stroke fill markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"fill\")},a.prototype.rect=function(t,e,r,n){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.closePath()},a.prototype.fillRect=function(t,e,r,n){var i,o;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n},!0),o=this.__closestGroupOrSvg(),o.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"fill\")},a.prototype.strokeRect=function(t,e,r,n){var i,o;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n},!0),o=this.__closestGroupOrSvg(),o.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"stroke\")},a.prototype.__clearCanvas=function(){for(var t=this.__closestGroupOrSvg(),e=t.getAttribute(\"transform\"),r=this.__root.childNodes[1],n=r.childNodes,i=n.length-1;i>=0;i--)n[i]&&r.removeChild(n[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)},a.prototype.clearRect=function(t,e,r,n){if(0===t&&0===e&&r===this.width&&n===this.height)return void this.__clearCanvas();var i,o=this.__closestGroupOrSvg();i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n,fill:\"#FFFFFF\"},!0),o.appendChild(i)},a.prototype.createLinearGradient=function(t,e,n,i){var o=this.__createElement(\"linearGradient\",{id:r(this.__ids),x1:t+\"px\",x2:n+\"px\",y1:e+\"px\",y2:i+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(o),new l(o,this)},a.prototype.createRadialGradient=function(t,e,n,i,o,s){var a=this.__createElement(\"radialGradient\",{id:r(this.__ids),cx:i+\"px\",cy:o+\"px\",r:s+\"px\",fx:t+\"px\",fy:e+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(a),new l(a,this)},a.prototype.__parseFont=function(){var t=/^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:\\s*\\/\\s*(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s*([-,\\'\\\"\\sa-z0-9]+?)\\s*$/i,e=t.exec(this.font),r={style:e[1]||\"normal\",size:e[4]||\"10px\",family:e[6]||\"sans-serif\",weight:e[3]||\"normal\",decoration:e[2]||\"normal\",href:null};return\"underline\"===this.__fontUnderline&&(r.decoration=\"underline\"),this.__fontHref&&(r.href=this.__fontHref),r},a.prototype.__wrapTextLink=function(t,e){if(t.href){var r=this.__createElement(\"a\");return r.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",t.href),r.appendChild(e),r}return e},a.prototype.__applyText=function(t,e,r,n){var s=this.__parseFont(),a=this.__closestGroupOrSvg(),l=this.__createElement(\"text\",{\"font-family\":s.family,\"font-size\":s.size,\"font-style\":s.style,\"font-weight\":s.weight,\"text-decoration\":s.decoration,x:e,y:r,\"text-anchor\":i(this.textAlign),\"dominant-baseline\":o(this.textBaseline)},!0);l.appendChild(this.__document.createTextNode(t)),this.__currentElement=l,this.__applyStyleToCurrentElement(n),a.appendChild(this.__wrapTextLink(s,l))},a.prototype.fillText=function(t,e,r){this.__applyText(t,e,r,\"fill\")},a.prototype.strokeText=function(t,e,r){this.__applyText(t,e,r,\"stroke\")},a.prototype.measureText=function(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)},a.prototype.arc=function(e,r,n,i,o,s){if(i!==o){i%=2*Math.PI,o%=2*Math.PI,i===o&&(o=(o+2*Math.PI-.001*(s?-1:1))%(2*Math.PI));var a=e+n*Math.cos(o),l=r+n*Math.sin(o),u=e+n*Math.cos(i),c=r+n*Math.sin(i),_=s?0:1,h=0,p=o-i;p<0&&(p+=2*Math.PI),h=s?p>Math.PI?0:1:p>Math.PI?1:0,this.lineTo(u,c),this.__addPathCommand(t(\"A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}\",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:h,sweepFlag:_,endX:a,endY:l})),this.__currentPosition={x:a,y:l}}},a.prototype.clip=function(){var e=this.__closestGroupOrSvg(),n=this.__createElement(\"clipPath\"),i=r(this.__ids),o=this.__createElement(\"g\");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),n.setAttribute(\"id\",i),n.appendChild(this.__currentElement),this.__defs.appendChild(n),e.setAttribute(\"clip-path\",t(\"url(#{id})\",{id:i})),e.appendChild(o),this.__currentElement=o},a.prototype.drawImage=function(){var t,e,r,n,i,o,s,l,u,c,_,h,p,d,f,y=Array.prototype.slice.call(arguments),m=y[0],v=0,g=0;if(3===y.length)t=y[1],e=y[2],i=m.width,o=m.height,r=i,n=o;else if(5===y.length)t=y[1],e=y[2],r=y[3],n=y[4],i=m.width,o=m.height;else{if(9!==y.length)throw new Error(\"Inavlid number of arguments passed to drawImage: \"+arguments.length);v=y[1],g=y[2],i=y[3],o=y[4],t=y[5],e=y[6],r=y[7],n=y[8]}s=this.__closestGroupOrSvg(),_=this.__currentElement;var b=\"translate(\"+t+\", \"+e+\")\";if(m instanceof a){if(l=m.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(u=l.childNodes[0];u.childNodes.length;)f=u.childNodes[0].getAttribute(\"id\"),this.__ids[f]=f,this.__defs.appendChild(u.childNodes[0]);if(c=l.childNodes[1]){var w,x=c.getAttribute(\"transform\");w=x?x+\" \"+b:b,c.setAttribute(\"transform\",w),s.appendChild(c)}}}else\"IMG\"===m.nodeName?(h=this.__createElement(\"image\"),h.setAttribute(\"width\",r),h.setAttribute(\"height\",n),h.setAttribute(\"preserveAspectRatio\",\"none\"),(v||g||i!==m.width||o!==m.height)&&(p=this.__document.createElement(\"canvas\"),p.width=r,p.height=n,d=p.getContext(\"2d\"),d.drawImage(m,v,g,i,o,0,0,r,n),m=p),h.setAttribute(\"transform\",b),h.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===m.nodeName?m.toDataURL():m.getAttribute(\"src\")),s.appendChild(h)):\"CANVAS\"===m.nodeName&&(h=this.__createElement(\"image\"),h.setAttribute(\"width\",r),h.setAttribute(\"height\",n),h.setAttribute(\"preserveAspectRatio\",\"none\"),p=this.__document.createElement(\"canvas\"),p.width=r,p.height=n,d=p.getContext(\"2d\"),d.imageSmoothingEnabled=!1,d.mozImageSmoothingEnabled=!1,d.oImageSmoothingEnabled=!1,d.webkitImageSmoothingEnabled=!1,d.drawImage(m,v,g,i,o,0,0,r,n),m=p,h.setAttribute(\"transform\",b),h.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",m.toDataURL()),s.appendChild(h))},a.prototype.createPattern=function(t,e){var n,i=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"pattern\"),o=r(this.__ids);return i.setAttribute(\"id\",o),i.setAttribute(\"width\",t.width),i.setAttribute(\"height\",t.height),\"CANVAS\"===t.nodeName||\"IMG\"===t.nodeName?(n=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"image\"),n.setAttribute(\"width\",t.width),n.setAttribute(\"height\",t.height),n.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===t.nodeName?t.toDataURL():t.getAttribute(\"src\")),i.appendChild(n),this.__defs.appendChild(i)):t instanceof a&&(i.appendChild(t.__root.childNodes[1]),this.__defs.appendChild(i)),new u(i,this)},a.prototype.setLineDash=function(t){t&&t.length>0?this.lineDash=t.join(\",\"):this.lineDash=null},a.prototype.drawFocusRing=function(){},a.prototype.createImageData=function(){},a.prototype.getImageData=function(){},a.prototype.putImageData=function(){},a.prototype.globalCompositeOperation=function(){},a.prototype.setTransform=function(){},\"object\"==typeof window&&(window.C2S=a),\"object\"==typeof e&&\"object\"==typeof e.exports&&(e.exports=a)}()},function(t,e,r){\"use strict\";var n,i=t(270),o=t(280),s=t(284),a=t(279),l=t(284),u=t(286),c=Function.prototype.bind,_=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,o=u(e)&&l(e.value);return n=i(e),delete n.writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?o:(e.value=c.call(o,r.resolveContext?r.resolveContext(this):this),_(this,t,e),this[t])},n},e.exports=function(t){var e=o(arguments[1]);return null!=e.resolveContext&&s(e.resolveContext),a(t,function(t,r){return n(r,t,e)})}},function(t,e,r){\"use strict\";var n,i=t(267),o=t(280),s=t(273),a=t(287);n=e.exports=function(t,e){var r,n,s,l,u;return arguments.length<2||\"string\"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,\"c\"),n=a.call(t,\"e\"),s=a.call(t,\"w\")),u={value:e,configurable:r,enumerable:n,writable:s},l?i(o(l),u):u},n.gs=function(t,e,r){var n,l,u,c;return\"string\"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,l=!1):(n=a.call(t,\"c\"),l=a.call(t,\"e\")),c={get:e,set:r,configurable:n,enumerable:l},u?i(o(u),c):c}},function(t,e,r){\"use strict\";var n=t(286);e.exports=function(){return n(this).length=0,this}},function(t,e,r){\"use strict\";var n=t(261),i=t(265),o=t(286),s=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,l=Math.abs,u=Math.floor;e.exports=function(t){var e,r,c,_;if(!n(t))return s.apply(this,arguments);for(r=i(o(this).length),c=arguments[1],c=isNaN(c)?0:c>=0?u(c):i(this.length)-u(l(c)),e=c;e=55296&&v<=56319&&(x+=t[++r])),x=k?h.call(k,M,x,f):x,e?(p.value=x,d(y,f,p)):y[f]=x,++f;m=f}if(void 0===m)for(m=s(t.length),e&&(y=new e(m)),r=0;r0?1:-1}},function(t,e,r){\"use strict\";e.exports=t(262)()?Number.isNaN:t(263)},function(t,e,r){\"use strict\";e.exports=function(){var t=Number.isNaN;return\"function\"==typeof t&&(!t({})&&t(NaN)&&!t(34))}},function(t,e,r){\"use strict\";e.exports=function(t){return t!==t}},function(t,e,r){\"use strict\";var n=t(258),i=Math.abs,o=Math.floor;e.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){\"use strict\";var n=t(264),i=Math.max;e.exports=function(t){return i(0,n(t))}},function(t,e,r){\"use strict\";var n=t(284),i=t(286),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,u){var c,_=arguments[2],h=arguments[3];return r=Object(i(r)),n(u),c=a(r),h&&c.sort(\"function\"==typeof h?o.call(h,r):void 0),\"function\"!=typeof t&&(t=c[t]),s.call(t,c,function(t,n){return l.call(r,t)?s.call(u,_,r[t],t,r,n):e})}}},function(t,e,r){\"use strict\";e.exports=t(268)()?Object.assign:t(269)},function(t,e,r){\"use strict\";e.exports=function(){var t,e=Object.assign;return\"function\"==typeof e&&(t={foo:\"raz\"},e(t,{bar:\"dwa\"},{trzy:\"trzy\"}),t.foo+t.bar+t.trzy===\"razdwatrzy\")}},function(t,e,r){\"use strict\";var n=t(276),i=t(286),o=Math.max;e.exports=function(t,e){var r,s,a,l=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;s-1}},function(t,e,r){\"use strict\";var n=Object.prototype.toString,i=n.call(\"\");e.exports=function(t){return\"string\"==typeof t||t&&\"object\"==typeof t&&(t instanceof String||n.call(t)===i)||!1}},function(t,e,r){\"use strict\";var n=Object.create(null),i=Math.random;e.exports=function(){var t;do t=i().toString(36).slice(2);while(n[t]);return t}},function(t,e,r){\"use strict\";var n,i=t(281),o=t(287),s=t(248),a=t(295),l=Object.defineProperty;n=e.exports=function(t,e){return this instanceof n?(a.call(this,t),e=e?o.call(e,\"key+value\")?\"key+value\":o.call(e,\"key\")?\"key\":\"value\":\"value\",void l(this,\"__kind__\",s(\"\",e))):new n(t,e)},i&&i(n,a),n.prototype=Object.create(a.prototype,{constructor:s(n),_resolve:s(function(t){return\"value\"===this.__kind__?this.__list__[t]:\"key+value\"===this.__kind__?[t,this.__list__[t]]:t}),toString:s(function(){return\"[object Array Iterator]\"})})},function(t,e,r){\"use strict\";var n=t(254),i=t(284),o=t(290),s=t(294),a=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;e.exports=function(t,e){var r,c,_,h,p,d,f,y,m=arguments[2];if(a(t)||n(t)?r=\"array\":o(t)?r=\"string\":t=s(t),i(e),_=function(){h=!0},\"array\"===r)return void u.call(t,function(t){if(l.call(e,m,t,_),h)return!0});if(\"string\"!==r)for(c=t.next();!c.done;){if(l.call(e,m,c.value,_),h)return;c=t.next()}else for(d=t.length,p=0;p=55296&&y<=56319&&(f+=t[++p])),l.call(e,m,f,_),!h);++p);}},function(t,e,r){\"use strict\";var n=t(254),i=t(290),o=t(292),s=t(297),a=t(298),l=t(305).iterator;e.exports=function(t){return\"function\"==typeof a(t)[l]?t[l]():n(t)?new o(t):i(t)?new s(t):new o(t)}},function(t,e,r){\"use strict\";var n,i=t(249),o=t(267),s=t(284),a=t(286),l=t(248),u=t(247),c=t(305),_=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){return this instanceof n?(h(this,{__list__:l(\"w\",a(t)),__context__:l(\"w\",e),__nextIndex__:l(\"w\",0)}),void(e&&(s(e.on),e.on(\"_add\",this._onAdd),e.on(\"_delete\",this._onDelete),e.on(\"_clear\",this._onClear)))):new n(t,e)},h(n.prototype,o({constructor:l(n),_next:l(function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void _(this,\"__redo__\",l(\"c\",[t]));this.__redo__.forEach(function(e,r){e>=t&&(this.__redo__[r]=++e)},this),this.__redo__.push(t)}}),_onDelete:l(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),e!==-1&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e>t&&(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),_(n.prototype,c.iterator,l(function(){return this})),_(n.prototype,c.toStringTag,l(\"\",\"Iterator\"))},function(t,e,r){\"use strict\";var n=t(254),i=t(290),o=t(305).iterator,s=Array.isArray;e.exports=function(t){return null!=t&&(!!s(t)||(!!i(t)||(!!n(t)||\"function\"==typeof t[o])))}},function(t,e,r){\"use strict\";var n,i=t(281),o=t(248),s=t(295),a=Object.defineProperty;n=e.exports=function(t){return this instanceof n?(t=String(t),s.call(this,t),void a(this,\"__length__\",o(\"\",t.length))):new n(t)},i&&i(n,s),n.prototype=Object.create(s.prototype,{constructor:o(n),_next:o(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r)}),toString:o(function(){return\"[object String Iterator]\"})})},function(t,e,r){\"use strict\";var n=t(296);e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not iterable\");return t}},function(e,r,n){/*!\n", " * @overview es6-promise - a tiny implementation of Promises/A+.\n", " * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n", " * @license Licensed under MIT license\n", " * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE\n", " * @version 3.0.2\n", " */\n", " (function(){\"use strict\";function n(t){return\"function\"==typeof t||\"object\"==typeof t&&null!==t}function i(t){return\"function\"==typeof t}function o(t){return\"object\"==typeof t&&null!==t}function s(t){Y=t}function a(t){H=t}function l(){return function(){process.nextTick(p)}}function u(){return function(){U(p)}}function c(){var t=0,e=new $(p),r=document.createTextNode(\"\");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function _(){var t=new MessageChannel;return t.port1.onmessage=p,function(){t.port2.postMessage(0)}}function h(){return function(){setTimeout(p,1)}}function p(){for(var t=0;t\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,i,n),t.apply(this,arguments)}}function c(t,e,r){var n,i=e.prototype;n=t.prototype=Object.create(i),n.constructor=t,n._super=i,r&&pt(n,r)}function _(t,e){return function(){return t.apply(e,arguments)}}function h(t,e){return typeof t==yt?t.apply(e?e[0]||o:o,e):t}function p(t,e){return t===o?e:t}function d(t,e,r){l(v(e),function(e){t.addEventListener(e,r,!1)})}function f(t,e,r){l(v(e),function(e){t.removeEventListener(e,r,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function m(t,e){return t.indexOf(e)>-1}function v(t){return t.trim().split(/\\s+/g)}function g(t,e,r){if(t.indexOf&&!r)return t.indexOf(e);for(var n=0;nr[e]}):n.sort()),n}function x(t,e){for(var r,n,i=e[0].toUpperCase()+e.slice(1),s=0;s1&&!r.firstMultiple?r.firstMultiple=j(e):1===i&&(r.firstMultiple=!1);var o=r.firstInput,s=r.firstMultiple,a=s?s.center:o.center,l=e.center=z(n);e.timeStamp=gt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=F(a,l),e.distance=D(a,l),A(r,e),e.offsetDirection=N(e.deltaX,e.deltaY);var u=C(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=vt(u.x)>vt(u.y)?u.x:u.y,e.scale=s?B(s.pointers,n):1,e.rotation=s?I(s.pointers,n):0,e.maxPointers=r.prevInput?e.pointers.length>r.prevInput.maxPointers?e.pointers.length:r.prevInput.maxPointers:e.pointers.length,E(r,e);var c=t.element;y(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function A(t,e){var r=e.center,n=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==zt&&o.eventType!==Nt||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:r.x,y:r.y}),e.deltaX=i.x+(r.x-n.x),e.deltaY=i.y+(r.y-n.y)}function E(t,e){var r,n,i,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=Dt&&(l>jt||a.velocity===o)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,_=C(l,u,c);n=_.x,i=_.y,r=vt(_.x)>vt(_.y)?_.x:_.y,s=N(u,c),t.lastInterval=e}else r=a.velocity,n=a.velocityX,i=a.velocityY,s=a.direction;e.velocity=r,e.velocityX=n,e.velocityY=i,e.direction=s}function j(t){for(var e=[],r=0;r=vt(e)?t<0?It:Bt:e<0?Rt:Lt}function D(t,e,r){r||(r=Yt);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.sqrt(n*n+i*i)}function F(t,e,r){r||(r=Yt);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return 180*Math.atan2(i,n)/Math.PI}function I(t,e){return F(e[1],e[0],qt)+F(t[1],t[0],qt)}function B(t,e){return D(e[0],e[1],qt)/D(t[0],t[1],qt)}function R(){this.evEl=Wt,this.evWin=Ht,this.pressed=!1,S.apply(this,arguments)}function L(){this.evEl=$t,this.evWin=Zt,S.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function V(){this.evTarget=te,this.evWin=ee,this.started=!1,S.apply(this,arguments)}function G(t,e){var r=b(t.touches),n=b(t.changedTouches);return e&(Nt|Dt)&&(r=w(r.concat(n),\"identifier\",!0)),[r,n]}function U(){this.evTarget=ne,this.targetIds={},S.apply(this,arguments)}function Y(t,e){var r=b(t.touches),n=this.targetIds;if(e&(zt|Ct)&&1===r.length)return n[r[0].identifier]=!0,[r,r];var i,o,s=b(t.changedTouches),a=[],l=this.target;if(o=r.filter(function(t){return y(t.target,l)}),e===zt)for(i=0;i-1&&n.splice(t,1)};setTimeout(i,ie)}}function H(t){for(var e=t.srcEvent.clientX,r=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){r.manager.emit(e,t)}var r=this,n=this.state;n=ve&&e(r.options.event+K(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=we)},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&ye||!(this.state&ye)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=tt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(it,rt,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ye)},emit:function(t){if(1!==t.scale){var e=t.scale<1?\"in\":\"out\";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(ot,Z,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!r||t.eventType&(Nt|Dt)&&!i)this.reset();else if(t.eventType&zt)this.reset(),this._timer=s(function(){this.state=ge,this.tryEmit()},e.time,this);else if(t.eventType&Nt)return ge;return we},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ge&&(t&&t.eventType&Nt?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=gt(),this.manager.emit(this.options.event,this._input)))}}),c(st,rt,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ye)}}),c(at,rt,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:Vt|Gt,pointers:1},getTouchAction:function(){return nt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,r=this.options.direction;return r&(Vt|Gt)?e=t.overallVelocity:r&Vt?e=t.overallVelocityX:r&Gt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&vt(e)>this.options.velocity&&t.eventType&Nt},emit:function(t){var e=tt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(lt,Z,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,n=t.distance=\";case n.Eq:return\"==\"}};return this._expression+\" \"+e()+\" 0\"},Object.defineProperty(t.prototype,\"id\",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"expression\",{get:function(){return this._expression},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"op\",{get:function(){return this._operator},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"strength\",{get:function(){return this._strength},enumerable:!0,configurable:!0}),t}();r.Constraint=o;var s=0},function(t,e,r){\"use strict\";function n(t){for(var e=0,r=function(){return 0},n=s.createMap(o.Variable.Compare),i=0,a=t.length;i=0?\" + \"+l+a:\" - \"+-l+a}var u=this.constant;return u<0?r+=\" - \"+-u:u>0&&(r+=\" + \"+u),r},Object.defineProperty(t.prototype,\"terms\",{get:function(){return this._terms},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"constant\",{get:function(){return this._constant},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"value\",{get:function(){var t=this._constant;return i.forEach(this._terms,function(e){t+=e.first.value*e.second}),t},enumerable:!0,configurable:!0}),t}();r.Expression=a},function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n", " | Copyright (c) 2014, Nucleic Development Team.\n", " |\n", " | Distributed under the terms of the Modified BSD License.\n", " |\n", " | The full license is in the file COPYING.txt, distributed with this software.\n", " |----------------------------------------------------------------------------*/\n", " function n(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}Object.defineProperty(r,\"__esModule\",{value:!0}),n(t(328)),n(t(317)),n(t(316)),n(t(321)),n(t(320))},function(t,e,r){\"use strict\";function n(t){return new i.AssociativeArray(t)}/*-----------------------------------------------------------------------------\n", " | Copyright (c) 2014, Nucleic Development Team.\n", " |\n", " | Distributed under the terms of the Modified BSD License.\n", " |\n", " | The full license is in the file COPYING.txt, distributed with this software.\n", " |----------------------------------------------------------------------------*/\n", " Object.defineProperty(r,\"__esModule\",{value:!0});var i=t(325);r.createMap=n},function(t,e,r){\"use strict\";function n(t){var e=1e-8;return t<0?-t0&&a.type()!==f.Dummy){var u=this._objective.coefficientFor(a),c=u/l;c0;)n=s>>1,i=o+n,r(t[i],e)<0?(o=i+1,s-=n+1):s=n;return o}function i(t,e,r){var i=n(t,e,r);if(i===t.length)return-1;var o=t[i];return 0!==r(o,e)?-1:i}function o(t,e,r){var i=n(t,e,r);if(i!==t.length){var o=t[i];if(0===r(o,e))return o}}function s(t,e){var r=p.asArray(t),n=r.length;if(n<=1)return r;r.sort(e);for(var i=[r[0]],o=1,s=0;o0))return!1;++i}}return!0}function l(t,e,r){var n=t.length,i=e.length;if(n>i)return!1;for(var o=0,s=0;o0?++s:(++o,++s)}return!(o0?(a.push(u),++i):(a.push(l),++n,++i)}for(;n0?++i:(a.push(l),++n,++i)}return a}function _(t,e,r){for(var n=0,i=0,o=t.length,s=e.length,a=[];n0?++i:(++n,++i)}for(;n0?(a.push(u),++i):(++n,++i)}for(;n0?(a.push(u.copy()),++i):(a.push(u.copy()),++n,++i)}for(;n=0},e.prototype.find=function(t){return l.binaryFind(this._array,t,this._wrapped)},e.prototype.setDefault=function(t,e){var r=this._array,n=l.lowerBound(r,t,this._wrapped);if(n===r.length){var i=new s.Pair(t,e());return r.push(i),i}var o=r[n];if(0!==this._compare(o.first,t)){var i=new s.Pair(t,e());return r.splice(n,0,i),i}return o},e.prototype.insert=function(t,e){var r=this._array,n=l.lowerBound(r,t,this._wrapped);if(n===r.length){var i=new s.Pair(t,e);return r.push(i),i}var o=r[n];if(0!==this._compare(o.first,t)){var i=new s.Pair(t,e);return r.splice(n,0,i),i}return o.second=e,o},e.prototype.update=function(t){var r=this;t instanceof e?this._array=i(this._array,t._array,this._compare):u.forEach(t,function(t){r.insert(t.first,t.second)})},e.prototype.erase=function(t){var e=this._array,r=l.binarySearch(e,t,this._wrapped);if(!(r<0))return e.splice(r,1)[0]},e.prototype.copy=function(){for(var t=new e(this._compare),r=t._array,n=this._array,i=0,o=n.length;i0&&(a+=\".\"+i(e)),a}function s(t,e,r,n){var i,s,a=Math.pow(10,e);return s=t.toFixed(0).search(\"e\")>-1?o(t,e):(r(t*a)/a).toFixed(e),n&&(i=new RegExp(\"0{1,\"+n+\"}$\"),s=s.replace(i,\"\")),s}function a(t,e,r){var n;return n=e.indexOf(\"$\")>-1?l(t,e,r):e.indexOf(\"%\")>-1?u(t,e,r):e.indexOf(\":\")>-1?c(t):_(t,e,r)}function l(t,e,r){var n,i,o=e,s=o.indexOf(\"$\"),a=o.indexOf(\"(\"),l=o.indexOf(\"+\"),u=o.indexOf(\"-\"),c=\"\",h=\"\";if(o.indexOf(\"$\")===-1?\"infix\"===m[g].currency.position?(h=m[g].currency.symbol,m[g].currency.spaceSeparated&&(h=\" \"+h+\" \")):m[g].currency.spaceSeparated&&(c=\" \"):o.indexOf(\" $\")>-1?(c=\" \",o=o.replace(\" $\",\"\")):o.indexOf(\"$ \")>-1?(c=\" \",o=o.replace(\"$ \",\"\")):o=o.replace(\"$\",\"\"),i=_(t,o,r,h),e.indexOf(\"$\")===-1)switch(m[g].currency.position){case\"postfix\":i.indexOf(\")\")>-1?(i=i.split(\"\"),i.splice(-1,0,c+m[g].currency.symbol),i=i.join(\"\")):i=i+c+m[g].currency.symbol;break;case\"infix\":break;case\"prefix\":i.indexOf(\"(\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),n=Math.max(a,u)+1,i.splice(n,0,m[g].currency.symbol+c),i=i.join(\"\")):i=m[g].currency.symbol+c+i;break;default:throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]')}else s<=1?i.indexOf(\"(\")>-1||i.indexOf(\"+\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),n=1,(s-1?(i=i.split(\"\"),i.splice(-1,0,c+m[g].currency.symbol),i=i.join(\"\")):i=i+c+m[g].currency.symbol;return i}function u(t,e,r){var n,i=\"\";return t=100*t,e.indexOf(\" %\")>-1?(i=\" \",e=e.replace(\" %\",\"\")):e=e.replace(\"%\",\"\"),n=_(t,e,r),n.indexOf(\")\")>-1?(n=n.split(\"\"),n.splice(-1,0,i+\"%\"),n=n.join(\"\")):n=n+i+\"%\",n}function c(t){var e=Math.floor(t/60/60),r=Math.floor((t-60*e*60)/60),n=Math.round(t-60*e*60-60*r);return e+\":\"+(r<10?\"0\"+r:r)+\":\"+(n<10?\"0\"+n:n)}function _(t,e,r,n){var i,o,a,l,u,c,_,h,p,d,f,y,v,w,x,k,M,S,T=!1,O=!1,P=!1,A=\"\",E=!1,j=!1,z=!1,C=!1,N=!1,D=\"\",F=\"\",I=Math.abs(t),B=[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"],R=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],L=\"\",V=!1,G=!1,U=\"\";if(0===t&&null!==b)return b;if(!isFinite(t))return\"\"+t;if(0===e.indexOf(\"{\")){var Y=e.indexOf(\"}\");if(Y===-1)throw Error('Format should also contain a \"}\"');y=e.slice(1,Y),e=e.slice(Y+1)}else y=\"\";if(e.indexOf(\"}\")===e.length-1){var q=e.indexOf(\"{\");if(q===-1)throw Error('Format should also contain a \"{\"');v=e.slice(q+1,-1),e=e.slice(0,q+1)}else v=\"\";var X;if(X=e.indexOf(\".\")===-1?e.match(/([0-9]+).*/):e.match(/([0-9]+)\\..*/),S=null===X?-1:X[1].length,e.indexOf(\"-\")!==-1&&(V=!0),e.indexOf(\"(\")>-1?(T=!0,e=e.slice(1,-1)):e.indexOf(\"+\")>-1&&(O=!0,e=e.replace(/\\+/g,\"\")),e.indexOf(\"a\")>-1){if(d=e.split(\".\")[0].match(/[0-9]+/g)||[\"0\"],d=parseInt(d[0],10),E=e.indexOf(\"aK\")>=0,j=e.indexOf(\"aM\")>=0,z=e.indexOf(\"aB\")>=0,C=e.indexOf(\"aT\")>=0,N=E||j||z||C,e.indexOf(\" a\")>-1?(A=\" \",e=e.replace(\" a\",\"\")):e=e.replace(\"a\",\"\"),u=Math.floor(Math.log(I)/Math.LN10)+1,_=u%3,_=0===_?3:_,d&&0!==I&&(c=Math.floor(Math.log(I)/Math.LN10)+1-d,h=3*~~((Math.min(d,u)-_)/3),I/=Math.pow(10,h),e.indexOf(\".\")===-1&&d>3))for(e+=\"[.]\",k=0===c?0:3*~~(c/3)-c,k=k<0?k+3:k,i=0;i=Math.pow(10,12)&&!N||C?(A+=m[g].abbreviations.trillion,t/=Math.pow(10,12)):I=Math.pow(10,9)&&!N||z?(A+=m[g].abbreviations.billion,t/=Math.pow(10,9)):I=Math.pow(10,6)&&!N||j?(A+=m[g].abbreviations.million,t/=Math.pow(10,6)):(I=Math.pow(10,3)&&!N||E)&&(A+=m[g].abbreviations.thousand,t/=Math.pow(10,3)))}if(e.indexOf(\"b\")>-1)for(e.indexOf(\" b\")>-1?(D=\" \",e=e.replace(\" b\",\"\")):e=e.replace(\"b\",\"\"),l=0;l<=B.length;l++)if(o=Math.pow(1024,l),a=Math.pow(1024,l+1),t>=o&&t0&&(t/=o);break}if(e.indexOf(\"d\")>-1)for(e.indexOf(\" d\")>-1?(D=\" \",e=e.replace(\" d\",\"\")):e=e.replace(\"d\",\"\"),l=0;l<=R.length;l++)if(o=Math.pow(1e3,l),a=Math.pow(1e3,l+1),t>=o&&t0&&(t/=o);break}if(e.indexOf(\"o\")>-1&&(e.indexOf(\" o\")>-1?(F=\" \",e=e.replace(\" o\",\"\")):e=e.replace(\"o\",\"\"),m[g].ordinal&&(F+=m[g].ordinal(t))),e.indexOf(\"[.]\")>-1&&(P=!0,e=e.replace(\"[.]\",\".\")),p=t.toString().split(\".\")[0],f=e.split(\".\")[1],w=e.indexOf(\",\"),f){if(f.indexOf(\"*\")!==-1?L=s(t,t.toString().split(\".\")[1].length,r):f.indexOf(\"[\")>-1?(f=f.replace(\"]\",\"\"),f=f.split(\"[\"),L=s(t,f[0].length+f[1].length,r,f[1].length)):L=s(t,f.length,r),p=L.split(\".\")[0],L.split(\".\")[1].length){var W=n?A+n:m[g].delimiters.decimal;L=W+L.split(\".\")[1]}else L=\"\";P&&0===Number(L.slice(1))&&(L=\"\")}else p=s(t,null,r);return p.indexOf(\"-\")>-1&&(p=p.slice(1),G=!0),p.length-1&&(p=p.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+m[g].delimiters.thousands)),0===e.indexOf(\".\")&&(p=\"\"),x=e.indexOf(\"(\"),M=e.indexOf(\"-\"),U=x2)&&(o.length<2?!!o[0].match(/^\\d+.*\\d$/)&&!o[0].match(a):1===o[0].length?!!o[0].match(/^\\d+$/)&&!o[0].match(a)&&!!o[1].match(/^\\d+$/):!!o[0].match(/^\\d+.*\\d$/)&&!o[0].match(a)&&!!o[1].match(/^\\d+$/)))))},e.exports={format:d}},function(t,e,r){function n(t,e){if(!(this instanceof n))return new n(t);e=e||function(t){if(t)throw t};var r=i(t);if(\"object\"!=typeof r)return void e(t);var s=n.projections.get(r.projName);if(!s)return void e(t);if(r.datumCode&&\"none\"!==r.datumCode){var c=l[r.datumCode];c&&(r.datum_params=c.towgs84?c.towgs84.split(\",\"):null,r.ellps=c.ellipse,r.datumName=c.datumName?c.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||\"enu\";var _=a.sphere(r.a,r.b,r.rf,r.ellps,r.sphere),h=a.eccentricity(_.a,_.b,_.rf,r.R_A),p=r.datum||u(r.datumCode,r.datum_params,_.a,_.b,h.es,h.ep2);o(this,r),o(this,s),this.a=_.a,this.b=_.b,this.rf=_.rf,this.sphere=_.sphere,this.es=h.es,this.e=h.e,this.ep2=h.ep2,this.datum=p,this.init(),e(null,this)}var i=t(350),o=t(348),s=t(352),a=t(347),l=t(338),u=t(343);n.projections=s,n.projections.start(),e.exports=n},function(t,e,r){e.exports=function(t,e,r){var n,i,o,s=r.x,a=r.y,l=r.z||0,u={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==r.z)switch(0===o?(n=s,i=\"x\"):1===o?(n=a,i=\"y\"):(n=l,i=\"z\"),t.axis[o]){case\"e\":u[i]=n;break;case\"w\":u[i]=-n;break;case\"n\":u[i]=n;break;case\"s\":u[i]=-n;break;case\"u\":void 0!==r[i]&&(u.z=n);break;case\"d\":void 0!==r[i]&&(u.z=-n);break;default:return null}return u}},function(t,e,r){var n=2*Math.PI,i=3.14159265359,o=t(335);e.exports=function(t){return Math.abs(t)<=i?t:t-o(t)*n}},function(t,e,r){e.exports=function(t,e,r){var n=t*e;return r/Math.sqrt(1-n*n)}},function(t,e,r){var n=Math.PI/2;e.exports=function(t,e){for(var r,i,o=.5*t,s=n-2*Math.atan(e),a=0;a<=15;a++)if(r=t*Math.sin(s),i=n-2*Math.atan(e*Math.pow((1-r)/(1+r),o))-s,s+=i,Math.abs(i)<=1e-10)return s;return-9999}},function(t,e,r){e.exports=function(t){return t<0?-1:1}},function(t,e,r){e.exports=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}},function(t,e,r){var n=Math.PI/2;e.exports=function(t,e,r){var i=t*r,o=.5*t;return i=Math.pow((1-i)/(1+i),o),Math.tan(.5*(n-e))/i}},function(t,e,r){r.wgs84={towgs84:\"0,0,0\",ellipse:\"WGS84\",datumName:\"WGS84\"},r.ch1903={towgs84:\"674.374,15.056,405.346\",ellipse:\"bessel\",datumName:\"swiss\"},r.ggrs87={towgs84:\"-199.87,74.79,246.62\",ellipse:\"GRS80\",datumName:\"Greek_Geodetic_Reference_System_1987\"},r.nad83={towgs84:\"0,0,0\",ellipse:\"GRS80\",datumName:\"North_American_Datum_1983\"},r.nad27={nadgrids:\"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat\",ellipse:\"clrk66\",datumName:\"North_American_Datum_1927\"},r.potsdam={towgs84:\"606.0,23.0,413.0\",ellipse:\"bessel\",datumName:\"Potsdam Rauenberg 1950 DHDN\"},r.carthage={towgs84:\"-263.0,6.0,431.0\",ellipse:\"clark80\",datumName:\"Carthage 1934 Tunisia\"},r.hermannskogel={towgs84:\"653.0,-212.0,449.0\",ellipse:\"bessel\",datumName:\"Hermannskogel\"},r.ire65={towgs84:\"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",ellipse:\"mod_airy\",datumName:\"Ireland 1965\"},r.rassadiran={towgs84:\"-133.63,-157.5,-158.62\",ellipse:\"intl\",datumName:\"Rassadiran\"},r.nzgd49={towgs84:\"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993\",ellipse:\"intl\",datumName:\"New Zealand Geodetic Datum 1949\"},r.osgb36={towgs84:\"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894\",ellipse:\"airy\",datumName:\"Airy 1830\"},r.s_jtsk={towgs84:\"589,76,480\",ellipse:\"bessel\",datumName:\"S-JTSK (Ferro)\"},r.beduaram={towgs84:\"-106,-87,188\",ellipse:\"clrk80\",datumName:\"Beduaram\"},r.gunung_segara={towgs84:\"-403,684,41\",ellipse:\"bessel\",datumName:\"Gunung Segara Jakarta\"},r.rnb72={towgs84:\"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1\",ellipse:\"intl\",datumName:\"Reseau National Belge 1972\"}},function(t,e,r){r.MERIT={a:6378137,rf:298.257,ellipseName:\"MERIT 1983\"},r.SGS85={a:6378136,rf:298.257,ellipseName:\"Soviet Geodetic System 85\"},r.GRS80={a:6378137,rf:298.257222101,ellipseName:\"GRS 1980(IUGG, 1980)\"},r.IAU76={a:6378140,rf:298.257,ellipseName:\"IAU 1976\"},r.airy={a:6377563.396,b:6356256.91,ellipseName:\"Airy 1830\"},r.APL4={a:6378137,rf:298.25,ellipseName:\"Appl. Physics. 1965\"},r.NWL9D={a:6378145,rf:298.25,ellipseName:\"Naval Weapons Lab., 1965\"},r.mod_airy={a:6377340.189,b:6356034.446,ellipseName:\"Modified Airy\"},r.andrae={a:6377104.43,rf:300,ellipseName:\"Andrae 1876 (Den., Iclnd.)\"},r.aust_SA={a:6378160,rf:298.25,ellipseName:\"Australian Natl & S. Amer. 1969\"},r.GRS67={a:6378160,rf:298.247167427,ellipseName:\"GRS 67(IUGG 1967)\"},r.bessel={a:6377397.155,rf:299.1528128,ellipseName:\"Bessel 1841\"},r.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:\"Bessel 1841 (Namibia)\"},r.clrk66={a:6378206.4,b:6356583.8,ellipseName:\"Clarke 1866\"},r.clrk80={a:6378249.145,rf:293.4663,ellipseName:\"Clarke 1880 mod.\"},r.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:\"Clarke 1858\"},r.CPM={a:6375738.7,rf:334.29,ellipseName:\"Comm. des Poids et Mesures 1799\"},r.delmbr={a:6376428,rf:311.5,ellipseName:\"Delambre 1810 (Belgium)\"},r.engelis={a:6378136.05,rf:298.2566,ellipseName:\"Engelis 1985\"},r.evrst30={a:6377276.345,rf:300.8017,ellipseName:\"Everest 1830\"},r.evrst48={a:6377304.063,rf:300.8017,ellipseName:\"Everest 1948\"},r.evrst56={a:6377301.243,rf:300.8017,ellipseName:\"Everest 1956\"},r.evrst69={a:6377295.664,rf:300.8017,ellipseName:\"Everest 1969\"},r.evrstSS={a:6377298.556,rf:300.8017,ellipseName:\"Everest (Sabah & Sarawak)\"},r.fschr60={a:6378166,rf:298.3,ellipseName:\"Fischer (Mercury Datum) 1960\"},r.fschr60m={a:6378155,rf:298.3,ellipseName:\"Fischer 1960\"},r.fschr68={a:6378150,rf:298.3,ellipseName:\"Fischer 1968\"},r.helmert={a:6378200,rf:298.3,ellipseName:\"Helmert 1906\"},r.hough={a:6378270,rf:297,ellipseName:\"Hough\"},r.intl={a:6378388,rf:297,ellipseName:\"International 1909 (Hayford)\"},r.kaula={a:6378163,rf:298.24,ellipseName:\"Kaula 1961\"},r.lerch={a:6378139,rf:298.257,ellipseName:\"Lerch 1979\"},r.mprts={a:6397300,rf:191,ellipseName:\"Maupertius 1738\"},r.new_intl={a:6378157.5,b:6356772.2,ellipseName:\"New International 1967\"},r.plessis={a:6376523,rf:6355863,ellipseName:\"Plessis 1817 (France)\"},r.krass={a:6378245,rf:298.3,ellipseName:\"Krassovsky, 1942\"},r.SEasia={a:6378155,b:6356773.3205,ellipseName:\"Southeast Asia\"},r.walbeck={a:6376896,b:6355834.8467,ellipseName:\"Walbeck\"},r.WGS60={a:6378165,rf:298.3,ellipseName:\"WGS 60\"},r.WGS66={a:6378145,rf:298.25,ellipseName:\"WGS 66\"},r.WGS7={a:6378135,rf:298.26,ellipseName:\"WGS 72\"},r.WGS84={a:6378137,rf:298.257223563,ellipseName:\"WGS 84\"},r.sphere={a:6370997,b:6370997,ellipseName:\"Normal Sphere (r=6370997)\"}},function(t,e,r){r.greenwich=0,r.lisbon=-9.131906111111,r.paris=2.337229166667,r.bogota=-74.080916666667,r.madrid=-3.687938888889,r.rome=12.452333333333,r.bern=7.439583333333,r.jakarta=106.807719444444,r.ferro=-17.666666666667,r.brussels=4.367975,r.stockholm=18.058277777778,r.athens=23.7163375,r.oslo=10.722916666667},function(t,e,r){r.ft={to_meter:.3048},r[\"us-ft\"]={to_meter:1200/3937}},function(t,e,r){function n(t,e,r){var n;return Array.isArray(r)?(n=a(t,e,r),3===r.length?[n.x,n.y,n.z]:[n.x,n.y]):a(t,e,r)}function i(t){return t instanceof s?t:t.oProj?t.oProj:s(t)}function o(t,e,r){t=i(t);var o,s=!1;return\"undefined\"==typeof e?(e=t,t=l,s=!0):(\"undefined\"!=typeof e.x||Array.isArray(e))&&(r=e,e=t,t=l,s=!0),e=i(e),r?n(t,e,r):(o={forward:function(r){return n(t,e,r)},inverse:function(r){return n(e,t,r)}},s&&(o.oProj=e),o)}var s=t(330),a=t(355),l=s(\"WGS84\");e.exports=o},function(t,e,r){function n(t,e,r,n,u,c){var _={};return _.datum_type=s,t&&\"none\"===t&&(_.datum_type=a),e&&(_.datum_params=e.map(parseFloat),0===_.datum_params[0]&&0===_.datum_params[1]&&0===_.datum_params[2]||(_.datum_type=i),_.datum_params.length>3&&(0===_.datum_params[3]&&0===_.datum_params[4]&&0===_.datum_params[5]&&0===_.datum_params[6]||(_.datum_type=o,_.datum_params[3]*=l,_.datum_params[4]*=l,_.datum_params[5]*=l,_.datum_params[6]=_.datum_params[6]/1e6+1))),_.a=r,_.b=n,_.es=u,_.ep2=c,_}var i=1,o=2,s=4,a=5,l=484813681109536e-20;e.exports=n},function(t,e,r){\"use strict\";var n=1,i=2,o=Math.PI/2;r.compareDatums=function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(this.es-e.es)>5e-11)&&(t.datum_type===n?this.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==i||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))},r.geodeticToGeocentric=function(t,e,r){var n,i,s,a,l=t.x,u=t.y,c=t.z?t.z:0;if(u<-o&&u>-1.001*o)u=-o;else if(u>o&&u<1.001*o)u=o;else if(u<-o||u>o)return null;return l>Math.PI&&(l-=2*Math.PI),i=Math.sin(u),a=Math.cos(u),s=i*i,n=r/Math.sqrt(1-e*s),{x:(n+c)*a*Math.cos(l),y:(n+c)*a*Math.sin(l),z:(n*(1-e)+c)*i}},r.geocentricToGeodetic=function(t,e,r,n){var i,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w=1e-12,x=w*w,k=30,M=t.x,S=t.y,T=t.z?t.z:0;if(i=Math.sqrt(M*M+S*S),s=Math.sqrt(M*M+S*S+T*T),i/rx&&m-1})}function s(t){return\"+\"===t[0]}function a(t){return n(t)?i(t)?l[t]:o(t)?u(t):s(t)?c(t):void 0:t}var l=t(346),u=t(356),c=t(351),_=[\"GEOGCS\",\"GEOCCS\",\"PROJCS\",\"LOCAL_CS\"];e.exports=a},function(t,e,r){var n=.017453292519943295,i=t(340),o=t(341);e.exports=function(t){var e,r,s,a={},l=t.split(\"+\").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var r=e.split(\"=\");return r.push(!0),t[r[0].toLowerCase()]=r[1],t},{}),u={proj:\"projName\",datum:\"datumCode\",rf:function(t){a.rf=parseFloat(t)},lat_0:function(t){a.lat0=t*n},lat_1:function(t){a.lat1=t*n},lat_2:function(t){a.lat2=t*n},lat_ts:function(t){a.lat_ts=t*n},lon_0:function(t){a.long0=t*n},lon_1:function(t){a.long1=t*n},lon_2:function(t){a.long2=t*n},alpha:function(t){a.alpha=parseFloat(t)*n},lonc:function(t){a.longc=t*n},x_0:function(t){a.x0=parseFloat(t)},y_0:function(t){a.y0=parseFloat(t)},k_0:function(t){a.k0=parseFloat(t)},k:function(t){a.k0=parseFloat(t)},a:function(t){a.a=parseFloat(t)},b:function(t){a.b=parseFloat(t)},r_a:function(){a.R_A=!0},zone:function(t){a.zone=parseInt(t,10)},south:function(){a.utmSouth=!0},towgs84:function(t){a.datum_params=t.split(\",\").map(function(t){return parseFloat(t)})},to_meter:function(t){a.to_meter=parseFloat(t)},units:function(t){a.units=t,o[t]&&(a.to_meter=o[t].to_meter)},from_greenwich:function(t){a.from_greenwich=t*n},pm:function(t){a.from_greenwich=(i[t]?i[t]:parseFloat(t))*n},nadgrids:function(t){\"@null\"===t?a.datumCode=\"none\":a.nadgrids=t},axis:function(t){var e=\"ewnsud\";3===t.length&&e.indexOf(t.substr(0,1))!==-1&&e.indexOf(t.substr(1,1))!==-1&&e.indexOf(t.substr(2,1))!==-1&&(a.axis=t)}};for(e in l)r=l[e],e in u?(s=u[e],\"function\"==typeof s?s(r):a[s]=r):a[e]=r;return\"string\"==typeof a.datumCode&&\"WGS84\"!==a.datumCode&&(a.datumCode=a.datumCode.toLowerCase()),a}},function(t,e,r){function n(t,e){var r=s.length;return t.names?(s[r]=t,t.names.forEach(function(t){o[t.toLowerCase()]=r}),this):(console.log(e),!0)}var i=[t(354),t(353)],o={},s=[];r.add=n,r.get=function(t){if(!t)return!1;var e=t.toLowerCase();return\"undefined\"!=typeof o[e]&&s[o[e]]?s[o[e]]:void 0},r.start=function(){i.forEach(n)}},function(t,e,r){function n(t){return t}r.init=function(){},r.forward=n,r.inverse=n,r.names=[\"longlat\",\"identity\"]},function(t,e,r){var n=t(333),i=Math.PI/2,o=1e-10,s=57.29577951308232,a=t(332),l=Math.PI/4,u=t(337),c=t(334);r.init=function(){var t=this.b/this.a;this.es=1-t*t,\"x0\"in this||(this.x0=0),\"y0\"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=n(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},r.forward=function(t){var e=t.x,r=t.y;if(r*s>90&&r*s<-90&&e*s>180&&e*s<-180)return null;var n,c;if(Math.abs(Math.abs(r)-i)<=o)return null;if(this.sphere)n=this.x0+this.a*this.k0*a(e-this.long0),c=this.y0+this.a*this.k0*Math.log(Math.tan(l+.5*r));else{var _=Math.sin(r),h=u(this.e,r,_);n=this.x0+this.a*this.k0*a(e-this.long0),c=this.y0-this.a*this.k0*Math.log(h)}return t.x=n,t.y=c,t},r.inverse=function(t){var e,r,n=t.x-this.x0,o=t.y-this.y0;if(this.sphere)r=i-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var s=Math.exp(-o/(this.a*this.k0));if(r=c(this.e,s),r===-9999)return null}return e=a(this.long0+n/(this.a*this.k0)),t.x=e,t.y=r,t},r.names=[\"Mercator\",\"Popular Visualisation Pseudo Mercator\",\"Mercator_1SP\",\"Mercator_Auxiliary_Sphere\",\"merc\"]},function(t,e,r){function n(t,e){return(t.datum.datum_type===s||t.datum.datum_type===a)&&\"WGS84\"!==e.datumCode||(e.datum.datum_type===s||e.datum.datum_type===a)&&\"WGS84\"!==t.datumCode}var i=.017453292519943295,o=57.29577951308232,s=1,a=2,l=t(345),u=t(331),c=t(330),_=t(336);e.exports=function h(t,e,r){var s;return Array.isArray(r)&&(r=_(r)),t.datum&&e.datum&&n(t,e)&&(s=new c(\"WGS84\"),r=h(t,s,r),t=s),\"enu\"!==t.axis&&(r=u(t,!1,r)),\"longlat\"===t.projName?r={x:r.x*i,y:r.y*i}:(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter}),r=t.inverse(r)),t.from_greenwich&&(r.x+=t.from_greenwich),r=l(t.datum,e.datum,r),e.from_greenwich&&(r={x:r.x-e.grom_greenwich,y:r.y}),\"longlat\"===e.projName?r={x:r.x*o,y:r.y*o}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter})),\"enu\"!==e.axis?u(e,!0,r):r}},function(t,e,r){function n(t,e,r){t[e]=r.map(function(t){var e={};return i(t,e),e}).reduce(function(t,e){return u(t,e)},{})}function i(t,e){var r;return Array.isArray(t)?(r=t.shift(),\"PARAMETER\"===r&&(r=t.shift()),1===t.length?Array.isArray(t[0])?(e[r]={},i(t[0],e[r])):e[r]=t[0]:t.length?\"TOWGS84\"===r?e[r]=t:(e[r]={},[\"UNIT\",\"PRIMEM\",\"VERT_DATUM\"].indexOf(r)>-1?(e[r]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(e[r].auth=t[2])):\"SPHEROID\"===r?(e[r]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(e[r].auth=t[3])):[\"GEOGCS\",\"GEOCCS\",\"DATUM\",\"VERT_CS\",\"COMPD_CS\",\"LOCAL_CS\",\"FITTED_CS\",\"LOCAL_DATUM\"].indexOf(r)>-1?(t[0]=[\"name\",t[0]],n(e,r,t)):t.every(function(t){return Array.isArray(t)})?n(e,r,t):i(t,e[r])):e[r]=!0,void 0):void(e[t]=!0)}function o(t,e){var r=e[0],n=e[1];!(r in t)&&n in t&&(t[r]=t[n],3===e.length&&(t[r]=e[2](t[r])))}function s(t){return t*l}function a(t){function e(e){var r=t.to_meter||1;return parseFloat(e,10)*r}\"GEOGCS\"===t.type?t.projName=\"longlat\":\"LOCAL_CS\"===t.type?(t.projName=\"identity\",t.local=!0):\"object\"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),\"metre\"===t.units&&(t.units=\"meter\"),t.UNIT.convert&&(\"GEOGCS\"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=parseFloat(t.UNIT.convert,10)*t.DATUM.SPHEROID.a):t.to_meter=parseFloat(t.UNIT.convert,10))),t.GEOGCS&&(t.GEOGCS.DATUM?t.datumCode=t.GEOGCS.DATUM.name.toLowerCase():t.datumCode=t.GEOGCS.name.toLowerCase(),\"d_\"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),\"new_zealand_geodetic_datum_1949\"!==t.datumCode&&\"new_zealand_1949\"!==t.datumCode||(t.datumCode=\"nzgd49\"),\"wgs_1984\"===t.datumCode&&(\"Mercator_Auxiliary_Sphere\"===t.PROJECTION&&(t.sphere=!0),t.datumCode=\"wgs84\"),\"_ferro\"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),\"_jakarta\"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf(\"belge\")&&(t.datumCode=\"rnb72\"),t.GEOGCS.DATUM&&t.GEOGCS.DATUM.SPHEROID&&(t.ellps=t.GEOGCS.DATUM.SPHEROID.name.replace(\"_19\",\"\").replace(/[Cc]larke\\_18/,\"clrk\"),\"international\"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps=\"intl\"),t.a=t.GEOGCS.DATUM.SPHEROID.a,t.rf=parseFloat(t.GEOGCS.DATUM.SPHEROID.rf,10)),~t.datumCode.indexOf(\"osgb_1936\")&&(t.datumCode=\"osgb36\")),t.b&&!isFinite(t.b)&&(t.b=t.a);var r=function(e){return o(t,e)},n=[[\"standard_parallel_1\",\"Standard_Parallel_1\"],[\"standard_parallel_2\",\"Standard_Parallel_2\"],[\"false_easting\",\"False_Easting\"],[\"false_northing\",\"False_Northing\"],[\"central_meridian\",\"Central_Meridian\"],[\"latitude_of_origin\",\"Latitude_Of_Origin\"],[\"latitude_of_origin\",\"Central_Parallel\"],[\"scale_factor\",\"Scale_Factor\"],[\"k0\",\"scale_factor\"],[\"latitude_of_center\",\"Latitude_of_center\"],[\"lat0\",\"latitude_of_center\",s],[\"longitude_of_center\",\"Longitude_Of_Center\"],[\"longc\",\"longitude_of_center\",s],[\"x0\",\"false_easting\",e],[\"y0\",\"false_northing\",e],[\"long0\",\"central_meridian\",s],[\"lat0\",\"latitude_of_origin\",s],[\"lat0\",\"standard_parallel_1\",s],[\"lat1\",\"standard_parallel_1\",s],[\"lat2\",\"standard_parallel_2\",s],[\"alpha\",\"azimuth\",s],[\"srsCode\",\"name\"]];n.forEach(r),t.long0||!t.longc||\"Albers_Conic_Equal_Area\"!==t.projName&&\"Lambert_Azimuthal_Equal_Area\"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||\"Stereographic_South_Pole\"!==t.projName&&\"Polar Stereographic (variant B)\"!==t.projName||(t.lat0=s(t.lat1>0?90:-90),t.lat_ts=t.lat1)}var l=.017453292519943295,u=t(348);e.exports=function(t,e){var r=JSON.parse((\",\"+t).replace(/\\s*\\,\\s*([A-Z_0-9]+?)(\\[)/g,',[\"$1\",').slice(1).replace(/\\s*\\,\\s*([A-Z_0-9]+?)\\]/g,',\"$1\"]').replace(/,\\[\"VERTCS\".+/,\"\")),n=r.shift(),o=r.shift();r.unshift([\"name\",o]),r.unshift([\"type\",n]),r.unshift(\"output\");var s={};return i(r,s),a(s.output),u(e,s.output)}},function(t,e,r){\"use strict\";function n(t,e,r,s,a){for(r=r||0,s=s||t.length-1,a=a||o;s>r;){if(s-r>600){var l=s-r+1,u=e-r+1,c=Math.log(l),_=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*_*(l-_)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(e-u*_/l+h)),d=Math.min(s,Math.floor(e+(l-u)*_/l+h));n(t,e,p,d,a)}var f=t[e],y=r,m=s;for(i(t,r,e),a(t[s],f)>0&&i(t,r,s);y0;)m--}0===a(t[r],f)?i(t,r,m):(m++,i(t,m,s)),m<=e&&(r=m+1),e<=m&&(s=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function o(t,e){return te?1:0}e.exports=n},function(t,e,r){\"use strict\";function n(t,e){return this instanceof n?(this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),void this.clear()):new n(t,e)}function i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function y(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-(1/0),maxY:-(1/0)}}function m(t,e,r,n,i){for(var o,s=[e,r];s.length;)r=s.pop(),e=s.pop(),r-e<=n||(o=e+Math.ceil((r-e)/n/2)*n,v(t,o,e,r,i),s.push(e,o,o,r))}e.exports=n;var v=t(357);n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,r=[],n=this.toBBox;if(!f(t,e))return r;for(var i,o,s,a,l=[];e;){for(i=0,o=e.children.length;i=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var s=this._chooseSplitIndex(r,i,n),a=y(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,o(r,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},_splitRoot:function(t,e){this.data=y([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,r){var n,i,o,a,l,u,_,h;for(u=_=1/0,n=e;n<=r-e;n++)i=s(t,0,n,this.toBBox),o=s(t,n,r,this.toBBox),a=p(i,o),l=c(i)+c(o),a=e;i--)o=t.children[i],a(c,t.leaf?l(o):o),h+=_(c);return h},_adjustParentBBoxes:function(t,e,r){for(var n=r;n>=0;n--)a(e[n],t)},_condense:function(t){for(var e,r=t.length-1;r>=0;r--)0===t[r].children.length?r>0?(e=t[r-1].children,e.splice(e.indexOf(t[r]),1)):this.clear():o(t[r],this.toBBox)},_initFormat:function(t){var e=[\"return a\",\" - b\",\";\"];this.compareMinX=new Function(\"a\",\"b\",e.join(t[0])),this.compareMinY=new Function(\"a\",\"b\",e.join(t[1])),this.toBBox=new Function(\"a\",\"return {minX: a\"+t[0]+\", minY: a\"+t[1]+\", maxX: a\"+t[2]+\", maxY: a\"+t[3]+\"};\")}}},function(e,r,n){!function(){\"use strict\";function e(t){return i(o(t),arguments)}function r(t,r){return e.apply(null,[t].concat(r||[]))}function i(t,r){var n,i,o,a,l,u,c,_,h,p=1,d=t.length,f=\"\";for(i=0;i=0),a[8]){case\"b\":n=parseInt(n,10).toString(2);break;case\"c\":n=String.fromCharCode(parseInt(n,10));break;case\"d\":case\"i\":n=parseInt(n,10);break;case\"j\":n=JSON.stringify(n,null,a[6]?parseInt(a[6]):0);break;case\"e\":n=a[7]?parseFloat(n).toExponential(a[7]):parseFloat(n).toExponential();break;case\"f\":n=a[7]?parseFloat(n).toFixed(a[7]):parseFloat(n);break;case\"g\":n=a[7]?String(Number(n.toPrecision(a[7]))):parseFloat(n);break;case\"o\":n=(parseInt(n,10)>>>0).toString(8);break;case\"s\":n=String(n),n=a[7]?n.substring(0,a[7]):n;break;case\"t\":n=String(!!n),n=a[7]?n.substring(0,a[7]):n;break;case\"T\":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a[7]?n.substring(0,a[7]):n;break;case\"u\":n=parseInt(n,10)>>>0;break;case\"v\":n=n.valueOf(),n=a[7]?n.substring(0,a[7]):n;break;case\"x\":n=(parseInt(n,10)>>>0).toString(16);break;case\"X\":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}s.json.test(a[8])?f+=n:(!s.number.test(a[8])||_&&!a[3]?h=\"\":(h=_?\"+\":\"-\",n=n.toString().replace(s.sign,\"\")),u=a[4]?\"0\"===a[4]?\"0\":a[4].charAt(1):\" \",c=a[6]-(h+n).length,l=a[6]&&c>0?u.repeat(c):\"\",f+=a[5]?h+n+l:\"0\"===u?h+l+n:l+h+n)}return f}function o(t){if(a[t])return a[t];for(var e,r=t,n=[],i=0;r;){if(null!==(e=s.text.exec(r)))n.push(e[0]);else if(null!==(e=s.modulo.exec(r)))n.push(\"%\");else{if(null===(e=s.placeholder.exec(r)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(e[2]){i|=1;var o=[],l=e[2],u=[];if(null===(u=s.key.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(o.push(u[1]);\"\"!==(l=l.substring(u[0].length));)if(null!==(u=s.key_access.exec(l)))o.push(u[1]);else{if(null===(u=s.index_access.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");o.push(u[1])}e[2]=o}else i|=2;if(3===i)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");n.push(e)}r=r.substring(e[0].length)}return a[t]=n}var s={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,\n", " index_access:/^\\[(\\d+)\\]/,sign:/^[\\+\\-]/},a=Object.create(null);\"undefined\"!=typeof n&&(n.sprintf=e,n.vsprintf=r),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=r,\"function\"==typeof t&&t.amd&&t(function(){return{sprintf:e,vsprintf:r}}))}()},function(e,r,n){!function(e){\"object\"==typeof r&&r.exports?r.exports=e():\"function\"==typeof t?t(e):this.tz=e()}(function(){function t(t,e,r){var n,i=e.day[1];do n=new Date(Date.UTC(r,e.month,Math.abs(i++)));while(e.day[0]<7&&n.getUTCDay()!=e.day[0]);return n={clock:e.clock,sort:n.getTime(),rule:e,save:6e4*e.save,offset:t.offset},n[n.clock]=n.sort+6e4*e.time,n.posix?n.wallclock=n[n.clock]+(t.offset+e.saved):n.posix=n[n.clock]-(t.offset+e.saved),n}function e(e,r,n){var i,o,s,a,l,u,c,_=e[e.zone],h=[],p=new Date(n).getUTCFullYear(),d=1;for(i=1,o=_.length;i=p-d;--c)for(i=0,o=u.length;i=h[i][r]&&h[i][h[i].clock]>s[h[i].clock]&&(a=h[i])}return a&&((l=/^(.*)\\/(.*)$/.exec(s.format))?a.abbrev=l[a.save?2:1]:a.abbrev=s.format.replace(/%s/,a.rule.letter)),a||s}function r(t,r){return\"UTC\"==t.zone?r:(t.entry=e(t,\"posix\",r),r+t.entry.offset+t.entry.save)}function n(t,r){if(\"UTC\"==t.zone)return r;var n,i;return t.entry=n=e(t,\"wallclock\",r),i=r-n.wallclock,09)e+=a*_[l-10];else{if(o=new Date(r(t,e)),l<7)for(;a;)o.setUTCDate(o.getUTCDate()+s),o.getUTCDay()==l&&(a-=s);else 7==l?o.setUTCFullYear(o.getUTCFullYear()+a):8==l?o.setUTCMonth(o.getUTCMonth()+a):o.setUTCDate(o.getUTCDate()+a);null==(e=n(t,o.getTime()))&&(e=n(t,o.getTime()+864e5*s)-864e5*s)}return e}function o(t){if(!t.length)return\"1.0.6\";var e,o,s,a,l,u=Object.create(this),_=[];for(e=0;e=i?Math.floor((r-i)/7)+1:0}function a(t){var e,r,n;return r=t.getUTCFullYear(),e=new Date(Date.UTC(r,0)).getUTCDay(),n=s(t,1)+(e>1&&e<=4?1:0),n?53!=n||4==e||3==e&&29==new Date(r,1,29).getDate()?[n,t.getUTCFullYear()]:[1,t.getUTCFullYear()+1]:(r=t.getUTCFullYear()-1,e=new Date(Date.UTC(r,0)).getUTCDay(),n=4==e||3==e&&29==new Date(r,1,29).getDate()?53:52,[n,t.getUTCFullYear()-1])}var l={clock:function(){return+new Date},zone:\"UTC\",entry:{abbrev:\"UTC\",offset:0,save:0},UTC:1,z:function(t,e,r,n){var i,o,s=this.entry.offset+this.entry.save,a=Math.abs(s/1e3),l=[],u=3600;for(i=0;i<3;i++)l.push((\"0\"+Math.floor(a/u)).slice(-2)),a%=u,u/=60;return\"^\"!=r||s?(\"^\"==r&&(n=3),3==n?(o=l.join(\":\"),o=o.replace(/:00$/,\"\"),\"^\"!=r&&(o=o.replace(/:00$/,\"\"))):n?(o=l.slice(0,n+1).join(\":\"),\"^\"==r&&(o=o.replace(/:00$/,\"\"))):o=l.slice(0,2).join(\"\"),o=(s<0?\"-\":\"+\")+o,o=o.replace(/([-+])(0)/,{_:\" $1\",\"-\":\"$1\"}[r]||\"$1$2\")):\"Z\"},\"%\":function(t){return\"%\"},n:function(t){return\"\\n\"},t:function(t){return\"\\t\"},U:function(t){return s(t,0)},W:function(t){return s(t,1)},V:function(t){return a(t)[0]},G:function(t){return a(t)[1]},g:function(t){return a(t)[1]%100},j:function(t){return Math.floor((t.getTime()-Date.UTC(t.getUTCFullYear(),0))/864e5)+1},s:function(t){return Math.floor(t.getTime()/1e3)},C:function(t){return Math.floor(t.getUTCFullYear()/100)},N:function(t){return t.getTime()%1e3*1e6},m:function(t){return t.getUTCMonth()+1},Y:function(t){return t.getUTCFullYear()},y:function(t){return t.getUTCFullYear()%100},H:function(t){return t.getUTCHours()},M:function(t){return t.getUTCMinutes()},S:function(t){return t.getUTCSeconds()},e:function(t){return t.getUTCDate()},d:function(t){return t.getUTCDate()},u:function(t){return t.getUTCDay()||7},w:function(t){return t.getUTCDay()},l:function(t){return t.getUTCHours()%12||12},I:function(t){return t.getUTCHours()%12||12},k:function(t){return t.getUTCHours()},Z:function(t){return this.entry.abbrev},a:function(t){return this[this.locale].day.abbrev[t.getUTCDay()]},A:function(t){return this[this.locale].day.full[t.getUTCDay()]},h:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},b:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},B:function(t){return this[this.locale].month.full[t.getUTCMonth()]},P:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)].toLowerCase()},p:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)]},R:function(t,e){return this.convert([e,\"%H:%M\"])},T:function(t,e){return this.convert([e,\"%H:%M:%S\"])},D:function(t,e){return this.convert([e,\"%m/%d/%y\"])},F:function(t,e){return this.convert([e,\"%Y-%m-%d\"])},x:function(t,e){return this.convert([e,this[this.locale].date])},r:function(t,e){return this.convert([e,this[this.locale].time12||\"%I:%M:%S\"])},X:function(t,e){return this.convert([e,this[this.locale].time24])},c:function(t,e){return this.convert([e,this[this.locale].dateTime])},convert:o,locale:\"en_US\",en_US:{date:\"%m/%d/%Y\",time24:\"%I:%M:%S %p\",time12:\"%I:%M:%S %p\",dateTime:\"%a %d %b %Y %I:%M:%S %p %Z\",meridiem:[\"AM\",\"PM\"],month:{abbrev:\"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec\".split(\"|\"),full:\"January|February|March|April|May|June|July|August|September|October|November|December\".split(\"|\")},day:{abbrev:\"Sun|Mon|Tue|Wed|Thu|Fri|Sat\".split(\"|\"),full:\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday\".split(\"|\")}}},u=\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|year|month|day|hour|minute|second|millisecond\",c=new RegExp(\"^\\\\s*([+-])(\\\\d+)\\\\s+(\"+u+\")s?\\\\s*$\",\"i\"),_=[36e5,6e4,1e3,1];return u=u.toLowerCase().split(\"|\"),\"delmHMSUWVgCIky\".replace(/./g,function(t){l[t].pad=2}),l.N.pad=9,l.j.pad=3,l.k.style=\"_\",l.l.style=\"_\",l.e.style=\"_\",function(){return l.convert(arguments)}})},function(e,r,n){/*! *****************************************************************************\n", " Copyright (c) Microsoft Corporation. All rights reserved.\n", " Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n", " this file except in compliance with the License. You may obtain a copy of the\n", " License at http://www.apache.org/licenses/LICENSE-2.0\n", " \n", " THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n", " KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\n", " WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\n", " MERCHANTABLITY OR NON-INFRINGEMENT.\n", " \n", " See the Apache Version 2.0 License for specific language governing permissions\n", " and limitations under the License.\n", " ***************************************************************************** */\n", " var i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g;!function(e){function n(t,e){return function(r,n){return t[r]=e?e(r,n):n}}var i=\"object\"==typeof global?global:\"object\"==typeof self?self:\"object\"==typeof this?this:{};\"function\"==typeof t&&t.amd?t(\"tslib\",[\"exports\"],function(t){e(n(i,n(t)))}):e(\"object\"==typeof r&&\"object\"==typeof r.exports?n(i,n(r.exports)):n(i))}(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};i=function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)},o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},l=function(t,e){return function(r,n){e(r,n,t)}},u=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},c=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{l(n.next(t))}catch(e){o(e)}}function a(t){try{l(n[\"throw\"](t))}catch(e){o(e)}}function l(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}l((n=n.apply(t,e||[])).next())})},_=function(t,e){function r(t){return function(e){return n([t,e])}}function n(r){if(i)throw new TypeError(\"Generator is already executing.\");for(;l;)try{if(i=1,o&&(s=o[2&r[0]?\"return\":r[0]?\"throw\":\"next\"])&&!(s=s.call(o,r[1])).done)return s;switch(o=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,o=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},d=function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o[\"return\"])&&r.call(o)}finally{if(i)throw i.error}}return s},f=function(){for(var t=[],e=0;e1||i(t,e)})})}function i(t,e){try{o(c[t](e))}catch(r){l(_[0][3],r)}}function o(t){t.value instanceof y?Promise.resolve(t.value.v).then(s,a):l(_[0][2],t)}function s(t){i(\"next\",t)}function a(t){i(\"throw\",t)}function l(t,e){t(e),_.shift(),_.length&&i(_[0][0],_[0][1])}if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var u,c=r.apply(t,e||[]),_=[];return u={},n(\"next\"),n(\"throw\"),n(\"return\"),u[Symbol.asyncIterator]=function(){return this},u},v=function(t){function e(e,i){t[e]&&(r[e]=function(r){return(n=!n)?{value:y(t[e](r)),done:\"return\"===e}:i?i(r):r})}var r,n;return r={},e(\"next\"),e(\"throw\",function(t){throw t}),e(\"return\"),r[Symbol.iterator]=function(){return this},r},g=function(t){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var e=t[Symbol.asyncIterator];return e?e.call(t):\"function\"==typeof p?p(t):t[Symbol.iterator]()},t(\"__extends\",i),t(\"__assign\",o),t(\"__rest\",s),t(\"__decorate\",a),t(\"__param\",l),t(\"__metadata\",u),t(\"__awaiter\",c),t(\"__generator\",_),t(\"__exportStar\",h),t(\"__values\",p),t(\"__read\",d),t(\"__spread\",f),t(\"__await\",y),t(\"__asyncGenerator\",m),t(\"__asyncDelegator\",v),t(\"__asyncValues\",g)})}],{base:0,\"client/connection\":1,\"client/session\":2,\"core/bokeh_events\":3,\"core/build_views\":4,\"core/dom\":5,\"core/dom_view\":6,\"core/enums\":7,\"core/has_props\":8,\"core/hittest\":9,\"core/layout/layout_canvas\":10,\"core/layout/side_panel\":11,\"core/layout/solver\":12,\"core/logging\":13,\"core/properties\":14,\"core/property_mixins\":15,\"core/selection_manager\":16,\"core/selector\":17,\"core/settings\":18,\"core/signaling\":19,\"core/ui_events\":20,\"core/util/array\":21,\"core/util/bbox\":22,\"core/util/callback\":23,\"core/util/canvas\":24,\"core/util/color\":25,\"core/util/data_structures\":26,\"core/util/eq\":27,\"core/util/math\":28,\"core/util/object\":29,\"core/util/proj4\":30,\"core/util/projections\":31,\"core/util/refs\":32,\"core/util/selection\":33,\"core/util/serialization\":34,\"core/util/spatial\":35,\"core/util/string\":36,\"core/util/svg_colors\":37,\"core/util/templating\":38,\"core/util/text\":39,\"core/util/throttle\":40,\"core/util/types\":41,\"core/util/wheel\":42,\"core/util/zoom\":43,\"core/view\":44,\"core/visuals\":45,document:46,embed:47,main:48,model:49,\"models/annotations/annotation\":50,\"models/annotations/arrow\":51,\"models/annotations/arrow_head\":52,\"models/annotations/band\":53,\"models/annotations/box_annotation\":54,\"models/annotations/color_bar\":55,\"models/annotations/index\":56,\"models/annotations/label\":57,\"models/annotations/label_set\":58,\"models/annotations/legend\":59,\"models/annotations/legend_item\":60,\"models/annotations/poly_annotation\":61,\"models/annotations/span\":62,\"models/annotations/text_annotation\":63,\"models/annotations/title\":64,\"models/annotations/tooltip\":65,\"models/annotations/whisker\":66,\"models/axes/axis\":67,\"models/axes/categorical_axis\":68,\"models/axes/continuous_axis\":69,\"models/axes/datetime_axis\":70,\"models/axes/index\":71,\"models/axes/linear_axis\":72,\"models/axes/log_axis\":73,\"models/callbacks/customjs\":74,\"models/callbacks/index\":75,\"models/callbacks/open_url\":76,\"models/canvas/canvas\":77,\"models/canvas/cartesian_frame\":78,\"models/canvas/index\":79,\"models/expressions/expression\":80,\"models/expressions/index\":81,\"models/expressions/stack\":82,\"models/filters/boolean_filter\":83,\"models/filters/customjs_filter\":84,\"models/filters/filter\":85,\"models/filters/group_filter\":86,\"models/filters/index\":87,\"models/filters/index_filter\":88,\"models/formatters/basic_tick_formatter\":89,\"models/formatters/categorical_tick_formatter\":90,\"models/formatters/datetime_tick_formatter\":91,\"models/formatters/func_tick_formatter\":92,\"models/formatters/index\":93,\"models/formatters/log_tick_formatter\":94,\"models/formatters/mercator_tick_formatter\":95,\"models/formatters/numeral_tick_formatter\":96,\"models/formatters/printf_tick_formatter\":97,\"models/formatters/tick_formatter\":98,\"models/glyphs/annular_wedge\":99,\"models/glyphs/annulus\":100,\"models/glyphs/arc\":101,\"models/glyphs/bezier\":102,\"models/glyphs/box\":103,\"models/glyphs/circle\":104,\"models/glyphs/ellipse\":105,\"models/glyphs/glyph\":106,\"models/glyphs/hbar\":107,\"models/glyphs/image\":108,\"models/glyphs/image_rgba\":109,\"models/glyphs/image_url\":110,\"models/glyphs/index\":111,\"models/glyphs/line\":112,\"models/glyphs/multi_line\":113,\"models/glyphs/oval\":114,\"models/glyphs/patch\":115,\"models/glyphs/patches\":116,\"models/glyphs/quad\":117,\"models/glyphs/quadratic\":118,\"models/glyphs/ray\":119,\"models/glyphs/rect\":120,\"models/glyphs/segment\":121,\"models/glyphs/text\":122,\"models/glyphs/vbar\":123,\"models/glyphs/wedge\":124,\"models/glyphs/xy_glyph\":125,\"models/graphs/graph_hit_test_policy\":126,\"models/graphs/index\":127,\"models/graphs/layout_provider\":128,\"models/graphs/static_layout_provider\":129,\"models/grids/grid\":130,\"models/grids/index\":131,\"models/index\":132,\"models/layouts/box\":133,\"models/layouts/column\":134,\"models/layouts/index\":135,\"models/layouts/layout_dom\":136,\"models/layouts/row\":137,\"models/layouts/spacer\":138,\"models/layouts/widget_box\":139,\"models/mappers/categorical_color_mapper\":140,\"models/mappers/color_mapper\":141,\"models/mappers/index\":142,\"models/mappers/linear_color_mapper\":143,\"models/mappers/log_color_mapper\":144,\"models/markers/index\":145,\"models/markers/marker\":146,\"models/plots/gmap_plot\":147,\"models/plots/gmap_plot_canvas\":148,\"models/plots/index\":149,\"models/plots/plot\":150,\"models/plots/plot_canvas\":151,\"models/ranges/data_range\":152,\"models/ranges/data_range1d\":153,\"models/ranges/factor_range\":154,\"models/ranges/index\":155,\"models/ranges/range\":156,\"models/ranges/range1d\":157,\"models/renderers/glyph_renderer\":158,\"models/renderers/graph_renderer\":159,\"models/renderers/guide_renderer\":160,\"models/renderers/index\":161,\"models/renderers/renderer\":162,\"models/scales/categorical_scale\":163,\"models/scales/index\":164,\"models/scales/linear_scale\":165,\"models/scales/log_scale\":166,\"models/scales/scale\":167,\"models/sources/ajax_data_source\":168,\"models/sources/cds_view\":169,\"models/sources/column_data_source\":170,\"models/sources/columnar_data_source\":171,\"models/sources/data_source\":172,\"models/sources/geojson_data_source\":173,\"models/sources/index\":174,\"models/sources/remote_data_source\":175,\"models/tickers/adaptive_ticker\":176,\"models/tickers/basic_ticker\":177,\"models/tickers/categorical_ticker\":178,\"models/tickers/composite_ticker\":179,\"models/tickers/continuous_ticker\":180,\"models/tickers/datetime_ticker\":181,\"models/tickers/days_ticker\":182,\"models/tickers/fixed_ticker\":183,\"models/tickers/index\":184,\"models/tickers/log_ticker\":185,\"models/tickers/mercator_ticker\":186,\"models/tickers/months_ticker\":187,\"models/tickers/single_interval_ticker\":188,\"models/tickers/ticker\":189,\"models/tickers/util\":190,\"models/tickers/years_ticker\":191,\"models/tiles/bbox_tile_source\":192,\"models/tiles/dynamic_image_renderer\":193,\"models/tiles/image_pool\":194,\"models/tiles/image_source\":195,\"models/tiles/index\":196,\"models/tiles/mercator_tile_source\":197,\"models/tiles/quadkey_tile_source\":198,\"models/tiles/tile_renderer\":199,\"models/tiles/tile_source\":200,\"models/tiles/tile_utils\":201,\"models/tiles/tms_tile_source\":202,\"models/tiles/wmts_tile_source\":203,\"models/tools/actions/action_tool\":204,\"models/tools/actions/help_tool\":205,\"models/tools/actions/redo_tool\":206,\"models/tools/actions/reset_tool\":207,\"models/tools/actions/save_tool\":208,\"models/tools/actions/undo_tool\":209,\"models/tools/actions/zoom_in_tool\":210,\"models/tools/actions/zoom_out_tool\":211,\"models/tools/button_tool\":212,\"models/tools/gestures/box_select_tool\":213,\"models/tools/gestures/box_zoom_tool\":214,\"models/tools/gestures/gesture_tool\":215,\"models/tools/gestures/lasso_select_tool\":216,\"models/tools/gestures/pan_tool\":217,\"models/tools/gestures/poly_select_tool\":218,\"models/tools/gestures/select_tool\":219,\"models/tools/gestures/tap_tool\":220,\"models/tools/gestures/wheel_pan_tool\":221,\"models/tools/gestures/wheel_zoom_tool\":222,\"models/tools/index\":223,\"models/tools/inspectors/crosshair_tool\":224,\"models/tools/inspectors/hover_tool\":225,\"models/tools/inspectors/inspect_tool\":226,\"models/tools/on_off_button\":227,\"models/tools/tool\":228,\"models/tools/tool_proxy\":229,\"models/tools/toolbar\":230,\"models/tools/toolbar_base\":231,\"models/tools/toolbar_box\":232,\"models/transforms/customjs_transform\":233,\"models/transforms/dodge\":234,\"models/transforms/index\":235,\"models/transforms/interpolator\":236,\"models/transforms/jitter\":237,\"models/transforms/linear_interpolator\":238,\"models/transforms/step_interpolator\":239,\"models/transforms/transform\":240,polyfill:241,\"protocol/message\":242,\"protocol/receiver\":243,safely:244,version:245},48)});/*!\n", " Copyright (c) 2012, Anaconda, Inc.\n", " All rights reserved.\n", " \n", " Redistribution and use in source and binary forms, with or without modification,\n", " are permitted provided that the following conditions are met:\n", " \n", " Redistributions of source code must retain the above copyright notice,\n", " this list of conditions and the following disclaimer.\n", " \n", " Redistributions in binary form must reproduce the above copyright notice,\n", " this list of conditions and the following disclaimer in the documentation\n", " and/or other materials provided with the distribution.\n", " \n", " Neither the name of Anaconda nor the names of any contributors\n", " may be used to endorse or promote products derived from this software\n", " without specific prior written permission.\n", " \n", " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n", " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n", " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n", " ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n", " LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n", " CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n", " SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n", " INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n", " CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n", " ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n", " THE POSSIBILITY OF SUCH DAMAGE.\n", " */\n", " \n", " //# sourceMappingURL=bokeh.min.js.map\n", " \n", " /* END bokeh.min.js */\n", " },\n", " \n", " function(Bokeh) {\n", " /* BEGIN bokeh-widgets.min.js */\n", " !function(t,e){e(t.Bokeh)}(this,function(t){var e;return function(e,n,r){if(null!=t)return t.register_plugin(e,n,r);throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\")}({369:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(14),a=t(5),u=t(4),l=t(409);n.AbstractButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.icon_views={},this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.remove=function(){return u.remove_views(this.icon_views),e.__super__.remove.call(this)},e.prototype._render_button=function(){var t;return t=1<=arguments.length?o.call(arguments,0):[],a.button.apply(null,[{type:\"button\",disabled:this.model.disabled,\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type]}].concat(o.call(t)))},e.prototype.render=function(){var t;return e.__super__.render.call(this),a.empty(this.el),this.buttonEl=this._render_button(this.model.label),this.buttonEl.addEventListener(\"click\",function(t){return function(e){return t._button_click(e)}}(this)),this.el.appendChild(this.buttonEl),t=this.model.icon,null!=t&&(u.build_views(this.icon_views,[t],{parent:this}),a.prepend(this.buttonEl,this.icon_views[t.id].el,a.nbsp)),this},e.prototype._button_click=function(t){return t.preventDefault(),this.change_input()},e.prototype.change_input=function(){var t;return null!=(t=this.model.callback)?t.execute(this.model):void 0},e}(l.WidgetView),n.AbstractButton=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"AbstractButton\",e.prototype.default_view=n.AbstractButtonView,e.define({callback:[s.Instance],label:[s.String,\"Button\"],icon:[s.Instance],button_type:[s.String,\"default\"]}),e}(l.Widget)},370:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(409);n.AbstractIcon=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"AbstractIcon\",e}(o.Widget)},371:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(400),s=t(14),a=t(5),u=t(13),l=t(23),c=t(409);n.AbstractSliderView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return this.connect(this.model.change,function(t){return function(){return t.render()}}(this))},e.prototype._calc_to=function(){},e.prototype._calc_from=function(t){},e.prototype.render=function(){var t,n,r,i,s,u,c,p,d,h,f,_,m;if(null==this.sliderEl&&e.__super__.render.call(this),null!=this.model.callback)switch(t=function(t){return function(){return t.model.callback.execute(t.model)}}(this),this.model.callback_policy){case\"continuous\":this.callback_wrapper=t;break;case\"throttle\":this.callback_wrapper=l.throttle(t,this.model.callback_throttle)}return s=\"bk-noUi-\",c=this._calc_to(),p=c.start,n=c.end,m=c.value,d=c.step,this.model.tooltips?(r={to:function(t){return function(e){return t.model.pretty(e)}}(this)},f=function(){var t,e,n;for(n=[],i=t=0,e=m.length;0<=e?te;i=0<=e?++t:--t)n.push(r);return n}()):f=!1,this.el.classList.add(\"bk-slider\"),null==this.sliderEl?(this.sliderEl=a.div(),this.el.appendChild(this.sliderEl),o.create(this.sliderEl,{cssPrefix:s,range:{min:p,max:n},start:m,step:d,behaviour:this.model.behaviour,connect:this.model.connected,tooltips:f,orientation:this.model.orientation,direction:this.model.direction}),this.sliderEl.noUiSlider.on(\"slide\",function(t){return function(e,n,r){return t._slide(r)}}(this)),this.sliderEl.noUiSlider.on(\"change\",function(t){return function(e,n,r){return t._change(r)}}(this)),h=function(t){return function(e,n){var r,i;return r=t.sliderEl.querySelectorAll(\".\"+s+\"handle\")[e],i=r.querySelector(\".\"+s+\"tooltip\"),i.style.display=n?\"block\":\"\"}}(this),this.sliderEl.noUiSlider.on(\"start\",function(t){return function(t,e){return h(e,!0)}}(this)),this.sliderEl.noUiSlider.on(\"end\",function(t){return function(t,e){return h(e,!1)}}(this))):this.sliderEl.noUiSlider.updateOptions({range:{min:p,max:n},start:m,step:d}),null!=this.titleEl&&this.el.removeChild(this.titleEl),null!=this.valueEl&&this.el.removeChild(this.valueEl),null!=this.model.title&&(0!==this.model.title.length&&(this.titleEl=a.label({},this.model.title+\":\"),this.el.insertBefore(this.titleEl,this.sliderEl)),this.model.show_value&&(u=function(){var t,e,n;for(n=[],t=0,e=m.length;t=0}),i.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),u=s.label({\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type]},i,p),o.call(t,r)>=0&&u.classList.add(\"bk-bs-active\"),n.appendChild(u);return this},e.prototype.change_input=function(){var t,e,n,r;return t=function(){var t,r,i,o;for(i=this.el.querySelectorAll(\"input\"),o=[],n=t=0,r=i.length;t=0&&(i.checked=!0),u=s.label({},i,p),this.model.inline?(u.classList.add(\"bk-bs-checkbox-inline\"),this.el.appendChild(u)):(n=s.div({\"class\":\"bk-bs-checkbox\"},u),this.el.appendChild(n));return this},e.prototype.change_input=function(){var t,e,n,r;return t=function(){var t,r,i,o;for(i=this.el.querySelectorAll(\"input\"),o=[],n=t=0,r=i.length;ta||this._o.position.indexOf(\"right\")>-1&&r-u+e.offsetWidth>0)&&(r=r-u+e.offsetWidth),(this._o.reposition&&o+n>s+i||this._o.position.indexOf(\"top\")>-1&&o-n-e.offsetHeight>0)&&(o=o-n-e.offsetHeight),this.el.style.left=r+\"px\",this.el.style.top=o+\"px\"},n.DatePickerView=function(t){function e(){return this._on_select=r(this._on_select,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.className=\"bk-widget-form-group\",e.prototype.render=function(){return e.__super__.render.call(this),null!=this._picker&&this._picker.destroy(),a.empty(this.el),this.labelEl=a.label({},this.model.title),this.el.appendChild(this.labelEl),this.inputEl=a.input({type:\"text\",\"class\":\"bk-widget-form-input\",disabled:this.model.disabled}),this.el.appendChild(this.inputEl),this._picker=new l({field:this.inputEl,defaultDate:new Date(this.model.value),setDefaultDate:!0,minDate:null!=this.model.min_date?new Date(this.model.min_date):null,maxDate:null!=this.model.max_date?new Date(this.model.max_date):null,onSelect:this._on_select}),this._root_element.appendChild(this._picker.el),this},e.prototype._on_select=function(t){return this.model.value=t.toString(),this.change_input()},e}(s.InputWidgetView),n.DatePicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"DatePicker\",e.prototype.default_view=n.DatePickerView,e.define({value:[u.Any,Date.now()],min_date:[u.Any],max_date:[u.Any]}),e}(s.InputWidget)},378:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(360),s=t(371);n.DateRangeSliderView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype._calc_to=function(){return{start:this.model.start,end:this.model.end,value:this.model.value,step:this.model.step}},e.prototype._calc_from=function(t){return t},e}(s.AbstractSliderView),n.DateRangeSlider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"DateRangeSlider\",e.prototype.default_view=n.DateRangeSliderView,e.prototype.behaviour=\"drag\",e.prototype.connected=[!1,!0,!1],e.prototype._formatter=o,e.override({format:\"%d %b %G\"}),e}(s.AbstractSlider)},379:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(360),s=t(371);n.DateSliderView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype._calc_to=function(){return{start:this.model.start,end:this.model.end,value:[this.model.value],step:this.model.step}},e.prototype._calc_from=function(t){var e;return e=t[0]},e}(s.AbstractSliderView),n.DateSlider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"DateSlider\",e.prototype.default_view=n.DateSliderView,e.prototype.behaviour=\"tap\",e.prototype.connected=[!0,!1],e.prototype._formatter=o,e.override({format:\"%d %b %G\"}),e}(s.AbstractSlider)},380:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(385),s=t(5),a=t(14);n.DivView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=s.div(),this.model.render_as_text?t.textContent=this.model.text:t.innerHTML=this.model.text,this.markupEl.appendChild(t),this},e}(o.MarkupView),n.Div=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Div\",e.prototype.default_view=n.DivView,e.define({render_as_text:[a.Bool,!1]}),e}(o.Markup)},381:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(5),s=t(14),a=t(369),u=t(376);n.DropdownView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),u.clear_menus.connect(function(t){return function(){return t._clear_menu()}}(this))},e.prototype.render=function(){var t,n,r,i,s,a,u,l,c,p,d;for(e.__super__.render.call(this),this.model.is_split_button?(this.el.classList.add(\"bk-bs-btn-group\"),t=this._render_button(o.span({\"class\":\"bk-bs-caret\"})),t.classList.add(\"bk-bs-dropdown-toggle\"),t.addEventListener(\"click\",function(t){return function(e){return t._caret_click(e)}}(this)),this.el.appendChild(t)):(this.el.classList.add(\"bk-bs-dropdown\"),this.buttonEl.classList.add(\"bk-bs-dropdown-toggle\"),this.buttonEl.appendChild(o.span({\"class\":\"bk-bs-caret\"}))),this.model.active&&this.el.classList.add(\"bk-bs-open\"),s=[],p=this.model.menu,n=0,u=p.length;n=0,a.option({selected:r,value:i},n)}}(this)),this.selectEl=a.select({multiple:!0,\"class\":\"bk-widget-form-input\",id:this.model.id,name:this.model.name,size:this.model.size},n),this.selectEl.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),this.el.appendChild(this.selectEl),this},e.prototype.render_selection=function(){var t,e,n,r,i,o,s,a,u;for(a={},o=this.model.value,e=0,r=o.length;e=r&&(this.model.active=r-1),d=this.model.tabs.map(function(t,e){return o.li({},o.span({data:{index:e}},t.title))}),d[this.model.active].classList.add(\"bk-bs-active\"),h=o.ul({\"class\":[\"bk-bs-nav\",\"bk-bs-nav-tabs\"]},d),this.el.appendChild(h),u=this.model.tabs.map(function(t){return o.div({\"class\":\"bk-bs-tab-pane\"})}),u[this.model.active].classList.add(\"bk-bs-active\"),l=o.div({\"class\":\"bk-bs-tab-content\"},u),this.el.appendChild(l),h.addEventListener(\"click\",function(t){return function(e){var n,r,i,o;if(e.preventDefault(),e.target!==e.currentTarget&&(n=e.target,i=t.model.active,r=parseInt(n.dataset.index),i!==r))return d[i].classList.remove(\"bk-bs-active\"),u[i].classList.remove(\"bk-bs-active\"),d[r].classList.add(\"bk-bs-active\"),u[r].classList.add(\"bk-bs-active\"),t.model.active=r,null!=(o=t.model.callback)?o.execute(t.model):void 0}}(this)),c=s.zip(this.model.children,u),n=0,i=c.length;n0&&(p(t,e),setTimeout(function(){d(t,e)},n))}function u(t){return Math.max(Math.min(t,100),0)}function l(t){return Array.isArray(t)?t:[t]}function c(t){t=String(t);var e=t.split(\".\");return e.length>1?e[1].length:0}function p(t,e){t.classList?t.classList.add(e):t.className+=\" \"+e}function d(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp(\"(^|\\\\b)\"+e.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \")}function h(t,e){return t.classList?t.classList.contains(e):new RegExp(\"\\\\b\"+e+\"\\\\b\").test(t.className)}function f(t){var e=void 0!==window.pageXOffset,n=\"CSS1Compat\"===(t.compatMode||\"\"),r=e?window.pageXOffset:n?t.documentElement.scrollLeft:t.body.scrollLeft,i=e?window.pageYOffset:n?t.documentElement.scrollTop:t.body.scrollTop;return{x:r,y:i}}function _(){return window.navigator.pointerEnabled?{start:\"pointerdown\",move:\"pointermove\",end:\"pointerup\"}:window.navigator.msPointerEnabled?{start:\"MSPointerDown\",move:\"MSPointerMove\",end:\"MSPointerUp\"}:{start:\"mousedown touchstart\",move:\"mousemove touchmove\",end:\"mouseup touchend\"}}function m(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"test\",null,e)}catch(n){}return t}function y(){return window.CSS&&CSS.supports&&CSS.supports(\"touch-action\",\"none\")}function g(t,e){return 100/(e-t)}function v(t,e){return 100*e/(t[1]-t[0])}function b(t,e){return v(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}function w(t,e){return e*(t[1]-t[0])/100+t[0]}function k(t,e){for(var n=1;t>=e[n];)n+=1;return n}function x(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a=k(n,t);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],o+b([r,i],n)/g(o,s)}function S(t,e,n){if(n>=100)return t.slice(-1)[0];var r,i,o,s,a=k(n,e);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],w([r,i],(n-o)*g(o,s))}function E(t,e,n,r){if(100===r)return r;var o,s,a=k(r,t);return n?(o=t[a-1],s=t[a],r-o>(s-o)/2?s:o):e[a-1]?t[a-1]+i(r-t[a-1],e[a-1]):r}function D(t,e,n){var r;if(\"number\"==typeof e&&(e=[e]),\"[object Array]\"!==Object.prototype.toString.call(e))throw new Error(\"noUiSlider (\"+Z+\"): 'range' contains invalid value.\");if(r=\"min\"===t?0:\"max\"===t?100:parseFloat(t),!s(r)||!s(e[0]))throw new Error(\"noUiSlider (\"+Z+\"): 'range' value isn't numeric.\");n.xPct.push(r),n.xVal.push(e[0]),r?n.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(n.xSteps[0]=e[1]),n.xHighestCompleteStep.push(0)}function M(t,e,n){if(!e)return!0;n.xSteps[t]=v([n.xVal[t],n.xVal[t+1]],e)/g(n.xPct[t],n.xPct[t+1]);var r=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*i;n.xHighestCompleteStep[t]=o}function C(t,e,n){this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var r,i=[];for(r in t)t.hasOwnProperty(r)&&i.push([t[r],r]);for(i.length&&\"object\"==typeof i[0][0]?i.sort(function(t,e){return t[0][0]-e[0][0]}):i.sort(function(t,e){return t[0]-e[0]}),r=0;r=50)throw new Error(\"noUiSlider (\"+Z+\"): 'padding' option must be less than half the range.\")}}function z(t,e){switch(e){case\"ltr\":t.dir=0;break;case\"rtl\":t.dir=1;break;default:throw new Error(\"noUiSlider (\"+Z+\"): 'direction' option was not recognized.\")}}function U(t,e){if(\"string\"!=typeof e)throw new Error(\"noUiSlider (\"+Z+\"): 'behaviour' must be a string containing options.\");var n=e.indexOf(\"tap\")>=0,r=e.indexOf(\"drag\")>=0,i=e.indexOf(\"fixed\")>=0,o=e.indexOf(\"snap\")>=0,s=e.indexOf(\"hover\")>=0;if(i){if(2!==t.handles)throw new Error(\"noUiSlider (\"+Z+\"): 'fixed' behaviour must be used with 2 handles\");L(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:s}}function F(t,e){if(t.multitouch=e,\"boolean\"!=typeof e)throw new Error(\"noUiSlider (\"+Z+\"): 'multitouch' option must be a boolean.\")}function Y(t,e){if(e!==!1)if(e===!0){t.tooltips=[];for(var n=0;n-1?1:\"steps\"===e?2:0,!s&&u&&(m=0),p===w&&l||(o[h.toFixed(5)]=[p,m]),c=h}}),o}function M(t,e,n){function r(t,e){var n=e===i.cssClasses.value,r=n?l:d,o=n?a:u;return e+\" \"+r[i.ort]+\" \"+o[t]}function o(t,o){o[1]=o[1]&&e?e(o[0],o[1]):o[1];var a=c(s,!1);a.className=r(o[1],i.cssClasses.marker),a.style[i.style]=t+\"%\",o[1]&&(a=c(s,!1),a.className=r(o[1],i.cssClasses.value),a.style[i.style]=t+\"%\",a.innerText=n.to(o[0]))}var s=kt.createElement(\"div\"),a=[i.cssClasses.valueNormal,i.cssClasses.valueLarge,i.cssClasses.valueSub],u=[i.cssClasses.markerNormal,i.cssClasses.markerLarge,i.cssClasses.markerSub],l=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],d=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];return p(s,i.cssClasses.pips),p(s,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical),Object.keys(t).forEach(function(e){o(e,t[e])}),s}function C(){pt&&(e(pt),pt=null)}function P(t){C();var e=t.mode,n=t.density||1,r=t.filter||!1,i=t.values||!1,o=t.stepped||!1,s=E(e,i,o),a=D(n,e,s),u=t.format||{to:Math.round};return pt=_t.appendChild(M(a,r,u))}function O(){var t=at.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||at[e]:t.height||at[e]}function A(t,e,n,r){var o=function(o){return!_t.hasAttribute(\"disabled\")&&(!h(_t,i.cssClasses.tap)&&(!!(o=V(o,r.pageOffset,r.target||e))&&(!(t===dt.start&&void 0!==o.buttons&&o.buttons>1)&&((!r.hover||!o.buttons)&&(ft||o.preventDefault(),o.calcPoint=o.points[i.ort],void n(o,r))))))},s=[];return t.split(\" \").forEach(function(t){e.addEventListener(t,o,!!ft&&{passive:!0}),s.push([t,o])}),s}function V(t,e,n){var r,o,s=0===t.type.indexOf(\"touch\"),a=0===t.type.indexOf(\"mouse\"),u=0===t.type.indexOf(\"pointer\");if(0===t.type.indexOf(\"MSPointer\")&&(u=!0),s&&i.multitouch){var l=function(t){return t.target===n||n.contains(t.target)};if(\"touchstart\"===t.type){var c=Array.prototype.filter.call(t.touches,l);if(c.length>1)return!1;r=c[0].pageX,o=c[0].pageY}else{var p=Array.prototype.find.call(t.changedTouches,l);if(!p)return!1;r=p.pageX,o=p.pageY}}else if(s){if(t.touches.length>1)return!1;r=t.changedTouches[0].pageX,o=t.changedTouches[0].pageY}return e=e||f(kt),(a||u)&&(r=t.clientX+e.x,o=t.clientY+e.y),t.pageOffset=e,t.points=[r,o],t.cursor=a||u,t}function N(t){var e=t-o(at,i.ort),n=100*e/O();return i.dir?100-n:n}function I(t){var e=100,n=!1;return ut.forEach(function(r,i){if(!r.hasAttribute(\"disabled\")){var o=Math.abs(mt[i]-t);o1?r.forEach(function(t,n){var r=Y(i,t,i[t]+e,o[n],s[n],!1);r===!1?e=0:(e=r-i[t],i[t]=r)}):o=s=[!0];var a=!1;r.forEach(function(t,r){a=X(t,n[t]+e,o[r],s[r])||a}),a&&r.forEach(function(t){j(\"update\",t),j(\"slide\",t)})}function j(t,e,n){Object.keys(wt).forEach(function(r){var o=r.split(\".\")[0];t===o&&wt[r].forEach(function(t){t.call(ct,bt.map(i.format.to),e,bt.slice(),n||!1,mt.slice())})})}function T(t,e){\"mouseout\"===t.type&&\"HTML\"===t.target.nodeName&&null===t.relatedTarget&&W(t,e)}function L(t,e){if(navigator.appVersion.indexOf(\"MSIE 9\")===-1&&0===t.buttons&&0!==e.buttonsProperty)return W(t,e);var n=(i.dir?-1:1)*(t.calcPoint-e.startCalcPoint),r=100*n/e.baseSize;R(n>0,r,e.locations,e.handleNumbers)}function W(t,e){e.handle&&(d(e.handle,i.cssClasses.active),gt-=1),e.listeners.forEach(function(t){xt.removeEventListener(t[0],t[1])}),0===gt&&(d(_t,i.cssClasses.drag),q(),t.cursor&&(St.style.cursor=\"\",St.removeEventListener(\"selectstart\",n))),e.handleNumbers.forEach(function(t){j(\"change\",t),j(\"set\",t),j(\"end\",t)})}function B(t,e){var r;if(1===e.handleNumbers.length){var o=ut[e.handleNumbers[0]];if(o.hasAttribute(\"disabled\"))return!1;r=o.children[0],gt+=1,p(r,i.cssClasses.active)}t.stopPropagation();var s=[],a=A(dt.move,xt,L,{target:t.target,handle:r,listeners:s,startCalcPoint:t.calcPoint,baseSize:O(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:mt.slice()}),u=A(dt.end,xt,W,{target:t.target,handle:r,listeners:s,handleNumbers:e.handleNumbers}),l=A(\"mouseout\",xt,T,{target:t.target,handle:r,listeners:s,handleNumbers:e.handleNumbers});s.push.apply(s,a.concat(u,l)),t.cursor&&(St.style.cursor=getComputedStyle(t.target).cursor,ut.length>1&&p(_t,i.cssClasses.drag),St.addEventListener(\"selectstart\",n,!1)),e.handleNumbers.forEach(function(t){j(\"start\",t)})}function z(t){t.stopPropagation();var e=N(t.calcPoint),n=I(e);return n!==!1&&(i.events.snap||a(_t,i.cssClasses.tap,i.animationDuration),X(n,e,!0,!0),q(),j(\"slide\",n,!0),j(\"update\",n,!0),j(\"change\",n,!0),j(\"set\",n,!0),void(i.events.snap&&B(t,{handleNumbers:[n]})))}function U(t){var e=N(t.calcPoint),n=vt.getStep(e),r=vt.fromStepping(n);Object.keys(wt).forEach(function(t){\"hover\"===t.split(\".\")[0]&&wt[t].forEach(function(t){t.call(ct,r)})})}function F(t){t.fixed||ut.forEach(function(t,e){A(dt.start,t.children[0],B,{handleNumbers:[e]})}),t.tap&&A(dt.start,at,z,{}),t.hover&&A(dt.move,at,U,{hover:!0}),t.drag&<.forEach(function(e,n){if(e!==!1&&0!==n&&n!==lt.length-1){var r=ut[n-1],o=ut[n],s=[e];p(e,i.cssClasses.draggable),t.fixed&&(s.push(r.children[0]),s.push(o.children[0])),s.forEach(function(t){A(dt.start,t,B,{handles:[r,o],handleNumbers:[n-1,n]})})}})}function Y(t,e,n,r,o,s){return ut.length>1&&(r&&e>0&&(n=Math.max(n,t[e-1]+i.margin)),o&&e1&&i.limit&&(r&&e>0&&(n=Math.min(n,t[e-1]+i.limit)),o&&e50?-1:1,n=3+(ut.length+e*t);ut[t].childNodes[0].style.zIndex=n})}function X(t,e,n,r){return e=Y(mt,t,e,n,r,!1),e!==!1&&(G(t,e),!0)}function K(t){if(lt[t]){var e=0,n=100;0!==t&&(e=mt[t-1]),t!==lt.length-1&&(n=mt[t]),lt[t].style[i.style]=H(e),lt[t].style[i.styleOposite]=H(100-n)}}function $(t,e){null!==t&&t!==!1&&(\"number\"==typeof t&&(t=String(t)),t=i.format.from(t),t===!1||isNaN(t)||X(e,vt.toStepping(t),!1,!1))}function Q(t,e){var n=l(t),r=void 0===mt[0];e=void 0===e||!!e,n.forEach($),i.animate&&!r&&a(_t,i.cssClasses.tap,i.animationDuration),yt.forEach(function(t){X(t,mt[t],!0,!1)}),q(),yt.forEach(function(t){j(\"update\",t),null!==n[t]&&e&&j(\"set\",t)})}function tt(t){Q(i.start,t)}function et(){var t=bt.map(i.format.to);return 1===t.length?t[0]:t}function nt(){for(var t in i.cssClasses)i.cssClasses.hasOwnProperty(t)&&d(_t,i.cssClasses[t]);for(;_t.firstChild;)_t.removeChild(_t.firstChild);delete _t.noUiSlider}function rt(){return mt.map(function(t,e){var n=vt.getNearbySteps(t),r=bt[e],i=n.thisStep.step,o=null;i!==!1&&r+i>n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:n.stepBefore.step!==!1&&r-n.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=vt.countStepDecimals();return null!==i&&i!==!1&&(i=Number(i.toFixed(s))),null!==o&&o!==!1&&(o=Number(o.toFixed(s))),[o,i]})}function it(t,e){wt[t]=wt[t]||[],wt[t].push(e),\"update\"===t.split(\".\")[0]&&ut.forEach(function(t,e){j(\"update\",e)})}function ot(t){var e=t&&t.split(\".\")[0],n=e&&t.substring(e.length);Object.keys(wt).forEach(function(t){var r=t.split(\".\")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||delete wt[t]})}function st(t,e){var n=et(),r=[\"margin\",\"limit\",\"padding\",\"range\",\"animate\",\"snap\",\"step\",\"format\"];r.forEach(function(e){void 0!==t[e]&&(s[e]=t[e])});var o=J(s);r.forEach(function(e){void 0!==t[e]&&(i[e]=o[e])}),vt=o.spectrum,i.margin=o.margin,i.limit=o.limit,i.padding=o.padding,i.pips&&P(i.pips),mt=[],Q(t.start||n,e)}var at,ut,lt,ct,pt,dt=_(),ht=y(),ft=ht&&m(),_t=t,mt=[],yt=[],gt=0,vt=i.spectrum,bt=[],wt={},kt=t.ownerDocument,xt=kt.documentElement,St=kt.body;if(_t.noUiSlider)throw new Error(\"noUiSlider (\"+Z+\"): Slider was already initialized.\");return w(_t),b(i.connect,at),ct={destroy:nt,steps:rt,on:it,off:ot,get:et,set:Q,reset:tt,__moveHandles:function(t,e,n){R(t,e,mt,n)},options:s,updateOptions:st,target:_t,removePips:C,pips:P},F(i.events),Q(i.start),i.pips&&P(i.pips),i.tooltips&&x(),S(),ct}function Q(t,e){if(!t||!t.nodeName)throw new Error(\"noUiSlider (\"+Z+\"): create requires a single element, got: \"+t);var n=J(e,t),r=$(t,n,e);return t.noUiSlider=r,r}var Z=\"10.1.0\";C.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!==0)throw new Error(\"noUiSlider (\"+Z+\"): 'limit', 'margin' and 'padding' must be divisible by step.\");return 2===this.xPct.length&&v(this.xVal,t)},C.prototype.toStepping=function(t){return t=x(this.xVal,this.xPct,t)},C.prototype.fromStepping=function(t){return S(this.xVal,this.xPct,t)},C.prototype.getStep=function(t){return t=E(this.xPct,this.xSteps,this.snap,t)},C.prototype.getNearbySteps=function(t){var e=k(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},C.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(c);return Math.max.apply(null,t)},C.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var tt={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};return{version:Z,create:Q}})},401:function(t,n,r){/*!\n", " * Pikaday\n", " *\n", " * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday\n", " */\n", " !function(i,o){\"use strict\";var s;if(\"object\"==typeof r){try{s=t(\"moment\")}catch(a){}n.exports=o(s)}else\"function\"==typeof e&&e.amd?e(function(t){var e=\"moment\";try{s=t(e)}catch(n){}return o(s)}):i.Pikaday=o(i.moment)}(this,function(t){\"use strict\";var e=\"function\"==typeof t,n=!!window.addEventListener,r=window.document,i=window.setTimeout,o=function(t,e,r,i){n?t.addEventListener(e,r,!!i):t.attachEvent(\"on\"+e,r)},s=function(t,e,r,i){n?t.removeEventListener(e,r,!!i):t.detachEvent(\"on\"+e,r)},a=function(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,\"\")},u=function(t,e){return(\" \"+t.className+\" \").indexOf(\" \"+e+\" \")!==-1},l=function(t,e){u(t,e)||(t.className=\"\"===t.className?e:t.className+\" \"+e)},c=function(t,e){t.className=a((\" \"+t.className+\" \").replace(\" \"+e+\" \",\" \"))},p=function(t){return/Array/.test(Object.prototype.toString.call(t))},d=function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())},h=function(t){var e=t.getDay();return 0===e||6===e},f=function(t){return t%4===0&&t%100!==0||t%400===0},_=function(t,e){return[31,f(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},m=function(t){d(t)&&t.setHours(0,0,0,0)},y=function(t,e){return t.getTime()===e.getTime()},g=function(t,e,n){var r,i;for(r in e)i=void 0!==t[r],i&&\"object\"==typeof e[r]&&null!==e[r]&&void 0===e[r].nodeName?d(e[r])?n&&(t[r]=new Date(e[r].getTime())):p(e[r])?n&&(t[r]=e[r].slice(0)):t[r]=g({},e[r],n):!n&&i||(t[r]=e[r]);return t},v=function(t,e,n){var i;r.createEvent?(i=r.createEvent(\"HTMLEvents\"),i.initEvent(e,!0,!1),i=g(i,n),t.dispatchEvent(i)):r.createEventObject&&(i=r.createEventObject(),i=g(i,n),t.fireEvent(\"on\"+e,i))},b=function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),t.month>11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t},w={field:null,bound:void 0,position:\"bottom left\",reposition:!0,format:\"YYYY-MM-DD\",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:\"\",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:\"left\",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:\"Previous Month\",nextMonth:\"Next Month\",months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],weekdays:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],weekdaysShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},k=function(t,e,n){for(e+=t.firstDay;e>=7;)e-=7;return n?t.i18n.weekdaysShort[e]:t.i18n.weekdays[e]},x=function(t){var e=[],n=\"false\";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'';e.push(\"is-outside-current-month\"),t.enableSelectionDaysInNextAndPreviousMonths||e.push(\"is-selection-disabled\")}return t.isDisabled&&e.push(\"is-disabled\"),t.isToday&&e.push(\"is-today\"),t.isSelected&&(e.push(\"is-selected\"),n=\"true\"),t.hasEvent&&e.push(\"has-event\"),t.isInRange&&e.push(\"is-inrange\"),t.isStartRange&&e.push(\"is-startrange\"),t.isEndRange&&e.push(\"is-endrange\"),'\"},S=function(t,e,n){var r=new Date(n,0,1),i=Math.ceil(((new Date(n,e,t)-r)/864e5+r.getDay()+1)/7);return''+i+\"\"},E=function(t,e,n,r){return''+(e?t.reverse():t).join(\"\")+\"\"},D=function(t){return\"\"+t.join(\"\")+\"\"},M=function(t){var e,n=[];for(t.showWeekNumber&&n.push(\"\"),e=0;e<7;e++)n.push(''+k(t,e,!0)+\"\");return\"\"+(t.isRTL?n.reverse():n).join(\"\")+\"\"},C=function(t,e,n,r,i,o){var s,a,u,l,c,d=t._o,h=n===d.minYear,f=n===d.maxYear,_='
',m=!0,y=!0;for(u=[],s=0;s<12;s++)u.push('\");for(l='
'+d.i18n.months[r]+'
\",p(d.yearRange)?(s=d.yearRange[0],a=d.yearRange[1]+1):(s=n-d.yearRange,a=1+n+d.yearRange),u=[];s=d.minYear&&u.push('\");return c='
'+n+d.yearSuffix+'
\",_+=d.showMonthAfterYear?c+l:l+c,h&&(0===r||d.minMonth>=r)&&(m=!1),f&&(11===r||d.maxMonth<=r)&&(y=!1),0===e&&(_+='\"),e===t._o.numberOfMonths-1&&(_+='\"),_+=\"
\"},P=function(t,e,n){return''+M(t)+D(e)+\"
\"},O=function(s){var a=this,l=a.config(s);a._onMouseDown=function(t){if(a._v){t=t||window.event;var e=t.target||t.srcElement;if(e)if(u(e,\"is-disabled\")||(!u(e,\"pika-button\")||u(e,\"is-empty\")||u(e.parentNode,\"is-disabled\")?u(e,\"pika-prev\")?a.prevMonth():u(e,\"pika-next\")&&a.nextMonth():(a.setDate(new Date(e.getAttribute(\"data-pika-year\"),e.getAttribute(\"data-pika-month\"),e.getAttribute(\"data-pika-day\"))),l.bound&&i(function(){a.hide(),l.blurFieldOnSelect&&l.field&&l.field.blur()},100))),u(e,\"pika-select\"))a._c=!0;else{if(!t.preventDefault)return t.returnValue=!1,!1;t.preventDefault()}}},a._onChange=function(t){t=t||window.event;var e=t.target||t.srcElement;e&&(u(e,\"pika-select-month\")?a.gotoMonth(e.value):u(e,\"pika-select-year\")&&a.gotoYear(e.value))},a._onKeyChange=function(t){if(t=t||window.event,a.isVisible())switch(t.keyCode){case 13:case 27:l.field&&l.field.blur();break;case 37:t.preventDefault(),a.adjustDate(\"subtract\",1);break;case 38:a.adjustDate(\"subtract\",7);break;case 39:a.adjustDate(\"add\",1);break;case 40:a.adjustDate(\"add\",7)}},a._onInputChange=function(n){var r;n.firedBy!==a&&(l.parse?r=l.parse(l.field.value,l.format):e?(r=t(l.field.value,l.format,l.formatStrict),r=r&&r.isValid()?r.toDate():null):r=new Date(Date.parse(l.field.value)),d(r)&&a.setDate(r),a._v||a.show())},a._onInputFocus=function(){a.show()},a._onInputClick=function(){a.show()},a._onInputBlur=function(){var t=r.activeElement;do if(u(t,\"pika-single\"))return;while(t=t.parentNode);a._c||(a._b=i(function(){a.hide()},50)),a._c=!1},a._onClick=function(t){t=t||window.event;var e=t.target||t.srcElement,r=e;if(e){!n&&u(e,\"pika-select\")&&(e.onchange||(e.setAttribute(\"onchange\",\"return;\"),o(e,\"change\",a._onChange)));do if(u(r,\"pika-single\")||r===l.trigger)return;while(r=r.parentNode);a._v&&e!==l.trigger&&r!==l.trigger&&a.hide()}},a.el=r.createElement(\"div\"),a.el.className=\"pika-single\"+(l.isRTL?\" is-rtl\":\"\")+(l.theme?\" \"+l.theme:\"\"),o(a.el,\"mousedown\",a._onMouseDown,!0),o(a.el,\"touchend\",a._onMouseDown,!0),o(a.el,\"change\",a._onChange),o(r,\"keydown\",a._onKeyChange),l.field&&(l.container?l.container.appendChild(a.el):l.bound?r.body.appendChild(a.el):l.field.parentNode.insertBefore(a.el,l.field.nextSibling),o(l.field,\"change\",a._onInputChange),l.defaultDate||(e&&l.field.value?l.defaultDate=t(l.field.value,l.format).toDate():l.defaultDate=new Date(Date.parse(l.field.value)),l.setDefaultDate=!0));var c=l.defaultDate;d(c)?l.setDefaultDate?a.setDate(c,!0):a.gotoDate(c):a.gotoDate(new Date),l.bound?(this.hide(),a.el.className+=\" is-bound\",o(l.trigger,\"click\",a._onInputClick),o(l.trigger,\"focus\",a._onInputFocus),o(l.trigger,\"blur\",a._onInputBlur)):this.show()};return O.prototype={config:function(t){this._o||(this._o=g({},w,!0));var e=g(this._o,t,!0);e.isRTL=!!e.isRTL,e.field=e.field&&e.field.nodeName?e.field:null,e.theme=\"string\"==typeof e.theme&&e.theme?e.theme:null,e.bound=!!(void 0!==e.bound?e.field&&e.bound:e.field),e.trigger=e.trigger&&e.trigger.nodeName?e.trigger:e.field,e.disableWeekends=!!e.disableWeekends,e.disableDayFn=\"function\"==typeof e.disableDayFn?e.disableDayFn:null;var n=parseInt(e.numberOfMonths,10)||1;if(e.numberOfMonths=n>4?4:n,d(e.minDate)||(e.minDate=!1),d(e.maxDate)||(e.maxDate=!1),e.minDate&&e.maxDate&&e.maxDate100&&(e.yearRange=100);return e},toString:function(n){return n=n||this._o.format,d(this._d)?this._o.toString?this._o.toString(this._d,n):e?t(this._d).format(n):this._d.toDateString():\"\"},getMoment:function(){return e?t(this._d):null},setMoment:function(n,r){e&&t.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return d(this._d)?new Date(this._d.getTime()):null},setDate:function(t,e){if(!t)return this._d=null,this._o.field&&(this._o.field.value=\"\",v(this._o.field,\"change\",{firedBy:this})),this.draw();if(\"string\"==typeof t&&(t=new Date(Date.parse(t))),d(t)){var n=this._o.minDate,r=this._o.maxDate;d(n)&&tr&&(t=r),this._d=new Date(t.getTime()),m(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),v(this._o.field,\"change\",{firedBy:this})),e||\"function\"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(t){var e=!0;if(d(t)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=t.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),e=i=o&&(this._y=o,!isNaN(a)&&this._m>a&&(this._m=a)),e=\"pika-title-\"+Math.random().toString(36).replace(/[^a-z]+/g,\"\").substr(0,2);for(var l=0;l'+C(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,e)+this.render(this.calendars[l].year,this.calendars[l].month,e)+\"\";this.el.innerHTML=u,n.bound&&\"hidden\"!==n.field.type&&i(function(){n.trigger.focus()},1),\"function\"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute(\"aria-label\",\"Use the arrow keys to pick a date\")}},adjustPosition:function(){var t,e,n,i,o,s,a,u,l,c;if(!this._o.container){if(this.el.style.position=\"absolute\",t=this._o.trigger,e=t,n=this.el.offsetWidth,i=this.el.offsetHeight,o=window.innerWidth||r.documentElement.clientWidth,s=window.innerHeight||r.documentElement.clientHeight,a=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,\"function\"==typeof t.getBoundingClientRect)c=t.getBoundingClientRect(),u=c.left+window.pageXOffset,l=c.bottom+window.pageYOffset;else for(u=e.offsetLeft,l=e.offsetTop+e.offsetHeight;e=e.offsetParent;)u+=e.offsetLeft,l+=e.offsetTop;(this._o.reposition&&u+n>o||this._o.position.indexOf(\"right\")>-1&&u-n+t.offsetWidth>0)&&(u=u-n+t.offsetWidth),(this._o.reposition&&l+i>s+a||this._o.position.indexOf(\"top\")>-1&&l-i-t.offsetHeight>0)&&(l=l-i-t.offsetHeight),this.el.style.left=u+\"px\",this.el.style.top=l+\"px\"}},render:function(t,e,n){var r=this._o,i=new Date,o=_(t,e),s=new Date(t,e,1).getDay(),a=[],u=[];m(i),r.firstDay>0&&(s-=r.firstDay,s<0&&(s+=7));for(var l=0===e?11:e-1,c=11===e?0:e+1,p=0===e?t-1:t,f=11===e?t+1:t,g=_(p,l),v=o+s,b=v;b>7;)b-=7;v+=7-b;for(var w=!1,k=0,D=0;k=o+s,N=1+(k-s),I=e,R=t,j=r.startRange&&y(r.startRange,M),T=r.endRange&&y(r.endRange,M),L=r.startRange&&r.endRange&&r.startRanger.maxDate||r.disableWeekends&&h(M)||r.disableDayFn&&r.disableDayFn(M);V&&(k/g,\">\")},t}(p.Model),n.StringFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"StringFormatter\",t.define({font_style:[a.FontStyle,\"normal\"],text_align:[a.TextAlign,\"left\"],text_color:[a.Color]}),t.prototype.doFormat=function(e,t,n,o,r){var i,l,s,a;switch(i=this.font_style,s=this.text_align,a=this.text_color,l=u.span({},null==n?\"\":\"\"+n),i){case\"bold\":l.style.fontWeight=\"bold\";break;case\"italic\":l.style.fontStyle=\"italic\"}return null!=s&&(l.style.textAlign=s),null!=a&&(l.style.color=a),l=l.outerHTML},t}(n.CellFormatter),n.NumberFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"NumberFormatter\",t.define({format:[a.String,\"0,0\"],language:[a.String,\"en\"],rounding:[a.String,\"round\"]}),t.prototype.doFormat=function(e,n,o,r,l){var s,a,u;return s=this.format,a=this.language,u=function(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}.call(this),o=i.format(o,s,a,u),t.__super__.doFormat.call(this,e,n,o,r,l)},t}(n.StringFormatter),n.BooleanFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"BooleanFormatter\",t.define({icon:[a.String,\"check\"]}),t.prototype.doFormat=function(e,t,n,o,r){return n?u.i({\"class\":this.icon}).outerHTML:\"\"},t}(n.CellFormatter),n.DateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"DateFormatter\",t.define({format:[a.String,\"ISO-8601\"]}),t.prototype.getFormat=function(){var e;return e=function(){switch(this.format){case\"ATOM\":case\"W3C\":case\"RFC-3339\":case\"ISO-8601\":return\"%Y-%m-%d\";case\"COOKIE\":return\"%a, %d %b %Y\";case\"RFC-850\":return\"%A, %d-%b-%y\";case\"RFC-1123\":case\"RFC-2822\":return\"%a, %e %b %Y\";case\"RSS\":case\"RFC-822\":case\"RFC-1036\":return\"%a, %e %b %y\";case\"TIMESTAMP\":return null;default:return\"__CUSTOM__\"}}.call(this),\"__CUSTOM__\"===e?this.format:e},t.prototype.doFormat=function(e,n,o,r,i){var l;return o=d.isString(o)?parseInt(o,10):o,l=s(o,this.getFormat()),t.__super__.doFormat.call(this,e,n,l,r,i)},t}(n.CellFormatter),n.HTMLTemplateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"HTMLTemplateFormatter\",t.define({template:[a.String,\"<%= value %>\"]}),t.prototype.doFormat=function(e,t,n,o,r){var i,s;return s=this.template,null===n?\"\":(r=c.extend({},r,{value:n}),(i=l(s))(r))},t}(n.CellFormatter)},404:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=function(e,t){function n(){this.constructor=e}for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},r={}.hasOwnProperty,i=e(416),l=e(414),s=e(413),a=e(9),u=e(14),c=e(36),d=e(21),p=e(13),f=e(408),h=e(409);n.DTINDEX_NAME=\"__bkdt_internal_index__\",n.DataProvider=function(){function e(e,t){if(this.source=e,this.view=t,n.DTINDEX_NAME in this.source.data)throw new Error(\"special name \"+n.DTINDEX_NAME+\" cannot be used as a data table column\");this.index=this.view.indices}return e.prototype.getLength=function(){return this.index.length},e.prototype.getItem=function(e){var t,o,r,i,l;for(o={},l=Object.keys(this.source.data),r=0,i=l.length;rn;e=0<=n?++t:--t)o.push(this.getItem(e));return o}.call(this)},e.prototype.sort=function(e){var t,o,r,i;return t=function(){var t,n,r;for(r=[],t=0,n=e.length;tp?c:-c,0!==u)return u;return 0})},e.prototype._update_source_inplace=function(){this.source.properties.data.change.emit(this,this.source.attributes.data)},e}(),n.DataTableView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.className=\"bk-data-table\",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.in_selection_update=!1},t.prototype.connect_signals=function(){return t.__super__.connect_signals.call(this),this.connect(this.model.change,function(e){return function(){return e.render()}}(this)),this.connect(this.model.source.properties.data.change,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.streaming,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.patching,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.change,function(e){return function(){return e.updateSelection()}}(this))},t.prototype.updateGrid=function(){return this.data.constructor(this.model.source,this.model.view),this.grid.invalidate(),this.grid.render(),this.model.source.data=this.model.source.data,this.model.source.change.emit()},t.prototype.updateSelection=function(){var e,t,n,o,r,i;if(!this.in_selection_update)return o=this.model.source.selected,r=o[\"1d\"].indices,n=function(){var e,t,n;for(n=[],e=0,t=r.length;e0&&t-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function i(e,t,n){return ge.isFunction(t)?ge.grep(e,function(e,o){return!!t.call(e,o,e)!==n}):t.nodeType?ge.grep(e,function(e){return e===t!==n}):\"string\"!=typeof t?ge.grep(e,function(e){return se.call(t,e)>-1!==n}):Se.test(t)?ge.filter(t,e,n):(t=ge.filter(t,e),ge.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return ge.each(e.match(Ne)||[],function(e,n){t[n]=!0}),t}function a(e){return e}function u(e){throw e}function c(e,t,n,o){var r;try{e&&ge.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&ge.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(o))}catch(e){n.apply(void 0,[e])}}function d(){ne.removeEventListener(\"DOMContentLoaded\",d),e.removeEventListener(\"load\",d),ge.ready()}function p(){this.expando=ge.expando+p.uid++}function f(e){return\"true\"===e||\"false\"!==e&&(\"null\"===e?null:e===+e+\"\"?+e:Me.test(e)?JSON.parse(e):e)}function h(e,t,n){var o;if(void 0===n&&1===e.nodeType)if(o=\"data-\"+t.replace(We,\"-$&\").toLowerCase(),n=e.getAttribute(o),\"string\"==typeof n){try{n=f(n)}catch(r){}Ie.set(e,t,n)}else n=void 0;return n}function g(e,t,n,o){var r,i=1,l=20,s=o?function(){return o.cur()}:function(){return ge.css(e,t,\"\")},a=s(),u=n&&n[3]||(ge.cssNumber[t]?\"\":\"px\"),c=(ge.cssNumber[t]||\"px\"!==u&&+a)&&je.exec(ge.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+a||1;do i=i||\".5\",c/=i,ge.style(e,t,c+u);while(i!==(i=s()/a)&&1!==i&&--l)}return n&&(c=+c||+a||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],o&&(o.unit=u,o.start=c,o.end=r)),r}function m(e){var t,n=e.ownerDocument,o=e.nodeName,r=ze[o];return r?r:(t=n.body.appendChild(n.createElement(o)),r=ge.css(t,\"display\"),t.parentNode.removeChild(t),\"none\"===r&&(r=\"block\"),ze[o]=r,r)}function v(e,t){for(var n,o,r=[],i=0,l=e.length;i-1)r&&r.push(i);else if(u=ge.contains(i.ownerDocument,i),l=w(d.appendChild(i),\"script\"),u&&y(l),n)for(c=0;i=l[c++];)Ke.test(i.type||\"\")&&n.push(i);return d}function b(){return!0}function x(){return!1}function R(){try{return ne.activeElement}catch(e){}}function E(e,t,n,o,r,i){var l,s;if(\"object\"==typeof t){\"string\"!=typeof n&&(o=o||n,n=void 0);for(s in t)E(e,s,n,o,t[s],i);return e}if(null==o&&null==r?(r=n,o=n=void 0):null==r&&(\"string\"==typeof n?(r=o,o=void 0):(r=o,o=n,n=void 0)),r===!1)r=x;else if(!r)return e;return 1===i&&(l=r,r=function(e){return ge().off(e),l.apply(this,arguments)},r.guid=l.guid||(l.guid=ge.guid++)),e.each(function(){ge.event.add(this,t,r,o,n)})}function S(e,t){return r(e,\"table\")&&r(11!==t.nodeType?t:t.firstChild,\"tr\")?ge(\">tbody\",e)[0]||e:e}function k(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function T(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute(\"type\"),e}function P(e,t){var n,o,r,i,l,s,a,u;if(1===t.nodeType){if(Fe.hasData(e)&&(i=Fe.access(e),l=Fe.set(t,i),u=i.events)){delete l.handle,l.events={};for(r in u)for(n=0,o=u[r].length;n1&&\"string\"==typeof h&&!fe.checkClone&&ot.test(h))return e.each(function(n){var i=e.eq(n);g&&(t[0]=h.call(this,n,i.html())),D(i,t,o,r)});if(p&&(i=C(t,e[0].ownerDocument,!1,e,r),l=i.firstChild,1===i.childNodes.length&&(i=l),l||r)){for(s=ge.map(w(i,\"script\"),k),a=s.length;d=0&&nR.cacheLength&&delete e[t.shift()],e[n+\" \"]=o}var t=[];return e}function o(e){return e[V]=!0,e}function r(e){var t=$.createElement(\"fieldset\");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split(\"|\"),o=n.length;o--;)R.attrHandle[n[o]]=t}function l(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return\"input\"===n&&t.type===e}}function a(e){return function(t){var n=t.nodeName.toLowerCase();return(\"input\"===n||\"button\"===n)&&t.type===e}}function u(e){return function(t){return\"form\"in t?t.parentNode&&t.disabled===!1?\"label\"in t?\"label\"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:\"label\"in t&&t.disabled===e}}function c(e){return o(function(t){return t=+t,o(function(n,o){for(var r,i=e([],n.length,t),l=i.length;l--;)n[r=i[l]]&&(n[r]=!(o[r]=n[r]))})})}function d(e){return e&&\"undefined\"!=typeof e.getElementsByTagName&&e}function p(){}function f(e){for(var t=0,n=e.length,o=\"\";t1?function(t,n,o){for(var r=e.length;r--;)if(!e[r](t,n,o))return!1;return!0}:e[0]}function m(e,n,o){for(var r=0,i=n.length;r-1&&(o[u]=!(l[u]=d))}}else y=v(y===l?y.splice(h,y.length):y),i?i(null,l,y,a):J.apply(l,y)})}function y(e){for(var t,n,o,r=e.length,i=R.relative[e[0].type],l=i||R.relative[\" \"],s=i?1:0,a=h(function(e){return e===t},l,!0),u=h(function(e){return ee(t,e)>-1},l,!0),c=[function(e,n,o){var r=!i&&(o||n!==_)||((t=n).nodeType?a(e,n,o):u(e,n,o));return t=null,r}];s1&&g(c),s>1&&f(e.slice(0,s-1).concat({value:\" \"===e[s-2].type?\"*\":\"\"})).replace(se,\"$1\"),n,s0,i=e.length>0,l=function(o,l,s,a,u){var c,d,p,f=0,h=\"0\",g=o&&[],m=[],w=_,y=o||i&&R.find.TAG(\"*\",u),C=O+=null==w?1:Math.random()||.1,b=y.length;for(u&&(_=l===$||l||u);h!==b&&null!=(c=y[h]);h++){if(i&&c){for(d=0,l||c.ownerDocument===$||(A(c),s=!L);p=e[d++];)if(p(c,l||$,s)){a.push(c);break}u&&(O=C)}r&&((c=!p&&c)&&f--,o&&g.push(c))}if(f+=h,r&&h!==f){for(d=0;p=n[d++];)p(g,m,l,s);if(o){if(f>0)for(;h--;)g[h]||m[h]||(m[h]=Y.call(a));m=v(m)}J.apply(a,m),u&&!o&&m.length>0&&f+n.length>1&&t.uniqueSort(a)}return u&&(O=C,_=w),g};return r?o(l):l}var b,x,R,E,S,k,T,P,_,D,N,A,$,H,L,F,I,M,W,V=\"sizzle\"+1*new Date,j=e.document,O=0,B=0,q=n(),z=n(),X=n(),U=function(e,t){return e===t&&(N=!0),0},K={}.hasOwnProperty,G=[],Y=G.pop,Q=G.push,J=G.push,Z=G.slice,ee=function(e,t){for(var n=0,o=e.length;n+~]|\"+ne+\")\"+ne+\"*\"),ce=new RegExp(\"=\"+ne+\"*([^\\\\]'\\\"]*?)\"+ne+\"*\\\\]\",\"g\"),de=new RegExp(ie),pe=new RegExp(\"^\"+oe+\"$\"),fe={ID:new RegExp(\"^#(\"+oe+\")\"),CLASS:new RegExp(\"^\\\\.(\"+oe+\")\"),TAG:new RegExp(\"^(\"+oe+\"|[*])\"),ATTR:new RegExp(\"^\"+re),PSEUDO:new RegExp(\"^\"+ie),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+ne+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+ne+\"*(?:([+-]|)\"+ne+\"*(\\\\d+)|))\"+ne+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+te+\")$\",\"i\"),needsContext:new RegExp(\"^\"+ne+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+ne+\"*((?:-\\\\d)?\\\\d*)\"+ne+\"*\\\\)|)(?=[^-]|$)\",\"i\")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\\d$/i,me=/^[^{]+\\{\\s*\\[native \\w/,ve=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,we=/[+~]/,ye=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+ne+\"?|(\"+ne+\")|.)\",\"ig\"),Ce=function(e,t,n){var o=\"0x\"+t-65536;return o!==o||n?t:o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320)},be=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,xe=function(e,t){return t?\"\\0\"===e?\"�\":e.slice(0,-1)+\"\\\\\"+e.charCodeAt(e.length-1).toString(16)+\" \":\"\\\\\"+e},Re=function(){A()},Ee=h(function(e){return e.disabled===!0&&(\"form\"in e||\"label\"in e)},{dir:\"parentNode\",next:\"legend\"});try{J.apply(G=Z.call(j.childNodes),j.childNodes),G[j.childNodes.length].nodeType}catch(Se){J={apply:G.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}x=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&\"HTML\"!==t.nodeName},A=t.setDocument=function(e){var t,n,o=e?e.ownerDocument||e:j;return o!==$&&9===o.nodeType&&o.documentElement?($=o,H=$.documentElement,L=!S($),j!==$&&(n=$.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener(\"unload\",Re,!1):n.attachEvent&&n.attachEvent(\"onunload\",Re)),x.attributes=r(function(e){return e.className=\"i\",!e.getAttribute(\"className\")}),x.getElementsByTagName=r(function(e){return e.appendChild($.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),x.getElementsByClassName=me.test($.getElementsByClassName),x.getById=r(function(e){return H.appendChild(e).id=V,!$.getElementsByName||!$.getElementsByName(V).length}),x.getById?(R.filter.ID=function(e){var t=e.replace(ye,Ce);return function(e){return e.getAttribute(\"id\")===t}},R.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}}):(R.filter.ID=function(e){var t=e.replace(ye,Ce);return function(e){var n=\"undefined\"!=typeof e.getAttributeNode&&e.getAttributeNode(\"id\");return n&&n.value===t}},R.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&L){var n,o,r,i=t.getElementById(e);if(i){if(n=i.getAttributeNode(\"id\"),n&&n.value===e)return[i];for(r=t.getElementsByName(e),o=0;i=r[o++];)if(n=i.getAttributeNode(\"id\"),n&&n.value===e)return[i]}return[]}}),R.find.TAG=x.getElementsByTagName?function(e,t){return\"undefined\"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],r=0,i=t.getElementsByTagName(e);if(\"*\"===e){for(;n=i[r++];)1===n.nodeType&&o.push(n);return o}return i},R.find.CLASS=x.getElementsByClassName&&function(e,t){if(\"undefined\"!=typeof t.getElementsByClassName&&L)return t.getElementsByClassName(e)},I=[],F=[],(x.qsa=me.test($.querySelectorAll))&&(r(function(e){H.appendChild(e).innerHTML=\"\",e.querySelectorAll(\"[msallowcapture^='']\").length&&F.push(\"[*^$]=\"+ne+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\"[selected]\").length||F.push(\"\\\\[\"+ne+\"*(?:value|\"+te+\")\"),e.querySelectorAll(\"[id~=\"+V+\"-]\").length||F.push(\"~=\"),e.querySelectorAll(\":checked\").length||F.push(\":checked\"),e.querySelectorAll(\"a#\"+V+\"+*\").length||F.push(\".#.+[+~]\")}),r(function(e){e.innerHTML=\"\";var t=$.createElement(\"input\");t.setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),e.querySelectorAll(\"[name=d]\").length&&F.push(\"name\"+ne+\"*[*^$|!~]?=\"),2!==e.querySelectorAll(\":enabled\").length&&F.push(\":enabled\",\":disabled\"),H.appendChild(e).disabled=!0,2!==e.querySelectorAll(\":disabled\").length&&F.push(\":enabled\",\":disabled\"),e.querySelectorAll(\"*,:x\"),F.push(\",.*:\")})),(x.matchesSelector=me.test(M=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&r(function(e){x.disconnectedMatch=M.call(e,\"*\"),M.call(e,\"[s!='']:x\"),I.push(\"!=\",ie)}),F=F.length&&new RegExp(F.join(\"|\")),I=I.length&&new RegExp(I.join(\"|\")),t=me.test(H.compareDocumentPosition),W=t||me.test(H.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return N=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===$||e.ownerDocument===j&&W(j,e)?-1:t===$||t.ownerDocument===j&&W(j,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return N=!0,0;var n,o=0,r=e.parentNode,i=t.parentNode,s=[e],a=[t];if(!r||!i)return e===$?-1:t===$?1:r?-1:i?1:D?ee(D,e)-ee(D,t):0;if(r===i)return l(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[o]===a[o];)o++;return o?l(s[o],a[o]):s[o]===j?-1:a[o]===j?1:0},$):$},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==$&&A(e),n=n.replace(ce,\"='$1']\"),x.matchesSelector&&L&&!X[n+\" \"]&&(!I||!I.test(n))&&(!F||!F.test(n)))try{var o=M.call(e,n);if(o||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(r){}return t(n,$,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==$&&A(e),W(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==$&&A(e);var n=R.attrHandle[t.toLowerCase()],o=n&&K.call(R.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==o?o:x.attributes||!L?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},t.escape=function(e){return(e+\"\").replace(be,xe)},t.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},t.uniqueSort=function(e){var t,n=[],o=0,r=0;if(N=!x.detectDuplicates,D=!x.sortStable&&e.slice(0),e.sort(U),N){for(;t=e[r++];)t===e[r]&&(o=n.push(r));for(;o--;)e.splice(n[o],1)}return D=null,e},E=t.getText=function(e){var t,n=\"\",o=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[o++];)n+=E(t);return n},R=t.selectors={cacheLength:50,createPseudo:o,match:fe,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,Ce),e[3]=(e[3]||e[4]||e[5]||\"\").replace(ye,Ce),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(\"even\"===e[3]||\"odd\"===e[3])),e[5]=+(e[7]+e[8]||\"odd\"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":n&&de.test(n)&&(t=k(n,!0))&&(t=n.indexOf(\")\",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,Ce).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+\" \"];return t||(t=new RegExp(\"(^|\"+ne+\")\"+e+\"(\"+ne+\"|$)\"))&&q(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||\"undefined\"!=typeof e.getAttribute&&e.getAttribute(\"class\")||\"\")})},ATTR:function(e,n,o){return function(r){var i=t.attr(r,e);return null==i?\"!=\"===n:!n||(i+=\"\",\"=\"===n?i===o:\"!=\"===n?i!==o:\"^=\"===n?o&&0===i.indexOf(o):\"*=\"===n?o&&i.indexOf(o)>-1:\"$=\"===n?o&&i.slice(-o.length)===o:\"~=\"===n?(\" \"+i.replace(le,\" \")+\" \").indexOf(o)>-1:\"|=\"===n&&(i===o||i.slice(0,o.length+1)===o+\"-\"))}},CHILD:function(e,t,n,o,r){var i=\"nth\"!==e.slice(0,3),l=\"last\"!==e.slice(-4),s=\"of-type\"===t;return 1===o&&0===r?function(e){return!!e.parentNode}:function(t,n,a){var u,c,d,p,f,h,g=i!==l?\"nextSibling\":\"previousSibling\",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),w=!a&&!s,y=!1;if(m){if(i){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g=\"only\"===e&&!h&&\"nextSibling\"}return!0}if(h=[l?m.firstChild:m.lastChild],l&&w){for(p=m,d=p[V]||(p[V]={}),c=d[p.uniqueID]||(d[p.uniqueID]={}),u=c[e]||[],f=u[0]===O&&u[1],y=f&&u[2],p=f&&m.childNodes[f];p=++f&&p&&p[g]||(y=f=0)||h.pop();)if(1===p.nodeType&&++y&&p===t){c[e]=[O,f,y];break}}else if(w&&(p=t,d=p[V]||(p[V]={}),c=d[p.uniqueID]||(d[p.uniqueID]={}),u=c[e]||[],f=u[0]===O&&u[1],y=f),y===!1)for(;(p=++f&&p&&p[g]||(y=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++y||(w&&(d=p[V]||(p[V]={}),c=d[p.uniqueID]||(d[p.uniqueID]={}),c[e]=[O,y]),p!==t)););return y-=r,y===o||y%o===0&&y/o>=0}}},PSEUDO:function(e,n){var r,i=R.pseudos[e]||R.setFilters[e.toLowerCase()]||t.error(\"unsupported pseudo: \"+e);return i[V]?i(n):i.length>1?(r=[e,e,\"\",n],R.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,t){for(var o,r=i(e,n),l=r.length;l--;)o=ee(e,r[l]),e[o]=!(t[o]=r[l])}):function(e){return i(e,0,r)}):i}},pseudos:{not:o(function(e){var t=[],n=[],r=T(e.replace(se,\"$1\"));return r[V]?o(function(e,t,n,o){for(var i,l=r(e,null,o,[]),s=e.length;s--;)(i=l[s])&&(e[s]=!(t[s]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:o(function(e){return function(n){return t(e,n).length>0}}),contains:o(function(e){return e=e.replace(ye,Ce),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:o(function(e){return pe.test(e||\"\")||t.error(\"unsupported lang: \"+e),e=e.replace(ye,Ce).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute(\"xml:lang\")||t.getAttribute(\"lang\"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+\"-\");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===$.activeElement&&(!$.hasFocus||$.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!R.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&\"button\"===e.type||\"button\"===t},text:function(e){var t;return\"input\"===e.nodeName.toLowerCase()&&\"text\"===e.type&&(null==(t=e.getAttribute(\"type\"))||\"text\"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(o);return e}),gt:c(function(e,t,n){for(var o=n<0?n+t:n;++o2&&\"ID\"===(l=i[0]).type&&9===t.nodeType&&L&&R.relative[i[1].type]){if(t=(R.find.ID(l.matches[0].replace(ye,Ce),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(r=fe.needsContext.test(e)?0:i.length;r--&&(l=i[r],!R.relative[s=l.type]);)if((a=R.find[s])&&(o=a(l.matches[0].replace(ye,Ce),we.test(i[0].type)&&d(t.parentNode)||t))){if(i.splice(r,1),e=o.length&&f(i),!e)return J.apply(n,o),n;break}}return(u||T(e,c))(o,t,!L,n,!t||we.test(e)&&d(t.parentNode)||t),n},x.sortStable=V.split(\"\").sort(U).join(\"\")===V,x.detectDuplicates=!!N,A(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition($.createElement(\"fieldset\"))}),r(function(e){return e.innerHTML=\"\",\"#\"===e.firstChild.getAttribute(\"href\")})||i(\"type|href|height|width\",function(e,t,n){if(!n)return e.getAttribute(t,\"type\"===t.toLowerCase()?1:2)}),x.attributes&&r(function(e){return e.innerHTML=\"\",e.firstChild.setAttribute(\"value\",\"\"),\"\"===e.firstChild.getAttribute(\"value\")})||i(\"value\",function(e,t,n){if(!n&&\"input\"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute(\"disabled\")})||i(te,function(e,t,n){var o;if(!n)return e[t]===!0?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null}),t}(e);ge.find=Ce,ge.expr=Ce.selectors,ge.expr[\":\"]=ge.expr.pseudos,ge.uniqueSort=ge.unique=Ce.uniqueSort,ge.text=Ce.getText,ge.isXMLDoc=Ce.isXML,ge.contains=Ce.contains,ge.escapeSelector=Ce.escape;var be=function(e,t,n){for(var o=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&ge(e).is(n))break;o.push(e)}return o},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Re=ge.expr.match.needsContext,Ee=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i,Se=/^.[^:#\\[\\.,]*$/;ge.filter=function(e,t,n){var o=t[0];return n&&(e=\":not(\"+e+\")\"),1===t.length&&1===o.nodeType?ge.find.matchesSelector(o,e)?[o]:[]:ge.find.matches(e,ge.grep(t,function(e){return 1===e.nodeType}))},ge.fn.extend({find:function(e){var t,n,o=this.length,r=this;if(\"string\"!=typeof e)return this.pushStack(ge(e).filter(function(){for(t=0;t1?ge.uniqueSort(n):n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,\"string\"==typeof e&&Re.test(e)?ge(e):e||[],!1).length}});var ke,Te=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,Pe=ge.fn.init=function(e,t,n){var o,r;if(!e)return this;if(n=n||ke,\"string\"==typeof e){if(o=\"<\"===e[0]&&\">\"===e[e.length-1]&&e.length>=3?[null,e,null]:Te.exec(e),!o||!o[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(o[1]){if(t=t instanceof ge?t[0]:t,ge.merge(this,ge.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),Ee.test(o[1])&&ge.isPlainObject(t))for(o in t)ge.isFunction(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return r=ne.getElementById(o[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ge.isFunction(e)?void 0!==n.ready?n.ready(e):e(ge):ge.makeArray(e,this)};Pe.prototype=ge.fn,ke=ge(ne);var _e=/^(?:parents|prev(?:Until|All))/,De={children:!0,contents:!0,next:!0,prev:!0};ge.fn.extend({has:function(e){var t=ge(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&ge.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?ge.uniqueSort(i):i)},index:function(e){return e?\"string\"==typeof e?se.call(ge(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ge.uniqueSort(ge.merge(this.get(),ge(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ge.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return be(e,\"parentNode\")},parentsUntil:function(e,t,n){return be(e,\"parentNode\",n)},next:function(e){return l(e,\"nextSibling\")},prev:function(e){return l(e,\"previousSibling\")},nextAll:function(e){return be(e,\"nextSibling\")},prevAll:function(e){return be(e,\"previousSibling\")},nextUntil:function(e,t,n){return be(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return be(e,\"previousSibling\",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return r(e,\"iframe\")?e.contentDocument:(r(e,\"template\")&&(e=e.content||e),ge.merge([],e.childNodes))}},function(e,t){ge.fn[e]=function(n,o){var r=ge.map(this,t,n);return\"Until\"!==e.slice(-5)&&(o=n),o&&\"string\"==typeof o&&(r=ge.filter(o,r)),this.length>1&&(De[e]||ge.uniqueSort(r),_e.test(e)&&r.reverse()),this.pushStack(r)}});var Ne=/[^\\x20\\t\\r\\n\\f]+/g;ge.Callbacks=function(e){e=\"string\"==typeof e?s(e):ge.extend({},e);var t,n,o,r,i=[],l=[],a=-1,u=function(){for(r=r||e.once,o=t=!0;l.length;a=-1)for(n=l.shift();++a-1;)i.splice(n,1),n<=a&&a--}),this},has:function(e){return e?ge.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return r=l=[],i=n=\"\",this},disabled:function(){return!i},lock:function(){return r=l=[],n||t||(i=n=\"\"),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],l.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!o}};return c},ge.extend({Deferred:function(t){var n=[[\"notify\",\"progress\",ge.Callbacks(\"memory\"),ge.Callbacks(\"memory\"),2],[\"resolve\",\"done\",ge.Callbacks(\"once memory\"),ge.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",ge.Callbacks(\"once memory\"),ge.Callbacks(\"once memory\"),1,\"rejected\"]],o=\"pending\",r={state:function(){return o},always:function(){return i.done(arguments).fail(arguments),this},\"catch\":function(e){return r.then(null,e)},pipe:function(){var e=arguments;return ge.Deferred(function(t){ge.each(n,function(n,o){var r=ge.isFunction(e[o[4]])&&e[o[4]];i[o[1]](function(){var e=r&&r.apply(this,arguments);e&&ge.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[o[0]+\"With\"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,o,r){function i(t,n,o,r){return function(){var s=this,c=arguments,d=function(){var e,d;if(!(t=l&&(o!==u&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?p():(ge.Deferred.getStackHook&&(p.stackTrace=ge.Deferred.getStackHook()),e.setTimeout(p))}}var l=0;return ge.Deferred(function(e){n[0][3].add(i(0,e,ge.isFunction(r)?r:a,e.notifyWith)),n[1][3].add(i(0,e,ge.isFunction(t)?t:a)),n[2][3].add(i(0,e,ge.isFunction(o)?o:u))}).promise()},promise:function(e){return null!=e?ge.extend(e,r):r}},i={};return ge.each(n,function(e,t){var l=t[2],s=t[5];r[t[1]]=l.add,s&&l.add(function(){o=s},n[3-e][2].disable,n[0][2].lock),l.add(t[3].fire),i[t[0]]=function(){return i[t[0]+\"With\"](this===i?void 0:this,arguments),this},i[t[0]+\"With\"]=l.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(e){var t=arguments.length,n=t,o=Array(n),r=re.call(arguments),i=ge.Deferred(),l=function(e){return function(n){o[e]=this,r[e]=arguments.length>1?re.call(arguments):n,--t||i.resolveWith(o,r)}};if(t<=1&&(c(e,i.done(l(n)).resolve,i.reject,!t),\"pending\"===i.state()||ge.isFunction(r[n]&&r[n].then)))return i.then();for(;n--;)c(r[n],l(n),i.reject);return i.promise()}});var Ae=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ge.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Ae.test(t.name)&&e.console.warn(\"jQuery.Deferred exception: \"+t.message,t.stack,n)},ge.readyException=function(t){e.setTimeout(function(){throw t})};var $e=ge.Deferred();ge.fn.ready=function(e){return $e.then(e)[\"catch\"](function(e){ge.readyException(e)}),this},ge.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--ge.readyWait:ge.isReady)||(ge.isReady=!0,e!==!0&&--ge.readyWait>0||$e.resolveWith(ne,[ge]))}}),ge.ready.then=$e.then,\"complete\"===ne.readyState||\"loading\"!==ne.readyState&&!ne.documentElement.doScroll?e.setTimeout(ge.ready):(ne.addEventListener(\"DOMContentLoaded\",d),e.addEventListener(\"load\",d));var He=function(e,t,n,o,r,i,l){var s=0,a=e.length,u=null==n;if(\"object\"===ge.type(n)){r=!0;for(s in n)He(e,t,s,n[s],!0,i,l)}else if(void 0!==o&&(r=!0,ge.isFunction(o)||(l=!0),u&&(l?(t.call(e,o),t=null):(u=t,t=function(e,t,n){return u.call(ge(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){Ie.remove(this,e)})}}),ge.extend({queue:function(e,t,n){var o;if(e)return t=(t||\"fx\")+\"queue\",o=Fe.get(e,t),n&&(!o||Array.isArray(n)?o=Fe.access(e,t,ge.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){t=t||\"fx\";var n=ge.queue(e,t),o=n.length,r=n.shift(),i=ge._queueHooks(e,t),l=function(){ge.dequeue(e,t)};\"inprogress\"===r&&(r=n.shift(),o--),r&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete i.stop,r.call(e,l,i)),!o&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return Fe.get(e,n)||Fe.access(e,n,{empty:ge.Callbacks(\"once memory\").add(function(){Fe.remove(e,[t+\"queue\",n])})})}}),ge.fn.extend({queue:function(e,t){var n=2;return\"string\"!=typeof e&&(t=e,e=\"fx\",n--),arguments.length\\x20\\t\\r\\n\\f]+)/i,Ke=/^$|\\/(?:java|ecma)script/i,Ge={option:[1,\"\"],thead:[1,\"\",\"
\"],col:[2,\"\",\"
\"],tr:[2,\"\",\"
\"],td:[3,\"\",\"
\"],_default:[0,\"\",\"\"]};Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,\n", " Ge.th=Ge.td;var Ye=/<|&#?\\w+;/;!function(){var e=ne.createDocumentFragment(),t=e.appendChild(ne.createElement(\"div\")),n=ne.createElement(\"input\");n.setAttribute(\"type\",\"radio\"),n.setAttribute(\"checked\",\"checked\"),n.setAttribute(\"name\",\"t\"),t.appendChild(n),fe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML=\"\",fe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Qe=ne.documentElement,Je=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\\.(.+)|)/;ge.event={global:{},add:function(e,t,n,o,r){var i,l,s,a,u,c,d,p,f,h,g,m=Fe.get(e);if(m)for(n.handler&&(i=n,n=i.handler,r=i.selector),r&&ge.find.matchesSelector(Qe,r),n.guid||(n.guid=ge.guid++),(a=m.events)||(a=m.events={}),(l=m.handle)||(l=m.handle=function(t){return\"undefined\"!=typeof ge&&ge.event.triggered!==t.type?ge.event.dispatch.apply(e,arguments):void 0}),t=(t||\"\").match(Ne)||[\"\"],u=t.length;u--;)s=et.exec(t[u])||[],f=g=s[1],h=(s[2]||\"\").split(\".\").sort(),f&&(d=ge.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=ge.event.special[f]||{},c=ge.extend({type:f,origType:g,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&ge.expr.match.needsContext.test(r),namespace:h.join(\".\")},i),(p=a[f])||(p=a[f]=[],p.delegateCount=0,d.setup&&d.setup.call(e,o,h,l)!==!1||e.addEventListener&&e.addEventListener(f,l)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,c):p.push(c),ge.event.global[f]=!0)},remove:function(e,t,n,o,r){var i,l,s,a,u,c,d,p,f,h,g,m=Fe.hasData(e)&&Fe.get(e);if(m&&(a=m.events)){for(t=(t||\"\").match(Ne)||[\"\"],u=t.length;u--;)if(s=et.exec(t[u])||[],f=g=s[1],h=(s[2]||\"\").split(\".\").sort(),f){for(d=ge.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,p=a[f]||[],s=s[2]&&new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),l=i=p.length;i--;)c=p[i],!r&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||o&&o!==c.selector&&(\"**\"!==o||!c.selector)||(p.splice(i,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));l&&!p.length&&(d.teardown&&d.teardown.call(e,h,m.handle)!==!1||ge.removeEvent(e,f,m.handle),delete a[f])}else for(f in a)ge.event.remove(e,f+t[u],n,o,!0);ge.isEmptyObject(a)&&Fe.remove(e,\"handle events\")}},dispatch:function(e){var t,n,o,r,i,l,s=ge.event.fix(e),a=new Array(arguments.length),u=(Fe.get(this,\"events\")||{})[s.type]||[],c=ge.event.special[s.type]||{};for(a[0]=s,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(\"click\"!==e.type||u.disabled!==!0)){for(i=[],l={},n=0;n-1:ge.find(r,this,null,[u]).length),l[r]&&i.push(o);i.length&&s.push({elem:u,handlers:i})}return u=this,a\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,nt=/\\s*$/g;ge.extend({htmlPrefilter:function(e){return e.replace(tt,\"<$1>\")},clone:function(e,t,n){var o,r,i,l,s=e.cloneNode(!0),a=ge.contains(e.ownerDocument,e);if(!(fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ge.isXMLDoc(e)))for(l=w(s),i=w(e),o=0,r=i.length;o0&&y(l,!a&&w(e,\"script\")),s},cleanData:function(e){for(var t,n,o,r=ge.event.special,i=0;void 0!==(n=e[i]);i++)if(Le(n)){if(t=n[Fe.expando]){if(t.events)for(o in t.events)r[o]?ge.event.remove(n,o):ge.removeEvent(n,o,t.handle);n[Fe.expando]=void 0}n[Ie.expando]&&(n[Ie.expando]=void 0)}}}),ge.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return He(this,function(e){return void 0===e?ge.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.appendChild(e)}})},prepend:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ge.cleanData(w(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ge.clone(this,e,t)})},html:function(e){return He(this,function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if(\"string\"==typeof e&&!nt.test(e)&&!Ge[(Ue.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=ge.htmlPrefilter(e);try{for(;n1)}}),ge.Tween=W,W.prototype={constructor:W,init:function(e,t,n,o,r,i){this.elem=e,this.prop=n,this.easing=r||ge.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=i||(ge.cssNumber[n]?\"\":\"px\")},cur:function(){var e=W.propHooks[this.prop];return e&&e.get?e.get(this):W.propHooks._default.get(this)},run:function(e){var t,n=W.propHooks[this.prop];return this.options.duration?this.pos=t=ge.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ge.css(e.elem,e.prop,\"\"),t&&\"auto\"!==t?t:0)},set:function(e){ge.fx.step[e.prop]?ge.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ge.cssProps[e.prop]]&&!ge.cssHooks[e.prop]?e.elem[e.prop]=e.now:ge.style(e.elem,e.prop,e.now+e.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ge.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},ge.fx=W.prototype.init,ge.fx.step={};var gt,mt,vt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;ge.Animation=ge.extend(X,{tweeners:{\"*\":[function(e,t){var n=this.createTween(e,t);return g(n.elem,e,je.exec(t),n),n}]},tweener:function(e,t){ge.isFunction(e)?(t=e,e=[\"*\"]):e=e.match(Ne);for(var n,o=0,r=e.length;o1)},removeAttr:function(e){return this.each(function(){ge.removeAttr(this,e)})}}),ge.extend({attr:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return\"undefined\"==typeof e.getAttribute?ge.prop(e,t,n):(1===i&&ge.isXMLDoc(e)||(r=ge.attrHooks[t.toLowerCase()]||(ge.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void ge.removeAttr(e,t):r&&\"set\"in r&&void 0!==(o=r.set(e,n,t))?o:(e.setAttribute(t,n+\"\"),n):r&&\"get\"in r&&null!==(o=r.get(e,t))?o:(o=ge.find.attr(e,t),null==o?void 0:o))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&\"radio\"===t&&r(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,o=0,r=t&&t.match(Ne);if(r&&1===e.nodeType)for(;n=r[o++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return t===!1?ge.removeAttr(e,n):e.setAttribute(n,n),n}},ge.each(ge.expr.match.bool.source.match(/\\w+/g),function(e,t){var n=Ct[t]||ge.find.attr;Ct[t]=function(e,t,o){var r,i,l=t.toLowerCase();return o||(i=Ct[l],Ct[l]=r,r=null!=n(e,t,o)?l:null,Ct[l]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,xt=/^(?:a|area)$/i;ge.fn.extend({prop:function(e,t){return He(this,ge.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ge.propFix[e]||e]})}}),ge.extend({prop:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&ge.isXMLDoc(e)||(t=ge.propFix[t]||t,r=ge.propHooks[t]),void 0!==n?r&&\"set\"in r&&void 0!==(o=r.set(e,n,t))?o:e[t]=n:r&&\"get\"in r&&null!==(o=r.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){var t=ge.find.attr(e,\"tabindex\");return t?parseInt(t,10):bt.test(e.nodeName)||xt.test(e.nodeName)&&e.href?0:-1}}},propFix:{\"for\":\"htmlFor\",\"class\":\"className\"}}),fe.optSelected||(ge.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ge.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){ge.propFix[this.toLowerCase()]=this}),ge.fn.extend({addClass:function(e){var t,n,o,r,i,l,s,a=0;if(ge.isFunction(e))return this.each(function(t){ge(this).addClass(e.call(this,t,K(this)))});if(\"string\"==typeof e&&e)for(t=e.match(Ne)||[];n=this[a++];)if(r=K(n),o=1===n.nodeType&&\" \"+U(r)+\" \"){for(l=0;i=t[l++];)o.indexOf(\" \"+i+\" \")<0&&(o+=i+\" \");s=U(o),r!==s&&n.setAttribute(\"class\",s)}return this},removeClass:function(e){var t,n,o,r,i,l,s,a=0;if(ge.isFunction(e))return this.each(function(t){ge(this).removeClass(e.call(this,t,K(this)))});if(!arguments.length)return this.attr(\"class\",\"\");if(\"string\"==typeof e&&e)for(t=e.match(Ne)||[];n=this[a++];)if(r=K(n),o=1===n.nodeType&&\" \"+U(r)+\" \"){for(l=0;i=t[l++];)for(;o.indexOf(\" \"+i+\" \")>-1;)o=o.replace(\" \"+i+\" \",\" \");s=U(o),r!==s&&n.setAttribute(\"class\",s)}return this},toggleClass:function(e,t){var n=typeof e;return\"boolean\"==typeof t&&\"string\"===n?t?this.addClass(e):this.removeClass(e):ge.isFunction(e)?this.each(function(n){ge(this).toggleClass(e.call(this,n,K(this),t),t)}):this.each(function(){var t,o,r,i;if(\"string\"===n)for(o=0,r=ge(this),i=e.match(Ne)||[];t=i[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&\"boolean\"!==n||(t=K(this),t&&Fe.set(this,\"__className__\",t),this.setAttribute&&this.setAttribute(\"class\",t||e===!1?\"\":Fe.get(this,\"__className__\")||\"\"))})},hasClass:function(e){var t,n,o=0;for(t=\" \"+e+\" \";n=this[o++];)if(1===n.nodeType&&(\" \"+U(K(n))+\" \").indexOf(t)>-1)return!0;return!1}});var Rt=/\\r/g;ge.fn.extend({val:function(e){var t,n,o,r=this[0];{if(arguments.length)return o=ge.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=o?e.call(this,n,ge(this).val()):e,null==r?r=\"\":\"number\"==typeof r?r+=\"\":Array.isArray(r)&&(r=ge.map(r,function(e){return null==e?\"\":e+\"\"})),t=ge.valHooks[this.type]||ge.valHooks[this.nodeName.toLowerCase()],t&&\"set\"in t&&void 0!==t.set(this,r,\"value\")||(this.value=r))});if(r)return t=ge.valHooks[r.type]||ge.valHooks[r.nodeName.toLowerCase()],t&&\"get\"in t&&void 0!==(n=t.get(r,\"value\"))?n:(n=r.value,\"string\"==typeof n?n.replace(Rt,\"\"):null==n?\"\":n)}}}),ge.extend({valHooks:{option:{get:function(e){var t=ge.find.attr(e,\"value\");return null!=t?t:U(ge.text(e))}},select:{get:function(e){var t,n,o,i=e.options,l=e.selectedIndex,s=\"select-one\"===e.type,a=s?null:[],u=s?l+1:i.length;for(o=l<0?u:s?l:0;o-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),ge.each([\"radio\",\"checkbox\"],function(){ge.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=ge.inArray(ge(e).val(),t)>-1}},fe.checkOn||(ge.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})});var Et=/^(?:focusinfocus|focusoutblur)$/;ge.extend(ge.event,{trigger:function(t,n,o,r){var i,l,s,a,u,c,d,p=[o||ne],f=ce.call(t,\"type\")?t.type:t,h=ce.call(t,\"namespace\")?t.namespace.split(\".\"):[];if(l=s=o=o||ne,3!==o.nodeType&&8!==o.nodeType&&!Et.test(f+ge.event.triggered)&&(f.indexOf(\".\")>-1&&(h=f.split(\".\"),f=h.shift(),h.sort()),u=f.indexOf(\":\")<0&&\"on\"+f,t=t[ge.expando]?t:new ge.Event(f,\"object\"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=h.join(\".\"),t.rnamespace=t.namespace?new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,t.result=void 0,t.target||(t.target=o),n=null==n?[t]:ge.makeArray(n,[t]),d=ge.event.special[f]||{},r||!d.trigger||d.trigger.apply(o,n)!==!1)){if(!r&&!d.noBubble&&!ge.isWindow(o)){for(a=d.delegateType||f,Et.test(a+f)||(l=l.parentNode);l;l=l.parentNode)p.push(l),s=l;s===(o.ownerDocument||ne)&&p.push(s.defaultView||s.parentWindow||e)}for(i=0;(l=p[i++])&&!t.isPropagationStopped();)t.type=i>1?a:d.bindType||f,c=(Fe.get(l,\"events\")||{})[t.type]&&Fe.get(l,\"handle\"),c&&c.apply(l,n),c=u&&l[u],c&&c.apply&&Le(l)&&(t.result=c.apply(l,n),t.result===!1&&t.preventDefault());return t.type=f,r||t.isDefaultPrevented()||d._default&&d._default.apply(p.pop(),n)!==!1||!Le(o)||u&&ge.isFunction(o[f])&&!ge.isWindow(o)&&(s=o[u],s&&(o[u]=null),ge.event.triggered=f,o[f](),ge.event.triggered=void 0,s&&(o[u]=s)),t.result}},simulate:function(e,t,n){var o=ge.extend(new ge.Event,n,{type:e,isSimulated:!0});ge.event.trigger(o,null,t)}}),ge.fn.extend({trigger:function(e,t){return this.each(function(){ge.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ge.event.trigger(e,t,n,!0)}}),ge.each(\"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu\".split(\" \"),function(e,t){ge.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ge.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),fe.focusin=\"onfocusin\"in e,fe.focusin||ge.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){var n=function(e){ge.event.simulate(t,e.target,ge.event.fix(e))};ge.event.special[t]={setup:function(){var o=this.ownerDocument||this,r=Fe.access(o,t);r||o.addEventListener(e,n,!0),Fe.access(o,t,(r||0)+1)},teardown:function(){var o=this.ownerDocument||this,r=Fe.access(o,t)-1;r?Fe.access(o,t,r):(o.removeEventListener(e,n,!0),Fe.remove(o,t))}}});var St=e.location,kt=ge.now(),Tt=/\\?/;ge.parseXML=function(t){var n;if(!t||\"string\"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,\"text/xml\")}catch(o){n=void 0}return n&&!n.getElementsByTagName(\"parsererror\").length||ge.error(\"Invalid XML: \"+t),n};var Pt=/\\[\\]$/,_t=/\\r?\\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;ge.param=function(e,t){var n,o=[],r=function(e,t){var n=ge.isFunction(t)?t():t;o[o.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(null==n?\"\":n)};if(Array.isArray(e)||e.jquery&&!ge.isPlainObject(e))ge.each(e,function(){r(this.name,this.value)});else for(n in e)G(n,e[n],t,r);return o.join(\"&\")},ge.fn.extend({serialize:function(){return ge.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ge.prop(this,\"elements\");return e?ge.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ge(this).is(\":disabled\")&&Nt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!Xe.test(e))}).map(function(e,t){var n=ge(this).val();return null==n?null:Array.isArray(n)?ge.map(n,function(e){return{name:t.name,value:e.replace(_t,\"\\r\\n\")}}):{name:t.name,value:n.replace(_t,\"\\r\\n\")}}).get()}});var At=/%20/g,$t=/#.*$/,Ht=/([?&])_=[^&]*/,Lt=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,It=/^(?:GET|HEAD)$/,Mt=/^\\/\\//,Wt={},Vt={},jt=\"*/\".concat(\"*\"),Ot=ne.createElement(\"a\");Ot.href=St.href,ge.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:\"GET\",isLocal:Ft.test(St.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":jt,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":JSON.parse,\"text xml\":ge.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?J(J(e,ge.ajaxSettings),t):J(ge.ajaxSettings,e)},ajaxPrefilter:Y(Wt),ajaxTransport:Y(Vt),ajax:function(t,n){function o(t,n,o,s){var u,p,f,C,b,x=n;c||(c=!0,a&&e.clearTimeout(a),r=void 0,l=s||\"\",R.readyState=t>0?4:0,u=t>=200&&t<300||304===t,o&&(C=Z(h,R,o)),C=ee(h,C,R,u),u?(h.ifModified&&(b=R.getResponseHeader(\"Last-Modified\"),b&&(ge.lastModified[i]=b),b=R.getResponseHeader(\"etag\"),b&&(ge.etag[i]=b)),204===t||\"HEAD\"===h.type?x=\"nocontent\":304===t?x=\"notmodified\":(x=C.state,p=C.data,f=C.error,u=!f)):(f=x,!t&&x||(x=\"error\",t<0&&(t=0))),R.status=t,R.statusText=(n||x)+\"\",u?v.resolveWith(g,[p,x,R]):v.rejectWith(g,[R,x,f]),R.statusCode(y),y=void 0,d&&m.trigger(u?\"ajaxSuccess\":\"ajaxError\",[R,h,u?p:f]),w.fireWith(g,[R,x]),d&&(m.trigger(\"ajaxComplete\",[R,h]),--ge.active||ge.event.trigger(\"ajaxStop\")))}\"object\"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,l,s,a,u,c,d,p,f,h=ge.ajaxSetup({},n),g=h.context||h,m=h.context&&(g.nodeType||g.jquery)?ge(g):ge.event,v=ge.Deferred(),w=ge.Callbacks(\"once memory\"),y=h.statusCode||{},C={},b={},x=\"canceled\",R={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Lt.exec(l);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?l:null},setRequestHeader:function(e,t){return null==c&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,C[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)R.always(e[R.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),o(0,t),this}};if(v.promise(R),h.url=((t||h.url||St.href)+\"\").replace(Mt,St.protocol+\"//\"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||\"*\").toLowerCase().match(Ne)||[\"\"],null==h.crossDomain){u=ne.createElement(\"a\");try{u.href=h.url,u.href=u.href,h.crossDomain=Ot.protocol+\"//\"+Ot.host!=u.protocol+\"//\"+u.host}catch(E){h.crossDomain=!0}}if(h.data&&h.processData&&\"string\"!=typeof h.data&&(h.data=ge.param(h.data,h.traditional)),Q(Wt,h,n,R),c)return R;d=ge.event&&h.global,d&&0===ge.active++&&ge.event.trigger(\"ajaxStart\"),h.type=h.type.toUpperCase(),h.hasContent=!It.test(h.type),i=h.url.replace($t,\"\"),h.hasContent?h.data&&h.processData&&0===(h.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(h.data=h.data.replace(At,\"+\")):(f=h.url.slice(i.length),h.data&&(i+=(Tt.test(i)?\"&\":\"?\")+h.data,delete h.data),h.cache===!1&&(i=i.replace(Ht,\"$1\"),f=(Tt.test(i)?\"&\":\"?\")+\"_=\"+kt++ +f),h.url=i+f),h.ifModified&&(ge.lastModified[i]&&R.setRequestHeader(\"If-Modified-Since\",ge.lastModified[i]),ge.etag[i]&&R.setRequestHeader(\"If-None-Match\",ge.etag[i])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&R.setRequestHeader(\"Content-Type\",h.contentType),R.setRequestHeader(\"Accept\",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(\"*\"!==h.dataTypes[0]?\", \"+jt+\"; q=0.01\":\"\"):h.accepts[\"*\"]);for(p in h.headers)R.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(h.beforeSend.call(g,R,h)===!1||c))return R.abort();if(x=\"abort\",w.add(h.complete),R.done(h.success),R.fail(h.error),r=Q(Vt,h,n,R)){if(R.readyState=1,d&&m.trigger(\"ajaxSend\",[R,h]),c)return R;h.async&&h.timeout>0&&(a=e.setTimeout(function(){R.abort(\"timeout\")},h.timeout));try{c=!1,r.send(C,o)}catch(E){if(c)throw E;o(-1,E)}}else o(-1,\"No Transport\");return R},getJSON:function(e,t,n){return ge.get(e,t,n,\"json\")},getScript:function(e,t){return ge.get(e,void 0,t,\"script\")}}),ge.each([\"get\",\"post\"],function(e,t){ge[t]=function(e,n,o,r){return ge.isFunction(n)&&(r=r||o,o=n,n=void 0),ge.ajax(ge.extend({url:e,type:t,dataType:r,data:n,success:o},ge.isPlainObject(e)&&e))}}),ge._evalUrl=function(e){return ge.ajax({url:e,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,\"throws\":!0})},ge.fn.extend({wrapAll:function(e){var t;return this[0]&&(ge.isFunction(e)&&(e=e.call(this[0])),t=ge(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ge.isFunction(e)?this.each(function(t){ge(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ge(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ge.isFunction(e);return this.each(function(n){ge(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not(\"body\").each(function(){ge(this).replaceWith(this.childNodes)}),this}}),ge.expr.pseudos.hidden=function(e){return!ge.expr.pseudos.visible(e)},ge.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length);\n", " },ge.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var Bt={0:200,1223:204},qt=ge.ajaxSettings.xhr();fe.cors=!!qt&&\"withCredentials\"in qt,fe.ajax=qt=!!qt,ge.ajaxTransport(function(t){var n,o;if(fe.cors||qt&&!t.crossDomain)return{send:function(r,i){var l,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(l in t.xhrFields)s[l]=t.xhrFields[l];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r[\"X-Requested-With\"]||(r[\"X-Requested-With\"]=\"XMLHttpRequest\");for(l in r)s.setRequestHeader(l,r[l]);n=function(e){return function(){n&&(n=o=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,\"abort\"===e?s.abort():\"error\"===e?\"number\"!=typeof s.status?i(0,\"error\"):i(s.status,s.statusText):i(Bt[s.status]||s.status,s.statusText,\"text\"!==(s.responseType||\"text\")||\"string\"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),o=s.onerror=n(\"error\"),void 0!==s.onabort?s.onabort=o:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&o()})},n=n(\"abort\");try{s.send(t.hasContent&&t.data||null)}catch(a){if(n)throw a}},abort:function(){n&&n()}}}),ge.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ge.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function(e){return ge.globalEval(e),e}}}),ge.ajaxPrefilter(\"script\",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")}),ge.ajaxTransport(\"script\",function(e){if(e.crossDomain){var t,n;return{send:function(o,r){t=ge(\"\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", "\n", "\n", "\n", " \n", " \n", "\n", "\n", "\n", "\n", "
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "hv.notebook_extension('bokeh')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "--------------\n", "### Open your 3D data set for a case, as an xarray *dataset* object" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": true }, "outputs": [], "source": [ "data_3d_full=xr.open_dataset('data_0_3D7km30minuteInst.nc')\n", "data_2d_full=xr.open_dataset('data_1_inst30mn_2d_met1_Nx.nc')\n", "data_2d=data_2d_full.isel(time=0)\n", "#data_3d=G5NR_utils.load_from_zidv('remotepathtozidv')" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "data_3d=data_3d_full.isel(time=0)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": true }, "outputs": [], "source": [ "regrid_3d=G5NR_utils.regrid(data_3d,90,45)\n", "subrid_3d=G5NR_utils.subgrid(data_3d,90,45)\n", "skedot_da=G5NR_utils.SKEDot(data_3d.airdens,data_3d.u,data_3d.v,data_3d.w,90,45)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "### Geoviews display for the subgrid scale filtered (\"eddy\") products:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "up_img=gv.Dataset(subrid_3d.u).to(gv.Image,kdims=['lon','lat'],label='up',dynamic=True).redim.range(u=(-20,20))\n", "vp_img=gv.Dataset(subrid_3d.v).to(gv.Image,kdims=['lon','lat'],label='vp',dynamic=True).redim.range(u=(-20,20))\n", "wp_img=gv.Dataset(subrid_3d.v).to(gv.Image,kdims=['lon','lat'],label='wp',dynamic=True).redim.range(u=(-1,1))\n", "#pr_img=gv.Dataset(data_2d.prectot*86400).to(gv.Image,kdims=['lon','lat'],label='prectot').redim.range(prectot=(0,24))" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "
\n", "
\n", " \n", " \n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", " \n", "
\n", "
\n", " \n", "
\n", "
\n", "
\n", "
\n", "\t \n", " \n", " \n", "
\n", "
\n", "
\n", "\n", "\n", "" ], "text/plain": [ ":Layout\n", " .DynamicMap.I :DynamicMap [lev]\n", " .DynamicMap.II :DynamicMap [lev]\n", " .DynamicMap.III :DynamicMap [lev]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%%output backend='matplotlib'\n", "%%opts Image (cmap='RdBu_r') [colorbar=True]\n", "#%%opts Image (cmap='RdBu_r') [width=300 height=200 colorbar=True toolbar='above'] #for bokeh\n", "up_img*gf.coastline + vp_img*gf.coastline + wp_img*gf.coastline" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "
\n", "
\n", " \n", "
\n", "\n", "
\n", "
\n", "
\n", "
\n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", " \n", "
\n", "
\n", " \n", "
\n", "
\n", "
\n", "
\n", "\t \n", " \n", " \n", "
\n", "
\n", "
\n", "\n", "\n", "" ], "text/plain": [ ":Layout\n", " .DynamicMap.Up :DynamicMap [lev]\n", " .DynamicMap.Vp :DynamicMap [lev]\n", " .DynamicMap.Wp :DynamicMap [lev]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%%output backend='bokeh'\n", "%%opts Image (cmap='RdBu_r') [width=300 height=200 colorbar=True xaxis=None, yaxis=None toolbar='above']\n", "(up_img*gf.coastline + vp_img*gf.coastline + wp_img*gf.coastline).cols(2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "--------------------\n", "# Set up lineplots for profile interactive" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def u_plots(x,y):\n", " lon=x\n", " lat=y\n", " lvs=regrid_3d.u.sel(lat=lat,lon=lon,method='nearest').lev.values\n", " u=regrid_3d.u.sel(lat=lat,lon=lon,method='nearest').values\n", " upwp=skedot_da.upwp.sel(lat=lat,lon=lon,method='nearest').values\n", " uw=skedot_da.uw.sel(lat=lat,lon=lon,method='nearest').values\n", " udiv=skedot_da.Eddy_Tend_Zon.sel(lat=lat,lon=lon,method='nearest').values\n", " usheardiv=skedot_da.Eddy_Tend_Zon.sel(lat=lat,lon=lon,method='nearest').values*skedot_da.ushear.isel(lat=0,lon=0).values\n", " ubaro=skedot_da.ubaro.sel(lat=lat,lon=lon,method='nearest').values\n", "\n", " rho=regrid_3d.airdens.sel(lat=lat,lon=lon,method='nearest').values\n", " usheardiv_mean=np.nansum(usheardiv*rho)/np.nansum(rho)\n", "\n", " dp=lvs*100\n", " dpbyg=np.gradient(dp)/9.8\n", " skedot_zon=np.nansum(usheardiv*dpbyg)\n", "\n", " u_curve=hv.Curve((u, lvs), kdims=['U'], vdims=['pressure']).redim.range(pressure=(1000,0))\n", " u_curve=u_curve*hv.VLine(float(ubaro),label='ubaro')(style={'color':'black'})\n", "\n", " upwp_curve=hv.Curve((upwp, lvs), kdims=['UPWP[blue]-UW[red]'], vdims=['pressure']).redim.range(pressure=(1000,0))\n", " upwp_curve=upwp_curve*hv.Curve((uw,lvs),kdims=['UW[red]'],vdims=['pressure']).redim.range(pressure=(1000,0))\n", "\n", " udiv_curve=hv.Curve((udiv, lvs), kdims=['div(rhoupwp)'], vdims=['pressure']).redim.range(pressure=(1000,0))\n", "\n", " usheardiv_curve=hv.Curve((usheardiv, lvs), kdims=['div*ushear[skedot_zon='+format(skedot_zon,\"0.2f\")+']'], vdims=['pressure']).redim.range(pressure=(1000,0))\n", " usheardiv_curve=usheardiv_curve*hv.VLine(float(usheardiv_mean),label='umean')(style={'color':'black'})\n", " return (upwp_curve+udiv_curve+u_curve+usheardiv_curve)\n", " " ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def v_plots(x,y):\n", " lon=x\n", " lat=y\n", " lvs=regrid_3d.v.sel(lat=lat,lon=lon,method='nearest').lev.values\n", " v=regrid_3d.v.sel(lat=lat,lon=lon,method='nearest').values\n", " vpwp=skedot_da.vpwp.sel(lat=lat,lon=lon,method='nearest').values\n", " vw=skedot_da.vw.sel(lat=lat,lon=lon,method='nearest').values\n", " vdiv=skedot_da.Eddy_Tend_Mer.sel(lat=lat,lon=lon,method='nearest').values\n", " vsheardiv=skedot_da.Eddy_Tend_Mer.sel(lat=lat,lon=lon,method='nearest').values*skedot_da.vshear.isel(lat=0,lon=0).values\n", " vbaro=skedot_da.vbaro.sel(lat=lat,lon=lon,method='nearest').values\n", "\n", " dp=lvs*100\n", " dpbyg=np.gradient(dp)/9.8\n", " skedot_mer=np.nansum(vsheardiv*dpbyg)\n", "\n", " rho=regrid_3d.airdens.sel(lat=lat,lon=lon,method='nearest').values\n", " vsheardiv_mean=np.nansum(vsheardiv*rho)/np.nansum(rho)\n", "\n", "\n", " v_curve=hv.Curve((v, lvs), kdims=['V'], vdims=['pressure']).redim.range(pressure=(1000,0))\n", " v_curve=v_curve*hv.VLine(float(vbaro),label='vbaro')(style={'color':'black'})\n", "\n", " vpwp_curve=hv.Curve((vpwp, lvs), kdims=['VPWP[blue]-UW[red]'], vdims=['pressure']).redim.range(pressure=(1000,0))\n", " vpwp_curve=vpwp_curve*hv.Curve((vw,lvs),kdims=['UW[red]'],vdims=['pressure']).redim.range(pressure=(1000,0))\n", "\n", " vdiv_curve=hv.Curve((vdiv, lvs), kdims=['div(rhovpwp)'], vdims=['pressure']).redim.range(pressure=(1000,0))\n", "\n", " vsheardiv_curve=hv.Curve((vsheardiv, lvs), kdims=['div*vshear[skedot_mer='+format(skedot_mer,\"0.2f\")+']'], vdims=['pressure']).redim.range(pressure=(1000,0))\n", " vsheardiv_curve=vsheardiv_curve*hv.VLine(float(vsheardiv_mean),label='vbaro')(style={'color':'black'})\n", " return (vpwp_curve+vdiv_curve+v_curve+vsheardiv_curve)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def uv_plots(x,y):\n", " return u_plots(x,y)+v_plots(x,y)" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [], "source": [ "%%opts Image (cmap='RdBu_r') [width=600 height=400 colorbar=True toolbar='above' tools=['tap']]\n", "skedot_img=hv.Image(skedot_da.SKEDOT,kdims=['lon','lat']).redim.range(SKEDOT=(-1,1))\n", "tap=streams.SingleTap(source=skedot_img,x=regrid_3d.lon.values[0],y=regrid_3d.lat.values[0])\n", "pointer=streams.PointerXY(source=skedot_img,x=regrid_3d.lon.values[0],y=regrid_3d.lat.values[0])\n", "pointer_map=hv.DynamicMap(lambda x,y: hv.Points([(x,y)])(style={'size':10,'color':'black'}),streams=[pointer])" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": true }, "outputs": [], "source": [ "u_dyn_plot=hv.DynamicMap(u_plots,kdims=[],streams=[tap])\n", "v_dyn_plot=hv.DynamicMap(v_plots,kdims=[],streams=[tap])\n", "uv_dyn_plot=hv.DynamicMap(uv_plots,kdims=[],streams=[tap])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "-------------\n", "## Profiles of the quantities behind the filterscale SKEdot map" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "
\n", "
\n", "
\n", "
" ], "text/plain": [ ":DynamicMap []" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "skedot_img*pointer_map" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "
\n", "
\n", "
\n", "
" ], "text/plain": [ ":DynamicMap []" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%%opts Curve [show_grid=True]\n", "u_dyn_plot" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "
\n", "
\n", "
\n", "
" ], "text/plain": [ ":DynamicMap []" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%%opts Curve [show_grid=True]\n", "uv_dyn_plot" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" } }, "nbformat": 4, "nbformat_minor": 2 }