{
 "metadata": {
  "name": "",
  "signature": "sha256:c30ceec3e56b9d82cab60b32160c0c36decd12638151bac16354952fe943a20f"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import numpy as np\n",
      "import pandas as pd\n",
      "from bokeh.plotting import *"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 23
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Generate some synthetic time series for six different categories\n",
      "cats = list(\"abcdef\")\n",
      "y = np.random.randn(2000)\n",
      "g = np.random.choice(cats, 2000)\n",
      "for i, l in enumerate(cats):\n",
      "    y[g == l] += i // 2\n",
      "df = pd.DataFrame(dict(score=y, group=g))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 24
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Find the quartiles and IQR foor each category\n",
      "groups = df.groupby('group')\n",
      "q1 = groups.quantile(q=0.25)\n",
      "q2 = groups.quantile(q=0.5)\n",
      "q3 = groups.quantile(q=0.75)\n",
      "iqr = q3 - q1\n",
      "upper = q2 + 1.5*iqr\n",
      "lower = q2 - 1.5*iqr"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 25
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# find the outliers for each category\n",
      "def outliers(group):\n",
      "   cat = group.name\n",
      "   return group[(group.score > upper.loc[cat][0]) | (group.score < lower.loc[cat][0])]['score']\n",
      "out = groups.apply(outliers).dropna()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 26
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Prepare outlier data for plotting, we need coordinate for every outlier.\n",
      "outx = []\n",
      "outy = []\n",
      "for cat in cats:\n",
      "    # only add outliers if they exist\n",
      "    if (not out.loc[cat].empty):\n",
      "        for value in out[cat]:\n",
      "            outx.append(cat)\n",
      "            outy.append(value)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 27
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "output_notebook()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "    \n",
        "        <style>\n",
        "            /* BEGIN /Library/Python/2.7/site-packages/bokeh/server/static/css/bokeh.min.css */\n",
        "                /*! jQuery UI - v1.10.0 - 2013-01-17\n",
        "                * http://jqueryui.com\n",
        "                * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css\n",
        "                * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:\"\";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0 0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0 0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0 0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:700}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px;background-position:16px 16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;-moz-box-shadow:5px 5px 4px -4px #666;-webkit-box-shadow:2px 2px 2px #999;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;-moz-text-shadow:1px 1px 0 #fff;-webkit-text-shadow:1px 1px 0 #fff;text-shadow:1px 1px 0 #fff;-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator a,.vakata-context .vakata-context-separator a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;-moz-text-shadow:0 0 0 transparent;-webkit-text-shadow:0 0 0 transparent;text-shadow:0 0 0 transparent;-moz-box-shadow:0 0 0 transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url(\"data:image/svg+xml;utf8,<svg xmlns=\\'http://www.w3.org/2000/svg\\'><filter id=\\'jstree-grayscale\\'><feColorMatrix type=\\'matrix\\' values=\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\'/></filter></svg>#jstree-grayscale\");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:16px;height:16px}#jstree-dnd.jstree-default .jstree-ok{background-position:-9px -71px}#jstree-dnd.jstree-default .jstree-er{background-position:-39px -71px}.jstree-default>.jstree-striped{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-moz-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#beebff),color-stop(100%,#a8e4ff));background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-o-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-ms-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-anchor>.jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default .jstree-clicked>.jstree-checkbox{background-position:-228px -4px}.jstree-default .jstree-clicked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-anchor>.jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small .jstree-clicked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small .jstree-clicked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-anchor>.jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large .jstree-clicked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large .jstree-clicked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 200px}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-anchor>.jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive .jstree-clicked>.jstree-checkbox,.jstree-default-responsive .jstree-clicked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 200px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none}}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}.handsontable{position:relative}.handsontable.htAutoColumnSize{visibility:hidden;left:0;position:absolute;top:0}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable td,.handsontable th,.handsontable div{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable table.htCore{border-collapse:separate;position:relative;border-spacing:0;margin:0;border-width:0;table-layout:fixed;width:0;outline-width:0;max-width:none;max-height:none}.handsontable col{width:50px}.handsontable col.rowHeader{width:50px}.handsontable th,.handsontable td{border-right:1px solid #CCC;border-bottom:1px solid #CCC;height:22px;empty-cells:show;line-height:21px;padding:0 4px;background-color:#FFF;vertical-align:top;overflow:hidden;outline-width:0;white-space:pre-line}.handsontable td.htInvalid{-webkit-transition:background .75s ease;transition:background .75s ease;background-color:#ff4c42}.handsontable th:last-child{border-right:1px solid #CCC;border-bottom:1px solid #CCC}.handsontable tr:first-child th.htNoFrame,.handsontable th:first-child.htNoFrame,.handsontable th.htNoFrame{border-left-width:0;background-color:#fff;border-color:#FFF}.handsontable th:first-child,.handsontable td:first-child,.handsontable .htNoFrame+th,.handsontable .htNoFrame+td{border-left:1px solid #CCC}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top:1px solid #CCC}.handsontable thead tr:last-child th{border-bottom-width:0}.handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable th{background-color:#EEE;color:#222;text-align:center;font-weight:400;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#CCC}.handsontable thead th .relative{position:relative;padding:2px 4px}.handsontable .manualColumnMover{position:absolute;left:0;top:0;background-color:transparent;width:5px;height:25px;z-index:999;cursor:move}.handsontable th .manualColumnMover:hover,.handsontable th .manualColumnMover.active{background-color:#88F}.handsontable .manualColumnResizer{position:absolute;top:0;cursor:col-resize}.handsontable .manualColumnResizerHandle{background-color:transparent;width:5px;height:25px}.handsontable .manualColumnResizer:hover .manualColumnResizerHandle,.handsontable .manualColumnResizer.active .manualColumnResizerHandle{background-color:#AAB}.handsontable .manualColumnResizerLine{position:absolute;right:0;top:0;background-color:#AAB;display:none;width:0;border-right:1px dashed #777}.handsontable .manualColumnResizer.active .manualColumnResizerLine{display:block}.handsontable .columnSorting:hover{text-decoration:underline;cursor:pointer}.handsontable .wtBorder{position:absolute;font-size:0}.handsontable td.area{background-color:#EEF4FF}.handsontable .wtBorder.corner{font-size:0;cursor:crosshair}.handsontable .htBorder.htFillBorder{background:red;width:1px;height:1px}.handsontableInput{border:2px solid #5292F7;outline-width:0;margin:0;padding:1px 4px 0 2px;font-family:Arial,Helvetica,sans-serif;line-height:1.3em;font-size:inherit;-webkit-box-shadow:1px 2px 5px rgba(0,0,0,.4);box-shadow:1px 2px 5px rgba(0,0,0,.4);resize:none;display:inline-block;color:#000;border-radius:0;background-color:#FFF}.handsontableInputHolder{position:absolute;top:0;left:0;z-index:100}.htSelectEditor{-webkit-appearance:menulist-button!important;position:absolute}.handsontable .htDimmed{color:#777}.handsontable .htPlaceholder{color:#999}.handsontable .htAutocompleteArrow{float:right;font-size:10px;color:#EEE;cursor:default;width:16px;text-align:center}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htNumeric{text-align:right}ul.context-menu-list{color:#000}ul.context-menu-list li{margin-bottom:0}.handsontable .dragdealer{position:relative;width:9px;height:9px;background:#F8F8F8;border:1px solid #DDD}.handsontable .dragdealer .handle{position:absolute;width:9px;height:9px;background:#C5C5C5}.handsontable .dragdealer .disabled{background:#898989}.handsontable .handsontable .wtHider{padding:0 0 5px}.handsontable .handsontable table{-webkit-box-shadow:1px 2px 5px rgba(0,0,0,.4);box-shadow:1px 2px 5px rgba(0,0,0,.4)}.handsontable.listbox{margin:0}.handsontable.listbox table{border:1px solid #ccc;border-collapse:separate;background:#fff}.handsontable.listbox th,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th,.handsontable.listbox tr:first-child td,.handsontable.listbox td{border-width:0}.handsontable.listbox th,.handsontable.listbox td{white-space:nowrap;text-overflow:ellipsis}.handsontable.listbox td.htDimmed{cursor:default;color:inherit;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr td.current,.handsontable.listbox tr:hover td{background:#eee}.htContextMenu{display:none;position:absolute}.htContextMenu table.htCore{outline:1px solid #bbb}.htContextMenu .wtBorder{visibility:hidden}.htContextMenu table tbody tr td{background:#fff;border-width:0;padding:4px 6px 0;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.htContextMenu table tbody tr td:first-child{border:0}.htContextMenu table tbody tr td.htDimmed{font-style:normal;color:#323232}.htContextMenu table tbody tr td.current{background:#e9e9e9}.htContextMenu table tbody tr td.htSeparator{border-top:1px solid #bbb;height:0;padding:0}.htContextMenu table tbody tr td.htDisabled{color:#999}.htContextMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.wtDebugHidden{display:none}.wtDebugVisible{display:block;-webkit-animation-duration:.5s;-webkit-animation-name:wtFadeInFromNone;animation-duration:.5s;animation-name:wtFadeInFromNone}@keyframes wtFadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}100%{display:block;opacity:1}}@-webkit-keyframes wtFadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}100%{display:block;opacity:1}}.ui-rangeSlider{height:22px}.ui-rangeSlider .ui-rangeSlider-innerBar{height:16px;margin:3px 6px;background:#DDD}.ui-rangeSlider .ui-rangeSlider-handle{width:6px;height:22px;background:#AAA;background:rgba(100,100,100,.3);cursor:col-resize}.ui-rangeSlider .ui-rangeSlider-bar{margin:1px 0;background:#CCC;background:rgba(100,100,150,.2);height:20px;cursor:move;cursor:grab;cursor:-moz-grab}.ui-rangeSlider .ui-rangeSlider-bar.ui-draggable-dragging{cursor:-moz-grabbing;cursor:grabbing}.ui-rangeSlider-arrow{height:16px;margin:2px 0;width:16px;background-repeat:no-repeat}.ui-rangeSlider-arrow.ui-rangeSlider-leftArrow{background-image:url(icons-classic/resultset_previous.png);background-position:center left}.ui-rangeSlider-arrow.ui-rangeSlider-rightArrow{background-image:url(icons-classic/resultset_next.png);background-position:center right}.ui-rangeSlider-arrow-inner{display:none}.ui-rangeSlider-container{height:22px}.ui-rangeSlider-withArrows .ui-rangeSlider-container{margin:0 11px}.ui-rangeSlider-noArrow .ui-rangeSlider-container{margin:0}.ui-rangeSlider-label{margin:0 2px 2px;background-image:url(icons-classic/label.png);background-position:bottom center;background-repeat:no-repeat;white-space:nowrap;bottom:20px;padding:3px 6px 7px;cursor:col-resize}.ui-rangeSlider-label-inner{display:none}input.ui-editRangeSlider-inputValue{width:3em;vertical-align:middle;text-align:center}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(\"data:image/png;base64,[encoded data, 4164 characters]\")}.jstree-default .jstree-last{background:0 0}.ui-rangeSlider-arrow.ui-rangeSlider-leftArrow{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAPpJREFUeNrE0zFqhVAUBFCL7ElEEBQsXmErWtnZWImF2Gih6FNEfKCoBGMMUQhEULKjrCF1JjsI+j8kxbSnuDOXA8DdE+5PgLIsM0rp100ApTRL0/Q7DENcBpIkqfq+x3Ec8DzvGhBF0VPTNNj3Hdu2wbbt80AQBK+MMez7jnmesa4rTNM8B/i+/1mWJbZtwziOYIxhmiZomnYOcBznI45jLMuCtm2R5zm6rgMh5BxgGMaDruvvrutiGAZkWYa6rqGq6rUjEkLebNtGVVUoigKyLF+vUVGUF8uykCQJJEnCTUMSRfHZMAyIooibp8zz/KMgCPi/Z/otPwMAtKTYr7dLeeEAAAAASUVORK5CYII=\")}.ui-rangeSlider-arrow.ui-rangeSlider-rightArrow{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAPlJREFUeNrE0ztqhlAUBOC/yLoUfKBga2WpKBYKgp21+ncRuYrPK0FtxBRCQCwsXEvWkDqTLagJpJj2K+aceQB4/CaPPwcopV9t2z5vA13XoWmab0LI8xZQliWO48AwDAjD8PUykCQJ9n3Htm3Isgye53WXgDiOsa4r5nnGsiyIogiapo2ngSAIsCwL2rYFpRTjOML3fSiK8nkKcF0X0zSBEII8z0EpheM4kGX54xSg6zr6vkeapqiqCrZtQxTFd5ZlX04BqqqirmsURQHLsiAIwnSpREVRQAiBaZrgOK6/fEZJkmAYBliWfbv1SDzPg2GY5v/GdDU/AwDyYNzeUSg0WgAAAABJRU5ErkJggg==\")}.ui-rangeSlider-label{background-image:url(\"data:image/png;base64,[encoded data, 12460 characters]\")}.tableelem{padding:2px 10px;border:2px #fff;background-color:#E0E0E0}.tableheader{background-color:silver}.bokehtable table tr td{padding:2px}.bokehtable form table tr td{padding:2px}.bokehtable form table tr td input{padding:0}.plotarea:after,.bokeh_canvas_wrapper_outer:after,.bokeh_canvas_wrapper:after{content:\" \";height:0;display:block;clear:both}.bokeh_canvas_wrapper .resize_bokeh_plot{position:absolute;right:40px;bottom:40px;width:40px;height:40px;padding:10px 0 0 10px;overflow:hidden;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAEnSURBVEiJzZXBioQwDIb/XQuF6U3wCRSEvv8zeFOoB2++QD14aqHSOntYtthxdHesDptTk4Z+hKR/PqqquuNi+7wa8DYIWTplWSJN0yDBGAMhBJxzhyFBJY8AACCErGKv2u4L1lp0XRdVBfBLTwghuN1uUYBNiDHGn4uiQJZl50GmaYJSCm3bou/700BBT4QQAL57IaUEAOR57kEAMAxDHMRaG1wuQc45aK1fBqwgz+wHpJSCUuoayBJ01P6/djHG/jR1hzWDMQbOuZedvak7XAljzAMe/xGlFEmSeP9wJVv/SGsNzjmcc2iaJg6yBbLWghASqHf0dEkpAwl6thpOGWGl1O46iIZQSsE5Dxp9OsQ5h3meV/FxHP05erdaa1HX9W7OW2TlC31ceRWbb5+AAAAAAElFTkSuQmCC);background-position:bottom right;background-repeat:no-repeat;cursor:se-resize}.bokeh_canvas_wrapper:hover .resize_bokeh_plot{display:block}.bk-sidebar{float:left;padding:0;position:relative}.bk-sidebar .bk-logo{margin:0 auto;float:none;clear:both}.bk-logo{display:block;float:left;background-repeat:no-repeat}.bk-logo-notebook{margin-right:10px}.bk-logo-small{width:20px;height:20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAPDSURBVDiNjZRbbFRVFIa/tc+ZOQM9pRe5VKoUQbBcDBchIkFKCJZEGy2EENSY+KBp4UEND5p4xUAiEp80MWo0gmLFiFI0RhMChoQoGiJyE01UelHahplymWnPnJlz9vKhTKOBgvtpJ3utb/97rX8vuN6yR4W25ndpa+6mrXnJ9cLlmqfPzKthes2bjE6tQhXgLPAkD7Xv/l/AL45RDbQYYbqfIP/wN3c0/F0+cQZ+AqwFFEwccnb2ZqKbO5hck8Z1D7H6gYESwy1t9v3C6KBIO3A3QDFmMCZ5noQDqiAKJjhM75wspm4LN1YOJRaLP7FrdxPr1vQAmBIwjFkgMgRTIAHf90Zlx4eutEDwBl2Ne0jNXUzteBjlcbkM8xGeukLhoS6q5k8A34PIgi+cxCubgpBHBh8jvfEvarJfMsotw1qwerloCnBLiTOscErWqevMDKkTgayaLrzUQQwNrNv3EWPtKcaklhLbe7HRBjTchkZfo5pB4ux/mlLY7t/jqLR9ksqfTE8qLppWQSqMZHXzXN1ztU7O+KBnQxjkG/MD+VEFG84sxnEYnAuXF15b3CWF7f4c4CuBWjeSw1uqc+231ummcWU0rKjnx6sB63d33a6qR1EcjSEKY1TtATdlmgywA6hVIHZ10fMZv+6UZVUuoOdqMIBf10w60V87rgkRjAOe7+L5yeXGmD0GOIgMVdMKRAldv/nomMrmeXSPBNy64PUbnl28nsHKsletMdjYoqogstKQZ6MGtl3zMVhFBYqe/biww79zJKDnemMHZ9a3Nz364sBAlX9AHQegH3SFSbbm4uKxsDXu0hNxd9xn04X95It7xS0uHwlYCHO1iTLfm2DKX1q4+R2Jk4lLakzLb2sn7x/+eufXTNsqjm3VmB+I5DiGP8WznZJwe9Cgp+LD7t5M1fpZftB337ZZS9OO8p7jOPT2ddB5U+XLn3/3wib4l7HFteVAhSS0kYQ2AmAEWwhCm+xb25/aCAzsDDV3JHDkkB8pqKW6agKc/r2jxBk2NqIdl10/5GwR4kI2X0wHr/Bp6114ub2ilIfxOU3F0TwVwVpLwk1SM3X2hRJmWKGqvi8i9yOyRKOYODuI7R17xD3duAwvWIYANiQntt5RqSjNKVU9ZoRvrwBW7TqTvvjI1BUasTS6eGm8Zqomun80PIcXVCAWERcbDxCKLcQmudPROAV0gr719JEnLg4/dKROAvSPaVmJsW8DdSKGQjGz70LuQMtt9J8ZKefaExvIVD4+V+AzVH8eXb3wwdSZlsK14v8BfriiZcJWbEcAAAAASUVORK5CYII=)}.bk-logo-medium{width:35px;height:35px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAf9SURBVFiFvZh7cFTVHcc/59y7793sJiFAwkvAYDRqFWwdraLVlj61diRYsDjqCFbFKrYo0CltlSq1tLaC2GprGIriGwqjFu10OlrGv8RiK/IICYECSWBDkt3s695zTv9IAtlHeOn0O7Mzu797z+/3Ob/z+p0VfBq9doNFljuABwAXw2PcvGHt6bgwxhz7Ls4YZNVXxxANLENwE2D1W9PAGmAhszZ0/X9gll5yCbHoOirLzmaQs0F6F8QMZq1v/8xgNm7DYwwjgXJLYL4witQ16+sv/U9HdDmV4WrKw6B06cZC/RMrM4MZ7xz61DAbtzEXmAvUAX4pMOVecg9/MFFu3j3Gz7gQBLygS2RGumBkL0cubiFRsR3LzVBV1UMk3IrW73PT9C2lYOwhQB4ClhX1AuKpjLcV27oEjyUpNUJCg1CvcejykWTCXyQgzic2HIIBjg3pS6+uRLKAhumZvD4U+tq0jTrgkVKQQtLekfTtxIPAkhTNF6G7kZm7aPp6M9myKVQEoaYaIhEQYvD781DML/RfBGNZXAl4irJiwBa07e/y7cQnBaJghIX6ENl2GR/fGCBoz6cm5qeyEqQA5ZYA5x5eeiV0Qph4gjFAUSwAr6QllQgcxS/Jm25Cr2Tmpsk03XI9NfI31FTZBEOgVOk51adqDBNPCNPSRlkiDXbBEwOU2WxH+I7itQZ62g56OjM33suq1YsZHVtGZSUI2QdyYgkgOthQNIF7BIGDnRAJgJSgj69cUx1gB8PkOGwL4E1gPrM27gIg7NlGKLQApc7BmEnAxP5g/rw4YqBrCDB5xHkw5rdR/1qTrN/hKNo6YUwVDNpFsnjYS8RbidBPcPXFP6R6yfExuOXmN4A3jv1+8ZUwgY9D2OWjUZE6lO88jDwHI8ZixGiMKSeYTBamCoDk6kDAb6y1OcH1a6KpD/fZesoFw5FlIXAVCIiH4PxrV+p2npVDToTBmtjY8t1swh2V61E9KqWiyuPEjM8dbfxuvfa49Zayf9R136Wr8mBSf/T7bNteA8zwaGEUbFpckWwq95n59dUIywKl2fbOIS5e8bWSu0tJ1a5redAYfqkdjesodFajcgaVNWhXo1C9SrkN3Usmv3UMJrc6/DDwkwEntkEJLe67tSLhvyzK8rHDQWleve5CGk4VZEB1r+5bg2E2si+Y0QatDK6jUVkX5eg2YYlp++ZM+rfMNYamAj8Y7MAVWFqaR1f/t2xzU4IHjybBtthzuiAASqv7jTF7jOqDMAakFHgDNsFyP+FhwZHBmH9F7cutIYkQCylYYv1AZSqsn1/+bX51OMMjPSl2nAnM7hnjOx2v53YgNWAzHM9Q/9l0lQWPSCBSyokAtOBC1Rj+w/1Xs+STDp4/E5g7Rs2zm2+oeVd7PUuHKDf6A4r5EsPT5K3gfCnBXNUYnvGzb+KcCczYYWOnLpy4eOXuG2oec0PBN8XQQAnpvS35AvAykr56rWhPBiV4MvtceGLxk5Mr6A1O8IfK7rl7xJ0r9kyumuP4fa0lMqTBLJIAJqEf1J3qE92lMBndlyfRD2YBghHC4hlny7ASqCeWo5zaoDdIWfnIefNGTb9fC73QDfhyBUCNOxrGPSUBfPem9us253YTV+3mcBbdkUYfzmHiLqZbYdIGHHON2ZlemXouaJUOO6TqtdHEQuXYY8Yt+EbDgmlS6RdzkaDTv2P9A3gICiq93sWhb5mc5wVhuU3Y7m5hOc3So7qFT3SLgOXHb/cyOfMn7xROegoC/PTcn3v8gbKPgDopJFk3R/uBPWQiwQ+2/GJevRMObLUzqe/saJjQUQTTftEVMW9tWxPgAocwcj9abNcZe7s+6t2R2xXZG7zyYLp8Q1PiRBBHym5bYuXi8Qt+/LvGu9f/5YDAxABsaRNPH6Xr4D4Sk87a897SOy9v/fKwjoF2eQel95yDESGEF6gEMwKhLwKus3wOVjTtes7qzgLdXTMnNCNoEpbcrtNuq6N7Xh/+eqcbj94xQkp7mdKpW5XbtbR8Z26kgMCAf2UU5YEovRUVRHbu2b3vK1UdDFkDCyMRQxbpdv8nhKAGIa7QaQedzT07fFPny53R738JoVYBdVrnsNx9XZ9v33UeGO+AA2MMUkgqQ5UcdDLZSFeVgONnXeHqSAC5Ew1BXwko0D1Zct3dT1duOjS3MzZnEUJtBuoQAq3SGOLR4ekjn9NC5nVOaYXf9lETrUkmOJy3pOz8OKIb2A1cWhJCCEzOxU2mUPror+2/L3yyM3pkM7jTjr1nBOgkGeyQ7erxpdJsMAS9wb2F9rzMxNY1K2PMU0WtZV82VU8Wp6vbKJVo9Lx/+4cydORdxCCQ/kDGTZCWsRpLu7VD7bfKqL8V2orKTp/PtzaXy42jr6TwAuisi+7JolUG4wY+8vyrISCMtRrLKWpvjAOqx/QGhp0rjRo5xD3x98CWQuOQN8qumRMmI7jKZPUEpzNVZsj4Zbaq1to5tZZsKIydLWojhIXrJnES79EaOzv3du2NytKuxzJKAA6wF8xqEE8s2jo/1wd/khslQGxd81Zg62Bbp31XBH+iETt7Y3ELA0iU6iGDlQ5mexe0VEx4a3x8V1AaYwFJgTiwaOsDmeK2J8nMUOqsnB1A+dcA04ucCYt0urkjmflk9iT2v30q/gZn5rQPvor4n9Ou634PeBzoznes/iot/7WnClKoM/+zCIjH5kwT8ChQjTHPIPTjFV3PpU/Hx+DM/A9U3IXI4SPCYAAAAABJRU5ErkJggg==)}.bk-logo-large{width:75px;height:75px;background-image:url(data:image/png;base64,[encoded data, 6760 characters])}.bk-button-bar>.bk-toolbar-button{width:48px;height:40px;margin:8px 0!important;position:relative;display:block;overflow:visible;clear:both;border-radius:3px!important;-moz-border-radius:3px!important;-webkit-border-radius:3px!important;background-color:#C6C6C6}.bk-button-bar>.bk-toolbar-button:hover{background-color:#A8A8A8;cursor:pointer}.bk-button-bar>.bk-toolbar-button.active{background-color:#A8A8A8}.bk-toolbar-button>.bk-btn-icon{width:28px;height:28px;margin:0!important;border:0!important;background:transparent!important;display:block;position:relative;z-index:10}.bk-toolbar-button>span.tip{position:absolute;top:0;left:100%;transition:all .6s ease;-webkit-transition:all .6s ease;-moz-transition:all .6s ease;-o-transition:all .6s ease;height:inherit;z-index:-1;line-height:36px;font-family:Helvetica,sans-serif;font-size:0;white-space:nowrap}.bk-toolbar-button:hover>span.tip{left:60px;z-index:20;font-size:125%}.slides .bokeh_canvas_wrapper_outer{overflow:visible}.slides canvas{left:0;top:0}.slides .bk-sidebar{float:right}.slides .bk-toolbar-button>span.tip{color:#fff}.bk-bs-container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.bk-bs-container{width:750px}}@media (min-width:992px){.bk-bs-container{width:970px}}@media (min-width:1200px){.bk-bs-container{width:1170px}}.bk-bs-container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.bk-bs-row{margin-left:-15px;margin-right:-15px}.bk-bs-col-xs-1,.bk-bs-col-sm-1,.bk-bs-col-md-1,.bk-bs-col-lg-1,.bk-bs-col-xs-2,.bk-bs-col-sm-2,.bk-bs-col-md-2,.bk-bs-col-lg-2,.bk-bs-col-xs-3,.bk-bs-col-sm-3,.bk-bs-col-md-3,.bk-bs-col-lg-3,.bk-bs-col-xs-4,.bk-bs-col-sm-4,.bk-bs-col-md-4,.bk-bs-col-lg-4,.bk-bs-col-xs-5,.bk-bs-col-sm-5,.bk-bs-col-md-5,.bk-bs-col-lg-5,.bk-bs-col-xs-6,.bk-bs-col-sm-6,.bk-bs-col-md-6,.bk-bs-col-lg-6,.bk-bs-col-xs-7,.bk-bs-col-sm-7,.bk-bs-col-md-7,.bk-bs-col-lg-7,.bk-bs-col-xs-8,.bk-bs-col-sm-8,.bk-bs-col-md-8,.bk-bs-col-lg-8,.bk-bs-col-xs-9,.bk-bs-col-sm-9,.bk-bs-col-md-9,.bk-bs-col-lg-9,.bk-bs-col-xs-10,.bk-bs-col-sm-10,.bk-bs-col-md-10,.bk-bs-col-lg-10,.bk-bs-col-xs-11,.bk-bs-col-sm-11,.bk-bs-col-md-11,.bk-bs-col-lg-11,.bk-bs-col-xs-12,.bk-bs-col-sm-12,.bk-bs-col-md-12,.bk-bs-col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.bk-bs-col-xs-1,.bk-bs-col-xs-2,.bk-bs-col-xs-3,.bk-bs-col-xs-4,.bk-bs-col-xs-5,.bk-bs-col-xs-6,.bk-bs-col-xs-7,.bk-bs-col-xs-8,.bk-bs-col-xs-9,.bk-bs-col-xs-10,.bk-bs-col-xs-11,.bk-bs-col-xs-12{float:left}.bk-bs-col-xs-12{width:100%}.bk-bs-col-xs-11{width:91.66666667%}.bk-bs-col-xs-10{width:83.33333333%}.bk-bs-col-xs-9{width:75%}.bk-bs-col-xs-8{width:66.66666667%}.bk-bs-col-xs-7{width:58.33333333%}.bk-bs-col-xs-6{width:50%}.bk-bs-col-xs-5{width:41.66666667%}.bk-bs-col-xs-4{width:33.33333333%}.bk-bs-col-xs-3{width:25%}.bk-bs-col-xs-2{width:16.66666667%}.bk-bs-col-xs-1{width:8.33333333%}.bk-bs-col-xs-pull-12{right:100%}.bk-bs-col-xs-pull-11{right:91.66666667%}.bk-bs-col-xs-pull-10{right:83.33333333%}.bk-bs-col-xs-pull-9{right:75%}.bk-bs-col-xs-pull-8{right:66.66666667%}.bk-bs-col-xs-pull-7{right:58.33333333%}.bk-bs-col-xs-pull-6{right:50%}.bk-bs-col-xs-pull-5{right:41.66666667%}.bk-bs-col-xs-pull-4{right:33.33333333%}.bk-bs-col-xs-pull-3{right:25%}.bk-bs-col-xs-pull-2{right:16.66666667%}.bk-bs-col-xs-pull-1{right:8.33333333%}.bk-bs-col-xs-pull-0{right:0}.bk-bs-col-xs-push-12{left:100%}.bk-bs-col-xs-push-11{left:91.66666667%}.bk-bs-col-xs-push-10{left:83.33333333%}.bk-bs-col-xs-push-9{left:75%}.bk-bs-col-xs-push-8{left:66.66666667%}.bk-bs-col-xs-push-7{left:58.33333333%}.bk-bs-col-xs-push-6{left:50%}.bk-bs-col-xs-push-5{left:41.66666667%}.bk-bs-col-xs-push-4{left:33.33333333%}.bk-bs-col-xs-push-3{left:25%}.bk-bs-col-xs-push-2{left:16.66666667%}.bk-bs-col-xs-push-1{left:8.33333333%}.bk-bs-col-xs-push-0{left:0}.bk-bs-col-xs-offset-12{margin-left:100%}.bk-bs-col-xs-offset-11{margin-left:91.66666667%}.bk-bs-col-xs-offset-10{margin-left:83.33333333%}.bk-bs-col-xs-offset-9{margin-left:75%}.bk-bs-col-xs-offset-8{margin-left:66.66666667%}.bk-bs-col-xs-offset-7{margin-left:58.33333333%}.bk-bs-col-xs-offset-6{margin-left:50%}.bk-bs-col-xs-offset-5{margin-left:41.66666667%}.bk-bs-col-xs-offset-4{margin-left:33.33333333%}.bk-bs-col-xs-offset-3{margin-left:25%}.bk-bs-col-xs-offset-2{margin-left:16.66666667%}.bk-bs-col-xs-offset-1{margin-left:8.33333333%}.bk-bs-col-xs-offset-0{margin-left:0}@media (min-width:768px){.bk-bs-col-sm-1,.bk-bs-col-sm-2,.bk-bs-col-sm-3,.bk-bs-col-sm-4,.bk-bs-col-sm-5,.bk-bs-col-sm-6,.bk-bs-col-sm-7,.bk-bs-col-sm-8,.bk-bs-col-sm-9,.bk-bs-col-sm-10,.bk-bs-col-sm-11,.bk-bs-col-sm-12{float:left}.bk-bs-col-sm-12{width:100%}.bk-bs-col-sm-11{width:91.66666667%}.bk-bs-col-sm-10{width:83.33333333%}.bk-bs-col-sm-9{width:75%}.bk-bs-col-sm-8{width:66.66666667%}.bk-bs-col-sm-7{width:58.33333333%}.bk-bs-col-sm-6{width:50%}.bk-bs-col-sm-5{width:41.66666667%}.bk-bs-col-sm-4{width:33.33333333%}.bk-bs-col-sm-3{width:25%}.bk-bs-col-sm-2{width:16.66666667%}.bk-bs-col-sm-1{width:8.33333333%}.bk-bs-col-sm-pull-12{right:100%}.bk-bs-col-sm-pull-11{right:91.66666667%}.bk-bs-col-sm-pull-10{right:83.33333333%}.bk-bs-col-sm-pull-9{right:75%}.bk-bs-col-sm-pull-8{right:66.66666667%}.bk-bs-col-sm-pull-7{right:58.33333333%}.bk-bs-col-sm-pull-6{right:50%}.bk-bs-col-sm-pull-5{right:41.66666667%}.bk-bs-col-sm-pull-4{right:33.33333333%}.bk-bs-col-sm-pull-3{right:25%}.bk-bs-col-sm-pull-2{right:16.66666667%}.bk-bs-col-sm-pull-1{right:8.33333333%}.bk-bs-col-sm-pull-0{right:0}.bk-bs-col-sm-push-12{left:100%}.bk-bs-col-sm-push-11{left:91.66666667%}.bk-bs-col-sm-push-10{left:83.33333333%}.bk-bs-col-sm-push-9{left:75%}.bk-bs-col-sm-push-8{left:66.66666667%}.bk-bs-col-sm-push-7{left:58.33333333%}.bk-bs-col-sm-push-6{left:50%}.bk-bs-col-sm-push-5{left:41.66666667%}.bk-bs-col-sm-push-4{left:33.33333333%}.bk-bs-col-sm-push-3{left:25%}.bk-bs-col-sm-push-2{left:16.66666667%}.bk-bs-col-sm-push-1{left:8.33333333%}.bk-bs-col-sm-push-0{left:0}.bk-bs-col-sm-offset-12{margin-left:100%}.bk-bs-col-sm-offset-11{margin-left:91.66666667%}.bk-bs-col-sm-offset-10{margin-left:83.33333333%}.bk-bs-col-sm-offset-9{margin-left:75%}.bk-bs-col-sm-offset-8{margin-left:66.66666667%}.bk-bs-col-sm-offset-7{margin-left:58.33333333%}.bk-bs-col-sm-offset-6{margin-left:50%}.bk-bs-col-sm-offset-5{margin-left:41.66666667%}.bk-bs-col-sm-offset-4{margin-left:33.33333333%}.bk-bs-col-sm-offset-3{margin-left:25%}.bk-bs-col-sm-offset-2{margin-left:16.66666667%}.bk-bs-col-sm-offset-1{margin-left:8.33333333%}.bk-bs-col-sm-offset-0{margin-left:0}}@media (min-width:992px){.bk-bs-col-md-1,.bk-bs-col-md-2,.bk-bs-col-md-3,.bk-bs-col-md-4,.bk-bs-col-md-5,.bk-bs-col-md-6,.bk-bs-col-md-7,.bk-bs-col-md-8,.bk-bs-col-md-9,.bk-bs-col-md-10,.bk-bs-col-md-11,.bk-bs-col-md-12{float:left}.bk-bs-col-md-12{width:100%}.bk-bs-col-md-11{width:91.66666667%}.bk-bs-col-md-10{width:83.33333333%}.bk-bs-col-md-9{width:75%}.bk-bs-col-md-8{width:66.66666667%}.bk-bs-col-md-7{width:58.33333333%}.bk-bs-col-md-6{width:50%}.bk-bs-col-md-5{width:41.66666667%}.bk-bs-col-md-4{width:33.33333333%}.bk-bs-col-md-3{width:25%}.bk-bs-col-md-2{width:16.66666667%}.bk-bs-col-md-1{width:8.33333333%}.bk-bs-col-md-pull-12{right:100%}.bk-bs-col-md-pull-11{right:91.66666667%}.bk-bs-col-md-pull-10{right:83.33333333%}.bk-bs-col-md-pull-9{right:75%}.bk-bs-col-md-pull-8{right:66.66666667%}.bk-bs-col-md-pull-7{right:58.33333333%}.bk-bs-col-md-pull-6{right:50%}.bk-bs-col-md-pull-5{right:41.66666667%}.bk-bs-col-md-pull-4{right:33.33333333%}.bk-bs-col-md-pull-3{right:25%}.bk-bs-col-md-pull-2{right:16.66666667%}.bk-bs-col-md-pull-1{right:8.33333333%}.bk-bs-col-md-pull-0{right:0}.bk-bs-col-md-push-12{left:100%}.bk-bs-col-md-push-11{left:91.66666667%}.bk-bs-col-md-push-10{left:83.33333333%}.bk-bs-col-md-push-9{left:75%}.bk-bs-col-md-push-8{left:66.66666667%}.bk-bs-col-md-push-7{left:58.33333333%}.bk-bs-col-md-push-6{left:50%}.bk-bs-col-md-push-5{left:41.66666667%}.bk-bs-col-md-push-4{left:33.33333333%}.bk-bs-col-md-push-3{left:25%}.bk-bs-col-md-push-2{left:16.66666667%}.bk-bs-col-md-push-1{left:8.33333333%}.bk-bs-col-md-push-0{left:0}.bk-bs-col-md-offset-12{margin-left:100%}.bk-bs-col-md-offset-11{margin-left:91.66666667%}.bk-bs-col-md-offset-10{margin-left:83.33333333%}.bk-bs-col-md-offset-9{margin-left:75%}.bk-bs-col-md-offset-8{margin-left:66.66666667%}.bk-bs-col-md-offset-7{margin-left:58.33333333%}.bk-bs-col-md-offset-6{margin-left:50%}.bk-bs-col-md-offset-5{margin-left:41.66666667%}.bk-bs-col-md-offset-4{margin-left:33.33333333%}.bk-bs-col-md-offset-3{margin-left:25%}.bk-bs-col-md-offset-2{margin-left:16.66666667%}.bk-bs-col-md-offset-1{margin-left:8.33333333%}.bk-bs-col-md-offset-0{margin-left:0}}@media (min-width:1200px){.bk-bs-col-lg-1,.bk-bs-col-lg-2,.bk-bs-col-lg-3,.bk-bs-col-lg-4,.bk-bs-col-lg-5,.bk-bs-col-lg-6,.bk-bs-col-lg-7,.bk-bs-col-lg-8,.bk-bs-col-lg-9,.bk-bs-col-lg-10,.bk-bs-col-lg-11,.bk-bs-col-lg-12{float:left}.bk-bs-col-lg-12{width:100%}.bk-bs-col-lg-11{width:91.66666667%}.bk-bs-col-lg-10{width:83.33333333%}.bk-bs-col-lg-9{width:75%}.bk-bs-col-lg-8{width:66.66666667%}.bk-bs-col-lg-7{width:58.33333333%}.bk-bs-col-lg-6{width:50%}.bk-bs-col-lg-5{width:41.66666667%}.bk-bs-col-lg-4{width:33.33333333%}.bk-bs-col-lg-3{width:25%}.bk-bs-col-lg-2{width:16.66666667%}.bk-bs-col-lg-1{width:8.33333333%}.bk-bs-col-lg-pull-12{right:100%}.bk-bs-col-lg-pull-11{right:91.66666667%}.bk-bs-col-lg-pull-10{right:83.33333333%}.bk-bs-col-lg-pull-9{right:75%}.bk-bs-col-lg-pull-8{right:66.66666667%}.bk-bs-col-lg-pull-7{right:58.33333333%}.bk-bs-col-lg-pull-6{right:50%}.bk-bs-col-lg-pull-5{right:41.66666667%}.bk-bs-col-lg-pull-4{right:33.33333333%}.bk-bs-col-lg-pull-3{right:25%}.bk-bs-col-lg-pull-2{right:16.66666667%}.bk-bs-col-lg-pull-1{right:8.33333333%}.bk-bs-col-lg-pull-0{right:0}.bk-bs-col-lg-push-12{left:100%}.bk-bs-col-lg-push-11{left:91.66666667%}.bk-bs-col-lg-push-10{left:83.33333333%}.bk-bs-col-lg-push-9{left:75%}.bk-bs-col-lg-push-8{left:66.66666667%}.bk-bs-col-lg-push-7{left:58.33333333%}.bk-bs-col-lg-push-6{left:50%}.bk-bs-col-lg-push-5{left:41.66666667%}.bk-bs-col-lg-push-4{left:33.33333333%}.bk-bs-col-lg-push-3{left:25%}.bk-bs-col-lg-push-2{left:16.66666667%}.bk-bs-col-lg-push-1{left:8.33333333%}.bk-bs-col-lg-push-0{left:0}.bk-bs-col-lg-offset-12{margin-left:100%}.bk-bs-col-lg-offset-11{margin-left:91.66666667%}.bk-bs-col-lg-offset-10{margin-left:83.33333333%}.bk-bs-col-lg-offset-9{margin-left:75%}.bk-bs-col-lg-offset-8{margin-left:66.66666667%}.bk-bs-col-lg-offset-7{margin-left:58.33333333%}.bk-bs-col-lg-offset-6{margin-left:50%}.bk-bs-col-lg-offset-5{margin-left:41.66666667%}.bk-bs-col-lg-offset-4{margin-left:33.33333333%}.bk-bs-col-lg-offset-3{margin-left:25%}.bk-bs-col-lg-offset-2{margin-left:16.66666667%}.bk-bs-col-lg-offset-1{margin-left:8.33333333%}.bk-bs-col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.bk-bs-table{width:100%;margin-bottom:20px}.bk-bs-table>thead>tr>th,.bk-bs-table>tbody>tr>th,.bk-bs-table>tfoot>tr>th,.bk-bs-table>thead>tr>td,.bk-bs-table>tbody>tr>td,.bk-bs-table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.bk-bs-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.bk-bs-table>caption+thead>tr:first-child>th,.bk-bs-table>colgroup+thead>tr:first-child>th,.bk-bs-table>thead:first-child>tr:first-child>th,.bk-bs-table>caption+thead>tr:first-child>td,.bk-bs-table>colgroup+thead>tr:first-child>td,.bk-bs-table>thead:first-child>tr:first-child>td{border-top:0}.bk-bs-table>tbody+tbody{border-top:2px solid #ddd}.bk-bs-table .bk-bs-table{background-color:#fff}.bk-bs-table-condensed>thead>tr>th,.bk-bs-table-condensed>tbody>tr>th,.bk-bs-table-condensed>tfoot>tr>th,.bk-bs-table-condensed>thead>tr>td,.bk-bs-table-condensed>tbody>tr>td,.bk-bs-table-condensed>tfoot>tr>td{padding:5px}.bk-bs-table-bordered{border:1px solid #ddd}.bk-bs-table-bordered>thead>tr>th,.bk-bs-table-bordered>tbody>tr>th,.bk-bs-table-bordered>tfoot>tr>th,.bk-bs-table-bordered>thead>tr>td,.bk-bs-table-bordered>tbody>tr>td,.bk-bs-table-bordered>tfoot>tr>td{border:1px solid #ddd}.bk-bs-table-bordered>thead>tr>th,.bk-bs-table-bordered>thead>tr>td{border-bottom-width:2px}.bk-bs-table-striped>tbody>tr:nth-child(odd)>td,.bk-bs-table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.bk-bs-table-hover>tbody>tr:hover>td,.bk-bs-table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.bk-bs-table>thead>tr>td.active,.bk-bs-table>tbody>tr>td.active,.bk-bs-table>tfoot>tr>td.active,.bk-bs-table>thead>tr>th.active,.bk-bs-table>tbody>tr>th.active,.bk-bs-table>tfoot>tr>th.active,.bk-bs-table>thead>tr.active>td,.bk-bs-table>tbody>tr.active>td,.bk-bs-table>tfoot>tr.active>td,.bk-bs-table>thead>tr.active>th,.bk-bs-table>tbody>tr.active>th,.bk-bs-table>tfoot>tr.active>th{background-color:#f5f5f5}.bk-bs-table-hover>tbody>tr>td.active:hover,.bk-bs-table-hover>tbody>tr>th.active:hover,.bk-bs-table-hover>tbody>tr.active:hover>td,.bk-bs-table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.bk-bs-table>thead>tr>td.success,.bk-bs-table>tbody>tr>td.success,.bk-bs-table>tfoot>tr>td.success,.bk-bs-table>thead>tr>th.success,.bk-bs-table>tbody>tr>th.success,.bk-bs-table>tfoot>tr>th.success,.bk-bs-table>thead>tr.success>td,.bk-bs-table>tbody>tr.success>td,.bk-bs-table>tfoot>tr.success>td,.bk-bs-table>thead>tr.success>th,.bk-bs-table>tbody>tr.success>th,.bk-bs-table>tfoot>tr.success>th{background-color:#dff0d8}.bk-bs-table-hover>tbody>tr>td.success:hover,.bk-bs-table-hover>tbody>tr>th.success:hover,.bk-bs-table-hover>tbody>tr.success:hover>td,.bk-bs-table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.bk-bs-table>thead>tr>td.info,.bk-bs-table>tbody>tr>td.info,.bk-bs-table>tfoot>tr>td.info,.bk-bs-table>thead>tr>th.info,.bk-bs-table>tbody>tr>th.info,.bk-bs-table>tfoot>tr>th.info,.bk-bs-table>thead>tr.info>td,.bk-bs-table>tbody>tr.info>td,.bk-bs-table>tfoot>tr.info>td,.bk-bs-table>thead>tr.info>th,.bk-bs-table>tbody>tr.info>th,.bk-bs-table>tfoot>tr.info>th{background-color:#d9edf7}.bk-bs-table-hover>tbody>tr>td.info:hover,.bk-bs-table-hover>tbody>tr>th.info:hover,.bk-bs-table-hover>tbody>tr.info:hover>td,.bk-bs-table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.bk-bs-table>thead>tr>td.warning,.bk-bs-table>tbody>tr>td.warning,.bk-bs-table>tfoot>tr>td.warning,.bk-bs-table>thead>tr>th.warning,.bk-bs-table>tbody>tr>th.warning,.bk-bs-table>tfoot>tr>th.warning,.bk-bs-table>thead>tr.warning>td,.bk-bs-table>tbody>tr.warning>td,.bk-bs-table>tfoot>tr.warning>td,.bk-bs-table>thead>tr.warning>th,.bk-bs-table>tbody>tr.warning>th,.bk-bs-table>tfoot>tr.warning>th{background-color:#fcf8e3}.bk-bs-table-hover>tbody>tr>td.warning:hover,.bk-bs-table-hover>tbody>tr>th.warning:hover,.bk-bs-table-hover>tbody>tr.warning:hover>td,.bk-bs-table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.bk-bs-table>thead>tr>td.danger,.bk-bs-table>tbody>tr>td.danger,.bk-bs-table>tfoot>tr>td.danger,.bk-bs-table>thead>tr>th.danger,.bk-bs-table>tbody>tr>th.danger,.bk-bs-table>tfoot>tr>th.danger,.bk-bs-table>thead>tr.danger>td,.bk-bs-table>tbody>tr.danger>td,.bk-bs-table>tfoot>tr.danger>td,.bk-bs-table>thead>tr.danger>th,.bk-bs-table>tbody>tr.danger>th,.bk-bs-table>tfoot>tr.danger>th{background-color:#f2dede}.bk-bs-table-hover>tbody>tr>td.danger:hover,.bk-bs-table-hover>tbody>tr>th.danger:hover,.bk-bs-table-hover>tbody>tr.danger:hover>td,.bk-bs-table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.bk-bs-table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.bk-bs-table-responsive>.bk-bs-table{margin-bottom:0}.bk-bs-table-responsive>.bk-bs-table>thead>tr>th,.bk-bs-table-responsive>.bk-bs-table>tbody>tr>th,.bk-bs-table-responsive>.bk-bs-table>tfoot>tr>th,.bk-bs-table-responsive>.bk-bs-table>thead>tr>td,.bk-bs-table-responsive>.bk-bs-table>tbody>tr>td,.bk-bs-table-responsive>.bk-bs-table>tfoot>tr>td{white-space:nowrap}.bk-bs-table-responsive>.bk-bs-table-bordered{border:0}.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>th:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>th:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>th:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>td:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>td:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>td:first-child{border-left:0}.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>th:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>th:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>th:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>td:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>td:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>td:last-child{border-right:0}.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:last-child>th,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr:last-child>th,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:last-child>td,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.bk-bs-form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bk-bs-form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.bk-bs-form-control::-moz-placeholder{color:#999;opacity:1}.bk-bs-form-control:-ms-input-placeholder{color:#999}.bk-bs-form-control::-webkit-input-placeholder{color:#999}.bk-bs-form-control[disabled],.bk-bs-form-control[readonly],fieldset[disabled] .bk-bs-form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.bk-bs-form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.bk-bs-form-group{margin-bottom:15px}.bk-bs-radio,.bk-bs-checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.bk-bs-radio label,.bk-bs-checkbox label{display:inline;font-weight:400;cursor:pointer}.bk-bs-radio input[type=radio],.bk-bs-radio-inline input[type=radio],.bk-bs-checkbox input[type=checkbox],.bk-bs-checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.bk-bs-radio+.bk-bs-radio,.bk-bs-checkbox+.bk-bs-checkbox{margin-top:-5px}.bk-bs-radio-inline,.bk-bs-checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.bk-bs-radio-inline+.bk-bs-radio-inline,.bk-bs-checkbox-inline+.bk-bs-checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.bk-bs-radio[disabled],.bk-bs-radio-inline[disabled],.bk-bs-checkbox[disabled],.bk-bs-checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .bk-bs-radio,fieldset[disabled] .bk-bs-radio-inline,fieldset[disabled] .bk-bs-checkbox,fieldset[disabled] .bk-bs-checkbox-inline{cursor:not-allowed}.bk-bs-input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.bk-bs-input-sm{height:30px;line-height:30px}textarea.bk-bs-input-sm,select[multiple].bk-bs-input-sm{height:auto}.bk-bs-input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.bk-bs-input-lg{height:46px;line-height:46px}textarea.bk-bs-input-lg,select[multiple].bk-bs-input-lg{height:auto}.bk-bs-has-feedback{position:relative}.bk-bs-has-feedback .bk-bs-form-control{padding-right:42.5px}.bk-bs-has-feedback .bk-bs-form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.bk-bs-has-success .bk-bs-help-block,.bk-bs-has-success .bk-bs-control-label,.bk-bs-has-success .bk-bs-radio,.bk-bs-has-success .bk-bs-checkbox,.bk-bs-has-success .bk-bs-radio-inline,.bk-bs-has-success .bk-bs-checkbox-inline{color:#3c763d}.bk-bs-has-success .bk-bs-form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.bk-bs-has-success .bk-bs-form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.bk-bs-has-success .bk-bs-input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.bk-bs-has-success .bk-bs-form-control-feedback{color:#3c763d}.bk-bs-has-warning .bk-bs-help-block,.bk-bs-has-warning .bk-bs-control-label,.bk-bs-has-warning .bk-bs-radio,.bk-bs-has-warning .bk-bs-checkbox,.bk-bs-has-warning .bk-bs-radio-inline,.bk-bs-has-warning .bk-bs-checkbox-inline{color:#8a6d3b}.bk-bs-has-warning .bk-bs-form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.bk-bs-has-warning .bk-bs-form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.bk-bs-has-warning .bk-bs-input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.bk-bs-has-warning .bk-bs-form-control-feedback{color:#8a6d3b}.bk-bs-has-error .bk-bs-help-block,.bk-bs-has-error .bk-bs-control-label,.bk-bs-has-error .bk-bs-radio,.bk-bs-has-error .bk-bs-checkbox,.bk-bs-has-error .bk-bs-radio-inline,.bk-bs-has-error .bk-bs-checkbox-inline{color:#a94442}.bk-bs-has-error .bk-bs-form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.bk-bs-has-error .bk-bs-form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.bk-bs-has-error .bk-bs-input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.bk-bs-has-error .bk-bs-form-control-feedback{color:#a94442}.bk-bs-form-control-static{margin-bottom:0}.bk-bs-help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.bk-bs-form-inline .bk-bs-form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.bk-bs-form-inline .bk-bs-form-control{display:inline-block;width:auto;vertical-align:middle}.bk-bs-form-inline .bk-bs-input-group>.bk-bs-form-control{width:100%}.bk-bs-form-inline .bk-bs-control-label{margin-bottom:0;vertical-align:middle}.bk-bs-form-inline .bk-bs-radio,.bk-bs-form-inline .bk-bs-checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.bk-bs-form-inline .bk-bs-radio input[type=radio],.bk-bs-form-inline .bk-bs-checkbox input[type=checkbox]{float:none;margin-left:0}.bk-bs-form-inline .bk-bs-has-feedback .bk-bs-form-control-feedback{top:0}}.bk-bs-form-horizontal .bk-bs-control-label,.bk-bs-form-horizontal .bk-bs-radio,.bk-bs-form-horizontal .bk-bs-checkbox,.bk-bs-form-horizontal .bk-bs-radio-inline,.bk-bs-form-horizontal .bk-bs-checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.bk-bs-form-horizontal .bk-bs-radio,.bk-bs-form-horizontal .bk-bs-checkbox{min-height:27px}.bk-bs-form-horizontal .bk-bs-form-group{margin-left:-15px;margin-right:-15px}.bk-bs-form-horizontal .bk-bs-form-control-static{padding-top:7px}@media (min-width:768px){.bk-bs-form-horizontal .bk-bs-control-label{text-align:right}}.bk-bs-form-horizontal .bk-bs-has-feedback .bk-bs-form-control-feedback{top:0;right:15px}.bk-bs-btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bk-bs-btn:focus,.bk-bs-btn:active:focus,.bk-bs-btn.bk-bs-active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.bk-bs-btn:hover,.bk-bs-btn:focus{color:#333;text-decoration:none}.bk-bs-btn:active,.bk-bs-btn.bk-bs-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.bk-bs-btn.bk-bs-disabled,.bk-bs-btn[disabled],fieldset[disabled] .bk-bs-btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.bk-bs-btn-default{color:#333;background-color:#fff;border-color:#ccc}.bk-bs-btn-default:hover,.bk-bs-btn-default:focus,.bk-bs-btn-default:active,.bk-bs-btn-default.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.bk-bs-btn-default:active,.bk-bs-btn-default.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-default{background-image:none}.bk-bs-btn-default.bk-bs-disabled,.bk-bs-btn-default[disabled],fieldset[disabled] .bk-bs-btn-default,.bk-bs-btn-default.bk-bs-disabled:hover,.bk-bs-btn-default[disabled]:hover,fieldset[disabled] .bk-bs-btn-default:hover,.bk-bs-btn-default.bk-bs-disabled:focus,.bk-bs-btn-default[disabled]:focus,fieldset[disabled] .bk-bs-btn-default:focus,.bk-bs-btn-default.bk-bs-disabled:active,.bk-bs-btn-default[disabled]:active,fieldset[disabled] .bk-bs-btn-default:active,.bk-bs-btn-default.bk-bs-disabled.bk-bs-active,.bk-bs-btn-default[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-default.bk-bs-active{background-color:#fff;border-color:#ccc}.bk-bs-btn-default .bk-bs-badge{color:#fff;background-color:#333}.bk-bs-btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.bk-bs-btn-primary:hover,.bk-bs-btn-primary:focus,.bk-bs-btn-primary:active,.bk-bs-btn-primary.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.bk-bs-btn-primary:active,.bk-bs-btn-primary.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-primary{background-image:none}.bk-bs-btn-primary.bk-bs-disabled,.bk-bs-btn-primary[disabled],fieldset[disabled] .bk-bs-btn-primary,.bk-bs-btn-primary.bk-bs-disabled:hover,.bk-bs-btn-primary[disabled]:hover,fieldset[disabled] .bk-bs-btn-primary:hover,.bk-bs-btn-primary.bk-bs-disabled:focus,.bk-bs-btn-primary[disabled]:focus,fieldset[disabled] .bk-bs-btn-primary:focus,.bk-bs-btn-primary.bk-bs-disabled:active,.bk-bs-btn-primary[disabled]:active,fieldset[disabled] .bk-bs-btn-primary:active,.bk-bs-btn-primary.bk-bs-disabled.bk-bs-active,.bk-bs-btn-primary[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-primary.bk-bs-active{background-color:#428bca;border-color:#357ebd}.bk-bs-btn-primary .bk-bs-badge{color:#428bca;background-color:#fff}.bk-bs-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.bk-bs-btn-success:hover,.bk-bs-btn-success:focus,.bk-bs-btn-success:active,.bk-bs-btn-success.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-success{color:#fff;background-color:#47a447;border-color:#398439}.bk-bs-btn-success:active,.bk-bs-btn-success.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-success{background-image:none}.bk-bs-btn-success.bk-bs-disabled,.bk-bs-btn-success[disabled],fieldset[disabled] .bk-bs-btn-success,.bk-bs-btn-success.bk-bs-disabled:hover,.bk-bs-btn-success[disabled]:hover,fieldset[disabled] .bk-bs-btn-success:hover,.bk-bs-btn-success.bk-bs-disabled:focus,.bk-bs-btn-success[disabled]:focus,fieldset[disabled] .bk-bs-btn-success:focus,.bk-bs-btn-success.bk-bs-disabled:active,.bk-bs-btn-success[disabled]:active,fieldset[disabled] .bk-bs-btn-success:active,.bk-bs-btn-success.bk-bs-disabled.bk-bs-active,.bk-bs-btn-success[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-success.bk-bs-active{background-color:#5cb85c;border-color:#4cae4c}.bk-bs-btn-success .bk-bs-badge{color:#5cb85c;background-color:#fff}.bk-bs-btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.bk-bs-btn-info:hover,.bk-bs-btn-info:focus,.bk-bs-btn-info:active,.bk-bs-btn-info.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.bk-bs-btn-info:active,.bk-bs-btn-info.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-info{background-image:none}.bk-bs-btn-info.bk-bs-disabled,.bk-bs-btn-info[disabled],fieldset[disabled] .bk-bs-btn-info,.bk-bs-btn-info.bk-bs-disabled:hover,.bk-bs-btn-info[disabled]:hover,fieldset[disabled] .bk-bs-btn-info:hover,.bk-bs-btn-info.bk-bs-disabled:focus,.bk-bs-btn-info[disabled]:focus,fieldset[disabled] .bk-bs-btn-info:focus,.bk-bs-btn-info.bk-bs-disabled:active,.bk-bs-btn-info[disabled]:active,fieldset[disabled] .bk-bs-btn-info:active,.bk-bs-btn-info.bk-bs-disabled.bk-bs-active,.bk-bs-btn-info[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-info.bk-bs-active{background-color:#5bc0de;border-color:#46b8da}.bk-bs-btn-info .bk-bs-badge{color:#5bc0de;background-color:#fff}.bk-bs-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.bk-bs-btn-warning:hover,.bk-bs-btn-warning:focus,.bk-bs-btn-warning:active,.bk-bs-btn-warning.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.bk-bs-btn-warning:active,.bk-bs-btn-warning.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-warning{background-image:none}.bk-bs-btn-warning.bk-bs-disabled,.bk-bs-btn-warning[disabled],fieldset[disabled] .bk-bs-btn-warning,.bk-bs-btn-warning.bk-bs-disabled:hover,.bk-bs-btn-warning[disabled]:hover,fieldset[disabled] .bk-bs-btn-warning:hover,.bk-bs-btn-warning.bk-bs-disabled:focus,.bk-bs-btn-warning[disabled]:focus,fieldset[disabled] .bk-bs-btn-warning:focus,.bk-bs-btn-warning.bk-bs-disabled:active,.bk-bs-btn-warning[disabled]:active,fieldset[disabled] .bk-bs-btn-warning:active,.bk-bs-btn-warning.bk-bs-disabled.bk-bs-active,.bk-bs-btn-warning[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-warning.bk-bs-active{background-color:#f0ad4e;border-color:#eea236}.bk-bs-btn-warning .bk-bs-badge{color:#f0ad4e;background-color:#fff}.bk-bs-btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.bk-bs-btn-danger:hover,.bk-bs-btn-danger:focus,.bk-bs-btn-danger:active,.bk-bs-btn-danger.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.bk-bs-btn-danger:active,.bk-bs-btn-danger.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-danger{background-image:none}.bk-bs-btn-danger.bk-bs-disabled,.bk-bs-btn-danger[disabled],fieldset[disabled] .bk-bs-btn-danger,.bk-bs-btn-danger.bk-bs-disabled:hover,.bk-bs-btn-danger[disabled]:hover,fieldset[disabled] .bk-bs-btn-danger:hover,.bk-bs-btn-danger.bk-bs-disabled:focus,.bk-bs-btn-danger[disabled]:focus,fieldset[disabled] .bk-bs-btn-danger:focus,.bk-bs-btn-danger.bk-bs-disabled:active,.bk-bs-btn-danger[disabled]:active,fieldset[disabled] .bk-bs-btn-danger:active,.bk-bs-btn-danger.bk-bs-disabled.bk-bs-active,.bk-bs-btn-danger[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-danger.bk-bs-active{background-color:#d9534f;border-color:#d43f3a}.bk-bs-btn-danger .bk-bs-badge{color:#d9534f;background-color:#fff}.bk-bs-btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.bk-bs-btn-link,.bk-bs-btn-link:active,.bk-bs-btn-link[disabled],fieldset[disabled] .bk-bs-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bk-bs-btn-link,.bk-bs-btn-link:hover,.bk-bs-btn-link:focus,.bk-bs-btn-link:active{border-color:transparent}.bk-bs-btn-link:hover,.bk-bs-btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.bk-bs-btn-link[disabled]:hover,fieldset[disabled] .bk-bs-btn-link:hover,.bk-bs-btn-link[disabled]:focus,fieldset[disabled] .bk-bs-btn-link:focus{color:#999;text-decoration:none}.bk-bs-btn-lg,.bk-bs-btn-group-lg>.bk-bs-btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.bk-bs-btn-sm,.bk-bs-btn-group-sm>.bk-bs-btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.bk-bs-btn-xs,.bk-bs-btn-group-xs>.bk-bs-btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.bk-bs-btn-block{display:block;width:100%;padding-left:0;padding-right:0}.bk-bs-btn-block+.bk-bs-btn-block{margin-top:5px}input[type=submit].bk-bs-btn-block,input[type=reset].bk-bs-btn-block,input[type=button].bk-bs-btn-block{width:100%}.bk-bs-caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.bk-bs-dropdown{position:relative}.bk-bs-dropdown-toggle:focus{outline:0}.bk-bs-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.bk-bs-dropdown-menu.bk-bs-pull-right{right:0;left:auto}.bk-bs-dropdown-menu .bk-bs-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.bk-bs-dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.bk-bs-dropdown-menu>li>a:hover,.bk-bs-dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.bk-bs-dropdown-menu>.bk-bs-active>a,.bk-bs-dropdown-menu>.bk-bs-active>a:hover,.bk-bs-dropdown-menu>.bk-bs-active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.bk-bs-dropdown-menu>.bk-bs-disabled>a,.bk-bs-dropdown-menu>.bk-bs-disabled>a:hover,.bk-bs-dropdown-menu>.bk-bs-disabled>a:focus{color:#999}.bk-bs-dropdown-menu>.bk-bs-disabled>a:hover,.bk-bs-dropdown-menu>.bk-bs-disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.bk-bs-Microsoft.bk-bs-gradient(enabled=false);cursor:not-allowed}.bk-bs-open>.bk-bs-dropdown-menu{display:block}.bk-bs-open>a{outline:0}.bk-bs-dropdown-menu-right{left:auto;right:0}.bk-bs-dropdown-menu-left{left:0;right:auto}.bk-bs-dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.bk-bs-dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.bk-bs-pull-right>.bk-bs-dropdown-menu{right:0;left:auto}.bk-bs-dropup .bk-bs-caret,.bk-bs-navbar-fixed-bottom .bk-bs-dropdown .bk-bs-caret{border-top:0;border-bottom:4px solid;content:\"\"}.bk-bs-dropup .bk-bs-dropdown-menu,.bk-bs-navbar-fixed-bottom .bk-bs-dropdown .bk-bs-dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.bk-bs-navbar-right .bk-bs-dropdown-menu{left:auto;right:0}.bk-bs-navbar-right .bk-bs-dropdown-menu-left{left:0;right:auto}}.bk-bs-btn-group,.bk-bs-btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.bk-bs-btn-group>.bk-bs-btn,.bk-bs-btn-group-vertical>.bk-bs-btn{position:relative;float:left}.bk-bs-btn-group>.bk-bs-btn:hover,.bk-bs-btn-group-vertical>.bk-bs-btn:hover,.bk-bs-btn-group>.bk-bs-btn:focus,.bk-bs-btn-group-vertical>.bk-bs-btn:focus,.bk-bs-btn-group>.bk-bs-btn:active,.bk-bs-btn-group-vertical>.bk-bs-btn:active,.bk-bs-btn-group>.bk-bs-btn.bk-bs-active,.bk-bs-btn-group-vertical>.bk-bs-btn.bk-bs-active{z-index:2}.bk-bs-btn-group>.bk-bs-btn:focus,.bk-bs-btn-group-vertical>.bk-bs-btn:focus{outline:0}.bk-bs-btn-group .bk-bs-btn+.bk-bs-btn,.bk-bs-btn-group .bk-bs-btn+.bk-bs-btn-group,.bk-bs-btn-group .bk-bs-btn-group+.bk-bs-btn,.bk-bs-btn-group .bk-bs-btn-group+.bk-bs-btn-group{margin-left:-1px}.bk-bs-btn-toolbar{margin-left:-5px}.bk-bs-btn-toolbar .bk-bs-btn-group,.bk-bs-btn-toolbar .bk-bs-input-group{float:left}.bk-bs-btn-toolbar>.bk-bs-btn,.bk-bs-btn-toolbar>.bk-bs-btn-group,.bk-bs-btn-toolbar>.bk-bs-input-group{margin-left:5px}.bk-bs-btn-group>.bk-bs-btn:not(:first-child):not(:last-child):not(.bk-bs-dropdown-toggle){border-radius:0}.bk-bs-btn-group>.bk-bs-btn:first-child{margin-left:0}.bk-bs-btn-group>.bk-bs-btn:first-child:not(:last-child):not(.bk-bs-dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.bk-bs-btn-group>.bk-bs-btn:last-child:not(:first-child),.bk-bs-btn-group>.bk-bs-dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.bk-bs-btn-group>.bk-bs-btn-group{float:left}.bk-bs-btn-group>.bk-bs-btn-group:not(:first-child):not(:last-child)>.bk-bs-btn{border-radius:0}.bk-bs-btn-group>.bk-bs-btn-group:first-child>.bk-bs-btn:last-child,.bk-bs-btn-group>.bk-bs-btn-group:first-child>.bk-bs-dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.bk-bs-btn-group>.bk-bs-btn-group:last-child>.bk-bs-btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.bk-bs-btn-group .bk-bs-dropdown-toggle:active,.bk-bs-btn-group.bk-bs-open .bk-bs-dropdown-toggle{outline:0}.bk-bs-btn-group>.bk-bs-btn+.bk-bs-dropdown-toggle{padding-left:8px;padding-right:8px}.bk-bs-btn-group>.bk-bs-btn-lg+.bk-bs-dropdown-toggle{padding-left:12px;padding-right:12px}.bk-bs-btn-group.bk-bs-open .bk-bs-dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.bk-bs-btn-group.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-link{-webkit-box-shadow:none;box-shadow:none}.bk-bs-btn .bk-bs-caret{margin-left:0}.bk-bs-btn-lg .bk-bs-caret{border-width:5px 5px 0;border-bottom-width:0}.bk-bs-dropup .bk-bs-btn-lg .bk-bs-caret{border-width:0 5px 5px}.bk-bs-btn-group-vertical>.bk-bs-btn,.bk-bs-btn-group-vertical>.bk-bs-btn-group,.bk-bs-btn-group-vertical>.bk-bs-btn-group>.bk-bs-btn{display:block;float:none;width:100%;max-width:100%}.bk-bs-btn-group-vertical>.bk-bs-btn-group>.bk-bs-btn{float:none}.bk-bs-btn-group-vertical>.bk-bs-btn+.bk-bs-btn,.bk-bs-btn-group-vertical>.bk-bs-btn+.bk-bs-btn-group,.bk-bs-btn-group-vertical>.bk-bs-btn-group+.bk-bs-btn,.bk-bs-btn-group-vertical>.bk-bs-btn-group+.bk-bs-btn-group{margin-top:-1px;margin-left:0}.bk-bs-btn-group-vertical>.bk-bs-btn:not(:first-child):not(:last-child){border-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn-group:not(:first-child):not(:last-child)>.bk-bs-btn{border-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn-group:first-child:not(:last-child)>.bk-bs-btn:last-child,.bk-bs-btn-group-vertical>.bk-bs-btn-group:first-child:not(:last-child)>.bk-bs-dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn-group:last-child:not(:first-child)>.bk-bs-btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.bk-bs-btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.bk-bs-btn-group-justified>.bk-bs-btn,.bk-bs-btn-group-justified>.bk-bs-btn-group{float:none;display:table-cell;width:1%}.bk-bs-btn-group-justified>.bk-bs-btn-group .bk-bs-btn{width:100%}[data-toggle=buttons]>.bk-bs-btn>input[type=radio],[data-toggle=buttons]>.bk-bs-btn>input[type=checkbox]{display:none}.bk-bs-input-group{position:relative;display:table;border-collapse:separate}.bk-bs-input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.bk-bs-input-group .bk-bs-form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.bk-bs-input-group-lg>.bk-bs-form-control,.bk-bs-input-group-lg>.bk-bs-input-group-addon,.bk-bs-input-group-lg>.bk-bs-input-group-btn>.bk-bs-btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.bk-bs-input-group-lg>.bk-bs-form-control,select.bk-bs-input-group-lg>.bk-bs-input-group-addon,select.bk-bs-input-group-lg>.bk-bs-input-group-btn>.bk-bs-btn{height:46px;line-height:46px}textarea.bk-bs-input-group-lg>.bk-bs-form-control,textarea.bk-bs-input-group-lg>.bk-bs-input-group-addon,textarea.bk-bs-input-group-lg>.bk-bs-input-group-btn>.bk-bs-btn,select[multiple].bk-bs-input-group-lg>.bk-bs-form-control,select[multiple].bk-bs-input-group-lg>.bk-bs-input-group-addon,select[multiple].bk-bs-input-group-lg>.bk-bs-input-group-btn>.bk-bs-btn{height:auto}.bk-bs-input-group-sm>.bk-bs-form-control,.bk-bs-input-group-sm>.bk-bs-input-group-addon,.bk-bs-input-group-sm>.bk-bs-input-group-btn>.bk-bs-btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.bk-bs-input-group-sm>.bk-bs-form-control,select.bk-bs-input-group-sm>.bk-bs-input-group-addon,select.bk-bs-input-group-sm>.bk-bs-input-group-btn>.bk-bs-btn{height:30px;line-height:30px}textarea.bk-bs-input-group-sm>.bk-bs-form-control,textarea.bk-bs-input-group-sm>.bk-bs-input-group-addon,textarea.bk-bs-input-group-sm>.bk-bs-input-group-btn>.bk-bs-btn,select[multiple].bk-bs-input-group-sm>.bk-bs-form-control,select[multiple].bk-bs-input-group-sm>.bk-bs-input-group-addon,select[multiple].bk-bs-input-group-sm>.bk-bs-input-group-btn>.bk-bs-btn{height:auto}.bk-bs-input-group-addon,.bk-bs-input-group-btn,.bk-bs-input-group .bk-bs-form-control{display:table-cell}.bk-bs-input-group-addon:not(:first-child):not(:last-child),.bk-bs-input-group-btn:not(:first-child):not(:last-child),.bk-bs-input-group .bk-bs-form-control:not(:first-child):not(:last-child){border-radius:0}.bk-bs-input-group-addon,.bk-bs-input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.bk-bs-input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.bk-bs-input-group-addon.bk-bs-input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.bk-bs-input-group-addon.bk-bs-input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.bk-bs-input-group-addon input[type=radio],.bk-bs-input-group-addon input[type=checkbox]{margin-top:0}.bk-bs-input-group .bk-bs-form-control:first-child,.bk-bs-input-group-addon:first-child,.bk-bs-input-group-btn:first-child>.bk-bs-btn,.bk-bs-input-group-btn:first-child>.bk-bs-btn-group>.bk-bs-btn,.bk-bs-input-group-btn:first-child>.bk-bs-dropdown-toggle,.bk-bs-input-group-btn:last-child>.bk-bs-btn:not(:last-child):not(.bk-bs-dropdown-toggle),.bk-bs-input-group-btn:last-child>.bk-bs-btn-group:not(:last-child)>.bk-bs-btn{border-bottom-right-radius:0;border-top-right-radius:0}.bk-bs-input-group-addon:first-child{border-right:0}.bk-bs-input-group .bk-bs-form-control:last-child,.bk-bs-input-group-addon:last-child,.bk-bs-input-group-btn:last-child>.bk-bs-btn,.bk-bs-input-group-btn:last-child>.bk-bs-btn-group>.bk-bs-btn,.bk-bs-input-group-btn:last-child>.bk-bs-dropdown-toggle,.bk-bs-input-group-btn:first-child>.bk-bs-btn:not(:first-child),.bk-bs-input-group-btn:first-child>.bk-bs-btn-group:not(:first-child)>.bk-bs-btn{border-bottom-left-radius:0;border-top-left-radius:0}.bk-bs-input-group-addon:last-child{border-left:0}.bk-bs-input-group-btn{position:relative;font-size:0;white-space:nowrap}.bk-bs-input-group-btn>.bk-bs-btn{position:relative}.bk-bs-input-group-btn>.bk-bs-btn+.bk-bs-btn{margin-left:-1px}.bk-bs-input-group-btn>.bk-bs-btn:hover,.bk-bs-input-group-btn>.bk-bs-btn:focus,.bk-bs-input-group-btn>.bk-bs-btn:active{z-index:2}.bk-bs-input-group-btn:first-child>.bk-bs-btn,.bk-bs-input-group-btn:first-child>.bk-bs-btn-group{margin-right:-1px}.bk-bs-input-group-btn:last-child>.bk-bs-btn,.bk-bs-input-group-btn:last-child>.bk-bs-btn-group{margin-left:-1px}.bk-bs-nav{margin-bottom:0;padding-left:0;list-style:none}.bk-bs-nav>li{position:relative;display:block}.bk-bs-nav>li>a{position:relative;display:block;padding:10px 15px}.bk-bs-nav>li>a:hover,.bk-bs-nav>li>a:focus{text-decoration:none;background-color:#eee}.bk-bs-nav>li.bk-bs-disabled>a{color:#999}.bk-bs-nav>li.bk-bs-disabled>a:hover,.bk-bs-nav>li.bk-bs-disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.bk-bs-nav .bk-bs-open>a,.bk-bs-nav .bk-bs-open>a:hover,.bk-bs-nav .bk-bs-open>a:focus{background-color:#eee;border-color:#428bca}.bk-bs-nav .bk-bs-nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.bk-bs-nav>li>a>img{max-width:none}.bk-bs-nav-tabs{border-bottom:1px solid #ddd}.bk-bs-nav-tabs>li{float:left;margin-bottom:-1px}.bk-bs-nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.bk-bs-nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.bk-bs-nav-tabs>li.bk-bs-active>a,.bk-bs-nav-tabs>li.bk-bs-active>a:hover,.bk-bs-nav-tabs>li.bk-bs-active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.bk-bs-nav-tabs.bk-bs-nav-justified{width:100%;border-bottom:0}.bk-bs-nav-tabs.bk-bs-nav-justified>li{float:none}.bk-bs-nav-tabs.bk-bs-nav-justified>li>a{text-align:center;margin-bottom:5px}.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-dropdown .bk-bs-dropdown-menu{top:auto;left:auto}@media (min-width:768px){.bk-bs-nav-tabs.bk-bs-nav-justified>li{display:table-cell;width:1%}.bk-bs-nav-tabs.bk-bs-nav-justified>li>a{margin-bottom:0}}.bk-bs-nav-tabs.bk-bs-nav-justified>li>a{margin-right:0;border-radius:4px}.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a,.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a:hover,.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a:focus{border:1px solid #ddd}@media (min-width:768px){.bk-bs-nav-tabs.bk-bs-nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a,.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a:hover,.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a:focus{border-bottom-color:#fff}}.bk-bs-nav-pills>li{float:left}.bk-bs-nav-pills>li>a{border-radius:4px}.bk-bs-nav-pills>li+li{margin-left:2px}.bk-bs-nav-pills>li.bk-bs-active>a,.bk-bs-nav-pills>li.bk-bs-active>a:hover,.bk-bs-nav-pills>li.bk-bs-active>a:focus{color:#fff;background-color:#428bca}.bk-bs-nav-stacked>li{float:none}.bk-bs-nav-stacked>li+li{margin-top:2px;margin-left:0}.bk-bs-nav-justified{width:100%}.bk-bs-nav-justified>li{float:none}.bk-bs-nav-justified>li>a{text-align:center;margin-bottom:5px}.bk-bs-nav-justified>.bk-bs-dropdown .bk-bs-dropdown-menu{top:auto;left:auto}@media (min-width:768px){.bk-bs-nav-justified>li{display:table-cell;width:1%}.bk-bs-nav-justified>li>a{margin-bottom:0}}.bk-bs-nav-tabs-justified{border-bottom:0}.bk-bs-nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.bk-bs-nav-tabs-justified>.bk-bs-active>a,.bk-bs-nav-tabs-justified>.bk-bs-active>a:hover,.bk-bs-nav-tabs-justified>.bk-bs-active>a:focus{border:1px solid #ddd}@media (min-width:768px){.bk-bs-nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.bk-bs-nav-tabs-justified>.bk-bs-active>a,.bk-bs-nav-tabs-justified>.bk-bs-active>a:hover,.bk-bs-nav-tabs-justified>.bk-bs-active>a:focus{border-bottom-color:#fff}}.bk-bs-tab-content>.bk-bs-tab-pane{display:none}.bk-bs-tab-content>.bk-bs-active{display:block}.bk-bs-nav-tabs .bk-bs-dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.bk-bs-label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.bk-bs-label[href]:hover,.bk-bs-label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.bk-bs-label:empty{display:none}.bk-bs-btn .bk-bs-label{position:relative;top:-1px}.bk-bs-label-default{background-color:#999}.bk-bs-label-default[href]:hover,.bk-bs-label-default[href]:focus{background-color:gray}.bk-bs-label-primary{background-color:#428bca}.bk-bs-label-primary[href]:hover,.bk-bs-label-primary[href]:focus{background-color:#3071a9}.bk-bs-label-success{background-color:#5cb85c}.bk-bs-label-success[href]:hover,.bk-bs-label-success[href]:focus{background-color:#449d44}.bk-bs-label-info{background-color:#5bc0de}.bk-bs-label-info[href]:hover,.bk-bs-label-info[href]:focus{background-color:#31b0d5}.bk-bs-label-warning{background-color:#f0ad4e}.bk-bs-label-warning[href]:hover,.bk-bs-label-warning[href]:focus{background-color:#ec971f}.bk-bs-label-danger{background-color:#d9534f}.bk-bs-label-danger[href]:hover,.bk-bs-label-danger[href]:focus{background-color:#c9302c}.bk-bs-panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.bk-bs-panel-body{padding:15px}.bk-bs-panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.bk-bs-panel-heading>.bk-bs-dropdown .bk-bs-dropdown-toggle{color:inherit}.bk-bs-panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.bk-bs-panel-title>a{color:inherit}.bk-bs-panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.bk-bs-panel>.bk-bs-list-group{margin-bottom:0}.bk-bs-panel>.bk-bs-list-group .bk-bs-list-group-item{border-width:1px 0;border-radius:0}.bk-bs-panel>.bk-bs-list-group:first-child .bk-bs-list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.bk-bs-panel>.bk-bs-list-group:last-child .bk-bs-list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.bk-bs-panel-heading+.bk-bs-list-group .bk-bs-list-group-item:first-child{border-top-width:0}.bk-bs-panel>.bk-bs-table,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table{margin-bottom:0}.bk-bs-panel>.bk-bs-table:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.bk-bs-panel>.bk-bs-table:first-child>thead:first-child>tr:first-child td:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>thead:first-child>tr:first-child td:first-child,.bk-bs-panel>.bk-bs-table:first-child>tbody:first-child>tr:first-child td:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>tbody:first-child>tr:first-child td:first-child,.bk-bs-panel>.bk-bs-table:first-child>thead:first-child>tr:first-child th:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>thead:first-child>tr:first-child th:first-child,.bk-bs-panel>.bk-bs-table:first-child>tbody:first-child>tr:first-child th:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.bk-bs-panel>.bk-bs-table:first-child>thead:first-child>tr:first-child td:last-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>thead:first-child>tr:first-child td:last-child,.bk-bs-panel>.bk-bs-table:first-child>tbody:first-child>tr:first-child td:last-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>tbody:first-child>tr:first-child td:last-child,.bk-bs-panel>.bk-bs-table:first-child>thead:first-child>tr:first-child th:last-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>thead:first-child>tr:first-child th:last-child,.bk-bs-panel>.bk-bs-table:first-child>tbody:first-child>tr:first-child th:last-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.bk-bs-panel>.bk-bs-table:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.bk-bs-panel>.bk-bs-table:last-child>tbody:last-child>tr:last-child td:first-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tbody:last-child>tr:last-child td:first-child,.bk-bs-panel>.bk-bs-table:last-child>tfoot:last-child>tr:last-child td:first-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tfoot:last-child>tr:last-child td:first-child,.bk-bs-panel>.bk-bs-table:last-child>tbody:last-child>tr:last-child th:first-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tbody:last-child>tr:last-child th:first-child,.bk-bs-panel>.bk-bs-table:last-child>tfoot:last-child>tr:last-child th:first-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.bk-bs-panel>.bk-bs-table:last-child>tbody:last-child>tr:last-child td:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tbody:last-child>tr:last-child td:last-child,.bk-bs-panel>.bk-bs-table:last-child>tfoot:last-child>tr:last-child td:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tfoot:last-child>tr:last-child td:last-child,.bk-bs-panel>.bk-bs-table:last-child>tbody:last-child>tr:last-child th:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tbody:last-child>tr:last-child th:last-child,.bk-bs-panel>.bk-bs-table:last-child>tfoot:last-child>tr:last-child th:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.bk-bs-panel>.bk-bs-panel-body+.bk-bs-table,.bk-bs-panel>.bk-bs-panel-body+.bk-bs-table-responsive{border-top:1px solid #ddd}.bk-bs-panel>.bk-bs-table>tbody:first-child>tr:first-child th,.bk-bs-panel>.bk-bs-table>tbody:first-child>tr:first-child td{border-top:0}.bk-bs-panel>.bk-bs-table-bordered,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered{border:0}.bk-bs-panel>.bk-bs-table-bordered>thead>tr>th:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>th:first-child,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr>th:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>th:first-child,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr>th:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>th:first-child,.bk-bs-panel>.bk-bs-table-bordered>thead>tr>td:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>td:first-child,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr>td:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>td:first-child,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr>td:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>td:first-child{border-left:0}.bk-bs-panel>.bk-bs-table-bordered>thead>tr>th:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>th:last-child,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr>th:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>th:last-child,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr>th:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>th:last-child,.bk-bs-panel>.bk-bs-table-bordered>thead>tr>td:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>td:last-child,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr>td:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>td:last-child,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr>td:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>td:last-child{border-right:0}.bk-bs-panel>.bk-bs-table-bordered>thead>tr:first-child>td,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr:first-child>td,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr:first-child>td,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:first-child>td,.bk-bs-panel>.bk-bs-table-bordered>thead>tr:first-child>th,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr:first-child>th,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr:first-child>th,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:first-child>th{border-bottom:0}.bk-bs-panel>.bk-bs-table-bordered>tbody>tr:last-child>td,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:last-child>td,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr:last-child>td,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr:last-child>td,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr:last-child>th,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:last-child>th,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr:last-child>th,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr:last-child>th{border-bottom:0}.bk-bs-panel>.bk-bs-table-responsive{border:0;margin-bottom:0}.bk-bs-panel-group{margin-bottom:20px}.bk-bs-panel-group .bk-bs-panel{margin-bottom:0;border-radius:4px;overflow:hidden}.bk-bs-panel-group .bk-bs-panel+.bk-bs-panel{margin-top:5px}.bk-bs-panel-group .bk-bs-panel-heading{border-bottom:0}.bk-bs-panel-group .bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top:1px solid #ddd}.bk-bs-panel-group .bk-bs-panel-footer{border-top:0}.bk-bs-panel-group .bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom:1px solid #ddd}.bk-bs-panel-default{border-color:#ddd}.bk-bs-panel-default>.bk-bs-panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.bk-bs-panel-default>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#ddd}.bk-bs-panel-default>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#ddd}.bk-bs-panel-primary{border-color:#428bca}.bk-bs-panel-primary>.bk-bs-panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.bk-bs-panel-primary>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#428bca}.bk-bs-panel-primary>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#428bca}.bk-bs-panel-success{border-color:#d6e9c6}.bk-bs-panel-success>.bk-bs-panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.bk-bs-panel-success>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#d6e9c6}.bk-bs-panel-success>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#d6e9c6}.bk-bs-panel-info{border-color:#bce8f1}.bk-bs-panel-info>.bk-bs-panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.bk-bs-panel-info>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#bce8f1}.bk-bs-panel-info>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#bce8f1}.bk-bs-panel-warning{border-color:#faebcc}.bk-bs-panel-warning>.bk-bs-panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.bk-bs-panel-warning>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#faebcc}.bk-bs-panel-warning>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#faebcc}.bk-bs-panel-danger{border-color:#ebccd1}.bk-bs-panel-danger>.bk-bs-panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.bk-bs-panel-danger>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#ebccd1}.bk-bs-panel-danger>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#ebccd1}.bk-bs-close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.bk-bs-close:hover,.bk-bs-close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.bk-bs-close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.bk-bs-modal-open{overflow:hidden}.bk-bs-modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.bk-bs-modal.bk-bs-fade .bk-bs-modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.bk-bs-modal.bk-bs-in .bk-bs-modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.bk-bs-modal-dialog{position:relative;width:auto;margin:10px}.bk-bs-modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.bk-bs-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.bk-bs-modal-backdrop.bk-bs-fade{opacity:0;filter:alpha(opacity=0)}.bk-bs-modal-backdrop.bk-bs-in{opacity:.5;filter:alpha(opacity=50)}.bk-bs-modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.bk-bs-modal-header .bk-bs-close{margin-top:-2px}.bk-bs-modal-title{margin:0;line-height:1.42857143}.bk-bs-modal-body{position:relative;padding:20px}.bk-bs-modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.bk-bs-modal-footer .bk-bs-btn+.bk-bs-btn{margin-left:5px;margin-bottom:0}.bk-bs-modal-footer .bk-bs-btn-group .bk-bs-btn+.bk-bs-btn{margin-left:-1px}.bk-bs-modal-footer .bk-bs-btn-block+.bk-bs-btn-block{margin-left:0}@media (min-width:768px){.bk-bs-modal-dialog{width:600px;margin:30px auto}.bk-bs-modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.bk-bs-modal-sm{width:300px}}@media (min-width:992px){.bk-bs-modal-lg{width:900px}}.bk-bs-clearfix:before,.bk-bs-clearfix:after,.bk-bs-container:before,.bk-bs-container:after,.bk-bs-container-fluid:before,.bk-bs-container-fluid:after,.bk-bs-row:before,.bk-bs-row:after,.bk-bs-form-horizontal .bk-bs-form-group:before,.bk-bs-form-horizontal .bk-bs-form-group:after,.bk-bs-btn-toolbar:before,.bk-bs-btn-toolbar:after,.bk-bs-btn-group-vertical>.bk-bs-btn-group:before,.bk-bs-btn-group-vertical>.bk-bs-btn-group:after,.bk-bs-nav:before,.bk-bs-nav:after,.bk-bs-panel-body:before,.bk-bs-panel-body:after,.bk-bs-modal-footer:before,.bk-bs-modal-footer:after,.bk-crossfilter-row:before,.bk-crossfilter-row:after{content:\" \";display:table}.bk-bs-clearfix:after,.bk-bs-container:after,.bk-bs-container-fluid:after,.bk-bs-row:after,.bk-bs-form-horizontal .bk-bs-form-group:after,.bk-bs-btn-toolbar:after,.bk-bs-btn-group-vertical>.bk-bs-btn-group:after,.bk-bs-nav:after,.bk-bs-panel-body:after,.bk-bs-modal-footer:after,.bk-crossfilter-row:after{clear:both}.bk-bs-center-block{display:block;margin-left:auto;margin-right:auto}.bk-bs-pull-right{float:right!important}.bk-bs-pull-left{float:left!important}.bk-bs-hide{display:none!important}.bk-bs-show{display:block!important}.bk-bs-invisible{visibility:hidden}.bk-bs-text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.bk-bs-hidden{display:none!important;visibility:hidden!important}.bk-bs-affix{position:fixed}.bk-pivot{font-family:arial;font-size:8pt}.bk-wait{font-weight:700;font-size:18px}.bk-pivot-toolbox{min-width:200px;width:250px}.bk-pivot-toolbox ul{padding:0}.bk-pivot-toolbox li{padding:5px;list-style-type:none}.bk-pivot-toolbox li:before,.bk-pivot-toolbox li:after{content:\" \";display:table}.bk-pivot-toolbox li:after{clear:both}.bk-pivot-toolbox li:before,.bk-pivot-toolbox li:after{content:\" \";display:table}.bk-pivot-toolbox li:after{clear:both}.bk-pivot-toolbox .bk-pivot-box{border:1px solid #ccc;border-radius:5px;margin-top:5px;background-color:#fff}.bk-pivot-toolbox .bk-pivot-box>li:first-child{background-color:#e6e6e6}.bk-pivot-toolbox .bk-pivot-box .bk-pivot-box-header{cursor:move}.bk-pivot-toolbox .bk-pivot-box .bk-pivot-box-header .bk-field{font-weight:700}.bk-pivot-toolbox .bk-pivot-box .bk-pivot-box-header .bk-dtype{color:#999}.bk-pivot-toolbox .bk-pivot-box .bk-pivot-box-header .bk-bs-close{font-size:16px}table.pvtTable{text-align:left;border-collapse:collapse}table.pvtTable tr th{background-color:#e6e6e6;border:1px solid #ccc;font-size:8pt;padding:5px}table.pvtTable .pvtColLabel{text-align:center}table.pvtTable .pvtTotalLabel{text-align:right}table.pvtTable tr td{padding:5px;border:1px solid #ccc;vertical-align:top;text-align:right}.pvtTotal,.pvtGrandTotal{font-weight:700}.bk-hbox{display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;-webkit-box-flex:0;-moz-box-flex:0;box-flex:0}.bk-vbox{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;-webkit-box-flex:0;-moz-box-flex:0;box-flex:0}.bk-widget-form{padding:30px;overflow:hidden}.bk-widget-form-group{margin-bottom:15px}.bk-widget-form-input{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bk-widget-form-input:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.bk-widget-form-input::-moz-placeholder{color:#999;opacity:1}.bk-widget-form-input:-ms-input-placeholder{color:#999}.bk-widget-form-input::-webkit-input-placeholder{color:#999}.bk-widget-form-input[disabled],.bk-widget-form-input[readonly],fieldset[disabled] .bk-widget-form-input{cursor:not-allowed;background-color:#eee;opacity:1}textarea.bk-widget-form-input{height:auto}.bk-slider-horizontal{width:100%;height:50px;min-width:200px}.bk-slider-vertical{height:100%;width:50px;min-height:200px}.bk-crossfilter-row{margin-left:-15px;margin-right:-15px;height:100%;width:100%;margin:0}.bk-crossfilter-panel-heading{padding-top:5px;padding-bottom:5px}.aligntable{vertical-align:top}.bk-crossfilter-container{height:100%;width:100%;whitespace:nowrap;display:inline-block;overflow:auto}.bk-crossfilter-configuration{overflow:auto;float:left;padding-right:0!important;padding-left:15px!important;margin-left:0!important;margin-right:0!important}.bk-column-list{overflow-y:auto;height:100%;padding-right:0;padding-left:0}.bk-table{width:100%;margin-bottom:20px;border-top:0;margin-bottom:0;text-algin:left}.bk-table>thead>tr>th,.bk-table>tbody>tr>th,.bk-table>tfoot>tr>th,.bk-table>thead>tr>td,.bk-table>tbody>tr>td,.bk-table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.bk-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.bk-table>caption+thead>tr:first-child>th,.bk-table>colgroup+thead>tr:first-child>th,.bk-table>thead:first-child>tr:first-child>th,.bk-table>caption+thead>tr:first-child>td,.bk-table>colgroup+thead>tr:first-child>td,.bk-table>thead:first-child>tr:first-child>td{border-top:0}.bk-table>tbody+tbody{border-top:2px solid #ddd}.bk-table .bk-bs-table{background-color:#fff}.bk-table>thead>tr>th,.bk-table>tbody>tr>th,.bk-table>tfoot>tr>th,.bk-table>thead>tr>td,.bk-table>tbody>tr>td,.bk-table>tfoot>tr>td{padding:5px}.bk-filters-facets{height:100%;padding-left:0;padding-right:0}.bk-filters{height:45%;overflow:hidden;position:relative}.bk-filters-selections{position:absolute;top:30px;left:0;right:0;bottom:0;overflow-y:auto;padding-top:0;padding-bottom:0;padding:5px!important}.bk-facet{height:14%;position:relative}.bk-facets-selections{position:absolute;top:30px;left:0;right:0;bottom:0}.bk-plot-selection{padding-right:0;padding-left:0}.bk-plot{float:left;display:inline-block}.bk-facet-label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;background-color:#5bc0de;margin-left:5px;display:inline-block;cursor:pointer}.bk-facet-label[href]:hover,.bk-facet-label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.bk-facet-label:empty{display:none}.bk-bs-btn .bk-facet-label{position:relative;top:-1px}.bk-facet-label[href]:hover,.bk-facet-label[href]:focus{background-color:#31b0d5}.bk-filters-selections .bk-sidebar{-webkit-transform:scale(0.5,.5)!important;transform:scale(0.5,.5)!important}.bk-crossfilter .bk-widget-form{padding:5px}svg{font:12px sans-serif;margin:0}.ui-dialog-titlebar{height:16px}.bk-button-bar{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:2px;position:relative;display:inline-block;vertical-align:middle}.bk-button-bar>.bk-bs-btn{position:relative;float:left}.bk-button-bar>.bk-bs-btn:hover,.bk-button-bar>.bk-bs-btn:focus,.bk-button-bar>.bk-bs-btn:active,.bk-button-bar>.bk-bs-btn.bk-bs-active{z-index:2}.bk-button-bar>.bk-bs-btn:focus{outline:0}.bk-button-bar .bk-bs-btn+.bk-bs-btn,.bk-button-bar .bk-bs-btn+.bk-bs-btn-group,.bk-button-bar .bk-bs-btn-group+.bk-bs-btn,.bk-button-bar .bk-bs-btn-group+.bk-bs-btn-group{margin-left:-1px}.bk-toolbar-button{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px;color:#333;background-color:#fff;border-color:#ccc}.bk-toolbar-button:focus,.bk-toolbar-button:active:focus,.bk-toolbar-button.bk-bs-active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.bk-toolbar-button:hover,.bk-toolbar-button:focus{color:#333;text-decoration:none}.bk-toolbar-button:active,.bk-toolbar-button.bk-bs-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.bk-toolbar-button.bk-bs-disabled,.bk-toolbar-button[disabled],fieldset[disabled] .bk-toolbar-button{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.bk-toolbar-button:hover,.bk-toolbar-button:focus,.bk-toolbar-button:active,.bk-toolbar-button.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-toolbar-button{color:#333;background-color:#ebebeb;border-color:#adadad}.bk-toolbar-button:active,.bk-toolbar-button.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-toolbar-button{background-image:none}.bk-toolbar-button.bk-bs-disabled,.bk-toolbar-button[disabled],fieldset[disabled] .bk-toolbar-button,.bk-toolbar-button.bk-bs-disabled:hover,.bk-toolbar-button[disabled]:hover,fieldset[disabled] .bk-toolbar-button:hover,.bk-toolbar-button.bk-bs-disabled:focus,.bk-toolbar-button[disabled]:focus,fieldset[disabled] .bk-toolbar-button:focus,.bk-toolbar-button.bk-bs-disabled:active,.bk-toolbar-button[disabled]:active,fieldset[disabled] .bk-toolbar-button:active,.bk-toolbar-button.bk-bs-disabled.bk-bs-active,.bk-toolbar-button[disabled].bk-bs-active,fieldset[disabled] .bk-toolbar-button.bk-bs-active{background-color:#fff;border-color:#ccc}.bk-toolbar-button .bk-bs-badge{color:#fff;background-color:#333}.grid_plot .button_bar{display:none}.grid_plot .bk-logo{display:none}.bokeh_canvas_wrapper{position:relative;font-size:12pt}.bokeh_canvas{position:absolute;font-size:12pt}.bokeh_canvas_wrapper .bokeh_gmap{position:absolute!important;z-index:-5}.plotview{clear:both}.bokeh_canvas_wrapper{position:relative;font-size:12pt;float:left}.bokeh_canvas{position:absolute;font-size:12pt}.bokeh_tooltip.left::before{position:absolute;top:40%;width:0;height:0;left:-9px;border-style:solid;border-width:7px 10px 7px 0;border-color:transparent #1e4B6c transparent transparent;content:\" \";display:block}.bokeh_tooltip.right::after{position:absolute;top:40%;width:0;height:0;right:-9px;border-style:solid;border-width:7px 0 7px 10px;border-color:transparent transparent transparent #1e4B6c;content:\" \";display:block}.bokeh_tooltip{position:absolute;padding:5px;background-color:#1e4B6c;border-radius:10px;pointer-events:none}.bokeh_tooltip_row_label{color:#9ab9b1;font-family:Helvetica,sans-serif;text-align:right}.bokeh_tooltip_row_value{color:#e2ddbd;font-family:Helvetica,sans-serif}.bokeh_tooltip_color_block{width:12px;height:12px;margin-left:5px;margin-right:5px;outline:#ddd solid 1px;display:inline-block}.bokeh_gmap{position:absolute;border:0;z-index:-5}.shading{position:absolute;display:block;border:1px dashed green;z-index:100}.gridplot_container{position:relative}.gridplot_container .gp_plotwrapper{position:absolute}.table_wrap table{display:block;margin:5px;height:300px;overflow-y:scroll}.plot_wrap .button_bar{height:30px}.plot_wrap .button_bar *{display:none}.plot_wrap:hover .button_bar *{display:inherit}.maximize{display:none;float:right}.plotclose{float:right}.plotsidebar{float:left;width:350px;overflow-x:auto}.maxplot{float:left}.bokehtable{overflow:auto}.pandassize,.pandasoffset{width:30px!important;height:20px!important;padding:1px!important}.hide{display:none}.pandasicons{position:relative;top:5px}.bokehdocheading{background-color:#ccc}.bokehdocheading:hover>.bokehdelete{display:none;float:right}.bokehdelete{float:right}.pandasgroup{width:auto;height:20px!important;padding:1px!important}.pandasagg{width:auto;height:20px!important;padding:1px!important}.tablecontrolstate{width:auto;height:20px!important;padding:1px!important}.paginatedisplay{overflow:hidden}.pagination{margin:0!important}.tablecontrolform{margin:0}.computedtxtbox,.computedname,.search{height:20px!important;padding:1px!important}.plottitle{padding-left:50px;padding-bottom:10px}.dataslider{margin:10px 5px;width:20px}.maxlabel,.minlabel{margin-top:10px;margin-bottom:10px}.jsp{overflow:hidden}\n",
        "                /* END /Library/Python/2.7/site-packages/bokeh/server/static/css/bokeh.min.css */\n",
        "        </style>\n",
        "        <script type=\"text/javascript\">\n",
        "            /* BEGIN /Library/Python/2.7/site-packages/bokeh/server/static/js/bokeh.min.js */\n",
        "                !function(t,e){t.Bokeh=e()}(this,function(){var t,e,n;!function(i){function r(t,e){return b.call(t,e)}function o(t,e){var n,i,r,o,s,a,l,c,h,u,p,d=e&&e.split(\"/\"),f=v.map,_=f&&f[\"*\"]||{};if(t&&\".\"===t.charAt(0))if(e){for(d=d.slice(0,d.length-1),t=t.split(\"/\"),s=t.length-1,v.nodeIdCompat&&x.test(t[s])&&(t[s]=t[s].replace(x,\"\")),t=d.concat(t),h=0;h<t.length;h+=1)if(p=t[h],\".\"===p)t.splice(h,1),h-=1;else if(\"..\"===p){if(1===h&&(\"..\"===t[2]||\"..\"===t[0]))break;h>0&&(t.splice(h-1,2),h-=2)}t=t.join(\"/\")}else 0===t.indexOf(\"./\")&&(t=t.substring(2));if((d||_)&&f){for(n=t.split(\"/\"),h=n.length;h>0;h-=1){if(i=n.slice(0,h).join(\"/\"),d)for(u=d.length;u>0;u-=1)if(r=f[d.slice(0,u).join(\"/\")],r&&(r=r[i])){o=r,a=h;break}if(o)break;!l&&_&&_[i]&&(l=_[i],c=h)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),t=n.join(\"/\"))}return t}function s(t,e){return function(){return d.apply(i,w.call(arguments,0).concat([t,e]))}}function a(t){return function(e){return o(e,t)}}function l(t){return function(e){g[t]=e}}function c(t){if(r(m,t)){var e=m[t];delete m[t],y[t]=!0,p.apply(i,e)}if(!r(g,t)&&!r(y,t))throw new Error(\"No \"+t);return g[t]}function h(t){var e,n=t?t.indexOf(\"!\"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function u(t){return function(){return v&&v.config&&v.config[t]||{}}}var p,d,f,_,g={},m={},v={},y={},b=Object.prototype.hasOwnProperty,w=[].slice,x=/\\.js$/;f=function(t,e){var n,i=h(t),r=i[0];return t=i[1],r&&(r=o(r,e),n=c(r)),r?t=n&&n.normalize?n.normalize(t,a(e)):o(t,e):(t=o(t,e),i=h(t),r=i[0],t=i[1],r&&(n=c(r))),{f:r?r+\"!\"+t:t,n:t,pr:r,p:n}},_={require:function(t){return s(t)},exports:function(t){var e=g[t];return\"undefined\"!=typeof e?e:g[t]={}},module:function(t){return{id:t,uri:\"\",exports:g[t],config:u(t)}}},p=function(t,e,n,o){var a,h,u,p,d,v,b=[],w=typeof n;if(o=o||t,\"undefined\"===w||\"function\"===w){for(e=!e.length&&n.length?[\"require\",\"exports\",\"module\"]:e,d=0;d<e.length;d+=1)if(p=f(e[d],o),h=p.f,\"require\"===h)b[d]=_.require(t);else if(\"exports\"===h)b[d]=_.exports(t),v=!0;else if(\"module\"===h)a=b[d]=_.module(t);else if(r(g,h)||r(m,h)||r(y,h))b[d]=c(h);else{if(!p.p)throw new Error(t+\" missing \"+h);p.p.load(p.n,s(o,!0),l(h),{}),b[d]=g[h]}u=n?n.apply(g[t],b):void 0,t&&(a&&a.exports!==i&&a.exports!==g[t]?g[t]=a.exports:u===i&&v||(g[t]=u))}else t&&(g[t]=n)},t=e=d=function(t,e,n,r,o){if(\"string\"==typeof t)return _[t]?_[t](e):c(f(t,e).f);if(!t.splice){if(v=t,v.deps&&d(v.deps,v.callback),!e)return;e.splice?(t=e,e=n,n=null):t=i}return e=e||function(){},\"function\"==typeof n&&(n=r,r=o),r?p(i,t,e,n):setTimeout(function(){p(i,t,e,n)},4),d},d.config=function(t){return d(t)},t._defined=g,n=function(t,e,n){e.splice||(n=e,e=[]),r(g,t)||r(m,t)||(m[t]=[t,e,n])},n.amd={jQuery:!0}}(),n(\"vendor/almond/almond\",function(){}),function(){var t=this,e=t._,i={},r=Array.prototype,o=Object.prototype,s=Function.prototype,a=r.push,l=r.slice,c=r.concat,h=o.toString,u=o.hasOwnProperty,p=r.forEach,d=r.map,f=r.reduce,_=r.reduceRight,g=r.filter,m=r.every,v=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,x=Object.keys,k=s.bind,C=function(t){return t instanceof C?t:this instanceof C?void(this._wrapped=t):new C(t)};\"undefined\"!=typeof exports?(\"undefined\"!=typeof module&&module.exports&&(exports=module.exports=C),exports._=C):t._=C,C.VERSION=\"1.5.2\";var S=C.each=C.forEach=function(t,e,n){if(null!=t)if(p&&t.forEach===p)t.forEach(e,n);else if(t.length===+t.length){for(var r=0,o=t.length;o>r;r++)if(e.call(n,t[r],r,t)===i)return}else for(var s=C.keys(t),r=0,o=s.length;o>r;r++)if(e.call(n,t[s[r]],s[r],t)===i)return};C.map=C.collect=function(t,e,n){var i=[];return null==t?i:d&&t.map===d?t.map(e,n):(S(t,function(t,r,o){i.push(e.call(n,t,r,o))}),i)};var T=\"Reduce of empty array with no initial value\";C.reduce=C.foldl=C.inject=function(t,e,n,i){var r=arguments.length>2;if(null==t&&(t=[]),f&&t.reduce===f)return i&&(e=C.bind(e,i)),r?t.reduce(e,n):t.reduce(e);if(S(t,function(t,o,s){r?n=e.call(i,n,t,o,s):(n=t,r=!0)}),!r)throw new TypeError(T);return n},C.reduceRight=C.foldr=function(t,e,n,i){var r=arguments.length>2;if(null==t&&(t=[]),_&&t.reduceRight===_)return i&&(e=C.bind(e,i)),r?t.reduceRight(e,n):t.reduceRight(e);var o=t.length;if(o!==+o){var s=C.keys(t);o=s.length}if(S(t,function(a,l,c){l=s?s[--o]:--o,r?n=e.call(i,n,t[l],l,c):(n=t[l],r=!0)}),!r)throw new TypeError(T);return n},C.find=C.detect=function(t,e,n){var i;return A(t,function(t,r,o){return e.call(n,t,r,o)?(i=t,!0):void 0}),i},C.filter=C.select=function(t,e,n){var i=[];return null==t?i:g&&t.filter===g?t.filter(e,n):(S(t,function(t,r,o){e.call(n,t,r,o)&&i.push(t)}),i)},C.reject=function(t,e,n){return C.filter(t,function(t,i,r){return!e.call(n,t,i,r)},n)},C.every=C.all=function(t,e,n){e||(e=C.identity);var r=!0;return null==t?r:m&&t.every===m?t.every(e,n):(S(t,function(t,o,s){return(r=r&&e.call(n,t,o,s))?void 0:i}),!!r)};var A=C.some=C.any=function(t,e,n){e||(e=C.identity);var r=!1;return null==t?r:v&&t.some===v?t.some(e,n):(S(t,function(t,o,s){return r||(r=e.call(n,t,o,s))?i:void 0}),!!r)};C.contains=C.include=function(t,e){return null==t?!1:y&&t.indexOf===y?-1!=t.indexOf(e):A(t,function(t){return t===e})},C.invoke=function(t,e){var n=l.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){return(i?e:t[e]).apply(t,n)})},C.pluck=function(t,e){return C.map(t,function(t){return t[e]})},C.where=function(t,e,n){return C.isEmpty(e)?n?void 0:[]:C[n?\"find\":\"filter\"](t,function(t){for(var n in e)if(e[n]!==t[n])return!1;return!0})},C.findWhere=function(t,e){return C.where(t,e,!0)},C.max=function(t,e,n){if(!e&&C.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.max.apply(Math,t);if(!e&&C.isEmpty(t))return-1/0;var i={computed:-1/0,value:-1/0};return S(t,function(t,r,o){var s=e?e.call(n,t,r,o):t;s>i.computed&&(i={value:t,computed:s})}),i.value},C.min=function(t,e,n){if(!e&&C.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.min.apply(Math,t);if(!e&&C.isEmpty(t))return 1/0;var i={computed:1/0,value:1/0};return S(t,function(t,r,o){var s=e?e.call(n,t,r,o):t;s<i.computed&&(i={value:t,computed:s})}),i.value},C.shuffle=function(t){var e,n=0,i=[];return S(t,function(t){e=C.random(n++),i[n-1]=i[e],i[e]=t}),i},C.sample=function(t,e,n){return arguments.length<2||n?t[C.random(t.length-1)]:C.shuffle(t).slice(0,Math.max(0,e))};var D=function(t){return C.isFunction(t)?t:function(e){return e[t]}};C.sortBy=function(t,e,n){var i=D(e);return C.pluck(C.map(t,function(t,e,r){return{value:t,index:e,criteria:i.call(n,t,e,r)}}).sort(function(t,e){var n=t.criteria,i=e.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(i>n||void 0===i)return-1}return t.index-e.index}),\"value\")};var M=function(t){return function(e,n,i){var r={},o=null==n?C.identity:D(n);return S(e,function(n,s){var a=o.call(i,n,s,e);t(r,a,n)}),r}};C.groupBy=M(function(t,e,n){(C.has(t,e)?t[e]:t[e]=[]).push(n)}),C.indexBy=M(function(t,e,n){t[e]=n}),C.countBy=M(function(t,e){C.has(t,e)?t[e]++:t[e]=1}),C.sortedIndex=function(t,e,n,i){n=null==n?C.identity:D(n);for(var r=n.call(i,e),o=0,s=t.length;s>o;){var a=o+s>>>1;n.call(i,t[a])<r?o=a+1:s=a}return o},C.toArray=function(t){return t?C.isArray(t)?l.call(t):t.length===+t.length?C.map(t,C.identity):C.values(t):[]},C.size=function(t){return null==t?0:t.length===+t.length?t.length:C.keys(t).length},C.first=C.head=C.take=function(t,e,n){return null==t?void 0:null==e||n?t[0]:l.call(t,0,e)},C.initial=function(t,e,n){return l.call(t,0,t.length-(null==e||n?1:e))},C.last=function(t,e,n){return null==t?void 0:null==e||n?t[t.length-1]:l.call(t,Math.max(t.length-e,0))},C.rest=C.tail=C.drop=function(t,e,n){return l.call(t,null==e||n?1:e)},C.compact=function(t){return C.filter(t,C.identity)};var E=function(t,e,n){return e&&C.every(t,C.isArray)?c.apply(n,t):(S(t,function(t){C.isArray(t)||C.isArguments(t)?e?a.apply(n,t):E(t,e,n):n.push(t)}),n)};C.flatten=function(t,e){return E(t,e,[])},C.without=function(t){return C.difference(t,l.call(arguments,1))},C.uniq=C.unique=function(t,e,n,i){C.isFunction(e)&&(i=n,n=e,e=!1);var r=n?C.map(t,n,i):t,o=[],s=[];return S(r,function(n,i){(e?i&&s[s.length-1]===n:C.contains(s,n))||(s.push(n),o.push(t[i]))}),o},C.union=function(){return C.uniq(C.flatten(arguments,!0))},C.intersection=function(t){var e=l.call(arguments,1);return C.filter(C.uniq(t),function(t){return C.every(e,function(e){return C.indexOf(e,t)>=0})})},C.difference=function(t){var e=c.apply(r,l.call(arguments,1));return C.filter(t,function(t){return!C.contains(e,t)})},C.zip=function(){for(var t=C.max(C.pluck(arguments,\"length\").concat(0)),e=new Array(t),n=0;t>n;n++)e[n]=C.pluck(arguments,\"\"+n);return e},C.object=function(t,e){if(null==t)return{};for(var n={},i=0,r=t.length;r>i;i++)e?n[t[i]]=e[i]:n[t[i][0]]=t[i][1];return n},C.indexOf=function(t,e,n){if(null==t)return-1;var i=0,r=t.length;if(n){if(\"number\"!=typeof n)return i=C.sortedIndex(t,e),t[i]===e?i:-1;i=0>n?Math.max(0,r+n):n}if(y&&t.indexOf===y)return t.indexOf(e,n);for(;r>i;i++)if(t[i]===e)return i;return-1},C.lastIndexOf=function(t,e,n){if(null==t)return-1;var i=null!=n;if(b&&t.lastIndexOf===b)return i?t.lastIndexOf(e,n):t.lastIndexOf(e);for(var r=i?n:t.length;r--;)if(t[r]===e)return r;return-1},C.range=function(t,e,n){arguments.length<=1&&(e=t||0,t=0),n=arguments[2]||1;for(var i=Math.max(Math.ceil((e-t)/n),0),r=0,o=new Array(i);i>r;)o[r++]=t,t+=n;return o};var P=function(){};C.bind=function(t,e){var n,i;if(k&&t.bind===k)return k.apply(t,l.call(arguments,1));if(!C.isFunction(t))throw new TypeError;return n=l.call(arguments,2),i=function(){if(!(this instanceof i))return t.apply(e,n.concat(l.call(arguments)));P.prototype=t.prototype;var r=new P;P.prototype=null;var o=t.apply(r,n.concat(l.call(arguments)));return Object(o)===o?o:r}},C.partial=function(t){var e=l.call(arguments,1);return function(){return t.apply(this,e.concat(l.call(arguments)))}},C.bindAll=function(t){var e=l.call(arguments,1);if(0===e.length)throw new Error(\"bindAll must be passed function names\");return S(e,function(e){t[e]=C.bind(t[e],t)}),t},C.memoize=function(t,e){var n={};return e||(e=C.identity),function(){var i=e.apply(this,arguments);return C.has(n,i)?n[i]:n[i]=t.apply(this,arguments)}},C.delay=function(t,e){var n=l.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},C.defer=function(t){return C.delay.apply(C,[t,1].concat(l.call(arguments,1)))},C.throttle=function(t,e,n){var i,r,o,s=null,a=0;n||(n={});var l=function(){a=n.leading===!1?0:new Date,s=null,o=t.apply(i,r)};return function(){var c=new Date;a||n.leading!==!1||(a=c);var h=e-(c-a);return i=this,r=arguments,0>=h?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):s||n.trailing===!1||(s=setTimeout(l,h)),o}},C.debounce=function(t,e,n){var i,r,o,s,a;return function(){o=this,r=arguments,s=new Date;var l=function(){var c=new Date-s;e>c?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(o,r)))},c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r)),a}},C.once=function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}},C.wrap=function(t,e){return function(){var n=[t];return a.apply(n,arguments),e.apply(this,n)}},C.compose=function(){var t=arguments;return function(){for(var e=arguments,n=t.length-1;n>=0;n--)e=[t[n].apply(this,e)];return e[0]}},C.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},C.keys=x||function(t){if(t!==Object(t))throw new TypeError(\"Invalid object\");var e=[];for(var n in t)C.has(t,n)&&e.push(n);return e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=new Array(n),r=0;n>r;r++)i[r]=t[e[r]];return i},C.pairs=function(t){for(var e=C.keys(t),n=e.length,i=new Array(n),r=0;n>r;r++)i[r]=[e[r],t[e[r]]];return i},C.invert=function(t){for(var e={},n=C.keys(t),i=0,r=n.length;r>i;i++)e[t[n[i]]]=n[i];return e},C.functions=C.methods=function(t){var e=[];for(var n in t)C.isFunction(t[n])&&e.push(n);return e.sort()},C.extend=function(t){return S(l.call(arguments,1),function(e){if(e)for(var n in e)t[n]=e[n]}),t},C.pick=function(t){var e={},n=c.apply(r,l.call(arguments,1));return S(n,function(n){n in t&&(e[n]=t[n])}),e},C.omit=function(t){var e={},n=c.apply(r,l.call(arguments,1));for(var i in t)C.contains(n,i)||(e[i]=t[i]);return e},C.defaults=function(t){return S(l.call(arguments,1),function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])}),t},C.clone=function(t){return C.isObject(t)?C.isArray(t)?t.slice():C.extend({},t):t},C.tap=function(t,e){return e(t),t};var O=function(t,e,n,i){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof C&&(t=t._wrapped),e instanceof C&&(e=e._wrapped);var r=h.call(t);if(r!=h.call(e))return!1;switch(r){case\"[object String]\":return t==String(e);case\"[object Number]\":return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case\"[object Date]\":case\"[object Boolean]\":return+t==+e;case\"[object RegExp]\":return t.source==e.source&&t.global==e.global&&t.multiline==e.multiline&&t.ignoreCase==e.ignoreCase}if(\"object\"!=typeof t||\"object\"!=typeof e)return!1;for(var o=n.length;o--;)if(n[o]==t)return i[o]==e;var s=t.constructor,a=e.constructor;if(s!==a&&!(C.isFunction(s)&&s instanceof s&&C.isFunction(a)&&a instanceof a))return!1;n.push(t),i.push(e);var l=0,c=!0;if(\"[object Array]\"==r){if(l=t.length,c=l==e.length)for(;l--&&(c=O(t[l],e[l],n,i)););}else{for(var u in t)if(C.has(t,u)&&(l++,!(c=C.has(e,u)&&O(t[u],e[u],n,i))))break;if(c){for(u in e)if(C.has(e,u)&&!l--)break;c=!l}}return n.pop(),i.pop(),c};C.isEqual=function(t,e){return O(t,e,[],[])},C.isEmpty=function(t){if(null==t)return!0;if(C.isArray(t)||C.isString(t))return 0===t.length;for(var e in t)if(C.has(t,e))return!1;return!0},C.isElement=function(t){return!(!t||1!==t.nodeType)},C.isArray=w||function(t){return\"[object Array]\"==h.call(t)},C.isObject=function(t){return t===Object(t)},S([\"Arguments\",\"Function\",\"String\",\"Number\",\"Date\",\"RegExp\"],function(t){C[\"is\"+t]=function(e){return h.call(e)==\"[object \"+t+\"]\"}}),C.isArguments(arguments)||(C.isArguments=function(t){return!(!t||!C.has(t,\"callee\"))}),\"function\"!=typeof/./&&(C.isFunction=function(t){return\"function\"==typeof t}),C.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},C.isNaN=function(t){return C.isNumber(t)&&t!=+t},C.isBoolean=function(t){return t===!0||t===!1||\"[object Boolean]\"==h.call(t)},C.isNull=function(t){return null===t},C.isUndefined=function(t){return void 0===t},C.has=function(t,e){return u.call(t,e)},C.noConflict=function(){return t._=e,this},C.identity=function(t){return t},C.times=function(t,e,n){for(var i=Array(Math.max(0,t)),r=0;t>r;r++)i[r]=e.call(n,r);return i},C.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))};var R={escape:{\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#x27;\"}};R.unescape=C.invert(R.escape);var j={escape:new RegExp(\"[\"+C.keys(R.escape).join(\"\")+\"]\",\"g\"),unescape:new RegExp(\"(\"+C.keys(R.unescape).join(\"|\")+\")\",\"g\")};C.each([\"escape\",\"unescape\"],function(t){C[t]=function(e){return null==e?\"\":(\"\"+e).replace(j[t],function(e){return R[t][e]})}}),C.result=function(t,e){if(null==t)return void 0;var n=t[e];return C.isFunction(n)?n.call(t):n},C.mixin=function(t){S(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return a.apply(t,arguments),F.call(this,n.apply(C,t))}})};var N=0;C.uniqueId=function(t){var e=++N+\"\";return t?t+e:e},C.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g};var H=/(.)^/,I={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\t\":\"t\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},z=/\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;C.template=function(t,e,n){var i;n=C.defaults({},n,C.templateSettings);var r=new RegExp([(n.escape||H).source,(n.interpolate||H).source,(n.evaluate||H).source].join(\"|\")+\"|$\",\"g\"),o=0,s=\"__p+='\";t.replace(r,function(e,n,i,r,a){return s+=t.slice(o,a).replace(z,function(t){return\"\\\\\"+I[t]}),n&&(s+=\"'+\\n((__t=(\"+n+\"))==null?'':_.escape(__t))+\\n'\"),i&&(s+=\"'+\\n((__t=(\"+i+\"))==null?'':__t)+\\n'\"),r&&(s+=\"';\\n\"+r+\"\\n__p+='\"),o=a+e.length,e}),s+=\"';\\n\",n.variable||(s=\"with(obj||{}){\\n\"+s+\"}\\n\"),s=\"var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\\n\"+s+\"return __p;\\n\";try{i=new Function(n.variable||\"obj\",\"_\",s)}catch(a){throw a.source=s,a}if(e)return i(e,C);var l=function(t){return i.call(this,t,C)};return l.source=\"function(\"+(n.variable||\"obj\")+\"){\\n\"+s+\"}\",l},C.chain=function(t){return C(t).chain()};var F=function(t){return this._chain?C(t).chain():t};C.mixin(C),S([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(t){var e=r[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),\"shift\"!=t&&\"splice\"!=t||0!==n.length||delete n[0],F.call(this,n)}}),S([\"concat\",\"join\",\"slice\"],function(t){var e=r[t];C.prototype[t]=function(){return F.call(this,e.apply(this._wrapped,arguments))}}),C.extend(C.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),\"function\"==typeof n&&n.amd&&n(\"underscore\",[],function(){return C})}.call(this),function(t,e){function i(t){var e=t.length,n=se.type(t);return se.isWindow(t)?!1:1===t.nodeType&&e?!0:\"array\"===n||\"function\"!==n&&(0===e||\"number\"==typeof e&&e>0&&e-1 in t)}function r(t){var e=_e[t]={};return se.each(t.match(le)||[],function(t,n){e[n]=!0}),e}function o(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=se.expando+Math.random()}function s(t,n,i){var r;if(i===e&&1===t.nodeType)if(r=\"data-\"+n.replace(ye,\"-$1\").toLowerCase(),i=t.getAttribute(r),\"string\"==typeof i){try{i=\"true\"===i?!0:\"false\"===i?!1:\"null\"===i?null:+i+\"\"===i?+i:ve.test(i)?JSON.parse(i):i}catch(o){}ge.set(t,n,i)}else i=e;return i}function a(){return!0}function l(){return!1}function c(){try{return U.activeElement}catch(t){}}function h(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function u(t,e,n){if(se.isFunction(e))return se.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return se.grep(t,function(t){return t===e!==n});if(\"string\"==typeof e){if(Me.test(e))return se.filter(e,t,n);e=se.filter(e,t)}return se.grep(t,function(t){return ne.call(e,t)>=0!==n})}function p(t,e){return se.nodeName(t,\"table\")&&se.nodeName(1===e.nodeType?e:e.firstChild,\"tr\")?t.getElementsByTagName(\"tbody\")[0]||t.appendChild(t.ownerDocument.createElement(\"tbody\")):t}function d(t){return t.type=(null!==t.getAttribute(\"type\"))+\"/\"+t.type,t}function f(t){var e=Le.exec(t.type);return e?t.type=e[1]:t.removeAttribute(\"type\"),t}function _(t,e){for(var n=t.length,i=0;n>i;i++)me.set(t[i],\"globalEval\",!e||me.get(e[i],\"globalEval\"))}function g(t,e){var n,i,r,o,s,a,l,c;if(1===e.nodeType){if(me.hasData(t)&&(o=me.access(t),s=me.set(e,o),c=o.events)){delete s.handle,s.events={};for(r in c)for(n=0,i=c[r].length;i>n;n++)se.event.add(e,r,c[r][n])}ge.hasData(t)&&(a=ge.access(t),l=se.extend({},a),ge.set(e,l))}}function m(t,n){var i=t.getElementsByTagName?t.getElementsByTagName(n||\"*\"):t.querySelectorAll?t.querySelectorAll(n||\"*\"):[];return n===e||n&&se.nodeName(t,n)?se.merge([t],i):i}function v(t,e){var n=e.nodeName.toLowerCase();\"input\"===n&&Ie.test(t.type)?e.checked=t.checked:(\"input\"===n||\"textarea\"===n)&&(e.defaultValue=t.defaultValue)}function y(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),i=e,r=tn.length;r--;)if(e=tn[r]+n,e in t)return e;return i}function b(t,e){return t=e||t,\"none\"===se.css(t,\"display\")||!se.contains(t.ownerDocument,t)}function w(e){return t.getComputedStyle(e,null)}function x(t,e){for(var n,i,r,o=[],s=0,a=t.length;a>s;s++)i=t[s],i.style&&(o[s]=me.get(i,\"olddisplay\"),n=i.style.display,e?(o[s]||\"none\"!==n||(i.style.display=\"\"),\"\"===i.style.display&&b(i)&&(o[s]=me.access(i,\"olddisplay\",T(i.nodeName)))):o[s]||(r=b(i),(n&&\"none\"!==n||!r)&&me.set(i,\"olddisplay\",r?n:se.css(i,\"display\"))));for(s=0;a>s;s++)i=t[s],i.style&&(e&&\"none\"!==i.style.display&&\"\"!==i.style.display||(i.style.display=e?o[s]||\"\":\"none\"));return t}function k(t,e,n){var i=Ye.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||\"px\"):e}function C(t,e,n,i,r){for(var o=n===(i?\"border\":\"content\")?4:\"width\"===e?1:0,s=0;4>o;o+=2)\"margin\"===n&&(s+=se.css(t,n+Ze[o],!0,r)),i?(\"content\"===n&&(s-=se.css(t,\"padding\"+Ze[o],!0,r)),\"margin\"!==n&&(s-=se.css(t,\"border\"+Ze[o]+\"Width\",!0,r))):(s+=se.css(t,\"padding\"+Ze[o],!0,r),\"padding\"!==n&&(s+=se.css(t,\"border\"+Ze[o]+\"Width\",!0,r)));return s}function S(t,e,n){var i=!0,r=\"width\"===e?t.offsetWidth:t.offsetHeight,o=w(t),s=se.support.boxSizing&&\"border-box\"===se.css(t,\"boxSizing\",!1,o);if(0>=r||null==r){if(r=We(t,e,o),(0>r||null==r)&&(r=t.style[e]),Ge.test(r))return r;i=s&&(se.support.boxSizingReliable||r===t.style[e]),r=parseFloat(r)||0}return r+C(t,e,n||(s?\"border\":\"content\"),i,o)+\"px\"}function T(t){var e=U,n=Ke[t];return n||(n=A(t,e),\"none\"!==n&&n||($e=($e||se(\"<iframe frameborder='0' width='0' height='0'/>\").css(\"cssText\",\"display:block !important\")).appendTo(e.documentElement),e=($e[0].contentWindow||$e[0].contentDocument).document,e.write(\"<!doctype html><html><body>\"),e.close(),n=A(t,e),$e.detach()),Ke[t]=n),n}function A(t,e){var n=se(e.createElement(t)).appendTo(e.body),i=se.css(n[0],\"display\");return n.remove(),i}function D(t,e,n,i){var r;if(se.isArray(e))se.each(e,function(e,r){n||nn.test(t)?i(t,r):D(t+\"[\"+(\"object\"==typeof r?e:\"\")+\"]\",r,n,i)});else if(n||\"object\"!==se.type(e))i(t,e);else for(r in e)D(t+\"[\"+r+\"]\",e[r],n,i)}function M(t){return function(e,n){\"string\"!=typeof e&&(n=e,e=\"*\");var i,r=0,o=e.toLowerCase().match(le)||[];if(se.isFunction(n))for(;i=o[r++];)\"+\"===i[0]?(i=i.slice(1)||\"*\",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function E(t,e,n,i){function r(a){var l;return o[a]=!0,se.each(t[a]||[],function(t,a){var c=a(e,n,i);return\"string\"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}var o={},s=t===bn;return r(e.dataTypes[0])||!o[\"*\"]&&r(\"*\")}function P(t,n){var i,r,o=se.ajaxSettings.flatOptions||{};for(i in n)n[i]!==e&&((o[i]?t:r||(r={}))[i]=n[i]);return r&&se.extend(!0,t,r),t}function O(t,n,i){for(var r,o,s,a,l=t.contents,c=t.dataTypes;\"*\"===c[0];)c.shift(),r===e&&(r=t.mimeType||n.getResponseHeader(\"Content-Type\"));if(r)for(o in l)if(l[o]&&l[o].test(r)){c.unshift(o);break}if(c[0]in i)s=c[0];else{for(o in i){if(!c[0]||t.converters[o+\" \"+c[0]]){s=o;break}a||(a=o)}s=s||a}return s?(s!==c[0]&&c.unshift(s),i[s]):void 0}function R(t,e,n,i){var r,o,s,a,l,c={},h=t.dataTypes.slice();if(h[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=h.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=h.shift())if(\"*\"===o)o=l;else if(\"*\"!==l&&l!==o){if(s=c[l+\" \"+o]||c[\"* \"+o],!s)for(r in c)if(a=r.split(\" \"),a[1]===o&&(s=c[l+\" \"+a[0]]||c[\"* \"+a[0]])){s===!0?s=c[r]:c[r]!==!0&&(o=a[0],h.unshift(a[1]));break}if(s!==!0)if(s&&t[\"throws\"])e=s(e);else try{e=s(e)}catch(u){return{state:\"parsererror\",error:s?u:\"No conversion from \"+l+\" to \"+o}}}return{state:\"success\",data:e}}function j(){return setTimeout(function(){Mn=e}),Mn=se.now()}function N(t,e,n){for(var i,r=(Nn[e]||[]).concat(Nn[\"*\"]),o=0,s=r.length;s>o;o++)if(i=r[o].call(n,e,t))return i}function H(t,e,n){var i,r,o=0,s=jn.length,a=se.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=Mn||j(),n=Math.max(0,c.startTime+c.duration-e),i=n/c.duration||0,o=1-i,s=0,l=c.tweens.length;l>s;s++)c.tweens[s].run(o);return a.notifyWith(t,[c,o,n]),1>o&&l?n:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:se.extend({},e),opts:se.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:Mn||j(),duration:n.duration,tweens:[],createTween:function(e,n){var i=se.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return e?a.resolveWith(t,[c,e]):a.rejectWith(t,[c,e]),this}}),h=c.props;for(I(h,c.opts.specialEasing);s>o;o++)if(i=jn[o].call(c,t,h,c.opts))return i;return se.map(h,N,c),se.isFunction(c.opts.start)&&c.opts.start.call(t,c),se.fx.timer(se.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function I(t,e){var n,i,r,o,s;for(n in t)if(i=se.camelCase(n),r=e[i],o=t[n],se.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),s=se.cssHooks[i],s&&\"expand\"in s){o=s.expand(o),delete t[i];for(n in o)n in t||(t[n]=o[n],e[n]=r)}else e[i]=r}function z(t,n,i){var r,o,s,a,l,c,h=this,u={},p=t.style,d=t.nodeType&&b(t),f=me.get(t,\"fxshow\");i.queue||(l=se._queueHooks(t,\"fx\"),null==l.unqueued&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,se.queue(t,\"fx\").length||l.empty.fire()})})),1===t.nodeType&&(\"height\"in n||\"width\"in n)&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],\"inline\"===se.css(t,\"display\")&&\"none\"===se.css(t,\"float\")&&(p.display=\"inline-block\")),i.overflow&&(p.overflow=\"hidden\",h.always(function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}));for(r in n)if(o=n[r],Pn.exec(o)){if(delete n[r],s=s||\"toggle\"===o,o===(d?\"hide\":\"show\")){if(\"show\"!==o||!f||f[r]===e)continue;d=!0}u[r]=f&&f[r]||se.style(t,r)}if(!se.isEmptyObject(u)){f?\"hidden\"in f&&(d=f.hidden):f=me.access(t,\"fxshow\",{}),s&&(f.hidden=!d),d?se(t).show():h.done(function(){se(t).hide()}),h.done(function(){var e;me.remove(t,\"fxshow\");for(e in u)se.style(t,e,u[e])});for(r in u)a=N(d?f[r]:0,r,h),r in f||(f[r]=a.start,d&&(a.end=a.start,a.start=\"width\"===r||\"height\"===r?1:0))}}function F(t,e,n,i,r){return new F.prototype.init(t,e,n,i,r)}function L(t,e){var n,i={height:t},r=0;for(e=e?1:0;4>r;r+=2-e)n=Ze[r],i[\"margin\"+n]=i[\"padding\"+n]=t;return e&&(i.opacity=i.width=t),i}function V(t){return se.isWindow(t)?t:9===t.nodeType&&t.defaultView}var B,W,$=typeof e,q=t.location,U=t.document,Y=U.documentElement,G=t.jQuery,X=t.$,K={},Q=[],J=\"2.0.3\",Z=Q.concat,te=Q.push,ee=Q.slice,ne=Q.indexOf,ie=K.toString,re=K.hasOwnProperty,oe=J.trim,se=function(t,e){return new se.fn.init(t,e,B)},ae=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,le=/\\S+/g,ce=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,he=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,ue=/^-ms-/,pe=/-([\\da-z])/gi,de=function(t,e){return e.toUpperCase()},fe=function(){U.removeEventListener(\"DOMContentLoaded\",fe,!1),t.removeEventListener(\"load\",fe,!1),se.ready()};se.fn=se.prototype={jquery:J,constructor:se,init:function(t,n,i){var r,o;if(!t)return this;if(\"string\"==typeof t){if(r=\"<\"===t.charAt(0)&&\">\"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:ce.exec(t),!r||!r[1]&&n)return!n||n.jquery?(n||i).find(t):this.constructor(n).find(t);if(r[1]){if(n=n instanceof se?n[0]:n,se.merge(this,se.parseHTML(r[1],n&&n.nodeType?n.ownerDocument||n:U,!0)),he.test(r[1])&&se.isPlainObject(n))for(r in n)se.isFunction(this[r])?this[r](n[r]):this.attr(r,n[r]);return this}return o=U.getElementById(r[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=U,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):se.isFunction(t)?i.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),se.makeArray(t,this))},selector:\"\",length:0,toArray:function(){return ee.call(this)},get:function(t){return null==t?this.toArray():0>t?this[this.length+t]:this[t]},pushStack:function(t){var e=se.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return se.each(this,t,e)},ready:function(t){return se.ready.promise().done(t),this},slice:function(){return this.pushStack(ee.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},map:function(t){return this.pushStack(se.map(this,function(e,n){return t.call(e,n,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:te,sort:[].sort,splice:[].splice},se.fn.init.prototype=se.fn,se.extend=se.fn.extend=function(){var t,n,i,r,o,s,a=arguments[0]||{},l=1,c=arguments.length,h=!1;for(\"boolean\"==typeof a&&(h=a,a=arguments[1]||{},l=2),\"object\"==typeof a||se.isFunction(a)||(a={}),c===l&&(a=this,--l);c>l;l++)if(null!=(t=arguments[l]))for(n in t)i=a[n],r=t[n],a!==r&&(h&&r&&(se.isPlainObject(r)||(o=se.isArray(r)))?(o?(o=!1,s=i&&se.isArray(i)?i:[]):s=i&&se.isPlainObject(i)?i:{},a[n]=se.extend(h,s,r)):r!==e&&(a[n]=r));return a},se.extend({expando:\"jQuery\"+(J+Math.random()).replace(/\\D/g,\"\"),noConflict:function(e){return t.$===se&&(t.$=X),e&&t.jQuery===se&&(t.jQuery=G),se},isReady:!1,readyWait:1,holdReady:function(t){t?se.readyWait++:se.ready(!0)},ready:function(t){(t===!0?--se.readyWait:se.isReady)||(se.isReady=!0,t!==!0&&--se.readyWait>0||(W.resolveWith(U,[se]),se.fn.trigger&&se(U).trigger(\"ready\").off(\"ready\")))},isFunction:function(t){return\"function\"===se.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?String(t):\"object\"==typeof t||\"function\"==typeof t?K[ie.call(t)]||\"object\":typeof t},isPlainObject:function(t){if(\"object\"!==se.type(t)||t.nodeType||se.isWindow(t))return!1;try{if(t.constructor&&!re.call(t.constructor.prototype,\"isPrototypeOf\"))return!1}catch(e){return!1}return!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw new Error(t)},parseHTML:function(t,e,n){if(!t||\"string\"!=typeof t)return null;\"boolean\"==typeof e&&(n=e,e=!1),e=e||U;var i=he.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=se.buildFragment([t],e,r),r&&se(r).remove(),se.merge([],i.childNodes))},parseJSON:JSON.parse,parseXML:function(t){var n,i;if(!t||\"string\"!=typeof t)return null;try{i=new DOMParser,n=i.parseFromString(t,\"text/xml\")}catch(r){n=e}return(!n||n.getElementsByTagName(\"parsererror\").length)&&se.error(\"Invalid XML: \"+t),n},noop:function(){},globalEval:function(t){var e,n=eval;t=se.trim(t),t&&(1===t.indexOf(\"use strict\")?(e=U.createElement(\"script\"),e.text=t,U.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(ue,\"ms-\").replace(pe,de)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var r,o=0,s=t.length,a=i(t);if(n){if(a)for(;s>o&&(r=e.apply(t[o],n),r!==!1);o++);else for(o in t)if(r=e.apply(t[o],n),r===!1)break}else if(a)for(;s>o&&(r=e.call(t[o],o,t[o]),r!==!1);o++);else for(o in t)if(r=e.call(t[o],o,t[o]),r===!1)break;return t},trim:function(t){return null==t?\"\":oe.call(t)},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?se.merge(n,\"string\"==typeof t?[t]:t):te.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:ne.call(e,t,n)},merge:function(t,n){var i=n.length,r=t.length,o=0;if(\"number\"==typeof i)for(;i>o;o++)t[r++]=n[o];else for(;n[o]!==e;)t[r++]=n[o++];return t.length=r,t},grep:function(t,e,n){var i,r=[],o=0,s=t.length;for(n=!!n;s>o;o++)i=!!e(t[o],o),n!==i&&r.push(t[o]);return r},map:function(t,e,n){var r,o=0,s=t.length,a=i(t),l=[];if(a)for(;s>o;o++)r=e(t[o],o,n),null!=r&&(l[l.length]=r);else for(o in t)r=e(t[o],o,n),null!=r&&(l[l.length]=r);return Z.apply([],l)},guid:1,proxy:function(t,n){var i,r,o;return\"string\"==typeof n&&(i=t[n],n=t,t=i),se.isFunction(t)?(r=ee.call(arguments,2),o=function(){return t.apply(n||this,r.concat(ee.call(arguments)))},o.guid=t.guid=t.guid||se.guid++,o):e},access:function(t,n,i,r,o,s,a){var l=0,c=t.length,h=null==i;if(\"object\"===se.type(i)){o=!0;for(l in i)se.access(t,n,l,i[l],!0,s,a)}else if(r!==e&&(o=!0,se.isFunction(r)||(a=!0),h&&(a?(n.call(t,r),n=null):(h=n,n=function(t,e,n){return h.call(se(t),n)})),n))for(;c>l;l++)n(t[l],i,a?r:r.call(t[l],l,n(t[l],i)));return o?t:h?n.call(t):c?n(t[0],i):s},now:Date.now,swap:function(t,e,n,i){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=n.apply(t,i||[]);for(o in e)t.style[o]=s[o];return r}}),se.ready.promise=function(e){return W||(W=se.Deferred(),\"complete\"===U.readyState?setTimeout(se.ready):(U.addEventListener(\"DOMContentLoaded\",fe,!1),t.addEventListener(\"load\",fe,!1))),W.promise(e)\n",
        "                },se.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"),function(t,e){K[\"[object \"+e+\"]\"]=e.toLowerCase()}),B=se(U),function(t,e){function n(t,e,n,i){var r,o,s,a,l,c,h,u,f,_;if((e?e.ownerDocument||e:L)!==O&&P(e),e=e||O,n=n||[],!t||\"string\"!=typeof t)return n;if(1!==(a=e.nodeType)&&9!==a)return[];if(j&&!i){if(r=ye.exec(t))if(s=r[1]){if(9===a){if(o=e.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(s))&&z(e,o)&&o.id===s)return n.push(o),n}else{if(r[2])return te.apply(n,e.getElementsByTagName(t)),n;if((s=r[3])&&k.getElementsByClassName&&e.getElementsByClassName)return te.apply(n,e.getElementsByClassName(s)),n}if(k.qsa&&(!N||!N.test(t))){if(u=h=F,f=e,_=9===a&&t,1===a&&\"object\"!==e.nodeName.toLowerCase()){for(c=p(t),(h=e.getAttribute(\"id\"))?u=h.replace(xe,\"\\\\$&\"):e.setAttribute(\"id\",u),u=\"[id='\"+u+\"'] \",l=c.length;l--;)c[l]=u+d(c[l]);f=de.test(t)&&e.parentNode||e,_=c.join(\",\")}if(_)try{return te.apply(n,f.querySelectorAll(_)),n}catch(g){}finally{h||e.removeAttribute(\"id\")}}}return w(t.replace(he,\"$1\"),e,n,i)}function i(){function t(n,i){return e.push(n+=\" \")>S.cacheLength&&delete t[e.shift()],t[n]=i}var e=[];return t}function r(t){return t[F]=!0,t}function o(t){var e=O.createElement(\"div\");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function s(t,e){for(var n=t.split(\"|\"),i=t.length;i--;)S.attrHandle[n[i]]=e}function a(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||X)-(~t.sourceIndex||X);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function l(t){return function(e){var n=e.nodeName.toLowerCase();return\"input\"===n&&e.type===t}}function c(t){return function(e){var n=e.nodeName.toLowerCase();return(\"input\"===n||\"button\"===n)&&e.type===t}}function h(t){return r(function(e){return e=+e,r(function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function u(){}function p(t,e){var i,r,o,s,a,l,c,h=$[t+\" \"];if(h)return e?0:h.slice(0);for(a=t,l=[],c=S.preFilter;a;){(!i||(r=ue.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=pe.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(he,\" \")}),a=a.slice(i.length));for(s in S.filter)!(r=me[s].exec(a))||c[s]&&!(r=c[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return e?a.length:a?n.error(t):$(t,l).slice(0)}function d(t){for(var e=0,n=t.length,i=\"\";n>e;e++)i+=t[e].value;return i}function f(t,e,n){var i=e.dir,r=n&&\"parentNode\"===i,o=B++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o)}:function(e,n,s){var a,l,c,h=V+\" \"+o;if(s){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,s))return!0}else for(;e=e[i];)if(1===e.nodeType||r)if(c=e[F]||(e[F]={}),(l=c[i])&&l[0]===h){if((a=l[1])===!0||a===C)return a===!0}else if(l=c[i]=[h],l[1]=t(e,n,s)||C,l[1]===!0)return!0}}function _(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,e,n,i,r){for(var o,s=[],a=0,l=t.length,c=null!=e;l>a;a++)(o=t[a])&&(!n||n(o,i,r))&&(s.push(o),c&&e.push(a));return s}function m(t,e,n,i,o,s){return i&&!i[F]&&(i=m(i)),o&&!o[F]&&(o=m(o,s)),r(function(r,s,a,l){var c,h,u,p=[],d=[],f=s.length,_=r||b(e||\"*\",a.nodeType?[a]:a,[]),m=!t||!r&&e?_:g(_,p,t,a,l),v=n?o||(r?t:f||i)?[]:s:m;if(n&&n(m,v,a,l),i)for(c=g(v,d),i(c,[],a,l),h=c.length;h--;)(u=c[h])&&(v[d[h]]=!(m[d[h]]=u));if(r){if(o||t){if(o){for(c=[],h=v.length;h--;)(u=v[h])&&c.push(m[h]=u);o(null,v=[],c,l)}for(h=v.length;h--;)(u=v[h])&&(c=o?ne.call(r,u):p[h])>-1&&(r[c]=!(s[c]=u))}}else v=g(v===s?v.splice(f,v.length):v),o?o(null,s,v,l):te.apply(s,v)})}function v(t){for(var e,n,i,r=t.length,o=S.relative[t[0].type],s=o||S.relative[\" \"],a=o?1:0,l=f(function(t){return t===e},s,!0),c=f(function(t){return ne.call(e,t)>-1},s,!0),h=[function(t,n,i){return!o&&(i||n!==M)||((e=n).nodeType?l(t,n,i):c(t,n,i))}];r>a;a++)if(n=S.relative[t[a].type])h=[f(_(h),n)];else{if(n=S.filter[t[a].type].apply(null,t[a].matches),n[F]){for(i=++a;r>i&&!S.relative[t[i].type];i++);return m(a>1&&_(h),a>1&&d(t.slice(0,a-1).concat({value:\" \"===t[a-2].type?\"*\":\"\"})).replace(he,\"$1\"),n,i>a&&v(t.slice(a,i)),r>i&&v(t=t.slice(i)),r>i&&d(t))}h.push(n)}return _(h)}function y(t,e){var i=0,o=e.length>0,s=t.length>0,a=function(r,a,l,c,h){var u,p,d,f=[],_=0,m=\"0\",v=r&&[],y=null!=h,b=M,w=r||s&&S.find.TAG(\"*\",h&&a.parentNode||a),x=V+=null==b?1:Math.random()||.1;for(y&&(M=a!==O&&a,C=i);null!=(u=w[m]);m++){if(s&&u){for(p=0;d=t[p++];)if(d(u,a,l)){c.push(u);break}y&&(V=x,C=++i)}o&&((u=!d&&u)&&_--,r&&v.push(u))}if(_+=m,o&&m!==_){for(p=0;d=e[p++];)d(v,f,a,l);if(r){if(_>0)for(;m--;)v[m]||f[m]||(f[m]=J.call(c));f=g(f)}te.apply(c,f),y&&!r&&f.length>0&&_+e.length>1&&n.uniqueSort(c)}return y&&(V=x,M=b),v};return o?r(a):a}function b(t,e,i){for(var r=0,o=e.length;o>r;r++)n(t,e[r],i);return i}function w(t,e,n,i){var r,o,s,a,l,c=p(t);if(!i&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&\"ID\"===(s=o[0]).type&&k.getById&&9===e.nodeType&&j&&S.relative[o[1].type]){if(e=(S.find.ID(s.matches[0].replace(ke,Ce),e)||[])[0],!e)return n;t=t.slice(o.shift().value.length)}for(r=me.needsContext.test(t)?0:o.length;r--&&(s=o[r],!S.relative[a=s.type]);)if((l=S.find[a])&&(i=l(s.matches[0].replace(ke,Ce),de.test(o[0].type)&&e.parentNode||e))){if(o.splice(r,1),t=i.length&&d(o),!t)return te.apply(n,i),n;break}}return D(t,c)(i,e,!j,n,de.test(t)),n}var x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z,F=\"sizzle\"+-new Date,L=t.document,V=0,B=0,W=i(),$=i(),q=i(),U=!1,Y=function(t,e){return t===e?(U=!0,0):0},G=typeof e,X=1<<31,K={}.hasOwnProperty,Q=[],J=Q.pop,Z=Q.push,te=Q.push,ee=Q.slice,ne=Q.indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]===t)return e;return-1},ie=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",re=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",oe=\"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",ae=oe.replace(\"w\",\"w#\"),le=\"\\\\[\"+re+\"*(\"+oe+\")\"+re+\"*(?:([*^$|!~]?=)\"+re+\"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\"+ae+\")|)|)\"+re+\"*\\\\]\",ce=\":(\"+oe+\")(?:\\\\(((['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+le.replace(3,8)+\")*)|.*)\\\\)|)\",he=new RegExp(\"^\"+re+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+re+\"+$\",\"g\"),ue=new RegExp(\"^\"+re+\"*,\"+re+\"*\"),pe=new RegExp(\"^\"+re+\"*([>+~]|\"+re+\")\"+re+\"*\"),de=new RegExp(re+\"*[+~]\"),fe=new RegExp(\"=\"+re+\"*([^\\\\]'\\\"]*)\"+re+\"*\\\\]\",\"g\"),_e=new RegExp(ce),ge=new RegExp(\"^\"+ae+\"$\"),me={ID:new RegExp(\"^#(\"+oe+\")\"),CLASS:new RegExp(\"^\\\\.(\"+oe+\")\"),TAG:new RegExp(\"^(\"+oe.replace(\"w\",\"w*\")+\")\"),ATTR:new RegExp(\"^\"+le),PSEUDO:new RegExp(\"^\"+ce),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+re+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+re+\"*(?:([+-]|)\"+re+\"*(\\\\d+)|))\"+re+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+ie+\")$\",\"i\"),needsContext:new RegExp(\"^\"+re+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+re+\"*((?:-\\\\d)?\\\\d*)\"+re+\"*\\\\)|)(?=[^-]|$)\",\"i\")},ve=/^[^{]+\\{\\s*\\[native \\w/,ye=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,be=/^(?:input|select|textarea|button)$/i,we=/^h\\d$/i,xe=/'|\\\\/g,ke=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+re+\"?|(\"+re+\")|.)\",\"ig\"),Ce=function(t,e,n){var i=\"0x\"+e-65536;return i!==i||n?e:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{te.apply(Q=ee.call(L.childNodes),L.childNodes),Q[L.childNodes.length].nodeType}catch(Se){te={apply:Q.length?function(t,e){Z.apply(t,ee.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}A=n.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?\"HTML\"!==e.nodeName:!1},k=n.support={},P=n.setDocument=function(t){var e=t?t.ownerDocument||t:L,n=e.defaultView;return e!==O&&9===e.nodeType&&e.documentElement?(O=e,R=e.documentElement,j=!A(e),n&&n.attachEvent&&n!==n.top&&n.attachEvent(\"onbeforeunload\",function(){P()}),k.attributes=o(function(t){return t.className=\"i\",!t.getAttribute(\"className\")}),k.getElementsByTagName=o(function(t){return t.appendChild(e.createComment(\"\")),!t.getElementsByTagName(\"*\").length}),k.getElementsByClassName=o(function(t){return t.innerHTML=\"<div class='a'></div><div class='a i'></div>\",t.firstChild.className=\"i\",2===t.getElementsByClassName(\"i\").length}),k.getById=o(function(t){return R.appendChild(t).id=F,!e.getElementsByName||!e.getElementsByName(F).length}),k.getById?(S.find.ID=function(t,e){if(typeof e.getElementById!==G&&j){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},S.filter.ID=function(t){var e=t.replace(ke,Ce);return function(t){return t.getAttribute(\"id\")===e}}):(delete S.find.ID,S.filter.ID=function(t){var e=t.replace(ke,Ce);return function(t){var n=typeof t.getAttributeNode!==G&&t.getAttributeNode(\"id\");return n&&n.value===e}}),S.find.TAG=k.getElementsByTagName?function(t,e){return typeof e.getElementsByTagName!==G?e.getElementsByTagName(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if(\"*\"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},S.find.CLASS=k.getElementsByClassName&&function(t,e){return typeof e.getElementsByClassName!==G&&j?e.getElementsByClassName(t):void 0},H=[],N=[],(k.qsa=ve.test(e.querySelectorAll))&&(o(function(t){t.innerHTML=\"<select><option selected=''></option></select>\",t.querySelectorAll(\"[selected]\").length||N.push(\"\\\\[\"+re+\"*(?:value|\"+ie+\")\"),t.querySelectorAll(\":checked\").length||N.push(\":checked\")}),o(function(t){var n=e.createElement(\"input\");n.setAttribute(\"type\",\"hidden\"),t.appendChild(n).setAttribute(\"t\",\"\"),t.querySelectorAll(\"[t^='']\").length&&N.push(\"[*^$]=\"+re+\"*(?:''|\\\"\\\")\"),t.querySelectorAll(\":enabled\").length||N.push(\":enabled\",\":disabled\"),t.querySelectorAll(\"*,:x\"),N.push(\",.*:\")})),(k.matchesSelector=ve.test(I=R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&o(function(t){k.disconnectedMatch=I.call(t,\"div\"),I.call(t,\"[s!='']:x\"),H.push(\"!=\",ce)}),N=N.length&&new RegExp(N.join(\"|\")),H=H.length&&new RegExp(H.join(\"|\")),z=ve.test(R.contains)||R.compareDocumentPosition?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Y=R.compareDocumentPosition?function(t,n){if(t===n)return U=!0,0;var i=n.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(n);return i?1&i||!k.sortDetached&&n.compareDocumentPosition(t)===i?t===e||z(L,t)?-1:n===e||z(L,n)?1:E?ne.call(E,t)-ne.call(E,n):0:4&i?-1:1:t.compareDocumentPosition?-1:1}:function(t,n){var i,r=0,o=t.parentNode,s=n.parentNode,l=[t],c=[n];if(t===n)return U=!0,0;if(!o||!s)return t===e?-1:n===e?1:o?-1:s?1:E?ne.call(E,t)-ne.call(E,n):0;if(o===s)return a(t,n);for(i=t;i=i.parentNode;)l.unshift(i);for(i=n;i=i.parentNode;)c.unshift(i);for(;l[r]===c[r];)r++;return r?a(l[r],c[r]):l[r]===L?-1:c[r]===L?1:0},e):O},n.matches=function(t,e){return n(t,null,null,e)},n.matchesSelector=function(t,e){if((t.ownerDocument||t)!==O&&P(t),e=e.replace(fe,\"='$1']\"),!(!k.matchesSelector||!j||H&&H.test(e)||N&&N.test(e)))try{var i=I.call(t,e);if(i||k.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(r){}return n(e,O,null,[t]).length>0},n.contains=function(t,e){return(t.ownerDocument||t)!==O&&P(t),z(t,e)},n.attr=function(t,n){(t.ownerDocument||t)!==O&&P(t);var i=S.attrHandle[n.toLowerCase()],r=i&&K.call(S.attrHandle,n.toLowerCase())?i(t,n,!j):e;return r===e?k.attributes||!j?t.getAttribute(n):(r=t.getAttributeNode(n))&&r.specified?r.value:null:r},n.error=function(t){throw new Error(\"Syntax error, unrecognized expression: \"+t)},n.uniqueSort=function(t){var e,n=[],i=0,r=0;if(U=!k.detectDuplicates,E=!k.sortStable&&t.slice(0),t.sort(Y),U){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return t},T=n.getText=function(t){var e,n=\"\",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if(\"string\"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=T(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i];i++)n+=T(e);return n},S=n.selectors={cacheLength:50,createPseudo:r,match:me,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(ke,Ce),t[3]=(t[4]||t[5]||\"\").replace(ke,Ce),\"~=\"===t[2]&&(t[3]=\" \"+t[3]+\" \"),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),\"nth\"===t[1].slice(0,3)?(t[3]||n.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*(\"even\"===t[3]||\"odd\"===t[3])),t[5]=+(t[7]+t[8]||\"odd\"===t[3])):t[3]&&n.error(t[0]),t},PSEUDO:function(t){var n,i=!t[5]&&t[2];return me.CHILD.test(t[0])?null:(t[3]&&t[4]!==e?t[2]=t[4]:i&&_e.test(i)&&(n=p(i,!0))&&(n=i.indexOf(\")\",i.length-n)-i.length)&&(t[0]=t[0].slice(0,n),t[2]=i.slice(0,n)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(ke,Ce).toLowerCase();return\"*\"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=W[t+\" \"];return e||(e=new RegExp(\"(^|\"+re+\")\"+t+\"(\"+re+\"|$)\"))&&W(t,function(t){return e.test(\"string\"==typeof t.className&&t.className||typeof t.getAttribute!==G&&t.getAttribute(\"class\")||\"\")})},ATTR:function(t,e,i){return function(r){var o=n.attr(r,t);return null==o?\"!=\"===e:e?(o+=\"\",\"=\"===e?o===i:\"!=\"===e?o!==i:\"^=\"===e?i&&0===o.indexOf(i):\"*=\"===e?i&&o.indexOf(i)>-1:\"$=\"===e?i&&o.slice(-i.length)===i:\"~=\"===e?(\" \"+o+\" \").indexOf(i)>-1:\"|=\"===e?o===i||o.slice(0,i.length+1)===i+\"-\":!1):!0}},CHILD:function(t,e,n,i,r){var o=\"nth\"!==t.slice(0,3),s=\"last\"!==t.slice(-4),a=\"of-type\"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var c,h,u,p,d,f,_=o!==s?\"nextSibling\":\"previousSibling\",g=e.parentNode,m=a&&e.nodeName.toLowerCase(),v=!l&&!a;if(g){if(o){for(;_;){for(u=e;u=u[_];)if(a?u.nodeName.toLowerCase()===m:1===u.nodeType)return!1;f=_=\"only\"===t&&!f&&\"nextSibling\"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&v){for(h=g[F]||(g[F]={}),c=h[t]||[],d=c[0]===V&&c[1],p=c[0]===V&&c[2],u=d&&g.childNodes[d];u=++d&&u&&u[_]||(p=d=0)||f.pop();)if(1===u.nodeType&&++p&&u===e){h[t]=[V,d,p];break}}else if(v&&(c=(e[F]||(e[F]={}))[t])&&c[0]===V)p=c[1];else for(;(u=++d&&u&&u[_]||(p=d=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==m:1!==u.nodeType)||!++p||(v&&((u[F]||(u[F]={}))[t]=[V,p]),u!==e)););return p-=r,p===i||p%i===0&&p/i>=0}}},PSEUDO:function(t,e){var i,o=S.pseudos[t]||S.setFilters[t.toLowerCase()]||n.error(\"unsupported pseudo: \"+t);return o[F]?o(e):o.length>1?(i=[t,t,\"\",e],S.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,n){for(var i,r=o(t,e),s=r.length;s--;)i=ne.call(t,r[s]),t[i]=!(n[i]=r[s])}):function(t){return o(t,0,i)}):o}},pseudos:{not:r(function(t){var e=[],n=[],i=D(t.replace(he,\"$1\"));return i[F]?r(function(t,e,n,r){for(var o,s=i(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,r,o){return e[0]=t,i(e,null,o,n),!n.pop()}}),has:r(function(t){return function(e){return n(t,e).length>0}}),contains:r(function(t){return function(e){return(e.textContent||e.innerText||T(e)).indexOf(t)>-1}}),lang:r(function(t){return ge.test(t||\"\")||n.error(\"unsupported lang: \"+t),t=t.replace(ke,Ce).toLowerCase(),function(e){var n;do if(n=j?e.lang:e.getAttribute(\"xml:lang\")||e.getAttribute(\"lang\"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+\"-\");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===R},focus:function(t){return t===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return\"input\"===e&&!!t.checked||\"option\"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>\"@\"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!S.pseudos.empty(t)},header:function(t){return we.test(t.nodeName)},input:function(t){return be.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return\"input\"===e&&\"button\"===t.type||\"button\"===e},text:function(t){var e;return\"input\"===t.nodeName.toLowerCase()&&\"text\"===t.type&&(null==(e=t.getAttribute(\"type\"))||e.toLowerCase()===t.type)},first:h(function(){return[0]}),last:h(function(t,e){return[e-1]}),eq:h(function(t,e,n){return[0>n?n+e:n]}),even:h(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:h(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:h(function(t,e,n){for(var i=0>n?n+e:n;--i>=0;)t.push(i);return t}),gt:h(function(t,e,n){for(var i=0>n?n+e:n;++i<e;)t.push(i);return t})}},S.pseudos.nth=S.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.pseudos[x]=l(x);for(x in{submit:!0,reset:!0})S.pseudos[x]=c(x);u.prototype=S.filters=S.pseudos,S.setFilters=new u,D=n.compile=function(t,e){var n,i=[],r=[],o=q[t+\" \"];if(!o){for(e||(e=p(t)),n=e.length;n--;)o=v(e[n]),o[F]?i.push(o):r.push(o);o=q(t,y(r,i))}return o},k.sortStable=F.split(\"\").sort(Y).join(\"\")===F,k.detectDuplicates=U,P(),k.sortDetached=o(function(t){return 1&t.compareDocumentPosition(O.createElement(\"div\"))}),o(function(t){return t.innerHTML=\"<a href='#'></a>\",\"#\"===t.firstChild.getAttribute(\"href\")})||s(\"type|href|height|width\",function(t,e,n){return n?void 0:t.getAttribute(e,\"type\"===e.toLowerCase()?1:2)}),k.attributes&&o(function(t){return t.innerHTML=\"<input/>\",t.firstChild.setAttribute(\"value\",\"\"),\"\"===t.firstChild.getAttribute(\"value\")})||s(\"value\",function(t,e,n){return n||\"input\"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),o(function(t){return null==t.getAttribute(\"disabled\")})||s(ie,function(t,e,n){var i;return n?void 0:(i=t.getAttributeNode(e))&&i.specified?i.value:t[e]===!0?e.toLowerCase():null}),se.find=n,se.expr=n.selectors,se.expr[\":\"]=se.expr.pseudos,se.unique=n.uniqueSort,se.text=n.getText,se.isXMLDoc=n.isXML,se.contains=n.contains}(t);var _e={};se.Callbacks=function(t){t=\"string\"==typeof t?_e[t]||r(t):se.extend({},t);var n,i,o,s,a,l,c=[],h=!t.once&&[],u=function(e){for(n=t.memory&&e,i=!0,l=s||0,s=0,a=c.length,o=!0;c&&a>l;l++)if(c[l].apply(e[0],e[1])===!1&&t.stopOnFalse){n=!1;break}o=!1,c&&(h?h.length&&u(h.shift()):n?c=[]:p.disable())},p={add:function(){if(c){var e=c.length;!function i(e){se.each(e,function(e,n){var r=se.type(n);\"function\"===r?t.unique&&p.has(n)||c.push(n):n&&n.length&&\"string\"!==r&&i(n)})}(arguments),o?a=c.length:n&&(s=e,u(n))}return this},remove:function(){return c&&se.each(arguments,function(t,e){for(var n;(n=se.inArray(e,c,n))>-1;)c.splice(n,1),o&&(a>=n&&a--,l>=n&&l--)}),this},has:function(t){return t?se.inArray(t,c)>-1:!(!c||!c.length)},empty:function(){return c=[],a=0,this},disable:function(){return c=h=n=e,this},disabled:function(){return!c},lock:function(){return h=e,n||p.disable(),this},locked:function(){return!h},fireWith:function(t,e){return!c||i&&!h||(e=e||[],e=[t,e.slice?e.slice():e],o?h.push(e):u(e)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},se.extend({Deferred:function(t){var e=[[\"resolve\",\"done\",se.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",se.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",se.Callbacks(\"memory\")]],n=\"pending\",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return se.Deferred(function(n){se.each(e,function(e,o){var s=o[0],a=se.isFunction(t[e])&&t[e];r[o[1]](function(){var t=a&&a.apply(this,arguments);t&&se.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+\"With\"](this===i?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?se.extend(t,i):i}},r={};return i.pipe=i.then,se.each(e,function(t,o){var s=o[2],a=o[3];i[o[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+\"With\"](this===r?i:this,arguments),this},r[o[0]+\"With\"]=s.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,o=ee.call(arguments),s=o.length,a=1!==s||t&&se.isFunction(t.promise)?s:0,l=1===a?t:se.Deferred(),c=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?ee.call(arguments):r,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(e=new Array(s),n=new Array(s),i=new Array(s);s>r;r++)o[r]&&se.isFunction(o[r].promise)?o[r].promise().done(c(r,i,o)).fail(l.reject).progress(c(r,n,e)):--a;return a||l.resolveWith(i,o),l.promise()}}),se.support=function(e){var n=U.createElement(\"input\"),i=U.createDocumentFragment(),r=U.createElement(\"div\"),o=U.createElement(\"select\"),s=o.appendChild(U.createElement(\"option\"));return n.type?(n.type=\"checkbox\",e.checkOn=\"\"!==n.value,e.optSelected=s.selected,e.reliableMarginRight=!0,e.boxSizingReliable=!0,e.pixelPosition=!1,n.checked=!0,e.noCloneChecked=n.cloneNode(!0).checked,o.disabled=!0,e.optDisabled=!s.disabled,n=U.createElement(\"input\"),n.value=\"t\",n.type=\"radio\",e.radioValue=\"t\"===n.value,n.setAttribute(\"checked\",\"t\"),n.setAttribute(\"name\",\"t\"),i.appendChild(n),e.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,e.focusinBubbles=\"onfocusin\"in t,r.style.backgroundClip=\"content-box\",r.cloneNode(!0).style.backgroundClip=\"\",e.clearCloneStyle=\"content-box\"===r.style.backgroundClip,se(function(){var n,i,o=\"padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box\",s=U.getElementsByTagName(\"body\")[0];s&&(n=U.createElement(\"div\"),n.style.cssText=\"border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px\",s.appendChild(n).appendChild(r),r.innerHTML=\"\",r.style.cssText=\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%\",se.swap(s,null!=s.style.zoom?{zoom:1}:{},function(){e.boxSizing=4===r.offsetWidth}),t.getComputedStyle&&(e.pixelPosition=\"1%\"!==(t.getComputedStyle(r,null)||{}).top,e.boxSizingReliable=\"4px\"===(t.getComputedStyle(r,null)||{width:\"4px\"}).width,i=r.appendChild(U.createElement(\"div\")),i.style.cssText=r.style.cssText=o,i.style.marginRight=i.style.width=\"0\",r.style.width=\"1px\",e.reliableMarginRight=!parseFloat((t.getComputedStyle(i,null)||{}).marginRight)),s.removeChild(n))}),e):e}({});var ge,me,ve=/(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,ye=/([A-Z])/g;o.uid=1,o.accepts=function(t){return t.nodeType?1===t.nodeType||9===t.nodeType:!0},o.prototype={key:function(t){if(!o.accepts(t))return 0;var e={},n=t[this.expando];if(!n){n=o.uid++;try{e[this.expando]={value:n},Object.defineProperties(t,e)}catch(i){e[this.expando]=n,se.extend(t,e)}}return this.cache[n]||(this.cache[n]={}),n},set:function(t,e,n){var i,r=this.key(t),o=this.cache[r];if(\"string\"==typeof e)o[e]=n;else if(se.isEmptyObject(o))se.extend(this.cache[r],e);else for(i in e)o[i]=e[i];return o},get:function(t,n){var i=this.cache[this.key(t)];return n===e?i:i[n]},access:function(t,n,i){var r;return n===e||n&&\"string\"==typeof n&&i===e?(r=this.get(t,n),r!==e?r:this.get(t,se.camelCase(n))):(this.set(t,n,i),i!==e?i:n)},remove:function(t,n){var i,r,o,s=this.key(t),a=this.cache[s];if(n===e)this.cache[s]={};else{se.isArray(n)?r=n.concat(n.map(se.camelCase)):(o=se.camelCase(n),n in a?r=[n,o]:(r=o,r=r in a?[r]:r.match(le)||[])),i=r.length;for(;i--;)delete a[r[i]]}},hasData:function(t){return!se.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){t[this.expando]&&delete this.cache[t[this.expando]]}},ge=new o,me=new o,se.extend({acceptData:o.accepts,hasData:function(t){return ge.hasData(t)||me.hasData(t)},data:function(t,e,n){return ge.access(t,e,n)},removeData:function(t,e){ge.remove(t,e)},_data:function(t,e,n){return me.access(t,e,n)},_removeData:function(t,e){me.remove(t,e)}}),se.fn.extend({data:function(t,n){var i,r,o=this[0],a=0,l=null;if(t===e){if(this.length&&(l=ge.get(o),1===o.nodeType&&!me.get(o,\"hasDataAttrs\"))){for(i=o.attributes;a<i.length;a++)r=i[a].name,0===r.indexOf(\"data-\")&&(r=se.camelCase(r.slice(5)),s(o,r,l[r]));me.set(o,\"hasDataAttrs\",!0)}return l}return\"object\"==typeof t?this.each(function(){ge.set(this,t)}):se.access(this,function(n){var i,r=se.camelCase(t);if(o&&n===e){if(i=ge.get(o,t),i!==e)return i;if(i=ge.get(o,r),i!==e)return i;if(i=s(o,r,e),i!==e)return i}else this.each(function(){var i=ge.get(this,r);ge.set(this,r,n),-1!==t.indexOf(\"-\")&&i!==e&&ge.set(this,t,n)})},null,n,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){ge.remove(this,t)})}}),se.extend({queue:function(t,e,n){var i;return t?(e=(e||\"fx\")+\"queue\",i=me.get(t,e),n&&(!i||se.isArray(n)?i=me.access(t,e,se.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(t,e){e=e||\"fx\";var n=se.queue(t,e),i=n.length,r=n.shift(),o=se._queueHooks(t,e),s=function(){se.dequeue(t,e)};\"inprogress\"===r&&(r=n.shift(),i--),r&&(\"fx\"===e&&n.unshift(\"inprogress\"),delete o.stop,r.call(t,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+\"queueHooks\";return me.get(t,n)||me.access(t,n,{empty:se.Callbacks(\"once memory\").add(function(){me.remove(t,[e+\"queue\",n])})})}}),se.fn.extend({queue:function(t,n){var i=2;return\"string\"!=typeof t&&(n=t,t=\"fx\",i--),arguments.length<i?se.queue(this[0],t):n===e?this:this.each(function(){var e=se.queue(this,t,n);se._queueHooks(this,t),\"fx\"===t&&\"inprogress\"!==e[0]&&se.dequeue(this,t)})},dequeue:function(t){return this.each(function(){se.dequeue(this,t)})},delay:function(t,e){return t=se.fx?se.fx.speeds[t]||t:t,e=e||\"fx\",this.queue(e,function(e,n){var i=setTimeout(e,t);n.stop=function(){clearTimeout(i)}})},clearQueue:function(t){return this.queue(t||\"fx\",[])},promise:function(t,n){var i,r=1,o=se.Deferred(),s=this,a=this.length,l=function(){--r||o.resolveWith(s,[s])};for(\"string\"!=typeof t&&(n=t,t=e),t=t||\"fx\";a--;)i=me.get(s[a],t+\"queueHooks\"),i&&i.empty&&(r++,i.empty.add(l));return l(),o.promise(n)}});var be,we,xe=/[\\t\\r\\n\\f]/g,ke=/\\r/g,Ce=/^(?:input|select|textarea|button)$/i;se.fn.extend({attr:function(t,e){return se.access(this,se.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){se.removeAttr(this,t)})},prop:function(t,e){return se.access(this,se.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[se.propFix[t]||t]})},addClass:function(t){var e,n,i,r,o,s=0,a=this.length,l=\"string\"==typeof t&&t;if(se.isFunction(t))return this.each(function(e){se(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||\"\").match(le)||[];a>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(\" \"+n.className+\" \").replace(xe,\" \"):\" \")){for(o=0;r=e[o++];)i.indexOf(\" \"+r+\" \")<0&&(i+=r+\" \");n.className=se.trim(i)}return this},removeClass:function(t){var e,n,i,r,o,s=0,a=this.length,l=0===arguments.length||\"string\"==typeof t&&t;if(se.isFunction(t))return this.each(function(e){se(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||\"\").match(le)||[];a>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(\" \"+n.className+\" \").replace(xe,\" \"):\"\")){for(o=0;r=e[o++];)for(;i.indexOf(\" \"+r+\" \")>=0;)i=i.replace(\" \"+r+\" \",\" \");n.className=t?se.trim(i):\"\"}return this},toggleClass:function(t,e){var n=typeof t;return\"boolean\"==typeof e&&\"string\"===n?e?this.addClass(t):this.removeClass(t):this.each(se.isFunction(t)?function(n){se(this).toggleClass(t.call(this,n,this.className,e),e)}:function(){if(\"string\"===n)for(var e,i=0,r=se(this),o=t.match(le)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else(n===$||\"boolean\"===n)&&(this.className&&me.set(this,\"__className__\",this.className),this.className=this.className||t===!1?\"\":me.get(this,\"__className__\")||\"\")})},hasClass:function(t){for(var e=\" \"+t+\" \",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(\" \"+this[n].className+\" \").replace(xe,\" \").indexOf(e)>=0)return!0;return!1},val:function(t){var n,i,r,o=this[0];{if(arguments.length)return r=se.isFunction(t),this.each(function(i){var o;1===this.nodeType&&(o=r?t.call(this,i,se(this).val()):t,null==o?o=\"\":\"number\"==typeof o?o+=\"\":se.isArray(o)&&(o=se.map(o,function(t){return null==t?\"\":t+\"\"})),n=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()],n&&\"set\"in n&&n.set(this,o,\"value\")!==e||(this.value=o))});if(o)return n=se.valHooks[o.type]||se.valHooks[o.nodeName.toLowerCase()],n&&\"get\"in n&&(i=n.get(o,\"value\"))!==e?i:(i=o.value,\"string\"==typeof i?i.replace(ke,\"\"):null==i?\"\":i)}}}),se.extend({valHooks:{option:{get:function(t){var e=t.attributes.value;return!e||e.specified?t.value:t.text}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o=\"select-one\"===t.type||0>r,s=o?null:[],a=o?r+1:i.length,l=0>r?a:o?r:0;a>l;l++)if(n=i[l],!(!n.selected&&l!==r||(se.support.optDisabled?n.disabled:null!==n.getAttribute(\"disabled\"))||n.parentNode.disabled&&se.nodeName(n.parentNode,\"optgroup\"))){if(e=se(n).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var n,i,r=t.options,o=se.makeArray(e),s=r.length;s--;)i=r[s],(i.selected=se.inArray(se(i).val(),o)>=0)&&(n=!0);return n||(t.selectedIndex=-1),o}}},attr:function(t,n,i){var r,o,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return typeof t.getAttribute===$?se.prop(t,n,i):(1===s&&se.isXMLDoc(t)||(n=n.toLowerCase(),r=se.attrHooks[n]||(se.expr.match.bool.test(n)?we:be)),i===e?r&&\"get\"in r&&null!==(o=r.get(t,n))?o:(o=se.find.attr(t,n),null==o?e:o):null!==i?r&&\"set\"in r&&(o=r.set(t,i,n))!==e?o:(t.setAttribute(n,i+\"\"),i):void se.removeAttr(t,n))},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(le);if(o&&1===t.nodeType)for(;n=o[r++];)i=se.propFix[n]||n,se.expr.match.bool.test(n)&&(t[i]=!1),t.removeAttribute(n)},attrHooks:{type:{set:function(t,e){if(!se.support.radioValue&&\"radio\"===e&&se.nodeName(t,\"input\")){var n=t.value;return t.setAttribute(\"type\",e),n&&(t.value=n),e}}}},propFix:{\"for\":\"htmlFor\",\"class\":\"className\"},prop:function(t,n,i){var r,o,s,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return s=1!==a||!se.isXMLDoc(t),s&&(n=se.propFix[n]||n,o=se.propHooks[n]),i!==e?o&&\"set\"in o&&(r=o.set(t,i,n))!==e?r:t[n]=i:o&&\"get\"in o&&null!==(r=o.get(t,n))?r:t[n]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute(\"tabindex\")||Ce.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),we={set:function(t,e,n){return e===!1?se.removeAttr(t,n):t.setAttribute(n,n),n}},se.each(se.expr.match.bool.source.match(/\\w+/g),function(t,n){var i=se.expr.attrHandle[n]||se.find.attr;se.expr.attrHandle[n]=function(t,n,r){var o=se.expr.attrHandle[n],s=r?e:(se.expr.attrHandle[n]=e)!=i(t,n,r)?n.toLowerCase():null;return se.expr.attrHandle[n]=o,s}}),se.support.optSelected||(se.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),se.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){se.propFix[this.toLowerCase()]=this}),se.each([\"radio\",\"checkbox\"],function(){se.valHooks[this]={set:function(t,e){return se.isArray(e)?t.checked=se.inArray(se(t).val(),e)>=0:void 0}},se.support.checkOn||(se.valHooks[this].get=function(t){return null===t.getAttribute(\"value\")?\"on\":t.value})});var Se=/^key/,Te=/^(?:mouse|contextmenu)|click/,Ae=/^(?:focusinfocus|focusoutblur)$/,De=/^([^.]*)(?:\\.(.+)|)$/;se.event={global:{},add:function(t,n,i,r,o){var s,a,l,c,h,u,p,d,f,_,g,m=me.get(t);if(m){for(i.handler&&(s=i,i=s.handler,o=s.selector),i.guid||(i.guid=se.guid++),(c=m.events)||(c=m.events={}),(a=m.handle)||(a=m.handle=function(t){return typeof se===$||t&&se.event.triggered===t.type?e:se.event.dispatch.apply(a.elem,arguments)},a.elem=t),n=(n||\"\").match(le)||[\"\"],h=n.length;h--;)l=De.exec(n[h])||[],f=g=l[1],_=(l[2]||\"\").split(\".\").sort(),f&&(p=se.event.special[f]||{},f=(o?p.delegateType:p.bindType)||f,p=se.event.special[f]||{},u=se.extend({type:f,origType:g,data:r,handler:i,guid:i.guid,selector:o,needsContext:o&&se.expr.match.needsContext.test(o),namespace:_.join(\".\")},s),(d=c[f])||(d=c[f]=[],d.delegateCount=0,p.setup&&p.setup.call(t,r,_,a)!==!1||t.addEventListener&&t.addEventListener(f,a,!1)),p.add&&(p.add.call(t,u),u.handler.guid||(u.handler.guid=i.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),se.event.global[f]=!0);\n",
        "                t=null}},remove:function(t,e,n,i,r){var o,s,a,l,c,h,u,p,d,f,_,g=me.hasData(t)&&me.get(t);if(g&&(l=g.events)){for(e=(e||\"\").match(le)||[\"\"],c=e.length;c--;)if(a=De.exec(e[c])||[],d=_=a[1],f=(a[2]||\"\").split(\".\").sort(),d){for(u=se.event.special[d]||{},d=(i?u.delegateType:u.bindType)||d,p=l[d]||[],a=a[2]&&new RegExp(\"(^|\\\\.)\"+f.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),s=o=p.length;o--;)h=p[o],!r&&_!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||i&&i!==h.selector&&(\"**\"!==i||!h.selector)||(p.splice(o,1),h.selector&&p.delegateCount--,u.remove&&u.remove.call(t,h));s&&!p.length&&(u.teardown&&u.teardown.call(t,f,g.handle)!==!1||se.removeEvent(t,d,g.handle),delete l[d])}else for(d in l)se.event.remove(t,d+e[c],n,i,!0);se.isEmptyObject(l)&&(delete g.handle,me.remove(t,\"events\"))}},trigger:function(n,i,r,o){var s,a,l,c,h,u,p,d=[r||U],f=re.call(n,\"type\")?n.type:n,_=re.call(n,\"namespace\")?n.namespace.split(\".\"):[];if(a=l=r=r||U,3!==r.nodeType&&8!==r.nodeType&&!Ae.test(f+se.event.triggered)&&(f.indexOf(\".\")>=0&&(_=f.split(\".\"),f=_.shift(),_.sort()),h=f.indexOf(\":\")<0&&\"on\"+f,n=n[se.expando]?n:new se.Event(f,\"object\"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=_.join(\".\"),n.namespace_re=n.namespace?new RegExp(\"(^|\\\\.)\"+_.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,n.result=e,n.target||(n.target=r),i=null==i?[n]:se.makeArray(i,[n]),p=se.event.special[f]||{},o||!p.trigger||p.trigger.apply(r,i)!==!1)){if(!o&&!p.noBubble&&!se.isWindow(r)){for(c=p.delegateType||f,Ae.test(c+f)||(a=a.parentNode);a;a=a.parentNode)d.push(a),l=a;l===(r.ownerDocument||U)&&d.push(l.defaultView||l.parentWindow||t)}for(s=0;(a=d[s++])&&!n.isPropagationStopped();)n.type=s>1?c:p.bindType||f,u=(me.get(a,\"events\")||{})[n.type]&&me.get(a,\"handle\"),u&&u.apply(a,i),u=h&&a[h],u&&se.acceptData(a)&&u.apply&&u.apply(a,i)===!1&&n.preventDefault();return n.type=f,o||n.isDefaultPrevented()||p._default&&p._default.apply(d.pop(),i)!==!1||!se.acceptData(r)||h&&se.isFunction(r[f])&&!se.isWindow(r)&&(l=r[h],l&&(r[h]=null),se.event.triggered=f,r[f](),se.event.triggered=e,l&&(r[h]=l)),n.result}},dispatch:function(t){t=se.event.fix(t);var n,i,r,o,s,a=[],l=ee.call(arguments),c=(me.get(this,\"events\")||{})[t.type]||[],h=se.event.special[t.type]||{};if(l[0]=t,t.delegateTarget=this,!h.preDispatch||h.preDispatch.call(this,t)!==!1){for(a=se.event.handlers.call(this,t,c),n=0;(o=a[n++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,i=0;(s=o.handlers[i++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(s.namespace))&&(t.handleObj=s,t.data=s.data,r=((se.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l),r!==e&&(t.result=r)===!1&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,n){var i,r,o,s,a=[],l=n.delegateCount,c=t.target;if(l&&c.nodeType&&(!t.button||\"click\"!==t.type))for(;c!==this;c=c.parentNode||this)if(c.disabled!==!0||\"click\"!==t.type){for(r=[],i=0;l>i;i++)s=n[i],o=s.selector+\" \",r[o]===e&&(r[o]=s.needsContext?se(o,this).index(c)>=0:se.find(o,this,null,[c]).length),r[o]&&r.push(s);r.length&&a.push({elem:c,handlers:r})}return l<n.length&&a.push({elem:this,handlers:n.slice(l)}),a},props:\"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),fixHooks:{},keyHooks:{props:\"char charCode key keyCode\".split(\" \"),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:\"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),filter:function(t,n){var i,r,o,s=n.button;return null==t.pageX&&null!=n.clientX&&(i=t.target.ownerDocument||U,r=i.documentElement,o=i.body,t.pageX=n.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),t.pageY=n.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),t.which||s===e||(t.which=1&s?1:2&s?3:4&s?2:0),t}},fix:function(t){if(t[se.expando])return t;var e,n,i,r=t.type,o=t,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=Te.test(r)?this.mouseHooks:Se.test(r)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,t=new se.Event(o),e=i.length;e--;)n=i[e],t[n]=o[n];return t.target||(t.target=U),3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==c()&&this.focus?(this.focus(),!1):void 0},delegateType:\"focusin\"},blur:{trigger:function(){return this===c()&&this.blur?(this.blur(),!1):void 0},delegateType:\"focusout\"},click:{trigger:function(){return\"checkbox\"===this.type&&this.click&&se.nodeName(this,\"input\")?(this.click(),!1):void 0},_default:function(t){return se.nodeName(t.target,\"a\")}},beforeunload:{postDispatch:function(t){t.result!==e&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,i){var r=se.extend(new se.Event,n,{type:t,isSimulated:!0,originalEvent:{}});i?se.event.trigger(r,null,e):se.event.dispatch.call(e,r),r.isDefaultPrevented()&&n.preventDefault()}},se.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)},se.Event=function(t,e){return this instanceof se.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.getPreventDefault&&t.getPreventDefault()?a:l):this.type=t,e&&se.extend(this,e),this.timeStamp=t&&t.timeStamp||se.now(),void(this[se.expando]=!0)):new se.Event(t,e)},se.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=a,t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=a,t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=a,this.stopPropagation()}},se.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\"},function(t,e){se.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return(!r||r!==i&&!se.contains(i,r))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),se.support.focusinBubbles||se.each({focus:\"focusin\",blur:\"focusout\"},function(t,e){var n=0,i=function(t){se.event.simulate(e,t.target,se.event.fix(t),!0)};se.event.special[e]={setup:function(){0===n++&&U.addEventListener(t,i,!0)},teardown:function(){0===--n&&U.removeEventListener(t,i,!0)}}}),se.fn.extend({on:function(t,n,i,r,o){var s,a;if(\"object\"==typeof t){\"string\"!=typeof n&&(i=i||n,n=e);for(a in t)this.on(a,n,i,t[a],o);return this}if(null==i&&null==r?(r=n,i=n=e):null==r&&(\"string\"==typeof n?(r=i,i=e):(r=i,i=n,n=e)),r===!1)r=l;else if(!r)return this;return 1===o&&(s=r,r=function(t){return se().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=se.guid++)),this.each(function(){se.event.add(this,t,r,i,n)})},one:function(t,e,n,i){return this.on(t,e,n,i,1)},off:function(t,n,i){var r,o;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,se(t.delegateTarget).off(r.namespace?r.origType+\".\"+r.namespace:r.origType,r.selector,r.handler),this;if(\"object\"==typeof t){for(o in t)this.off(o,n,t[o]);return this}return(n===!1||\"function\"==typeof n)&&(i=n,n=e),i===!1&&(i=l),this.each(function(){se.event.remove(this,t,i,n)})},trigger:function(t,e){return this.each(function(){se.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?se.event.trigger(t,e,n,!0):void 0}});var Me=/^.[^:#\\[\\.,]*$/,Ee=/^(?:parents|prev(?:Until|All))/,Pe=se.expr.match.needsContext,Oe={children:!0,contents:!0,next:!0,prev:!0};se.fn.extend({find:function(t){var e,n=[],i=this,r=i.length;if(\"string\"!=typeof t)return this.pushStack(se(t).filter(function(){for(e=0;r>e;e++)if(se.contains(i[e],this))return!0}));for(e=0;r>e;e++)se.find(t,i[e],n);return n=this.pushStack(r>1?se.unique(n):n),n.selector=this.selector?this.selector+\" \"+t:t,n},has:function(t){var e=se(t,this),n=e.length;return this.filter(function(){for(var t=0;n>t;t++)if(se.contains(this,e[t]))return!0})},not:function(t){return this.pushStack(u(this,t||[],!0))},filter:function(t){return this.pushStack(u(this,t||[],!1))},is:function(t){return!!u(this,\"string\"==typeof t&&Pe.test(t)?se(t):t||[],!1).length},closest:function(t,e){for(var n,i=0,r=this.length,o=[],s=Pe.test(t)||\"string\"!=typeof t?se(t,e||this.context):0;r>i;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&se.find.matchesSelector(n,t))){n=o.push(n);break}return this.pushStack(o.length>1?se.unique(o):o)},index:function(t){return t?\"string\"==typeof t?ne.call(se(t),this[0]):ne.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var n=\"string\"==typeof t?se(t,e):se.makeArray(t&&t.nodeType?[t]:t),i=se.merge(this.get(),n);return this.pushStack(se.unique(i))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),se.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return se.dir(t,\"parentNode\")},parentsUntil:function(t,e,n){return se.dir(t,\"parentNode\",n)},next:function(t){return h(t,\"nextSibling\")},prev:function(t){return h(t,\"previousSibling\")},nextAll:function(t){return se.dir(t,\"nextSibling\")},prevAll:function(t){return se.dir(t,\"previousSibling\")},nextUntil:function(t,e,n){return se.dir(t,\"nextSibling\",n)},prevUntil:function(t,e,n){return se.dir(t,\"previousSibling\",n)},siblings:function(t){return se.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return se.sibling(t.firstChild)},contents:function(t){return t.contentDocument||se.merge([],t.childNodes)}},function(t,e){se.fn[t]=function(n,i){var r=se.map(this,e,n);return\"Until\"!==t.slice(-5)&&(i=n),i&&\"string\"==typeof i&&(r=se.filter(i,r)),this.length>1&&(Oe[t]||se.unique(r),Ee.test(t)&&r.reverse()),this.pushStack(r)}}),se.extend({filter:function(t,e,n){var i=e[0];return n&&(t=\":not(\"+t+\")\"),1===e.length&&1===i.nodeType?se.find.matchesSelector(i,t)?[i]:[]:se.find.matches(t,se.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,n,i){for(var r=[],o=i!==e;(t=t[n])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&se(t).is(i))break;r.push(t)}return r},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}});var Re=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,je=/<([\\w:]+)/,Ne=/<|&#?\\w+;/,He=/<(?:script|style|link)/i,Ie=/^(?:checkbox|radio)$/i,ze=/checked\\s*(?:[^=]|=\\s*.checked.)/i,Fe=/^$|\\/(?:java|ecma)script/i,Le=/^true\\/(.*)/,Ve=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,Be={option:[1,\"<select multiple='multiple'>\",\"</select>\"],thead:[1,\"<table>\",\"</table>\"],col:[2,\"<table><colgroup>\",\"</colgroup></table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:[0,\"\",\"\"]};Be.optgroup=Be.option,Be.tbody=Be.tfoot=Be.colgroup=Be.caption=Be.thead,Be.th=Be.td,se.fn.extend({text:function(t){return se.access(this,function(t){return t===e?se.text(this):this.empty().append((this[0]&&this[0].ownerDocument||U).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=p(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=p(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,i=t?se.filter(t,this):this,r=0;null!=(n=i[r]);r++)e||1!==n.nodeType||se.cleanData(m(n)),n.parentNode&&(e&&se.contains(n.ownerDocument,n)&&_(m(n,\"script\")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(se.cleanData(m(t,!1)),t.textContent=\"\");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return se.clone(this,t,e)})},html:function(t){return se.access(this,function(t){var n=this[0]||{},i=0,r=this.length;if(t===e&&1===n.nodeType)return n.innerHTML;if(\"string\"==typeof t&&!He.test(t)&&!Be[(je.exec(t)||[\"\",\"\"])[1].toLowerCase()]){t=t.replace(Re,\"<$1></$2>\");try{for(;r>i;i++)n=this[i]||{},1===n.nodeType&&(se.cleanData(m(n,!1)),n.innerHTML=t);n=0}catch(o){}}n&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=se.map(this,function(t){return[t.nextSibling,t.parentNode]}),e=0;return this.domManip(arguments,function(n){var i=t[e++],r=t[e++];r&&(i&&i.parentNode!==r&&(i=this.nextSibling),se(this).remove(),r.insertBefore(n,i))},!0),e?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,n){t=Z.apply([],t);var i,r,o,s,a,l,c=0,h=this.length,u=this,p=h-1,_=t[0],g=se.isFunction(_);if(g||!(1>=h||\"string\"!=typeof _||se.support.checkClone)&&ze.test(_))return this.each(function(i){var r=u.eq(i);g&&(t[0]=_.call(this,i,r.html())),r.domManip(t,e,n)});if(h&&(i=se.buildFragment(t,this[0].ownerDocument,!1,!n&&this),r=i.firstChild,1===i.childNodes.length&&(i=r),r)){for(o=se.map(m(i,\"script\"),d),s=o.length;h>c;c++)a=i,c!==p&&(a=se.clone(a,!0,!0),s&&se.merge(o,m(a,\"script\"))),e.call(this[c],a,c);if(s)for(l=o[o.length-1].ownerDocument,se.map(o,f),c=0;s>c;c++)a=o[c],Fe.test(a.type||\"\")&&!me.access(a,\"globalEval\")&&se.contains(l,a)&&(a.src?se._evalUrl(a.src):se.globalEval(a.textContent.replace(Ve,\"\")))}return this}}),se.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(t,e){se.fn[t]=function(t){for(var n,i=[],r=se(t),o=r.length-1,s=0;o>=s;s++)n=s===o?this:this.clone(!0),se(r[s])[e](n),te.apply(i,n.get());return this.pushStack(i)}}),se.extend({clone:function(t,e,n){var i,r,o,s,a=t.cloneNode(!0),l=se.contains(t.ownerDocument,t);if(!(se.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||se.isXMLDoc(t)))for(s=m(a),o=m(t),i=0,r=o.length;r>i;i++)v(o[i],s[i]);if(e)if(n)for(o=o||m(t),s=s||m(a),i=0,r=o.length;r>i;i++)g(o[i],s[i]);else g(t,a);return s=m(a,\"script\"),s.length>0&&_(s,!l&&m(t,\"script\")),a},buildFragment:function(t,e,n,i){for(var r,o,s,a,l,c,h=0,u=t.length,p=e.createDocumentFragment(),d=[];u>h;h++)if(r=t[h],r||0===r)if(\"object\"===se.type(r))se.merge(d,r.nodeType?[r]:r);else if(Ne.test(r)){for(o=o||p.appendChild(e.createElement(\"div\")),s=(je.exec(r)||[\"\",\"\"])[1].toLowerCase(),a=Be[s]||Be._default,o.innerHTML=a[1]+r.replace(Re,\"<$1></$2>\")+a[2],c=a[0];c--;)o=o.lastChild;se.merge(d,o.childNodes),o=p.firstChild,o.textContent=\"\"}else d.push(e.createTextNode(r));for(p.textContent=\"\",h=0;r=d[h++];)if((!i||-1===se.inArray(r,i))&&(l=se.contains(r.ownerDocument,r),o=m(p.appendChild(r),\"script\"),l&&_(o),n))for(c=0;r=o[c++];)Fe.test(r.type||\"\")&&n.push(r);return p},cleanData:function(t){for(var n,i,r,s,a,l,c=se.event.special,h=0;(i=t[h])!==e;h++){if(o.accepts(i)&&(a=i[me.expando],a&&(n=me.cache[a]))){if(r=Object.keys(n.events||{}),r.length)for(l=0;(s=r[l])!==e;l++)c[s]?se.event.remove(i,s):se.removeEvent(i,s,n.handle);me.cache[a]&&delete me.cache[a]}delete ge.cache[i[ge.expando]]}},_evalUrl:function(t){return se.ajax({url:t,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0})}}),se.fn.extend({wrapAll:function(t){var e;return se.isFunction(t)?this.each(function(e){se(this).wrapAll(t.call(this,e))}):(this[0]&&(e=se(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return this.each(se.isFunction(t)?function(e){se(this).wrapInner(t.call(this,e))}:function(){var e=se(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=se.isFunction(t);return this.each(function(n){se(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){se.nodeName(this,\"body\")||se(this).replaceWith(this.childNodes)}).end()}});var We,$e,qe=/^(none|table(?!-c[ea]).+)/,Ue=/^margin/,Ye=new RegExp(\"^(\"+ae+\")(.*)$\",\"i\"),Ge=new RegExp(\"^(\"+ae+\")(?!px)[a-z%]+$\",\"i\"),Xe=new RegExp(\"^([+-])=(\"+ae+\")\",\"i\"),Ke={BODY:\"block\"},Qe={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Je={letterSpacing:0,fontWeight:400},Ze=[\"Top\",\"Right\",\"Bottom\",\"Left\"],tn=[\"Webkit\",\"O\",\"Moz\",\"ms\"];se.fn.extend({css:function(t,n){return se.access(this,function(t,n,i){var r,o,s={},a=0;if(se.isArray(n)){for(r=w(t),o=n.length;o>a;a++)s[n[a]]=se.css(t,n[a],!1,r);return s}return i!==e?se.style(t,n,i):se.css(t,n)},t,n,arguments.length>1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(t){return\"boolean\"==typeof t?t?this.show():this.hide():this.each(function(){b(this)?se(this).show():se(this).hide()})}}),se.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=We(t,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":\"cssFloat\"},style:function(t,n,i,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,a,l=se.camelCase(n),c=t.style;return n=se.cssProps[l]||(se.cssProps[l]=y(c,l)),a=se.cssHooks[n]||se.cssHooks[l],i===e?a&&\"get\"in a&&(o=a.get(t,!1,r))!==e?o:c[n]:(s=typeof i,\"string\"===s&&(o=Xe.exec(i))&&(i=(o[1]+1)*o[2]+parseFloat(se.css(t,n)),s=\"number\"),null==i||\"number\"===s&&isNaN(i)||(\"number\"!==s||se.cssNumber[l]||(i+=\"px\"),se.support.clearCloneStyle||\"\"!==i||0!==n.indexOf(\"background\")||(c[n]=\"inherit\"),a&&\"set\"in a&&(i=a.set(t,i,r))===e||(c[n]=i)),void 0)}},css:function(t,n,i,r){var o,s,a,l=se.camelCase(n);return n=se.cssProps[l]||(se.cssProps[l]=y(t.style,l)),a=se.cssHooks[n]||se.cssHooks[l],a&&\"get\"in a&&(o=a.get(t,!0,i)),o===e&&(o=We(t,n,r)),\"normal\"===o&&n in Je&&(o=Je[n]),\"\"===i||i?(s=parseFloat(o),i===!0||se.isNumeric(s)?s||0:o):o}}),We=function(t,n,i){var r,o,s,a=i||w(t),l=a?a.getPropertyValue(n)||a[n]:e,c=t.style;return a&&(\"\"!==l||se.contains(t.ownerDocument,t)||(l=se.style(t,n)),Ge.test(l)&&Ue.test(n)&&(r=c.width,o=c.minWidth,s=c.maxWidth,c.minWidth=c.maxWidth=c.width=l,l=a.width,c.width=r,c.minWidth=o,c.maxWidth=s)),l},se.each([\"height\",\"width\"],function(t,e){se.cssHooks[e]={get:function(t,n,i){return n?0===t.offsetWidth&&qe.test(se.css(t,\"display\"))?se.swap(t,Qe,function(){return S(t,e,i)}):S(t,e,i):void 0},set:function(t,n,i){var r=i&&w(t);return k(t,n,i?C(t,e,i,se.support.boxSizing&&\"border-box\"===se.css(t,\"boxSizing\",!1,r),r):0)}}}),se(function(){se.support.reliableMarginRight||(se.cssHooks.marginRight={get:function(t,e){return e?se.swap(t,{display:\"inline-block\"},We,[t,\"marginRight\"]):void 0}}),!se.support.pixelPosition&&se.fn.position&&se.each([\"top\",\"left\"],function(t,e){se.cssHooks[e]={get:function(t,n){return n?(n=We(t,e),Ge.test(n)?se(t).position()[e]+\"px\":n):void 0}}})}),se.expr&&se.expr.filters&&(se.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},se.expr.filters.visible=function(t){return!se.expr.filters.hidden(t)}),se.each({margin:\"\",padding:\"\",border:\"Width\"},function(t,e){se.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o=\"string\"==typeof n?n.split(\" \"):[n];4>i;i++)r[t+Ze[i]+e]=o[i]||o[i-2]||o[0];return r}},Ue.test(t)||(se.cssHooks[t+e].set=k)});var en=/%20/g,nn=/\\[\\]$/,rn=/\\r?\\n/g,on=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=se.prop(this,\"elements\");return t?se.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!se(this).is(\":disabled\")&&sn.test(this.nodeName)&&!on.test(t)&&(this.checked||!Ie.test(t))}).map(function(t,e){var n=se(this).val();return null==n?null:se.isArray(n)?se.map(n,function(t){return{name:e.name,value:t.replace(rn,\"\\r\\n\")}}):{name:e.name,value:n.replace(rn,\"\\r\\n\")}}).get()}}),se.param=function(t,n){var i,r=[],o=function(t,e){e=se.isFunction(e)?e():null==e?\"\":e,r[r.length]=encodeURIComponent(t)+\"=\"+encodeURIComponent(e)};if(n===e&&(n=se.ajaxSettings&&se.ajaxSettings.traditional),se.isArray(t)||t.jquery&&!se.isPlainObject(t))se.each(t,function(){o(this.name,this.value)});else for(i in t)D(i,t[i],n,o);return r.join(\"&\").replace(en,\"+\")},se.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(t,e){se.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),se.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,\"**\"):this.off(e,t||\"**\",n)}});var an,ln,cn=se.now(),hn=/\\?/,un=/#.*$/,pn=/([?&])_=[^&]*/,dn=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,fn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,_n=/^(?:GET|HEAD)$/,gn=/^\\/\\//,mn=/^([\\w.+-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,vn=se.fn.load,yn={},bn={},wn=\"*/\".concat(\"*\");try{ln=q.href}catch(xn){ln=U.createElement(\"a\"),ln.href=\"\",ln=ln.href}an=mn.exec(ln.toLowerCase())||[],se.fn.load=function(t,n,i){if(\"string\"!=typeof t&&vn)return vn.apply(this,arguments);var r,o,s,a=this,l=t.indexOf(\" \");return l>=0&&(r=t.slice(l),t=t.slice(0,l)),se.isFunction(n)?(i=n,n=e):n&&\"object\"==typeof n&&(o=\"POST\"),a.length>0&&se.ajax({url:t,type:o,dataType:\"html\",data:n}).done(function(t){s=arguments,a.html(r?se(\"<div>\").append(se.parseHTML(t)).find(r):t)}).complete(i&&function(t,e){a.each(i,s||[t.responseText,e,t])}),this},se.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(t,e){se.fn[e]=function(t){return this.on(e,t)}}),se.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ln,type:\"GET\",isLocal:fn.test(an[1]),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":wn,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":se.parseJSON,\"text xml\":se.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?P(P(t,se.ajaxSettings),e):P(se.ajaxSettings,t)},ajaxPrefilter:M(yn),ajaxTransport:M(bn),ajax:function(t,n){function i(t,n,i,a){var c,u,v,y,w,k=n;2!==b&&(b=2,l&&clearTimeout(l),r=e,s=a||\"\",x.readyState=t>0?4:0,c=t>=200&&300>t||304===t,i&&(y=O(p,x,i)),y=R(p,y,x,c),c?(p.ifModified&&(w=x.getResponseHeader(\"Last-Modified\"),w&&(se.lastModified[o]=w),w=x.getResponseHeader(\"etag\"),w&&(se.etag[o]=w)),204===t||\"HEAD\"===p.type?k=\"nocontent\":304===t?k=\"notmodified\":(k=y.state,u=y.data,v=y.error,c=!v)):(v=k,(t||!k)&&(k=\"error\",0>t&&(t=0))),x.status=t,x.statusText=(n||k)+\"\",c?_.resolveWith(d,[u,k,x]):_.rejectWith(d,[x,k,v]),x.statusCode(m),m=e,h&&f.trigger(c?\"ajaxSuccess\":\"ajaxError\",[x,p,c?u:v]),g.fireWith(d,[x,k]),h&&(f.trigger(\"ajaxComplete\",[x,p]),--se.active||se.event.trigger(\"ajaxStop\")))}\"object\"==typeof t&&(n=t,t=e),n=n||{};var r,o,s,a,l,c,h,u,p=se.ajaxSetup({},n),d=p.context||p,f=p.context&&(d.nodeType||d.jquery)?se(d):se.event,_=se.Deferred(),g=se.Callbacks(\"once memory\"),m=p.statusCode||{},v={},y={},b=0,w=\"canceled\",x={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!a)for(a={};e=dn.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=y[n]=y[n]||t,v[t]=e),this},overrideMimeType:function(t){return b||(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>b)for(e in t)m[e]=[m[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return r&&r.abort(e),i(0,e),this}};if(_.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,p.url=((t||p.url||ln)+\"\").replace(un,\"\").replace(gn,an[1]+\"//\"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=se.trim(p.dataType||\"*\").toLowerCase().match(le)||[\"\"],null==p.crossDomain&&(c=mn.exec(p.url.toLowerCase()),p.crossDomain=!(!c||c[1]===an[1]&&c[2]===an[2]&&(c[3]||(\"http:\"===c[1]?\"80\":\"443\"))===(an[3]||(\"http:\"===an[1]?\"80\":\"443\")))),p.data&&p.processData&&\"string\"!=typeof p.data&&(p.data=se.param(p.data,p.traditional)),E(yn,p,n,x),2===b)return x;h=p.global,h&&0===se.active++&&se.event.trigger(\"ajaxStart\"),p.type=p.type.toUpperCase(),p.hasContent=!_n.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(hn.test(o)?\"&\":\"?\")+p.data,delete p.data),p.cache===!1&&(p.url=pn.test(o)?o.replace(pn,\"$1_=\"+cn++):o+(hn.test(o)?\"&\":\"?\")+\"_=\"+cn++)),p.ifModified&&(se.lastModified[o]&&x.setRequestHeader(\"If-Modified-Since\",se.lastModified[o]),se.etag[o]&&x.setRequestHeader(\"If-None-Match\",se.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&x.setRequestHeader(\"Content-Type\",p.contentType),x.setRequestHeader(\"Accept\",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+(\"*\"!==p.dataTypes[0]?\", \"+wn+\"; q=0.01\":\"\"):p.accepts[\"*\"]);for(u in p.headers)x.setRequestHeader(u,p.headers[u]);if(p.beforeSend&&(p.beforeSend.call(d,x,p)===!1||2===b))return x.abort();w=\"abort\";for(u in{success:1,error:1,complete:1})x[u](p[u]);if(r=E(bn,p,n,x)){x.readyState=1,h&&f.trigger(\"ajaxSend\",[x,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){x.abort(\"timeout\")},p.timeout));try{b=1,r.send(v,i)}catch(k){if(!(2>b))throw k;i(-1,k)}}else i(-1,\"No Transport\");return x},getJSON:function(t,e,n){return se.get(t,e,n,\"json\")},getScript:function(t,n){return se.get(t,e,n,\"script\")}}),se.each([\"get\",\"post\"],function(t,n){se[n]=function(t,i,r,o){return se.isFunction(i)&&(o=o||r,r=i,i=e),se.ajax({url:t,type:n,dataType:o,data:i,success:r})}}),se.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/(?:java|ecma)script/},converters:{\"text script\":function(t){return se.globalEval(t),t}}}),se.ajaxPrefilter(\"script\",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type=\"GET\")}),se.ajaxTransport(\"script\",function(t){if(t.crossDomain){var e,n;return{send:function(i,r){e=se(\"<script>\").prop({async:!0,charset:t.scriptCharset,src:t.url}).on(\"load error\",n=function(t){e.remove(),n=null,t&&r(\"error\"===t.type?404:200,t.type)}),U.head.appendChild(e[0])},abort:function(){n&&n()}}}});var kn=[],Cn=/(=)\\?(?=&|$)|\\?\\?/;se.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var t=kn.pop()||se.expando+\"_\"+cn++;return this[t]=!0,t}}),se.ajaxPrefilter(\"json jsonp\",function(n,i,r){var o,s,a,l=n.jsonp!==!1&&(Cn.test(n.url)?\"url\":\"string\"==typeof n.data&&!(n.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&Cn.test(n.data)&&\"data\");return l||\"jsonp\"===n.dataTypes[0]?(o=n.jsonpCallback=se.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Cn,\"$1\"+o):n.jsonp!==!1&&(n.url+=(hn.test(n.url)?\"&\":\"?\")+n.jsonp+\"=\"+o),n.converters[\"script json\"]=function(){return a||se.error(o+\" was not called\"),a[0]},n.dataTypes[0]=\"json\",s=t[o],t[o]=function(){a=arguments},r.always(function(){t[o]=s,n[o]&&(n.jsonpCallback=i.jsonpCallback,kn.push(o)),a&&se.isFunction(s)&&s(a[0]),a=s=e}),\"script\"):void 0}),se.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var Sn=se.ajaxSettings.xhr(),Tn={0:200,1223:204},An=0,Dn={};t.ActiveXObject&&se(t).on(\"unload\",function(){for(var t in Dn)Dn[t]();Dn=e}),se.support.cors=!!Sn&&\"withCredentials\"in Sn,se.support.ajax=Sn=!!Sn,se.ajaxTransport(function(t){var n;return se.support.cors||Sn&&!t.crossDomain?{send:function(i,r){var o,s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i[\"X-Requested-With\"]||(i[\"X-Requested-With\"]=\"XMLHttpRequest\");for(o in i)a.setRequestHeader(o,i[o]);n=function(t){return function(){n&&(delete Dn[s],n=a.onload=a.onerror=null,\"abort\"===t?a.abort():\"error\"===t?r(a.status||404,a.statusText):r(Tn[a.status]||a.status,a.statusText,\"string\"==typeof a.responseText?{text:a.responseText}:e,a.getAllResponseHeaders()))}},a.onload=n(),a.onerror=n(\"error\"),n=Dn[s=An++]=n(\"abort\"),a.send(t.hasContent&&t.data||null)},abort:function(){n&&n()}}:void 0});var Mn,En,Pn=/^(?:toggle|show|hide)$/,On=new RegExp(\"^(?:([+-])=|)(\"+ae+\")([a-z%]*)$\",\"i\"),Rn=/queueHooks$/,jn=[z],Nn={\"*\":[function(t,e){var n=this.createTween(t,e),i=n.cur(),r=On.exec(e),o=r&&r[3]||(se.cssNumber[t]?\"\":\"px\"),s=(se.cssNumber[t]||\"px\"!==o&&+i)&&On.exec(se.css(n.elem,t)),a=1,l=20;if(s&&s[3]!==o){o=o||s[3],r=r||[],s=+i||1;do a=a||\".5\",s/=a,se.style(n.elem,t,s+o);while(a!==(a=n.cur()/i)&&1!==a&&--l)}return r&&(s=n.start=+s||+i||0,n.unit=o,n.end=r[1]?s+(r[1]+1)*r[2]:+r[2]),n}]};se.Animation=se.extend(H,{tweener:function(t,e){se.isFunction(t)?(e=t,t=[\"*\"]):t=t.split(\" \");for(var n,i=0,r=t.length;r>i;i++)n=t[i],Nn[n]=Nn[n]||[],Nn[n].unshift(e)},prefilter:function(t,e){e?jn.unshift(t):jn.push(t)}}),se.Tween=F,F.prototype={constructor:F,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||\"swing\",this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(se.cssNumber[n]?\"\":\"px\")},cur:function(){var t=F.propHooks[this.prop];return t&&t.get?t.get(this):F.propHooks._default.get(this)},run:function(t){var e,n=F.propHooks[this.prop];return this.pos=e=this.options.duration?se.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=se.css(t.elem,t.prop,\"\"),e&&\"auto\"!==e?e:0):t.elem[t.prop]},set:function(t){se.fx.step[t.prop]?se.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[se.cssProps[t.prop]]||se.cssHooks[t.prop])?se.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},se.each([\"toggle\",\"show\",\"hide\"],function(t,e){var n=se.fn[e];se.fn[e]=function(t,i,r){return null==t||\"boolean\"==typeof t?n.apply(this,arguments):this.animate(L(e,!0),t,i,r)}}),se.fn.extend({fadeTo:function(t,e,n,i){return this.filter(b).css(\"opacity\",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=se.isEmptyObject(t),o=se.speed(e,n,i),s=function(){var e=H(this,se.extend({},t),o);(r||me.get(this,\"finish\"))&&e.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,n,i){var r=function(t){var e=t.stop;delete t.stop,e(i)};return\"string\"!=typeof t&&(i=n,n=t,t=e),n&&t!==!1&&this.queue(t||\"fx\",[]),this.each(function(){var e=!0,n=null!=t&&t+\"queueHooks\",o=se.timers,s=me.get(this);if(n)s[n]&&s[n].stop&&r(s[n]);else for(n in s)s[n]&&s[n].stop&&Rn.test(n)&&r(s[n]);for(n=o.length;n--;)o[n].elem!==this||null!=t&&o[n].queue!==t||(o[n].anim.stop(i),e=!1,o.splice(n,1));(e||!i)&&se.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||\"fx\"),this.each(function(){var e,n=me.get(this),i=n[t+\"queue\"],r=n[t+\"queueHooks\"],o=se.timers,s=i?i.length:0;for(n.finish=!0,se.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;s>e;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish\n",
        "                })}}),se.each({slideDown:L(\"show\"),slideUp:L(\"hide\"),slideToggle:L(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(t,e){se.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),se.speed=function(t,e,n){var i=t&&\"object\"==typeof t?se.extend({},t):{complete:n||!n&&e||se.isFunction(t)&&t,duration:t,easing:n&&e||e&&!se.isFunction(e)&&e};return i.duration=se.fx.off?0:\"number\"==typeof i.duration?i.duration:i.duration in se.fx.speeds?se.fx.speeds[i.duration]:se.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue=\"fx\"),i.old=i.complete,i.complete=function(){se.isFunction(i.old)&&i.old.call(this),i.queue&&se.dequeue(this,i.queue)},i},se.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},se.timers=[],se.fx=F.prototype.init,se.fx.tick=function(){var t,n=se.timers,i=0;for(Mn=se.now();i<n.length;i++)t=n[i],t()||n[i]!==t||n.splice(i--,1);n.length||se.fx.stop(),Mn=e},se.fx.timer=function(t){t()&&se.timers.push(t)&&se.fx.start()},se.fx.interval=13,se.fx.start=function(){En||(En=setInterval(se.fx.tick,se.fx.interval))},se.fx.stop=function(){clearInterval(En),En=null},se.fx.speeds={slow:600,fast:200,_default:400},se.fx.step={},se.expr&&se.expr.filters&&(se.expr.filters.animated=function(t){return se.grep(se.timers,function(e){return t===e.elem}).length}),se.fn.offset=function(t){if(arguments.length)return t===e?this:this.each(function(e){se.offset.setOffset(this,t,e)});var n,i,r=this[0],o={top:0,left:0},s=r&&r.ownerDocument;if(s)return n=s.documentElement,se.contains(n,r)?(typeof r.getBoundingClientRect!==$&&(o=r.getBoundingClientRect()),i=V(s),{top:o.top+i.pageYOffset-n.clientTop,left:o.left+i.pageXOffset-n.clientLeft}):o},se.offset={setOffset:function(t,e,n){var i,r,o,s,a,l,c,h=se.css(t,\"position\"),u=se(t),p={};\"static\"===h&&(t.style.position=\"relative\"),a=u.offset(),o=se.css(t,\"top\"),l=se.css(t,\"left\"),c=(\"absolute\"===h||\"fixed\"===h)&&(o+l).indexOf(\"auto\")>-1,c?(i=u.position(),s=i.top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),se.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(p.top=e.top-a.top+s),null!=e.left&&(p.left=e.left-a.left+r),\"using\"in e?e.using.call(t,p):u.css(p)}},se.fn.extend({position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return\"fixed\"===se.css(n,\"position\")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),se.nodeName(t[0],\"html\")||(i=t.offset()),i.top+=se.css(t[0],\"borderTopWidth\",!0),i.left+=se.css(t[0],\"borderLeftWidth\",!0)),{top:e.top-i.top-se.css(n,\"marginTop\",!0),left:e.left-i.left-se.css(n,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||Y;t&&!se.nodeName(t,\"html\")&&\"static\"===se.css(t,\"position\");)t=t.offsetParent;return t||Y})}}),se.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(n,i){var r=\"pageYOffset\"===i;se.fn[n]=function(o){return se.access(this,function(n,o,s){var a=V(n);return s===e?a?a[i]:n[o]:void(a?a.scrollTo(r?t.pageXOffset:s,r?s:t.pageYOffset):n[o]=s)},n,o,arguments.length,null)}}),se.each({Height:\"height\",Width:\"width\"},function(t,n){se.each({padding:\"inner\"+t,content:n,\"\":\"outer\"+t},function(i,r){se.fn[r]=function(r,o){var s=arguments.length&&(i||\"boolean\"!=typeof r),a=i||(r===!0||o===!0?\"margin\":\"border\");return se.access(this,function(n,i,r){var o;return se.isWindow(n)?n.document.documentElement[\"client\"+t]:9===n.nodeType?(o=n.documentElement,Math.max(n.body[\"scroll\"+t],o[\"scroll\"+t],n.body[\"offset\"+t],o[\"offset\"+t],o[\"client\"+t])):r===e?se.css(n,i,a):se.style(n,i,r,a)},n,s?r:e,s,null)}})}),se.fn.size=function(){return this.length},se.fn.andSelf=se.fn.addBack,\"object\"==typeof module&&module&&\"object\"==typeof module.exports?module.exports=se:\"function\"==typeof n&&n.amd&&n(\"jquery\",[],function(){return se}),\"object\"==typeof t&&\"object\"==typeof t.document&&(t.jQuery=t.$=se)}(window),function(t,i){\"undefined\"!=typeof exports?i(t,exports,e(\"underscore\")):\"function\"==typeof n&&n.amd?n(\"backbone\",[\"underscore\",\"jquery\",\"exports\"],function(e,n,r){t.Backbone=i(t,r,e,n)}):t.Backbone=i(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}(this,function(t,e,n,i){{var r=t.Backbone,o=[],s=(o.push,o.slice);o.splice}e.VERSION=\"1.1.0\",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=e.Events={on:function(t,e,n){if(!c(this,\"on\",t,[e,n])||!e)return this;this._events||(this._events={});var i=this._events[t]||(this._events[t]=[]);return i.push({callback:e,context:n,ctx:n||this}),this},once:function(t,e,i){if(!c(this,\"once\",t,[e,i])||!e)return this;var r=this,o=n.once(function(){r.off(t,o),e.apply(this,arguments)});return o._callback=e,this.on(t,o,i)},off:function(t,e,i){var r,o,s,a,l,h,u,p;if(!this._events||!c(this,\"off\",t,[e,i]))return this;if(!t&&!e&&!i)return this._events={},this;for(a=t?[t]:n.keys(this._events),l=0,h=a.length;h>l;l++)if(t=a[l],s=this._events[t]){if(this._events[t]=r=[],e||i)for(u=0,p=s.length;p>u;u++)o=s[u],(e&&e!==o.callback&&e!==o.callback._callback||i&&i!==o.context)&&r.push(o);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!c(this,\"trigger\",t,e))return this;var n=this._events[t],i=this._events.all;return n&&h(n,e),i&&h(i,arguments),this},stopListening:function(t,e,i){var r=this._listeningTo;if(!r)return this;var o=!e&&!i;i||\"object\"!=typeof e||(i=this),t&&((r={})[t._listenId]=t);for(var s in r)t=r[s],t.off(e,i,this),(o||n.isEmpty(t._events))&&delete this._listeningTo[s];return this}},l=/\\s+/,c=function(t,e,n,i){if(!n)return!0;if(\"object\"==typeof n){for(var r in n)t[e].apply(t,[r,n[r]].concat(i));return!1}if(l.test(n)){for(var o=n.split(l),s=0,a=o.length;a>s;s++)t[e].apply(t,[o[s]].concat(i));return!1}return!0},h=function(t,e){var n,i=-1,r=t.length,o=e[0],s=e[1],a=e[2];switch(e.length){case 0:for(;++i<r;)(n=t[i]).callback.call(n.ctx);return;case 1:for(;++i<r;)(n=t[i]).callback.call(n.ctx,o);return;case 2:for(;++i<r;)(n=t[i]).callback.call(n.ctx,o,s);return;case 3:for(;++i<r;)(n=t[i]).callback.call(n.ctx,o,s,a);return;default:for(;++i<r;)(n=t[i]).callback.apply(n.ctx,e)}},u={listenTo:\"on\",listenToOnce:\"once\"};n.each(u,function(t,e){a[e]=function(e,i,r){var o=this._listeningTo||(this._listeningTo={}),s=e._listenId||(e._listenId=n.uniqueId(\"l\"));return o[s]=e,r||\"object\"!=typeof i||(r=this),e[t](i,r,this),this}}),a.bind=a.on,a.unbind=a.off,n.extend(e,a);var p=e.Model=function(t,e){var i=t||{};e||(e={}),this.cid=n.uniqueId(\"c\"),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),i=n.defaults({},i,n.result(this,\"defaults\")),this.set(i,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(p.prototype,a,{changed:null,validationError:null,idAttribute:\"id\",initialize:function(){},toJSON:function(){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,i){var r,o,s,a,l,c,h,u;if(null==t)return this;if(\"object\"==typeof t?(o=t,i=e):(o={})[t]=e,i||(i={}),!this._validate(o,i))return!1;s=i.unset,l=i.silent,a=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=n.clone(this.attributes),this.changed={}),u=this.attributes,h=this._previousAttributes,this.idAttribute in o&&(this.id=o[this.idAttribute]);for(r in o)e=o[r],n.isEqual(u[r],e)||a.push(r),n.isEqual(h[r],e)?delete this.changed[r]:this.changed[r]=e,s?delete u[r]:u[r]=e;if(!l){a.length&&(this._pending=!0);for(var p=0,d=a.length;d>p;p++)this.trigger(\"change:\"+a[p],this,u[a[p]],i)}if(c)return this;if(!l)for(;this._pending;)this._pending=!1,this.trigger(\"change\",this,i);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?n.clone(this.changed):!1;var e,i=!1,r=this._changing?this._previousAttributes:this.attributes;for(var o in t)n.isEqual(r[o],e=t[o])||((i||(i={}))[o]=e);return i},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=t?n.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,i=t.success;return t.success=function(n){return e.set(e.parse(n,t),t)?(i&&i(e,n,t),void e.trigger(\"sync\",e,n,t)):!1},I(this,t),this.sync(\"read\",this,t)},save:function(t,e,i){var r,o,s,a=this.attributes;if(null==t||\"object\"==typeof t?(r=t,i=e):(r={})[t]=e,i=n.extend({validate:!0},i),r&&!i.wait){if(!this.set(r,i))return!1}else if(!this._validate(r,i))return!1;r&&i.wait&&(this.attributes=n.extend({},a,r)),void 0===i.parse&&(i.parse=!0);var l=this,c=i.success;return i.success=function(t){l.attributes=a;var e=l.parse(t,i);return i.wait&&(e=n.extend(r||{},e)),n.isObject(e)&&!l.set(e,i)?!1:(c&&c(l,t,i),void l.trigger(\"sync\",l,t,i))},I(this,i),o=this.isNew()?\"create\":i.patch?\"patch\":\"update\",\"patch\"===o&&(i.attrs=r),s=this.sync(o,this,i),r&&i.wait&&(this.attributes=a),s},destroy:function(t){t=t?n.clone(t):{};var e=this,i=t.success,r=function(){e.trigger(\"destroy\",e,e.collection,t)};if(t.success=function(n){(t.wait||e.isNew())&&r(),i&&i(e,n,t),e.isNew()||e.trigger(\"sync\",e,n,t)},this.isNew())return t.success(),!1;I(this,t);var o=this.sync(\"delete\",this,t);return t.wait||r(),o},url:function(){var t=n.result(this,\"urlRoot\")||n.result(this.collection,\"url\")||H();return this.isNew()?t:t+(\"/\"===t.charAt(t.length-1)?\"\":\"/\")+encodeURIComponent(this.id)},parse:function(t){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(t){return this._validate({},n.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;return i?(this.trigger(\"invalid\",this,i,n.extend(e,{validationError:i})),!1):!0}});var d=[\"keys\",\"values\",\"pairs\",\"invert\",\"pick\",\"omit\"];n.each(d,function(t){p.prototype[t]=function(){var e=s.call(arguments);return e.unshift(this.attributes),n[t].apply(n,e)}});var f=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},_={add:!0,remove:!0,merge:!0},g={add:!0,remove:!1};n.extend(f.prototype,a,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,g))},remove:function(t,e){var i=!n.isArray(t);t=i?[t]:n.clone(t),e||(e={});var r,o,s,a;for(r=0,o=t.length;o>r;r++)a=t[r]=this.get(t[r]),a&&(delete this._byId[a.id],delete this._byId[a.cid],s=this.indexOf(a),this.models.splice(s,1),this.length--,e.silent||(e.index=s,a.trigger(\"remove\",a,this,e)),this._removeReference(a));return i?t[0]:t},set:function(t,e){e=n.defaults({},e,_),e.parse&&(t=this.parse(t,e));var i=!n.isArray(t);t=i?t?[t]:[]:n.clone(t);var r,o,s,a,l,c,h,u=e.at,d=this.model,f=this.comparator&&null==u&&e.sort!==!1,g=n.isString(this.comparator)?this.comparator:null,m=[],v=[],y={},b=e.add,w=e.merge,x=e.remove,k=!f&&b&&x?[]:!1;for(r=0,o=t.length;o>r;r++){if(l=t[r],s=l instanceof p?a=l:l[d.prototype.idAttribute],c=this.get(s))x&&(y[c.cid]=!0),w&&(l=l===a?a.attributes:l,e.parse&&(l=c.parse(l,e)),c.set(l,e),f&&!h&&c.hasChanged(g)&&(h=!0)),t[r]=c;else if(b){if(a=t[r]=this._prepareModel(l,e),!a)continue;m.push(a),a.on(\"all\",this._onModelEvent,this),this._byId[a.cid]=a,null!=a.id&&(this._byId[a.id]=a)}k&&k.push(c||a)}if(x){for(r=0,o=this.length;o>r;++r)y[(a=this.models[r]).cid]||v.push(a);v.length&&this.remove(v,e)}if(m.length||k&&k.length)if(f&&(h=!0),this.length+=m.length,null!=u)for(r=0,o=m.length;o>r;r++)this.models.splice(u+r,0,m[r]);else{k&&(this.models.length=0);var C=k||m;for(r=0,o=C.length;o>r;r++)this.models.push(C[r])}if(h&&this.sort({silent:!0}),!e.silent){for(r=0,o=m.length;o>r;r++)(a=m[r]).trigger(\"add\",a,this,e);(h||k&&k.length)&&this.trigger(\"sort\",this,e)}return i?t[0]:t},reset:function(t,e){e||(e={});for(var i=0,r=this.models.length;r>i;i++)this._removeReference(this.models[i]);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger(\"reset\",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(){return s.apply(this.models,arguments)},get:function(t){return null==t?void 0:this._byId[t.id]||this._byId[t.cid]||this._byId[t]},at:function(t){return this.models[t]},where:function(t,e){return n.isEmpty(t)?e?void 0:[]:this[e?\"find\":\"filter\"](function(e){for(var n in t)if(t[n]!==e.get(n))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error(\"Cannot sort a set without a comparator\");return t||(t={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),t.silent||this.trigger(\"sort\",this,t),this},pluck:function(t){return n.invoke(this.models,\"get\",t)},fetch:function(t){t=t?n.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,i=this;return t.success=function(n){var r=t.reset?\"reset\":\"set\";i[r](n,t),e&&e(i,n,t),i.trigger(\"sync\",i,n,t)},I(this,t),this.sync(\"read\",this,t)},create:function(t,e){if(e=e?n.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var i=this,r=e.success;return e.success=function(t,e,n){n.wait&&i.add(t,n),r&&r(t,e,n)},t.save(null,e),t},parse:function(t){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t.collection||(t.collection=this),t;e=e?n.clone(e):{},e.collection=this;var i=new this.model(t,e);return i.validationError?(this.trigger(\"invalid\",this,i.validationError,e),!1):i},_removeReference:function(t){this===t.collection&&delete t.collection,t.off(\"all\",this._onModelEvent,this)},_onModelEvent:function(t,e,n,i){(\"add\"!==t&&\"remove\"!==t||n===this)&&(\"destroy\"===t&&this.remove(e,i),e&&t===\"change:\"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var m=[\"forEach\",\"each\",\"map\",\"collect\",\"reduce\",\"foldl\",\"inject\",\"reduceRight\",\"foldr\",\"find\",\"detect\",\"filter\",\"select\",\"reject\",\"every\",\"all\",\"some\",\"any\",\"include\",\"contains\",\"invoke\",\"max\",\"min\",\"toArray\",\"size\",\"first\",\"head\",\"take\",\"initial\",\"rest\",\"tail\",\"drop\",\"last\",\"without\",\"difference\",\"indexOf\",\"shuffle\",\"lastIndexOf\",\"isEmpty\",\"chain\"];n.each(m,function(t){f.prototype[t]=function(){var e=s.call(arguments);return e.unshift(this.models),n[t].apply(n,e)}});var v=[\"groupBy\",\"countBy\",\"sortBy\"];n.each(v,function(t){f.prototype[t]=function(e,i){var r=n.isFunction(e)?e:function(t){return t.get(e)};return n[t](this.models,r,i)}});var y=e.View=function(t){this.cid=n.uniqueId(\"view\"),t||(t={}),n.extend(this,n.pick(t,w)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},b=/^(\\S+)\\s*(.*)$/,w=[\"model\",\"collection\",\"el\",\"id\",\"attributes\",\"className\",\"tagName\",\"events\"];n.extend(y.prototype,a,{tagName:\"div\",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(t,n){return this.$el&&this.undelegateEvents(),this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=n.result(this,\"events\")))return this;this.undelegateEvents();for(var e in t){var i=t[e];if(n.isFunction(i)||(i=this[t[e]]),i){var r=e.match(b),o=r[1],s=r[2];i=n.bind(i,this),o+=\".delegateEvents\"+this.cid,\"\"===s?this.$el.on(o,i):this.$el.on(o,s,i)}}return this},undelegateEvents:function(){return this.$el.off(\".delegateEvents\"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(n.result(this,\"el\"),!1);else{var t=n.extend({},n.result(this,\"attributes\"));this.id&&(t.id=n.result(this,\"id\")),this.className&&(t[\"class\"]=n.result(this,\"className\"));var i=e.$(\"<\"+n.result(this,\"tagName\")+\">\").attr(t);this.setElement(i,!1)}}}),e.sync=function(t,i,r){var o=k[t];n.defaults(r||(r={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var s={type:o,dataType:\"json\"};if(r.url||(s.url=n.result(i,\"url\")||H()),null!=r.data||!i||\"create\"!==t&&\"update\"!==t&&\"patch\"!==t||(s.contentType=\"application/json\",s.data=JSON.stringify(r.attrs||i.toJSON(r))),r.emulateJSON&&(s.contentType=\"application/x-www-form-urlencoded\",s.data=s.data?{model:s.data}:{}),r.emulateHTTP&&(\"PUT\"===o||\"DELETE\"===o||\"PATCH\"===o)){s.type=\"POST\",r.emulateJSON&&(s.data._method=o);var a=r.beforeSend;r.beforeSend=function(t){return t.setRequestHeader(\"X-HTTP-Method-Override\",o),a?a.apply(this,arguments):void 0}}\"GET\"===s.type||r.emulateJSON||(s.processData=!1),\"PATCH\"===s.type&&x&&(s.xhr=function(){return new ActiveXObject(\"Microsoft.XMLHTTP\")});var l=r.xhr=e.ajax(n.extend(s,r));return i.trigger(\"request\",i,l,r),l};var x=!(\"undefined\"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),k={create:\"POST\",update:\"PUT\",patch:\"PATCH\",\"delete\":\"DELETE\",read:\"GET\"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var C=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},S=/\\((.*?)\\)/g,T=/(\\(\\?)?:\\w+/g,A=/\\*\\w+/g,D=/[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;n.extend(C.prototype,a,{initialize:function(){},route:function(t,i,r){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(i)&&(r=i,i=\"\"),r||(r=this[i]);var o=this;return e.history.route(t,function(n){var s=o._extractParameters(t,n);r&&r.apply(o,s),o.trigger.apply(o,[\"route:\"+i].concat(s)),o.trigger(\"route\",i,s),e.history.trigger(\"route\",o,i,s)}),this},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,\"routes\");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(D,\"\\\\$&\").replace(S,\"(?:$1)?\").replace(T,function(t,e){return e?t:\"([^/]+)\"}).replace(A,\"(.*?)\"),new RegExp(\"^\"+t+\"$\")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return n.map(i,function(t){return t?decodeURIComponent(t):null})}});var M=e.History=function(){this.handlers=[],n.bindAll(this,\"checkUrl\"),\"undefined\"!=typeof window&&(this.location=window.location,this.history=window.history)},E=/^[#\\/]|\\s+$/g,P=/^\\/+|\\/+$/g,O=/msie [\\w.]+/,R=/\\/$/,j=/[?#].*$/;M.started=!1,n.extend(M.prototype,a,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:\"\"},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var n=this.root.replace(R,\"\");t.indexOf(n)||(t=t.slice(n.length))}else t=this.getHash();return t.replace(E,\"\")},start:function(t){if(M.started)throw new Error(\"Backbone.history has already been started\");M.started=!0,this.options=n.extend({root:\"/\"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var i=this.getFragment(),r=document.documentMode,o=O.exec(navigator.userAgent.toLowerCase())&&(!r||7>=r);this.root=(\"/\"+this.root+\"/\").replace(P,\"/\"),o&&this._wantsHashChange&&(this.iframe=e.$('<iframe src=\"javascript:0\" tabindex=\"-1\" />').hide().appendTo(\"body\")[0].contentWindow,this.navigate(i)),this._hasPushState?e.$(window).on(\"popstate\",this.checkUrl):this._wantsHashChange&&\"onhashchange\"in window&&!o?e.$(window).on(\"hashchange\",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=i;var s=this.location,a=s.pathname.replace(/[^\\/]$/,\"$&/\")===this.root;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!a)return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+\"#\"+this.fragment),!0;this._hasPushState&&a&&s.hash&&(this.fragment=this.getHash().replace(E,\"\"),this.history.replaceState({},document.title,this.root+this.fragment+s.search))}return this.options.silent?void 0:this.loadUrl()},stop:function(){e.$(window).off(\"popstate\",this.checkUrl).off(\"hashchange\",this.checkUrl),clearInterval(this._checkUrlInterval),M.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(){var t=this.getFragment();return t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment?!1:(this.iframe&&this.navigate(t),void this.loadUrl())},loadUrl:function(t){return t=this.fragment=this.getFragment(t),n.any(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})},navigate:function(t,e){if(!M.started)return!1;e&&e!==!0||(e={trigger:!!e});var n=this.root+(t=this.getFragment(t||\"\"));if(t=t.replace(j,\"\"),this.fragment!==t){if(this.fragment=t,\"\"===t&&\"/\"!==n&&(n=n.slice(0,-1)),this._hasPushState)this.history[e.replace?\"replaceState\":\"pushState\"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getFragment(this.getHash(this.iframe))&&(e.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,t,e.replace))}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,\"\");t.replace(i+\"#\"+e)}else t.hash=\"#\"+e}}),e.history=new M;var N=function(t,e){var i,r=this;i=t&&n.has(t,\"constructor\")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e);var o=function(){this.constructor=i};return o.prototype=r.prototype,i.prototype=new o,t&&n.extend(i.prototype,t),i.__super__=r.prototype,i};p.extend=f.extend=C.extend=y.extend=M.extend=N;var H=function(){throw new Error('A \"url\" property or function must be specified')},I=function(t,e){var n=e.error;e.error=function(i){n&&n(t,i,e),t.trigger(\"error\",t,i,e)}};return e}),function(){n(\"common/custom\",[\"underscore\"],function(t){var e;return e=function(){return t.uniqueId=function(t){var e,n,i,r,o;for(i=[],e=\"0123456789ABCDEF\",n=o=0;31>=o;n=++o)i[n]=e.substr(Math.floor(16*Math.random()),1);return i[12]=\"4\",i[16]=e.substr(3&i[16]|8,1),r=i.join(\"\"),t?t+\"-\"+r:r}},t.isNullOrUndefined=function(e){return t.isNull(e)||t.isUndefined(e)},t.setdefault=function(e,n,i){return t.has(e,n)?e[n]:(e[n]=i,i)},{monkey_patch:e}})}.call(this),function(){n(\"common/build_views\",[\"underscore\"],function(t){var e;return e=function(e,n,i,r){var o,s,a,l,c,h,u,p,d,f,_;for(null==r&&(r=[]),o=[],c=t.filter(n,function(n){return!t.has(e,n.id)}),s=p=0,f=c.length;f>p;s=++p)l=c[s],u=t.extend({},i,{model:l}),e[l.id]=s<r.length?new r[s](u):new l.default_view(u),o.push(e[l.id]);for(h=t.difference(t.keys(e),t.pluck(n,\"id\")),d=0,_=h.length;_>d;d++)a=h[d],e[a].remove(),delete e[a];return o}})}.call(this),function(){n(\"common/safebind\",[\"underscore\"],function(t){var e;return e=function(e,n,i,r){var o;t.has(e,\"eventers\")||(e.eventers={});try{e.eventers[n.id]=n}catch(s){o=s}return null!=n?(n.on(i,r,e),n.on(\"destroy remove\",function(){return delete e.eventers[n]},e)):console.log(\"error with binder\",e,i),null}})}.call(this),function(){n(\"common/load_models\",[\"require\",\"./base\"],function(t){var e;return e=function(e){var n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v;for(a=[],l=[],n=t(\"./base\").Collections,c=0,d=e.length;d>c;c++)s=e[c],r=n(s.type),i=s.attributes,r&&r.get(i.id)?l.push([r,i]):a.push([r,i]);for(h=0,f=a.length;f>h;h++)o=a[h],r=o[0],i=o[1],r&&r.add(i,{silent:!0,defer_initialization:!0});for(u=0,_=a.length;_>u;u++)o=a[u],r=o[0],i=o[1],r&&r.get(i.id).initialize(i);for(p=0,g=a.length;g>p;p++)o=a[p],r=o[0],i=o[1],r&&(s=r.get(i.id),s.trigger(\"add\",s,r,{}));for(v=0,m=l.length;m>v;v++)o=l[v],r=o[0],i=o[1],r&&r.get(i.id).set(i);return null}})}.call(this),function(){n(\"common/bulk_save\",[\"underscore\",\"jquery\",\"require\",\"./base\",\"./load_models\"],function(t,e,n,i,r){var o;return o=function(i){var o,s,a,l,c,h;if(o=n(\"./base\").Config,s=i[0].get(\"doc\"),null==s)throw new Error(\"Unset 'doc' in \"+i[0]);return a=function(){var e,n,r;for(r=[],e=0,n=i.length;n>e;e++)l=i[e],r.push({type:l.type,attributes:t.clone(l.attributes)});return r}(),a=JSON.stringify(a),c=o.prefix+\"bokeh/bb/\"+s+\"/bulkupsert\",h=e.ajax({type:\"POST\",url:c,contentType:\"application/json\",data:a,header:{client:\"javascript\"}}),h.done(function(t){return r(t.modelspecs)}),h}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"common/continuum_view\",[\"underscore\",\"backbone\"],function(n,i){var r,o,s,a;return o=function(i){function r(){return s=r.__super__.constructor.apply(this,arguments)}return e(r,i),r.prototype.initialize=function(t){return n.has(t,\"id\")?void 0:this.id=n.uniqueId(\"ContinuumView\")},r.prototype.bind_bokeh_events=function(){return\"pass\"},r.prototype.delegateEvents=function(t){return r.__super__.delegateEvents.call(this,t)},r.prototype.remove=function(){var e,i,o;if(n.has(this,\"eventers\")){o=this.eventers;for(e in o)t.call(o,e)&&(i=o[e],i.off(null,null,this))}return this.trigger(\"remove\",this),r.__super__.remove.call(this)},r.prototype.mget=function(){return this.model.get.apply(this.model,arguments)},r.prototype.mset=function(){return this.model.set.apply(this.model,arguments)},r.prototype.mget_obj=function(t){return this.model.get_obj(t)},r.prototype.render_end=function(){return\"pass\"},r}(i.View),r=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"bk-closewrapper\"},n.prototype.delegateEvents=function(t){return n.__super__.delegateEvents.call(this,t)},n.prototype.events={\"click .bk-close\":\"close\"},n.prototype.close=function(){return this.view.remove(),this.remove()},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.view=t.view,this.render()},n.prototype.render=function(){return this.view.$el.detach(),this.$el.empty(),this.$el.html(\"<a href='#' class='bk-close'>[x]</a>\"),this.$el.append(this.view.$el)},n}(o),{View:o,CloseWrapper:r}})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"common/has_properties\",[\"underscore\",\"backbone\",\"require\",\"./base\",\"./safebind\"],function(n,r,o,s,a){var l;return l=function(r){function s(e,i){this.rpc=t(this.rpc,this),this.get_obj=t(this.get_obj,this),this.resolve_ref=t(this.resolve_ref,this),this.convert_to_ref=t(this.convert_to_ref,this);var r;r=e||{},i||(i={}),this.cid=n.uniqueId(\"c\"),this.attributes={},i.collection&&(this.collection=i.collection),i.parse&&(r=this.parse(r,i)||{}),r=n.defaults({},r,n.result(this,\"defaults\")),this.set(r,i),this.changed={},this._base=!1,this.properties={},this.property_cache={},n.has(r,this.idAttribute)||(this.id=n.uniqueId(this.type),this.attributes[this.idAttribute]=this.id),i.defer_initialization||this.initialize.apply(this,arguments)}return i(s,r),s.prototype.toString=function(){return\"\"+this.type+\"(\"+this.id+\")\"},s.prototype.destroy=function(t){var i,r,o,a;if(s.__super__.destroy.call(this,t),n.has(this,\"eventers\")){o=this.eventers,a=[];for(i in o)e.call(o,i)&&(r=o[i],a.push(r.off(null,null,this)));return a}},s.prototype.isNew=function(){return!1},s.prototype.set_obj=function(t,i,r){var o,s;n.isObject(t)||null===t?(o=t,r=i):(o={},o[t]=i);for(t in o)e.call(o,t)&&(s=o[t],o[t]=this.convert_to_ref(s));return this.set(o,r)},s.prototype.set=function(t,i,r){var o,a,l,c,h;n.isObject(t)||null===t?(o=t,r=i):(o={},o[t]=i),a=[];for(t in o)e.call(o,t)&&(l=o[t],n.has(this,\"properties\")&&n.has(this.properties,t)&&this.properties[t].setter&&(this.properties[t].setter.call(this,l),a.push(t)));if(!n.isEmpty(a))for(o=n.clone(o),c=0,h=a.length;h>c;c++)t=a[c],delete o[t];return n.isEmpty(o)?void 0:s.__super__.set.call(this,o,r)},s.prototype.convert_to_ref=function(t){return n.isArray(t)?n.map(t,this.convert_to_ref):t instanceof s?t.ref():void 0},s.prototype.add_dependencies=function(t,e,i){var r,o,s,l,c;for(n.isArray(i)||(i=[i]),o=this.properties[t],o.dependencies=o.dependencies.concat({obj:e,fields:i}),c=[],s=0,l=i.length;l>s;s++)r=i[s],c.push(a(this,e,\"change:\"+r,o.callbacks.changedep));return c},s.prototype.register_setter=function(t,e){var n;return n=this.properties[t],n.setter=e},s.prototype.register_property=function(t,e,i){var r,o,s,l=this;return n.isUndefined(i)&&(i=!0),n.has(this.properties,t)&&this.remove_property(t),r=function(){return l.trigger(\"changedep:\"+t)},s=function(){var e,n,i;return e=!0,o.use_cache&&(i=l.get_cache(t),l.clear_cache(t),n=l.get(t),e=n!==i),e?(l.trigger(\"change:\"+t,l,l.get(t)),l.trigger(\"change\",l)):void 0},o={getter:e,dependencies:[],use_cache:i,setter:null,callbacks:{changedep:r,propchange:s}},this.properties[t]=o,a(this,this,\"changedep:\"+t,o.callbacks.propchange),o},s.prototype.remove_property=function(t){var e,n,i,r,o,s,a,l,c,h;for(o=this.properties[t],n=o.dependencies,s=0,l=n.length;l>s;s++)for(e=n[s],r=e.obj,h=e.fields,a=0,c=h.length;c>a;a++)i=h[a],r.off(\"change:\"+i,o.callbacks.changedep,this);return this.off(\"changedep:\"+e),delete this.properties[t],o.use_cache?this.clear_cache(t):void 0},s.prototype.has_cache=function(t){return n.has(this.property_cache,t)},s.prototype.add_cache=function(t,e){return this.property_cache[t]=e},s.prototype.clear_cache=function(t){return delete this.property_cache[t]},s.prototype.get_cache=function(t){return this.property_cache[t]},s.prototype.get=function(t){var e,i,r;return n.has(this.properties,t)?(r=this.properties[t],r.use_cache&&this.has_cache(t)?this.property_cache[t]:(i=r.getter,e=i.apply(this),this.properties[t].use_cache&&this.add_cache(t,e),e)):s.__super__.get.call(this,t)},s.prototype.ref=function(){return{type:this.type,id:this.id}},s.prototype.resolve_ref=function(t){return t||console.log(\"ERROR, null reference\"),n.isArray(t)?n.map(t,this.resolve_ref):t.type===this.type&&t.id===this.id?this:this.get_base().Collections(t.type).get(t.id)},s.prototype.get_obj=function(t){var e;return e=this.get(t),e?this.resolve_ref(e):void 0},s.prototype.get_base=function(){return this._base||(this._base=o(\"./base\")),this._base},s.prototype.url=function(){var t,e;return t=this.get(\"doc\"),null==t&&console.log(\"WARN: Unset 'doc' in \"+this),e=this.get_base().Config.prefix+\"bokeh/bb/\"+t+\"/\"+this.type+\"/\",this.isNew()?e:e+this.get(\"id\")+\"/\"},s.prototype.sync=function(t,e,n){return n.success(e.attributes,null,{})},s.prototype.defaults=function(){return{}},s.prototype.rpc=function(t,e,n){var i,r,o,s,a,l,c;if(s=this.get_base().Config.prefix,r=this.get(\"doc\"),null==r)throw new Error(\"Unset 'doc' in \"+this);return o=this.get(\"id\"),l=this.type,c=\"\"+s+\"bokeh/bb/rpc/\"+r+\"/\"+l+\"/\"+o+\"/\"+t+\"/\",i={args:e,kwargs:n},a=$.ajax({type:\"POST\",url:c,data:JSON.stringify(i),contentType:\"application/json\",xhrFields:{withCredentials:!0}})},s}(r.Model)})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e\n",
        "                }for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"common/has_parent\",[\"underscore\",\"./has_properties\"],function(t,n){var i,r;return i=function(n){function i(){return r=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.get_fallback=function(e){return this.get_obj(\"parent\")&&t.indexOf(this.get_obj(\"parent\").parent_properties,e)>=0&&!t.isUndefined(this.get_obj(\"parent\").get(e))?this.get_obj(\"parent\").get(e):t.isFunction(this.display_defaults)?this.display_defaults()[e]:this.display_defaults[e]},i.prototype.get=function(e){var n;return n=i.__super__.get.call(this,e),t.isUndefined(n)?\"parent\"!==e?this.get_fallback(e):void 0:n},i.prototype.display_defaults={},i}(n)})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"range/range1d\",[\"underscore\",\"backbone\",\"common/has_properties\"],function(t,n,i){var r,o,s,a;return r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Range1d\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),this.register_property(\"min\",function(){return Math.min(this.get(\"start\"),this.get(\"end\"))},!0),this.add_dependencies(\"min\",this,[\"start\",\"end\"]),this.register_property(\"max\",function(){return Math.max(this.get(\"start\"),this.get(\"end\"))},!0),this.add_dependencies(\"max\",this,[\"start\",\"end\"])},n.prototype.defaults=function(){return{start:0,end:1}},n}(i),o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"common/view_state\",[\"./has_properties\",\"range/range1d\"],function(t,n){var i,r;return i=function(t){function i(){return r=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(t,e){var r,o;return i.__super__.initialize.call(this,t,e),this.register_property(\"border_top\",function(){return Math.max(this.get(\"min_border_top\"),this.get(\"requested_border_top\"))},!1),this.add_dependencies(\"border_top\",this,[\"min_border_top\",\"requested_border_top\"]),this.register_property(\"border_bottom\",function(){return Math.max(this.get(\"min_border_bottom\"),this.get(\"requested_border_bottom\"))},!1),this.add_dependencies(\"border_bottom\",this,[\"min_border_bottom\",\"requested_border_bottom\"]),this.register_property(\"border_left\",function(){return Math.max(this.get(\"min_border_left\"),this.get(\"requested_border_left\"))},!1),this.add_dependencies(\"border_left\",this,[\"min_border_left\",\"requested_border_left\"]),this.register_property(\"border_right\",function(){return Math.max(this.get(\"min_border_right\"),this.get(\"requested_border_right\"))},!1),this.add_dependencies(\"border_right\",this,[\"min_border_right\",\"requested_border_right\"]),this.register_property(\"canvas_aspect\",function(){return this.get(\"canvas_height\")/this.get(\"canvas_width\")},!0),this.add_dependencies(\"canvas_aspect\",this,[\"canvas_height\",\"canvas_width\"]),this.register_property(\"outer_aspect\",function(){return this.get(\"outer_height\")/this.get(\"outer_width\")},!0),this.add_dependencies(\"outer_aspect\",this,[\"outer_height\",\"outer_width\"]),this.register_property(\"inner_width\",function(){return this.get(\"outer_width\")-this.get(\"border_left\")-this.get(\"border_right\")},!0),this.add_dependencies(\"inner_width\",this,[\"outer_width\",\"border_left\",\"border_right\"]),this.register_property(\"inner_height\",function(){return this.get(\"outer_height\")-this.get(\"border_top\")-this.get(\"border_bottom\")},!0),this.add_dependencies(\"inner_height\",this,[\"outer_height\",\"border_top\",\"border_bottom\"]),this.register_property(\"inner_aspect\",function(){return this.get(\"inner_height\")/this.get(\"inner_width\")},!0),this.add_dependencies(\"inner_aspect\",this,[\"inner_height\",\"inner_width\"]),r=new n.Model({start:this.get(\"border_left\"),end:this.get(\"border_left\")+this.get(\"inner_width\")}),this.register_property(\"inner_range_horizontal\",function(){return r.set(\"start\",this.get(\"border_left\")),r.set(\"end\",this.get(\"border_left\")+this.get(\"inner_width\")),r},!0),this.add_dependencies(\"inner_range_horizontal\",this,[\"border_left\",\"inner_width\"]),o=new n.Model({start:this.get(\"border_bottom\"),end:this.get(\"border_bottom\")+this.get(\"inner_height\")}),this.register_property(\"inner_range_vertical\",function(){return o.set(\"start\",this.get(\"border_bottom\")),o.set(\"end\",this.get(\"border_bottom\")+this.get(\"inner_height\")),o},!0),this.add_dependencies(\"inner_range_vertical\",this,[\"border_bottom\",\"inner_height\"])},i.prototype.vx_to_sx=function(t){return t},i.prototype.vy_to_sy=function(t){return this.get(\"canvas_height\")-t},i.prototype.v_vx_to_sx=function(t){var e,n,i,r;for(e=i=0,r=t.length;r>i;e=++i)n=t[e],t[e]=n;return t},i.prototype.v_vy_to_sy=function(t){var e,n,i,r,o;for(e=this.get(\"canvas_height\"),n=r=0,o=t.length;o>r;n=++r)i=t[n],t[n]=e-i;return t},i.prototype.sx_to_vx=function(t){return t},i.prototype.sy_to_vy=function(t){return this.get(\"canvas_height\")-t},i.prototype.v_sx_to_vx=function(t){var e,n,i,r;for(e=i=0,r=t.length;r>i;e=++i)n=t[e],t[e]=n;return t},i.prototype.v_sy_to_vy=function(t){var e,n,i,r,o;for(e=this.get(\"canvas_height\"),n=r=0,o=t.length;o>r;n=++r)i=t[n],t[n]=e-i;return t},i}(t)})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"mapper/1d/linear_mapper\",[\"backbone\",\"common/has_properties\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),this.register_property(\"mapper_state\",this._mapper_state,!0),this.add_dependencies(\"mapper_state\",this,[\"source_range\",\"target_range\"]),this.add_dependencies(\"mapper_state\",this.get(\"source_range\"),[\"start\",\"end\"]),this.add_dependencies(\"mapper_state\",this.get(\"target_range\"),[\"start\",\"end\"])},n.prototype.map_to_target=function(t){var e,n,i;return i=this.get(\"mapper_state\"),n=i[0],e=i[1],n*t+e},n.prototype.v_map_to_target=function(t){var e,n,i,r,o,s,a,l;for(l=this.get(\"mapper_state\"),r=l[0],n=l[1],i=new Float64Array(t.length),e=s=0,a=t.length;a>s;e=++s)o=t[e],i[e]=r*o+n;return i},n.prototype.map_from_target=function(t){var e,n,i;return i=this.get(\"mapper_state\"),n=i[0],e=i[1],(t-e)/n},n.prototype.v_map_from_target=function(t){var e,n,i,r,o,s,a,l;for(l=this.get(\"mapper_state\"),r=l[0],n=l[1],i=new Float64Array(t.length),e=s=0,a=t.length;a>s;e=++s)o=t[e],i[e]=(o-n)/r;return i},n.prototype._mapper_state=function(){var t,e,n,i,r,o;return i=this.get(\"source_range\").get(\"start\"),n=this.get(\"source_range\").get(\"end\"),o=this.get(\"target_range\").get(\"start\"),r=this.get(\"target_range\").get(\"end\"),e=(r-o)/(n-i),t=-(e*i)+o,[e,t]},n}(n),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),{Model:i,Collection:new r}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"mapper/2d/grid_mapper\",[\"backbone\",\"common/has_properties\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.map_to_target=function(t,e){var n,i;return n=this.get(\"domain_mapper\").map_to_target(t),i=this.get(\"codomain_mapper\").map_to_target(e),[n,i]},n.prototype.v_map_to_target=function(t,e){var n,i;return n=this.get(\"domain_mapper\").v_map_to_target(t),i=this.get(\"codomain_mapper\").v_map_to_target(e),[n,i]},n.prototype.map_from_target=function(t,e){var n,i;return n=this.get(\"domain_mapper\").map_from_target(t),i=this.get(\"codomain_mapper\").map_from_target(e),[n,i]},n.prototype.v_map_from_target=function(t,e){var n,i;return n=this.get(\"domain_mapper\").v_map_from_target(t),i=this.get(\"codomain_mapper\").v_map_from_target(e),[n,i]},n}(n),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),{Model:i,Collection:new r}})}.call(this),function(){n(\"common/svg_colors\",[],function(){var t;return t={indianred:\"#CD5C5C\",lightcoral:\"#F08080\",salmon:\"#FA8072\",darksalmon:\"#E9967A\",lightsalmon:\"#FFA07A\",crimson:\"#DC143C\",red:\"#FF0000\",firebrick:\"#B22222\",darkred:\"#8B0000\",pink:\"#FFC0CB\",lightpink:\"#FFB6C1\",hotpink:\"#FF69B4\",deeppink:\"#FF1493\",mediumvioletred:\"#C71585\",palevioletred:\"#DB7093\",lightsalmon:\"#FFA07A\",coral:\"#FF7F50\",tomato:\"#FF6347\",orangered:\"#FF4500\",darkorange:\"#FF8C00\",orange:\"#FFA500\",gold:\"#FFD700\",yellow:\"#FFFF00\",lightyellow:\"#FFFFE0\",lemonchiffon:\"#FFFACD\",lightgoldenrodyellow:\"#FAFAD2\",papayawhip:\"#FFEFD5\",moccasin:\"#FFE4B5\",peachpuff:\"#FFDAB9\",palegoldenrod:\"#EEE8AA\",khaki:\"#F0E68C\",darkkhaki:\"#BDB76B\",lavender:\"#E6E6FA\",thistle:\"#D8BFD8\",plum:\"#DDA0DD\",violet:\"#EE82EE\",orchid:\"#DA70D6\",fuchsia:\"#FF00FF\",magenta:\"#FF00FF\",mediumorchid:\"#BA55D3\",mediumpurple:\"#9370DB\",blueviolet:\"#8A2BE2\",darkviolet:\"#9400D3\",darkorchid:\"#9932CC\",darkmagenta:\"#8B008B\",purple:\"#800080\",indigo:\"#4B0082\",slateblue:\"#6A5ACD\",darkslateblue:\"#483D8B\",mediumslateblue:\"#7B68EE\",greenyellow:\"#ADFF2F\",chartreuse:\"#7FFF00\",lawngreen:\"#7CFC00\",lime:\"#00FF00\",limegreen:\"#32CD32\",palegreen:\"#98FB98\",lightgreen:\"#90EE90\",mediumspringgreen:\"#00FA9A\",springgreen:\"#00FF7F\",mediumseagreen:\"#3CB371\",seagreen:\"#2E8B57\",forestgreen:\"#228B22\",green:\"#008000\",darkgreen:\"#006400\",yellowgreen:\"#9ACD32\",olivedrab:\"#6B8E23\",olive:\"#808000\",darkolivegreen:\"#556B2F\",mediumaquamarine:\"#66CDAA\",darkseagreen:\"#8FBC8F\",lightseagreen:\"#20B2AA\",darkcyan:\"#008B8B\",teal:\"#008080\",aqua:\"#00FFFF\",cyan:\"#00FFFF\",lightcyan:\"#E0FFFF\",paleturquoise:\"#AFEEEE\",aquamarine:\"#7FFFD4\",turquoise:\"#40E0D0\",mediumturquoise:\"#48D1CC\",darkturquoise:\"#00CED1\",cadetblue:\"#5F9EA0\",steelblue:\"#4682B4\",lightsteelblue:\"#B0C4DE\",powderblue:\"#B0E0E6\",lightblue:\"#ADD8E6\",skyblue:\"#87CEEB\",lightskyblue:\"#87CEFA\",deepskyblue:\"#00BFFF\",dodgerblue:\"#1E90FF\",cornflowerblue:\"#6495ED\",mediumslateblue:\"#7B68EE\",royalblue:\"#4169E1\",blue:\"#0000FF\",mediumblue:\"#0000CD\",darkblue:\"#00008B\",navy:\"#000080\",midnightblue:\"#191970\",cornsilk:\"#FFF8DC\",blanchedalmond:\"#FFEBCD\",bisque:\"#FFE4C4\",navajowhite:\"#FFDEAD\",wheat:\"#F5DEB3\",burlywood:\"#DEB887\",tan:\"#D2B48C\",rosybrown:\"#BC8F8F\",sandybrown:\"#F4A460\",goldenrod:\"#DAA520\",darkgoldenrod:\"#B8860B\",peru:\"#CD853F\",chocolate:\"#D2691E\",saddlebrown:\"#8B4513\",sienna:\"#A0522D\",brown:\"#A52A2A\",maroon:\"#800000\",white:\"#FFFFFF\",snow:\"#FFFAFA\",honeydew:\"#F0FFF0\",mintcream:\"#F5FFFA\",azure:\"#F0FFFF\",aliceblue:\"#F0F8FF\",ghostwhite:\"#F8F8FF\",whitesmoke:\"#F5F5F5\",seashell:\"#FFF5EE\",beige:\"#F5F5DC\",oldlace:\"#FDF5E6\",floralwhite:\"#FFFAF0\",ivory:\"#FFFFF0\",antiquewhite:\"#FAEBD7\",linen:\"#FAF0E6\",lavenderblush:\"#FFF0F5\",mistyrose:\"#FFE4E1\",gainsboro:\"#DCDCDC\",lightgrey:\"#D3D3D3\",silver:\"#C0C0C0\",darkgray:\"#A9A9A9\",darkgrey:\"#A9A9A9\",gray:\"#808080\",grey:\"#808080\",dimgray:\"#696969\",dimgrey:\"#696969\",lightslategray:\"#778899\",lightslategrey:\"#778899\",slategray:\"#708090\",darkslategray:\"#2F4F4F\",darkslategrey:\"#2F4F4F\",black:\"#000000\"}})}.call(this),function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"renderer/properties\",[\"underscore\",\"common/svg_colors\"],function(e,n){var r,o,s,a,l;return a=function(){function i(){}return i.prototype.source_v_select=function(t,e){var n,i,r,o,s,a,l;if(i=this,!(t in i))return console.log(\"requested vector selection of unknown property '\"+t+\"' on objects\"),function(){var t,n,i,o;for(i=e.get_length(),o=[],t=0,n=i.length;n>t;t++)r=i[t],o.push(null);return o}();if(o=i[t],null!=o.field&&o.field in e.get(\"data\"))return e.getcolumn(o.field);if(null!=i[t].value)n=i[t].value;else{if(t in e.get(\"data\"))return e.getcolumn(t);null!=i[t][\"default\"]&&(n=i[t][\"default\"])}for(s=[],r=a=0,l=e.get_length();l>=0?l>a:a>l;r=l>=0?++a:--a)s.push(n);return s},i.prototype.string=function(t,n,i){var r,o;return this[i]={},r=t.mget(i),null==r||(e.isString(r)?this[i][\"default\"]=r:console.log(\"string property '\"+i+\"' given invalid default value: \"+r)),null!=n&&i in n?(o=n[i],e.isString(o)?this[i].value=o:e.isObject(o)?this[i]=e.extend(this[i],o):console.log(\"string property '\"+i+\"' given invalid glyph value: \"+o)):void 0},i.prototype.number=function(t,n,i){var r,o,s,a;return this[i]={},r=t.mget(i),null==r||(e.isNumber(r)?this[i][\"default\"]=r:console.log(\"number property '\"+i+\"' given invalid default value: \"+r)),s=null!=(a=t.mget(i+\"_units\"))?a:\"data\",null!=n&&i+\"_units\"in n&&(s=n[i+\"_units\"]),this[i].units=s,null!=n&&i in n?(o=n[i],e.isString(o)?this[i].field=o:e.isNumber(o)?this[i].value=o:e.isObject(o)?this[i]=e.extend(this[i],o):console.log(\"number property '\"+i+\"' given invalid glyph value: \"+o)):void 0},i.prototype.color=function(t,i,r){var o,s;return this[r]={},o=t.mget(r),e.isUndefined(o)?this[r][\"default\"]=null:e.isString(o)&&(null!=n[o]||\"#\"===o.substring(0,1))||e.isNull(o)?this[r][\"default\"]=o:console.log(\"color property '\"+r+\"' given invalid default value: \"+o),null!=i&&r in i?(s=i[r],e.isNull(s)?this[r].value=null:e.isString(s)?null!=n[s]||\"#\"===s.substring(0,1)?this[r].value=s:this[r].field=s:e.isObject(s)?this[r]=e.extend(this[r],s):console.log(\"color property '\"+r+\"' given invalid glyph value: \"+s)):void 0},i.prototype.array=function(t,n,i){var r,o,s,a;return this[i]={},r=t.mget(i),null==r||(e.isArray(r)?this[i][\"default\"]=r:console.log(\"array property '\"+i+\"' given invalid default value: \"+r)),s=null!=(a=t.mget(i+\"_units\"))?a:\"data\",null!=n&&i+\"_units\"in n&&(s=n[i+\"_units\"]),this[i].units=s,null!=n&&i in n?(o=n[i],e.isString(o)?this[i].field=o:e.isArray(o)?this[i].value=o:e.isObject(o)?this[i]=e.extend(this[i],o):console.log(\"array property '\"+i+\"' given invalid glyph value: \"+o)):void 0},i.prototype[\"enum\"]=function(n,i,r,o){var s,a,l;return this[r]={},l=o.split(\" \"),s=n.mget(r),e.isNull(s)||(e.isString(s)&&t.call(l,s)>=0?this[r]={\"default\":s}:(console.log(\"enum property '\"+r+\"' given invalid default value: \"+s),console.log(\"    acceptable values:\"+l))),null!=i&&r in i?(a=i[r],e.isString(a)?t.call(l,a)>=0?this[r].value=a:this[r].field=a:e.isObject(a)?this[r]=e.extend(this[r],a):(console.log(\"enum property '\"+r+\"' given invalid glyph value: \"+a),console.log(\"    acceptable values:\"+l))):void 0},i.prototype.setattr=function(t,e,n,i){var r,o;return r=null,i.indexOf(\":\")>-1&&(o=i.split(\":\"),i=o[0],r=o[1]),\"string\"===i?this.string(t,e,n):\"number\"===i?this.number(t,e,n):\"color\"===i?this.color(t,e,n):\"array\"===i?this.array(t,e,n):\"enum\"===i&&r?this[\"enum\"](t,e,n,r):console.log(\"Unknown type '\"+i+\"' for glyph property: \"+n)},i.prototype.select=function(t,e){return t in this?null!=this[t].field&&this[t].field in e?e[this[t].field]:null!=this[t].value?this[t].value:e.get&&e.get(t)?e.get(t):e.mget&&e.mget(t)?e.mget(t):null!=e[t]?e[t]:null!=this[t][\"default\"]?this[t][\"default\"]:console.log(\"selection for attribute '\"+t+\"' failed on object: \"+e):void console.log(\"requested selection of unknown property '\"+t+\"' on object: \"+e)},i.prototype.v_select=function(t,e){var n,i,r,o,s;if(!(t in this))return void console.log(\"requested vector selection of unknown property '\"+t+\"' on objects\");for(r=null!=this[t].typed?new Float64Array(e.length):new Array(e.length),n=o=0,s=e.length;s>=0?s>o:o>s;n=s>=0?++o:--o)if(i=e[n],null!=this[t].field&&this[t].field in i)r[n]=i[this[t].field];else if(null!=this[t].value)r[n]=this[t].value;else if(null!=i[t])r[n]=i[t];else{if(null==this[t][\"default\"])return void console.log(\"vector selection for attribute '\"+t+\"' failed on object: \"+i);r[n]=this[t][\"default\"]}return r},i}(),s=function(t){function n(t,n,i){null==i&&(i=\"\"),this.line_color_name=\"\"+i+\"line_color\",this.line_width_name=\"\"+i+\"line_width\",this.line_alpha_name=\"\"+i+\"line_alpha\",this.line_join_name=\"\"+i+\"line_join\",this.line_cap_name=\"\"+i+\"line_cap\",this.line_dash_name=\"\"+i+\"line_dash\",this.line_dash_offset_name=\"\"+i+\"line_dash_offset\",this.color(t,n,this.line_color_name),this.number(t,n,this.line_width_name),this.number(t,n,this.line_alpha_name),this[\"enum\"](t,n,this.line_join_name,\"miter round bevel\"),this[\"enum\"](t,n,this.line_cap_name,\"butt round square\"),this.array(t,n,this.line_dash_name),this.number(t,n,this.line_dash_offset_name),this.do_stroke=!0,e.isUndefined(this[this.line_color_name].value)?e.isNull(this[this.line_color_name][\"default\"])&&(this.do_stroke=!1):e.isNull(this[this.line_color_name].value)&&(this.do_stroke=!1)}return i(n,t),n.prototype.set=function(t,e){return t.strokeStyle=this.select(this.line_color_name,e),t.globalAlpha=this.select(this.line_alpha_name,e),t.lineWidth=this.select(this.line_width_name,e),t.lineJoin=this.select(this.line_join_name,e),t.lineCap=this.select(this.line_cap_name,e),t.setLineDash(this.select(this.line_dash_name,e)),t.setLineDashOffset(this.select(this.line_dash_offset_name,e))},n.prototype.set_prop_cache=function(t){return this.cache={},this.cache.strokeStyle=this.source_v_select(this.line_color_name,t),this.cache.globalAlpha=this.source_v_select(this.line_alpha_name,t),this.cache.lineWidth=this.source_v_select(this.line_width_name,t),this.cache.lineJoin=this.source_v_select(this.line_join_name,t),this.cache.lineCap=this.source_v_select(this.line_cap_name,t),this.cache.setLineDash=this.source_v_select(this.line_dash_name,t),this.cache.setLineDashOffset=this.source_v_select(this.line_dash_offset_name,t)},n.prototype.clear_prop_cache=function(){return this.cache={}},n.prototype.set_vectorize=function(t,e){var n;return n=!1,null!=this.cache.strokeStyle[e]&&t.strokeStyle!==this.cache.strokeStyle[e]&&(t.strokeStyle=this.cache.strokeStyle[e],n=!0),null!=this.cache.globalAlpha[e]&&t.globalAlpha!==this.cache.globalAlpha[e]&&(t.globalAlpha=this.cache.globalAlpha[e],n=!0),null!=this.cache.lineWidth[e]&&t.lineWidth!==this.cache.lineWidth[e]&&(t.lineWidth=this.cache.lineWidth[e],n=!0),null!=this.cache.lineJoin[e]&&t.lineJoin!==this.cache.lineJoin[e]&&(t.lineJoin=this.cache.lineJoin[e],n=!0),null!=this.cache.lineCap[e]&&t.lineCap!==this.cache.lineCap[e]&&(t.lineCap=this.cache.lineCap[e],n=!0),null!=this.cache.setLineDash[e]&&t.getLineDash()!==this.cache.setLineDash[e]&&(t.setLineDash(this.cache.setLineDash[e]),n=!0),null!=this.cache.setLineDashOffset[e]&&t.getLineDashOffset()!==this.cache.setLineDashOffset[e]&&(t.setLineDashOffset(this.cache.setLineDashOffset[e]),n=!0),n},n}(a),r=function(t){function n(t,n,i){null==i&&(i=\"\"),this.fill_color_name=\"\"+i+\"fill_color\",this.fill_alpha_name=\"\"+i+\"fill_alpha\",this.color(t,n,this.fill_color_name),this.number(t,n,this.fill_alpha_name),this.do_fill=!0,e.isUndefined(this[this.fill_color_name].value)?e.isNull(this[this.fill_color_name][\"default\"])&&(this.do_fill=!1):e.isNull(this[this.fill_color_name].value)&&(this.do_fill=!1)}return i(n,t),n.prototype.set=function(t,e){return t.fillStyle=this.select(this.fill_color_name,e),t.globalAlpha=this.select(this.fill_alpha_name,e)},n.prototype.set_prop_cache=function(t){return this.cache={},this.cache.fillStyle=this.source_v_select(this.fill_color_name,t),this.cache.globalAlpha=this.source_v_select(this.fill_alpha_name,t)},n.prototype.set_vectorize=function(t,e){var n;return n=!1,t.fillStyle!==this.cache.fillStyle[e]&&(t.fillStyle=this.cache.fillStyle[e],n=!0),t.globalAlpha!==this.cache.globalAlpha[e]&&(t.globalAlpha=this.cache.globalAlpha[e],n=!0),n},n}(a),l=function(t){function e(t,e,n){null==n&&(n=\"\"),this.text_font_name=\"\"+n+\"text_font\",this.text_font_size_name=\"\"+n+\"text_font_size\",this.text_font_style_name=\"\"+n+\"text_font_style\",this.text_color_name=\"\"+n+\"text_color\",this.text_alpha_name=\"\"+n+\"text_alpha\",this.text_align_name=\"\"+n+\"text_align\",this.text_baseline_name=\"\"+n+\"text_baseline\",this.string(t,e,this.text_font_name),this.string(t,e,this.text_font_size_name),this[\"enum\"](t,e,this.text_font_style_name,\"normal italic bold\"),this.color(t,e,this.text_color_name),this.number(t,e,this.text_alpha_name),this[\"enum\"](t,e,this.text_align_name,\"left right center\"),this[\"enum\"](t,e,this.text_baseline_name,\"top middle bottom alphabetic hanging\")}return i(e,t),e.prototype.font=function(t,e){var n,i;return null==e&&(e=this.select(this.text_font_size_name,t)),n=this.select(this.text_font_name,t),i=this.select(this.text_font_style_name,t),n=i+\" \"+e+\" \"+n},e.prototype.set=function(t,e){return t.font=this.font(e),t.fillStyle=this.select(this.text_color_name,e),t.globalAlpha=this.select(this.text_alpha_name,e),t.textAlign=this.select(this.text_align_name,e),t.textBaseline=this.select(this.text_baseline_name,e)},e.prototype.set_prop_cache=function(t){var e,n,i,r;return this.cache={},n=this.source_v_select(this.text_font_size_name,t),e=this.source_v_select(this.text_font_name,t),i=this.source_v_select(this.text_font_style_name,t),this.cache.font=function(){var t,o,s;for(s=[],r=t=0,o=e.length;o>=0?o>t:t>o;r=o>=0?++t:--t)s.push(\"\"+i[r]+\" \"+n[r]+\" \"+e[r]);return s}(),this.cache.fillStyle=this.source_v_select(this.text_color_name,t),this.cache.globalAlpha=this.source_v_select(this.text_alpha_name,t),this.cache.textAlign=this.source_v_select(this.text_align_name,t),this.cache.textBaseline=this.source_v_select(this.text_baseline_name,t)},e.prototype.clear_prop_cache=function(){return this.cache={}},e.prototype.set_vectorize=function(t,e){var n;return n=!1,t.font!==this.cache.font[e]&&(t.font=this.cache.font[e],n=!0),t.fillStyle!==this.cache.fillStyle[e]&&(t.fillStyle=this.cache.fillStyle[e],n=!0),t.globalAlpha!==this.cache.globalAlpha[e]&&(t.globalAlpha=this.cache.globalAlpha[e],n=!0),t.textAlign!==this.cache.textAlign[e]&&(t.textAlign=this.cache.textAlign[e],n=!0),t.textBaseline!==this.cache.textBaseline[e]&&(t.textBaseline=this.cache.textBaseline[e],n=!0),n},e}(a),o=function(t){function e(t,e,n,i){var r,o,s,a,l,c;for(a=0,l=n.length;l>a;a++)r=n[a],o=\"number\",r.indexOf(\":\")>-1&&(c=r.split(\":\"),r=c[0],o=c[1]),this.setattr(t,e,r,o);for(s in i)this[s]=i[s];this.fast_path=!1,\"fast_path\"in e&&(this.fast_path=e.fast_path)}return i(e,t),e}(a),{glyph_properties:o,fill_properties:r,line_properties:s,text_properties:l}})}.call(this),function(){n(\"tool/active_tool_manager\",[],function(){var t;return t=function(){\" This makes sure that only one tool is active at a time \";function t(t){this.event_sink=t,this.event_sink.active=null}return t.prototype.bind_bokeh_events=function(){var t=this;return this.event_sink.on(\"clear_active_tool\",function(){return t.event_sink.trigger(\"\"+t.event_sink.active+\":deactivated\"),t.event_sink.active=null}),this.event_sink.on(\"active_tool\",function(e){return e!==t.event_sink.active?(t.event_sink.trigger(\"\"+e+\":activated\"),t.event_sink.trigger(\"\"+t.event_sink.active+\":deactivated\"),t.event_sink.active=e):void 0}),this.event_sink.on(\"try_active_tool\",function(e){return null==t.event_sink.active?(t.event_sink.trigger(\"\"+e+\":activated\"),t.event_sink.trigger(\"\"+t.event_sink.active+\":deactivated\"),t.event_sink.active=e):void 0})},t}()})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"common/gmap_plot\",[\"underscore\",\"jquery\",\"backbone\",\"./build_views\",\"./safebind\",\"./bulk_save\",\"./continuum_view\",\"./has_parent\",\"./view_state\",\"mapper/1d/linear_mapper\",\"mapper/2d/grid_mapper\",\"renderer/properties\",\"tool/active_tool_manager\"],function(e,n,r,o,s,a,l,c,h,u,p,d,f){var _,g,m,v,y,b,w;return v=[\"image\",\"underlay\",\"glyph\",\"overlay\",\"annotation\",\"tool\"],g=function(l){function c(){return this.bounds_change=t(this.bounds_change,this),this._mousemove=t(this._mousemove,this),this._mousedown=t(this._mousedown,this),y=c.__super__.constructor.apply(this,arguments)}return i(c,l),c.prototype.events={\"mousemove .bokeh_canvas_wrapper\":\"_mousemove\",\"mousedown .bokeh_canvas_wrapper\":\"_mousedown\"},c.prototype.className=\"bokeh\",c.prototype.view_options=function(){return e.extend({plot_model:this.model,plot_view:this},this.options)},c.prototype._mousedown=function(t){var e,n,i,r,o;for(r=this.mousedownCallbacks,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(e(t,t.layerX,t.layerY));return o},c.prototype._mousemove=function(t){var e,n,i,r,o;for(r=this.moveCallbacks,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(e(t,t.layerX,t.layerY));return o},c.prototype.pause=function(){return this.is_paused=!0},c.prototype.unpause=function(t){return null==t&&(t=!1),this.is_paused=!1,t?this.request_render_canvas(!0):this.request_render()},c.prototype.request_render=function(){this.is_paused||this.throttled_render()},c.prototype.request_render_canvas=function(t){this.is_paused||this.throttled_render_canvas(t)},c.prototype.initialize=function(t){var n,i,o,s,a,l,_,g,m,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R;for(c.__super__.initialize.call(this,e.defaults(t,this.default_options)),this.throttled_render=e.throttle(this.render,100),this.throttled_render_canvas=e.throttle(this.render_canvas,100),this.outline_props=new d.line_properties(this,{},\"title_\"),this.title_props=new d.text_properties(this,{},\"title_\"),this.view_state=new h({canvas_width:null!=(_=t.canvas_width)?_:this.mget(\"canvas_width\"),canvas_height:null!=(T=t.canvas_height)?T:this.mget(\"canvas_height\"),x_offset:null!=(A=t.x_offset)?A:this.mget(\"x_offset\"),y_offset:null!=(D=t.y_offset)?D:this.mget(\"y_offset\"),outer_width:null!=(M=t.outer_width)?M:this.mget(\"outer_width\"),outer_height:null!=(E=t.outer_height)?E:this.mget(\"outer_height\"),min_border_top:null!=(P=null!=(O=t.min_border_top)?O:this.mget(\"min_border_top\"))?P:this.mget(\"min_border\"),min_border_bottom:null!=(R=null!=(g=t.min_border_bottom)?g:this.mget(\"min_border_bottom\"))?R:this.mget(\"min_border\"),min_border_left:null!=(m=null!=(y=t.min_border_left)?y:this.mget(\"min_border_left\"))?m:this.mget(\"min_border\"),min_border_right:null!=(b=null!=(w=t.min_border_right)?w:this.mget(\"min_border_right\"))?b:this.mget(\"min_border\"),requested_border_top:0,requested_border_bottom:0,requested_border_left:0,requested_border_right:0}),this.hidpi=null!=(x=t.hidpi)?x:this.mget(\"hidpi\"),this.x_range=null!=(k=t.x_range)?k:this.mget_obj(\"x_range\"),this.y_range=null!=(C=t.y_range)?C:this.mget_obj(\"y_range\"),this.xmapper=new u.Model({source_range:this.x_range,target_range:this.view_state.get(\"inner_range_horizontal\")}),this.ymapper=new u.Model({source_range:this.y_range,target_range:this.view_state.get(\"inner_range_vertical\")}),this.mapper=new p.Model({domain_mapper:this.xmapper,codomain_mapper:this.ymapper}),S=this.mget_obj(\"tools\"),o=0,a=S.length;a>o;o++)i=S[o],(\"PanTool\"===i.type||\"WheelZoomTool\"===i.type)&&(i.set_obj(\"dataranges\",[this.x_range,this.y_range]),i.set(\"dimensions\",[\"width\",\"height\"]));for(this.requested_padding={top:0,bottom:0,left:0,right:0},this.old_mapper_state={x:null,y:null},this.am_rendering=!1,this.renderers={},this.tools={},this.zoom_count=null,this.eventSink=e.extend({},r.Events),this.moveCallbacks=[],this.mousedownCallbacks=[],this.keydownCallbacks=[],this.render_init(),this.render_canvas(!1),this.atm=new f(this.eventSink),this.levels={},s=0,l=v.length;l>s;s++)n=v[s],this.levels[n]={};return this.build_levels(),this.request_render(),this.atm.bind_bokeh_events(),this.bind_bokeh_events(),this},c.prototype.map_to_screen=function(t,e,n){var i,r,o;return\"screen\"===e?(i=t.slice(0),r=n.slice(0)):(o=this.mapper.v_map_to_target(t,n),i=o[0],r=o[1]),i=this.view_state.v_vx_to_sx(i),r=this.view_state.v_vy_to_sy(r),[i,r]},c.prototype.map_from_screen=function(t,e,n){var i,r,o;return t=this.view_state.v_sx_to_vx(t.slice(0)),e=this.view_state.v_sy_to_vy(e.slice(0)),\"screen\"===n?(i=t,r=e):(o=this.mapper.v_map_from_target(t,e),i=o[0],r=o[1]),[i,r]},c.prototype.update_range=function(t){var e,n,i,r,o;return null==t&&(t=this.initial_range_info),this.pause(),null!=t.sdx?this.map.panBy(t.sdx,t.sdy):(o=Math.min(t.xr.start,t.xr.end),i=Math.max(t.xr.start,t.xr.end),r=Math.min(t.yr.start,t.yr.end),n=Math.max(t.yr.start,t.yr.end),e=new google.maps.LatLng((n+r)/2,(i+o)/2),null==t.factor?(this.map.setCenter(e),this.map.setZoom(this.initial_zoom)):t.factor>0?(this.zoom_count+=1,10===this.zoom_count&&(this.map.setZoom(this.map.getZoom()+1),this.zoom_count=0)):(this.zoom_count-=1,-10===this.zoom_count&&(this.map.setCenter(e),this.map.setZoom(this.map.getZoom()-1),this.map.setCenter(e),this.zoom_count=0))),this.unpause()},c.prototype.build_tools=function(){return o(this.tools,this.mget_obj(\"tools\"),this.view_options())},c.prototype.build_views=function(){return o(this.renderers,this.mget_obj(\"renderers\"),this.view_options())},c.prototype.build_levels=function(){var t,e,n,i,r,o,s,a,l;for(r=this.build_views(),n=this.build_tools(),o=0,a=r.length;a>o;o++)i=r[o],t=i.mget(\"level\"),this.levels[t][i.model.id]=i,i.bind_bokeh_events();for(s=0,l=n.length;l>s;s++)e=n[s],t=e.mget(\"level\"),this.levels[t][e.model.id]=e,e.bind_bokeh_events();return this},c.prototype.bind_bokeh_events=function(){var t=this;return s(this,this.view_state,\"change\",function(){return t.request_render_canvas(),t.request_render()}),s(this,this.x_range,\"change\",this.request_render),s(this,this.y_range,\"change\",this.request_render),s(this,this.model,\"change:renderers\",this.build_levels),s(this,this.model,\"change:tool\",this.build_levels),s(this,this.model,\"change\",this.request_render),s(this,this.model,\"destroy\",function(){return t.remove()})},c.prototype.render_init=function(){return this.$el.append(n(\"<div class='bk-button-bar'/>\\n<div class='plotarea'>\\n<div class='bokeh_canvas_wrapper'>\\n  <div class=\\\"bokeh_gmap\\\"></div>\\n  <canvas class='bokeh_canvas'></canvas>\\n</div>\\n</div>\")),this.button_bar=this.$el.find(\".bk-button-bar\"),this.canvas_wrapper=this.$el.find(\".bokeh_canvas_wrapper\"),this.canvas=this.$el.find(\"canvas.bokeh_canvas\"),this.gmap_div=this.$el.find(\".bokeh_gmap\")},c.prototype.render_canvas=function(t){var n,i,r,o,s,a,l,c,h,u,p,d=this;return null==t&&(t=!0),this.ctx=this.canvas[0].getContext(\"2d\"),this.hidpi?(r=window.devicePixelRatio||1,n=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,h=r/n):h=1,l=this.view_state.get(\"outer_height\"),c=this.view_state.get(\"outer_width\"),this.canvas.width=c*h,this.canvas.height=l*h,this.canvas_wrapper.attr(\"style\",\"width:\"+c+\"px; height:\"+l+\"px\"),this.canvas.attr(\"style\",\"width:\"+c+\"px;\"),this.canvas.attr(\"style\",\"height:\"+l+\"px;\"),this.canvas.attr(\"width\",c*h).attr(\"height\",l*h),this.$el.attr(\"width\",c).attr(\"height\",l),this.ctx.scale(h,h),this.ctx.translate(.5,.5),s=this.view_state.get(\"inner_width\"),o=this.view_state.get(\"inner_height\"),p=this.view_state.get(\"border_top\"),a=this.view_state.get(\"border_left\"),this.gmap_div.attr(\"style\",\"top: \"+p+\"px; left: \"+a+\"px; position: absolute\"),this.gmap_div.attr(\"style\",\"width:\"+s+\"px;\"),this.gmap_div.attr(\"style\",\"height:\"+o+\"px;\"),this.gmap_div.width(\"\"+s+\"px\").height(\"\"+o+\"px\"),this.initial_zoom=this.mget(\"map_options\").zoom,i=function(){var t,e;return e=d.mget(\"map_options\"),t={center:new google.maps.LatLng(e.lat,e.lng),zoom:e.zoom,disableDefaultUI:!0,mapTypeId:google.maps.MapTypeId.SATELLITE},d.map=new google.maps.Map(d.gmap_div[0],t),google.maps.event.addListener(d.map,\"bounds_changed\",d.bounds_change)},null!=window.google&&null!=window.google.maps?e.defer(this.build_map):(window._bokeh_first_gmap_load=i,u=document.createElement(\"script\"),u.type=\"text/javascript\",u.src=\"https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&callback=_bokeh_first_gmap_load\",document.body.appendChild(u)),t?this.render():void 0\n",
        "                },c.prototype.bounds_change=function(){var t,e,n;return t=this.map.getBounds(),e=t.getNorthEast(),n=t.getSouthWest(),this.x_range.set({start:n.lng(),end:e.lng(),silent:!0}),this.y_range.set({start:n.lat(),end:e.lat()}),null==this.initial_range_info?this.initial_range_info={xr:{start:this.x_range.get(\"start\"),end:this.x_range.get(\"end\")},yr:{start:this.y_range.get(\"start\"),end:this.y_range.get(\"end\")}}:void 0},c.prototype.save_png=function(){var t;return this.render(),t=this.canvas[0].toDataURL(),this.model.set(\"png\",this.canvas[0].toDataURL()),a([this.model])},c.prototype.render=function(){var t,e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M;for(this.requested_padding={top:0,bottom:0,left:0,right:0},T=[\"image\",\"underlay\",\"glyph\",\"overlay\",\"annotation\",\"tool\"],b=0,k=T.length;k>b;b++){s=T[b],h=this.levels[s];for(r in h)if(m=h[r],null!=m.padding_request){c=m.padding_request();for(r in c)m=c[r],this.requested_padding[r]+=m}}_=this.mget(\"title\"),_&&(this.title_props.set(this.ctx,{}),f=this.ctx.measureText(this.mget(\"title\")).ascent,this.requested_padding.top+=f+this.mget(\"title_standoff\")),d=this.mget(\"border_symmetry\")||\"\",(d.indexOf(\"h\")>=0||d.indexOf(\"H\")>=0)&&(e=Math.max(this.requested_padding.left,this.requested_padding.right),this.requested_padding.left=e,this.requested_padding.right=e),(d.indexOf(\"v\")>=0||d.indexOf(\"V\")>=0)&&(e=Math.max(this.requested_padding.top,this.requested_padding.bottom),this.requested_padding.top=e,this.requested_padding.bottom=e),this.is_paused=!0,A=this.requested_padding;for(r in A)m=A[r],this.view_state.set(\"requested_border_\"+r,m);for(this.is_paused=!1,a=this.view_state.get(\"outer_height\"),l=this.view_state.get(\"outer_width\"),i=this.view_state.get(\"inner_width\"),n=this.view_state.get(\"inner_height\"),g=this.view_state.get(\"border_top\"),o=this.view_state.get(\"border_left\"),this.gmap_div.attr(\"style\",\"top: \"+g+\"px; left: \"+o+\"px;\"),this.gmap_div.width(\"\"+i+\"px\").height(\"\"+n+\"px\"),this.ctx.clearRect(0,0,l,a),this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(0,a),this.ctx.lineTo(l,a),this.ctx.lineTo(l,0),this.ctx.lineTo(0,0),this.ctx.moveTo(o,g),this.ctx.lineTo(o+i,g),this.ctx.lineTo(o+i,g+n),this.ctx.lineTo(o,g+n),this.ctx.lineTo(o,g),this.ctx.closePath(),this.ctx.fillStyle=this.mget(\"border_fill\"),this.ctx.fill(),this.outline_props.do_stroke&&(this.outline_props.set(this.ctx,{}),this.ctx.strokeRect(this.view_state.get(\"border_left\"),this.view_state.get(\"border_top\"),this.view_state.get(\"inner_width\"),this.view_state.get(\"inner_height\"))),t=!1,v=this.xmapper.get(\"mapper_state\")[0],y=this.xmapper.get(\"mapper_state\")[0],(Math.abs(this.old_mapper_state.x-v)>1e-8||Math.abs(this.old_mapper_state.y-y)>1e-8)&&(this.old_mapper_state.x=v,this.old_mapper_state.y=y,t=!0),this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(this.view_state.get(\"border_left\"),this.view_state.get(\"border_top\"),this.view_state.get(\"inner_width\"),this.view_state.get(\"inner_height\")),this.ctx.clip(),this.ctx.beginPath(),D=[\"image\",\"underlay\",\"glyph\"],w=0,C=D.length;C>w;w++){s=D[w],h=this.levels[s];for(r in h)m=h[r],m.render(t)}for(this.ctx.restore(),M=[\"overlay\",\"annotation\",\"tool\"],x=0,S=M.length;S>x;x++){s=M[x],h=this.levels[s];for(r in h)m=h[r],m.render(t)}return _?(u=this.view_state.get(\"outer_width\")/2,p=f,this.title_props.set(this.ctx,{}),this.ctx.fillText(_,u,p)):void 0},c}(l.View),_=function(t){function e(){return b=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"GMapPlot\",e.prototype.default_view=g,e.prototype.add_renderers=function(t){var e;return e=this.get(\"renderers\"),e=e.concat(t),this.set(\"renderers\",e)},e.prototype.parent_properties=[\"border_fill\",\"canvas_width\",\"canvas_height\",\"outer_width\",\"outer_height\",\"min_border\",\"min_border_top\",\"min_border_bottom\",\"min_border_left\",\"min_border_right\"],e.prototype.defaults=function(){return{data_sources:{},renderers:[],tools:[],title:\"GMapPlot\"}},e.prototype.display_defaults=function(){return{hidpi:!0,border_fill:\"#eee\",border_symmetry:\"h\",min_border:40,x_offset:0,y_offset:0,canvas_width:300,canvas_height:300,outer_width:300,outer_height:300,title_standoff:8,title_text_font:\"helvetica\",title_text_font_size:\"20pt\",title_text_font_style:\"normal\",title_text_color:\"#444444\",title_text_alpha:1,title_text_align:\"center\",title_text_baseline:\"alphabetic\",outline_line_color:\"#aaaaaa\",outline_line_width:1,outline_line_alpha:1,outline_line_join:\"miter\",outline_line_cap:\"butt\",outline_line_dash:[],outline_line_dash_offset:0}},e}(c),m=function(t){function e(){return w=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=_,e}(r.Collection),{Model:_,Collection:new m,View:g}})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"common/grid_view_state\",[\"underscore\",\"./safebind\",\"./view_state\"],function(e,n,r){var o,s;return o=function(r){function o(){return this.layout_widths=t(this.layout_widths,this),this.layout_heights=t(this.layout_heights,this),this.setup_layout_properties=t(this.setup_layout_properties,this),s=o.__super__.constructor.apply(this,arguments)}return i(o,r),o.prototype.setup_layout_properties=function(){var t,e,n,i,r,o;for(this.register_property(\"layout_heights\",this.layout_heights,!0),this.register_property(\"layout_widths\",this.layout_widths,!0),r=this.get(\"childviewstates\"),o=[],n=0,i=r.length;i>n;n++)t=r[n],o.push(function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],this.add_dependencies(\"layout_heights\",e,\"outer_height\"),r.push(this.add_dependencies(\"layout_widths\",e,\"outer_width\"));return r}.call(this));return o},o.prototype.initialize=function(t,i){return o.__super__.initialize.call(this,t,i),this.setup_layout_properties(),n(this,this,\"change:childviewstates\",this.setup_layout_properties),this.register_property(\"height\",function(){return e.reduce(this.get(\"layout_heights\"),function(t,e){return t+e},0)},!0),this.add_dependencies(\"height\",this,\"layout_heights\"),this.register_property(\"width\",function(){return e.reduce(this.get(\"layout_widths\"),function(t,e){return t+e},0)},!0),this.add_dependencies(\"width\",this,\"layout_widths\")},o.prototype.position_child_x=function(t){return t},o.prototype.position_child_y=function(t,e){return this.get(\"height\")-t-e},o.prototype.maxdim=function(t,n){return 0===n.length?0:e.max(e.map(n,function(e){return null!=e?e.get(t):0}))},o.prototype.layout_heights=function(){var t,e;return e=function(){var e,n,i,r;for(i=this.get(\"childviewstates\"),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(this.maxdim(\"outer_height\",t));return r}.call(this)},o.prototype.layout_widths=function(){var t,n,i,r,o,s;return o=this.get(\"childviewstates\")[0].length,i=function(){var t,n,i,a;for(i=e.range(o),a=[],t=0,n=i.length;n>t;t++)r=i[t],a.push(function(){var t,e,n,i;for(n=this.get(\"childviewstates\"),i=[],t=0,e=n.length;e>t;t++)s=n[t],i.push(s[r]);return i}.call(this));return a}.call(this),n=function(){var e,n,r;for(r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(this.maxdim(\"outer_width\",t));return r}.call(this)},o.prototype.defaults=function(){return{childviewstates:[[]],border_space:0}},o}(r)})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"common/grid_plot\",[\"underscore\",\"backbone\",\"./build_views\",\"./safebind\",\"./continuum_view\",\"./has_parent\",\"./grid_view_state\",\"renderer/properties\",\"tool/active_tool_manager\"],function(t,n,i,r,o,s,a,l,c){var h,u,p,d,f,_;return u=function(o){function s(){return d=s.__super__.constructor.apply(this,arguments)}return e(s,o),s.prototype.tagName=\"div\",s.prototype.className=\"bokeh grid_plot\",s.prototype.default_options={scale:1},s.prototype.set_child_view_states=function(){var t,e,n,i,r,o,s;for(n=[],s=this.mget(\"children\"),r=0,o=s.length;o>r;r++)t=s[r],e=function(){var e,n,r;for(r=[],e=0,n=t.length;n>e;e++)i=t[e],r.push(this.childviews[i.id].view_state);return r}.call(this),n.push(e);return this.viewstate.set(\"childviewstates\",n)},s.prototype.initialize=function(e){return s.__super__.initialize.call(this,t.defaults(e,this.default_options)),this.viewstate=new a,this.toolbar_height=0,this.childviews={},this.build_children(),this.bind_bokeh_events(),this.render(),this},s.prototype.bind_bokeh_events=function(){var t=this;return r(this,this.model,\"change:children\",this.build_children),r(this,this.model,\"change\",this.render),r(this,this.viewstate,\"change\",this.render),r(this,this.model,\"destroy\",function(){return t.remove()})},s.prototype.b_events={\"change:children model\":\"build_children\",\"change model\":\"render\",\"change viewstate\":\"render\",\"destroy model\":\"remove\"},s.prototype.build_children=function(){var t,e,n,r,o,s,a,l;for(t=[],l=this.mget_obj(\"children\"),r=0,s=l.length;s>r;r++)for(n=l[r],o=0,a=n.length;a>o;o++)e=n[o],t.push(e);return i(this.childviews,t,{}),this.set_child_view_states()},s.prototype.makeButton=function(e,n,i,r){var o,s,a,l,c;return o=t.flatten(t.map(t.pluck(this.childviews,\"tools\"),t.values)),l=t.where(o,{constructor:n}),s=$(\"<button class='bk-toolbar-button'>\"+r+\"</button>\"),i.append(s),c=!1,a=!1,s.click(function(){return a?e.trigger(\"clear_active_tool\"):e.trigger(\"active_tool\",r)}),e.on(\"\"+r+\":deactivated\",function(){return s.removeClass(\"active\"),a=!1,t.each(l,function(t){var e;return e=t.evgen.toolName,t.evgen.eventSink.trigger(\"\"+e+\":deactivated\")})}),e.on(\"\"+r+\":activated\",function(){return s.addClass(\"active\"),a=!0,t.each(l,function(t){var e;return e=t.evgen.toolName,t.evgen.eventSink.trigger(\"\"+e+\":activated\")})})},s.prototype.addGridToolbar=function(){var e,i,r,o=this;return this.button_bar=$(\"<div class='grid_button_bar'/>\"),this.button_bar.attr(\"style\",\"position:absolute; left:10px; top:0px; \"),this.toolEventSink=t.extend({},n.Events),this.atm=new c(this.toolEventSink),this.atm.bind_bokeh_events(),this.$el.append(this.button_bar),i=t.flatten(t.map(t.pluck(this.childviews,\"tools\"),t.values)),e=t.uniq(t.pluck(i,\"constructor\")),e.length>0&&(this.toolbar_height=35),r={},t.each(e,function(e){var n;return n=t.where(i,{constructor:e})[0].evgen_options.buttonText,r[n]=e}),t.map(r,function(t,e){return o.makeButton(o.toolEventSink,t,o.button_bar,e)}),t.map(i,function(t){return t.evgen.hide_button()})},s.prototype.render=function(){var e,n,i,r,o,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A;for(s.__super__.render.call(this),T=t.values(this.childviews),b=0,k=T.length;k>b;b++)f=T[b],f.$el.detach();for(this.$el.html(\"\"),this.addGridToolbar(),p=this.viewstate.get(\"layout_heights\"),i=this.viewstate.get(\"layout_widths\"),v=[0],t.reduceRight(p.slice(1),function(t,e){var n;return n=t+e,v.push(n),n},0),v.reverse(),g=[0],t.reduce(i.slice(0),function(t,e){var n;return n=t+e,g.push(n),n},0),a=[],o=null,A=this.mget(\"children\"),h=w=0,C=A.length;C>w;h=++w)for(u=A[h],n=x=0,S=u.length;S>x;n=++x)c=u[n],f=this.childviews[c.id],y=this.viewstate.position_child_y(v[h],f.view_state.get(\"outer_height\")-this.toolbar_height),m=this.viewstate.position_child_x(g[n],f.view_state.get(\"outer_width\")),l=$(\"<div class='gp_plotwrapper'></div>\"),l.attr(\"style\",\"position: absolute; left:\"+m+\"px; top:\"+y+\"px\"),l.append(f.$el),this.$el.append(l);return e=function(t,e){return t+e},d=t.reduce(p,e,0),r=d+this.toolbar_height,_=t.reduce(i,e,0),this.$el.attr(\"style\",\"position:relative; height:\"+r+\"px;width:\"+_+\"px\"),this.render_end()},s}(o.View),h=function(t){function n(){return f=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"GridPlot\",n.prototype.default_view=u,n.prototype.defaults=function(){return{children:[[]],border_space:0}},n}(s),p=function(t){function n(){return _=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=h,n}(n.Collection),{Model:h,Collection:new p,View:u}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"mapper/1d/log_mapper\",[\"backbone\",\"common/has_properties\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),this.register_property(\"mapper_state\",this._mapper_state,!0),this.add_dependencies(\"mapper_state\",this,[\"source_range\",\"target_range\"]),this.add_dependencies(\"mapper_state\",this.get(\"source_range\"),[\"start\",\"end\"]),this.add_dependencies(\"mapper_state\",this.get(\"target_range\"),[\"start\",\"end\"])},n.prototype.map_to_target=function(t){var e,n,i,r,o,s,a,l;if(l=this.get(\"mapper_state\"),a=l[0],o=l[1],i=l[2],n=l[3],r=0,s=0,0===i)r=0;else try{if(r=(Math.log(t)-n)/i,isNaN(r))throw\"NaN\";if(isFinite(r)===!1)throw\"Infinite\"}catch(c){e=c,r=0}return s=r*a+o},n.prototype.v_map_to_target=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v;if(v=this.get(\"mapper_state\"),p=v[0],h=v[1],o=v[2],r=v[3],s=new Float64Array(t.length),u=new Float64Array(t.length),0===o)s=t.map(function(t){return 0*t});else try{for(l=t.map(function(t){return 0>=t}),c=t.map(function(t){return isNaN(t)}),a=function(){var e,i,r;for(r=[],n=e=0,i=t.length;i>=0?i>e:e>i;n=i>=0?++e:--e)r.push(l[n]|c[n]);return r}(),a=a.reduce(function(t,e){return t||e}),1===a&&(t[a]=1),s=t.map(function(t){return(Math.log(t)-r)/o}),i=f=0,g=s.length;g>f;i=++f){if(d=s[i],isNaN(s[i]))throw\"NaN\";if(isFinite(s[i])===!1)throw\"Infinite\"}}catch(y){e=y,s=t.map(function(t){return 0*t})}for(i=_=0,m=t.length;m>_;i=++_)d=t[i],u[i]=s[i]*p+h;return u},n.prototype.map_from_target=function(t){var e,n,i,r,o,s;return s=this.get(\"mapper_state\"),o=s[0],r=s[1],n=s[2],e=s[3],i=(t-r)/o,i=Math.exp(n*i+e)},n.prototype.v_map_from_target=function(t){var e,n,i,r,o,s;return s=this.get(\"mapper_state\"),o=s[0],r=s[1],n=s[2],e=s[3],i=t.map(function(t){return(t-r)/o}),i=i.map(function(t){return Math.exp(n*t+e)})},n.prototype._get_safe_scale=function(t,e){var n,i,r;return r=0>t?0:t,n=0>e?0:e,r===n&&(0===r?(r=1,n=10):(i=Math.log(r)/Math.log(10),r=Math.pow(10,Math.floor(i)),n=Math.ceil(i)!==Math.floor(i)?Math.pow(10,Math.ceil(i)):Math.pow(10,Math.ceil(i)+1))),[r,n]},n.prototype._mapper_state=function(){var t,e,n,i,r,o,s,a,l,c,h,u;return a=this.get(\"source_range\").get(\"start\"),s=this.get(\"source_range\").get(\"end\"),h=this.get(\"target_range\").get(\"start\"),c=this.get(\"target_range\").get(\"end\"),o=c-h,u=this._get_safe_scale(a,s),l=u[0],t=u[1],0===l?(n=Math.log(t),e=0):(n=Math.log(t)-Math.log(l),e=Math.log(l)),r=o,i=h,[r,i,n,e]},n}(n),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),{Model:i,Collection:new r}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"mapper/1d/categorical_mapper\",[\"backbone\",\"./linear_mapper\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.map_to_target=function(t){var e,i,r,o;return\"number\"==typeof t?n.__super__.map_to_target.call(this,t):(i=this.get(\"source_range\").get(\"factors\"),t.indexOf(\":\")>=0?(o=t.split(\":\"),e=o[0],r=o[1],r=parseFloat(r),n.__super__.map_to_target.call(this,i.indexOf(e)+.5+r)):n.__super__.map_to_target.call(this,i.indexOf(t)+1))},n.prototype.v_map_to_target=function(t){var e,i,r,o,s,a,l,c,h;if(\"number\"==typeof t[0])return n.__super__.v_map_to_target.call(this,t);for(i=this.get(\"source_range\").get(\"factors\"),s=Array(t.length),r=l=0,c=t.length;c>=0?c>l:l>c;r=c>=0?++l:--l)a=t[r],a.indexOf(\":\")>=0?(h=a.split(\":\"),e=h[0],o=h[1],o=parseFloat(o),s[r]=i.indexOf(e)+.5+o):s[r]=i.indexOf(a)+1;return n.__super__.v_map_to_target.call(this,s)},n.prototype.map_from_target=function(t){var e;return t=n.__super__.map_from_target.call(this,t)-.5,e=this.get(\"source_range\").get(\"factors\"),e[Math.floor(t)]},n.prototype.v_map_from_target=function(t){var e,i,r,o,s;for(r=n.__super__.v_map_from_target.call(this,t),e=this.get(\"source_range\").get(\"factors\"),i=o=0,s=r.length;s>=0?s>o:o>s;i=s>=0?++o:--o)r[i]=e[Math.floor(r[i]-.5)];return r},n}(n.Model),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),{Model:i,Collection:new r}})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"common/plot\",[\"underscore\",\"backbone\",\"require\",\"./build_views\",\"./safebind\",\"./bulk_save\",\"./continuum_view\",\"./has_parent\",\"./view_state\",\"mapper/1d/linear_mapper\",\"mapper/1d/log_mapper\",\"mapper/1d/categorical_mapper\",\"mapper/2d/grid_mapper\",\"renderer/properties\",\"tool/active_tool_manager\"],function(e,n,r,o,s,a,l,c,h,u,p,d,f,_,g){var m,v,y,b,w,x,k,C,S,T,A;return x=_.line_properties,k=_.text_properties,m=[\"image\",\"underlay\",\"glyph\",\"overlay\",\"annotation\",\"tool\"],w=function(t){return t()},w=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||w,C=function(t,e){var n,i,r,o,s,a,l,c;return c=[null,null,null,null],i=c[0],n=c[1],l=c[2],a=c[3],s=0,o=!1,r=function(){return s=new Date,l=null,o=!1,a=t.apply(i,n)},function(){var t,c;return t=new Date,c=e-(t-s),i=this,n=arguments,0>=c&&!o?(clearTimeout(l),o=!0,w(r)):l||(l=setTimeout(function(){return w(r)},c)),a}},y=function(r){function l(){return this._mousemove=t(this._mousemove,this),this._mousedown=t(this._mousedown,this),S=l.__super__.constructor.apply(this,arguments)}return i(l,r),l.prototype.className=\"bokeh plotview\",l.prototype.events={\"mousemove .bokeh_canvas_wrapper\":\"_mousemove\",\"mousedown .bokeh_canvas_wrapper\":\"_mousedown\"},l.prototype.view_options=function(){return e.extend({plot_model:this.model,plot_view:this},this.options)},l.prototype._mousedown=function(t){var e,n,i,r,o;for(r=this.mousedownCallbacks,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(e(t,t.layerX,t.layerY));return o},l.prototype._mousemove=function(t){var e,n,i,r,o;for(r=this.moveCallbacks,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(e(t,t.layerX,t.layerY));return o},l.prototype.pause=function(){return this.is_paused=!0},l.prototype.unpause=function(t){return null==t&&(t=!1),this.is_paused=!1,t?this.request_render_canvas(!0):this.request_render()},l.prototype.request_render=function(){this.is_paused||this.throttled_render()},l.prototype.request_render_canvas=function(t){this.is_paused||this.throttled_render_canvas(t)},l.prototype.initialize=function(t){var i,r,o,s,a,c,_,v,y,b,w,S,T,A,D,M,E,P,O,R,j,N,H,I;for(l.__super__.initialize.call(this,e.defaults(t,this.default_options)),this.throttled_render=C(this.render,15),this.throttled_render_canvas=C(this.render_canvas,15),this.outline_props=new x(this,{},\"outline_\"),this.title_props=new k(this,{},\"title_\"),this.view_state=new h({canvas_width:null!=(v=t.canvas_width)?v:this.mget(\"canvas_width\"),canvas_height:null!=(E=t.canvas_height)?E:this.mget(\"canvas_height\"),x_offset:null!=(P=t.x_offset)?P:this.mget(\"x_offset\"),y_offset:null!=(O=t.y_offset)?O:this.mget(\"y_offset\"),outer_width:null!=(R=t.outer_width)?R:this.mget(\"outer_width\"),outer_height:null!=(j=t.outer_height)?j:this.mget(\"outer_height\"),min_border_top:null!=(N=null!=(H=t.min_border_top)?H:this.mget(\"min_border_top\"))?N:this.mget(\"min_border\"),min_border_bottom:null!=(I=null!=(y=t.min_border_bottom)?y:this.mget(\"min_border_bottom\"))?I:this.mget(\"min_border\"),min_border_left:null!=(b=null!=(w=t.min_border_left)?w:this.mget(\"min_border_left\"))?b:this.mget(\"min_border\"),min_border_right:null!=(S=null!=(T=t.min_border_right)?T:this.mget(\"min_border_right\"))?S:this.mget(\"min_border\"),requested_border_top:0,requested_border_bottom:0,requested_border_left:0,requested_border_right:0}),this.hidpi=null!=(A=t.hidpi)?A:this.mget(\"hidpi\"),this.x_range=null!=(D=t.x_range)?D:this.mget_obj(\"x_range\"),this.y_range=null!=(M=t.y_range)?M:this.mget_obj(\"y_range\"),o=this.mget(\"x_mapper_type\"),\"auto\"===o?(r=u.Model,\"FactorRange\"===this.x_range.type&&(r=d.Model),this.xmapper=new r({source_range:this.x_range,target_range:this.view_state.get(\"inner_range_horizontal\")})):(\"log\"===o&&(r=p.Model),this.xmapper=new r({source_range:this.x_range,target_range:this.view_state.get(\"inner_range_horizontal\")})),a=this.mget(\"y_mapper_type\"),\"auto\"===a?(s=u.Model,\"FactorRange\"===this.y_range.type&&(s=d.Model),this.ymapper=new s({source_range:this.y_range,target_range:this.view_state.get(\"inner_range_vertical\")})):(\"log\"===a&&(s=p.Model),this.ymapper=new s({source_range:this.y_range,target_range:this.view_state.get(\"inner_range_vertical\")})),this.mapper=new f.Model({domain_mapper:this.xmapper,codomain_mapper:this.ymapper}),this.requested_padding={top:0,bottom:0,left:0,right:0},this.old_mapper_state={x:null,y:null},this.am_rendering=!1,this.renderers={},this.tools={},this.eventSink=e.extend({},n.Events),this.moveCallbacks=[],this.mousedownCallbacks=[],this.keydownCallbacks=[],this.render_init(),this.render_canvas(!1),this.atm=new g(this.eventSink),this.levels={},c=0,_=m.length;_>c;c++)i=m[c],this.levels[i]={};return this.build_levels(),this.request_render(),this.atm.bind_bokeh_events(),this.bind_bokeh_events(),this},l.prototype.map_to_screen=function(t,n,i,r){var o,s;return\"screen\"===n?e.isArray(t)?o=t.slice(0):(o=new Float64Array(t.length),o.set(t)):o=this.xmapper.v_map_to_target(t),\"screen\"===r?e.isArray(i)?s=i.slice(0):(s=new Float64Array(i.length),s.set(i)):s=this.ymapper.v_map_to_target(i),o=this.view_state.v_vx_to_sx(o),s=this.view_state.v_vy_to_sy(s),[o,s]},l.prototype.map_from_screen=function(t,n,i){var r,o,s,a,l;return e.isArray(t)?r=t.slice(0):(r=new Float64Array(t.length),r.set(s)),e.isArray(n)?o=n.slice(0):(o=new Float64Array(n.length),o.set(a)),t=this.view_state.v_sx_to_vx(r),n=this.view_state.v_sy_to_vy(o),\"screen\"===i?(s=t,a=n):(l=this.mapper.v_map_from_target(t,n),s=l[0],a=l[1]),[s,a]},l.prototype.update_range=function(t){return null==t&&(t=this.initial_range_info),this.pause(),this.x_range.set(t.xr),this.y_range.set(t.yr),this.unpause()},l.prototype.build_tools=function(){return o(this.tools,this.mget_obj(\"tools\"),this.view_options())},l.prototype.build_views=function(){return o(this.renderers,this.mget_obj(\"renderers\"),this.view_options())},l.prototype.build_levels=function(){var t,n,i,r,o,s,a,l,c,h,u,p,d,f;for(i=e.keys(this.renderers),l=this.build_views(),r=e.difference(i,e.pluck(this.mget_obj(\"renderers\"),\"id\")),c=0,p=r.length;p>c;c++)t=r[c],delete this.levels.glyph[t];for(s=this.build_tools(),h=0,d=l.length;d>h;h++)a=l[h],n=a.mget(\"level\"),this.levels[n][a.model.id]=a,a.bind_bokeh_events();for(u=0,f=s.length;f>u;u++)o=s[u],n=o.mget(\"level\"),this.levels[n][o.model.id]=o,o.bind_bokeh_events();return this},l.prototype.bind_bokeh_events=function(){var t=this;return s(this,this.view_state,\"change\",function(){return t.request_render_canvas(),t.request_render()}),s(this,this.x_range,\"change\",this.request_render),s(this,this.y_range,\"change\",this.request_render),s(this,this.model,\"change:renderers\",this.build_levels),s(this,this.model,\"change:tool\",this.build_levels),s(this,this.model,\"change\",this.request_render),s(this,this.model,\"destroy\",function(){return t.remove()})},l.prototype.render_init=function(){return this.$el.append($(\"<div class='plotarea'>\\n  <div class='bokeh_canvas_wrapper_outer'>\\n    <div class='bokeh_canvas_wrapper'>\\n      <canvas class='bokeh_canvas'></canvas>\\n    </div>\\n    <div class='bk-sidebar'>\\n      <a href='http://bokeh.pydata.org/' class='bk-logo bk-logo-medium'/>\\n      <div class='bk-button-bar'/>\\n    </div>\\n  </div>\\n</div>\")),this.canvas_wrapper=this.$el.find(\".bokeh_canvas_wrapper\"),this.canvas=this.$el.find(\"canvas.bokeh_canvas\"),this.button_bar=this.$el.find(\".bk-button-bar\")},l.prototype.render_canvas=function(t){var e,n,i,r,o;return null==t&&(t=!0),this.ctx=this.canvas[0].getContext(\"2d\"),this.hidpi?(n=window.devicePixelRatio||1,e=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,o=n/e):o=1,r=this.view_state.get(\"outer_width\"),i=this.view_state.get(\"outer_height\"),this.canvas.width=r*o,this.canvas.height=i*o,this.canvas_wrapper.attr(\"style\",\"width:\"+r+\"px; height:\"+i+\"px\"),this.canvas.attr(\"style\",\"width:\"+r+\"px;\"),this.canvas.attr(\"style\",\"height:\"+i+\"px;\"),this.canvas.attr(\"width\",r*o).attr(\"height\",i*o),this.$el.width(r+150),this.$el.height(i),this.ctx.scale(o,o),this.ctx.translate(.5,.5),t?this.render():void 0},l.prototype.save_png=function(){var t;return this.render(),t=this.canvas[0].toDataURL(),this.model.set(\"png\",this.canvas[0].toDataURL()),a([this.model])},l.prototype.set_initial_range=function(){var t,n;return n=[this.x_range.get(\"start\"),this.x_range.get(\"end\"),this.y_range.get(\"start\"),this.y_range.get(\"end\")],t=e.map(n,function(t){return null!=t&&!e.isNaN(t)}),t=e.all(t),t?this.initial_range_info={xr:{start:this.x_range.get(\"start\"),end:this.x_range.get(\"end\")},yr:{start:this.y_range.get(\"start\"),end:this.y_range.get(\"end\")}}:void 0},l.prototype.render=function(){var t,e,n,i,r,o,s,a,c,h,u,p,d,f,_,g,m,v,y,b,w;for(l.__super__.render.call(this),null==this.initial_range_info&&this.set_initial_range(),this.requested_padding={top:0,bottom:0,left:0,right:0},y=[\"image\",\"underlay\",\"glyph\",\"overlay\",\"annotation\",\"tool\"],_=0,m=y.length;m>_;_++){i=y[_],o=this.levels[i];for(n in o)if(p=o[n],null!=p.padding_request){r=p.padding_request();for(n in r)p=r[n],this.requested_padding[n]+=p}}u=this.mget(\"title\"),u&&(this.title_props.set(this.ctx,{}),h=this.ctx.measureText(this.mget(\"title\")).ascent,this.requested_padding.top+=h+this.mget(\"title_standoff\")),c=this.mget(\"border_symmetry\")||\"\",(c.indexOf(\"h\")>=0||c.indexOf(\"H\")>=0)&&(e=Math.max(this.requested_padding.left,this.requested_padding.right),this.requested_padding.left=e,this.requested_padding.right=e),(c.indexOf(\"v\")>=0||c.indexOf(\"V\")>=0)&&(e=Math.max(this.requested_padding.top,this.requested_padding.bottom),this.requested_padding.top=e,this.requested_padding.bottom=e),this.is_paused=!0,b=this.requested_padding;for(n in b)p=b[n],this.view_state.set(\"requested_border_\"+n,p);for(this.is_paused=!1,this.ctx.fillStyle=this.mget(\"border_fill\"),this.ctx.fillRect(0,0,this.view_state.get(\"canvas_width\"),this.view_state.get(\"canvas_height\")),this.ctx.fillStyle=this.mget(\"background_fill\"),this.ctx.fillRect(this.view_state.get(\"border_left\"),this.view_state.get(\"border_top\"),this.view_state.get(\"inner_width\"),this.view_state.get(\"inner_height\")),this.outline_props.do_stroke&&(this.outline_props.set(this.ctx,{}),this.ctx.strokeRect(this.view_state.get(\"border_left\"),this.view_state.get(\"border_top\"),this.view_state.get(\"inner_width\"),this.view_state.get(\"inner_height\"))),t=!1,d=this.xmapper.get(\"mapper_state\")[0],f=this.ymapper.get(\"mapper_state\")[0],(Math.abs(this.old_mapper_state.x-d)>1e-8||Math.abs(this.old_mapper_state.y-f)>1e-8)&&(this.old_mapper_state.x=d,this.old_mapper_state.y=f,t=!0),this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(this.view_state.get(\"border_left\"),this.view_state.get(\"border_top\"),this.view_state.get(\"inner_width\"),this.view_state.get(\"inner_height\")),this.ctx.clip(),this.ctx.beginPath(),w=[\"image\",\"underlay\",\"glyph\"],g=0,v=w.length;v>g;g++){i=w[g],o=this.levels[i];for(n in o)p=o[n],p.render(t)}return this.ctx.restore(),this.render_overlays(t),u?(s=this.view_state.get(\"outer_width\")/2,a=h,this.title_props.set(this.ctx,{}),this.ctx.fillText(u,s,a)):void 0},l.prototype.render_overlays=function(t){var e,n,i,r,o,s,a,l;for(a=[\"overlay\",\"annotation\",\"tool\"],l=[],o=0,s=a.length;s>o;o++)n=a[o],i=this.levels[n],l.push(function(){var n;n=[];for(e in i)r=i[e],n.push(r.render(t));return n}());return l},l}(l.View),v=function(t){function e(){return T=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"Plot\",e.prototype.default_view=y,e.prototype.add_renderers=function(t){var e;return e=this.get(\"renderers\"),e=e.concat(t),this.set(\"renderers\",e)},e.prototype.parent_properties=[\"background_fill\",\"border_fill\",\"canvas_width\",\"canvas_height\",\"outer_width\",\"outer_height\",\"min_border\",\"min_border_top\",\"min_border_bottom\",\"min_border_left\",\"min_border_right\"],e.prototype.defaults=function(){return{data_sources:{},renderers:[],tools:[],title:\"Plot\",x_mapper_type:\"auto\",y_mapper_type:\"auto\"}},e.prototype.display_defaults=function(){return{hidpi:!0,background_fill:\"#fff\",border_fill:\"#fff\",border_symmetry:\"h\",min_border:40,x_offset:0,y_offset:0,canvas_width:300,canvas_height:300,outer_width:300,outer_height:300,title_standoff:8,title_text_font:\"helvetica\",title_text_font_size:\"20pt\",title_text_font_style:\"normal\",title_text_color:\"#444444\",title_text_alpha:1,title_text_align:\"center\",title_text_baseline:\"alphabetic\",outline_line_color:\"#aaaaaa\",outline_line_width:1,outline_line_alpha:1,outline_line_join:\"miter\",outline_line_cap:\"butt\",outline_line_dash:[],outline_line_dash_offset:0}},e}(c),b=function(t){function e(){return A=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=v,e}(n.Collection),{Model:v,Collection:new b,View:y}})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"common/plot_context\",[\"underscore\",\"backbone\",\"./build_views\",\"./safebind\",\"./has_parent\",\"./continuum_view\"],function(n,r,o,s,a,l){var c,h,u,p,d,f;return h=function(r){function a(){return this.removeplot=t(this.removeplot,this),this.closeall=t(this.closeall,this),p=a.__super__.constructor.apply(this,arguments)}return i(a,r),a.prototype.initialize=function(t){return this.views={},this.views_rendered=[!1],this.child_models=[],a.__super__.initialize.call(this,t),this.render()},a.prototype.delegateEvents=function(){return s(this,this.model,\"destroy\",this.remove),s(this,this.model,\"change\",this.render),a.__super__.delegateEvents.call(this)},a.prototype.build_children=function(){var t;return t=o(this.views,this.mget_obj(\"children\"),{}),window.pc_created_views=t,window.pc_views=this.views,null},a.prototype.events={\"click .closeall\":\"closeall\"},a.prototype.size_textarea=function(t){var e;return e=$(t).height(0).prop(\"scrollHeight\"),$(t).height(e)},a.prototype.closeall=function(){return this.mset(\"children\",[]),this.model.save()},a.prototype.removeplot=function(t){var e,n,i,r,o;return n=parseInt($(t.currentTarget).parent().attr(\"data-plot_num\")),i=this.model.resolve_ref(this.mget(\"children\")[n]),r=this.views[i.get(\"id\")],r.remove(),e=function(){var t,e,n,i;for(n=this.mget(\"children\"),i=[],t=0,e=n.length;e>t;t++)o=n[t],o.id!==r.model.id&&i.push(o);return i}.call(this),this.mset(\"children\",e),this.model.save(),!1},a.prototype.render=function(){var t,i,r,o,s,l,c,h,u,p,d,f,_,g=this;a.__super__.render.call(this),this.build_children(),f=this.views;for(i in f)e.call(f,i)&&(h=f[i],h.$el.detach());for(this.$el.html(\"\"),s=n.keys(this.views).length,this.$el.append(\"<div>You have \"+s+\" plots</div>\"),this.$el.append(\"<div><a class='closeall' href='#'>Close All Plots</a></div>\"),this.$el.append(\"<br/>\"),c=[],l={},_=this.mget(\"children\"),t=p=0,d=_.length;d>p;t=++p)r=_[t],u=this.views[r.id],o=$(\"<div class='jsp' data-plot_num='\"+t+\"'></div>\"),this.$el.append(o),o.append(u.el);return n.defer(function(){var t,e,n,i,r;for(i=g.$el.find(\".plottitle\"),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(g.size_textarea($(t)));return r}),null},a}(l.View),c=function(t){function e(){return d=e.__super__.constructor.apply(this,arguments)\n",
        "                }return i(e,t),e.prototype.type=\"PlotContext\",e.prototype.default_view=h,e.prototype.url=function(){return e.__super__.url.call(this)},e.prototype.defaults=function(){return{children:[],render_loop:!0}},e}(a),u=function(t){function e(){return f=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=c,e}(r.Collection),{Model:c,Collection:new u,View:h}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"mapper/color/linear_color_mapper\",[\"underscore\",\"backbone\",\"common/has_properties\"],function(t,n,i){var r,o,s,a;return r=function(n){function i(){return s=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t,e){return i.__super__.initialize.call(this,t,e),this.palette=this._build_palette(this.get(\"palette\")),this.little_endian=this._is_little_endian(),null!=this.get(\"reserve_color\")?(this.reserve_color=this.get(\"reserve_color\")[0],this.reserve_val=this.get(\"reserve_val\")[0]):void 0},i.prototype.v_map_screen=function(e){var n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m;if(i=new ArrayBuffer(4*e.length),r=new Uint32Array(i),l=null!=(f=this.get(\"low\"))?f:t.min(e),s=null!=(_=this.get(\"high\"))?_:t.max(e),n=this.palette.length-1,h=n/(s-l),c=-h*l,this.little_endian)for(a=p=0,g=e.length;g>=0?g>p:p>g;a=g>=0?++p:--p)o=e[a],o===this.reserve_val?u=this.reserve_color:(o>s&&(o=s),l>o&&(o=l),u=this.palette[Math.floor(o*h+c)]),r[a]=255<<24|(16711680&u)>>16|65280&u|(255&u)<<16;else for(a=d=0,m=e.length;m>=0?m>d:d>m;a=m>=0?++d:--d)o=e[a],o===this.reserve_val?u=this.reserve_color:(o>s&&(o=s),l>o&&(o=l),u=this.palette[Math.floor(o*h+c)]),r[a]=u<<8|255;return i},i.prototype._is_little_endian=function(){var t,e,n,i;return t=new ArrayBuffer(4),n=new Uint8ClampedArray(t),e=new Uint32Array(t),e[1]=168496141,i=!0,10===n[4]&&11===n[5]&&12===n[6]&&13===n[7]&&(i=!1),i},i.prototype._build_palette=function(t){var e,n,i,r;for(n=new Uint32Array(t.length+1),e=i=0,r=t.length;r>=0?r>i:i>r;e=r>=0?++i:--i)n[e]=t[e];return n[n.length-1]=t[t.length-1],n},i}(i),o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"range/factor_range\",[\"backbone\",\"common/has_properties\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"FactorRange\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),this.register_property(\"end\",function(){return this.get(\"factors\").length+.5},!0),this.add_dependencies(\"end\",this,[\"factors\"]),this.register_property(\"min\",function(){return this.get(\"start\")},!0),this.add_dependencies(\"min\",this,[\"factors\"]),this.register_property(\"max\",function(){return this.get(\"end\")},!0),this.add_dependencies(\"max\",this,[\"factors\"])},n.prototype.defaults=function(){return{start:.5,factors:[]}},n}(n),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),{Model:i,Collection:new r}})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"range/data_factor_range\",[\"underscore\",\"backbone\",\"range/factor_range\"],function(e,n,r){var o,s,a,l;return o=function(n){function r(){return this._get_values=t(this._get_values,this),a=r.__super__.constructor.apply(this,arguments)}return i(r,n),r.prototype.type=\"DataFactorRange\",r.prototype._get_values=function(){var t,n,i,r,o,s,a;for(t=function(){var t,e,n,i;for(n=this.get(\"columns\"),i=[],t=0,e=n.length;e>t;t++)o=n[t],i.push(this.get_obj(\"data_source\").getcolumn(o));return i}.call(this),t=e.reduce(t,function(t,e){return t.concat(e)},[]),n={},s=0,a=t.length;a>s;s++)r=t[s],n[r]=!0;return i=e.keys(n),i=e.sortBy(i,function(t){return t})},r.prototype.initialize=function(t,e){return r.__super__.initialize.call(this,t,e),this.register_property,this.register_property(\"values\",this._get_values,!0),this.add_dependencies(\"values\",this,[\"data_source\",\"columns\"]),this.add_dependencies(\"values\",this.get_obj(\"data_source\"),[\"data_source\",\"columns\"])},r.prototype.defaults=function(){return{values:[],columns:[],data_source:null}},r}(r.Model),s=function(t){function e(){return l=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=o,e}(n.Collection),{Model:o,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"range/data_range1d\",[\"underscore\",\"backbone\",\"range/range1d\"],function(t,n,i){var r,o,s,a;return r=function(n){function i(){return s=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"DataRange1d\",i.prototype._get_minmax=function(){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g;for(i=[],d=this.get(\"sources\"),c=0,u=d.length;u>c;c++)for(s=d[c],a=this.resolve_ref(s.source),f=s.columns,h=0,p=f.length;p>h;h++)n=f[h],i.push(a.getcolumn(n));return i=t.flatten(i),i=t.filter(i,function(t){return\"string\"!=typeof t}),i=t.reject(i,function(t){return isNaN(t)}),_=[t.min(i),t.max(i)],o=_[0],r=_[1],l=r!==o?(r-o)*(1+this.get(\"rangepadding\")):0!==r?Math.abs(r)*(1+this.get(\"rangepadding\")):2,e=(r+o)/2,g=[e-l/2,e+l/2],o=g[0],r=g[1],[o,r]},i.prototype._get_start=function(){return t.isNullOrUndefined(this.get(\"_start\"))?this.get(\"minmax\")[0]:this.get(\"_start\")},i.prototype._set_start=function(t){return this.set(\"_start\",t)},i.prototype._get_end=function(){return t.isNullOrUndefined(this.get(\"_end\"))?this.get(\"minmax\")[1]:this.get(\"_end\")},i.prototype._set_end=function(t){return this.set(\"_end\",t)},i.prototype.initialize=function(t,e){var n,r,o,s,a;for(this.register_property(\"minmax\",this._get_minmax,!0),this.add_dependencies(\"minmax\",this,[\"sources\"],[\"rangepadding\"]),a=this.get(\"sources\"),o=0,s=a.length;s>o;o++)n=a[o],r=this.resolve_ref(n.source),this.add_dependencies(\"minmax\",r,\"data\");return this.register_property(\"start\",this._get_start,!0),this.register_setter(\"start\",this._set_start),this.add_dependencies(\"start\",this,[\"minmax\",\"_start\"]),this.register_property(\"end\",this._get_end,!0),this.register_setter(\"end\",this._set_end),this.add_dependencies(\"end\",this,[\"minmax\",\"_end\"]),i.__super__.initialize.call(this,t,e)},i.prototype.defaults=function(){return{sources:[],rangepadding:.1}},i}(i.Model),o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"common/plot_widget\",[\"./continuum_view\",\"./safebind\"],function(t){var n,i;return n=function(t){function n(){return i=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.tagName=\"div\",n.prototype.initialize=function(t){return this.plot_model=t.plot_model,this.plot_view=t.plot_view,this._fixup_line_dash(this.plot_view.ctx),this._fixup_line_dash_offset(this.plot_view.ctx),this._fixup_image_smoothing(this.plot_view.ctx),this._fixup_measure_text(this.plot_view.ctx),n.__super__.initialize.call(this,t)},n.prototype._fixup_line_dash=function(t){return t.setLineDash||(t.setLineDash=function(e){return t.mozDash=e,t.webkitLineDash=e}),t.getLineDash?void 0:t.getLineDash=function(){return t.mozDash}},n.prototype._fixup_line_dash_offset=function(t){return t.setLineDashOffset=function(e){return t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}},n.prototype._fixup_image_smoothing=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:!0}},n.prototype._fixup_measure_text=function(t){return t.measureText&&null==t.html5MeasureText?(t.html5MeasureText=t.measureText,t.measureText=function(e){var n;return n=t.html5MeasureText(e),n.ascent=1.6*t.html5MeasureText(\"m\").width,n}):void 0},n.prototype.bind_bokeh_events=function(){},n.prototype.request_render=function(){return this.plot_view.request_render()},n}(t.View)})}.call(this),function(){n(\"common/textutils\",[],function(){var t,e;return t={},e=function(e){var n,i,r,o,s;if(null!=t[e])return t[e];s=$(\"<span>Hg</span>\").css({font:e}),n=$('<div style=\"display: inline-block; width: 1px; height: 0px;\"></div>'),r=$(\"<div></div>\"),r.append(s,n),i=$(\"body\"),i.append(r);try{o={},n.css({verticalAlign:\"baseline\"}),o.ascent=n.offset().top-s.offset().top,n.css({verticalAlign:\"bottom\"}),o.height=n.offset().top-s.offset().top,o.descent=o.height-o.ascent}finally{r.remove()}return t[e]=o,o},{getTextHeight:e}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/annotation/legend\",[\"underscore\",\"common/has_parent\",\"common/plot_widget\",\"common/textutils\",\"renderer/properties\"],function(t,n,i,r,o){var s,a,l,c,h,u,p,d,f;return c=o.glyph_properties,h=o.line_properties,u=o.text_properties,a=function(n){function i(){return p=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(e){return i.__super__.initialize.call(this,e),this.label_props=new u(this,this.model,\"label_\"),this.border_props=new h(this,this.model,\"border_\"),this.mget(\"legend_names\")?this.legend_names=this.mget(\"legend_names\"):(this.legends=this.mget(\"legends\"),this.legend_names=t.keys(this.mget(\"legends\"))),this.calc_dims()},i.prototype.delegateEvents=function(t){return i.__super__.delegateEvents.call(this,t),this.listenTo(this.plot_view.view_state,\"change\",this.calc_dims)},i.prototype.calc_dims=function(){var e,n,i,o,s,a,l,c,h,u,p,d,f;return i=this.mget(\"label_height\"),this.glyph_height=this.mget(\"glyph_height\"),o=this.mget(\"label_width\"),this.glyph_width=this.mget(\"glyph_width\"),a=this.mget(\"legend_spacing\"),this.label_height=t.max([r.getTextHeight(this.label_props.font(this)),i,this.glyph_height]),this.legend_height=this.label_height,this.legend_height=this.legend_names.length*this.legend_height+(1+this.legend_names.length)*a,e=this.plot_view.ctx,e.save(),this.label_props.set(e,this),h=t.map(this.legend_names,function(t){return e.measureText(t).width}),e.restore(),c=t.max(h),this.label_width=t.max([c,o]),this.legend_width=this.label_width+this.glyph_width+3*a,l=this.mget(\"orientation\"),s=this.mget(\"legend_padding\"),n=this.plot_view.view_state.get(\"inner_range_horizontal\"),u=this.plot_view.view_state.get(\"inner_range_vertical\"),\"top_right\"===l?(p=n.get(\"end\")-s-this.legend_width,d=u.get(\"end\")-s):\"top_left\"===l?(p=n.get(\"start\")+s,d=u.get(\"end\")-s):\"bottom_left\"===l?(p=n.get(\"start\")+s,d=u.get(\"start\")+s+this.legend_height):\"bottom_right\"===l?(p=n.get(\"end\")-s-this.legend_width,d=u.get(\"start\")+s+this.legend_height):\"absolute\"===l&&(f=this.absolute_coords,p=f[0],d=f[1]),p=this.plot_view.view_state.vx_to_sx(p),d=this.plot_view.view_state.vy_to_sy(d),this.box_coords=[p,d]},i.prototype.render=function(){var t,e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y;for(t=this.plot_view.ctx,t.save(),t.fillStyle=this.plot_model.get(\"background_fill\"),this.border_props.set(t,this),t.beginPath(),t.rect(this.box_coords[0],this.box_coords[1],this.legend_width,this.legend_height),t.fill(),t.stroke(),i=this.mget(\"legend_spacing\"),v=this.legend_names,e=f=0,g=v.length;g>f;e=++f)for(n=v[e],p=e*this.label_height,d=(1+e)*i,c=this.box_coords[1]+this.label_height/2+p+d,s=this.box_coords[0]+i,a=this.box_coords[0]+2*i+this.label_width,l=a+this.glyph_width,h=this.box_coords[1]+p+d,u=h+this.glyph_height,this.label_props.set(t,this),t.fillText(n,s,c),y=this.model.resolve_ref(this.legends[n]),_=0,m=y.length;m>_;_++)r=y[_],o=this.plot_view.renderers[r.id],o.draw_legend(t,a,l,h,u);return t.restore()},i}(i),s=function(t){function n(){return d=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=a,n.prototype.type=\"Legend\",n.prototype.display_defaults=function(){return{level:\"overlay\",border_line_color:\"black\",border_line_width:1,border_line_alpha:1,border_line_join:\"miter\",border_line_cap:\"butt\",border_line_dash:[],border_line_dash_offset:0,label_standoff:15,label_text_font:\"helvetica\",label_text_font_size:\"10pt\",label_text_font_style:\"normal\",label_text_color:\"#444444\",label_text_alpha:1,label_text_align:\"left\",label_text_baseline:\"middle\",glyph_height:20,glyph_width:20,label_height:20,label_width:50,legend_padding:10,legend_spacing:3,orientation:\"top_right\",datapoint:null}},n}(n),l=function(t){function n(){return f=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n}(Backbone.Collection),{Model:s,Collection:new l,View:a}})}.call(this),function(){function t(e,n){return this instanceof t?(this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),n&&this._initFormat(n),void this.clear()):new t(e,n)}t.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[];if(!this._intersects(t,e.bbox))return n;for(var i,r,o,s,a=[];e;){for(i=0,r=e.children.length;r>i;i++)o=e.children[i],s=e.leaf?this.toBBox(o):o.bbox,this._intersects(t,s)&&(e.leaf?n.push(o):this._contains(t,s)?this._all(o,n):a.push(o));e=a.pop()}return n},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;n>e;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data={children:[],leaf:!0,bbox:this._empty(),height:1},this},remove:function(t){if(!t)return this;for(var e,n,i,r,o=this.data,s=this.toBBox(t),a=[],l=[];o||a.length;){if(o||(o=a.pop(),n=a[a.length-1],e=l.pop(),r=!0),o.leaf&&(i=o.children.indexOf(t),-1!==i))return o.children.splice(i,1),a.push(o),this._condense(a),this;r||o.leaf||!this._contains(o.bbox,s)?n?(e++,o=n.children[e],r=!1):o=null:(a.push(o),l.push(e),e=0,n=o,o=o.children[0])}return this},toBBox:function(t){return t},compareMinX:function(t,e){return t[0]-e[0]},compareMinY:function(t,e){return t[1]-e[1]},toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n){var i,r=t.length,o=this._maxEntries;if(o>=r)return i={children:t,leaf:!0,height:1},this._calcBBox(i),i;e||(n=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/Math.pow(o,n-1)),t.sort(this.compareMinX)),i={children:[],height:n};var s,a,l,c,h,u=Math.ceil(r/o)*Math.ceil(Math.sqrt(o)),p=Math.ceil(r/o),d=e%2===1?this.compareMinX:this.compareMinY;for(s=0;r>s;s+=u)for(l=t.slice(s,s+u).sort(d),a=0,c=l.length;c>a;a+=p)h=this._build(l.slice(a,a+p),e+1,n-1),i.children.push(h);return this._calcBBox(i),i},_chooseSubtree:function(t,e,n,i){for(var r,o,s,a,l,c,h,u;;){if(i.push(e),e.leaf||i.length-1===n)break;for(h=u=1/0,r=0,o=e.children.length;o>r;r++)s=e.children[r],l=this._area(s.bbox),c=this._enlargedArea(t,s.bbox)-l,u>c?(u=c,h=h>l?l:h,a=s):c===u&&h>l&&(h=l,a=s);e=a}return e},_insert:function(t,e,n){var i=n?t.bbox:this.toBBox(t),r=[],o=this._chooseSubtree(i,this.data,e,r);for(o.children.push(t),this._extend(o.bbox,i);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o={children:n.children.splice(this._chooseSplitIndex(n,r,i)),height:n.height};n.leaf&&(o.leaf=!0),this._calcBBox(n),this._calcBBox(o),e?t[e-1].children.push(o):this._splitRoot(n,o)},_splitRoot:function(t,e){this.data={},this.data.children=[t,e],this.data.height=t.height+1,this._calcBBox(this.data)},_chooseSplitIndex:function(t,e,n){var i,r,o,s,a,l,c,h;for(l=c=1/0,i=e;n-e>=i;i++)r=this._distBBox(t,0,i),o=this._distBBox(t,i,n),s=this._intersectionArea(r,o),a=this._area(r)+this._area(o),l>s?(l=s,h=i,c=c>a?a:c):s===l&&c>a&&(c=a,h=i);return h},_chooseSplitAxis:function(t,e,n){var i=t.leaf?this.compareMinX:this._compareNodeMinX,r=t.leaf?this.compareMinY:this._compareNodeMinY,o=this._allDistMargin(t,e,n,i),s=this._allDistMargin(t,e,n,r);s>o&&t.children.sort(i)},_allDistMargin:function(t,e,n,i){t.children.sort(i);var r,o,s=this._distBBox(t,0,e),a=this._distBBox(t,n-e,n),l=this._margin(s)+this._margin(a);for(r=e;n-e>r;r++)o=t.children[r],this._extend(s,t.leaf?this.toBBox(o):o.bbox),l+=this._margin(s);for(r=n-e-1;r>=e;r--)o=t.children[r],this._extend(a,t.leaf?this.toBBox(o):o.bbox),l+=this._margin(a);return l},_distBBox:function(t,e,n){for(var i,r=this._empty(),o=e;n>o;o++)i=t.children[o],this._extend(r,t.leaf?this.toBBox(i):i.bbox);return r},_calcBBox:function(t){t.bbox=this._distBBox(t,0,t.children.length)},_adjustParentBBoxes:function(t,e,n){for(var i=n;i>=0;i--)this._extend(e[i].bbox,t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():this._calcBBox(t[n])},_contains:function(t,e){return t[0]<=e[0]&&t[1]<=e[1]&&e[2]<=t[2]&&e[3]<=t[3]},_intersects:function(t,e){return e[0]<=t[2]&&e[1]<=t[3]&&e[2]>=t[0]&&e[3]>=t[1]},_extend:function(t,e){return t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t},_area:function(t){return(t[2]-t[0])*(t[3]-t[1])},_margin:function(t){return t[2]-t[0]+(t[3]-t[1])},_enlargedArea:function(t,e){return(Math.max(e[2],t[2])-Math.min(e[0],t[0]))*(Math.max(e[3],t[3])-Math.min(e[1],t[1]))},_intersectionArea:function(t,e){var n=Math.max(t[0],e[0]),i=Math.max(t[1],e[1]),r=Math.min(t[2],e[2]),o=Math.min(t[3],e[3]);return Math.max(0,r-n)*Math.max(0,o-i)},_empty:function(){return[1/0,1/0,-1/0,-1/0]},_compareNodeMinX:function(t,e){return t.bbox[0]-e.bbox[0]},_compareNodeMinY:function(t,e){return t.bbox[1]-e.bbox[1]},_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 [a\"+t.join(\", a\")+\"];\")}},\"function\"==typeof n&&n.amd?n(\"rbush\",[],function(){return t}):\"undefined\"!=typeof module?module.exports=t:\"undefined\"!=typeof self?self.rbush=t:window.rbush=t}(),function(){n(\"common/mathutils\",[],function(){var t,e,n;return n=function(t){for(;0>t;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t},e=function(t,e){return Math.abs(n(t-e))},t=function(t,i,r,o){var s;return t=n(t),s=e(i,r),\"anticlock\"===o?e(i,t)<=s&&e(t,r)<=s:!(e(i,t)<=s&&e(t,r)<=s)},{angle_norm:n,angle_dist:e,angle_between:t}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e},i=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};n(\"renderer/glyph/glyph\",[\"underscore\",\"common/has_parent\",\"common/plot_widget\",\"renderer/properties\"],function(t,n,r,o){var s,a,l,c;return a=function(n){function r(){return l=r.__super__.constructor.apply(this,arguments)}return e(r,n),r.prototype.setup_server_data=function(){var e,n,i,r,o,s,a;if(r=this.mget_obj(\"server_data_source\"),e=t.extend({},this.mget_obj(\"data_source\").get(\"data\"),r.get(\"data\")),this.mget_obj(\"data_source\").set(\"data\",e),this.set_data(!1),o=r.attributes.transform,i=o.resample,s=this.plot_view.view_state.get(\"inner_range_horizontal\"),a=this.plot_view.view_state.get(\"inner_range_vertical\"),\"line1d\"===i){if(n=o.domain,\"x\"===n)return r.listen_for_line1d_updates(this.mget_obj(\"data_source\"),s,a,this.plot_view.x_range,this.plot_view.view_state.get(\"inner_range_horizontal\"),this.glyph_props.y.field,this.glyph_props.x.field,[this.glyph_props.y.field],o);throw new Error(\"Domains other than 'x' not supported yet.\")}return\"heatmap\"===i?r.listen_for_heatmap_updates(this.mget_obj(\"data_source\"),s,a,this.plot_view.x_range,this.plot_view.y_range,o):\"abstract rendering\"===i?r.listen_for_ar_updates(this.plot_view,this.mget_obj(\"data_source\"),s,a,this.plot_view.x_range,this.plot_view.y_range,o):console.log(\"Unkonwn resample op '\"+i+\"'\")},r.prototype.initialize=function(e){var n;return r.__super__.initialize.call(this,e),this.need_set_data=!0,this.glyph_props=this.init_glyph(this.mget(\"glyphspec\")),this.have_selection_props=!1,this.mget(\"selection_glyphspec\")?(n=t.extend({},this.mget(\"glyphspec\"),this.mget(\"selection_glyphspec\")),this.selection_glyphprops=this.init_glyph(n),this.have_selection_props=!0):this.selection_glyphprops=this.glyph_props,this.mget(\"nonselection_glyphspec\")?(n=t.extend({},this.mget(\"glyphspec\"),this.mget(\"nonselection_glyphspec\")),this.nonselection_glyphprops=this.init_glyph(n),this.have_selection_props=!0):this.nonselection_glyphprops=this.glyph_props,this.mget(\"server_data_source\")&&this.setup_server_data(),this.listenTo(this,\"change:server_data_source\",this.setup_server_data)},r.prototype.init_glyph=function(t){var e,n;return n={},i.call(this._properties,\"line\")>=0&&(n.line_properties=new o.line_properties(this,t)),i.call(this._properties,\"fill\")>=0&&(n.fill_properties=new o.fill_properties(this,t)),i.call(this._properties,\"text\")>=0&&(n.text_properties=new o.text_properties(this,t)),e=new o.glyph_properties(this,t,this._fields,n)},r.prototype.set_data=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_;for(null==t&&(t=!0),s=this.mget_obj(\"data_source\"),p=this._fields,c=0,u=p.length;u>c;c++){if(n=p[c],n.indexOf(\":\")>-1&&(d=n.split(\":\"),n=d[0],r=d[1]),this[n]=this.glyph_props.source_v_select(n,s),\"direction\"===n){for(a=new Uint8Array(this.direction.length),i=h=0,f=this.direction.length;f>=0?f>h:h>f;i=f>=0?++h:--h)e=this.direction[i],\"clock\"===e?a[i]=!1:\"anticlock\"===e?a[i]=!0:a=0/0;this.direction=a}n.indexOf(\"angle\")>-1&&(this[n]=function(){var t,e,i,r;for(i=this[n],r=[],t=0,e=i.length;e>t;t++)l=i[t],r.push(-l);return r}.call(this))}return null!=this._set_data&&this._set_data(),o=this[n].length,this.all_indices=function(){_=[];for(var t=0;o>=0?o>t:t>o;o>=0?t++:t--)_.push(t);return _}.apply(this),this.have_new_data=!0,t?this.request_render():void 0},r.prototype.render=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d=this;if(null==t&&(t=!0),this.need_set_data&&(this.set_data(!1),this.need_set_data=!1),this._map_data(),o=null!=this._mask_data&&\"FactorRange\"!==this.plot_view.x_range.type&&\"FactorRange\"!==this.plot_view.y_range.type?this._mask_data():this.all_indices,e=this.plot_view.ctx,e.save(),n=function(t,e,n){var i;return i=d.mget_obj(\"data_source\"),d.have_new_data&&(null!=n.fill_properties&&n.fill_properties.do_fill&&n.fill_properties.set_prop_cache(i),null!=n.line_properties&&n.line_properties.do_stroke&&n.line_properties.set_prop_cache(i),null!=n.text_properties&&n.text_properties.set_prop_cache(i)),d._render(t,e,n)},a=this.mget_obj(\"data_source\").get(\"selected\"),a&&a.length&&this.have_selection_props){for(l=function(){var t,e,n,r;for(n=this.all_indices,r=[],t=0,e=n.length;e>t;t++)i=n[t],r.push(!1);return r}.call(this),c=0,u=a.length;u>c;c++)r=a[c],l[r]=!0;for(a=new Array,s=new Array,h=0,p=o.length;p>h;h++)i=o[h],l[i]?a.push(i):s.push(i);n(e,a,this.selection_glyphprops),n(e,s,this.nonselection_glyphprops)}else n(e,o,this.glyph_props);return this.have_new_data=!1,e.restore()},r.prototype.xrange=function(){return this.plot_view.x_range},r.prototype.yrange=function(){return this.plot_view.y_range},r.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,\"change\",this.request_render),this.listenTo(this.mget_obj(\"data_source\"),\"change\",this.set_data)},r.prototype.distance_vector=function(t,e,n,i){var r,o,s,a,l,c,h,u,p,d,f,_,g,m,v=this;return null==i&&(i=!1),u=this.glyph_props[t].units,_=this.glyph_props[e].units,\"x\"===t?l=this.plot_view.xmapper:\"y\"===t&&(l=this.plot_view.ymapper),d=this.mget_obj(\"data_source\"),a=function(t){return v.glyph_props.source_v_select(t,d)},f=a(e),\"screen\"===_?f:(\"center\"===n?(o=function(){var t,e,n;for(n=[],t=0,e=f.length;e>t;t++)r=f[t],n.push(r/2);return n}(),p=a(t),\"screen\"===u&&(p=l.v_map_from_target(p)),\"string\"==typeof p[0]&&(p=l.v_map_to_target(p)),c=function(){var t,e,n;for(n=[],s=t=0,e=p.length;e>=0?e>t:t>e;s=e>=0?++t:--t)n.push(p[s]-o[s]);return n}(),h=function(){var t,e,n;for(n=[],s=t=0,e=p.length;e>=0?e>t:t>e;s=e>=0?++t:--t)n.push(p[s]+o[s]);return n}()):(c=a(t),\"screen\"===u&&(c=l.v_map_from_target(c)),h=function(){var t,e,n;for(n=[],s=t=0,e=c.length;e>=0?e>t:t>e;s=e>=0?++t:--t)n.push(c[s]+f[s]);return n}()),g=l.v_map_to_target(c),m=l.v_map_to_target(h),i?function(){var t,e,n;for(n=[],s=t=0,e=g.length;e>=0?e>t:t>e;s=e>=0?++t:--t)n.push(Math.ceil(Math.abs(m[s]-g[s])));return n}():function(){var t,e,n;for(n=[],s=t=0,e=g.length;e>=0?e>t:t>e;s=e>=0?++t:--t)n.push(Math.abs(m[s]-g[s]));return n}())},r.prototype.get_reference_point=function(){var e;return e=this.mget(\"reference_point\"),t.isNumber(e)?this.data[e]:e},r.prototype.draw_legend=function(){return null},r.prototype._generic_line_legend=function(t,e,n,i,r){var o,s,a;return s=null!=(a=this.get_reference_point())?a:0,o=this.glyph_props.line_properties,t.save(),t.beginPath(),t.moveTo(e,(i+r)/2),t.lineTo(n,(i+r)/2),o.do_stroke&&(o.set_vectorize(t,s),t.stroke()),t.restore()},r.prototype._generic_area_legend=function(t,e,n,i,r){var o,s,a,l,c,h,u,p,d,f,_;return c=null!=(_=this.get_reference_point())?_:0,l=[c],f=Math.abs(n-e),s=.1*f,a=Math.abs(r-i),o=.1*a,h=e+s,u=n-s,p=i+o,d=r-o,this.glyph_props.fill_properties.do_fill&&(this.glyph_props.fill_properties.set_vectorize(t,c),t.fillRect(h,p,u-h,d-p)),this.glyph_props.line_properties.do_stroke?(t.beginPath(),t.rect(h,p,u-h,d-p),this.glyph_props.line_properties.set_vectorize(t,c),t.stroke()):void 0},r.prototype.hit_test=function(t){return\"point\"===t.type?null!=this._hit_point?this._hit_point(t):(null==this._point_hit_warned&&(console.log(\"WARNING: 'point' selection not available on renderer\"),this._point_hit_warned=!0),null):\"rect\"===t.type?null!=this._hit_rect?this._hit_rect(t):(null==this._rect_hit_warned&&(console.log(\"WARNING: 'rect' selection not avaliable on renderer\"),this._rect_hit_warned=!0),null):(console.log(\"unrecognized selection geometry type '\"+t.type+\"'\"),null)},r}(r),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.defaults=function(){return{data_source:null}},n.prototype.display_defaults=function(){return{level:\"glyph\",radius_units:\"data\",length_units:\"screen\",angle_units:\"deg\",start_angle_units:\"deg\",end_angle_units:\"deg\"}},n}(n),{Model:s,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/annular_wedge\",[\"underscore\",\"rbush\",\"common/mathutils\",\"renderer/properties\",\"./glyph\"],function(t,n,i,r,o){var s,a,l,c;return a=function(r){function o(){return l=o.__super__.constructor.apply(this,arguments)}return e(o,r),o.prototype._fields=[\"x\",\"y\",\"inner_radius\",\"outer_radius\",\"start_angle\",\"end_angle\",\"direction:string\"],o.prototype._properties=[\"line\",\"fill\"],o.prototype._set_data=function(){var e,i,r,o;for(this.max_radius=t.max(this.outer_radius),this.index=n(),i=[],e=r=0,o=this.x.length;o>=0?o>r:r>o;e=o>=0?++r:--r)isNaN(this.x[e]+this.y[e])||i.push([this.x[e],this.y[e],this.x[e],this.y[e],{i:e}]);return this.index.load(i)},o.prototype._map_data=function(){var t,e,n,i,r;for(n=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=n[0],this.sy=n[1],this.inner_radius=this.distance_vector(\"x\",\"inner_radius\",\"edge\"),this.outer_radius=this.distance_vector(\"x\",\"outer_radius\",\"edge\"),this.angle=new Float32Array(this.start_angle.length),r=[],t=e=0,i=this.start_angle.length;i>=0?i>e:e>i;t=i>=0?++e:--e)r.push(this.angle[t]=this.end_angle[t]-this.start_angle[t]);return r},o.prototype._render=function(t,e,n,i,r,o,s){var a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.inner_radius),null==s&&(s=this.outer_radius),h=[],l=0,c=e.length;c>l;l++)a=e[l],isNaN(i[a]+r[a]+o[a]+s[a]+this.start_angle[a]+this.angle[a])||(t.translate(i[a],r[a]),t.rotate(this.start_angle[a]),t.moveTo(s[a],0),t.beginPath(),t.arc(0,0,s[a],0,this.angle[a],this.direction[a]),t.rotate(this.angle[a]),t.lineTo(o[a],0),t.arc(0,0,o[a],0,-this.angle[a],!this.direction[a]),t.closePath(),t.rotate(-this.angle[a]-this.start_angle[a]),t.translate(-i[a],-r[a]),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,a),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,a),h.push(t.stroke())):h.push(void 0));return h},o.prototype._hit_point=function(e){var n,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z,F,L,V,B,W,$,q;if(L=[e.vx,e.vy],v=L[0],w=L[1],C=this.plot_view.xmapper.map_from_target(v),A=this.plot_view.ymapper.map_from_target(w),\"screen\"===this.outer_radius_units?(y=v-this.max_radius,b=v+this.max_radius,V=this.plot_view.xmapper.v_map_from_target([y,b]),S=V[0],T=V[1],x=w-this.max_radius,k=w+this.max_radius,B=this.plot_view.ymapper.v_map_from_target([x,k]),D=B[0],M=B[1]):(S=C-this.max_radius,T=C+this.max_radius,D=A-this.max_radius,M=A+this.max_radius),r=function(){var t,e,n,i;for(n=this.index.search([S,D,T,M]),i=[],t=0,e=n.length;e>t;t++)h=n[t],i.push(h[4].i);return i}.call(this),o=[],\"screen\"===this.outer_radius_units)for(p=this.plot_view.view_state.vx_to_sx(v),_=this.plot_view.view_state.vy_to_sy(w),E=0,j=r.length;j>E;E++)c=r[E],u=Math.pow(this.outer_radius[c],2),a=Math.pow(this.sx[c]-p,2)+Math.pow(this.sy[c]-_,2),u>=a&&o.push([c,a]);else for(P=0,N=r.length;N>P;P++)c=r[P],u=Math.pow(this.outer_radius[c],2),d=this.plot_view.xmapper.map_to_target(C),f=this.plot_view.xmapper.map_to_target(this.x[c]),g=this.plot_view.ymapper.map_to_target(A),m=this.plot_view.ymapper.map_to_target(this.y[c]),a=Math.pow(d-f,2)+Math.pow(g-m,2),u>=a&&o.push([c,a]);if(s=[],\"screen\"===this.inner_radius_units)for(p=this.plot_view.view_state.vx_to_sx(v),_=this.plot_view.view_state.vy_to_sy(w),O=0,H=o.length;H>O;O++)W=o[O],c=W[0],a=W[1],u=Math.pow(this.inner_radius[c],2),a>=u&&s.push([c,a]);else for(R=0,I=o.length;I>R;R++)$=o[R],c=$[0],a=$[1],u=Math.pow(this.inner_radius[c],2),d=this.plot_view.xmapper.map_to_target(C),f=this.plot_view.xmapper.map_to_target(this.x[c]),g=this.plot_view.ymapper.map_to_target(A),m=this.plot_view.ymapper.map_to_target(this.y[c]),a>=u&&s.push([c,a]);for(l=[],F=0,z=s.length;z>F;F++)q=s[F],c=q[0],a=q[1],p=this.plot_view.view_state.vx_to_sx(v),_=this.plot_view.view_state.vy_to_sy(w),n=Math.atan2(_-this.sy[c],p-this.sx[c]),i.angle_between(-n,-this.start_angle[c],-this.end_angle[c],this.direction[c])&&l.push([c,a]);return l=t.chain(l).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value()},o.prototype.draw_legend=function(t,e,n,i,r){var o,s,a,l,c,h,u,p;return c=null!=(p=this.get_reference_point())?p:0,o=[c],h={},h[c]=(e+n)/2,u={},u[c]=(i+r)/2,l=.5*Math.min(Math.abs(n-e),Math.abs(r-i)),s={},s[c]=.25*l,a={},a[c]=.8*l,this._render(t,o,this.glyph_props,h,u,s,a)\n",
        "                },o}(o.View),s=function(n){function i(){return c=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=a,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{direction:\"anticlock\",fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(o.Model),{Model:s,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/annulus\",[\"underscore\",\"rbush\",\"renderer/properties\",\"./glyph\"],function(t,n,i,r){var o,s,a,l;return s=function(i){function r(){return a=r.__super__.constructor.apply(this,arguments)}return e(r,i),r.prototype._fields=[\"x\",\"y\",\"inner_radius\",\"outer_radius\"],r.prototype._properties=[\"line\",\"fill\"],r.prototype._set_data=function(){var e,i,r,o;for(this.max_radius=t.max(this.outer_radius),this.index=n(),i=[],e=r=0,o=this.x.length;o>=0?o>r:r>o;e=o>=0?++r:--r)isNaN(this.x[e]+this.y[e])||i.push([this.x[e],this.y[e],this.x[e],this.y[e],{i:e}]);return this.index.load(i)},r.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],this.inner_radius=this.distance_vector(\"x\",\"inner_radius\",\"edge\"),this.outer_radius=this.distance_vector(\"x\",\"outer_radius\",\"edge\")},r.prototype._render=function(t,e,n,i,r,o,s){var a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.inner_radius),null==s&&(s=this.outer_radius),h=[],l=0,c=e.length;c>l;l++)a=e[l],isNaN(i[a]+r[a]+o[a]+s[a])||(t.beginPath(),t.arc(i[a],r[a],o[a],0,2*Math.PI*2,!1),t.moveTo(i[a]+s[a],r[a]),t.arc(i[a],r[a],s[a],0,2*Math.PI*2,!0),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,a),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,a),h.push(t.stroke())):h.push(void 0));return h},r.prototype._hit_point=function(e){var n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z,F;if(N=[e.vx,e.vy],_=N[0],v=N[1],w=this.plot_view.xmapper.map_from_target(_),C=this.plot_view.ymapper.map_from_target(v),\"screen\"===this.outer_radius_units?(g=_-this.max_radius,m=_+this.max_radius,H=this.plot_view.xmapper.v_map_from_target([g,m]),x=H[0],k=H[1],y=v-this.max_radius,b=v+this.max_radius,I=this.plot_view.ymapper.v_map_from_target([y,b]),S=I[0],T=I[1]):(x=w-this.max_radius,k=w+this.max_radius,S=C-this.max_radius,T=C+this.max_radius),n=function(){var t,e,n,i;for(n=this.index.search([x,S,k,T]),i=[],t=0,e=n.length;e>t;t++)a=n[t],i.push(a[4].i);return i}.call(this),i=[],\"screen\"===this.outer_radius_units)for(c=this.plot_view.view_state.vx_to_sx(_),p=this.plot_view.view_state.vy_to_sy(v),A=0,P=n.length;P>A;A++)s=n[A],l=Math.pow(this.outer_radius[s],2),r=Math.pow(this.sx[s]-c,2)+Math.pow(this.sy[s]-p,2),l>=r&&i.push([s,r]);else for(D=0,O=n.length;O>D;D++)s=n[D],l=Math.pow(this.outer_radius[s],2),h=this.plot_view.xmapper.map_to_target(w),u=this.plot_view.xmapper.map_to_target(this.x[s]),d=this.plot_view.ymapper.map_to_target(C),f=this.plot_view.ymapper.map_to_target(this.y[s]),r=Math.pow(h-u,2)+Math.pow(d-f,2),l>=r&&i.push([s,r]);if(o=[],\"screen\"===this.inner_radius_units)for(c=this.plot_view.view_state.vx_to_sx(_),p=this.plot_view.view_state.vy_to_sy(v),M=0,R=i.length;R>M;M++)z=i[M],s=z[0],r=z[1],l=Math.pow(this.inner_radius[s],2),r>=l&&o.push([s,r]);else for(E=0,j=i.length;j>E;E++)F=i[E],s=F[0],r=F[1],l=Math.pow(this.inner_radius[s],2),h=this.plot_view.xmapper.map_to_target(w),u=this.plot_view.xmapper.map_to_target(this.x[s]),d=this.plot_view.ymapper.map_to_target(C),f=this.plot_view.ymapper.map_to_target(this.y[s]),r>=l&&o.push([s,r]);return o=t.chain(o).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value()},r.prototype.draw_legend=function(t,e,n,i,r){var o,s,a,l,c,h,u,p;return c=null!=(p=this.get_reference_point())?p:0,o=[c],h={},h[c]=(e+n)/2,u={},u[c]=(i+r)/2,l=.5*Math.min(Math.abs(n-e),Math.abs(r-i)),s={},s[c]=.4*l,a={},a[c]=.8*l,this._render(t,o,this.glyph_props,h,u,s,a)},r}(r.View),o=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=s,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(r.Model),{Model:o,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/arc\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x\",\"y\",\"radius\",\"start_angle\",\"end_angle\",\"direction:string\"],n.prototype._properties=[\"line\"],n.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],this.radius=this.distance_vector(\"x\",\"radius\",\"edge\")},n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c;if(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.radius),n.line_properties.do_stroke){for(c=[],a=0,l=e.length;l>a;a++)s=e[a],isNaN(i[s]+r[s]+o[s]+this.start_angle[s]+this.end_angle[s]+this.direction[s])||(t.beginPath(),t.arc(i[s],r[s],o[s],this.start_angle[s],this.end_angle[s],this.direction[s]),n.line_properties.set_vectorize(t,s),c.push(t.stroke()));return c}},n.prototype.draw_legend=function(t,e,n,i,r){var o,s,a,l,c,h;return a=null!=(h=this.get_reference_point())?h:0,o=[a],l={},l[a]=(e+n)/2,c={},c[a]=(i+r)/2,s={},s[a]=.4*Math.min(Math.abs(n-e),Math.abs(r-i)),this._render(t,o,this.glyph_props,l,c,s)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{direction:\"anticlock\",line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/marker\",[\"underscore\",\"rbush\",\"renderer/properties\",\"./glyph\"],function(t,n,i,r){var o,s,a,l;return s=function(i){function r(){return a=r.__super__.constructor.apply(this,arguments)}return e(r,i),r.prototype._fields=[\"x\",\"y\",\"size\"],r.prototype.draw_legend=function(t,e,n,i,r){var o,s,a,l,c,h;return s=null!=(h=this.get_reference_point())?h:0,o=[s],l={},l[s]=(e+n)/2,c={},c[s]=(i+r)/2,a={},a[s]=.4*Math.min(Math.abs(n-e),Math.abs(r-i)),this._render(t,o,this.glyph_props,l,c,a)},r.prototype._set_data=function(){var e,i,r,o;for(this.max_size=t.max(this.size),this.index=n(),i=[],e=r=0,o=this.x.length;o>=0?o>r:r>o;e=o>=0?++r:--r)isNaN(this.x[e]+this.y[e])||i.push([this.x[e],this.y[e],this.x[e],this.y[e],{i:e}]);return this.index.load(i)},r.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],t},r.prototype._mask_data=function(){var t,e,n,i,r,o,s,a,l,c,h,u,p;return t=this.plot_view.view_state.get(\"inner_range_horizontal\"),n=t.get(\"start\")-this.max_size,i=t.get(\"end\")+this.max_size,u=this.plot_view.xmapper.v_map_from_target([n,i]),a=u[0],l=u[1],e=this.plot_view.view_state.get(\"inner_range_vertical\"),r=e.get(\"start\")-this.max_size,o=e.get(\"end\")+this.max_size,p=this.plot_view.ymapper.v_map_from_target([r,o]),c=p[0],h=p[1],function(){var t,e,n,i;for(n=this.index.search([a,c,l,h]),i=[],t=0,e=n.length;e>t;t++)s=n[t],i.push(s[4].i);return i}.call(this)},r.prototype._hit_point=function(e){var n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C;for(x=[e.vx,e.vy],c=x[0],p=x[1],a=this.plot_view.view_state.vx_to_sx(c),l=this.plot_view.view_state.vy_to_sy(p),h=c-this.max_size,u=c+this.max_size,k=this.plot_view.xmapper.v_map_from_target([h,u]),g=k[0],m=k[1],d=p-this.max_size,f=p+this.max_size,C=this.plot_view.ymapper.v_map_from_target([d,f]),v=C[0],y=C[1],n=function(){var t,e,n,i;for(n=this.index.search([g,v,m,y]),i=[],t=0,e=n.length;e>t;t++)_=n[t],i.push(_[4].i);return i}.call(this),r=[],b=0,w=n.length;w>b;b++)o=n[b],s=this.size[o]/2,i=Math.abs(this.sx[o]-a)+Math.abs(this.sy[o]-l),Math.abs(this.sx[o]-a)<=s&&Math.abs(this.sy[o]-l)<=s&&r.push([o,i]);return r=t.chain(r).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value()},r.prototype._hit_rect=function(t){var e,n,i,r,o,s,a;return s=this.plot_view.xmapper.v_map_from_target([t.vx0,t.vx1]),n=s[0],i=s[1],a=this.plot_view.ymapper.v_map_from_target([t.vy0,t.vy1]),r=a[0],o=a[1],function(){var t,s,a,l;for(a=this.index.search([n,r,i,o]),l=[],t=0,s=a.length;s>t;t++)e=a[t],l.push(e[4].i);return l}.call(this)},r}(r.View),o=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n}(r.Model),{Model:o,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/asterisk\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h,u;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),u=[],c=0,h=e.length;h>c;c++)s=e[c],isNaN(i[s]+r[s]+o[s])||(a=o[s]/2,l=.65*a,t.beginPath(),t.moveTo(i[s],r[s]+a),t.lineTo(i[s],r[s]-a),t.moveTo(i[s]-a,r[s]),t.lineTo(i[s]+a,r[s]),t.moveTo(i[s]-l,r[s]+l),t.lineTo(i[s]+l,r[s]-l),t.moveTo(i[s]-l,r[s]-l),t.lineTo(i[s]+l,r[s]+l),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),u.push(t.stroke())):u.push(void 0));return u},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/bezier\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x0\",\"y0\",\"x1\",\"y1\",\"cx0\",\"cy0\",\"cx1\",\"cy1\"],n.prototype._properties=[\"line\"],n.prototype._map_data=function(){var t,e,n,i;return t=this.plot_view.map_to_screen(this.x0,this.glyph_props.x0.units,this.y0,this.glyph_props.y0.units),this.sx0=t[0],this.sy0=t[1],e=this.plot_view.map_to_screen(this.x1,this.glyph_props.x1.units,this.y1,this.glyph_props.y1.units),this.sx1=e[0],this.sy1=e[1],n=this.plot_view.map_to_screen(this.cx0,this.glyph_props.cx0.units,this.cy0,this.glyph_props.cy0.units),this.scx0=n[0],this.scy0=n[1],i=this.plot_view.map_to_screen(this.cx1,this.glyph_props.cx1.units,this.cy1,this.glyph_props.cy1.units),this.scx1=i[0],this.scy1=i[1],i},n.prototype._render=function(t,e,n){var i,r,o,s;if(n.line_properties.do_stroke){for(s=[],r=0,o=e.length;o>r;r++)i=e[r],isNaN(this.sx0[i]+this.sy0[i]+this.sx1[i]+this.sy1[i]+this.scx0[i]+this.scy0[i]+this.scx1[i]+this.scy1[i])||(t.beginPath(),t.moveTo(this.sx0[i],this.sy0[i]),t.bezierCurveTo(this.scx0[i],this.scy0[i],this.scx1[i],this.scy1[i],this.sx1[i],this.sy1[i]),n.line_properties.set_vectorize(t,i),s.push(t.stroke()));return s}},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_line_legend(t,e,n,i,r)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/circle\",[\"underscore\",\"rbush\",\"renderer/properties\",\"./glyph\"],function(t,n,i,r){var o,s,a,l;return s=function(i){function r(){return a=r.__super__.constructor.apply(this,arguments)}return e(r,i),r.prototype._properties=[\"line\",\"fill\"],r.prototype.initialize=function(t){var e;return e=this.mget(\"glyphspec\"),null!=e.radius?this._fields=[\"x\",\"y\",\"radius\"]:null!=e.size&&(this._fields=[\"x\",\"y\",\"size\"]),r.__super__.initialize.call(this,t)},r.prototype._set_data=function(){var e,i,r,o;for(this.max_radius=this.size?t.max(this.size)/2:t.max(this.radius),this.index=n(),i=[],e=r=0,o=this.x.length;o>=0?o>r:r>o;e=o>=0?++r:--r)isNaN(this.x[e]+this.y[e])||i.push([this.x[e],this.y[e],this.x[e],this.y[e],{i:e}]);return this.index.load(i)},r.prototype._map_data=function(){var t,e;return e=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=e[0],this.sy=e[1],this.size?(this.radius=function(){var e,n,i,r;for(i=this.distance_vector(\"x\",\"size\",\"edge\"),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(t/2);return r}.call(this),this.radius_units=this.glyph_props.size.units):this.radius=this.distance_vector(\"x\",\"radius\",\"edge\")},r.prototype._mask_data=function(){var t,e,n,i,r,o,s,a,l,c,h,u,p,d,f;return t=this.plot_view.view_state.get(\"inner_range_horizontal\"),o=this.plot_view.view_state.get(\"inner_range_vertical\"),\"screen\"===this.radius_units?(e=t.get(\"start\")-this.max_radius,n=t.get(\"end\")-this.max_radius,u=this.plot_view.xmapper.v_map_from_target([e,n]),a=u[0],l=u[1],i=o.get(\"start\")-this.max_radius,r=o.get(\"end\")-this.max_radius,p=this.plot_view.ymapper.v_map_from_target([i,r]),c=p[0],h=p[1]):(e=t.get(\"start\"),n=t.get(\"end\"),d=this.plot_view.xmapper.v_map_from_target([e,n]),a=d[0],l=d[1],a-=this.max_radius,l+=this.max_radius,i=o.get(\"start\"),r=o.get(\"end\"),f=this.plot_view.ymapper.v_map_from_target([i,r]),c=f[0],h=f[1],c-=this.max_radius,h+=this.max_radius),function(){var t,e,n,i;for(n=this.index.search([a,c,l,h]),i=[],t=0,e=n.length;e>t;t++)s=n[t],i.push(s[4].i);return i}.call(this)},r.prototype._render=function(t,e,n,i,r,o){var s,a,l,c;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.radius),c=[],a=0,l=e.length;l>a;a++)s=e[a],isNaN(i[s]+r[s]+o[s])||(t.beginPath(),t.arc(i[s],r[s],o[s],0,2*Math.PI,!1),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),c.push(t.stroke())):c.push(void 0));return c},r.prototype._hit_point=function(e){var n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O;if(E=[e.vx,e.vy],f=E[0],m=E[1],b=this.plot_view.xmapper.map_from_target(f),k=this.plot_view.ymapper.map_from_target(m),\"screen\"===this.radius_units?(_=f-this.max_radius,g=f+this.max_radius,P=this.plot_view.xmapper.v_map_from_target([_,g]),w=P[0],x=P[1],v=m-this.max_radius,y=m+this.max_radius,O=this.plot_view.ymapper.v_map_from_target([v,y]),C=O[0],S=O[1]):(w=b-this.max_radius,x=b+this.max_radius,C=k-this.max_radius,S=k+this.max_radius),n=function(){var t,e,n,i;for(n=this.index.search([w,C,x,S]),i=[],t=0,e=n.length;e>t;t++)s=n[t],i.push(s[4].i);return i}.call(this),r=[],\"screen\"===this.radius_units)for(l=this.plot_view.view_state.vx_to_sx(f),u=this.plot_view.view_state.vy_to_sy(m),T=0,D=n.length;D>T;T++)o=n[T],a=Math.pow(this.radius[o],2),i=Math.pow(this.sx[o]-l,2)+Math.pow(this.sy[o]-u,2),a>=i&&r.push([o,i]);else for(A=0,M=n.length;M>A;A++)o=n[A],a=Math.pow(this.radius[o],2),c=this.plot_view.xmapper.map_to_target(b),h=this.plot_view.xmapper.map_to_target(this.x[o]),p=this.plot_view.ymapper.map_to_target(k),d=this.plot_view.ymapper.map_to_target(this.y[o]),i=Math.pow(c-h,2)+Math.pow(p-d,2),a>=i&&r.push([o,i]);return r=t.chain(r).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value()},r.prototype._hit_rect=function(t){var e,n,i,r,o,s,a;return s=this.plot_view.xmapper.v_map_from_target([t.vx0,t.vx1]),n=s[0],i=s[1],a=this.plot_view.ymapper.v_map_from_target([t.vy0,t.vy1]),r=a[0],o=a[1],function(){var t,s,a,l;for(a=this.index.search([n,r,i,o]),l=[],t=0,s=a.length;s>t;t++)e=a[t],l.push(e[4].i);return l}.call(this)},r.prototype.draw_legend=function(t,e,n,i,r){var o,s,a,l,c,h;return a=null!=(h=this.get_reference_point())?h:0,o=[a],l={},l[a]=(e+n)/2,c={},c[a]=(i+r)/2,s={},s[a]=.2*Math.min(Math.abs(n-e),Math.abs(r-i)),this._render(t,o,this.glyph_props,l,c,s)},r}(r.View),o=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=s,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{radius_units:\"data\",size_units:\"screen\",fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(r.Model),{Model:o,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/circle_x\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),h=[],l=0,c=e.length;c>l;l++)s=e[l],isNaN(i[s]+r[s]+o[s])||(t.beginPath(),a=o[s]/2,t.arc(i[s],r[s],a,0,2*Math.PI,!1),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),t.moveTo(i[s]-a,r[s]+a),t.lineTo(i[s]+a,r[s]-a),t.moveTo(i[s]-a,r[s]-a),t.lineTo(i[s]+a,r[s]+a),h.push(t.stroke())):h.push(void 0));return h},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/circle_cross\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),h=[],l=0,c=e.length;c>l;l++)s=e[l],isNaN(i[s]+r[s]+o[s])||(t.beginPath(),a=o[s]/2,t.arc(i[s],r[s],a,0,2*Math.PI,!1),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),t.moveTo(i[s],r[s]+a),t.lineTo(i[s],r[s]-a),t.moveTo(i[s]-a,r[s]),t.lineTo(i[s]+a,r[s]),h.push(t.stroke())):h.push(void 0));return h},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/diamond\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),h=[],l=0,c=e.length;c>l;l++)s=e[l],isNaN(i[s]+r[s]+o[s])||(a=o[s]/2,t.beginPath(),t.moveTo(i[s],r[s]+a),t.lineTo(i[s]+a,r[s]),t.lineTo(i[s],r[s]-a),t.lineTo(i[s]-a,r[s]),t.closePath(),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),h.push(t.stroke())):h.push(void 0));return h},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/diamond_cross\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),h=[],l=0,c=e.length;c>l;l++)s=e[l],isNaN(i[s]+r[s]+o[s])||(a=o[s]/2,t.beginPath(),t.moveTo(i[s],r[s]+a),t.lineTo(i[s]+a,r[s]),t.lineTo(i[s],r[s]-a),t.lineTo(i[s]-a,r[s]),t.closePath(),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),t.moveTo(i[s],r[s]+a),t.lineTo(i[s],r[s]-a),t.moveTo(i[s]-a,r[s]),t.lineTo(i[s]+a,r[s]),h.push(t.stroke())):h.push(void 0));return h},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),n(\"gear_utils\",[],function(){var t,e,n;return function(){t=function(t,e,n,i,r,o){function s(t,e){var n,i=50,r=0;for(n=1;i>=n;n++)r+=e(Math.cos(g*(n-.5)/i))*Math.cos(g*t*(n-.5)/i);return 2*r/i}function a(t,e){var n,i,r,o,a=[],l=[],c=[[],[]];for(n=0;t+1>n;n++)c[0][n]=0,c[1][n]=0;for(c[0][0]=1,c[1][1]=1,r=1;t+1>r;r++){for(c[r+1]=[0],i=0;i<c[r].length-1;i++)c[r+1][i+1]=2*c[r][i];for(i=0;i<c[r-1].length;i++)c[r+1][i]-=c[r-1][i]}for(r=0;t>=r;r++)l[r]=s(r,e),a[r]=0;for(r=0;t>=r;r++)for(o=0;t>=o;o++)a[o]+=l[r]*c[r][o];return a[0]-=s(0,e)/2,a}function l(t){var e=2*t-1,n=e*(p-d)/2+(d+p)/2;return y*(Math.cos(n)+n*Math.sin(n))}function c(t){var e=2*t-1,n=e*(p-d)/2+(d+p)/2;return y*(Math.sin(n)-n*Math.cos(n))}function h(t,e){var n,i=1;for(n=t-e+1;t>=n;n++)i*=n;for(n=1;e>=n;n++)i/=n;return i}function u(t,e){var n,i,r=a(w,e);for(n=0,i=0;t>=i;i++)n+=h(t,i)*r[i]/h(w,i);return n}var p,d,f,_,g=Math.PI,m=t*e/2,v=n||20,y=m*Math.cos(v*g/180),b=m+t,w=i||3,x=Math.sqrt(b*b-y*y)/y,k=o||1,C=.01,S=[];for(void 0!==r&&k>r&&(C=r),p=Math.sqrt(k)*x,d=Math.sqrt(C)*x,f=0;w>=f;f++)_={},_.x=u(f,l),_.y=u(f,c),S.push(_);return S},e=function(e,n,i){function r(t,e){return Math.sqrt(e*e-t*t)/t-Math.acos(t/e)}function o(t,e){var n=Math.sin(e),i=Math.cos(e);return{x:t.x*i-t.y*n,y:t.x*n+t.y*i}}function s(t,e){return{x:t*Math.cos(e),y:t*Math.sin(e)}}var a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k=e,C=n,S=i||20,T=k,A=1.25*k,D=A-T,M=C*k/2,E=M*Math.cos(S*Math.PI/180),P=M+T,O=M-A,R=1.5*D,j=2*Math.PI/C,N=r(E,M),H=N,I=Math.atan(R/(R+O));for(a=Math.sqrt((O+R)*(O+R)-R*R),a>E&&(a=O+D),a>E&&(H-=r(E,a)),l=1,c=.01,a>E&&(c=(a*a-E*E)/(P*P-E*E)),h=c+(l-c)/4,u=t(k,C,S,3,c,h),p=t(k,C,S,3,h,l),d=u.concat(p.slice(1)),f=[],w=0;w<d.length;w++)b=o(d[w],-N-j/4),d[w]=b,f[w]={x:b.x,y:-b.y};return _=s(a,-j/4-H),g={x:_.x,y:-_.y},v=s(O,j/4+H+I),y=s(O,3*j/4-H-I),m=o(_,j),x=[],x.push(\"M\",_.x,_.y),E>a&&x.push(\"L\",d[0].x,d[0].y),x.push(\"C\",d[1].x,d[1].y,d[2].x,d[2].y,d[3].x,d[3].y,d[4].x,d[4].y,d[5].x,d[5].y,d[6].x,d[6].y),x.push(\"A\",P,P,0,0,0,f[6].x,f[6].y),x.push(\"C\",f[5].x,f[5].y,f[4].x,f[4].y,f[3].x,f[3].y,f[2].x,f[2].y,f[1].x,f[1].y,f[0].x,f[0].y),E>a&&x.push(\"L\",g.x,g.y),y.y>v.y&&(x.push(\"A\",R,R,0,0,1,v.x,v.y),x.push(\"A\",O,O,0,0,0,y.x,y.y)),x.push(\"A\",R,R,0,0,1,m.x,m.y),x},n=function(e,n,i){function r(t,e){return Math.sqrt(e*e-t*t)/t-Math.acos(t/e)}function o(t,e){var n=Math.sin(e),i=Math.cos(e);return{x:t.x*i-t.y*n,y:t.x*n+t.y*i}}function s(t,e){return{x:t*Math.cos(e),y:t*Math.sin(e)}}var a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D=e,M=n,E=i||20,P=.6*D,O=1.25*D,R=M*D/2,j=R*Math.cos(E*Math.PI/180),N=R-P,H=R+O,I=.25*D,z=H-I,F=1.5*I;for(a=2*Math.PI/M,l=r(j,R),c=l,N>j&&(c-=r(j,N)),h=r(j,z)-l,u=1.414*I/z,p=1,d=.01,N>j&&(d=(N*N-j*j)/(z*z-j*j)),f=d+(p-d)/4,_=t(D,M,E,3,d,f),g=t(D,M,E,3,f,p),v=_.concat(g.slice(1)),m=[],b=0;b<v.length;b++)y=o(v[b],a/4-l),v[b]=y,m[b]={x:y.x,y:-y.y};return x={x:m[6].x,y:m[6].y},C=s(N,-a/4+c),S={x:C.x,y:-C.y},T=s(H,a/4+h+u),A=s(H,3*a/4-h-u),k=o(x,a),w=[],w.push(\"M\",m[6].x,m[6].y),w.push(\"C\",m[5].x,m[5].y,m[4].x,m[4].y,m[3].x,m[3].y,m[2].x,m[2].y,m[1].x,m[1].y,m[0].x,m[0].y),j>N&&w.push(\"L\",C.x,C.y),w.push(\"A\",N,N,0,0,0,S.x,S.y),j>N&&w.push(\"L\",v[0].x,v[0].y),w.push(\"C\",v[1].x,v[1].y,v[2].x,v[2].y,v[3].x,v[3].y,v[4].x,v[4].y,v[5].x,v[5].y,v[6].x,v[6].y),T.y<A.y&&(w.push(\"A\",F,F,0,0,0,T.x,T.y),w.push(\"A\",H,H,0,0,0,A.x,A.y)),w.push(\"A\",F,F,0,0,0,k.x,k.y),w}}(),{create_gear_tooth:e,create_internal_gear_tooth:n}}),function(){n(\"util/bezier\",[],function(){var t,e;return e=function(t,e,n,i,r,o,s,a){var l,c,h,u,p,d,f,_,g,m,v,y;return l=a*r,c=-s*o,h=s*r,u=a*o,d=.5*(i-n),p=8/3*Math.sin(.5*d)*Math.sin(.5*d)/Math.sin(d),f=t+Math.cos(n)-p*Math.sin(n),m=e+Math.sin(n)+p*Math.cos(n),g=t+Math.cos(i),y=e+Math.sin(i),_=g+p*Math.sin(i),v=y-p*Math.cos(i),[l*f+c*m,h*f+u*m,l*_+c*v,h*_+u*v,l*g+c*y,h*g+u*y]},t=function(t,n,i,r,o,s,a,l,c){var h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z;return A=o*(Math.PI/180),T=Math.sin(A),f=Math.cos(A),w=Math.abs(i),x=Math.abs(r),v=f*(t-l)*.5+T*(n-c)*.5,y=f*(n-c)*.5-T*(t-l)*.5,m=v*v/(w*w)+y*y/(x*x),m>1&&(m=Math.sqrt(m),w*=m,x*=m),h=f/w,u=T/w,p=-T/x,d=f/x,R=h*t+u*n,H=p*t+d*n,j=h*l+u*c,I=p*l+d*c,_=(j-R)*(j-R)+(I-H)*(I-H),S=1/_-.25,0>S&&(S=0),C=Math.sqrt(S),a===s&&(C=-C),N=.5*(R+j)-C*(I-H),z=.5*(H+I)+C*(j-R),D=Math.atan2(H-z,R-N),M=Math.atan2(I-z,j-N),O=M-D,0>O&&1===a?O+=2*Math.PI:O>0&&0===a&&(O-=2*Math.PI),k=Math.ceil(Math.abs(O/(.5*Math.PI+.001))),b=function(){var t,n;for(n=[],g=t=0;k>=0?k>t:t>k;g=k>=0?++t:--t)E=D+g*O/k,P=D+(g+1)*O/k,n.push(e(N,z,E,P,w,x,T,f));return n}()},{arc_to_bezier:t}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/gear\",[\"underscore\",\"gear_utils\",\"renderer/properties\",\"util/bezier\",\"./glyph\"],function(t,n,i,r,o){var s,a,l,c;return a=function(i){function o(){return l=o.__super__.constructor.apply(this,arguments)}return e(o,i),o.prototype._fields=[\"x\",\"y\",\"angle\",\"module\",\"teeth\",\"pressure_angle\",\"shaft_size\",\"internal\"],o.prototype._properties=[\"line\",\"fill\"],o.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],this.smodule=this.distance_vector(\"x\",\"module\",\"edge\")},o.prototype._render=function(t,e,i){var r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D;for(C=0,T=e.length;T>C;C++)if(a=e[C],A=[this.sx[a],this.sy[a],this.angle[a],this.smodule[a],this.teeth[a],this.pressure_angle[a],this.shaft_size[a],this.internal[a]],y=A[0],b=A[1],o=A[2],h=A[3],w=A[4],p=A[5],v=A[6],l=A[7],!isNaN(y+b+o+h+w+p+v+l)){for(u=h*w/2,s=l?n.create_internal_gear_tooth:n.create_gear_tooth,g=s(h,w,p),D=g.slice(0,3),r=D[0],x=D[1],k=D[2],_=g.slice(3),t.save(),t.translate(y,b),t.rotate(o),t.beginPath(),f=2*Math.PI/w,t.moveTo(x,k),c=S=0;w>=0?w>S:S>w;c=w>=0?++S:--S)this._render_seq(t,_),t.rotate(f);t.closePath(),l?(d=u+2.75*h,t.moveTo(d,0),t.arc(0,0,d,0,2*Math.PI,!0)):v>0&&(m=u*v,t.moveTo(m,0),t.arc(0,0,m,0,2*Math.PI,!0)),i.fill_properties.do_fill&&(i.fill_properties.set_vectorize(t,a),t.fill()),i.line_properties.do_stroke&&(i.line_properties.set_vectorize(t,a),t.stroke()),t.restore()}},o.prototype._render_seq=function(e,n){var i,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O;for(c=0;c<n.length;)switch(t.isString(n[c])&&(i=n[c],c+=1),i){case\"M\":x=n.slice(c,c+2),m=x[0],y=x[1],e.moveTo(m,y),S=[m,y],u=S[0],p=S[1],c+=2;break;case\"L\":T=n.slice(c,c+2),m=T[0],y=T[1],e.lineTo(m,y),A=[m,y],u=A[0],p=A[1],c+=2;break;case\"C\":D=n.slice(c,c+6),o=D[0],a=D[1],s=D[2],l=D[3],m=D[4],y=D[5],e.bezierCurveTo(o,a,s,l,m,y),M=[m,y],u=M[0],p=M[1],c+=6;break;case\"Q\":E=n.slice(c,c+4),o=E[0],a=E[1],m=E[2],y=E[3],e.quadraticCurveTo(o,a,m,y),P=[m,y],u=P[0],p=P[1],c+=4;break;case\"A\":for(O=n.slice(c,c+7),d=O[0],f=O[1],v=O[2],h=O[3],g=O[4],m=O[5],y=O[6],_=r.arc_to_bezier(u,p,d,f,-v,h,1-g,m,y),b=0,w=_.length;w>b;b++)k=_[b],o=k[0],a=k[1],s=k[2],l=k[3],m=k[4],y=k[5],e.bezierCurveTo(o,a,s,l,m,y);C=[m,y],u=C[0],p=C[1],c+=7;break;default:throw new Error(\"unexpected command: \"+i)}},o.prototype.draw_legend=function(t,e,n,i,r){return this._generic_line_legend(t,e,n,i,r)},o}(o.View),s=function(n){function i(){return c=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=a,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend({},i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(o.Model),{Model:s,View:a}})}.call(this),function(){n(\"palettes/colorbrewer\",[],function(){var t;return t={YlGn:{3:[16252089,11394446,3253076],4:[16777164,12773017,7915129,2327619],5:[16777164,12773017,7915129,3253076,26679],6:[16777164,14282915,11394446,7915129,3253076,26679],7:[16777164,14282915,11394446,7915129,4303709,2327619,23090],8:[16777189,16252089,14282915,11394446,7915129,4303709,2327619,23090],9:[16777189,16252089,14282915,11394446,7915129,4303709,2327619,26679,17705]},YlGnBu:{3:[15595697,8375739,2916280],4:[16777164,10607284,4306628,2252456],5:[16777164,10607284,4306628,2916280,2438292],6:[16777164,13101492,8375739,4306628,2916280,2438292],7:[16777164,13101492,8375739,4306628,1937856,2252456,797828],8:[16777177,15595697,13101492,8375739,4306628,1937856,2252456,797828],9:[16777177,15595697,13101492,8375739,4306628,1937856,2252456,2438292,531800]},GnBu:{3:[14742491,11066805,4432586],4:[15792616,12248252,8113348,2854078],5:[15792616,12248252,8113348,4432586,551084],6:[15792616,13429701,11066805,8113348,4432586,551084],7:[15792616,13429701,11066805,8113348,5157843,2854078,546974],8:[16252144,14742491,13429701,11066805,8113348,5157843,2854078,546974],9:[16252144,14742491,13429701,11066805,8113348,5157843,2854078,551084,540801]},BuGn:{3:[15070713,10082505,2925151],4:[15595771,11723490,6734500,2329413],5:[15595771,11723490,6734500,2925151,27948],6:[15595771,13429990,10082505,6734500,2925151,27948],7:[15595771,13429990,10082505,6734500,4304502,2329413,22564],8:[16252157,15070713,13429990,10082505,6734500,4304502,2329413,22564],9:[16252157,15070713,13429990,10082505,6734500,4304502,2329413,27948,17435]},PuBuGn:{3:[15524592,10927579,1872025],4:[16183287,12437985,6793679,164234],5:[16183287,12437985,6793679,1872025,93273],6:[16183287,13685222,10927579,6793679,1872025,93273],7:[16183287,13685222,10927579,6793679,3576e3,164234,91216],8:[16775163,15524592,13685222,10927579,6793679,3576e3,164234,91216],9:[16775163,15524592,13685222,10927579,6793679,3576e3,164234,93273,83510]},PuBu:{3:[15525874,10927579,2854078],4:[15855350,12437985,7645647,356528],5:[15855350,12437985,7645647,2854078,285325],6:[15855350,13685222,10927579,7645647,2854078,285325],7:[15855350,13685222,10927579,7645647,3576e3,356528,216699],8:[16775163,15525874,13685222,10927579,7645647,3576e3,356528,216699],9:[16775163,15525874,13685222,10927579,7645647,3576e3,356528,285325,145496]},BuPu:{3:[14740724,10403034,8935079],4:[15595771,11783651,9213638,8929693],5:[15595771,11783651,9213638,8935079,8458108],6:[15595771,12571622,10403034,9213638,8935079,8458108],7:[15595771,12571622,10403034,9213638,9202609,8929693,7209323],8:[16252157,14740724,12571622,10403034,9213638,9202609,8929693,7209323],9:[16252157,14740724,12571622,10403034,9213638,9202609,8929693,8458108,5046347]},RdPu:{3:[16638173,16424885,12917642],4:[16706530,16495801,16214177,11403646],5:[16706530,16495801,16214177,12917642,7995767],6:[16706530,16565696,16424885,16214177,12917642,7995767],7:[16706530,16565696,16424885,16214177,14496919,11403646,7995767],8:[16775155,16638173,16565696,16424885,16214177,14496919,11403646,7995767],9:[16775155,16638173,16565696,16424885,16214177,14496919,11403646,7995767,4784234]},PuRd:{3:[15196655,13210823,14490743],4:[15855350,14136792,14640560,13505110],5:[15855350,14136792,14640560,14490743,9961539],6:[15855350,13941210,13210823,14640560,14490743,9961539],7:[15855350,13941210,13210823,14640560,15149450,13505110,9502783],8:[16250105,15196655,13941210,13210823,14640560,15149450,13505110,9502783],9:[16250105,15196655,13941210,13210823,14640560,15149450,13505110,9961539,6750239]},OrRd:{3:[16705736,16628612,14895667],4:[16707801,16632970,16551257,14102559],5:[16707801,16632970,16551257,14895667,11730944],6:[16707801,16635038,16628612,16551257,14895667,11730944],7:[16707801,16635038,16628612,16551257,15689032,14102559,10027008],8:[16775148,16705736,16635038,16628612,16551257,15689032,14102559,10027008],9:[16775148,16705736,16635038,16628612,16551257,15689032,14102559,11730944,8323072]},YlOrRd:{3:[16772512,16691788,15743776],4:[16777138,16698460,16616764,14883356],5:[16777138,16698460,16616764,15743776,12386342],6:[16777138,16701814,16691788,16616764,15743776,12386342],7:[16777138,16701814,16691788,16616764,16535082,14883356,11599910],8:[16777164,16772512,16701814,16691788,16616764,16535082,14883356,11599910],9:[16777164,16772512,16701814,16691788,16616764,16535082,14883356,12386342,8388646]},YlOrBr:{3:[16775100,16696399,14245646],4:[16777172,16701838,16685353,13388802],5:[16777172,16701838,16685353,14245646,10040324],6:[16777172,16704401,16696399,16685353,14245646,10040324],7:[16777172,16704401,16696399,16685353,15495188,13388802,9186564],8:[16777189,16775100,16704401,16696399,16685353,15495188,13388802,9186564],9:[16777189,16775100,16704401,16696399,16685353,15495188,13388802,10040324,6694150]},Purples:{3:[15724021,12369372,7695281],4:[15921399,13355490,10394312,6967715],5:[15921399,13355490,10394312,7695281,5515151],6:[15921399,14342891,12369372,10394312,7695281,5515151],7:[15921399,14342891,12369372,10394312,8420794,6967715,4854918],8:[16579581,15724021,14342891,12369372,10394312,8420794,6967715,4854918],9:[16579581,15724021,14342891,12369372,10394312,8420794,6967715,5515151,4128893]},Blues:{3:[14609399,10406625,3244733],4:[15725567,12441575,7057110,2191797],5:[15725567,12441575,7057110,3244733,545180],6:[15725567,13032431,10406625,7057110,3244733,545180],7:[15725567,13032431,10406625,7057110,4362950,2191797,542100],8:[16251903,14609399,13032431,10406625,7057110,4362950,2191797,542100],9:[16251903,14609399,13032431,10406625,7057110,4362950,2191797,545180,536683]},Greens:{3:[15070688,10607003,3253076],4:[15595753,12248243,7652470,2329413],5:[15595753,12248243,7652470,3253076,27948],6:[15595753,13101504,10607003,7652470,3253076,27948],7:[15595753,13101504,10607003,7652470,4303709,2329413,23090],8:[16252149,15070688,13101504,10607003,7652470,4303709,2329413,23090],9:[16252149,15070688,13101504,10607003,7652470,4303709,2329413,27948,17435]},Oranges:{3:[16705230,16625259,15095053],4:[16707038,16629381,16616764,14239489],5:[16707038,16629381,16616764,15095053,10892803],6:[16707038,16634018,16625259,16616764,15095053,10892803],7:[16707038,16634018,16625259,16616764,15821075,14239745,9186564],8:[16774635,16705230,16634018,16625259,16616764,15821075,14239745,9186564],9:[16774635,16705230,16634018,16625259,16616764,15821075,14239745,10892803,8333060]},Reds:{3:[16703698,16552562,14560550],4:[16704985,16559761,16476746,13309981],5:[16704985,16559761,16476746,14560550,10817301],6:[16704985,16563105,16552562,16476746,14560550,10817301],7:[16704985,16563105,16552562,16476746,15678252,13309981,10027021],8:[16774640,16703698,16563105,16552562,16476746,15678252,13309981,10027021],9:[16774640,16703698,16563105,16552562,16476746,15678252,13309981,10817301,6750221]},Greys:{3:[15790320,12434877,6513507],4:[16250871,13421772,9868950,5395026],5:[16250871,13421772,9868950,6513507,2434341],6:[16250871,14277081,12434877,9868950,6513507,2434341],7:[16250871,14277081,12434877,9868950,7566195,5395026,2434341],8:[16777215,15790320,14277081,12434877,9868950,7566195,5395026,2434341],9:[16777215,15790320,14277081,12434877,9868950,7566195,5395026,2434341,0]},PuOr:{3:[15835968,16250871,10063555],4:[15098113,16627811,11709394,6175897],5:[15098113,16627811,16250871,11709394,6175897],6:[11753478,15835968,16703670,14211819,10063555,5515144],7:[11753478,15835968,16703670,16250871,14211819,10063555,5515144],8:[11753478,14713364,16627811,16703670,14211819,11709394,8418220,5515144],9:[11753478,14713364,16627811,16703670,16250871,14211819,11709394,8418220,5515144],10:[8338184,11753478,14713364,16627811,16703670,14211819,11709394,8418220,5515144,2949195],11:[8338184,11753478,14713364,16627811,16703670,16250871,14211819,11709394,8418220,5515144,2949195]},BrBG:{3:[14201701,16119285,5944492],4:[10903834,14664317,8441281,99697],5:[10903834,14664317,16119285,8441281,99697],6:[9195786,14201701,16181443,13101797,5944492,91742],7:[9195786,14201701,16181443,16119285,13101797,5944492,91742],8:[9195786,12550445,14664317,16181443,13101797,8441281,3512207,91742],9:[9195786,12550445,14664317,16181443,16119285,13101797,8441281,3512207,91742],10:[5517317,9195786,12550445,14664317,16181443,13101797,8441281,3512207,91742,15408],11:[5517317,9195786,12550445,14664317,16181443,16119285,13101797,8441281,3512207,91742,15408]},PRGn:{3:[11505091,16250871,8372091],4:[8073876,12756431,10935200,34871],5:[8073876,12756431,16250871,10935200,34871],6:[7744131,11505091,15193320,14282963,8372091,1800247],7:[7744131,11505091,15193320,16250871,14282963,8372091,1800247],8:[7744131,10055851,12756431,15193320,14282963,10935200,5942881,1800247],9:[7744131,10055851,12756431,15193320,16250871,14282963,10935200,5942881,1800247],10:[4194379,7744131,10055851,12756431,15193320,14282963,10935200,5942881,1800247,17435],11:[4194379,7744131,10055851,12756431,15193320,16250871,14282963,10935200,5942881,1800247,17435]},PiYG:{3:[15311817,16250871,10606442],4:[13638795,15840986,12116358,5090342],5:[13638795,15840986,16250871,12116358,5090342],6:[12917629,15311817,16638191,15136208,10606442,5083681],7:[12917629,15311817,16638191,16250871,15136208,10606442,5083681],8:[12917629,14579630,15840986,16638191,15136208,12116358,8371265,5083681],9:[12917629,14579630,15840986,16638191,16250871,15136208,12116358,8371265,5083681],10:[9306450,12917629,14579630,15840986,16638191,15136208,12116358,8371265,5083681,2581529],11:[9306450,12917629,14579630,15840986,16638191,16250871,15136208,12116358,8371265,5083681,2581529]},RdBu:{3:[15698530,16250871,6793679],4:[13238304,16033154,9618910,356784],5:[13238304,16033154,16250871,9618910,356784],6:[11671595,15698530,16636871,13755888,6793679,2188972],7:[11671595,15698530,16636871,16250871,13755888,6793679,2188972],8:[11671595,14049357,16033154,16636871,13755888,9618910,4428739,2188972],9:[11671595,14049357,16033154,16636871,16250871,13755888,9618910,4428739,2188972],10:[6750239,11671595,14049357,16033154,16636871,13755888,9618910,4428739,2188972,340065],11:[6750239,11671595,14049357,16033154,16636871,16250871,13755888,9618910,4428739,2188972,340065]},RdGy:{3:[15698530,16777215,10066329],4:[13238304,16033154,12237498,4210752],5:[13238304,16033154,16777215,12237498,4210752],6:[11671595,15698530,16636871,14737632,10066329,5066061],7:[11671595,15698530,16636871,16777215,14737632,10066329,5066061],8:[11671595,14049357,16033154,16636871,14737632,12237498,8882055,5066061],9:[11671595,14049357,16033154,16636871,16777215,14737632,12237498,8882055,5066061],10:[6750239,11671595,14049357,16033154,16636871,14737632,12237498,8882055,5066061,1710618],11:[6750239,11671595,14049357,16033154,16636871,16777215,14737632,12237498,8882055,5066061,1710618]},RdYlBu:{3:[16551257,16777151,9551835],4:[14096668,16625249,11262441,2915254],5:[14096668,16625249,16777151,11262441,2915254],6:[14102567,16551257,16703632,14742520,9551835,4552116],7:[14102567,16551257,16703632,16777151,14742520,9551835,4552116],8:[14102567,16018755,16625249,16703632,14742520,11262441,7646673,4552116],9:[14102567,16018755,16625249,16703632,16777151,14742520,11262441,7646673,4552116],10:[10813478,14102567,16018755,16625249,16703632,14742520,11262441,7646673,4552116,3225237],11:[10813478,14102567,16018755,16625249,16703632,16777151,14742520,11262441,7646673,4552116,3225237]},Spectral:{3:[16551257,16777151,10081684],4:[14096668,16625249,11263396,2851770],5:[14096668,16625249,16777151,11263396,2851770],6:[13975119,16551257,16703627,15136152,10081684,3311805],7:[13975119,16551257,16703627,16777151,15136152,10081684,3311805],8:[13975119,16018755,16625249,16703627,15136152,11263396,6734501,3311805],9:[13975119,16018755,16625249,16703627,16777151,15136152,11263396,6734501,3311805],10:[10355010,13975119,16018755,16625249,16703627,15136152,11263396,6734501,3311805,6180770],11:[10355010,13975119,16018755,16625249,16703627,16777151,15136152,11263396,6734501,3311805,6180770]},RdYlGn:{3:[16551257,16777151,9555808],4:[14096668,16625249,10934634,1742401],5:[14096668,16625249,16777151,10934634,1742401],6:[14102567,16551257,16703627,14282635,9555808,1742928],7:[14102567,16551257,16703627,16777151,14282635,9555808,1742928],8:[14102567,16018755,16625249,16703627,14282635,10934634,6733155,1742928],9:[14102567,16018755,16625249,16703627,16777151,14282635,10934634,6733155,1742928],10:[10813478,14102567,16018755,16625249,16703627,14282635,10934634,6733155,1742928,26679],11:[10813478,14102567,16018755,16625249,16703627,16777151,14282635,10934634,6733155,1742928,26679]}}\n",
        "                })}.call(this),function(){n(\"palettes/palettes\",[\"./colorbrewer\"],function(t){var e,n,i,r,o;e={};for(i in t){n=t[i];for(r in n)o=n[r],e[\"\"+i+\"-\"+r]=o.reverse()}return{all_palettes:e}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/image\",[\"underscore\",\"renderer/properties\",\"mapper/color/linear_color_mapper\",\"palettes/palettes\",\"./glyph\"],function(t,n,i,r,o){var s,a,l,c,h;return l=r.all_palettes,a=function(n){function r(){return c=r.__super__.constructor.apply(this,arguments)}return e(r,n),r.prototype._properties=[],r.prototype.initialize=function(t){var e;return e=this.mget(\"glyphspec\"),this._fields=null!=e.rows?[\"image:array\",\"rows\",\"cols\",\"x\",\"y\",\"dw\",\"dh\",\"palette:string\",\"reserve_val\",\"reserve_color\"]:[\"image:array\",\"x\",\"y\",\"dw\",\"dh\",\"palette:string\",\"reserve_val\",\"reserve_color\"],r.__super__.initialize.call(this,t)},r.prototype._set_data=function(e){var n,r,o,s,a,c,h,u,p,d,f;for(this.data=e,(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)),f=[],c=p=0,d=this.image.length;d>=0?d>p:p>d;c=d>=0?++p:--p)null!=this.rows?(this.height[c]=this.rows[c],this.width[c]=this.cols[c]):(this.height[c]=this.image[c].length,this.width[c]=this.image[c][0].length),o=document.createElement(\"canvas\"),o.width=this.width[c],o.height=this.height[c],a=o.getContext(\"2d\"),h=a.getImageData(0,0,this.width[c],this.height[c]),s=new i.Model({palette:l[this.palette[c]],reserve_val:this.reserve_val,reserve_color:this.reserve_color}),u=null!=this.rows?this.image[c]:t.flatten(this.image[c]),n=s.v_map_screen(u),r=new Uint8ClampedArray(n),h.data.set(r),a.putImageData(h,0,0),f.push(this.image_data[c]=o);return f},r.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],this.sw=this.distance_vector(\"x\",\"dw\",\"edge\",this.mget(\"glyphspec\").dilate),this.sh=this.distance_vector(\"y\",\"dh\",\"edge\",this.mget(\"glyphspec\").dilate)},r.prototype._render=function(t,e){var n,i,r,o,s;for(i=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),o=0,s=e.length;s>o;o++)n=e[o],null!=this.image_data[n]&&(isNaN(this.sx[n]+this.sy[n]+this.sw[n]+this.sh[n])||(r=this.sy[n],t.translate(0,r),t.scale(1,-1),t.translate(0,-r),t.drawImage(this.image_data[n],0|this.sx[n],0|this.sy[n],this.sw[n],this.sh[n]),t.translate(0,r),t.scale(1,-1),t.translate(0,-r)));return t.setImageSmoothingEnabled(i)},r}(o.View),s=function(n){function i(){return h=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=a,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{level:\"underlay\",dilate:!1})},i}(o.Model),{Model:s,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/image_rgba\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a,l;return s=n.glyph_properties,o=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype._properties=[],i.prototype.initialize=function(t){var e;return e=this.mget(\"glyphspec\"),this._fields=null!=e.rows?[\"image:array\",\"rows\",\"cols\",\"x\",\"y\",\"dw\",\"dh\"]:[\"image:array\",\"x\",\"y\",\"dw\",\"dh\"],i.__super__.initialize.call(this,t)},i.prototype._set_data=function(){var e,n,i,r,o,s,a,l,c,h,u,p,d,f;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)),f=[],a=h=0,p=this.image.length;p>=0?p>h:h>p;a=p>=0?++h:--h){if(null!=this.rows?(this.height[a]=this.rows[a],this.width[a]=this.cols[a]):(this.height[a]=this.image[a].length,this.width[a]=this.image[a][0].length),i=document.createElement(\"canvas\"),i.width=this.width[a],i.height=this.height[a],o=i.getContext(\"2d\"),l=o.getImageData(0,0,this.width[a],this.height[a]),null!=this.rows)l.data.set(new Uint8ClampedArray(this.image[a]));else{for(s=t.flatten(this.image[a]),e=new ArrayBuffer(4*s.length),r=new Uint32Array(e),c=u=0,d=s.length;d>=0?d>u:u>d;c=d>=0?++u:--u)r[c]=s[c];n=new Uint8ClampedArray(e),l.data.set(n)}o.putImageData(l,0,0),f.push(this.image_data[a]=i)}return f},i.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],this.sw=this.distance_vector(\"x\",\"dw\",\"edge\",this.mget(\"glyphspec\").dilate),this.sh=this.distance_vector(\"y\",\"dh\",\"edge\",this.mget(\"glyphspec\").dilate)},i.prototype._render=function(t,e){var n,i,r,o,s;for(i=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),o=0,s=e.length;s>o;o++)n=e[o],isNaN(this.sx[n]+this.sy[n]+this.sw[n]+this.sh[n])||(r=this.sy[n],t.translate(0,r),t.scale(1,-1),t.translate(0,-r),t.drawImage(this.image_data[n],0|this.sx[n],0|this.sy[n],this.sw[n],this.sh[n]),t.translate(0,r),t.scale(1,-1),t.translate(0,-r));return t.setImageSmoothingEnabled(i)},i}(i.View),r=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{level:\"underlay\",dilate:!1})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/image_url\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a,l;return s=n.glyph_properties,o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"url:string\",\"x\",\"y\",\"w\",\"h\",\"angle\"],n.prototype._properties=[],n.prototype._set_data=function(t){var e;return this.data=t,this.image=function(){var t,n,i,r;for(i=this.url,r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push(null);return r}.call(this),this.need_load=function(){var t,n,i,r;for(i=this.url,r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push(!0);return r}.call(this),this.loaded=function(){var t,n,i,r;for(i=this.url,r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push(!1);return r}.call(this)},n.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],this.sw=this.distance_vector(\"x\",\"w\",\"edge\",this.mget(\"glyphspec\").dilate),this.sh=this.distance_vector(\"y\",\"h\",\"edge\",this.mget(\"glyphspec\").dilate)},n.prototype._render=function(t,e){var n,i,r,o,s,a,l=this;for(a=[],o=0,s=e.length;s>o;o++)n=e[o],isNaN(this.sx[n]+this.sy[n]+this.angle[n])||(this.need_load[n]?(i=new Image,i.onload=function(e,n){return function(){var i;return l.loaded[n]=!0,l.image[n]=e,t.save(),t.beginPath(),i=l.plot_view.view_state,t.rect(i.get(\"border_left\")+1,i.get(\"border_top\")+1,i.get(\"inner_width\")-2,i.get(\"inner_height\")-2),t.clip(),l._render_image(t,i,n,e),t.restore()}}(i,n),i.src=this.url[n],a.push(this.need_load[n]=!1)):this.loaded[n]?(r=this.plot_view.view_state,a.push(this._render_image(t,r,n,this.image[n]))):a.push(void 0));return a},n.prototype._final_sx_sy=function(){var t,e=this;switch(t=this.mget(\"glyphspec\").anchor||\"top_left\"){case\"top_left\":return function(t){return[e.sx[t],e.sy[t]]};case\"top_center\":return function(t){return[e.sx[t]-e.sw[t]/2,e.sy[t]]};case\"top_right\":return function(t){return[e.sx[t]-e.sw[t],e.sy[t]]};case\"right_center\":return function(t){return[e.sx[t]-e.sw[t],e.sy[t]-e.sh[t]/2]};case\"bottom_right\":return function(t){return[e.sx[t]-e.sw[t],e.sy[t]-e.sh[t]]};case\"bottom_center\":return function(t){return[e.sx[t]-e.sw[t]/2,e.sy[t]-e.sh[t]]};case\"bottom_left\":return function(t){return[e.sx[t],e.sy[t]-e.sh[t]]};case\"left_center\":return function(t){return[e.sx[t],e.sy[t]-e.sh[t]/2]};case\"center\":return function(t){return[e.sx[t]-e.sw[t]/2,e.sy[t]-e.sh[t]/2]}}},n.prototype._render_image=function(t,e,n,i){var r,o,s;return isNaN(this.sw[n])&&(this.sw[n]=i.width),isNaN(this.sh[n])&&(this.sh[n]=i.height),s=this._final_sx_sy()(n),r=s[0],o=s[1],this.angle[n]?(t.translate(r,o),t.rotate(this.angle[n]),t.drawImage(i,0,0,this.sw[n],this.sh[n]),t.rotate(-this.angle[n]),t.translate(-r,-o)):t.drawImage(i,r,o,this.sw[n],this.sh[n])},n}(i.View),r=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{level:\"underlay\"})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/inverted_triangle\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x\",\"y\",\"size\"],n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h,u,p;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),p=[],h=0,u=e.length;u>h;h++)l=e[h],isNaN(i[l]+r[l]+o[l])||(s=o[l]*Math.sqrt(3)/6,c=o[l]/2,a=o[l]*Math.sqrt(3)/2,t.beginPath(),t.moveTo(i[l]-c,r[l]-s),t.lineTo(i[l]+c,r[l]-s),t.lineTo(i[l],r[l]-s+a),t.closePath(),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,l),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,l),p.push(t.stroke())):p.push(void 0));return p},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/line\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x\",\"y\"],n.prototype._properties=[\"line\"],n.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],t},n.prototype._render=function(t,e,n){var i,r,o,s;for(i=!1,n.line_properties.set(t,n),o=0,s=e.length;s>o;o++)r=e[o],isNaN(this.sx[r]+this.sy[r])&&i?(t.stroke(),t.beginPath(),i=!1):i?t.lineTo(this.sx[r],this.sy[r]):(t.beginPath(),t.moveTo(this.sx[r],this.sy[r]),i=!0);return i?t.stroke():void 0},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_line_legend(t,e,n,i,r)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/multi_line\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"xs\",\"ys\"],n.prototype._properties=[\"line\"],n.prototype._map_data=function(){return null},n.prototype._render=function(t,e,n){var i,r,o,s,a,l,c,h,u,p,d,f;for(f=[],c=0,u=e.length;u>c;c++){for(i=e[c],a=this.xs[i],l=this.ys[i],p=this.plot_view.map_to_screen(a,this.glyph_props.xs.units,l,this.glyph_props.ys.units),o=p[0],s=p[1],n.line_properties.set_vectorize(t,i),r=h=0,d=o.length;d>=0?d>h:h>d;r=d>=0?++h:--h)0!==r?isNaN(o[r])||isNaN(s[r])?(t.stroke(),t.beginPath()):t.lineTo(o[r],s[r]):(t.beginPath(),t.moveTo(o[r],s[r]));f.push(t.stroke())}return f},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_line_legend(t,e,n,i,r)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/oval\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x\",\"y\",\"width\",\"height\",\"angle\"],n.prototype._properties=[\"line\",\"fill\"],n.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],this.sw=this.distance_vector(\"x\",\"width\",\"center\"),this.sh=this.distance_vector(\"y\",\"height\",\"center\")},n.prototype._render=function(t,e,n,i,r,o,s){var a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.sw),null==s&&(s=this.sh),h=[],l=0,c=e.length;c>l;l++)a=e[l],isNaN(i[a]+r[a]+o[a]+s[a]+this.angle[a])||(t.translate(i[a],r[a]),t.rotate(this.angle[a]),t.beginPath(),t.moveTo(0,-s[a]/2),t.bezierCurveTo(o[a]/2,-s[a]/2,o[a]/2,s[a]/2,0,s[a]/2),t.bezierCurveTo(-o[a]/2,s[a]/2,-o[a]/2,-s[a]/2,0,-s[a]/2),t.closePath(),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,a),t.fill()),n.line_properties.do_stroke&&(n.line_properties.set_vectorize(t,a),t.stroke()),t.rotate(-this.angle[a]),h.push(t.translate(-i[a],-r[a])));return h},n.prototype.draw_legend=function(t,e,n,i,r){var o,s,a,l,c,h,u,p,d;return a=null!=(d=this.get_reference_point())?d:0,s=[a],u={},u[a]=(e+n)/2,p={},p[a]=(i+r)/2,l=this.sw[a]/this.sh[a],o=.8*Math.min(Math.abs(n-e),Math.abs(r-i)),h={},c={},l>1?(h[a]=o,c[a]=o/l):(h[a]=o*l,c[a]=o),this._render(t,s,this.glyph_props,u,p,h,c)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0,angle:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/patch\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x\",\"y\"],n.prototype._properties=[\"line\",\"fill\"],n.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],t},n.prototype._render=function(t,e,n){var i,r,o,s,a;if(n.fill_properties.do_fill){for(n.fill_properties.set(t,n),r=0,s=e.length;s>r;r++)i=e[r],0!==i?isNaN(this.sx[i]+this.sy[i])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(this.sx[i],this.sy[i]):(t.beginPath(),t.moveTo(this.sx[i],this.sy[i]));t.closePath(),t.fill()}if(n.line_properties.do_stroke){for(n.line_properties.set(t,n),o=0,a=e.length;a>o;o++)i=e[o],0!==i?isNaN(this.sx[i]+this.sy[i])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(this.sx[i],this.sy[i]):(t.beginPath(),t.moveTo(this.sx[i],this.sy[i]));return t.closePath(),t.stroke()}},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_area_legend(t,e,n,i,r)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/patches\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"xs\",\"ys\"],n.prototype._properties=[\"line\",\"fill\"],n.prototype._map_data=function(){return null},n.prototype._render=function(t,e,n){var i,r,o,s,a,l,c,h,u,p,d,f;for(t=this.plot_view.ctx,f=[],a=0,h=e.length;h>a;a++){if(i=e[a],u=this.plot_view.map_to_screen(this.xs[i],n.xs.units,this.ys[i],n.ys.units),o=u[0],s=u[1],n.fill_properties.do_fill){for(n.fill_properties.set_vectorize(t,i),r=l=0,p=o.length;p>=0?p>l:l>p;r=p>=0?++l:--l)0!==r?isNaN(o[r]+s[r])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(o[r],s[r]):(t.beginPath(),t.moveTo(o[r],s[r]));t.closePath(),t.fill()}if(n.line_properties.do_stroke){for(n.line_properties.set_vectorize(t,i),r=c=0,d=o.length;d>=0?d>c:c>d;r=d>=0?++c:--c)0!==r?isNaN(o[r]+s[r])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(o[r],s[r]):(t.beginPath(),t.moveTo(o[r],s[r]));t.closePath(),f.push(t.stroke())}else f.push(void 0)}return f},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_area_legend(t,e,n,i,r)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/cross\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),h=[],l=0,c=e.length;c>l;l++)s=e[l],isNaN(i[s]+r[s]+o[s])||(a=o[s]/2,t.beginPath(),t.moveTo(i[s],r[s]+a),t.lineTo(i[s],r[s]-a),t.moveTo(i[s]-a,r[s]),t.lineTo(i[s]+a,r[s]),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),h.push(t.stroke())):h.push(void 0));return h},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/quad\",[\"underscore\",\"rbush\",\"renderer/properties\",\"./glyph\"],function(t,n,i,r){var o,s,a,l;return s=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"right\",\"left\",\"bottom\",\"top\"],n.prototype._properties=[\"line\",\"fill\"],n.prototype._map_data=function(){var t,e;return t=this.plot_view.map_to_screen(this.left,this.glyph_props.left.units,this.top,this.glyph_props.top.units),this.sx0=t[0],this.sy0=t[1],e=this.plot_view.map_to_screen(this.right,this.glyph_props.right.units,this.bottom,this.glyph_props.bottom.units),this.sx1=e[0],this.sy1=e[1],e},n.prototype._render=function(t,e,n,i,r,o,s){var a,l,c,h;for(null==i&&(i=this.sx0),null==r&&(r=this.sx1),null==o&&(o=this.sy0),null==s&&(s=this.sy1),h=[],l=0,c=e.length;c>l;l++)a=e[l],isNaN(i[a]+o[a]+r[a]+s[a])||(n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,a),t.fillRect(i[a],o[a],r[a]-i[a],s[a]-o[a])),n.line_properties.do_stroke?(t.beginPath(),t.rect(i[a],o[a],r[a]-i[a],s[a]-o[a]),n.line_properties.set_vectorize(t,a),h.push(t.stroke())):h.push(void 0));return h},n.prototype._hit_point=function(t){var e,n,i,r,o,s,a,l,c;for(l=[t.vx,t.vy],o=l[0],s=l[1],i=this.plot_view.view_state.vx_to_sx(o),r=this.plot_view.view_state.vy_to_sy(s),e=[],n=a=0,c=this.sx0.length;c>=0?c>a:a>c;n=c>=0?++a:--a)i>=this.sx0[n]&&i<=this.sx1[n]&&r>=this.sy0[n]&&r<this.sy1[n]&&e.push(n);return e},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_area_legend(t,e,n,i,r)},n}(r.View),o=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=s,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(r.Model),{Model:o,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/quadratic\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x0\",\"y0\",\"x1\",\"y1\",\"cx\",\"cy\"],n.prototype._properties=[\"line\"],n.prototype._map_data=function(){var t,e,n;return t=this.plot_view.map_to_screen(this.x0,this.glyph_props.x0.units,this.y0,this.glyph_props.y0.units),this.sx0=t[0],this.sy0=t[1],e=this.plot_view.map_to_screen(this.x1,this.glyph_props.x1.units,this.y1,this.glyph_props.y1.units),this.sx1=e[0],this.sy1=e[1],n=this.plot_view.map_to_screen(this.cx,this.glyph_props.cx.units,this.cy,this.glyph_props.cy.units),this.scx=n[0],this.scy=n[1],n},n.prototype._render=function(t,e,n){var i,r,o,s;if(n.line_properties.do_stroke){for(s=[],r=0,o=e.length;o>r;r++)i=e[r],isNaN(this.sx0[i]+this.sy0[i]+this.sx1[i]+this.sy1[i]+this.scx[i]+this.scy[i])||(t.beginPath(),t.moveTo(this.sx0[i],this.sy0[i]),t.quadraticCurveTo(this.scx[i],this.scy[i],this.sx1[i],this.sy1[i]),n.line_properties.set_vectorize(t,i),s.push(t.stroke()));return s}},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_line_legend(t,e,n,i,r)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/ray\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x\",\"y\",\"angle\",\"length\"],n.prototype._properties=[\"line\"],n.prototype._map_data=function(){var t,e,n,i,r,o,s,a;for(o=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=o[0],this.sy=o[1],this.length=this.distance_vector(\"x\",\"length\",\"edge\"),i=this.plot_view.view_state.get(\"width\"),t=this.plot_view.view_state.get(\"height\"),n=2*(i+t),a=[],e=r=0,s=this.length.length;s>=0?s>r:r>s;e=s>=0?++r:--r)a.push(0===this.length[e]?this.length[e]=n:void 0);return a},n.prototype._render=function(t,e,n){var i,r,o,s;if(n.line_properties.do_stroke){for(s=[],r=0,o=e.length;o>r;r++)i=e[r],isNaN(this.sx[i]+this.sy[i]+this.angle[i]+this.length[i])||(t.translate(this.sx[i],this.sy[i]),t.rotate(this.angle[i]),t.beginPath(),t.moveTo(0,0),t.lineTo(this.length[i],0),n.line_properties.set_vectorize(t,i),t.stroke(),t.rotate(-this.angle[i]),s.push(t.translate(-this.sx[i],-this.sy[i])));return s}},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_line_legend(t,e,n,i,r)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/rect\",[\"underscore\",\"rbush\",\"renderer/properties\",\"./glyph\"],function(t,n,i,r){var o,s,a,l;return s=function(i){function r(){return a=r.__super__.constructor.apply(this,arguments)}return e(r,i),r.prototype._fields=[\"x\",\"y\",\"width\",\"height\",\"angle\"],r.prototype._properties=[\"line\",\"fill\"],r.prototype._map_data=function(){var e,n,i,r,o,s;for(o=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),n=o[0],i=o[1],this.sw=this.distance_vector(\"x\",\"width\",\"center\",this.mget(\"glyphspec\").dilate),this.sh=this.distance_vector(\"y\",\"height\",\"center\",this.mget(\"glyphspec\").dilate),this.sx=new Array(n.length),this.sy=new Array(n.length),e=r=0,s=n.length;s>=0?s>r:r>s;e=s>=0?++r:--r)this.sx[e]=Math.abs(n[e]-this.sw[e])<2?Math.round(n[e]):n[e],this.sy[e]=Math.abs(i[e]-this.sh[e])<2?Math.round(i[e]):i[e];return this.max_width=t.max(this.width),this.max_height=t.max(this.height)},r.prototype._set_data=function(){var t,e,i,r;for(this.index=n(),e=[],t=i=0,r=this.x.length;r>=0?r>i:i>r;t=r>=0?++i:--i)isNaN(this.x[t]+this.y[t])||e.push([this.x[t],this.y[t],this.x[t],this.y[t],{i:t}]);return this.index.load(e)},r.prototype._render=function(t,e,n,i,r,o,s){var a,l,c,h,u;if(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.sw),null==s&&(s=this.sh),n.fill_properties.do_fill)for(l=0,h=e.length;h>l;l++)a=e[l],isNaN(i[a]+r[a]+o[a]+s[a]+this.angle[a])||(n.fill_properties.set_vectorize(t,a),this.angle[a]?(t.translate(i[a],r[a]),t.rotate(this.angle[a]),t.fillRect(-o[a]/2,-s[a]/2,o[a],s[a]),t.rotate(-this.angle[a]),t.translate(-i[a],-r[a])):t.fillRect(i[a]-o[a]/2,r[a]-s[a]/2,o[a],s[a]));if(n.line_properties.do_stroke){for(t.beginPath(),c=0,u=e.length;u>c;c++)a=e[c],isNaN(i[a]+r[a]+o[a]+s[a]+this.angle[a])||0!==o[a]&&0!==s[a]&&(this.angle[a]?(t.translate(i[a],r[a]),t.rotate(this.angle[a]),t.rect(-o[a]/2,-s[a]/2,o[a],s[a]),t.rotate(-this.angle[a]),t.translate(-i[a],-r[a])):t.rect(i[a]-o[a]/2,r[a]-s[a]/2,o[a],s[a]),n.line_properties.set_vectorize(t,a),t.stroke(),t.beginPath());return t.stroke()}},r.prototype._hit_rect=function(t){var e,n,i,r,o,s,a;return s=this.plot_view.xmapper.v_map_from_target([t.vx0,t.vx1]),n=s[0],i=s[1],a=this.plot_view.ymapper.v_map_from_target([t.vy0,t.vy1]),r=a[0],o=a[1],function(){var t,s,a,l;for(a=this.index.search([n,r,i,o]),l=[],t=0,s=a.length;s>t;t++)e=a[t],l.push(e[4].i);return l}.call(this)},r.prototype._hit_point=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j;for(O=[t.vx,t.vy],_=O[0],v=O[1],x=this.plot_view.xmapper.map_from_target(_),T=this.plot_view.ymapper.map_from_target(v),S=\"string\"==typeof x,M=\"string\"==typeof T,S||M?n=function(){var t,e,n;for(n=[],s=t=0,e=this.x.length;e>=0?e>t:t>e;s=e>=0?++t:--t)n.push(s);return n}.call(this):(\"screen\"===this.width_units||S?(l=this.max_width,S&&(l=this.plot_view.xmapper.map_to_target(l)),g=_-2*l,m=_+2*l,R=this.plot_view.xmapper.v_map_from_target([g,m]),k=R[0],C=R[1]):(k=x-2*this.max_width,C=x+2*this.max_width),\"screen\"===this.height_units||M?(a=this.max_height,M&&(a=this.plot_view.ymapper.map_to_target(a)),y=v-2*a,b=v+2*a,j=this.plot_view.ymapper.v_map_from_target([y,b]),A=j[0],D=j[1]):(A=T-2*this.max_height,D=T+2*this.max_height),n=function(){var t,e,n,i;for(n=this.index.search([k,A,C,D]),i=[],t=0,e=n.length;e>t;t++)c=n[t],i.push(c[4].i);return i}.call(this)),o=[],E=0,P=n.length;P>E;E++)s=n[E],d=this.plot_view.view_state.vx_to_sx(\"screen\"===this.width_units||S?_:this.plot_view.xmapper.map_to_target(x)),f=this.plot_view.view_state.vy_to_sy(\"screen\"===this.height_units||M?v:this.plot_view.ymapper.map_to_target(T)),this.angle[s]&&(i=Math.sqrt(Math.pow(d-this.sx[s],2)+Math.pow(f-this.sy[s],2)),p=Math.sin(-this.angle[s]),e=Math.cos(-this.angle[s]),h=e*(d-this.sx[s])-p*(f-this.sy[s])+this.sx[s],u=p*(d-this.sx[s])+e*(f-this.sy[s])+this.sy[s],d=h,f=u),w=Math.abs(this.sx[s]-d)<=this.sw[s]/2,r=Math.abs(this.sy[s]-f)<=this.sh[s]/2,r&&w&&o.push(s);return o},r.prototype.draw_legend=function(t,e,n,i,r){return this._generic_area_legend(t,e,n,i,r)},r}(r.View),o=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=s,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0,angle:0,dilate:!1})},i}(r.Model),{Model:o,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/square\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),c=[],a=0,l=e.length;l>a;a++)s=e[a],isNaN(i[s]+r[s]+o[s])||(t.translate(i[s],r[s]),t.beginPath(),t.rect(-o[s]/2,-o[s]/2,o[s],o[s]),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke&&(n.line_properties.set_vectorize(t,s),t.stroke()),c.push(t.translate(-i[s],-r[s])));\n",
        "                return c},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{size_units:\"screen\",fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/square_x\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),h=[],l=0,c=e.length;c>l;l++)s=e[l],isNaN(i[s]+r[s]+o[s])||(t.translate(i[s],r[s]),t.beginPath(),t.rect(-o[s]/2,-o[s]/2,o[s],o[s]),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke&&(n.line_properties.set_vectorize(t,s),t.stroke(),a=o[s]/2,t.moveTo(-a,+a),t.lineTo(+a,-a),t.moveTo(-a,-a),t.lineTo(+a,+a),t.stroke()),h.push(t.translate(-i[s],-r[s])));return h},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{size_units:\"screen\",fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/square_cross\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),h=[],l=0,c=e.length;c>l;l++)s=e[l],isNaN(i[s]+r[s]+o[s])||(t.translate(i[s],r[s]),t.beginPath(),t.rect(-o[s]/2,-o[s]/2,o[s],o[s]),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke&&(n.line_properties.set_vectorize(t,s),a=o[s]/2,t.moveTo(0,+a),t.lineTo(0,-a),t.moveTo(-a,0),t.lineTo(+a,0),t.stroke()),h.push(t.translate(-i[s],-r[s])));return h},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{size_units:\"screen\",fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/segment\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x0\",\"y0\",\"x1\",\"y1\"],n.prototype._properties=[\"line\"],n.prototype._map_data=function(){var t,e;return t=this.plot_view.map_to_screen(this.x0,this.glyph_props.x0.units,this.y0,this.glyph_props.y0.units),this.sx0=t[0],this.sy0=t[1],e=this.plot_view.map_to_screen(this.x1,this.glyph_props.x1.units,this.y1,this.glyph_props.y1.units),this.sx1=e[0],this.sy1=e[1],e},n.prototype._render=function(t,e,n){var i,r,o,s;if(n.line_properties.do_stroke){for(s=[],r=0,o=e.length;o>r;r++)i=e[r],isNaN(this.sx0[i]+this.sy0[i]+this.sx1[i]+this.sy1[i])||(t.beginPath(),t.moveTo(this.sx0[i],this.sy0[i]),t.lineTo(this.sx1[i],this.sy1[i]),n.line_properties.set_vectorize(t,i),s.push(t.stroke()));return s}},n.prototype.draw_legend=function(t,e,n,i,r){return this._generic_line_legend(t,e,n,i,r)},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/text\",[\"underscore\",\"renderer/properties\",\"./glyph\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._fields=[\"x\",\"y\",\"angle\",\"text:string\"],n.prototype._properties=[\"text\"],n.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],t},n.prototype._render=function(t,e,n){var i,r,o,s;for(s=[],r=0,o=e.length;o>r;r++)i=e[r],isNaN(this.sx[i]+this.sy[i]+this.angle[i])||(t.translate(this.sx[i],this.sy[i]),t.rotate(this.angle[i]),n.text_properties.set_vectorize(t,i),t.fillText(this.text[i],0,0),t.rotate(-this.angle[i]),s.push(t.translate(-this.sx[i],-this.sy[i])));return s},n.prototype.draw_legend=function(t,e,n,i,r){var o,s,a,l;return o=this.glyph_props,l=o.text_properties,t.save(),a=this.get_reference_point(),s=null!=a?a:o,l.set(t,s),t.font=l.font(12),t.textAlign=\"right\",t.textBaseline=\"middle\",t.fillText(\"txt\",n,(i+r)/2),t.restore()},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{text_font:\"helvetica\",text_font_size:\"12pt\",text_font_style:\"normal\",text_color:\"#444444\",text_alpha:1,text_align:\"left\",text_baseline:\"bottom\"})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/triangle\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\",\"fill\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h,u,p;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),p=[],h=0,u=e.length;u>h;h++)l=e[h],isNaN(i[l]+r[l]+o[l])||(s=o[l]*Math.sqrt(3)/6,c=o[l]/2,a=o[l]*Math.sqrt(3)/2,t.beginPath(),t.moveTo(i[l]-c,r[l]+s),t.lineTo(i[l]+c,r[l]+s),t.lineTo(i[l],r[l]+s-a),t.closePath(),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,l),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,l),p.push(t.stroke())):p.push(void 0));return p},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/wedge\",[\"underscore\",\"rbush\",\"common/mathutils\",\"renderer/properties\",\"./glyph\"],function(t,n,i,r,o){var s,a,l,c;return a=function(r){function o(){return l=o.__super__.constructor.apply(this,arguments)}return e(o,r),o.prototype._fields=[\"x\",\"y\",\"radius\",\"start_angle\",\"end_angle\",\"direction:string\"],o.prototype._properties=[\"line\",\"fill\"],o.prototype._set_data=function(){var e,i,r,o;for(this.max_radius=t.max(this.radius),this.index=n(),i=[],e=r=0,o=this.x.length;o>=0?o>r:r>o;e=o>=0?++r:--r)isNaN(this.x[e]+this.y[e])||i.push([this.x[e],this.y[e],this.x[e],this.y[e],{i:e}]);return this.index.load(i)},o.prototype._map_data=function(){var t;return t=this.plot_view.map_to_screen(this.x,this.glyph_props.x.units,this.y,this.glyph_props.y.units),this.sx=t[0],this.sy=t[1],this.radius=this.distance_vector(\"x\",\"radius\",\"edge\")},o.prototype._render=function(t,e,n,i,r,o){var s,a,l,c;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.radius),c=[],a=0,l=e.length;l>a;a++)s=e[a],isNaN(i[s]+r[s]+o[s]+this.start_angle[s]+this.end_angle[s]+this.direction[s])||(t.beginPath(),t.arc(i[s],r[s],o[s],this.start_angle[s],this.end_angle[s],this.direction[s]),t.lineTo(i[s],r[s]),t.closePath(),n.fill_properties.do_fill&&(n.fill_properties.set_vectorize(t,s),t.fill()),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),c.push(t.stroke())):c.push(void 0));return c},o.prototype._hit_point=function(e){var n,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z;if(N=[e.vx,e.vy],m=N[0],b=N[1],k=this.plot_view.xmapper.map_from_target(m),T=this.plot_view.ymapper.map_from_target(b),\"screen\"===this.radius_units?(v=m-this.max_radius,y=m+this.max_radius,H=this.plot_view.xmapper.v_map_from_target([v,y]),C=H[0],S=H[1],w=b-this.max_radius,x=b+this.max_radius,I=this.plot_view.ymapper.v_map_from_target([w,x]),A=I[0],D=I[1]):(C=k-this.max_radius,S=k+this.max_radius,A=T-this.max_radius,D=T+this.max_radius),r=function(){var t,e,n,i;for(n=this.index.search([C,A,S,D]),i=[],t=0,e=n.length;e>t;t++)c=n[t],i.push(c[4].i);return i}.call(this),o=[],\"screen\"===this.radius_units)for(u=this.plot_view.view_state.vx_to_sx(m),f=this.plot_view.view_state.vy_to_sy(b),M=0,O=r.length;O>M;M++)l=r[M],h=Math.pow(this.radius[l],2),s=Math.pow(this.sx[l]-u,2)+Math.pow(this.sy[l]-f,2),h>=s&&o.push([l,s]);else for(E=0,R=r.length;R>E;E++)l=r[E],h=Math.pow(this.radius[l],2),p=this.plot_view.xmapper.map_to_target(k),d=this.plot_view.xmapper.map_to_target(this.x[l]),_=this.plot_view.ymapper.map_to_target(T),g=this.plot_view.ymapper.map_to_target(this.y[l]),s=Math.pow(p-d,2)+Math.pow(_-g,2),h>=s&&o.push([l,s]);for(a=[],P=0,j=o.length;j>P;P++)z=o[P],l=z[0],s=z[1],u=this.plot_view.view_state.vx_to_sx(m),f=this.plot_view.view_state.vy_to_sy(b),n=Math.atan2(f-this.sy[l],u-this.sx[l]),i.angle_between(-n,-this.start_angle[l],-this.end_angle[l],this.direction[l])&&a.push([l,s]);return a=t.chain(a).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value()},o.prototype.draw_legend=function(t,e,n,i,r){var o,s,a,l,c,h;return a=null!=(h=this.get_reference_point())?h:0,o=[a],l={},l[a]=(e+n)/2,c={},c[a]=(i+r)/2,s={},s[a]=.4*Math.min(Math.abs(n-e),Math.abs(r-i)),this._render(t,o,this.glyph_props,l,c,s)},o}(o.View),s=function(n){function i(){return c=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=a,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{direction:\"anticlock\",fill_color:\"gray\",fill_alpha:1,line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(o.Model),{Model:s,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/x\",[\"underscore\",\"renderer/properties\",\"./marker\"],function(t,n,i){var r,o,s,a;return o=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype._properties=[\"line\"],n.prototype._render=function(t,e,n,i,r,o){var s,a,l,c,h;for(null==i&&(i=this.sx),null==r&&(r=this.sy),null==o&&(o=this.size),h=[],l=0,c=e.length;c>l;l++)s=e[l],isNaN(i[s]+r[s]+o[s])||(a=o[s]/2,t.beginPath(),t.moveTo(i[s]-a,r[s]+a),t.lineTo(i[s]+a,r[s]-a),t.moveTo(i[s]-a,r[s]-a),t.lineTo(i[s]+a,r[s]+a),n.line_properties.do_stroke?(n.line_properties.set_vectorize(t,s),h.push(t.stroke())):h.push(void 0));return h},n}(i.View),r=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"Glyph\",i.prototype.display_defaults=function(){return t.extend(i.__super__.display_defaults.call(this),{line_color:\"red\",line_width:1,line_alpha:1,line_join:\"miter\",line_cap:\"butt\",line_dash:[],line_dash_offset:0})},i}(i.Model),{Model:r,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/glyph/glyph_factory\",[\"require\",\"exports\",\"module\",\"underscore\",\"common/has_parent\",\"common/plot_widget\",\"./annular_wedge\",\"./annulus\",\"./arc\",\"./asterisk\",\"./bezier\",\"./circle\",\"./circle_x\",\"./circle_cross\",\"./diamond\",\"./diamond_cross\",\"./gear\",\"./image\",\"./image_rgba\",\"./image_url\",\"./inverted_triangle\",\"./line\",\"./multi_line\",\"./oval\",\"./patch\",\"./patches\",\"./cross\",\"./quad\",\"./quadratic\",\"./ray\",\"./rect\",\"./square\",\"./square_x\",\"./square_cross\",\"./segment\",\"./text\",\"./triangle\",\"./wedge\",\"./x\"],function(t){var n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z,F,L;return F=t(\"underscore\"),i=t(\"common/has_parent\"),r=t(\"common/plot_widget\"),o=t(\"./annular_wedge\"),s=t(\"./annulus\"),a=t(\"./arc\"),l=t(\"./asterisk\"),c=t(\"./bezier\"),h=t(\"./circle\"),p=t(\"./circle_x\"),u=t(\"./circle_cross\"),f=t(\"./diamond\"),_=t(\"./diamond_cross\"),g=t(\"./gear\"),v=t(\"./image\"),y=t(\"./image_rgba\"),b=t(\"./image_url\"),w=t(\"./inverted_triangle\"),x=t(\"./line\"),k=t(\"./multi_line\"),C=t(\"./oval\"),S=t(\"./patch\"),T=t(\"./patches\"),d=t(\"./cross\"),A=t(\"./quad\"),D=t(\"./quadratic\"),M=t(\"./ray\"),E=t(\"./rect\"),O=t(\"./square\"),j=t(\"./square_x\"),R=t(\"./square_cross\"),P=t(\"./segment\"),N=t(\"./text\"),H=t(\"./triangle\"),I=t(\"./wedge\"),z=t(\"./x\"),m={annular_wedge:o.Model,annulus:s.Model,arc:a.Model,asterisk:l.Model,bezier:c.Model,circle:h.Model,circle_x:p.Model,circle_cross:u.Model,diamond:f.Model,diamond_cross:_.Model,gear:g.Model,image:v.Model,image_rgba:y.Model,image_url:b.Model,inverted_triangle:w.Model,line:x.Model,multi_line:k.Model,oval:C.Model,patch:S.Model,patches:T.Model,cross:d.Model,quad:A.Model,quadratic:D.Model,ray:M.Model,square:O.Model,square_x:j.Model,square_cross:R.Model,rect:E.Model,segment:P.Model,text:N.Model,triangle:H.Model,wedge:I.Model,x:z.Model},n=function(t){function n(){return L=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=function(t,e){var n,i,r;return null==(null!=(r=t.glyphspec)?r.type:void 0)?void console.log(\"missing glyph type\"):(i=t.glyphspec.type,i in m?new(n=m[i])(t,e):void console.log(\"unknown glyph type '\"+i+\"'\"))},n}(Backbone.Collection),{Collection:new n}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/guide/axis\",[\"underscore\",\"backbone\",\"common/safebind\",\"common/has_parent\",\"common/plot_widget\",\"renderer/properties\"],function(t,n,i,r,o,s){var a,l,c,h,u,p,d,f,_,g,m,v,y;return c=s.glyph_properties,h=s.line_properties,u=s.text_properties,_={top:{parallel:0,normal:-Math.PI/2,horizontal:0,vertical:-Math.PI/2},bottom:{parallel:0,normal:Math.PI/2,horizontal:0,vertical:Math.PI/2},left:{parallel:-Math.PI/2,normal:0,horizontal:0,vertical:-Math.PI/2},right:{parallel:Math.PI/2,normal:0,horizontal:0,vertical:Math.PI/2}},g={top:{parallel:\"alphabetic\",normal:\"middle\",horizontal:\"alphabetic\",vertical:\"middle\"},bottom:{parallel:\"hanging\",normal:\"middle\",horizontal:\"hanging\",vertical:\"middle\"},left:{parallel:\"alphabetic\",normal:\"middle\",horizontal:\"middle\",vertical:\"alphabetic\"},right:{parallel:\"alphabetic\",normal:\"middle\",horizontal:\"middle\",vertical:\"alphabetic\"}},p={top:{parallel:\"center\",normal:\"left\",horizontal:\"center\",vertical:\"left\"},bottom:{parallel:\"center\",normal:\"left\",horizontal:\"center\",vertical:\"right\"},left:{parallel:\"center\",normal:\"right\",horizontal:\"right\",vertical:\"center\"},right:{parallel:\"center\",normal:\"left\",horizontal:\"left\",vertical:\"center\"}},d={top:\"right\",bottom:\"left\",left:\"right\",right:\"left\"},f={top:\"left\",bottom:\"right\",left:\"right\",right:\"left\"},m=[{norm:{norm:{min:1,max:-1},flip:{min:-1,max:1}},flip:{norm:{min:1,max:-1},flip:{min:-1,max:1}}},{norm:{norm:{min:-1,max:1},flip:{min:-1,max:1}},flip:{norm:{min:1,max:-1},flip:{min:1,max:-1}}}],l=function(n){function r(){return v=r.__super__.constructor.apply(this,arguments)}return e(r,n),r.prototype.initialize=function(t){return r.__super__.initialize.call(this,t),this.rule_props=new h(this,null,\"axis_\"),this.major_tick_props=new h(this,null,\"major_tick_\"),this.minor_tick_props=new h(this,null,\"minor_tick_\"),this.major_label_props=new u(this,null,\"major_label_\"),this.axis_label_props=new u(this,null,\"axis_label_\")},r.prototype.render=function(){var t;return t=this.plot_view.ctx,t.save(),this._draw_rule(t),this._draw_major_ticks(t),this._draw_minor_ticks(t),this._draw_major_labels(t),this._draw_axis_label(t),t.restore()},r.prototype.bind_bokeh_events=function(){return i(this,this.model,\"change\",this.request_render)},r.prototype.padding_request=function(){return this._padding_request()},r.prototype._draw_rule=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d;if(this.rule_props.do_stroke){for(h=e=this.mget(\"rule_coords\"),a=h[0],l=h[1],u=this.plot_view.map_to_screen(a,\"data\",l,\"data\"),o=u[0],s=u[1],p=this.mget(\"normals\"),i=p[0],r=p[1],this.rule_props.set(t,this),t.beginPath(),t.moveTo(Math.round(o[0]),Math.round(s[0])),n=c=1,d=o.length;d>=1?d>c:c>d;n=d>=1?++c:--c)t.lineTo(Math.round(o[n]),Math.round(s[n]));return t.stroke()}},r.prototype._draw_major_ticks=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g;if(this.major_tick_props.do_stroke){for(e=this.mget(\"tick_coords\"),p=e.major,c=p[0],h=p[1],d=this.plot_view.map_to_screen(c,\"data\",h,\"data\"),o=d[0],s=d[1],f=this.mget(\"normals\"),i=f[0],r=f[1],a=this.mget(\"major_tick_in\"),l=this.mget(\"major_tick_out\"),this.major_tick_props.set(t,this),g=[],n=u=0,_=o.length;_>=0?_>u:u>_;n=_>=0?++u:--u)t.beginPath(),t.moveTo(Math.round(o[n]+i*l),Math.round(s[n]+r*l)),t.lineTo(Math.round(o[n]-i*a),Math.round(s[n]-r*a)),g.push(t.stroke());return g}},r.prototype._draw_minor_ticks=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g;if(this.minor_tick_props.do_stroke){for(e=this.mget(\"tick_coords\"),p=e.minor,c=p[0],h=p[1],d=this.plot_view.map_to_screen(c,\"data\",h,\"data\"),o=d[0],s=d[1],f=this.mget(\"normals\"),i=f[0],r=f[1],a=this.mget(\"minor_tick_in\"),l=this.mget(\"minor_tick_out\"),this.minor_tick_props.set(t,this),g=[],n=u=0,_=o.length;_>=0?_>u:u>_;n=_>=0?++u:--u)t.beginPath(),t.moveTo(Math.round(o[n]+i*l),Math.round(s[n]+r*l)),t.lineTo(Math.round(o[n]-i*a),Math.round(s[n]-r*a)),g.push(t.stroke());return g}},r.prototype._draw_major_labels=function(e){var n,i,r,o,s,a,l,c,h,u,p,d,f,g,m,v,y,b,w,x;for(i=this.mget(\"tick_coords\"),v=i.major,f=v[0],g=v[1],y=this.plot_view.map_to_screen(f,\"data\",g,\"data\"),p=y[0],d=y[1],b=this.mget(\"normals\"),a=b[0],l=b[1],r=this.mget(\"dimension\"),h=this.mget(\"side\"),c=this.mget(\"major_label_orientation\"),n=t.isString(c)?_[h][c]:-c,u=this._tick_extent()+this.mget(\"major_label_standoff\"),s=this.mget_obj(\"formatter\").format(i.major[r]),this.major_label_props.set(e,this),this._apply_location_heuristics(e,h,c),x=[],o=m=0,w=p.length;w>=0?w>m:m>w;o=w>=0?++m:--m)n?(e.translate(p[o]+a*u,d[o]+l*u),e.rotate(n),e.fillText(s[o],0,0),e.rotate(-n),x.push(e.translate(-p[o]-a*u,-d[o]-l*u))):x.push(e.fillText(s[o],Math.round(p[o]+a*u),Math.round(d[o]+l*u)));return x},r.prototype._draw_axis_label=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f;return n=this.mget(\"axis_label\"),null!=n?(p=this.mget(\"rule_coords\"),h=p[0],u=p[1],d=this.plot_view.map_to_screen(h,\"data\",u,\"data\"),l=d[0],c=d[1],f=this.mget(\"normals\"),i=f[0],r=f[1],s=this.mget(\"side\"),o=\"parallel\",e=_[s][o],a=this._tick_extent()+this._tick_label_extent()+this.mget(\"axis_label_standoff\"),l=(l[0]+l[l.length-1])/2,c=(c[0]+c[c.length-1])/2,this.axis_label_props.set(t,this),this._apply_location_heuristics(t,s,o),e?(t.translate(l+i*a,c+r*a),t.rotate(e),t.fillText(n,0,0),t.rotate(-e),t.translate(-l-i*a,-c-r*a)):t.fillText(n,l+i*a,c+r*a)):void 0},r.prototype._apply_location_heuristics=function(e,n,i){var r,o;return t.isString(i)?(o=g[n][i],r=p[n][i]):0===i?(o=g[n][i],r=p[n][i]):0>i?(o=\"middle\",r=d[n]):i>0&&(o=\"middle\",r=f[n]),e.textBaseline=o,e.textAlign=r},r.prototype._tick_extent=function(){return Math.max(this.mget(\"major_tick_out\"),this.mget(\"minor_tick_out\"))},r.prototype._tick_label_extent=function(){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,g,m,v,y;if(o=0,r=this.mget(\"dimension\"),i=this.mget(\"tick_coords\").major,p=this.mget(\"side\"),h=this.mget(\"major_label_orientation\"),c=this.mget_obj(\"formatter\").format(i[r]),this.major_label_props.set(this.plot_view.ctx,this),t.isString(h)?(s=1,e=_[p][h]):(s=2,e=-h),e=Math.abs(e),n=Math.cos(e),u=Math.sin(e),\"top\"===p||\"bottom\"===p)for(l=g=0,v=c.length;v>=0?v>g:g>v;l=v>=0?++g:--g)null!=c[l]&&(f=1.1*this.plot_view.ctx.measureText(c[l]).width,a=.9*this.plot_view.ctx.measureText(c[l]).ascent,d=f*u+a/s*n,d>o&&(o=d));else for(l=m=0,y=c.length;y>=0?y>m:m>y;l=y>=0?++m:--m)null!=c[l]&&(f=1.1*this.plot_view.ctx.measureText(c[l]).width,a=.9*this.plot_view.ctx.measureText(c[l]).ascent,d=f*n+a/s*u,d>o&&(o=d));return o>0&&(o+=this.mget(\"major_label_standoff\")),o},r.prototype._axis_label_extent=function(){var t,e,n,i,r,o,s,a;return n=0,s=this.mget(\"side\"),r=\"parallel\",this.major_label_props.set(this.plot_view.ctx,this),t=Math.abs(_[s][r]),e=Math.cos(t),o=Math.sin(t),this.mget(\"axis_label\")&&(n+=this.mget(\"axis_label_standoff\"),this.axis_label_props.set(this.plot_view.ctx,this),a=1.1*this.plot_view.ctx.measureText(this.mget(\"axis_label\")).width,i=.9*this.plot_view.ctx.measureText(this.mget(\"axis_label\")).ascent,n+=\"top\"===s||\"bottom\"===s?a*o+i*e:a*e+i*o),n},r.prototype._padding_request=function(){var e,n,i,r,o;return i={},r=this.mget(\"side\"),e=null!=(o=this.mget(\"location\"))?o:\"min\",t.isString(e)?(n=0,n+=this._tick_extent(),n+=this._tick_label_extent(),n+=this._axis_label_extent(),i[r]=n,i):i},r}(o),a=function(n){function i(){return y=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=l,i.prototype.type=\"Axis\",i.prototype.initialize=function(t,e){return i.__super__.initialize.call(this,t,e),this.register_property(\"computed_bounds\",this._bounds,!1),this.add_dependencies(\"computed_bounds\",this,[\"bounds\"]),this.register_property(\"rule_coords\",this._rule_coords,!1),this.add_dependencies(\"rule_coords\",this,[\"computed_bounds\",\"dimension\",\"location\"]),this.register_property(\"tick_coords\",this._tick_coords,!1),this.add_dependencies(\"tick_coords\",this,[\"computed_bounds\",\"dimension\",\"location\"]),this.register_property(\"normals\",this._normals,!0),this.add_dependencies(\"normals\",this,[\"computed_bounds\",\"dimension\",\"location\"]),this.register_property(\"side\",this._side,!1),this.add_dependencies(\"side\",this,[\"normals\"]),this.register_property(\"padding_request\",this._padding_request,!1),this.add_dependencies(\"computed_bounds\",this.get_obj(\"plot\"),[\"x_range\",\"y_range\"])},i.prototype._bounds=function(){var e,n,i,r,o,s,a,l;return n=this.get(\"dimension\"),i=(n+1)%2,o=[this.get_obj(\"plot\").get_obj(\"x_range\"),this.get_obj(\"plot\").get_obj(\"y_range\")],a=null!=(l=this.get(\"bounds\"))?l:\"auto\",r=[o[n].get(\"min\"),o[n].get(\"max\")],t.isArray(a)?Math.abs(a[0]-a[1])>Math.abs(r[0]-r[1])?(s=Math.max(Math.min(a[0],a[1]),r[0]),e=Math.min(Math.max(a[0],a[1]),r[1])):(s=Math.min(a[0],a[1]),e=Math.max(a[0],a[1])):(s=r[0],e=r[1]),[s,e]},i.prototype._rule_coords=function(){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_;return s=this.get(\"dimension\"),a=(s+1)%2,h=[this.get_obj(\"plot\").get_obj(\"x_range\"),this.get_obj(\"plot\").get_obj(\"y_range\")],c=h[s],i=h[a],f=this.get(\"computed_bounds\"),u=f[0],o=f[1],p=new Array(2),d=new Array(2),n=[p,d],r=i.get(\"start\"),e=i.get(\"end\"),l=null!=(_=this.get(\"location\"))?_:\"min\",t.isString(l)&&(\"left\"===l||\"bottom\"===l?l=e>r?\"start\":\"end\":(\"right\"===l||\"top\"===l)&&(l=e>r?\"end\":\"start\"),l=i.get(l)),n[s][0]=Math.max(u,c.get(\"min\")),n[s][1]=Math.min(o,c.get(\"max\")),n[s][0]>n[s][1]&&(n[s][0]=n[s][1]=0/0),n[a][0]=l,n[a][1]=l,n},i.prototype._tick_coords=function(){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P;if(s=this.get(\"dimension\"),l=(s+1)%2,v=[this.get_obj(\"plot\").get_obj(\"x_range\"),this.get_obj(\"plot\").get_obj(\"y_range\")],_=v[s],i=v[l],T=this.get(\"computed_bounds\"),y=T[0],o=T[1],b=this.get_obj(\"ticker\").get_ticks(y,o,_,{}),h=b.major,f=b.minor,r=i.get(\"start\"),e=i.get(\"end\"),c=null!=(A=this.get(\"location\"))?A:\"min\",t.isString(c)&&(\"left\"===c||\"bottom\"===c?c=e>r?\"start\":\"end\":(\"right\"===c||\"top\"===c)&&(c=e>r?\"end\":\"start\"),c=i.get(c)),w=[],x=[],n=[w,x],p=[],d=[],u=[p,d],\"FactorRange\"===_.type)for(a=k=0,D=h.length;D>=0?D>k:k>D;a=D>=0?++k:--k)n[s].push(h[a]),n[l].push(c);else{for(M=[_.get(\"min\"),_.get(\"max\")],m=M[0],g=M[1],a=C=0,E=h.length;E>=0?E>C:C>E;a=E>=0?++C:--C)h[a]<m||h[a]>g||(n[s].push(h[a]),n[l].push(c));for(a=S=0,P=f.length;P>=0?P>S:S>P;a=P>=0?++S:--S)f[a]<m||f[a]>g||(u[s].push(f[a]),u[l].push(c))}return{major:n,minor:u}},i.prototype._normals=function(){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_;return o=this.get(\"dimension\"),a=(o+1)%2,p=[this.get_obj(\"plot\").get_obj(\"x_range\"),this.get_obj(\"plot\").get_obj(\"y_range\")],u=p[o],n=p[a],f=this.get(\"computed_bounds\"),d=f[0],r=f[1],i=n.get(\"start\"),e=n.get(\"end\"),c=null!=(_=this.get(\"location\"))?_:\"min\",h=[0,0],t.isString(c)?(s=d>r?\"flip\":\"norm\",i>e?(l=\"flip\",\"left\"===c||\"bottom\"===c?c=\"max\":(\"top\"===c||\"right\"===c)&&(c=\"max\")):(l=\"norm\",\"left\"===c||\"bottom\"===c?c=\"min\":(\"top\"===c||\"right\"===c)&&(c=\"max\")),h[a]=m[o][s][l][c]):h[a]=0===o?Math.abs(c-i)<=Math.abs(c-e)?1:-1:Math.abs(c-i)<=Math.abs(c-e)?-1:1,h},i.prototype._side=function(){var t,e;return t=this.get(\"normals\"),-1===t[1]?e=\"top\":1===t[1]?e=\"bottom\":-1===t[0]?e=\"left\":1===t[0]&&(e=\"right\"),e},i.prototype.display_defaults=function(){return{level:\"overlay\",axis_line_color:\"black\",axis_line_width:1,axis_line_alpha:1,axis_line_join:\"miter\",axis_line_cap:\"butt\",axis_line_dash:[],axis_line_dash_offset:0,major_tick_in:2,major_tick_out:6,major_tick_line_color:\"black\",major_tick_line_width:1,major_tick_line_alpha:1,major_tick_line_join:\"miter\",major_tick_line_cap:\"butt\",major_tick_line_dash:[],major_tick_line_dash_offset:0,major_label_standoff:5,minor_tick_in:0,minor_tick_out:4,minor_tick_line_color:\"black\",minor_tick_line_width:1,minor_tick_line_alpha:1,minor_tick_line_join:\"miter\",minor_tick_line_cap:\"butt\",minor_tick_line_dash:[],minor_tick_line_dash_offset:0,major_label_standoff:5,major_label_orientation:\"horizontal\",major_label_text_font:\"helvetica\",major_label_text_font_size:\"10pt\",major_label_text_font_style:\"normal\",major_label_text_color:\"#444444\",major_label_text_alpha:1,major_label_text_align:\"center\",major_label_text_baseline:\"alphabetic\",axis_label:\"\",axis_label_standoff:5,axis_label_text_font:\"helvetica\",axis_label_text_font_size:\"16pt\",axis_label_text_font_style:\"normal\",axis_label_text_color:\"#444444\",axis_label_text_alpha:1,axis_label_text_align:\"center\",axis_label_text_baseline:\"alphabetic\"}},i}(r),{Model:a,View:l}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/categorical_ticker\",[\"backbone\",\"common/has_properties\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"CategoricalTicker\",n.prototype.get_ticks=function(t,e,n,i){var r;return r=i.desired_n_ticks,{major:n.get(\"factors\"),minor:[]}},n.prototype.defaults=function(){return n.__super__.defaults.call(this)},n}(n),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),{Model:i,Collection:new r}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/categorical_tick_formatter\",[\"backbone\",\"common/has_properties\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"CategoricalTickFormatter\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e)},n.prototype.format=function(t){return t},n}(n),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n.prototype.defaults=function(){return n.__super__.defaults.call(this)},n}(t.Collection),{Model:i,Collection:new r}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/guide/categorical_axis\",[\"backbone\",\"./axis\",\"range/factor_range\",\"ticking/categorical_ticker\",\"ticking/categorical_tick_formatter\"],function(t,n,i,r,o){var s,a,l,c,h,u;return l=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n}(n.View),a=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=l,n.prototype.type=\"CategoricalAxis\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),null==this.get_obj(\"ticker\")&&this.set_obj(\"ticker\",r.Collection.create()),null==this.get_obj(\"formatter\")?this.set_obj(\"formatter\",o.Collection.create()):void 0},n.prototype._bounds=function(){var t,e,n,i,r;return t=this.get(\"dimension\"),n=[this.get_obj(\"plot\").get_obj(\"x_range\"),this.get_obj(\"plot\").get_obj(\"y_range\")],i=null!=(r=this.get(\"bounds\"))?r:\"auto\",\"auto\"!==i&&console.log(\"Categorical Axes only support user_bounds='auto', ignoring\"),e=[n[t].get(\"min\"),n[t].get(\"max\")]},n}(n.Model),s=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(t.Collection),{Model:a,Collection:new s,View:l}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/abstract_ticker\",[\"underscore\",\"backbone\",\"common/has_properties\"],function(t,n,i){var r,o,s,a,l,c;return a=function(t){var e,n,i,r,o;return null===t?\"null\":null==t?\"undefined\":t.constructor===Array?(n=function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(a(e));return r}().join(\", \"),\"[\"+n+\"]\"):t.constructor===Object?(o=function(){var e;e=[];for(i in t)e.push(\"\"+i+\": \"+a(t[i]));return e}().join(\", \"),\"{\"+o+\"}\"):t.constructor===String?'\"'+t+'\"':t.constructor===Function?\"<Function: \"+t.name+\">\":(r=t.toString(),\"[object Object]\"===r?\"<\"+t.constructor.name+\">\":r)},s=6,r=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"AbstractTicker\",i.prototype.initialize=function(t,e){return i.__super__.initialize.call(this,t,e)\n",
        "                },i.prototype.get_ticks=function(t,e,n,i){var r;return r=i.desired_n_ticks,null==r&&(r=s),this.get_ticks_no_defaults(t,e,r)},i.prototype.get_ticks_no_defaults=function(e,n,i){var r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x;if(l=this.get_interval(e,n,i),d=Math.floor(e/l),r=Math.ceil(n/l),s=t.isNaN(d)||t.isNaN(r)?[]:t.range(d,r+1),_=function(){var t,e,n;for(n=[],t=0,e=s.length;e>t;t++)o=s[t],n.push(o*l);return n}(),p=this.get(\"num_minor_ticks\"),u=[],p>1){for(c=l/p,h=function(){var t,e;for(e=[],a=t=1;p>=1?p>=t:t>=p;a=p>=1?++t:--t)e.push(a*c);return e}(),m=0,b=h.length;b>m;m++)g=h[m],u.push(_[0]-g);for(v=0,w=_.length;w>v;v++)for(f=_[v],y=0,x=h.length;x>y;y++)g=h[y],u.push(f+g)}return{major:_,minor:u}},i.prototype.get_interval=void 0,i.prototype.get_min_interval=function(){return this.get(\"min_interval\")},i.prototype.get_max_interval=function(){return this.get(\"max_interval\")},i.prototype.toString=function(){var t,e,n,i;return t=typeof this,i=this.get(\"toString_properties\"),n=function(){var t,n,r;for(r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push(\"\"+e+\"=\"+a(this[e]));return r}.call(this).join(\", \"),\"\"+t+\"(\"+n+\")\"},i.prototype.get_ideal_interval=function(t,e,n){var i;return i=e-t,i/n},i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{toString_properties:[],num_minor_ticks:5})},i}(i),o=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new o}})}.call(this),function(){n(\"ticking/util\",[\"underscore\",\"backbone\"],function(t){var e,n,i,r,o,s,a,l,c,h,u;return i=1,s=1e3,r=60*s,n=60*r,e=24*n,o=30*e,a=365*e,l=function(e){var n;return n=t.min(t.range(e.length),function(t){return e[t]})},c=function(t){return new Date(t.getTime())},h=function(t){return t=c(t),t.setUTCDate(1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),t},u=function(t){return t=h(t),t.setUTCMonth(0),t},{argmin:l,copy_date:c,last_month_no_later_than:h,last_year_no_later_than:u,ONE_MILLI:i,ONE_SECOND:s,ONE_MINUTE:r,ONE_HOUR:n,ONE_DAY:e,ONE_MONTH:o,ONE_YEAR:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/adaptive_ticker\",[\"underscore\",\"backbone\",\"ticking/abstract_ticker\",\"ticking/util\"],function(t,n,i,r){var o,s,a,l,c,h,u;return a=r.argmin,l=function(t,e,n){return Math.max(e,Math.min(n,t))},c=function(t,e){return null==e&&(e=Math.E),Math.log(t)/Math.log(e)},o=function(n){function i(){return h=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"AdaptiveTicker\",i.prototype.initialize=function(e,n){var r,o;return i.__super__.initialize.call(this,e,n),r=t.last(this.get(\"mantissas\"))/this.get(\"base\"),o=t.first(this.get(\"mantissas\"))*this.get(\"base\"),this.extended_mantissas=t.flatten([r,this.get(\"mantissas\"),o]),this.base_factor=0===this.get(\"min_interval\")?1:this.get(\"min_interval\")},i.prototype.get_interval=function(t,e,n){var i,r,o,s,h,u,p,d,f;return o=e-t,h=this.get_ideal_interval(t,e,n),f=Math.floor(c(h/this.base_factor,this.get(\"base\"))),u=Math.pow(this.get(\"base\"),f)*this.base_factor,p=h/u,r=this.extended_mantissas,s=r.map(function(t){return Math.abs(n-o/(t*u))}),i=r[a(s)],d=i*u,l(d,this.get(\"min_interval\"),this.get(\"max_interval\"))},i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{toString_properties:[\"mantissas\",\"base\",\"min_magnitude\",\"max_magnitude\"],base:10,min_interval:0,max_interval:1/0})},i}(i.Model),s=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/composite_ticker\",[\"underscore\",\"backbone\",\"ticking/abstract_ticker\",\"ticking/util\"],function(t,n,i,r){var o,s,a,l,c;return a=r.argmin,o=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"CompositeTicker\",i.prototype.initialize=function(e,n){var r;return i.__super__.initialize.call(this,e,n),r=this.get(\"tickers\"),this.register_property(\"min_intervals\",function(){return t.invoke(r,\"get_min_interval\")},!0),this.add_dependencies(\"min_intervals\",this,[\"tickers\"]),this.register_property(\"max_intervals\",function(){return t.invoke(r,\"get_max_interval\")},!0),this.add_dependencies(\"max_intervals\",this,[\"tickers\"]),this.register_property(\"min_interval\",function(){return t.first(this.get(\"min_intervals\"))},!0),this.add_dependencies(\"min_interval\",this,[\"min_intervals\"]),this.register_property(\"max_interval\",function(){return t.first(this.get(\"max_intervals\"))},!0),this.add_dependencies(\"max_interval\",this,[\"max_interval\"])},i.prototype.get_best_ticker=function(e,n,i){var r,o,s,l,c,h,u,p;return l=n-e,h=this.get_ideal_interval(e,n,i),p=[t.sortedIndex(this.get(\"min_intervals\"),h)-1,t.sortedIndex(this.get(\"max_intervals\"),h)],u=[this.get(\"min_intervals\")[p[0]],this.get(\"max_intervals\")[p[1]]],c=u.map(function(t){return Math.abs(i-l/t)}),r=a(c),1/0===r?this.get(\"tickers\")[0]:(s=p[r],o=this.get(\"tickers\")[s])},i.prototype.get_interval=function(t,e,n){var i;return i=this.get_best_ticker(t,e,n),i.get_interval(t,e,n)},i.prototype.get_ticks_no_defaults=function(t,e,n){var i,r;return i=this.get_best_ticker(t,e,n),r=i.get_ticks_no_defaults(t,e,n)},i.prototype.defaults=function(){return i.__super__.defaults.call(this)},i}(i.Model),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/single_interval_ticker\",[\"underscore\",\"backbone\",\"ticking/abstract_ticker\"],function(t,n,i){var r,o,s,a;return r=function(n){function i(){return s=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"SingleIntervalTicker\",i.prototype.initialize=function(t,e){return i.__super__.initialize.call(this,t,e),this.register_property(\"min_interval\",function(){return this.get(\"interval\")},!0),this.add_dependencies(\"min_interval\",this,[\"interval\"]),this.register_property(\"max_interval\",function(){return this.get(\"interval\")},!0),this.add_dependencies(\"max_interval\",this,[\"interval\"])},i.prototype.get_interval=function(){return this.get(\"interval\")},i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{toString_properties:[\"interval\"]})},i}(i.Model),o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/days_ticker\",[\"underscore\",\"backbone\",\"ticking/single_interval_ticker\",\"ticking/util\"],function(t,n,i,r){var o,s,a,l,c,h,u,p;return l=r.copy_date,h=r.last_month_no_later_than,a=r.ONE_DAY,c=function(t,e){var n,i,r,o,s;for(s=h(new Date(t)),r=h(new Date(e)),o=l(r),r.setUTCMonth(r.getUTCMonth()+1),i=[],n=s;;)if(i.push(l(n)),n.setUTCMonth(n.getUTCMonth()+1),n>r)break;return i},o=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"DaysTicker\",i.prototype.initialize=function(t,e){var n,r;return t.num_minor_ticks=0,i.__super__.initialize.call(this,t,e),n=this.get(\"days\"),r=n.length>1?(n[1]-n[0])*a:31*a,this.set(\"interval\",r)},i.prototype.get_ticks_no_defaults=function(e,n){var i,r,o,s,a,h,u,p;return u=c(e,n),s=this.get(\"days\"),a=function(t,e){var n,i,r,o,a,c;for(n=[],a=0,c=s.length;c>a;a++)i=s[a],r=l(t),r.setUTCDate(i),o=new Date(r.getTime()+e/2),o.getUTCMonth()===t.getUTCMonth()&&n.push(r);return n},h=this.get(\"interval\"),o=t.flatten(function(){var t,e,n;for(n=[],t=0,e=u.length;e>t;t++)r=u[t],n.push(a(r,h));return n}()),i=t.invoke(o,\"getTime\"),p=t.filter(i,function(t){return t>=e&&n>=t}),{major:p,minor:[]}},i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{toString_properties:[\"days\"]})},i}(i.Model),s=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/months_ticker\",[\"underscore\",\"backbone\",\"ticking/single_interval_ticker\",\"ticking/util\"],function(t,n,i,r){var o,s,a,l,c,h,u,p;return l=r.copy_date,h=r.last_year_no_later_than,a=r.ONE_MONTH,c=function(t,e){var n,i,r,o;for(o=h(new Date(t)),r=h(new Date(e)),r.setUTCFullYear(r.getUTCFullYear()+1),i=[],n=o;;)if(i.push(l(n)),n.setUTCFullYear(n.getUTCFullYear()+1),n>r)break;return i},o=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"MonthsTicker\",i.prototype.initialize=function(t,e){var n,r;return i.__super__.initialize.call(this,t,e),r=this.get(\"months\"),n=r.length>1?(r[1]-r[0])*a:12*a,this.set(\"interval\",n)},i.prototype.get_ticks_no_defaults=function(e,n){var i,r,o,s,a,h,u;return u=c(e,n),s=this.get(\"months\"),a=function(t){return s.map(function(e){var n;return n=l(t),n.setUTCMonth(e),n})},o=t.flatten(function(){var t,e,n;for(n=[],t=0,e=u.length;e>t;t++)r=u[t],n.push(a(r));return n}()),i=t.invoke(o,\"getTime\"),h=t.filter(i,function(t){return t>=e&&n>=t}),{major:h,minor:[]}},i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{toString_properties:[\"months\"]})},i}(i.Model),s=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/basic_ticker\",[\"ticking/adaptive_ticker\"],function(t){var n,i,r,o;return n=function(t){function n(){return r=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"BasicTicker\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e)},n.prototype.defaults=function(){return _.extend(n.__super__.defaults.call(this),{mantissas:[1,2,5]})},n}(t.Model),i=function(t){function i(){return o=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.model=n,i}(Backbone.Collection),{Model:n,Collection:new i}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/years_ticker\",[\"underscore\",\"backbone\",\"ticking/basic_ticker\",\"ticking/single_interval_ticker\",\"ticking/util\"],function(t,n,i,r,o){var s,a,l,c,h,u;return c=o.last_year_no_later_than,s=o.ONE_YEAR,a=function(n){function r(){return h=r.__super__.constructor.apply(this,arguments)}return e(r,n),r.prototype.type=\"YearsTicker\",r.prototype.initialize=function(t,e){return r.__super__.initialize.call(this,t,e),this.set(\"interval\",s),this.basic_ticker=new i.Model({num_minor_ticks:0})},r.prototype.get_ticks_no_defaults=function(e,n,i){var r,o,s,a,l,h;return s=c(new Date(e)).getUTCFullYear(),o=c(new Date(n)).getUTCFullYear(),h=this.basic_ticker.get_ticks_no_defaults(s,o,i).major,r=function(){var t,e,n;for(n=[],t=0,e=h.length;e>t;t++)l=h[t],n.push(Date.UTC(l,0,1));return n}(),a=t.filter(r,function(t){return t>=e&&n>=t}),{major:a,minor:[]}},r.prototype.defaults=function(){return t.extend(r.__super__.defaults.call(this),{toString_properties:[\"years\"]})},r}(r.Model),l=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(n.Collection),{Model:a,Collection:new l}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/datetime_ticker\",[\"underscore\",\"ticking/adaptive_ticker\",\"ticking/composite_ticker\",\"ticking/days_ticker\",\"ticking/months_ticker\",\"ticking/years_ticker\",\"ticking/util\"],function(t,n,i,r,o,s,a){var l,c,h,u,p,d,f,_,g;return u=a.ONE_MILLI,f=a.ONE_SECOND,p=a.ONE_MINUTE,h=a.ONE_HOUR,d=a.ONE_MONTH,l=function(i){function a(){return _=a.__super__.constructor.apply(this,arguments)}return e(a,i),a.prototype.type=\"DatetimeTicker\",a.prototype.defaults=function(){return t.extend(a.__super__.defaults.call(this),{num_minor_ticks:0,tickers:[new n.Model({mantissas:[1,2,5],base:10,min_interval:0,max_interval:500*u,num_minor_ticks:0}),new n.Model({mantissas:[1,2,5,10,15,20,30],base:60,min_interval:f,max_interval:30*p,num_minor_ticks:0}),new n.Model({mantissas:[1,2,4,6,8,12],base:24,min_interval:h,max_interval:12*h,num_minor_ticks:0}),new r.Model({days:t.range(1,32)}),new r.Model({days:t.range(1,31,3)}),new r.Model({days:[1,8,15,22]}),new r.Model({days:[1,15]}),new o.Model({months:t.range(0,12,1)}),new o.Model({months:t.range(0,12,2)}),new o.Model({months:t.range(0,12,4)}),new o.Model({months:t.range(0,12,6)}),new s.Model({})]})},a}(i.Model),c=function(t){function n(){return g=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=l,n}(Backbone.Collection),{Model:l,Collection:new c}})}.call(this),function(t){n(\"sprintf\",[],function(){return function(){return function(t){function e(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function n(t,e){for(var n=[];e>0;n[--e]=t);return n.join(\"\")}var i=function(){return i.cache.hasOwnProperty(arguments[0])||(i.cache[arguments[0]]=i.parse(arguments[0])),i.format.call(null,i.cache[arguments[0]],arguments)};i.format=function(t,r){var o,s,a,l,c,h,u,p=1,d=t.length,f=\"\",_=[];for(s=0;d>s;s++)if(f=e(t[s]),\"string\"===f)_.push(t[s]);else if(\"array\"===f){if(l=t[s],l[2])for(o=r[p],a=0;a<l[2].length;a++){if(!o.hasOwnProperty(l[2][a]))throw i('[sprintf] property \"%s\" does not exist',l[2][a]);o=o[l[2][a]]}else o=l[1]?r[l[1]]:r[p++];if(/[^s]/.test(l[8])&&\"number\"!=e(o))throw i(\"[sprintf] expecting number but found %s\",e(o));switch(l[8]){case\"b\":o=o.toString(2);break;case\"c\":o=String.fromCharCode(o);break;case\"d\":o=parseInt(o,10);break;case\"e\":o=l[7]?o.toExponential(l[7]):o.toExponential();break;case\"f\":o=l[7]?parseFloat(o).toFixed(l[7]):parseFloat(o);break;case\"o\":o=o.toString(8);break;case\"s\":o=(o=String(o))&&l[7]?o.substring(0,l[7]):o;break;case\"u\":o>>>=0;break;case\"x\":o=o.toString(16);break;case\"X\":o=o.toString(16).toUpperCase()}o=/[def]/.test(l[8])&&l[3]&&o>=0?\"+\"+o:o,h=l[4]?\"0\"==l[4]?\"0\":l[4].charAt(1):\" \",u=l[6]-String(o).length,c=l[6]?n(h,u):\"\",_.push(l[5]?o+c:c+o)}return _.join(\"\")},i.cache={},i.parse=function(t){for(var e=t,n=[],i=[],r=0;e;){if(null!==(n=/^[^\\x25]+/.exec(e)))i.push(n[0]);else if(null!==(n=/^\\x25{2}/.exec(e)))i.push(\"%\");else{if(null===(n=/^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-fosuxX])/.exec(e)))throw\"[sprintf] huh?\";if(n[2]){r|=1;var o=[],s=n[2],a=[];if(null===(a=/^([a-z_][a-z_\\d]*)/i.exec(s)))throw\"[sprintf] huh?\";for(o.push(a[1]);\"\"!==(s=s.substring(a[0].length));)if(null!==(a=/^\\.([a-z_][a-z_\\d]*)/i.exec(s)))o.push(a[1]);else{if(null===(a=/^\\[(\\d+)\\]/.exec(s)))throw\"[sprintf] huh?\";o.push(a[1])}n[2]=o}else r|=2;if(3===r)throw\"[sprintf] mixing positional and named placeholders is not (yet) supported\";i.push(n)}e=e.substring(n[0].length)}return i};var r=function(t,e,n){return n=e.slice(0),n.splice(0,0,t),i.apply(null,n)};t.sprintf=i,t.vsprintf=r}(\"undefined\"!=typeof exports?exports:window),t.sprintf=sprintf}.apply(t,arguments)})}(this),!function(t){\"object\"==typeof module&&module.exports?module.exports=t():\"function\"==typeof n?n(\"timezone\",t):this.tz=t()}(function(){function t(t,e,n){var i,r=e.day[1];do i=new Date(Date.UTC(n,e.month,Math.abs(r++)));while(e.day[0]<7&&i.getUTCDay()!=e.day[0]);return i={clock:e.clock,sort:i.getTime(),rule:e,save:6e4*e.save,offset:t.offset},i[i.clock]=i.sort+6e4*e.time,i.posix?i.wallclock=i[i.clock]+(t.offset+e.saved):i.posix=i[i.clock]-(t.offset+e.saved),i}function e(e,n,i){var r,o,s,a,l,c,h,u=e[e.zone],p=[],d=new Date(i).getUTCFullYear(),f=1;for(r=1,o=u.length;o>r&&!(u[r][n]<=i);r++);if(s=u[r],s.rules){for(c=e[s.rules],h=d+1;h>=d-f;--h)for(r=0,o=c.length;o>r;r++)c[r].from<=h&&h<=c[r].to?p.push(t(s,c[r],h)):c[r].to<h&&1==f&&(f=h-c[r].to);for(p.sort(function(t,e){return t.sort-e.sort}),r=0,o=p.length;o>r;r++)i>=p[r][n]&&p[r][p[r].clock]>s[p[r].clock]&&(a=p[r])}return a&&(a.abbrev=(l=/^(.*)\\/(.*)$/.exec(s.format))?l[a.save?2:1]:s.format.replace(/%s/,a.rule.letter)),a||s}function n(t,n){return\"UTC\"==t.zone?n:(t.entry=e(t,\"posix\",n),n+t.entry.offset+t.entry.save)}function i(t,n){if(\"UTC\"==t.zone)return n;var i,r;return t.entry=i=e(t,\"wallclock\",n),r=n-i.wallclock,r>0&&r<i.save?null:n-i.offset-i.save}function r(t,e,r){var o,s=+(r[1]+1),a=r[2]*s,l=c.indexOf(r[3].toLowerCase());if(l>9)e+=a*u[l-10];else{if(o=new Date(n(t,e)),7>l)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=i(t,o.getTime()))&&(e=i(t,o.getTime()+864e5*s)-864e5*s)}return e}function o(t){if(!t.length)return\"0.0.23\";var e,o,s,a,l,c=Object.create(this),u=[];for(e=0;e<t.length;e++)if(a=t[e],Array.isArray(a))e||isNaN(a[1])?a.splice.apply(t,[e--,1].concat(a)):l=a;else if(isNaN(a)){if(s=typeof a,\"string\"==s)~a.indexOf(\"%\")?c.format=a:e||\"*\"!=a?!e&&(s=/^(\\d{4})-(\\d{2})-(\\d{2})(?:[T\\s](\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d+))?)?(Z|(([+-])(\\d{2}(:\\d{2}){0,2})))?)?$/.exec(a))?(l=[],l.push.apply(l,s.slice(1,8)),s[9]?(l.push(s[10]+1),l.push.apply(l,s[11].split(/:/))):s[8]&&l.push(1)):/^\\w{2,3}_\\w{2}$/.test(a)?c.locale=a:(s=h.exec(a))?u.push(s):c.zone=a:l=a;else if(\"function\"==s){if(s=a.call(c))return s}else if(/^\\w{2,3}_\\w{2}$/.test(a.name))c[a.name]=a;else if(a.zones){for(s in a.zones)c[s]=a.zones[s];for(s in a.rules)c[s]=a.rules[s]}}else e||(l=a);if(c[c.locale]||delete c.locale,c[c.zone]||delete c.zone,null!=l){if(\"*\"==l)l=c.clock();else if(Array.isArray(l)){for(o=!l[7],e=0;11>e;e++)l[e]=+(l[e]||0);--l[1],l=Date.UTC.apply(Date.UTC,l.slice(0,8))+-l[7]*(36e5*l[8]+6e4*l[9]+1e3*l[10])}else l=Math.floor(l);if(!isNaN(l)){if(o&&(l=i(c,l)),null==l)return l;for(e=0,o=u.length;o>e;e++)l=r(c,l,u[e]);return c.format?(s=new Date(n(c,l)),c.format.replace(/%([-0_^]?)(:{0,3})(\\d*)(.)/g,function(t,e,n,i,r){var o,a,h=\"0\";if(o=c[r]){for(t=String(o.call(c,s,l,e,n.length)),\"_\"==(e||o.style)&&(h=\" \"),a=\"-\"==e?0:o.pad||0;t.length<a;)t=h+t;for(a=\"-\"==e?0:i||o.pad;t.length<a;)t=h+t;\"N\"==r&&a<t.length&&(t=t.slice(0,a)),\"^\"==e&&(t=t.toUpperCase())}return t})):l}}return function(){return c.convert(arguments)}}function s(t,e){var n,i,r;return i=new Date(Date.UTC(t.getUTCFullYear(),0)),n=Math.floor((t.getTime()-i.getTime())/864e5),i.getUTCDay()==e?r=0:(r=7-i.getUTCDay()+e,8==r&&(r=1)),n>=r?Math.floor((n-r)/7)+1:0}function a(t){var e,n,i;return n=t.getUTCFullYear(),e=new Date(Date.UTC(n,0)).getUTCDay(),i=s(t,1)+(e>1&&4>=e?1:0),i?53!=i||4==e||3==e&&29==new Date(n,1,29).getDate()?[i,t.getUTCFullYear()]:[1,t.getUTCFullYear()+1]:(n=t.getUTCFullYear()-1,e=new Date(Date.UTC(n,0)).getUTCDay(),i=4==e||3==e&&29==new Date(n,1,29).getDate()?53:52,[i,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,n,i){var r,o,s=this.entry.offset+this.entry.save,a=Math.abs(s/1e3),l=[],c=3600;for(r=0;3>r;r++)l.push((\"0\"+Math.floor(a/c)).slice(-2)),a%=c,c/=60;return\"^\"!=n||s?(\"^\"==n&&(i=3),3==i?(o=l.join(\":\"),o=o.replace(/:00$/,\"\"),\"^\"!=n&&(o=o.replace(/:00$/,\"\"))):i?(o=l.slice(0,i+1).join(\":\"),\"^\"==n&&(o=o.replace(/:00$/,\"\"))):o=l.slice(0,2).join(\"\"),o=(0>s?\"-\":\"+\")+o,o=o.replace(/([-+])(0)/,{_:\" $1\",\"-\":\"$1\"}[n]||\"$1$2\")):\"Z\"},\"%\":function(){return\"%\"},n:function(){return\"\\n\"},t:function(){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(){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(\"|\")}}},c=\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|year|month|day|hour|minute|second|millisecond\",h=new RegExp(\"^\\\\s*([+-])(\\\\d+)\\\\s+(\"+c+\")s?\\\\s*$\",\"i\"),u=[36e5,6e4,1e3,1];return c=c.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(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/datetime_tick_formatter\",[\"underscore\",\"backbone\",\"common/has_properties\",\"sprintf\",\"timezone\"],function(t,n,i,r,o){var s,a,l,c,h,u,p,d,f,_;return _=function(t){return r(\"%3dus\",Math.floor(t%1*1e3))},h=function(t){var e,n;return e=Math.floor(t/1e3%1*1e3),n=Math.floor(t%1*1e3),r(\"%3d.%3dms\",e,n)},f=function(t){var e,n;return e=new Date(t),n=e.getFullYear(),e.getMonth()>=7&&(n+=1),r(\"'%02d\",n%100)},c=function(t){var e,n;return e=new Date(t),n=e.getFullYear(),e.getMonth()>=7&&(n+=1),r(\"%d\",n)},l=function(t){return o(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map(function(t){return parseInt(t,10)})},d=function(e,n){return t.isFunction(n)?n(e):o(e,n)},s=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"DatetimeTickFormatter\",i.prototype.format_order=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"],i.prototype._formats={microseconds:[_,h],milliseconds:[\"%3Nms\",\"%S.%3Ns\"],seconds:[\"%Ss\"],minsec:[\":%M:%S\"],minutes:[\":%M\",\"%Mm\"],hourmin:[\"%H:%M\"],hours:[\"%Hh\",\"%H:%M\"],days:[\"%m/%d\",\"%a%d\"],months:[\"%m/%Y\",\"%b%y\"],years:[\"%Y\",f,c]},i.prototype.strip_leading_zeros=!0,i.prototype.initialize=function(e,n){var r,s,a,l,c,h,u,p;i.__super__.initialize.call(this,e,n),r=t.extend({},this._formats,this.get(\"formats\")),c=o(new Date),this.formats={},p=[];for(s in r)l=r[s],h=function(){var t,e,n;for(n=[],t=0,e=l.length;e>t;t++)a=l[t],n.push(d(c,a).length);return n}(),u=t.sortBy(t.zip(h,l),function(t){var e,n;return n=t[0],e=t[1],n}),p.push(this.formats[s]=t.zip.apply(t,u));return p},i.prototype._get_resolution_str=function(t,e){var n,i;return n=1.1*t,i=.001>n?\"microseconds\":1>n?\"milliseconds\":60>n?e>=60?\"minsec\":\"seconds\":3600>n?e>=3600?\"hourmin\":\"minutes\":86400>n?\"hours\":2678400>n?\"days\":31536e3>n?\"months\":\"years\"},i.prototype.format=function(e,n,i,r,o){var s,a,c,h,u,p,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N;if(null==n&&(n=null),null==i&&(i=null),null==r&&(r=.3),null==o&&(o=null),0===e.length)return[];if(x=Math.abs(e[e.length-1]-e[0])/1e3,v=o?o.resolution:x/(e.length-1),y=this._get_resolution_str(v,x),R=this.formats[y],A=R[0],h=R[1],c=h[0],i){for(u=[],f=D=0,j=A.length;j>=0?j>D:D>j;f=j>=0?++D:--D)A[f]*e.length<r*i&&u.push(this.formats[f]);u.length>0&&(c=t.last(u))}for(_=[],b=this.format_order.indexOf(y),S={},N=this.format_order,M=0,P=N.length;P>M;M++)a=N[M],S[a]=0;for(S.seconds=5,S.minsec=4,S.minutes=4,S.hourmin=3,S.hours=3,E=0,O=e.length;O>E;E++){C=e[E];try{T=l(C),w=d(C,c)}catch(H){s=H,console.log(s),console.log(\"Unable to convert tick for timestamp \"+C),_.push(\"ERR\");continue}for(p=!1,m=b;0===T[S[this.format_order[m]]]&&(m+=1,m!==this.format_order.length);){if((\"minsec\"===y||\"hourmin\"===y)&&!p){if(\"minsec\"===y&&0===T[4]&&0!==T[5]||\"hourmin\"===y&&0===T[3]&&0!==T[4]){g=this.formats[this.format_order[b-1]][1][0],w=d(C,g);break}p=!0}g=this.formats[this.format_order[m]][1][0],w=d(C,g)}this.strip_leading_zeros?(k=w.replace(/^0+/g,\"\"),k===w||\"\"!==k&&isFinite(k[0])||(k=\"0\"+k),_.push(k)):_.push(w)}return _},i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{formats:{}})},i}(i),a=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n}(n.Collection),{Model:s,Collection:new a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/guide/datetime_axis\",[\"backbone\",\"./axis\",\"ticking/datetime_ticker\",\"ticking/datetime_tick_formatter\"],function(t,n,i,r){var o,s,a,l,c,h;return a=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n}(n.View),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=a,n.prototype.type=\"DatetimeAxis\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),null==this.get_obj(\"ticker\")&&this.set_obj(\"ticker\",i.Collection.create()),null==this.get_obj(\"formatter\")?this.set_obj(\"formatter\",r.Collection.create()):void 0},n}(n.Model),o=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n}(t.Collection),{Model:s,Collection:new o,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/guide/grid\",[\"underscore\",\"common/safebind\",\"common/has_parent\",\"renderer/properties\",\"common/plot_widget\"],function(t,n,i,r,o){var s,a,l,c,h,u,p;return c=r.line_properties,a=function(t){function i(){return h=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(t,e){return i.__super__.initialize.call(this,t,e),this.grid_props=new c(this,null,\"grid_\")},i.prototype.render=function(){var t;return t=this.plot_view.ctx,t.save(),this._draw_grids(t),t.restore()},i.prototype.bind_bokeh_events=function(){return n(this,this.model,\"change\",this.request_render)},i.prototype._draw_grids=function(t){var e,n,i,r,o,s,a,l,c,h,u;if(this.grid_props.do_stroke)for(l=this.mget(\"grid_coords\"),r=l[0],o=l[1],this.grid_props.set(t,this),e=s=0,c=r.length;c>=0?c>s:s>c;e=c>=0?++s:--s){for(h=this.plot_view.map_to_screen(r[e],\"data\",o[e],\"data\"),n=h[0],i=h[1],t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(i[0])),e=a=1,u=n.length;u>=1?u>a:a>u;e=u>=1?++a:--a)t.lineTo(Math.round(n[e]),Math.round(i[e]));t.stroke()}},i}(o),s=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=a,i.prototype.type=\"Grid\",i.prototype.initialize=function(t,e){return i.__super__.initialize.call(this,t,e),this.register_property(\"computed_bounds\",this._bounds,!1),this.add_dependencies(\"computed_bounds\",this,[\"bounds\"]),this.register_property(\"grid_coords\",this._grid_coords,!1),this.add_dependencies(\"grid_coords\",this,[\"computed_bounds\",\"dimension\",\"ticker\"])},i.prototype._bounds=function(){var e,n,i,r,o,s,a,l;return n=this.get(\"dimension\"),i=(n+1)%2,o=[this.get_obj(\"plot\").get_obj(\"x_range\"),this.get_obj(\"plot\").get_obj(\"y_range\")],a=null!=(l=this.get(\"bounds\"))?l:\"auto\",r=[o[n].get(\"min\"),o[n].get(\"max\")],t.isArray(a)?(s=Math.min(a[0],a[1]),e=Math.max(a[0],a[1]),s<r[0]?s=r[0]:s>r[1]&&(s=null),e>r[1]?e=r[1]:e<r[0]&&(e=null)):(s=r[0],e=r[1]),[s,e]},i.prototype._grid_coords=function(){var t,e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k;for(l=this.get(\"dimension\"),h=(l+1)%2,g=[this.get_obj(\"plot\").get_obj(\"x_range\"),this.get_obj(\"plot\").get_obj(\"y_range\")],_=g[l],r=g[h],x=this.get(\"computed_bounds\"),m=x[0],a=x[1],y=Math.min(m,a),a=Math.max(m,a),m=y,v=this.get_obj(\"axis\").get_obj(\"ticker\").get_ticks(m,a,_,{}).major,d=_.get(\"min\"),p=_.get(\"max\"),n=r.get(\"min\"),e=r.get(\"max\"),i=[[],[]],c=b=0,k=v.length;k>=0?k>b:b>k;c=k>=0?++b:--b)if(v[c]!==d&&v[c]!==p){for(o=[],s=[],t=2,f=w=0;t>=0?t>w:w>t;f=t>=0?++w:--w)u=n+(e-n)/(t-1)*f,o.push(v[c]),s.push(u);i[l].push(o),i[h].push(s)}return i},i.prototype.display_defaults=function(){return{level:\"underlay\",grid_line_color:\"#cccccc\",grid_line_width:1,grid_line_alpha:1,grid_line_join:\"miter\",grid_line_cap:\"butt\",grid_line_dash:[],grid_line_dash_offset:0}},i}(i),l=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n}(Backbone.Collection),{Model:s,Collection:new l,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/basic_tick_formatter\",[\"underscore\",\"backbone\",\"common/has_properties\"],function(t,n,i){var r,o,s,a;return r=function(n){function i(){return s=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"BasicTickFormatter\",i.prototype.initialize=function(t,e){return i.__super__.initialize.call(this,t,e),this.register_property(\"scientific_limit_low\",function(){return Math.pow(10,this.get(\"power_limit_low\"))},!0),this.add_dependencies(\"scientific_limit_low\",this,[\"power_limit_low\"]),this.register_property(\"scientific_limit_high\",function(){return Math.pow(10,this.get(\"power_limit_high\"))},!0),this.add_dependencies(\"scientific_limit_high\",this,[\"power_limit_high\"]),this.last_precision=3\n",
        "                },i.prototype.format=function(e){var n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x;if(0===e.length)return[];if(h=0,e.length>=2&&(h=Math.abs(e[1]-e[0])/1e4),o=!1,this.get(\"use_scientific\"))for(u=0,_=e.length;_>u;u++)if(a=e[u],l=Math.abs(a),l>h&&(l>=this.get(\"scientific_limit_high\")||l<=this.get(\"scientific_limit_low\"))){o=!0;break}if(s=this.get(\"precision\"),null==s||t.isNumber(s)){if(r=new Array(e.length),o)for(n=p=0,v=e.length;v>=0?v>p:p>v;n=v>=0?++p:--p)r[n]=e[n].toExponential(s||void 0);else for(n=d=0,y=e.length;y>=0?y>d:d>y;n=y>=0?++d:--d)r[n]=e[n].toFixed(s||void 0).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");return r}if(\"auto\"===s)for(r=new Array(e.length),c=f=b=this.last_precision;15>=b?15>=f:f>=15;c=15>=b?++f:--f){if(i=!0,o){for(n=g=0,w=e.length;w>=0?w>g:g>w;n=w>=0?++g:--g)if(r[n]=e[n].toExponential(c),n>0&&r[n]===r[n-1]){i=!1;break}if(i)break}else{for(n=m=0,x=e.length;x>=0?x>m:m>x;n=x>=0?++m:--m)if(r[n]=e[n].toFixed(c).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\"),n>0&&r[n]===r[n-1]){i=!1;break}if(i)break}if(i)return this.last_precision=c,r}return r},i.prototype.defaults=function(){return{precision:\"auto\",use_scientific:!0,power_limit_high:5,power_limit_low:-3}},i}(i),o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/guide/linear_axis\",[\"underscore\",\"backbone\",\"./axis\",\"ticking/basic_ticker\",\"ticking/basic_tick_formatter\"],function(t,n,i,r,o){var s,a,l,c,h,u;return l=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n}(i.View),a=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=l,n.prototype.type=\"LinearAxis\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),null==this.get_obj(\"ticker\")&&this.set_obj(\"ticker\",r.Collection.create()),null==this.get_obj(\"formatter\")?this.set_obj(\"formatter\",o.Collection.create()):void 0},n}(i.Model),s=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(n.Collection),{Model:a,Collection:new s,View:l}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/log_ticker\",[\"ticking/adaptive_ticker\"],function(t){var n,i,r,o,s;return r=function(t,e,n){var i,r;if(\"undefined\"==typeof e&&(e=t,t=0),\"undefined\"==typeof n&&(n=1),n>0&&t>=e||0>n&&e>=t)return[];for(r=[],i=t;n>0?e>i:i>e;)r.push(i),i+=n;return r},n=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"LogTicker\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e)},n.prototype.get_ticks_no_defaults=function(t,e,n){var i,o,s,a,l,c,h,u,p,d,f,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N;if(m=this.get(\"num_minor_ticks\"),g=[],0>=t&&(t=1),t>e&&(N=[e,t],t=N[0],e=N[1]),p=Math.log(t)/Math.log(10),h=Math.log(e)/Math.log(10),u=h-p,2>u){if(c=this.get_interval(t,e,n),v=Math.floor(t/c),i=Math.ceil(e/c),a=_.isNaN(v)||_.isNaN(i)?[]:_.range(v,i+1),w=function(){var t,e,n;for(n=[],t=0,e=a.length;e>t;t++)s=a[t],0!==s&&n.push(s*c);return n}(),m>1){for(d=c/m,f=function(){var t,e;for(e=[],l=t=1;m>=1?m>=t:t>=m;l=m>=1?++t:--t)e.push(l*d);return e}(),k=0,A=f.length;A>k;k++)x=f[k],g.push(w[0]-x);for(C=0,D=w.length;D>C;C++)for(b=w[C],S=0,M=f.length;M>S;S++)x=f[S],g.push(b+x)}}else if(y=Math.ceil(p),o=Math.floor(h),c=Math.ceil((o-y)/9),w=r(y,o,c),(o-y)%c===0&&(w=w.concat([o])),w=w.map(function(t){return Math.pow(10,t)}),m>1){for(d=Math.pow(10,c)/m,f=function(){var t,e;for(e=[],l=t=1;m>=1?m>=t:t>=m;l=m>=1?++t:--t)e.push(l*d);return e}(),T=0,E=f.length;E>T;T++)x=f[T],g.push(w[0]/x);for(R=0,P=w.length;P>R;R++)for(b=w[R],j=0,O=f.length;O>j;j++)x=f[j],g.push(b*x)}return{major:w,minor:g}},n.prototype.defaults=function(){return _.extend(n.__super__.defaults.call(this),{mantissas:[1,5]})},n}(t.Model),i=function(t){function i(){return s=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.model=n,i}(Backbone.Collection),{Model:n,Collection:new i}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"ticking/log_tick_formatter\",[\"underscore\",\"backbone\",\"common/has_properties\",\"ticking/basic_tick_formatter\"],function(t,n,i,r){var o,s,a,l;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"LogTickFormatter\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),this.basic_formatter=new r.Model},n.prototype.format=function(t){var e,n,i,r,o;if(0===t.length)return[];for(i=!1,n=new Array(t.length),e=r=0,o=t.length;o>=0?o>r:r>o;e=o>=0?++r:--r)if(n[e]=\"10^\"+Math.round(Math.log(t[e])/Math.log(10)),e>0&&n[e]===n[e-1]){i=!0;break}return i&&(n=this.basic_formatter.format(t)),n},n}(i),s=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/guide/log_axis\",[\"underscore\",\"backbone\",\"./axis\",\"ticking/log_ticker\",\"ticking/log_tick_formatter\"],function(t,n,i,r,o){var s,a,l,c,h,u;return l=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n}(i.View),a=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=l,n.prototype.type=\"LogAxis\",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),null==this.get_obj(\"ticker\")&&this.set_obj(\"ticker\",r.Collection.create()),null==this.get_obj(\"formatter\")?this.set_obj(\"formatter\",o.Collection.create()):void 0},n}(i.Model),s=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(n.Collection),{Model:a,Collection:new s,View:l}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"renderer/overlay/box_selection\",[\"underscore\",\"common/has_parent\",\"common/plot_widget\"],function(t,n,i){var r,o,s,a,l,c;return o=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){return this.selecting=!1,this.xrange=[null,null],this.yrange=[null,null],i.__super__.initialize.call(this,t),this.plot_view.$el.find(\".bokeh_canvas_wrapper\").append(this.$el)},i.prototype.boxselect=function(t,e){return this.xrange=t,this.yrange=e,this.request_render()},i.prototype.startselect=function(){return this.selecting=!0,this.xrange=[null,null],this.yrange=[null,null],this.request_render()},i.prototype.stopselect=function(){return this.selecting=!1,this.xrange=[null,null],this.yrange=[null,null],this.request_render()},i.prototype.bind_bokeh_events=function(){return this.toolview=this.plot_view.tools[this.mget(\"tool\").id],this.listenTo(this.toolview,\"boxselect\",this.boxselect),this.listenTo(this.toolview,\"startselect\",this.startselect),this.listenTo(this.toolview,\"stopselect\",this.stopselect)},i.prototype.render=function(){var e,n,i,r,o,s,a;return this.selecting?(o=this.xrange,a=this.yrange,t.any(t.map(o,t.isNullOrUndefined))||t.any(t.map(a,t.isNullOrUndefined))?void this.$el.removeClass(\"shading\"):(n=\"\",o?(r=this.plot_view.view_state.vx_to_sx(Math.min(o[0],o[1])),i=Math.abs(o[1]-o[0])):(r=0,i=this.plot_view.view_state.get(\"width\")),n+=\"; left:\"+r+\"px; width:\"+i+\"px; \",a?(s=this.plot_view.view_state.vy_to_sy(Math.max(a[0],a[1])),e=Math.abs(a[1]-a[0])):(s=0,e=this.plot_view.view_state.get(\"height\")),this.$el.addClass(\"shading\"),n+=\"top:\"+s+\"px; height:\"+e+\"px\",this.$el.attr(\"style\",n))):void this.$el.removeClass(\"shading\")},i}(i),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=o,n.prototype.type=\"BoxSelection\",n.prototype.defaults=function(){return{tool:null,level:\"overlay\"}},n}(n),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(Backbone.Collection),{Model:r,Collection:new s,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"source/column_data_source\",[\"underscore\",\"backbone\",\"common/has_properties\"],function(t,n,i){var r,o,s,a;return r=function(n){function i(){return s=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"ColumnDataSource\",i.prototype.initialize=function(t,e){return i.__super__.initialize.call(this,t,e),this.cont_ranges={},this.discrete_ranges={}},i.prototype.getcolumn=function(t){var e;return null!=(e=this.get(\"data\")[t])?e:null},i.prototype.getcolumn_with_default=function(t){\" returns the column, with any undefineds replaced with default\";var e;return null!=(e=this.get(\"data\")[t])?e:null},i.prototype.get_length=function(){var e;return e=this.get(\"data\"),e[t.keys(e)[0]].length},i.prototype.columns=function(){return t.keys(this.get(\"data\"))},i.prototype.datapoints=function(){var e,n,i,r,o,s,a,l,c,h;for(e=this.get(\"data\"),i=t.keys(e),s=[],r=a=0,h=e[i[0]].length;h>=0?h>a:a>h;r=h>=0?++a:--a){for(o={},l=0,c=i.length;c>l;l++)n=i[l],o[n]=e[n][r];s.push(o)}return s},i.prototype.defaults=function(){return i.__super__.defaults.call(this)},i}(i),o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new o}})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"source/server_data_source\",[\"underscore\",\"backbone\",\"common/has_properties\"],function(e,n,r){var o,s,a,l,c;return a=function(t){var e,n,i,r;return e=!1,r=null,i=!1,n=function(){return e?i?console.log(\"already bound, ignoreing\"):(console.log(\"busy, so doing it later\"),i=!0,r.done(function(){return i=!1,n()})):(console.log(\"executing\"),e=!0,r=t(),r.done(function(){return console.log(\"done, setting to false\"),e=!1,r=null}))}},o=function(n){function r(){return this.heatmap_update=t(this.heatmap_update,this),this.line1d_update=t(this.line1d_update,this),this.initialize=t(this.initialize,this),l=r.__super__.constructor.apply(this,arguments)}return i(r,n),r.prototype.type=\"ServerDataSource\",r.prototype.initialize=function(t,e){return r.__super__.initialize.call(this,t,e),this.callbacks={}},r.prototype.stoplistening_for_updates=function(t){var e,n,i,r,o;if(this.callbacks[t.get(\"id\")]){for(r=this.callbacks[t.get(\"id\")],o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(this.stopListening.apply(this,e));return o}},r.prototype.update_url=function(){var t,e,n;return t=this.get(\"owner_username\"),e=this.get_base().Config.prefix,n=\"\"+e+\"bokeh/data/\"+t+\"/\"+this.get(\"doc\")+\"/\"+this.get(\"id\")},r.prototype.listen_for_line1d_updates=function(t,n,i,r,o,s,a,l,c){var h,u,p;return u={screen_x:n,screen_y:i},this.stoplistening_for_updates(t),this.line1d_update(t,u,r,o,s,a,l,c),p=e.throttle(this.line1d_update,300),console.log(c),h=function(){return p(t,u,r,o,s,a,l,c)},this.listenTo(o,\"change\",h),this.listenTo(r,\"change\",h),this.callbacks[t.get(\"id\")]=[[o,\"change\",h],[r,\"change\",h]]},r.prototype.line1d_update=function(t,n,i,r,o,s,a,l){var c,h,u;return h=(r.get(\"end\")-r.get(\"start\"))/2,h=Math.floor(h),c=[i.get(\"start\"),i.get(\"end\")],e.any(e.map(c,function(t){return e.isNaN(t)}))&&(c=\"auto\"),console.log(l),u=[o,s,a,c,h,l],$.ajax({dataType:\"json\",url:this.update_url(),xhrField:{withCredentials:!0},success:function(e){return\"auto\"===c&&i.set({start:e.domain_limit[0],end:e.domain_limit[1],silent:!0}),t.set(\"data\",e.data)},data:{resample_parameters:JSON.stringify(u),plot_state:JSON.stringify(n)}})},r.prototype.listen_for_ar_updates=function(t,e,n,i,r,o,s){var l,c,h,u,p,d,f=this;for(h={data_x:r,data_y:o,screen_x:n,screen_y:i},this.stoplistening_for_updates(e),l=a(function(){return f.ar_update(t,e,h,s)}),l(),this.callbacks[e.get(\"id\")]=[],d=[r,o,n,i],u=0,p=d.length;p>u;u++)c=d[u],this.listenTo(c,\"change\",l),this.callbacks[e.get(\"id\")].push([c,\"change\",l]);return this.listenTo(this,\"change:index_slice\",l),this.callbacks[e.get(\"id\")].push([this,\"change:index_slice\",l]),this.listenTo(this,\"change:data_slice\",l),this.callbacks[e.get(\"id\")].push([this,\"change:data_slice\",l]),null},r.prototype.ar_update=function(t,n,i,r){var o,s;return o=\"not auto\",(t.x_range.get(\"start\")===t.x_range.get(\"end\")||t.y_range.get(\"start\")===t.y_range.get(\"end\"))&&(o=\"auto\"),s=$.ajax({dataType:\"json\",url:this.update_url(),xhrField:{withCredentials:!0},success:function(r){var s;return\"auto\"===o&&(i.data_x.set({start:r.x_range.start,end:r.x_range.end}),i.data_y.set({start:r.y_range.start,end:r.y_range.end})),s=e.clone(n.get(\"data\")),e.extend(s,r),n.set(\"data\",s),t.request_render()},data:{resample_parameters:JSON.stringify([r]),plot_state:JSON.stringify(i)}})},r.prototype.listen_for_heatmap_updates=function(t,e,n,i,r,o){var s,l,c,h,u,p,d=this;for(c={data_x:i,data_y:r,screen_x:e,screen_y:n},this.stoplistening_for_updates(t),s=a(function(){return d.heatmap_update(t,c,o)}),s(),this.callbacks[t.get(\"id\")]=[],p=[i,r,e,n],h=0,u=p.length;u>h;h++)l=p[h],this.listenTo(l,\"change\",s),this.callbacks[t.get(\"id\")].push([l,\"change\",s]);return this.listenTo(this,\"change:index_slice\",s),this.callbacks[t.get(\"id\")].push([this,\"change:index_slice\",s]),this.listenTo(this,\"change:data_slice\",s),this.callbacks[t.get(\"id\")].push([this,\"change:data_slice\",s]),null},r.prototype.heatmap_update=function(t,n,i){var r,o,s,a,l,c,h;return a=this.get(\"data\").global_x_range,l=this.get(\"data\").global_y_range,o=this.get(\"data\").global_offset_x[0],s=this.get(\"data\").global_offset_y[0],c=this.get(\"index_slice\"),r=this.get(\"data_slice\"),h=[a,l,o,s,c,r,this.get(\"transpose\"),i],$.ajax({dataType:\"json\",url:this.update_url(),xhrField:{withCredentials:!0},success:function(n){var i;return i=e.clone(t.get(\"data\")),e.extend(i,n),t.set(\"data\",i)},data:{resample_parameters:JSON.stringify(h),plot_state:JSON.stringify(n)}})},r}(r),s=function(t){function e(){return c=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=o,e}(n.Collection),{Model:o,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/tool\",[\"underscore\",\"common/plot_widget\",\"common/has_parent\"],function(t,n,i){var r,o,s,a;return o=function(n){function i(){return s=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t)},i.prototype.bind_bokeh_events=function(){var e,n,i,r,o=this;return e=this.plot_view.eventSink,i={eventBasename:this.cid,buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAADfSURBVEiJ1ZXhDYIwEEbfZxzADWQDR5ANXMFRHMERdBLZQDdQN9AJPv+gIajQClZ8SUNy6d0j5a7INikZJbUNVijpaQFLYAesa/FGxh1etgBOwCUqy3brKvflto9up7lWiND2KkAUJAxtmgK4Rh3dGxQyh5KwPQE2wKRle96LsI7tDJgCV0mHSry5WGjTvMi7f9cipl6Xwc/K5zwmqQ9hFMO82oYifIyH7TyFcPZJ0l8d6U+F+VeFMU3Si7DCOalQUgZskwlt74EFEddcl9/TsiJaS7qU8e7CPvnbOQzmBk+aLHum0l/aAAAAAElFTkSuQmCC\"},r=t.extend(i,this.evgen_options),n=new this.eventGeneratorClass(r),n.bind_bokeh_events(this.plot_view,e),t.each(this.tool_events,function(t,n){var i,r;return i=\"\"+o.cid+\":\"+n,r=function(e){return o[t](e)},e.on(i,r)}),this.evgen=n,{render:function(){}}},i}(n),r=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.display_defaults=function(){return{level:\"tool\"}},n}(i),{Model:r,View:o}})}.call(this),function(){n(\"tool/event_generators\",[],function(){var t,e,n,i;return i=function(t){var e,n,i;return n=$(t.currentTarget).offset(),e=null!=n?n.left:0,i=null!=n?n.top:0,t.bokehX=t.pageX-e,t.bokehY=t.pageY-i},n=function(){function t(t){this.restrict_to_innercanvas=t.restrict_to_innercanvas,this.options=t,this.toolName=this.options.eventBasename,this.dragging=!1,this.basepoint_set=!1,this.button_activated=!1,this.tool_active=!1}return t.prototype.bind_bokeh_events=function(t,e){var n,r=this;return n=this.toolName,this.plotview=t,this.eventSink=e,this.plotview.moveCallbacks.push(function(t){return r.dragging&&r.tool_active?(i(t),r.basepoint_set?(e.trigger(\"\"+n+\":UpdatingMouseMove\",t),t.preventDefault(),t.stopPropagation()):(r.dragging=!0,r.basepoint_set=!0,e.trigger(\"\"+n+\":SetBasepoint\",t))):void 0}),this.plotview.moveCallbacks.push(function(t,e,n){var o,s,a,l,c,h;if(r.dragging){if(i(t),o=r.plotview.view_state.get(\"inner_range_horizontal\"),s=r.plotview.view_state.get(\"inner_range_vertical\"),e=r.plotview.view_state.sx_to_vx(t.bokehX),n=r.plotview.view_state.sy_to_vy(t.bokehY),r.restrict_to_innercanvas?(l=o.get(\"start\"),a=o.get(\"end\"),h=s.get(\"start\"),c=s.get(\"end\")):(l=0,a=r.plotview.view_state.get(\"outer_width\"),h=0,c=r.plotview.view_state.get(\"outer_height\")),l>e||e>a)return r._stop_drag(t),!1;if(h>n||n>c)return r._stop_drag(t),!1}}),$(document).bind(\"keydown\",function(t){return 27===t.keyCode?e.trigger(\"clear_active_tool\"):void 0}),$(document).bind(\"keyup\",function(t){return t[r.options.keyName]?void 0:r._stop_drag(t)}),this.plotview.canvas_wrapper.bind(\"mousedown\",function(t){var e;return e=!1,r.button_activated||r.eventSink.active===r.toolName?e=!0:r.eventSink.active||(null!==r.options.keyName||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey?t[r.options.keyName]===!0&&(e=!0):e=!0),e?(r._start_drag(),!1):void 0}),this.plotview.canvas_wrapper.bind(\"mouseup\",function(t){return r.button_activated?(r._stop_drag(t),!1):void 0}),this.plotview.canvas_wrapper.bind(\"mouseleave\",function(t){return r.button_activated?(r._stop_drag(t),!1):void 0}),this.$tool_button=$(\"<button class='bk-toolbar-button' title='\"+this.options.buttonText+\"'><img class='bk-btn-icon' src='\"+this.options.buttonIcon+\"'/><span class='tip'>\"+this.options.buttonText+\"</span></button>\"),this.plotview,this.plotview.$el.find(\".bk-button-bar\").append(this.$tool_button),this.$tool_button.click(function(){return r.button_activated?e.trigger(\"clear_active_tool\"):e.trigger(\"active_tool\",n)}),e.on(\"\"+n+\":deactivated\",function(){return r.tool_active=!1,r.button_activated=!1,r.$tool_button.removeClass(\"active\")}),e.on(\"\"+n+\":activated\",function(){return r.tool_active=!0,r.$tool_button.addClass(\"active\"),r.button_activated=!0}),e},t.prototype.hide_button=function(){return this.$tool_button.hide()},t.prototype._start_drag=function(){return this._activated_with_button=this.button_activated,this.eventSink.trigger(\"active_tool\",this.toolName),this.dragging||(this.dragging=!0,this.button_activated||this.$tool_button.addClass(\"active\"),null==this.options.cursor)?void 0:this.plotview.canvas_wrapper.css(\"cursor\",this.options.cursor)},t.prototype._stop_drag=function(t){return this.basepoint_set=!1,this.dragging&&(this.dragging=!1,this._activated_with_button===!1&&this.options.auto_deactivate===!0&&this.eventSink.trigger(\"clear_active_tool\"),this.button_activated||this.$tool_button.removeClass(\"active\"),null!=this.options.cursor&&this.plotview.canvas_wrapper.css(\"cursor\",\"\"),i(t),this.eventSink.trigger(\"\"+this.options.eventBasename+\":DragEnd\",t)),this._activated_with_button=null},t}(),e=function(){function t(t){this.options=t,this.toolName=this.options.eventBasename,this.dragging=!1,this.basepoint_set=!1,this.button_activated=!1,this.tool_active=!1}return t.prototype.bind_bokeh_events=function(t,e){var n,r,o,s=this;return o=this.toolName,this.plotview=t,this.eventSink=e,this.plotview.canvas_wrapper.bind(\"mousewheel\",function(t,n){return s.tool_active||!s.eventSink.active&&t.shiftKey?(i(t),t.delta=n,e.trigger(\"\"+o+\":zoom\",t),t.preventDefault(),t.stopPropagation()):void 0}),$(document).bind(\"keydown\",function(t){return 27===t.keyCode?e.trigger(\"clear_active_tool\"):void 0}),this.plotview.$el.bind(\"mousein\",function(){return e.trigger(\"clear_active_tool\")}),this.plotview.$el.bind(\"mouseover\",function(){return s.mouseover_count+=1}),this.$tool_button=$(\"<button class='bk-toolbar-button' title='\"+this.options.buttonText+\"'><img class='bk-btn-icon' src='\"+this.options.buttonIcon+\"'/><span class='tip'>\"+this.options.buttonText+\"</span></button>\"),this.plotview.$el.find(\".bk-button-bar\").append(this.$tool_button),this.$tool_button.click(function(){return s.button_activated?e.trigger(\"clear_active_tool\"):(e.trigger(\"active_tool\",o),s.button_activated=!0)}),n=function(t){return t.setAttribute(\"old_overflow\",t.style.overflow),t.style.overflow=\"hidden\",t!==document.body?n(t.parentNode):void 0},r=function(t){return t.style.overflow=t.getAttribute(\"old_overflow\"),t!==document.body?r(t.parentNode):void 0},e.on(\"\"+o+\":deactivated\",function(){return s.tool_active=!1,s.button_activated=!1,s.$tool_button.removeClass(\"active\"),document.body.style.overflow=s.old_overflow}),e.on(\"\"+o+\":activated\",function(){return s.tool_active=!0,s.$tool_button.addClass(\"active\")}),e},t.prototype.hide_button=function(){return this.$tool_button.hide()},t}(),t=function(){function t(t){this.options=t,this.toolName=this.options.eventBasename,this.button_activated=!1,this.tool_active=!1}return t.prototype.bind_bokeh_events=function(t,e){var n,i,r,o=this;return r=this.toolName,this.plotview=t,this.eventSink=e,$(document).bind(\"keydown\",function(t){return 27===t.keyCode?e.trigger(\"clear_active_tool\"):void 0}),this.plotview.$el.bind(\"mouseover\",function(){return o.mouseover_count+=1}),this.$tool_button=$(\"<button class='bk-toolbar-button' title='\"+this.options.buttonText+\"'><img class='bk-btn-icon' src='\"+this.options.buttonIcon+\"'/><span class='tip'>\"+this.options.buttonText+\"</span></button>\"),this.plotview.$el.find(\".bk-button-bar\").append(this.$tool_button),this.$tool_button.click(function(){return o.button_activated?e.trigger(\"clear_active_tool\"):(e.trigger(\"active_tool\",r),o.button_activated=!0)}),n=function(t){return t.setAttribute(\"old_overflow\",t.style.overflow),t.style.overflow=\"hidden\",t!==document.body?n(t.parentNode):void 0},i=function(t){return t.style.overflow=t.getAttribute(\"old_overflow\"),t!==document.body?i(t.parentNode):void 0},e.on(\"\"+r+\":deactivated\",function(){return o.tool_active=!1,o.button_activated=!1,o.$tool_button.removeClass(\"active\"),document.body.style.overflow=o.old_overflow}),e.on(\"\"+r+\":activated\",function(){return o.tool_active=!0,o.$tool_button.addClass(\"active\")}),e},t.prototype.hide_button=function(){return this.$tool_button.hide()},t}(),{TwoPointEventGenerator:n,OnePointWheelEventGenerator:e,ButtonEventGenerator:t}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/box_select_tool\",[\"underscore\",\"backbone\",\"./tool\",\"./event_generators\"],function(n,i,r,o){var s,a,l,c,h,u,p;return c=o.TwoPointEventGenerator,a=function(i){function r(){return h=r.__super__.constructor.apply(this,arguments)}return e(r,i),r.prototype.initialize=function(t){return r.__super__.initialize.call(this,t),this.select_every_mousemove=this.mget(\"select_every_mousemove\")},r.prototype.bind_bokeh_events=function(){var t,e,n,i,o,s;for(r.__super__.bind_bokeh_events.call(this),o=this.mget_obj(\"renderers\"),s=[],n=0,i=o.length;i>n;n++)t=o[n],e=this.plot_view.renderers[t.id],this.listenTo(e.xrange(),\"change\",this.select_callback),this.listenTo(e.yrange(),\"change\",this.select_callback),s.push(this.listenTo(t,\"change\",this.select_callback));return s},r.prototype.eventGeneratorClass=c,r.prototype.toolType=\"BoxSelectTool\",r.prototype.evgen_options={keyName:\"shiftKey\",buttonText:\"Select\",buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAE1SURBVEiJ7ZXNUcQwDIU/7VDA3rnkQAF0QEpJCZSQEihhSxEFMLMlmA44cH8col2CsVlCfmYPvJlMLMnjJ8mSbJLYErtN2a6BsAPczM5roAvZJ9ruS4Q3BV0a/X0ke7anZvMgLcLGRRMeLoZSQe6yDZ2kpwWIXFIxpfkdNlRyPxEPwL7mzfhrap5NgaRW0j47G0nbt0XuQS/JFzhTEeXFCBNwnEsIPANvJcN/W/wV19MWpVk6G2bmQfzNVnotZt1h1IHXaiGPMDG/LRqGOyziC6GZHWaSXYRlee6A1sw6SQ2Dt8nMkqQ2nPKCrePzDbwDboF34CV0R+ARKI42hb6PEdWHrB9sJ7kGP3EsMmki+jbEluEOX4FD6NJ5PY5wCYyidf1ieK+ONRrf459KxrxKV8fmKf0AQEJj/A0qfJ8AAAAASUVORK5CYII=\",cursor:\"crosshair\",restrict_to_innercanvas:!0},r.prototype.tool_events={SetBasepoint:\"_start_selecting\",UpdatingMouseMove:\"_selecting\",deactivated:\"_stop_selecting\",DragEnd:\"_dragend\"},r.prototype.pause=function(){return null},r.prototype.view_coords=function(t,e){var n,i,r;return r=[this.plot_view.view_state.sx_to_vx(t),this.plot_view.view_state.sy_to_vy(e)],n=r[0],i=r[1],[n,i]},r.prototype._stop_selecting=function(){return this.trigger(\"stopselect\"),this.basepoint_set=!1,this.plot_view.unpause()},r.prototype._start_selecting=function(t){var e,n,i;return this.plot_view.pause(),this.trigger(\"startselect\"),i=this.view_coords(t.bokehX,t.bokehY),e=i[0],n=i[1],this.mset({start_vx:e,start_vy:n,current_vx:null,current_vy:null}),this.basepoint_set=!0},r.prototype._get_selection_range=function(){var t,e,i;return this.mget(\"select_x\")?(e=[this.mget(\"start_vx\"),this.mget(\"current_vx\")],e=[n.min(e),n.max(e)]):(t=this.plot_view.view_state.get(\"inner_range_horizontal\"),e=[t.get(\"start\"),t.get(\"end\")]),this.mget(\"select_y\")?(i=[this.mget(\"start_vy\"),this.mget(\"current_vy\")],i=[n.min(i),n.max(i)]):(t=this.plot_view.view_state.get(\"inner_range_vertical\"),i=[t.get(\"start\"),t.get(\"end\")]),[e,i]},r.prototype._selecting=function(t){var e,n,i,r;return i=this.view_coords(t.bokehX,t.bokehY),e=i[0],n=i[1],this.mset({current_vx:e,current_vy:n}),r=this._get_selection_range(),this.xrange=r[0],this.yrange=r[1],this.trigger(\"boxselect\",this.xrange,this.yrange),this.select_every_mousemove&&this._select_data(),this.plot_view.render_overlays(!0),null},r.prototype._dragend=function(){return this._select_data()},r.prototype._select_data=function(){var e,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m;if(this.basepoint_set){for(a={type:\"rect\",vx0:this.xrange[0],vx1:this.xrange[1],vy0:this.yrange[0],vy1:this.yrange[1]},o={},r={},g=this.mget_obj(\"renderers\"),p=0,f=g.length;f>p;p++)c=g[p],e=c.get_obj(\"data_source\"),o[e.id]=e;for(m=this.mget_obj(\"renderers\"),d=0,_=m.length;_>d;d++)c=m[d],i=c.get_obj(\"data_source\").id,n.setdefault(r,i,[]),h=this.plot_view.renderers[c.id].hit_test(a),r[i].push(h);for(l in r)t.call(r,l)&&(u=r[l],h=n.intersection.apply(n,u),s=o[l],s.save({selected:h},{patch:!0}),this.plot_view.unpause());return null}},r}(r.View),s=function(t){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.default_view=a,i.prototype.type=\"BoxSelectTool\",i.prototype.defaults=function(){return n.extend(i.__super__.defaults.call(this),{renderers:[],select_x:!0,select_y:!0,select_every_mousemove:!1,data_source_options:{}})},i.prototype.display_defaults=function(){return i.__super__.display_defaults.call(this)},i}(r.Model),l=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n}(i.Collection),{Model:s,Collection:new l,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/box_zoom_tool\",[\"underscore\",\"backbone\",\"./tool\",\"./event_generators\"],function(t,n,i,r){var o,s,a,l,c,h,u;return l=r.TwoPointEventGenerator,s=function(n){function i(){return c=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t)},i.prototype.bind_bokeh_events=function(){return i.__super__.bind_bokeh_events.call(this)},i.prototype.eventGeneratorClass=l,i.prototype.toolType=\"BoxZoomTool\",i.prototype.evgen_options={keyName:\"ctrlKey\",buttonText:\"Box Zoom\",buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAFKSURBVEiJ7ZZhecMgEIZhzwRUAhIigTmYhEiJg0mIhElAQiWkDlIH737saCnlgLTNr+37UyjHvbl8XBILGGut2VPAZfy2K6mgPwbkV0HGkzL/zPY4YAZWrlqAL+BgjLk9I6mhQMgT1gSM1LUCQ+QAt8AtAnyWeJL/vFSXrrkiUDa5TmDIq8jWhwQ6a0AA3wFzSbKxEhcrXTVgKF1tIdHldvbGReB7GmCt/WjBnlXeFr0enpI9tVPt5fecQtJxl4cSu0j8gvRbtj5w7U310HR5KLHxQRChoxwmJ2sRprdFr2g3fNQa75hWYdPDDLbK/LsAm9NcGhAqHhZgQ7buNUs2e9iCtbTJw2dhKlDzEDgK7NjyuHChvgYseggc5BDc9VsDGICpBlQ9fETNCvdUBD76LO2FjHcWFTxsfdO05sg8vpqmtELL/4fwi/UDzP86Q6mEI4kAAAAASUVORK5CYII=\",cursor:\"crosshair\",auto_deactivate:!0,restrict_to_innercanvas:!0},i.prototype.tool_events={SetBasepoint:\"_start_selecting\",UpdatingMouseMove:\"_selecting\",DragEnd:\"_dragend\"},i.prototype.pause=function(){return null},i.prototype.view_coords=function(t,e){var n,i,r;return r=[this.plot_view.view_state.sx_to_vx(t),this.plot_view.view_state.sy_to_vy(e)],n=r[0],i=r[1],[n,i]},i.prototype._start_selecting=function(t){var e,n,i;return this.plot_view.pause(),this.trigger(\"startselect\"),i=this.view_coords(t.bokehX,t.bokehY),e=i[0],n=i[1],this.mset({start_vx:e,start_vy:n,current_vx:null,current_vy:null}),this.basepoint_set=!0},i.prototype._get_selection_range=function(){var e,n;return this.mget(\"select_x\")?(e=[this.mget(\"start_vx\"),this.mget(\"current_vx\")],e=[t.min(e),t.max(e)]):e=null,this.mget(\"select_y\")?(n=[this.mget(\"start_vy\"),this.mget(\"current_vy\")],n=[t.min(n),t.max(n)]):n=null,[e,n]},i.prototype._selecting=function(t){var e,n,i,r;return i=this.view_coords(t.bokehX,t.bokehY),e=i[0],n=i[1],this.mset({current_vx:e,current_vy:n}),r=this._get_selection_range(),this.xrange=r[0],this.yrange=r[1],this.trigger(\"boxselect\",this.xrange,this.yrange),this.plot_view.render_overlays(!0),null},i.prototype._dragend=function(){return this._select_data(),this.basepoint_set=!1,this.plot_view.unpause(),this.trigger(\"stopselect\")},i.prototype._select_data=function(){var t,e,n,i,r,o,s;if(this.basepoint_set)return o=this.plot_view.xmapper.v_map_from_target([this.xrange[0],this.xrange[1]]),e=o[0],t=o[1],s=this.plot_view.ymapper.v_map_from_target([this.yrange[0],this.yrange[1]]),i=s[0],n=s[1],r={xr:{start:e,end:t},yr:{start:i,end:n}},this.plot_view.update_range(r)},i}(i.View),o=function(n){function i(){return h=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=s,i.prototype.type=\"BoxZoomTool\",i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{renderers:[],select_x:!0,select_y:!0,select_every_mousemove:!1,data_source_options:{}})},i.prototype.display_defaults=function(){return i.__super__.display_defaults.call(this)},i}(i.Model),a=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new a,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);\n",
        "                return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/click_tool\",[\"underscore\",\"backbone\",\"./tool\"],function(t,n,i){var r,o,s,a,l,c;return o=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t),this.listenTo(this,\"clicked\",function(t,e){return console.log(t,e)}),this.active=!1},i.prototype.view_coords=function(t,e){var n,i,r;return r=[this.plot_view.view_state.sx_to_vx(t),this.plot_view.view_state.sy_to_vy(e)],n=r[0],i=r[1],[n,i]},i.prototype.bind_bokeh_events=function(){var t,e=this;return t=\"click_tool\",this.mget(\"always_active\")||(this.tool_button=$(\"<button class='bk-toolbar-button'> Click </button>\"),this.plot_view.$el.find(\".bk-button-bar\").append(this.tool_button),this.tool_button.click(function(){return e.active?e.plot_view.eventSink.trigger(\"clear_active_tool\"):e.plot_view.eventSink.trigger(\"active_tool\",t)}),this.plot_view.eventSink.on(\"\"+t+\":deactivated\",function(){return e.active=!1,e.tool_button.removeClass(\"active\")}),this.plot_view.eventSink.on(\"\"+t+\":activated\",function(){return e.active=!0,e.tool_button.addClass(\"active\")})),this.plot_view.canvas.bind(\"mousedown\",function(t){return e.active||e.mget(\"always_active\")?(e.start_posx=t.pageX,e.start_posy=t.pageY):void 0}),this.plot_view.canvas.bind(\"mouseup\",function(t){var n,i,r,o,s,a;if((e.active||e.mget(\"always_active\"))&&e.start_posx===t.pageX&&e.start_posy===t.pageY)return i=$(t.currentTarget).offset(),n=null!=i?i.left:0,r=null!=i?i.top:0,t.bokehX=t.pageX-n,t.bokehY=t.pageY-r,a=e.view_coords(t.bokehX,t.bokehY),o=a[0],s=a[1],e._select(o,s,t)}),this.plot_view.canvas_wrapper.css(\"cursor\",\"crosshair\")},i.prototype._select=function(e,n){var i,r,o,s,a,l,c,h,u,p,d,f,_,g,m;for(l={type:\"point\",vx:e,vy:n},p=this.plot_view.xmapper.map_from_target(e),d=this.plot_view.ymapper.map_from_target(n),s={},o={},h=this.mget(\"renderers\"),f=0,g=h.length;g>f;f++)c=h[f],i=c.get_obj(\"data_source\"),s[i.id]=i;for(_=0,m=h.length;m>_;_++)c=h[_],r=c.get_obj(\"data_source\").id,t.setdefault(o,r,[]),u=this.plot_view.renderers[c.id].hit_test(l),a=s[r],null!==u&&0!==u.length&&this.trigger(\"clicked\",u,a);return null},i}(i.View),r=function(n){function i(){return l=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=o,i.prototype.type=\"ClickTool\",i.prototype.initialize=function(t,e){var n,r,o,s;return i.__super__.initialize.call(this,t,e),r=this.get(\"names\"),n=this.get_obj(\"plot\").get_obj(\"renderers\"),s=function(){var t,e,i;for(i=[],t=0,e=n.length;e>t;t++)o=n[t],\"Glyph\"===o.type&&i.push(o);return i}(),r.length>0&&(s=function(){var t,e,n;for(n=[],t=0,e=s.length;e>t;t++)o=s[t],r.indexOf(o.get(\"name\"))>=0&&n.push(o);return n}()),this.set(\"renderers\",s)},i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{renderers:[],names:[],always_active:[]})},i.prototype.display_defaults=function(){return i.__super__.display_defaults.call(this)},i}(i.Model),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new s,View:o}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/crosshair_tool\",[\"underscore\",\"backbone\",\"./tool\",\"./event_generators\",\"sprintf\"],function(t,n,i,r,o){var s,a,l,c,h,u,p;return c=r.TwoPointEventGenerator,a=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.active=!1},n.prototype.bind_events=function(t){return n.__super__.bind_events.call(this,t)},n.prototype.eventGeneratorClass=c,n.prototype.toolType=\"CrosshairTool\",n.prototype.evgen_options={keyName:\"\",buttonText:\"Crosshair\",cursor:\"crosshair\"},n.prototype.tool_events={activated:\"_activate\",deactivated:\"_deactivate\",UpdatingMouseMove:\"_drag\",SetBasepoint:\"_set_base_point\"},n.prototype.render=function(){var t,e,n,i;if(this.active)return e=this.plot_view.ctx,n=this.plot_view.view_state.get(\"canvas_width\"),t=this.plot_view.view_state.get(\"canvas_height\"),i=1,e.save(),e.strokeStyle=\"red\",e.globalAlpha=.7,e.lineWidth=i,e.setLineDash([]),e.beginPath(),e.moveTo(0,this.y),e.lineTo(n,this.y),console.log(this.x,this.y),e.moveTo(this.x,0),e.lineTo(this.x,t),e.stroke(),e.restore()},n.prototype.mouse_coords=function(t,e,n){return[e,n]},n.prototype._activate=function(){var t,e,n;if(!this.active)return this.active=!0,this.popup=$('<div class=\"resize_popup pull-right\"\\nstyle=\"border-radius: 10px; background-color: lightgrey; padding:3px 8px; font-size: 14px;\\nposition:absolute; right:20px; top: 20px; \"></div>'),t=this.plot_view.$el.find(\".bokeh_canvas_wrapper\"),this.popup.appendTo(t),e=this.plot_view.view_state.get(\"outer_height\"),n=this.plot_view.view_state.get(\"outer_width\"),this.popup.text(\"x: 0 y:0\"),this.plot_view.$el.css(\"cursor\",\"crosshair\"),null},n.prototype._deactivate=function(){return this.active=!1,this.plot_view.$el.css(\"cursor\",\"default\"),this.popup.remove(),this.request_render(),this.plot_view.request_render(),null},n.prototype._set_base_point=function(t){var e;return e=this.mouse_coords(t,t.bokehX,t.bokehY),this.x=e[0],this.y=e[1],null},n.prototype._drag=function(t){var e,n,i;return this.plot_view.pause(),i=this.mouse_coords(t,t.bokehX,t.bokehY),this.x=i[0],this.y=i[1],e=o(\"%.4f\",this.plot_view.xmapper.map_from_target(x)),n=o(\"%.4f\",this.plot_view.ymapper.map_from_target(y)),this.popup.text(\"x: \"+e+\" y: \"+n),this.request_render(),this.plot_view.request_render(),this.plot_view.unpause(!0),null},n}(i.View),s=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=a,n.prototype.type=\"CrosshairTool\",n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(i.Model),l=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n}(n.Collection),{Model:s,Collection:new l,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/data_range_box_select_tool\",[\"underscore\",\"backbone\",\"./box_select_tool\"],function(t,n,i){var r,o,s,a,l,c;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.bind_bokeh_events=function(){return tool.ToolView.prototype.bind_bokeh_events.call(this)},n.prototype._select_data=function(){var t,e,n,i,r,o;return r=this.plot_view.mapper.map_from_target(this.xrange[0],this.yrange[0]),e=r[0],i=r[1],o=this.plot_view.mapper.map_from_target(this.xrange[1],this.yrange[1]),t=o[0],n=o[1],this.mset(\"xselect\",[e,t]),this.mset(\"yselect\",[i,n]),this.model.save()},n}(i.View),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=o,n.prototype.type=\"DataRangeBoxSelectTool\",n}(i.Model),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(n.Collection),{Model:r,Collection:new s,View:o}})}.call(this),n(\"bootstrap/modal\",[\"jquery\"],function(t){+function(t){var e=function(e,n){this.options=n,this.$element=t(e),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(\".bk-bs-modal-content\").load(this.options.remote,t.proxy(function(){this.$element.trigger(\"loaded.bk-bs.modal\")},this))};e.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},e.prototype.toggle=function(t){return this[this.isShown?\"hide\":\"show\"](t)},e.prototype.show=function(e){var n=this,i=t.Event(\"show.bk-bs.modal\",{relatedTarget:e});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on(\"click.dismiss.bk-bs.modal\",'[data-bk-bs-dismiss=\"modal\"]',t.proxy(this.hide,this)),this.backdrop(function(){var i=t.support.transition&&n.$element.hasClass(\"bk-bs-fade\");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show().scrollTop(0),i&&n.$element[0].offsetWidth,n.$element.addClass(\"bk-bs-in\").attr(\"aria-hidden\",!1),n.enforceFocus();var r=t.Event(\"shown.bk-bs.modal\",{relatedTarget:e});i?n.$element.find(\".bk-bs-modal-dialog\").one(t.support.transition.end,function(){n.$element.focus().trigger(r)}).emulateTransitionEnd(300):n.$element.focus().trigger(r)}))},e.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event(\"hide.bk-bs.modal\"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),t(document).off(\"focusin.bk-bs.modal\"),this.$element.removeClass(\"bk-bs-in\").attr(\"aria-hidden\",!0).off(\"click.dismiss.bk-bs.modal\"),t.support.transition&&this.$element.hasClass(\"bk-bs-fade\")?this.$element.one(t.support.transition.end,t.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},e.prototype.enforceFocus=function(){t(document).off(\"focusin.bk-bs.modal\").on(\"focusin.bk-bs.modal\",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.focus()},this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on(\"keyup.dismiss.bk-bs.modal\",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off(\"keyup.dismiss.bk-bs.modal\")},e.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger(\"hidden.bk-bs.modal\")})},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(e){var n=this.$element.hasClass(\"bk-bs-fade\")?\"bk-bs-fade\":\"\";if(this.isShown&&this.options.backdrop){var i=t.support.transition&&n;if(this.$backdrop=t('<div class=\"bk-bs-modal-backdrop '+n+'\" />').appendTo(document.body),this.$element.on(\"click.dismiss.bk-bs.modal\",t.proxy(function(t){t.target===t.currentTarget&&(\"static\"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass(\"bk-bs-in\"),!e)return;i?this.$backdrop.one(t.support.transition.end,e).emulateTransitionEnd(150):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass(\"bk-bs-in\"),t.support.transition&&this.$element.hasClass(\"bk-bs-fade\")?this.$backdrop.one(t.support.transition.end,e).emulateTransitionEnd(150):e()):e&&e()};var n=t.fn.modal;t.fn.modal=function(n,i){return this.each(function(){var r=t(this),o=r.data(\"bk-bs.modal\"),s=t.extend({},e.DEFAULTS,r.data(),\"object\"==typeof n&&n);o||r.data(\"bk-bs.modal\",o=new e(this,s)),\"string\"==typeof n?o[n](i):s.show&&o.show(i)})},t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on(\"click.bk-bs.modal.data-api\",'[data-bk-bs-toggle=\"modal\"]',function(e){var n=t(this),i=n.attr(\"href\"),r=t(n.attr(\"data-bk-bs-target\")||i&&i.replace(/.*(?=#[^\\s]+$)/,\"\")),o=r.data(\"bk-bs.modal\")?\"toggle\":t.extend({remote:!/#/.test(i)&&i},r.data(),n.data());n.is(\"a\")&&e.preventDefault(),r.modal(o,this).one(\"hide\",function(){n.is(\":visible\")&&n.focus()})}),t(document).on(\"show.bk-bs.modal\",\".bk-bs-modal\",function(){t(document.body).addClass(\"bk-bs-modal-open\")}).on(\"hidden.bk-bs.modal\",\".bk-bs-modal\",function(){t(document.body).removeClass(\"bk-bs-modal-open\")})}(t)}),n(\"tool/embed_tool_template\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<div class=\"bk-bs-modal\" tabindex=\"-1\">\\n  <div class=\"bk-bs-modal-dialog\">\\n    <div class=\"bk-bs-modal-content\">\\n      <div class=\"bk-bs-modal-header\">\\n        <button type=\"button\" class=\"bk-bs-close\" data-bk-bs-dismiss=\"modal\">&times;</button>\\n        <h4 class=\"bk-bs-modal-title\">HTML Embed code</h4>\\n      </div>\\n      <div class=\"bk-bs-modal-body\">\\n        ')),i(this.script_inject_escaped),i(e('\\n      </div>\\n      <div class=\"bk-bs-modal-footer\">\\n        <button type=\"button\" class=\"bk-bs-btn bk-bs-btn-primary\" data-bk-bs-dismiss=\"modal\">Close</button>\\n      </div>\\n    </div>\\n  </div>\\n</div>\\n'))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/embed_tool\",[\"underscore\",\"jquery\",\"bootstrap/modal\",\"backbone\",\"./tool\",\"./event_generators\",\"./embed_tool_template\"],function(t,n,i,r,o,s,a){var l,c,h,u,p,d,f,_;return l=s.ButtonEventGenerator,p=function(t){return t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\\\"/g,\"&quot;\").replace(/\\'/g,\"&#39;\")},h=function(t){function i(){return d=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t)},i.prototype.eventGeneratorClass=l,i.prototype.evgen_options={buttonText:\"Embed Html\"},i.prototype.toolType=\"EmbedTool\",i.prototype.tool_events={activated:\"_activated\",deactivated:\"_close_modal\"},i.prototype._activated=function(){var t,e,i,r,o,s=this;return console.log(\"EmbedToolView._activated\"),window.tool_view=this,r=this.plot_model.get(\"id\"),i=this.plot_model.get(\"doc\"),e=this.plot_model.get(\"docapikey\"),t=this.plot_model.get(\"baseurl\"),o=p(this.plot_model.get(\"script_inject_snippet\")),this.$modal=n(a({script_inject_escaped:o})),n(\"body\").append(this.$modal),this.$modal.on(\"hidden\",function(){return s.plot_view.eventSink.trigger(\"clear_active_tool\")}),this.$modal.modal({show:!0})},i.prototype._close_modal=function(){return this.$modal.remove()},i}(o.View),c=function(t){function n(){return f=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=h,n.prototype.type=\"EmbedTool\",n}(o.Model),u=function(t){function n(){return _=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=c,n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(r.Collection),{Model:c,Collection:new u,View:h}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/hover_tool\",[\"underscore\",\"backbone\",\"sprintf\",\"./tool\"],function(t,n,i,r){var o,s,a,l,c,h,u,p;return l=function(t){var e,n,i,r,o;return\"#\"===t.substr(0,1)?t:(n=/(.*?)rgb\\((\\d+), (\\d+), (\\d+)\\)/.exec(t),r=parseInt(n[2]),i=parseInt(n[3]),e=parseInt(n[4]),o=e|i<<8|r<<16,n[1]+\"#\"+o.toString(16))},c=function(t){return\"string\"==typeof t?t:Math.floor(t)===t?i(\"%d\",t):Math.abs(t)>.1&&Math.abs(t)<1e3?i(\"%0.3f\",t):i(\"%0.3e\",t)},s=function(n){function i(){return h=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t),this.div=$('<div class=\"bokeh_tooltip\" />').appendTo(\"body\"),this.div.hide(),this.active=!1},i.prototype.bind_bokeh_events=function(){var t,e=this;return t=\"hover_tool\",this.mget(\"always_active\")||(this.tool_button=$(\"<button class='bk-toolbar-button'> Hover </button>\"),this.plot_view.$el.find(\".bk-button-bar\").append(this.tool_button),this.tool_button.click(function(){return e.active?e.plot_view.eventSink.trigger(\"clear_active_tool\"):e.plot_view.eventSink.trigger(\"active_tool\",t)}),this.plot_view.eventSink.on(\"\"+t+\":deactivated\",function(){return e.active=!1,e.tool_button.removeClass(\"active\"),e.div.hide()}),this.plot_view.eventSink.on(\"\"+t+\":activated\",function(){return e.active=!0,e.tool_button.addClass(\"active\")})),this.plot_view.canvas.bind(\"mousemove\",function(t){var n,i,r,o,s,a,l,c,h,u,p,d;if(e.active||e.mget(\"always_active\"))return o=$(t.currentTarget).offset(),r=null!=o?o.left:0,s=null!=o?o.top:0,t.bokehX=t.pageX-r,t.bokehY=t.pageY-s,d=e.view_coords(t.bokehX,t.bokehY),a=d[0],l=d[1],n=e.plot_view.view_state.get(\"inner_range_horizontal\"),i=e.plot_view.view_state.get(\"inner_range_vertical\"),h=n.get(\"start\"),c=n.get(\"end\"),p=i.get(\"start\"),u=i.get(\"end\"),h>a||a>c||p>l||l>u?void e.div.hide():e._select(a,l,t)}),this.plot_view.canvas_wrapper.css(\"cursor\",\"crosshair\")},i.prototype.view_coords=function(t,e){var n,i,r;return r=[this.plot_view.view_state.sx_to_vx(t),this.plot_view.view_state.sy_to_vy(e)],n=r[0],i=r[1],[n,i]},i.prototype._select=function(e,n,i){var r,o,s,a,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z,F,L,V,B;for(g={type:\"point\",vx:e,vy:n},O=this.plot_view.xmapper.map_from_target(e),R=this.plot_view.ymapper.map_from_target(n),d={},p={},z=this.mget(\"renderers\"),j=0,H=z.length;H>j;j++)k=z[j],h=k.get_obj(\"data_source\"),d[h.id]=h;for(F=this.mget(\"renderers\"),N=0,I=F.length;I>N;N++)if(k=F[N],u=k.get_obj(\"data_source\").id,t.setdefault(p,u,[]),S=this.plot_view.renderers[k.id].hit_test(g),f=d[u],null!==S){if(S.length>0){v=S[0],this.div.empty(),D=$(\"<table></table>\"),L=this.mget(\"tooltips\");for(y in L){if(P=L[y],C=$(\"<tr></tr>\"),C.append($(\"<td class='bokeh_tooltip_row_label'>\"+y+\": </td>\")),M=$(\"<td class='bokeh_tooltip_row_value'></td>\"),P.indexOf(\"$color\")>=0){if(V=P.match(/\\$color(\\[.*\\])?:(\\w*)/),b=V[0],w=V[1],r=V[2],s=f.getcolumn(r),null==s){T=$(\"<span>\"+r+\" unknown</span>\"),M.append(T);continue}if(m=(null!=w?w.indexOf(\"hex\"):void 0)>=0,A=(null!=w?w.indexOf(\"swatch\"):void 0)>=0,o=s[v],null==o){T=$(\"<span>(null)</span>\"),M.append(T);continue}m&&(o=l(o)),T=$(\"<span>\"+o+\"</span>\"),M.append(T),A&&(T=$(\"<span class='bokeh_tooltip_color_block'> </span>\"),T.css({backgroundColor:o})),M.append(T)}else{for(P=P.replace(\"$index\",\"\"+v),P=P.replace(\"$x\",\"\"+c(O)),P=P.replace(\"$y\",\"\"+c(R)),P=P.replace(\"$vx\",\"\"+e),P=P.replace(\"$vy\",\"\"+n),P=P.replace(\"$sx\",\"\"+i.bokehX),P=P.replace(\"$sy\",\"\"+i.bokehY);P.indexOf(\"@\")>=0;){if(B=P.match(/(@)(\\w*)/),b=B[0],E=B[1],a=B[2],s=f.getcolumn(a),null==s){P=P.replace(a,\"\"+a+\" unknown\");break}s=f.getcolumn(a),_=s[v],P=\"number\"==typeof _?P.replace(b,\"\"+c(_)):P.replace(b,\"\"+_)}T=$(\"<span>\"+P+\"</span>\"),M.append(T)}C.append(M),D.append(C)}this.div.append(D),x=this.plot_view.view_state.get(\"outer_width\"),x/2>e?(this.div.removeClass(\"right\"),this.div.addClass(\"left\"),this.div.css({top:i.pageY-this.div.height()/2,left:i.pageX+18})):(this.div.removeClass(\"left\"),this.div.addClass(\"right\"),this.div.css({top:i.pageY-this.div.height()/2,left:i.pageX-this.div.width()-23})),this.div.show();break}this.div.hide(),p[u].push(S)}return null},i}(r.View),o=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.default_view=s,i.prototype.type=\"HoverTool\",i.prototype.initialize=function(t,e){var n,r,o,s;return i.__super__.initialize.call(this,t,e),r=this.get(\"names\"),n=this.get_obj(\"plot\").get_obj(\"renderers\"),s=function(){var t,e,i;for(i=[],t=0,e=n.length;e>t;t++)o=n[t],\"Glyph\"===o.type&&i.push(o);return i}(),r.length>0&&(s=function(){var t,e,n;for(n=[],t=0,e=s.length;e>t;t++)o=s[t],r.indexOf(o.get(\"name\"))>=0&&n.push(o);return n}()),this.set(\"renderers\",s)},i.prototype.defaults=function(){return t.extend(i.__super__.defaults.call(this),{renderers:[],names:[],tooltips:{index:\"$index\",\"data (x, y)\":\"($x, $y)\",\"canvas (x, y)\":\"($sx, $sy)\"}})},i.prototype.display_defaults=function(){return i.__super__.display_defaults.call(this)},i}(r.Model),a=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new a,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/pan_tool\",[\"underscore\",\"backbone\",\"./tool\",\"./event_generators\"],function(t,n,i,r){var o,s,a,l,c,h,u;return l=r.TwoPointEventGenerator,window.render_count=0,s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){var e;return n.__super__.initialize.call(this,t),e=this.mget(\"dimensions\"),0===e.length?console.log(\"WARN: pan tool given empty dimensions\"):1===e.length?\"width\"===e[0]?this.evgen_options.buttonText=\"Pan (x-axis)\":\"height\"===e[0]?this.evgen_options.buttonText=\"Pan (y-axis)\":console.log(\"WARN: pan tool given unrecognized dimensions: \"+e):2!==e.length?console.log(\"WARN: pan tool given more than two dimensions: \"+e):e.indexOf(\"width\")<0||e.indexOf(\"height\")<0?console.log(\"WARN: pan tool given unrecognized dimensions: \"+e):void 0},n.prototype.bind_bokeh_events=function(){return n.__super__.bind_bokeh_events.call(this)},n.prototype.eventGeneratorClass=l,n.prototype.toolType=\"PanTool\",n.prototype.evgen_options={keyName:null,buttonText:\"Pan\",buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAEwSURBVEiJ5ZbtUcMwDIZfcR0gGxAmICNkhI5QJiEb9DpB2QA2KBskG8AGZYOHH3XAl+bDjpMed7y/fD5Jj2VJTgToFgIE6G6mc55EjrTPgA9gH8sB4oAOVvOr3drAI9cqVwEC+x4YwDmkprMydI5lS4r0m9+lKfqnQGCbEhTIB2P4tffm7DQSbLJpPJvK5wDaeBuFpJOkTFIzMl+FH3jC5hl4lPQk6csnbwdmbCnV3bF4l/Q2dEUL6PCz6tSwcidaqoZnV6r+wTezSv59p6mR9GBmTfc0fSfMhqIEZnjl35thKzNLynDM/2+8NGtqM21yEZevey7p3tur3PLFzD5DA4XaFa7Nu3oN5TDjF6PswOqxjk4GOsedN9RBsCSgc67aFyQWaIDMLBoaC2t187H4BqwdDXMWZF/nAAAAAElFTkSuQmCC\",cursor:\"move\",auto_deactivate:!0,restrict_to_innercanvas:!0},n.prototype.tool_events={UpdatingMouseMove:\"_drag\",SetBasepoint:\"_set_base_point\"},n.prototype.mouse_coords=function(t,e,n){var i,r,o;return o=[this.plot_view.view_state.sx_to_vx(e),this.plot_view.view_state.sy_to_vy(n)],i=o[0],r=o[1],[i,r]},n.prototype._set_base_point=function(t){var e;return e=this.mouse_coords(t,t.bokehX,t.bokehY),this.x=e[0],this.y=e[1],null},n.prototype._drag=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b;return y=this.mouse_coords(t,t.bokehX,t.bokehY),c=y[0],f=y[1],h=c-this.x,_=f-this.y,b=[c,f],this.x=b[0],this.y=b[1],p=this.plot_view.view_state.get(\"inner_range_horizontal\"),s=p.get(\"start\")-h,o=p.get(\"end\")-h,m=this.plot_view.view_state.get(\"inner_range_vertical\"),l=m.get(\"start\")-_,a=m.get(\"end\")-_,e=this.mget(\"dimensions\"),e.indexOf(\"width\")>-1?(d=this.plot_view.xmapper.map_from_target(s),u=this.plot_view.xmapper.map_from_target(o),i=-h):(d=this.plot_view.xmapper.map_from_target(p.get(\"start\")),u=this.plot_view.xmapper.map_from_target(p.get(\"end\")),i=0),e.indexOf(\"height\")>-1?(v=this.plot_view.ymapper.map_from_target(l),g=this.plot_view.ymapper.map_from_target(a),r=_):(v=this.plot_view.ymapper.map_from_target(m.get(\"start\")),g=this.plot_view.ymapper.map_from_target(m.get(\"end\")),r=0),n={xr:{start:d,end:u},yr:{start:v,end:g},sdx:i,sdy:r},this.plot_view.update_range(n),null},n}(i.View),o=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=s,n.prototype.type=\"PanTool\",n.prototype.defaults=function(){return{dimensions:[\"width\",\"height\"]}},n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(i.Model),a=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new a,View:s}})}.call(this),n(\"tool/preview_save_tool_template\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<div class=\"bk-bs-modal\" tabindex=\"-1\">\\n  <div class=\"bk-bs-modal-dialog\">\\n    <div class=\"bk-bs-modal-content\">\\n      <div class=\"bk-bs-modal-header\">\\n        <button type=\"button\" class=\"bk-bs-close\" data-bk-bs-dismiss=\"modal\">&times;</button>\\n        <h4 class=\"bk-bs-modal-title\">Image Preview (right click -> \\'Save As\\' to save PNG)</h4>\\n      </div>\\n      <div class=\"bk-bs-modal-body\">\\n        <img src=\"')),i(this.data_uri),i(e('\" style=\"max-height: 300px; max-width: 400px\">\\n      </div>\\n      <div class=\"bk-bs-modal-footer\">\\n        <button type=\"button\" class=\"bk-bs-btn bk-bs-btn-primary\" data-bk-bs-dismiss=\"modal\">Close</button>\\n      </div>\\n    </div>\\n  </div>\\n</div>\\n'))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/preview_save_tool\",[\"underscore\",\"jquery\",\"bootstrap/modal\",\"backbone\",\"common/bulk_save\",\"./tool\",\"./event_generators\",\"./preview_save_tool_template\"],function(t,n,i,r,o,s,a,l){var c,h,u,p,d,f,_;return c=a.ButtonEventGenerator,u=function(t){function i(){return d=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t)},i.prototype.eventGeneratorClass=c,i.prototype.evgen_options={buttonText:\"Preview/Save\",buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAE4SURBVEiJ5ZbhTcMwEIW/h/hPN6AbUCagbNANKJNQJqiYgI7SbpARygRNJ3j8iFOq1E6s0BSpPClK4rPv+XzvbMs2l8TNRdn+gvA20jYCHvo4k7RJ2Q6ps918CvfHzvYsRWgbRURj4AtYAVPgKTL+AyjD94xqRTbABLgDXiWtciO07XWwLWJhNBzVfaa2J7bL8D+PRXhW0UgqqFZlD3w2SWEAlXaRDlIWDdKl7dGvCI8dUJVRinQR7AflxurwGGWifZe5JRbhPc4lXFFJfdzejULSOmcGrYSSSmCe4ygX/3PzPiCocUl3Dpt4T+W0SzRz+uVQVHV4gq4lrWvsWZnomsn1i+b6CVMqvbf9xs9p/2I7dvKnUI8fNw2xK0ZBz0tUCx6D31NCSdienpFsK2lb88QiHBQXF803MWL34Bj7qCQAAAAASUVORK5CYII=\"},i.prototype.toolType=\"PreviewSaveTool\",i.prototype.tool_events={activated:\"_activated\",deactivated:\"_close_modal\"},i.prototype._activated=function(){var t,e=this;return t=this.plot_view.canvas[0].toDataURL(),this.plot_model.set(\"png\",this.plot_view.canvas[0].toDataURL()),this.$modal=n(l({data_uri:t})),n(\"body\").append(this.$modal),this.$modal.on(\"hidden\",function(){return e.plot_view.eventSink.trigger(\"clear_active_tool\")}),this.$modal.modal({show:!0})},i.prototype._close_modal=function(){return this.$modal.remove()},i}(s.View),h=function(t){function n(){return f=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=u,n.prototype.type=\"PreviewSaveTool\",n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(s.Model),p=function(t){function n(){return _=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=h,n}(r.Collection),{Model:h,Collection:new p,View:u}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/reset_tool\",[\"underscore\",\"backbone\",\"./tool\",\"./event_generators\"],function(t,n,i,r){var o,s,a,l,c,h,u;return o=r.ButtonEventGenerator,a=function(n){function i(){return c=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t)},i.prototype.eventGeneratorClass=o,i.prototype.evgen_options={buttonText:\"Reset View\",buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAJASURBVEiJ3Za9axVBEMB/K3nRSBqLoEkhIY36ED8wgp02FsaPwsrSIiAYSOVLQCG9liqCqPgPSAqJWGhjkZhKNCZYKoIYsLIxHybvZ3EbuVzu7r2nUcGBKXZvZn47uzc7G1T+pmz5q7R/AWxLD0IIuUZqBegGTgKHgUPAMvAGeA+MA/MhhJWMX26wn1oA61cfqKsWy6p6X63mxO5MM0IalM1QHQauA9vi1IuY0Yc41wXsjpkDLAEjIYSb0f80cA641DBDdSyVwSP1lNpesAsD6kTK/ppaU1fUuXWMPKA6lHKuFYEy0A71as52T5YC1aq6HI2vNAJloIMp3zWZKgTW6/WgPoyG4+rWJkG96tPoVy8DrqvDEMJ+4CLJL38rhLDUZHLHgB3ACpBfW6nVpXWvOqM+N6m9lkQ9q95TF1s5w261r1VYBtyvjqjz6mwpcDNF7VGPFgLjx55NBG7Q7MSs+tmk9o78JqwaMywFTqYO+1v8Ac78AqyiTqtv1T1lwCk3ynf1pXqhBeCJuGDVA4V1mOdL0sK+AtNNwjqBUaADuAPMZA3KMlxWB5vNLMarRd8FdV/2DNuy9plxBehSO0IICw1A24Eh4Eacugy8yzNM65xJS6mZtJg1mVAHCkAVk9aVbk9jObE3NmDgLvA4hPAkOgzHFa9d4s+Aj8CXON4F9ALHSe7QRWA01YBzV5jWzpzvVRs/MerqbbW/JHbjJ0Z624CdwHmgDzgItAOvgVcx808hhNUsMCvZLf3j8v8/hH8At02YtB91tJYAAAAASUVORK5CYII=\"},i.prototype.toolType=\"ResetTool\",i.prototype.tool_events={activated:\"_activated\"},i.prototype._activated=function(){var e=this;return this.plot_view.update_range(),t.delay(function(){return e.plot_view.eventSink.trigger(\"clear_active_tool\")},100)},i}(i.View),s=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=a,n.prototype.type=\"ResetTool\",n}(i.Model),l=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(n.Collection),{Model:s,Collection:new l,View:a}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/resize_tool\",[\"underscore\",\"backbone\",\"./tool\",\"./event_generators\"],function(t,n,i,r){var o,s,a,l,c,h,u;return l=r.TwoPointEventGenerator,s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.active=!1},n.prototype.bind_events=function(t){return n.__super__.bind_events.call(this,t)},n.prototype.eventGeneratorClass=l,n.prototype.toolType=\"ResizeTool\",n.prototype.evgen_options={keyName:\"\",buttonText:\"Resize\",buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAB7SURBVEiJ7ZZLDsAgCESdxvtfmW5aUpAQE6gmhtnpgsdHM4CI2kpdS2k7gF2dub8AEAlMclYcSwPDoG+chykeyQA0sgtx9YWYYVZ1HtSsMJqA16Hzv0UBC1jAAh4IdN0i0RdZosI/AG3G8bOM2Mp/AL5VJi9RLNQinK0b0hcrObYWZu0AAAAASUVORK5CYII=\",cursor:\"move\"},n.prototype.tool_events={activated:\"_activate\",deactivated:\"_deactivate\",UpdatingMouseMove:\"_drag\",SetBasepoint:\"_set_base_point\"},n.prototype.render=function(){var t,e,n,i;if(this.active)return e=this.plot_view.ctx,n=this.plot_view.view_state.get(\"canvas_width\"),t=this.plot_view.view_state.get(\"canvas_height\"),i=8,e.save(),e.strokeStyle=\"transparent\",e.globalAlpha=.7,e.lineWidth=i,e.setLineDash([]),e.beginPath(),e.rect(i,i,n-2*i,t-2*i),e.moveTo(i,i),e.lineTo(n-i,t-i),e.moveTo(i,t-i),e.lineTo(n-i,i),e.stroke(),e.restore()},n.prototype.mouse_coords=function(t,e,n){return[e,n]},n.prototype._activate=function(){var t,e,n,i,r;if(!this.active)return this.active=!0,this.popup=$('<div class=\"resize_bokeh_plot pull-right hide\"/>'),t=this.plot_view.$el.find(\".bokeh_canvas_wrapper\"),i=this.plot_view.$el.find(\".plotarea\"),r=this.plot_view.$el.find(\".resize_popup\"),this.popup.appendTo(t),e=this.plot_view.view_state.get(\"outer_height\"),n=this.plot_view.view_state.get(\"outer_width\"),this.request_render(),this.plot_view.request_render(),null},n.prototype._deactivate=function(){return this.active=!1,this.popup.remove(),this.request_render(),this.plot_view.request_render(),null},n.prototype._set_base_point=function(t){var e;\n",
        "                return e=this.mouse_coords(t,t.bokehX,t.bokehY),this.x=e[0],this.y=e[1],null},n.prototype._drag=function(t){var e,n,i,r,o,s,a,l;return this.plot_view.pause(),a=this.mouse_coords(t,t.bokehX,t.bokehY),i=a[0],o=a[1],r=i-this.x,s=o-this.y,l=[i,o],this.x=l[0],this.y=l[1],e=this.plot_view.view_state.get(\"outer_height\"),n=this.plot_view.view_state.get(\"outer_width\"),this.plot_view.view_state.set(\"outer_height\",e+s,{silent:!0}),this.plot_view.view_state.set(\"outer_width\",n+r,{silent:!0}),this.plot_view.view_state.set(\"canvas_height\",e+s,{silent:!0}),this.plot_view.view_state.set(\"canvas_width\",n+r,{silent:!0}),this.plot_view.view_state.trigger(\"change:outer_height\",e+s),this.plot_view.view_state.trigger(\"change:outer_width\",n+r),this.plot_view.view_state.trigger(\"change:canvas_height\",e+s),this.plot_view.view_state.trigger(\"change:canvas_width\",n+r),this.plot_view.view_state.trigger(\"change\",this.plot_view.view_state),this.plot_view.unpause(!0),null},n}(i.View),o=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=s,n.prototype.type=\"ResizeTool\",n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(i.Model),a=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(n.Collection),{Model:o,Collection:new a,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/wheel_zoom_tool\",[\"underscore\",\"backbone\",\"./tool\",\"./event_generators\"],function(t,n,i,r){var o,s,a,l,c,h,u;return o=r.OnePointWheelEventGenerator,a=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){var e;return n.__super__.initialize.call(this,t),e=this.mget(\"dimensions\"),0===e.length?console.log(\"WARN: wheel zoom tool given empty dimensions\"):1===e.length?\"width\"===e[0]?this.evgen_options.buttonText=\"Wheel Zoom (x-axis)\":\"height\"===e[0]?this.evgen_options.buttonText=\"Wheel Zoom (y-axis)\":console.log(\"WARN: wheel tool given unrecognized dimensions: \"+e):2!==e.length?console.log(\"WARN: wheel tool given more than two dimensions: \"+e):e.indexOf(\"width\")<0||e.indexOf(\"height\")<0?console.log(\"WARN: pan tool given unrecognized dimensions: \"+e):void 0},n.prototype.eventGeneratorClass=o,n.prototype.evgen_options={buttonText:\"Wheel Zoom\",buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAHFSURBVEiJ7ZbRceIwEIb/vbkCUgIl0EFcAlfBuYOkBHfApALTQUgF0AF0AFcBdPDlwStnsSXD3MA93OSf0ciWdveTrJVkA2RmeqSA/vnHQ0kZfQPvr7igoa0K5enGOBXwzqVOQAvMRkDgCVi60VDvF05j2DLjMwTPe6DDdt5Rx1kBi9A3z8DqEHiX/IEZ0IQJnIBZArYxoDts0qzC+yEDPAXY6PMD82DTJiBAHYLvhkF8xADVYN2SRrMPdk0yill69Hoh6Sxp6/WrJJlZ6o+Be7iZ7UtAjyVJ+jnsMbOVpNWEc/xsx5JRSaN9CLwOMmw54b8PfvWE3Us/wLCGVXBu+0W+HAxAM2jbhCysNNBgAk0W6IZNxjkHjFkI3Z5tvOxCe5eAJWBOOWCAHihrg2f7KGn+Rma2B94kpfXeer2X9GFm6f0+QNdvr9dm9qtkdJfbgu5ESvvzY8o2AidvBb6OrdwGr70+S1pfG508gzZX7NLxlDsvU8K0Od8cMJ2JbSFg2ktNpm8esnFxE9Drhe+ndGk2dPfcoQRzv9b7T1dhCllqZmtgq+7wfvZylvSmLvOOhRh/3G51C9DI/GI8Uv//X9s/B34CxIm8SDsIdkgAAAAASUVORK5CYII=\"},n.prototype.tool_events={zoom:\"_zoom\"},n.prototype.mouse_coords=function(t,e,n){var i,r,o;return o=[this.plot_view.view_state.sx_to_vx(e),this.plot_view.view_state.sy_to_vy(n)],i=o[0],r=o[1],[i,r]},n.prototype._zoom=function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C;return e=t.originalEvent.wheelDelta,r=t.bokehX,o=t.bokehY,b=this.mouse_coords(t,r,o),u=b[0],_=b[1],s=this.mget(\"speed\"),i=s*e,i>.9?i=.9:-.9>i&&(i=-.9),d=this.plot_view.view_state.get(\"inner_range_horizontal\"),l=d.get(\"start\"),a=d.get(\"end\"),m=this.plot_view.view_state.get(\"inner_range_vertical\"),h=m.get(\"start\"),c=m.get(\"end\"),n=this.mget(\"dimensions\"),n.indexOf(\"width\")>-1?(w=this.plot_view.xmapper.v_map_from_target([l-(l-u)*i,a-(a-u)*i]),f=w[0],p=w[1]):(x=this.plot_view.xmapper.v_map_from_target([l,a]),f=x[0],p=x[1]),n.indexOf(\"height\")>-1?(k=this.plot_view.ymapper.v_map_from_target([h-(h-_)*i,c-(c-_)*i]),v=k[0],g=k[1]):(C=this.plot_view.ymapper.v_map_from_target([h,c]),v=C[0],g=C[1]),y={xr:{start:f,end:p},yr:{start:v,end:g},factor:i},this.plot_view.update_range(y),null},n}(i.View),s=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=a,n.prototype.type=\"WheelZoomTool\",n.prototype.defaults=function(){return{dimensions:[\"width\",\"height\"],speed:1/600}},n}(i.Model),l=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(n.Collection),{Model:s,Collection:new l,View:a}})}.call(this),n(\"tool/object_explorer_tool_template\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<div class=\"bk-bs-modal\" tabindex=\"-1\">\\n  <div class=\"bk-bs-modal-dialog\">\\n    <div class=\"bk-bs-modal-content\">\\n      <div class=\"bk-bs-modal-header\">\\n        <button type=\"button\" class=\"bk-bs-close\" data-bk-bs-dismiss=\"modal\">&times;</button>\\n        <h4 class=\"bk-bs-modal-title\">Object Explorer</h4>\\n      </div>\\n      <div class=\"bk-bs-modal-body\">\\n      </div>\\n      <div class=\"bk-bs-modal-footer\">\\n        <button type=\"button\" class=\"bk-bs-btn bk-bs-btn-primary\" data-bk-bs-dismiss=\"modal\">Close</button>\\n      </div>\\n    </div>\\n  </div>\\n</div>\\n'))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(t){\"function\"==typeof n&&n.amd?n(\"jstree\",[\"jquery\"],t):t(\"object\"==typeof exports?e(\"jquery\"):jQuery)}(function(t,e){if(!t.jstree){var n,i,r=0,o=!1,s=!1,a=!1,l=[],c=t(\"script:last\").attr(\"src\"),h=document,u=h.createElement(\"LI\");u.setAttribute(\"role\",\"treeitem\"),n=h.createElement(\"I\"),n.className=\"jstree-icon jstree-ocl\",u.appendChild(n),n=h.createElement(\"A\"),n.className=\"jstree-anchor\",n.setAttribute(\"href\",\"#\"),i=h.createElement(\"I\"),i.className=\"jstree-icon jstree-themeicon\",n.appendChild(i),u.appendChild(n),n=i=null,t.jstree={version:\"3.0.0-beta9\",defaults:{plugins:[]},plugins:{},path:c&&-1!==c.indexOf(\"/\")?c.replace(/\\/[^\\/]+$/,\"\"):\"\"},t.jstree.create=function(e,n){var i=new t.jstree.core(++r),o=n;return n=t.extend(!0,{},t.jstree.defaults,n),o&&o.plugins&&(n.plugins=o.plugins),t.each(n.plugins,function(t,e){\"core\"!==t&&(i=i.plugin(e,n[e]))}),i.init(e,n),i},t.jstree.core=function(t){this._id=t,this._cnt=0,this._data={core:{themes:{name:!1,dots:!1,icons:!1},selected:[],last_error:{}}}},t.jstree.reference=function(e){if(e&&!t(e).length){e.id&&(e=e.id);var n=null;return t(\".jstree\").each(function(){var i=t(this).data(\"jstree\");return i&&i._model.data[e]?(n=i,!1):void 0}),n}return t(e).closest(\".jstree\").data(\"jstree\")},t.fn.jstree=function(n){var i=\"string\"==typeof n,r=Array.prototype.slice.call(arguments,1),o=null;return this.each(function(){var s=t.jstree.reference(this),a=i&&s?s[n]:null;return o=i&&a?a.apply(s,r):null,s||i||n!==e&&!t.isPlainObject(n)||t(this).data(\"jstree\",new t.jstree.create(this,n)),s&&!i&&(o=s),null!==o&&o!==e?!1:void 0}),null!==o&&o!==e?o:this},t.expr[\":\"].jstree=t.expr.createPseudo(function(){return function(n){return t(n).hasClass(\"jstree\")&&t(n).data(\"jstree\")!==e}}),t.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:t.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,stripes:!1,variant:!1,responsive:!0},expand_selected_onload:!0},t.jstree.core.prototype={plugin:function(e,n){var i=t.jstree.plugins[e];return i?(this._data[e]={},i.prototype=this,new i(n,this)):this},init:function(e,n){this._model={data:{\"#\":{id:\"#\",parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}}},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this.element=t(e).addClass(\"jstree jstree-\"+this._id),this.settings=n,this.element.bind(\"destroyed\",t.proxy(this.teardown,this)),this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl=\"rtl\"===this.element.css(\"direction\"),this.element[this._data.core.rtl?\"addClass\":\"removeClass\"](\"jstree-rtl\"),this.element.attr(\"role\",\"tree\"),this.bind(),this.trigger(\"init\"),this._data.core.original_container_html=this.element.find(\" > ul > li\").clone(!0),this._data.core.original_container_html.find(\"li\").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\\s+$/.test(this.nodeValue))}).remove(),this.element.html(\"<ul class='jstree-container-ul'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>\"+this.get_string(\"Loading ...\")+\"</a></li></ul>\"),this._data.core.li_height=this.get_container_ul().children(\"li:eq(0)\").height()||18,this.trigger(\"loading\"),this.load_node(\"#\")},destroy:function(){this.element.unbind(\"destroyed\",this.teardown),this.teardown()},teardown:function(){this.unbind(),this.element.removeClass(\"jstree\").removeData(\"jstree\").find(\"[class^='jstree']\").addBack().attr(\"class\",function(){return this.className.replace(/jstree[^ ]*|$/gi,\"\")}),this.element=null},bind:function(){this.element.on(\"dblclick.jstree\",function(){if(document.selection&&document.selection.empty)document.selection.empty();else if(window.getSelection){var t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(e){}}}).on(\"click.jstree\",\".jstree-ocl\",t.proxy(function(t){this.toggle_node(t.target)},this)).on(\"click.jstree\",\".jstree-anchor\",t.proxy(function(e){e.preventDefault(),t(e.currentTarget).focus(),this.activate_node(e.currentTarget,e)},this)).on(\"keydown.jstree\",\".jstree-anchor\",t.proxy(function(e){var n=null;switch(e.which){case 13:case 32:e.type=\"click\",t(e.currentTarget).trigger(e);break;case 37:e.preventDefault(),this.is_open(e.currentTarget)?this.close_node(e.currentTarget):(n=this.get_prev_dom(e.currentTarget),n&&n.length&&n.children(\".jstree-anchor\").focus());break;case 38:e.preventDefault(),n=this.get_prev_dom(e.currentTarget),n&&n.length&&n.children(\".jstree-anchor\").focus();break;case 39:e.preventDefault(),this.is_closed(e.currentTarget)?this.open_node(e.currentTarget,function(t){this.get_node(t,!0).children(\".jstree-anchor\").focus()}):(n=this.get_next_dom(e.currentTarget),n&&n.length&&n.children(\".jstree-anchor\").focus());break;case 40:e.preventDefault(),n=this.get_next_dom(e.currentTarget),n&&n.length&&n.children(\".jstree-anchor\").focus();break;case 46:e.preventDefault(),n=this.get_node(e.currentTarget),n&&n.id&&\"#\"!==n.id&&(n=this.is_selected(n)?this.get_selected():n);break;case 113:e.preventDefault(),n=this.get_node(e.currentTarget)}},this)).on(\"load_node.jstree\",t.proxy(function(e,n){if(n.status&&(\"#\"!==n.node.id||this._data.core.loaded||(this._data.core.loaded=!0,this.trigger(\"loaded\")),!this._data.core.ready&&!this.get_container_ul().find(\".jstree-loading:eq(0)\").length)){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var i,r,o=[];for(i=0,r=this._data.core.selected.length;r>i;i++)o=o.concat(this._model.data[this._data.core.selected[i]].parents);for(o=t.vakata.array_unique(o),i=0,r=o.length;r>i;i++)this.open_node(o[i],!1,0)}this.trigger(\"changed\",{action:\"ready\",selected:this._data.core.selected})}setTimeout(t.proxy(function(){this.trigger(\"ready\")},this),0)}},this)).on(\"init.jstree\",t.proxy(function(){var t=this.settings.core.themes;this._data.core.themes.dots=t.dots,this._data.core.themes.stripes=t.stripes,this._data.core.themes.icons=t.icons,this.set_theme(t.name||\"default\",t.url),this.set_theme_variant(t.variant)},this)).on(\"loading.jstree\",t.proxy(function(){this[this._data.core.themes.dots?\"show_dots\":\"hide_dots\"](),this[this._data.core.themes.icons?\"show_icons\":\"hide_icons\"](),this[this._data.core.themes.stripes?\"show_stripes\":\"hide_stripes\"]()},this)).on(\"focus.jstree\",\".jstree-anchor\",t.proxy(function(e){this.element.find(\".jstree-hovered\").not(e.currentTarget).mouseleave(),t(e.currentTarget).mouseenter()},this)).on(\"mouseenter.jstree\",\".jstree-anchor\",t.proxy(function(t){this.hover_node(t.currentTarget)},this)).on(\"mouseleave.jstree\",\".jstree-anchor\",t.proxy(function(t){this.dehover_node(t.currentTarget)},this))},unbind:function(){this.element.off(\".jstree\"),t(document).off(\".jstree-\"+this._id)},trigger:function(t,e){e||(e={}),e.instance=this,this.element.triggerHandler(t.replace(\".jstree\",\"\")+\".jstree\",e)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(\"ul:eq(0)\")},get_string:function(e){var n=this.settings.core.strings;return t.isFunction(n)?n.call(this,e):n&&n[e]?n[e]:e},_firstChild:function(t){for(t=t?t.firstChild:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_nextSibling:function(t){for(t=t?t.nextSibling:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_previousSibling:function(t){for(t=t?t.previousSibling:null;null!==t&&1!==t.nodeType;)t=t.previousSibling;return t},get_node:function(e,n){e&&e.id&&(e=e.id);var i;try{if(this._model.data[e])e=this._model.data[e];else if(((i=t(e,this.element)).length||(i=t(\"#\"+e,this.element)).length)&&this._model.data[i.closest(\"li\").attr(\"id\")])e=this._model.data[i.closest(\"li\").attr(\"id\")];else{if(!(i=t(e,this.element)).length||!i.hasClass(\"jstree\"))return!1;e=this._model.data[\"#\"]}return n&&(e=\"#\"===e.id?this.element:t(document.getElementById(e.id))),e}catch(r){return!1}},get_path:function(t,e,n){if(t=t.parents?t:this.get_node(t),!t||\"#\"===t.id||!t.parents)return!1;var i,r,o=[];for(o.push(n?t.id:t.text),i=0,r=t.parents.length;r>i;i++)o.push(n?t.parents[i]:this.get_text(t.parents[i]));return o=o.reverse().slice(1),e?o.join(e):o},get_next_dom:function(e,n){var i;return e=this.get_node(e,!0),e[0]===this.element[0]?(i=this._firstChild(this.get_container_ul()[0]),i?t(i):!1):e&&e.length?n?(i=this._nextSibling(e[0]),i?t(i):!1):e.hasClass(\"jstree-open\")?(i=this._firstChild(e.children(\"ul\")[0]),i?t(i):!1):null!==(i=this._nextSibling(e[0]))?t(i):e.parentsUntil(\".jstree\",\"li\").next(\"li\").eq(0):!1},get_prev_dom:function(e,n){var i;if(e=this.get_node(e,!0),e[0]===this.element[0])return i=this.get_container_ul()[0].lastChild,i?t(i):!1;if(!e||!e.length)return!1;if(n)return i=this._previousSibling(e[0]),i?t(i):!1;if(null!==(i=this._previousSibling(e[0]))){for(e=t(i);e.hasClass(\"jstree-open\");)e=e.children(\"ul:eq(0)\").children(\"li:last\");return e}return i=e[0].parentNode.parentNode,i&&\"LI\"===i.tagName?t(i):!1},get_parent:function(t){return t=this.get_node(t),t&&\"#\"!==t.id?t.parent:!1},get_children_dom:function(t){return t=this.get_node(t,!0),t[0]===this.element[0]?this.get_container_ul().children(\"li\"):t&&t.length?t.children(\"ul\").children(\"li\"):!1},is_parent:function(t){return t=this.get_node(t),t&&(t.state.loaded===!1||t.children.length>0)},is_loaded:function(t){return t=this.get_node(t),t&&t.state.loaded},is_loading:function(t){return t=this.get_node(t,!0),t&&t.hasClass(\"jstree-loading\")},is_open:function(t){return t=this.get_node(t),t&&t.state.opened},is_closed:function(t){return t=this.get_node(t),t&&this.is_parent(t)&&!t.state.opened},is_leaf:function(t){return!this.is_parent(t)},load_node:function(e,n){var i,r;if(t.isArray(e)){for(e=e.slice(),i=0,r=e.length;r>i;i++)this.load_node(e[i],n);return!0}return(e=this.get_node(e))?(this.get_node(e,!0).addClass(\"jstree-loading\"),this._load_node(e,t.proxy(function(t){e.state.loaded=t,this.get_node(e,!0).removeClass(\"jstree-loading\"),this.trigger(\"load_node\",{node:e,status:t}),n&&n.call(this,e,t)},this)),!0):(n.call(this,e,!1),!1)},_load_node:function(e,n){var i,r=this.settings.core.data;return r?t.isFunction(r)?r.call(this,e,t.proxy(function(i){return i===!1?n.call(this,!1):n.call(this,this[\"string\"==typeof i?\"_append_html_data\":\"_append_json_data\"](e,\"string\"==typeof i?t(i):i))},this)):\"object\"==typeof r?r.url?(r=t.extend(!0,{},r),t.isFunction(r.url)&&(r.url=r.url.call(this,e)),t.isFunction(r.data)&&(r.data=r.data.call(this,e)),t.ajax(r).done(t.proxy(function(i,r,o){var s=o.getResponseHeader(\"Content-Type\");return-1!==s.indexOf(\"json\")?n.call(this,this._append_json_data(e,i)):-1!==s.indexOf(\"html\")?n.call(this,this._append_html_data(e,t(i))):void 0},this)).fail(t.proxy(function(){n.call(this,!1),this._data.core.last_error={error:\"ajax\",plugin:\"core\",id:\"core_04\",reason:\"Could not load node\",data:JSON.stringify(r)},this.settings.core.error.call(this,this._data.core.last_error)},this))):(i=t.isArray(r)||t.isPlainObject(r)?JSON.parse(JSON.stringify(r)):r,n.call(this,this._append_json_data(e,i))):\"string\"==typeof r?n.call(this,this._append_html_data(e,r)):n.call(this,!1):n.call(this,\"#\"===e.id?this._append_html_data(e,this._data.core.original_container_html.clone(!0)):!1)},_node_changed:function(t){t=this.get_node(t),t&&this._model.changed.push(t.id)},_append_html_data:function(e,n){e=this.get_node(e),e.children=[],e.children_d=[];var i,r,o,s=n.is(\"ul\")?n.children():n,a=e.id,l=[],c=[],h=this._model.data,u=h[a],p=this._data.core.selected.length;for(s.each(t.proxy(function(e,n){i=this._parse_model_from_html(t(n),a,u.parents.concat()),i&&(l.push(i),c.push(i),h[i].children_d.length&&(c=c.concat(h[i].children_d)))},this)),u.children=l,u.children_d=c,r=0,o=u.parents.length;o>r;r++)h[u.parents[r]].children_d=h[u.parents[r]].children_d.concat(c);return this.trigger(\"model\",{nodes:c,parent:a}),\"#\"!==a?(this._node_changed(a),this.redraw()):(this.get_container_ul().children(\".jstree-initial-node\").remove(),this.redraw(!0)),this._data.core.selected.length!==p&&this.trigger(\"changed\",{action:\"model\",selected:this._data.core.selected}),!0},_append_json_data:function(n,i){n=this.get_node(n),n.children=[],n.children_d=[];var r,o,s,a=i,l=n.id,c=[],h=[],u=this._model.data,p=u[l],d=this._data.core.selected.length;if(a.d&&(a=a.d,\"string\"==typeof a&&(a=JSON.parse(a))),t.isArray(a)||(a=[a]),a.length&&a[0].id!==e&&a[0].parent!==e){for(o=0,s=a.length;s>o;o++)a[o].children||(a[o].children=[]),u[a[o].id]=a[o];for(o=0,s=a.length;s>o;o++)u[a[o].parent].children.push(a[o].id),p.children_d.push(a[o].id);for(o=0,s=p.children.length;s>o;o++)r=this._parse_model_from_flat_json(u[p.children[o]],l,p.parents.concat()),h.push(r),u[r].children_d.length&&(h=h.concat(u[r].children_d))}else{for(o=0,s=a.length;s>o;o++)r=this._parse_model_from_json(a[o],l,p.parents.concat()),r&&(c.push(r),h.push(r),u[r].children_d.length&&(h=h.concat(u[r].children_d)));for(p.children=c,p.children_d=h,o=0,s=p.parents.length;s>o;o++)u[p.parents[o]].children_d=u[p.parents[o]].children_d.concat(h)}return this.trigger(\"model\",{nodes:h,parent:l}),\"#\"!==l?(this._node_changed(l),this.redraw()):this.redraw(!0),this._data.core.selected.length!==d&&this.trigger(\"changed\",{action:\"model\",selected:this._data.core.selected}),!0},_parse_model_from_html:function(e,n,i){i=i?[].concat(i):[],n&&i.unshift(n);var r,o,s,a,l,c=this._model.data,h={id:!1,text:!1,icon:!0,parent:n,parents:i,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:\"#\"},original:!1};for(s in this._model.default_state)this._model.default_state.hasOwnProperty(s)&&(h.state[s]=this._model.default_state[s]);if(a=t.vakata.attributes(e,!0),t.each(a,function(e,n){return n=t.trim(n),n.length?(h.li_attr[e]=n,void(\"id\"===e&&(h.id=n))):!0}),a=e.children(\"a\").eq(0),a.length&&(a=t.vakata.attributes(a,!0),t.each(a,function(e,n){n=t.trim(n),n.length&&(h.a_attr[e]=n)})),a=e.children(\"a:eq(0)\").length?e.children(\"a:eq(0)\").clone():e.clone(),a.children(\"ins, i, ul\").remove(),a=a.html(),a=t(\"<div />\").html(a),h.text=a.html(),a=e.data(),h.data=a?t.extend(!0,{},a):null,h.state.opened=e.hasClass(\"jstree-open\"),h.state.selected=e.children(\"a\").hasClass(\"jstree-clicked\"),h.state.disabled=e.children(\"a\").hasClass(\"jstree-disabled\"),h.data&&h.data.jstree)for(s in h.data.jstree)h.data.jstree.hasOwnProperty(s)&&(h.state[s]=h.data.jstree[s]);a=e.children(\"a\").children(\".jstree-themeicon\"),a.length&&(h.icon=a.hasClass(\"jstree-themeicon-hidden\")?!1:a.attr(\"rel\")),h.state.icon&&(h.icon=h.state.icon),a=e.children(\"ul\").children(\"li\");do l=\"j\"+this._id+\"_\"+ ++this._cnt;while(c[l]);return h.id=h.li_attr.id||l,a.length?(a.each(t.proxy(function(e,n){r=this._parse_model_from_html(t(n),h.id,i),o=this._model.data[r],h.children.push(r),o.children_d.length&&(h.children_d=h.children_d.concat(o.children_d))},this)),h.children_d=h.children_d.concat(h.children)):e.hasClass(\"jstree-closed\")&&(h.state.loaded=!1),h.li_attr[\"class\"]&&(h.li_attr[\"class\"]=h.li_attr[\"class\"].replace(\"jstree-closed\",\"\").replace(\"jstree-open\",\"\")),h.a_attr[\"class\"]&&(h.a_attr[\"class\"]=h.a_attr[\"class\"].replace(\"jstree-clicked\",\"\").replace(\"jstree-disabled\",\"\")),c[h.id]=h,h.state.selected&&this._data.core.selected.push(h.id),h.id},_parse_model_from_flat_json:function(t,n,i){i=i?i.concat():[],n&&i.unshift(n);var r,o,s,a,l=t.id,c=this._model.data,h=this._model.default_state,u={id:l,text:t.text||\"\",icon:t.icon!==e?t.icon:!0,parent:n,parents:i,children:t.children||[],children_d:t.children_d||[],data:t.data,state:{},li_attr:{id:!1},a_attr:{href:\"#\"},original:!1};for(r in h)h.hasOwnProperty(r)&&(u.state[r]=h[r]);if(t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(u.icon=t.data.jstree.icon),t&&t.data&&(u.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(u.state[r]=t.data.jstree[r]);if(t&&\"object\"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(u.state[r]=t.state[r]);if(t&&\"object\"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(u.li_attr[r]=t.li_attr[r]);if(u.li_attr.id||(u.li_attr.id=l),t&&\"object\"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(u.a_attr[r]=t.a_attr[r]);for(t&&t.children&&t.children===!0&&(u.state.loaded=!1,u.children=[],u.children_d=[]),c[u.id]=u,r=0,o=u.children.length;o>r;r++)s=this._parse_model_from_flat_json(c[u.children[r]],u.id,i),a=c[s],u.children_d.push(s),a.children_d.length&&(u.children_d=u.children_d.concat(a.children_d));return delete t.data,delete t.children,c[u.id].original=t,u.state.selected&&this._data.core.selected.push(u.id),u.id},_parse_model_from_json:function(t,n,i){i=i?i.concat():[],n&&i.unshift(n);var r,o,s,a,l,c=!1,h=this._model.data,u=this._model.default_state;do c=\"j\"+this._id+\"_\"+ ++this._cnt;while(h[c]);l={id:!1,text:\"string\"==typeof t?t:\"\",icon:\"object\"==typeof t&&t.icon!==e?t.icon:!0,parent:n,parents:i,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:\"#\"},original:!1};for(r in u)u.hasOwnProperty(r)&&(l.state[r]=u[r]);if(t&&t.id&&(l.id=t.id),t&&t.text&&(l.text=t.text),t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(l.icon=t.data.jstree.icon),t&&t.data&&(l.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(l.state[r]=t.data.jstree[r]);if(t&&\"object\"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(l.state[r]=t.state[r]);if(t&&\"object\"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(l.li_attr[r]=t.li_attr[r]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id),l.id||(l.id=c),l.li_attr.id||(l.li_attr.id=l.id),t&&\"object\"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(l.a_attr[r]=t.a_attr[r]);if(t&&t.children&&t.children.length){for(r=0,o=t.children.length;o>r;r++)s=this._parse_model_from_json(t.children[r],l.id,i),a=h[s],l.children.push(s),a.children_d.length&&(l.children_d=l.children_d.concat(a.children_d));l.children_d=l.children_d.concat(l.children)}return t&&t.children&&t.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete t.data,delete t.children,l.original=t,h[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var t,e,n,i=this._model.force_full_redraw?this._model.data[\"#\"].children.concat([]):this._model.changed.concat([]),r=document.createElement(\"UL\");for(e=0,n=i.length;n>e;e++)t=this.redraw_node(i[e],!0,this._model.force_full_redraw),t&&this._model.force_full_redraw&&r.appendChild(t);this._model.force_full_redraw&&(r.className=this.get_container_ul()[0].className,this.element.empty().append(r)),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger(\"redraw\",{nodes:i})},redraw:function(t){t&&(this._model.force_full_redraw=!0),this._redraw()},redraw_node:function(e,n,i){var r=this.get_node(e),o=!1,s=!1,a=!1,l=!1,c=!1,h=!1,p=\"\",d=document,f=this._model.data,_=!1,g=!1;if(!r)return!1;if(\"#\"===r.id)return this.redraw(!0);if(n=n||0===r.children.length,e=d.getElementById(r.id))e=t(e),i||(o=e.parent().parent()[0],o===this.element[0]&&(o=null),s=e.index()),n||!r.children.length||e.children(\"ul\").length||(n=!0),n||(a=e.children(\"UL\")[0]),g=e.attr(\"aria-selected\"),_=e.children(\".jstree-anchor\")[0]===document.activeElement,e.remove();else if(n=!0,!i){if(o=\"#\"!==r.parent?t(\"#\"+r.parent,this.element)[0]:null,!(null===o||o&&f[r.parent].state.opened))return!1;s=t.inArray(r.id,null===o?f[\"#\"].children:f[r.parent].children)}e=u.cloneNode(!0),p=\"jstree-node \";for(l in r.li_attr)if(r.li_attr.hasOwnProperty(l)){if(\"id\"===l)continue;\"class\"!==l?e.setAttribute(l,r.li_attr[l]):p+=r.li_attr[l]}g&&\"false\"!==g&&e.setAttribute(\"aria-selected\",!0),!r.children.length&&r.state.loaded?p+=\" jstree-leaf\":(p+=r.state.opened?\" jstree-open\":\" jstree-closed\",e.setAttribute(\"aria-expanded\",r.state.opened)),null!==r.parent&&f[r.parent].children[f[r.parent].children.length-1]===r.id&&(p+=\" jstree-last\"),e.id=r.id,e.className=p,p=(r.state.selected?\" jstree-clicked\":\"\")+(r.state.disabled?\" jstree-disabled\":\"\");for(c in r.a_attr)if(r.a_attr.hasOwnProperty(c)){if(\"href\"===c&&\"#\"===r.a_attr[c])continue;\"class\"!==c?e.childNodes[1].setAttribute(c,r.a_attr[c]):p+=\" \"+r.a_attr[c]}if(p.length&&(e.childNodes[1].className=\"jstree-anchor \"+p),(r.icon&&r.icon!==!0||r.icon===!1)&&(r.icon===!1?e.childNodes[1].childNodes[0].className+=\" jstree-themeicon-hidden\":-1===r.icon.indexOf(\"/\")&&-1===r.icon.indexOf(\".\")?e.childNodes[1].childNodes[0].className+=\" \"+r.icon+\" jstree-themeicon-custom\":(e.childNodes[1].childNodes[0].style.backgroundImage=\"url(\"+r.icon+\")\",e.childNodes[1].childNodes[0].style.backgroundPosition=\"center center\",e.childNodes[1].childNodes[0].style.backgroundSize=\"auto\",e.childNodes[1].childNodes[0].className+=\" jstree-themeicon-custom\")),e.childNodes[1].innerHTML+=r.text,n&&r.children.length&&r.state.opened){for(h=d.createElement(\"UL\"),h.setAttribute(\"role\",\"group\"),h.className=\"jstree-children\",l=0,c=r.children.length;c>l;l++)h.appendChild(this.redraw_node(r.children[l],n,!0));e.appendChild(h)}return a&&e.appendChild(a),i||(o||(o=this.element[0]),o.getElementsByTagName(\"UL\").length?o=o.getElementsByTagName(\"UL\")[0]:(l=d.createElement(\"UL\"),l.setAttribute(\"role\",\"group\"),l.className=\"jstree-children\",o.appendChild(l),o=l),s<o.childNodes.length?o.insertBefore(e,o.childNodes[s]):o.appendChild(e),_&&e.childNodes[1].focus()),e},open_node:function(n,i,r){var o,s,a,l;if(t.isArray(n)){for(n=n.slice(),o=0,s=n.length;s>o;o++)this.open_node(n[o],i,r);return!0}if(n=this.get_node(n),!n||\"#\"===n.id)return!1;if(r=r===e?this.settings.core.animation:r,!this.is_closed(n))return i&&i.call(this,n,!1),!1;if(this.is_loaded(n))a=this.get_node(n,!0),l=this,a.length&&(n.children.length&&!this._firstChild(a.children(\"ul\")[0])&&(n.state.opened=!0,this.redraw_node(n,!0),a=this.get_node(n,!0)),r?a.children(\"ul\").css(\"display\",\"none\").end().removeClass(\"jstree-closed\").addClass(\"jstree-open\").attr(\"aria-expanded\",!0).children(\"ul\").stop(!0,!0).slideDown(r,function(){this.style.display=\"\",l.trigger(\"after_open\",{node:n})}):(a[0].className=a[0].className.replace(\"jstree-closed\",\"jstree-open\"),a[0].setAttribute(\"aria-expanded\",!0))),n.state.opened=!0,i&&i.call(this,n,!0),this.trigger(\"open_node\",{node:n}),r&&a.length||this.trigger(\"after_open\",{node:n});else{if(this.is_loading(n))return setTimeout(t.proxy(function(){this.open_node(n,i,r)},this),500);this.load_node(n,function(t,e){return e?this.open_node(t,i,r):i?i.call(this,t,!1):!1})}},_open_to:function(e){if(e=this.get_node(e),!e||\"#\"===e.id)return!1;var n,i,r=e.parents;for(n=0,i=r.length;i>n;n+=1)\"#\"!==n&&this.open_node(r[n],!1,0);return t(document.getElementById(e.id))},close_node:function(n,i){var r,o,s,a;if(t.isArray(n)){for(n=n.slice(),r=0,o=n.length;o>r;r++)this.close_node(n[r],i);return!0}return n=this.get_node(n),n&&\"#\"!==n.id?(i=i===e?this.settings.core.animation:i,s=this,a=this.get_node(n,!0),a.length&&(i?a.children(\"ul\").attr(\"style\",\"display:block !important\").end().removeClass(\"jstree-open\").addClass(\"jstree-closed\").attr(\"aria-expanded\",!1).children(\"ul\").stop(!0,!0).slideUp(i,function(){this.style.display=\"\",a.children(\"ul\").remove(),s.trigger(\"after_close\",{node:n})}):(a[0].className=a[0].className.replace(\"jstree-open\",\"jstree-closed\"),a.attr(\"aria-expanded\",!1).children(\"ul\").remove())),n.state.opened=!1,this.trigger(\"close_node\",{node:n}),void(i&&a.length||this.trigger(\"after_close\",{node:n}))):!1},toggle_node:function(e){var n,i;if(t.isArray(e)){for(e=e.slice(),n=0,i=e.length;i>n;n++)this.toggle_node(e[n]);return!0}return this.is_closed(e)?this.open_node(e):this.is_open(e)?this.close_node(e):void 0},open_all:function(t,e,n){if(t||(t=\"#\"),t=this.get_node(t),!t)return!1;var i,r,o,s=\"#\"===t.id?this.get_container_ul():this.get_node(t,!0);if(!s.length){for(i=0,r=t.children_d.length;r>i;i++)this.is_closed(this._model.data[t.children_d[i]])&&(this._model.data[t.children_d[i]].state.opened=!0);return this.trigger(\"open_all\",{node:t})}n=n||s,o=this,s=this.is_closed(t)?s.find(\"li.jstree-closed\").addBack():s.find(\"li.jstree-closed\"),s.each(function(){o.open_node(this,function(t,i){i&&this.is_parent(t)&&this.open_all(t,e,n)},e||0)}),0===n.find(\"li.jstree-closed\").length&&this.trigger(\"open_all\",{node:this.get_node(n)})},close_all:function(t,e){if(t||(t=\"#\"),t=this.get_node(t),!t)return!1;var n,i,r=\"#\"===t.id?this.get_container_ul():this.get_node(t,!0),o=this;if(!r.length){for(n=0,i=t.children_d.length;i>n;n++)this._model.data[t.children_d[n]].state.opened=!1;return this.trigger(\"close_all\",{node:t})}r=this.is_open(t)?r.find(\"li.jstree-open\").addBack():r.find(\"li.jstree-open\"),r.vakata_reverse().each(function(){o.close_node(this,e||0)}),this.trigger(\"close_all\",{node:t})},is_disabled:function(t){return t=this.get_node(t),t&&t.state&&t.state.disabled},enable_node:function(e){var n,i;if(t.isArray(e)){for(e=e.slice(),n=0,i=e.length;i>n;n++)this.enable_node(e[n]);return!0}return e=this.get_node(e),e&&\"#\"!==e.id?(e.state.disabled=!1,this.get_node(e,!0).children(\".jstree-anchor\").removeClass(\"jstree-disabled\"),void this.trigger(\"enable_node\",{node:e})):!1},disable_node:function(e){var n,i;if(t.isArray(e)){for(e=e.slice(),n=0,i=e.length;i>n;n++)this.disable_node(e[n]);return!0}return e=this.get_node(e),e&&\"#\"!==e.id?(e.state.disabled=!0,this.get_node(e,!0).children(\".jstree-anchor\").addClass(\"jstree-disabled\"),void this.trigger(\"disable_node\",{node:e})):!1},activate_node:function(t,e){if(this.is_disabled(t))return!1;if(this.settings.core.multiple&&(e.metaKey||e.ctrlKey||e.shiftKey)&&(!e.shiftKey||this._data.core.last_clicked&&this.get_parent(t)&&this.get_parent(t)===this._data.core.last_clicked.parent))if(e.shiftKey){var n,i,r=this.get_node(t).id,o=this._data.core.last_clicked.id,s=this.get_node(this._data.core.last_clicked.parent).children,a=!1;for(n=0,i=s.length;i>n;n+=1)s[n]===r&&(a=!a),s[n]===o&&(a=!a),a||s[n]===r||s[n]===o?this.select_node(s[n],!1,!1,e):this.deselect_node(s[n],!1,!1,e)}else this.is_selected(t)?this.deselect_node(t,!1,!1,e):this.select_node(t,!1,!1,e);else!this.settings.core.multiple&&(e.metaKey||e.ctrlKey||e.shiftKey)&&this.is_selected(t)?this.deselect_node(t,!1,!1,e):(this.deselect_all(!0),this.select_node(t,!1,!1,e),this._data.core.last_clicked=this.get_node(t));\n",
        "                this.trigger(\"activate_node\",{node:this.get_node(t)})},hover_node:function(t){if(t=this.get_node(t,!0),!t||!t.length||t.children(\".jstree-hovered\").length)return!1;var e=this.element.find(\".jstree-hovered\"),n=this.element;e&&e.length&&this.dehover_node(e),t.children(\".jstree-anchor\").addClass(\"jstree-hovered\"),this.trigger(\"hover_node\",{node:this.get_node(t)}),setTimeout(function(){n.attr(\"aria-activedescendant\",t[0].id),t.attr(\"aria-selected\",!0)},0)},dehover_node:function(t){return t=this.get_node(t,!0),t&&t.length&&t.children(\".jstree-hovered\").length?(t.attr(\"aria-selected\",!1).children(\".jstree-anchor\").removeClass(\"jstree-hovered\"),void this.trigger(\"dehover_node\",{node:this.get_node(t)})):!1},select_node:function(e,n,i,r){var o,s,a;if(t.isArray(e)){for(e=e.slice(),s=0,a=e.length;a>s;s++)this.select_node(e[s],n,i,r);return!0}return e=this.get_node(e),e&&\"#\"!==e.id?(o=this.get_node(e,!0),void(e.state.selected||(e.state.selected=!0,this._data.core.selected.push(e.id),i||(o=this._open_to(e)),o&&o.length&&o.children(\".jstree-anchor\").addClass(\"jstree-clicked\"),this.trigger(\"select_node\",{node:e,selected:this._data.core.selected,event:r}),n||this.trigger(\"changed\",{action:\"select_node\",node:e,selected:this._data.core.selected,event:r})))):!1},deselect_node:function(e,n,i){var r,o,s;if(t.isArray(e)){for(e=e.slice(),r=0,o=e.length;o>r;r++)this.deselect_node(e[r],n,i);return!0}return e=this.get_node(e),e&&\"#\"!==e.id?(s=this.get_node(e,!0),void(e.state.selected&&(e.state.selected=!1,this._data.core.selected=t.vakata.array_remove_item(this._data.core.selected,e.id),s.length&&s.children(\".jstree-anchor\").removeClass(\"jstree-clicked\"),this.trigger(\"deselect_node\",{node:e,selected:this._data.core.selected,event:i}),n||this.trigger(\"changed\",{action:\"deselect_node\",node:e,selected:this._data.core.selected,event:i})))):!1},select_all:function(t){var e,n,i=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[\"#\"].children_d.concat(),e=0,n=this._data.core.selected.length;n>e;e++)this._model.data[this._data.core.selected[e]]&&(this._model.data[this._data.core.selected[e]].state.selected=!0);this.redraw(!0),this.trigger(\"select_all\",{selected:this._data.core.selected}),t||this.trigger(\"changed\",{action:\"select_all\",selected:this._data.core.selected,old_selection:i})},deselect_all:function(t){var e,n,i=this._data.core.selected.concat([]);for(e=0,n=this._data.core.selected.length;n>e;e++)this._model.data[this._data.core.selected[e]]&&(this._model.data[this._data.core.selected[e]].state.selected=!1);this._data.core.selected=[],this.element.find(\".jstree-clicked\").removeClass(\"jstree-clicked\"),this.trigger(\"deselect_all\",{selected:this._data.core.selected,node:i}),t||this.trigger(\"changed\",{action:\"deselect_all\",selected:this._data.core.selected,old_selection:i})},is_selected:function(t){return t=this.get_node(t),t&&\"#\"!==t.id?t.state.selected:!1},get_selected:function(e){return e?t.map(this._data.core.selected,t.proxy(function(t){return this.get_node(t)},this)):this._data.core.selected},get_state:function(){var t,e={core:{open:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(t in this._model.data)this._model.data.hasOwnProperty(t)&&\"#\"!==t&&(this._model.data[t].state.opened&&e.core.open.push(t),this._model.data[t].state.selected&&e.core.selected.push(t));return e},set_state:function(n,i){if(n){if(n.core){var r,o,s,a;if(n.core.open)return t.isArray(n.core.open)?(r=!0,o=!1,s=this,t.each(n.core.open.concat([]),function(e,a){o=s.get_node(a),o&&(s.is_loaded(a)?(s.is_closed(a)&&s.open_node(a,!1,0),n&&n.core&&n.core.open&&t.vakata.array_remove_item(n.core.open,a)):(s.is_loading(a)||s.open_node(a,t.proxy(function(){this.set_state(n,i)},s),0),r=!1))}),r&&(delete n.core.open,this.set_state(n,i)),!1):(delete n.core.open,this.set_state(n,i),!1);if(n.core.scroll)return n.core.scroll&&n.core.scroll.left!==e&&this.element.scrollLeft(n.core.scroll.left),n.core.scroll&&n.core.scroll.top!==e&&this.element.scrollTop(n.core.scroll.top),delete n.core.scroll,this.set_state(n,i),!1;if(n.core.selected)return a=this,this.deselect_all(),t.each(n.core.selected,function(t,e){a.select_node(e)}),delete n.core.selected,this.set_state(n,i),!1;if(t.isEmptyObject(n.core))return delete n.core,this.set_state(n,i),!1}return t.isEmptyObject(n)?(n=null,i&&i.call(this),this.trigger(\"set_state\"),!1):!0}return!1},refresh:function(e){this._data.core.state=this.get_state(),this._cnt=0,this._model.data={\"#\":{id:\"#\",parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}}};var n=this.get_container_ul()[0].className;e||this.element.html(\"<ul class='jstree-container-ul'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>\"+this.get_string(\"Loading ...\")+\"</a></li></ul>\"),this.load_node(\"#\",function(e,i){i&&(this.get_container_ul()[0].className=n,this.set_state(t.extend(!0,{},this._data.core.state),function(){this.trigger(\"refresh\")})),this._data.core.state=null})},set_id:function(e,n){if(e=this.get_node(e),!e||\"#\"===e.id)return!1;var i,r,o=this._model.data;for(o[e.parent].children[t.inArray(e.id,o[e.parent].children)]=n,i=0,r=e.parents.length;r>i;i++)o[e.parents[i]].children_d[t.inArray(e.id,o[e.parents[i]].children_d)]=n;for(i=0,r=e.children.length;r>i;i++)o[e.children[i]].parent=n;for(i=0,r=e.children_d.length;r>i;i++)o[e.children_d[i]].parents[t.inArray(e.id,o[e.children_d[i]].parents)]=n;return i=t.inArray(e.id,this._data.core.selected),-1!==i&&(this._data.core.selected[i]=n),i=this.get_node(e.id,!0),i&&i.attr(\"id\",n),delete o[e.id],e.id=n,o[n]=e,!0},get_text:function(t){return t=this.get_node(t),t&&\"#\"!==t.id?t.text:!1},set_text:function(e,n){var i,r,o,s;if(t.isArray(e)){for(e=e.slice(),i=0,r=e.length;r>i;i++)this.set_text(e[i],n);return!0}return e=this.get_node(e),e&&\"#\"!==e.id?(e.text=n,o=this.get_node(e,!0),o.length&&(o=o.children(\".jstree-anchor:eq(0)\"),s=o.children(\"I\").clone(),o.html(n).prepend(s),this.trigger(\"set_text\",{obj:e,text:n})),!0):!1},get_json:function(t,e,n){if(t=this.get_node(t||\"#\"),!t)return!1;e&&e.flat&&!n&&(n=[]);var i,r,o={id:t.id,text:t.text,icon:this.get_icon(t),li_attr:t.li_attr,a_attr:t.a_attr,state:{},data:e&&e.no_data?!1:t.data};if(e&&e.flat?o.parent=t.parent:o.children=[],!e||!e.no_state)for(i in t.state)t.state.hasOwnProperty(i)&&(o.state[i]=t.state[i]);if(e&&e.no_id&&(delete o.id,o.li_attr&&o.li_attr.id&&delete o.li_attr.id),e&&e.flat&&\"#\"!==t.id&&n.push(o),!e||!e.no_children)for(i=0,r=t.children.length;r>i;i++)e&&e.flat?this.get_json(t.children[i],e,n):o.children.push(this.get_json(t.children[i],e));return e&&e.flat?n:\"#\"===t.id?o.children:o},create_node:function(n,i,r,o,s){if(n=this.get_node(n),!n)return!1;if(r=r===e?\"last\":r,!r.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(n))return this.load_node(n,function(){this.create_node(n,i,r,o,!0)});i||(i={text:this.get_string(\"New node\")}),i.text===e&&(i.text=this.get_string(\"New node\"));var a,l,c,h;switch(\"#\"===n.id&&(\"before\"===r&&(r=\"first\"),\"after\"===r&&(r=\"last\")),r){case\"before\":a=this.get_node(n.parent),r=t.inArray(n.id,a.children),n=a;break;case\"after\":a=this.get_node(n.parent),r=t.inArray(n.id,a.children)+1,n=a;break;case\"inside\":case\"first\":r=0;break;case\"last\":r=n.children.length;break;default:r||(r=0)}if(r>n.children.length&&(r=n.children.length),i.id||(i.id=!0),!this.check(\"create_node\",i,n,r))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(i.id===!0&&delete i.id,i=this._parse_model_from_json(i,n.id,n.parents.concat()),!i)return!1;for(a=this.get_node(i),l=[],l.push(i),l=l.concat(a.children_d),this.trigger(\"model\",{nodes:l,parent:n.id}),n.children_d=n.children_d.concat(l),c=0,h=n.parents.length;h>c;c++)this._model.data[n.parents[c]].children_d=this._model.data[n.parents[c]].children_d.concat(l);for(i=a,a=[],c=0,h=n.children.length;h>c;c++)a[c>=r?c+1:c]=n.children[c];return a[r]=i.id,n.children=a,this.redraw_node(n,!0),o&&o.call(this,this.get_node(i)),this.trigger(\"create_node\",{node:this.get_node(i),parent:n.id,position:r}),i.id},rename_node:function(e,n){var i,r,o;if(t.isArray(e)){for(e=e.slice(),i=0,r=e.length;r>i;i++)this.rename_node(e[i],n);return!0}return e=this.get_node(e),e&&\"#\"!==e.id?(o=e.text,this.check(\"rename_node\",e,this.get_parent(e),n)?(this.set_text(e,n),this.trigger(\"rename_node\",{node:e,text:n,old:o}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1)):!1},delete_node:function(e){var n,i,r,o,s,a,l,c,h,u;if(t.isArray(e)){for(e=e.slice(),n=0,i=e.length;i>n;n++)this.delete_node(e[n]);return!0}if(e=this.get_node(e),!e||\"#\"===e.id)return!1;if(r=this.get_node(e.parent),o=t.inArray(e.id,r.children),u=!1,!this.check(\"delete_node\",e,r,o))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==o&&(r.children=t.vakata.array_remove(r.children,o)),s=e.children_d.concat([]),s.push(e.id),c=0,h=s.length;h>c;c++){for(a=0,l=e.parents.length;l>a;a++)o=t.inArray(s[c],this._model.data[e.parents[a]].children_d),-1!==o&&(this._model.data[e.parents[a]].children_d=t.vakata.array_remove(this._model.data[e.parents[a]].children_d,o));this._model.data[s[c]].state.selected&&(u=!0,o=t.inArray(s[c],this._data.core.selected),-1!==o&&(this._data.core.selected=t.vakata.array_remove(this._data.core.selected,o)))}for(this.trigger(\"delete_node\",{node:e,parent:r.id}),u&&this.trigger(\"changed\",{action:\"delete_node\",node:e,selected:this._data.core.selected,parent:r.id}),c=0,h=s.length;h>c;c++)delete this._model.data[s[c]];return this.redraw_node(r,!0),!0},check:function(e,n,i,r){n=n&&n.id?n:this.get_node(n),i=i&&i.id?i:this.get_node(i);var o=e.match(/^move_node|copy_node|create_node$/i)?i:n,s=this.settings.core.check_callback;return\"move_node\"!==e||n.id!==i.id&&t.inArray(n.id,i.children)!==r&&-1===t.inArray(i.id,n.children_d)?(o=this.get_node(o,!0),o.length&&(o=o.data(\"jstree\")),o&&o.functions&&(o.functions[e]===!1||o.functions[e]===!0)?(o.functions[e]===!1&&(this._data.core.last_error={error:\"check\",plugin:\"core\",id:\"core_02\",reason:\"Node data prevents function: \"+e,data:JSON.stringify({chk:e,pos:r,obj:n&&n.id?n.id:!1,par:i&&i.id?i.id:!1})}),o.functions[e]):s===!1||t.isFunction(s)&&s.call(this,e,n,i,r)===!1||s&&s[e]===!1?(this._data.core.last_error={error:\"check\",plugin:\"core\",id:\"core_03\",reason:\"User config for core.check_callback prevents function: \"+e,data:JSON.stringify({chk:e,pos:r,obj:n&&n.id?n.id:!1,par:i&&i.id?i.id:!1})},!1):!0):(this._data.core.last_error={error:\"check\",plugin:\"core\",id:\"core_01\",reason:\"Moving parent inside child\",data:JSON.stringify({chk:e,pos:r,obj:n&&n.id?n.id:!1,par:i&&i.id?i.id:!1})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(n,i,r,o,s){var a,l,c,h,u,p,d,f,_,g,m,v,y;if(t.isArray(n)){for(n=n.reverse().slice(),a=0,l=n.length;l>a;a++)this.move_node(n[a],i,r,o,s);return!0}if(n=n&&n.id?n:this.get_node(n),i=this.get_node(i),r=r===e?0:r,!i||!n||\"#\"===n.id)return!1;if(!r.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(i))return this.load_node(i,function(){this.move_node(n,i,r,o,!0)});if(c=(n.parent||\"#\").toString(),h=r.toString().match(/^(before|after)$/)&&\"#\"!==i.id?this.get_node(i.parent):i,u=this._model.data[n.id]?this:t.jstree.reference(n.id),p=!u||!u._id||this._id!==u._id)return this.copy_node(n,i,r,o,s)?(u&&u.delete_node(n),!0):!1;switch(\"#\"===h.id&&(\"before\"===r&&(r=\"first\"),\"after\"===r&&(r=\"last\")),r){case\"before\":r=t.inArray(i.id,h.children);break;case\"after\":r=t.inArray(i.id,h.children)+1;break;case\"inside\":case\"first\":r=0;break;case\"last\":r=h.children.length;break;default:r||(r=0)}if(r>h.children.length&&(r=h.children.length),!this.check(\"move_node\",n,h,r))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(n.parent===h.id){for(d=h.children.concat(),f=t.inArray(n.id,d),-1!==f&&(d=t.vakata.array_remove(d,f),r>f&&r--),f=[],_=0,g=d.length;g>_;_++)f[_>=r?_+1:_]=d[_];f[r]=n.id,h.children=f,this._node_changed(h.id),this.redraw(\"#\"===h.id)}else{for(f=n.children_d.concat(),f.push(n.id),_=0,g=n.parents.length;g>_;_++){for(d=[],y=u._model.data[n.parents[_]].children_d,m=0,v=y.length;v>m;m++)-1===t.inArray(y[m],f)&&d.push(y[m]);u._model.data[n.parents[_]].children_d=d}for(u._model.data[c].children=t.vakata.array_remove_item(u._model.data[c].children,n.id),_=0,g=h.parents.length;g>_;_++)this._model.data[h.parents[_]].children_d=this._model.data[h.parents[_]].children_d.concat(f);for(d=[],_=0,g=h.children.length;g>_;_++)d[_>=r?_+1:_]=h.children[_];for(d[r]=n.id,h.children=d,h.children_d.push(n.id),h.children_d=h.children_d.concat(n.children_d),n.parent=h.id,f=h.parents.concat(),f.unshift(h.id),y=n.parents.length,n.parents=f,f=f.concat(),_=0,g=n.children_d.length;g>_;_++)this._model.data[n.children_d[_]].parents=this._model.data[n.children_d[_]].parents.slice(0,-1*y),Array.prototype.push.apply(this._model.data[n.children_d[_]].parents,f);this._node_changed(c),this._node_changed(h.id),this.redraw(\"#\"===c||\"#\"===h.id)}return o&&o.call(this,n,h,r),this.trigger(\"move_node\",{node:n,parent:h.id,position:r,old_parent:c,is_multi:p,old_instance:u,new_instance:this}),!0},copy_node:function(n,i,r,o,s){var a,l,c,h,u,p,d,f,_,g,m;if(t.isArray(n)){for(n=n.reverse().slice(),a=0,l=n.length;l>a;a++)this.copy_node(n[a],i,r,o,s);return!0}if(n=n&&n.id?n:this.get_node(n),i=this.get_node(i),r=r===e?0:r,!i||!n||\"#\"===n.id)return!1;if(!r.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(i))return this.load_node(i,function(){this.copy_node(n,i,r,o,!0)});switch(f=(n.parent||\"#\").toString(),_=r.toString().match(/^(before|after)$/)&&\"#\"!==i.id?this.get_node(i.parent):i,g=this._model.data[n.id]?this:t.jstree.reference(n.id),m=!g||!g._id||this._id!==g._id,\"#\"===_.id&&(\"before\"===r&&(r=\"first\"),\"after\"===r&&(r=\"last\")),r){case\"before\":r=t.inArray(i.id,_.children);break;case\"after\":r=t.inArray(i.id,_.children)+1;break;case\"inside\":case\"first\":r=0;break;case\"last\":r=_.children.length;break;default:r||(r=0)}if(r>_.children.length&&(r=_.children.length),!this.check(\"copy_node\",n,_,r))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(d=g?g.get_json(n,{no_id:!0,no_data:!0,no_state:!0}):n,!d)return!1;if(d.id===!0&&delete d.id,d=this._parse_model_from_json(d,_.id,_.parents.concat()),!d)return!1;for(h=this.get_node(d),c=[],c.push(d),c=c.concat(h.children_d),this.trigger(\"model\",{nodes:c,parent:_.id}),u=0,p=_.parents.length;p>u;u++)this._model.data[_.parents[u]].children_d=this._model.data[_.parents[u]].children_d.concat(c);for(c=[],u=0,p=_.children.length;p>u;u++)c[u>=r?u+1:u]=_.children[u];return c[r]=h.id,_.children=c,_.children_d.push(h.id),_.children_d=_.children_d.concat(h.children_d),this._node_changed(_.id),this.redraw(\"#\"===_.id),o&&o.call(this,h,_,r),this.trigger(\"copy_node\",{node:h,original:n,parent:_.id,position:r,old_parent:f,is_multi:m,old_instance:g,new_instance:this}),h.id},cut:function(e){if(e||(e=this._data.core.selected.concat()),t.isArray(e)||(e=[e]),!e.length)return!1;var n,i,r,l=[];for(i=0,r=e.length;r>i;i++)n=this.get_node(e[i]),n&&n.id&&\"#\"!==n.id&&l.push(n);return l.length?(o=l,a=this,s=\"move_node\",void this.trigger(\"cut\",{node:e})):!1},copy:function(e){if(e||(e=this._data.core.selected.concat()),t.isArray(e)||(e=[e]),!e.length)return!1;var n,i,r,l=[];for(i=0,r=e.length;r>i;i++)n=this.get_node(e[i]),n&&n.id&&\"#\"!==n.id&&l.push(n);return l.length?(o=l,a=this,s=\"copy_node\",void this.trigger(\"copy\",{node:e})):!1},get_buffer:function(){return{mode:s,node:o,inst:a}},can_paste:function(){return s!==!1&&o!==!1},paste:function(t){return t=this.get_node(t),t&&s&&s.match(/^(copy_node|move_node)$/)&&o?(this[s](o,t)&&this.trigger(\"paste\",{parent:t.id,node:o,mode:s}),o=!1,s=!1,void(a=!1)):!1},edit:function(e,n){if(e=this._open_to(e),!e||!e.length)return!1;var i=this._data.core.rtl,r=this.element.width(),o=e.children(\".jstree-anchor\"),s=t(\"<span>\"),a=\"string\"==typeof n?n:this.get_text(e),l=t(\"<div />\",{css:{position:\"absolute\",top:\"-200px\",left:i?\"0px\":\"-1000px\",visibility:\"hidden\"}}).appendTo(\"body\"),c=t(\"<input />\",{value:a,\"class\":\"jstree-rename-input\",css:{padding:\"0\",border:\"1px solid silver\",\"box-sizing\":\"border-box\",display:\"inline-block\",height:this._data.core.li_height+\"px\",lineHeight:this._data.core.li_height+\"px\",width:\"150px\"},blur:t.proxy(function(){var t=s.children(\".jstree-rename-input\"),n=t.val();\"\"===n&&(n=a),l.remove(),s.replaceWith(o),s.remove(),this.set_text(e,a),this.rename_node(e,n)===!1&&this.set_text(e,a)},this),keydown:function(t){var e=t.which;27===e&&(this.value=a),(27===e||13===e||37===e||38===e||39===e||40===e||32===e)&&t.stopImmediatePropagation(),(27===e||13===e)&&(t.preventDefault(),this.blur())},click:function(t){t.stopImmediatePropagation()},mousedown:function(t){t.stopImmediatePropagation()},keyup:function(){c.width(Math.min(l.text(\"pW\"+this.value).width(),r))},keypress:function(t){return 13===t.which?!1:void 0}}),h={fontFamily:o.css(\"fontFamily\")||\"\",fontSize:o.css(\"fontSize\")||\"\",fontWeight:o.css(\"fontWeight\")||\"\",fontStyle:o.css(\"fontStyle\")||\"\",fontStretch:o.css(\"fontStretch\")||\"\",fontVariant:o.css(\"fontVariant\")||\"\",letterSpacing:o.css(\"letterSpacing\")||\"\",wordSpacing:o.css(\"wordSpacing\")||\"\"};this.set_text(e,\"\"),s.attr(\"class\",o.attr(\"class\")).append(o.contents().clone()).append(c),o.replaceWith(s),l.css(h),c.css(h).width(Math.min(l.text(\"pW\"+c[0].value).width(),r))[0].select()},set_theme:function(e,n){if(!e)return!1;if(n===!0){var i=this.settings.core.themes.dir;i||(i=t.jstree.path+\"/themes\"),n=i+\"/\"+e+\"/style.css\"}n&&-1===t.inArray(n,l)&&(t(\"head\").append('<link rel=\"stylesheet\" href=\"'+n+'\" type=\"text/css\" />'),l.push(n)),this._data.core.themes.name&&this.element.removeClass(\"jstree-\"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass(\"jstree-\"+e),this.element[this.settings.core.themes.responsive?\"addClass\":\"removeClass\"](\"jstree-\"+e+\"-responsive\"),this.trigger(\"set_theme\",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(t){this._data.core.themes.variant&&this.element.removeClass(\"jstree-\"+this._data.core.themes.name+\"-\"+this._data.core.themes.variant),this._data.core.themes.variant=t,t&&this.element.addClass(\"jstree-\"+this._data.core.themes.name+\"-\"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass(\"jstree-striped\")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass(\"jstree-striped\")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass(\"jstree-no-dots\")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass(\"jstree-no-dots\")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass(\"jstree-no-icons\")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass(\"jstree-no-icons\")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},set_icon:function(e,n){var i,r,o,s;if(t.isArray(e)){for(e=e.slice(),i=0,r=e.length;r>i;i++)this.set_icon(e[i],n);return!0}return e=this.get_node(e),e&&\"#\"!==e.id?(s=e.icon,e.icon=n,o=this.get_node(e,!0).children(\".jstree-anchor\").children(\".jstree-themeicon\"),n===!1?this.hide_icon(e):n===!0?o.removeClass(\"jstree-themeicon-custom \"+s).css(\"background\",\"\").removeAttr(\"rel\"):-1===n.indexOf(\"/\")&&-1===n.indexOf(\".\")?(o.removeClass(s).css(\"background\",\"\"),o.addClass(n+\" jstree-themeicon-custom\").attr(\"rel\",n)):(o.removeClass(s).css(\"background\",\"\"),o.addClass(\"jstree-themeicon-custom\").css(\"background\",\"url('\"+n+\"') center center no-repeat\").attr(\"rel\",n)),!0):!1},get_icon:function(t){return t=this.get_node(t),t&&\"#\"!==t.id?t.icon:!1},hide_icon:function(e){var n,i;if(t.isArray(e)){for(e=e.slice(),n=0,i=e.length;i>n;n++)this.hide_icon(e[n]);return!0}return e=this.get_node(e),e&&\"#\"!==e?(e.icon=!1,this.get_node(e,!0).children(\"a\").children(\".jstree-themeicon\").addClass(\"jstree-themeicon-hidden\"),!0):!1},show_icon:function(e){var n,i,r;if(t.isArray(e)){for(e=e.slice(),n=0,i=e.length;i>n;n++)this.show_icon(e[n]);return!0}return e=this.get_node(e),e&&\"#\"!==e?(r=this.get_node(e,!0),e.icon=r.length?r.children(\"a\").children(\".jstree-themeicon\").attr(\"rel\"):!0,e.icon||(e.icon=!0),r.children(\"a\").children(\".jstree-themeicon\").removeClass(\"jstree-themeicon-hidden\"),!0):!1}},t.vakata={},t.fn.vakata_reverse=[].reverse,t.vakata.attributes=function(e,n){e=t(e)[0];var i=n?{}:[];return e&&e.attributes&&t.each(e.attributes,function(e,r){-1===t.inArray(r.nodeName.toLowerCase(),[\"style\",\"contenteditable\",\"hasfocus\",\"tabindex\"])&&null!==r.nodeValue&&\"\"!==t.trim(r.nodeValue)&&(n?i[r.nodeName]=r.nodeValue:i.push(r.nodeName))}),i},t.vakata.array_unique=function(t){var e,n,i,r=[];for(e=0,i=t.length;i>e;e++){for(n=0;e>=n&&t[e]!==t[n];n++);n===e&&r.push(t[e])}return r},t.vakata.array_remove=function(t,e,n){var i=t.slice((n||e)+1||t.length);return t.length=0>e?t.length+e:e,t.push.apply(t,i),t},t.vakata.array_remove_item=function(e,n){var i=t.inArray(n,e);return-1!==i?t.vakata.array_remove(e,i):e},function(){var e={},n=function(t){t=t.toLowerCase();var e=/(chrome)[ \\/]([\\w.]+)/.exec(t)||/(webkit)[ \\/]([\\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(t)||/(msie) ([\\w.]+)/.exec(t)||t.indexOf(\"compatible\")<0&&/(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(t)||[];return{browser:e[1]||\"\",version:e[2]||\"0\"}},i=n(window.navigator.userAgent);i.browser&&(e[i.browser]=!0,e.version=i.version),e.chrome?e.webkit=!0:e.webkit&&(e.safari=!0),t.vakata.browser=e}(),t.vakata.browser.msie&&t.vakata.browser.version<8&&(t.jstree.defaults.core.animation=0);var p=document.createElement(\"I\");p.className=\"jstree-icon jstree-checkbox\",t.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0},t.jstree.plugins.checkbox=function(e,n){this.bind=function(){n.bind.call(this),this._data.checkbox.uto=!1,this.element.on(\"init.jstree\",t.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass(\"jstree-checkbox-no-clicked\")},this)).on(\"loading.jstree\",t.proxy(function(){this[this._data.checkbox.visible?\"show_checkboxes\":\"hide_checkboxes\"]()},this)),this.settings.checkbox.three_state&&this.element.on(\"changed.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree\",t.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(t.proxy(this._undetermined,this),50)},this)).on(\"model.jstree\",t.proxy(function(e,n){var i,r,o,s,a,l,c=this._model.data,h=c[n.parent],u=n.nodes,p=[];if(h.state.selected){for(r=0,o=u.length;o>r;r++)c[u[r]].state.selected=!0;this._data.core.selected=this._data.core.selected.concat(u)}else for(r=0,o=u.length;o>r;r++)if(c[u[r]].state.selected){for(s=0,a=c[u[r]].children_d.length;a>s;s++)c[c[u[r]].children_d[s]].state.selected=!0;this._data.core.selected=this._data.core.selected.concat(c[u[r]].children_d)}for(r=0,o=h.children_d.length;o>r;r++)c[h.children_d[r]].children.length||p.push(c[h.children_d[r]].parent);for(p=t.vakata.array_unique(p),s=0,a=p.length;a>s;s++)for(h=c[p[s]];h&&\"#\"!==h.id;){for(i=0,r=0,o=h.children.length;o>r;r++)i+=c[h.children[r]].state.selected;if(i!==o)break;h.state.selected=!0,this._data.core.selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.children(\".jstree-anchor\").addClass(\"jstree-clicked\"),h=this.get_node(h.parent)}this._data.core.selected=t.vakata.array_unique(this._data.core.selected)},this)).on(\"select_node.jstree\",t.proxy(function(e,n){var i,r,o,s,a=n.node,l=this._model.data,c=this.get_node(a.parent),h=this.get_node(a,!0);for(this._data.core.selected=t.vakata.array_unique(this._data.core.selected.concat(a.children_d)),i=0,r=a.children_d.length;r>i;i++)l[a.children_d[i]].state.selected=!0;for(;c&&\"#\"!==c.id;){for(o=0,i=0,r=c.children.length;r>i;i++)o+=l[c.children[i]].state.selected;if(o!==r)break;c.state.selected=!0,this._data.core.selected.push(c.id),s=this.get_node(c,!0),s&&s.length&&s.children(\".jstree-anchor\").addClass(\"jstree-clicked\"),c=this.get_node(c.parent)}h.length&&h.find(\".jstree-anchor\").addClass(\"jstree-clicked\")},this)).on(\"deselect_node.jstree\",t.proxy(function(e,n){var i,r,o,s=n.node,a=this.get_node(s,!0);for(i=0,r=s.children_d.length;r>i;i++)this._model.data[s.children_d[i]].state.selected=!1;for(i=0,r=s.parents.length;r>i;i++)this._model.data[s.parents[i]].state.selected=!1,o=this.get_node(s.parents[i],!0),o&&o.length&&o.children(\".jstree-anchor\").removeClass(\"jstree-clicked\");for(o=[],i=0,r=this._data.core.selected.length;r>i;i++)-1===t.inArray(this._data.core.selected[i],s.children_d)&&-1===t.inArray(this._data.core.selected[i],s.parents)&&o.push(this._data.core.selected[i]);this._data.core.selected=t.vakata.array_unique(o),a.length&&a.find(\".jstree-anchor\").removeClass(\"jstree-clicked\")},this)).on(\"delete_node.jstree\",t.proxy(function(t,e){for(var n,i,r,o,s=this.get_node(e.parent),a=this._model.data;s&&\"#\"!==s.id;){for(r=0,n=0,i=s.children.length;i>n;n++)r+=a[s.children[n]].state.selected;if(r!==i)break;s.state.selected=!0,this._data.core.selected.push(s.id),o=this.get_node(s,!0),o&&o.length&&o.children(\".jstree-anchor\").addClass(\"jstree-clicked\"),s=this.get_node(s.parent)}},this)).on(\"move_node.jstree\",t.proxy(function(e,n){var i,r,o,s,a,l=n.is_multi,c=n.old_parent,h=this.get_node(n.parent),u=this._model.data;if(!l)for(i=this.get_node(c);i&&\"#\"!==i.id;){for(r=0,o=0,s=i.children.length;s>o;o++)r+=u[i.children[o]].state.selected;if(r!==s)break;i.state.selected=!0,this._data.core.selected.push(i.id),a=this.get_node(i,!0),a&&a.length&&a.children(\".jstree-anchor\").addClass(\"jstree-clicked\"),i=this.get_node(i.parent)}for(i=h;i&&\"#\"!==i.id;){for(r=0,o=0,s=i.children.length;s>o;o++)r+=u[i.children[o]].state.selected;if(r===s)i.state.selected||(i.state.selected=!0,this._data.core.selected.push(i.id),a=this.get_node(i,!0),a&&a.length&&a.children(\".jstree-anchor\").addClass(\"jstree-clicked\"));else{if(!i.state.selected)break;i.state.selected=!1,this._data.core.selected=t.vakata.array_remove_item(this._data.core.selected,i.id),a=this.get_node(i,!0),a&&a.length&&a.children(\".jstree-anchor\").removeClass(\"jstree-clicked\")}i=this.get_node(i.parent)}},this))},this._undetermined=function(){var e,n,i=this._model.data,r=this._data.core.selected,o=[],s=this;for(e=0,n=r.length;n>e;e++)i[r[e]]&&i[r[e]].parents&&(o=o.concat(i[r[e]].parents));for(this.element.find(\".jstree-closed\").not(\":has(ul)\").each(function(){var t=s.get_node(this);!t.state.loaded&&t.original&&t.original.state&&t.original.state.undetermined&&t.original.state.undetermined===!0&&(o.push(t.id),o=o.concat(t.parents))}),o=t.vakata.array_unique(o),e=t.inArray(\"#\",o),-1!==e&&(o=t.vakata.array_remove(o,e)),this.element.find(\".jstree-undetermined\").removeClass(\"jstree-undetermined\"),e=0,n=o.length;n>e;e++)i[o[e]].state.selected||(r=this.get_node(o[e],!0),r&&r.length&&r.children(\"a\").children(\".jstree-checkbox\").addClass(\"jstree-undetermined\"))},this.redraw_node=function(e,i,r){if(e=n.redraw_node.call(this,e,i,r)){var o=e.getElementsByTagName(\"A\")[0];o.insertBefore(p.cloneNode(),o.childNodes[0])}return!r&&this.settings.checkbox.three_state&&(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(t.proxy(this._undetermined,this),50)),e},this.activate_node=function(e,i){return(this.settings.checkbox.whole_node||t(i.target).hasClass(\"jstree-checkbox\"))&&(i.ctrlKey=!0),n.activate_node.call(this,e,i)},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.element.children(\"ul\").removeClass(\"jstree-no-checkboxes\")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.element.children(\"ul\").addClass(\"jstree-no-checkboxes\")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()}},t.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:\"Create\",action:function(e){var n=t.jstree.reference(e.reference),i=n.get_node(e.reference);n.create_node(i,{},\"last\",function(t){setTimeout(function(){n.edit(t)},0)})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:\"Rename\",action:function(e){var n=t.jstree.reference(e.reference),i=n.get_node(e.reference);n.edit(i)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:\"Delete\",action:function(e){var n=t.jstree.reference(e.reference),i=n.get_node(e.reference);n.delete_node(n.is_selected(i)?n.get_selected():i)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:\"Edit\",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:\"Cut\",action:function(e){var n=t.jstree.reference(e.reference),i=n.get_node(e.reference);n.cut(n.is_selected(i)?n.get_selected():i)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:\"Copy\",action:function(e){var n=t.jstree.reference(e.reference),i=n.get_node(e.reference);n.copy(n.is_selected(i)?n.get_selected():i)}},paste:{separator_before:!1,icon:!1,_disabled:function(e){return!t.jstree.reference(e.reference).can_paste()},separator_after:!1,label:\"Paste\",action:function(e){var n=t.jstree.reference(e.reference),i=n.get_node(e.reference);n.paste(i)}}}}}}},t.jstree.plugins.contextmenu=function(n,i){this.bind=function(){i.bind.call(this),this.element.on(\"contextmenu.jstree\",\".jstree-anchor\",t.proxy(function(t){t.preventDefault(),this.is_loading(t.currentTarget)||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY,t)},this)).on(\"click.jstree\",\".jstree-anchor\",t.proxy(function(){this._data.contextmenu.visible&&t.vakata.context.hide()},this)),t(document).on(\"context_hide.vakata\",t.proxy(function(){this._data.contextmenu.visible=!1},this))},this.teardown=function(){this._data.contextmenu.visible&&t.vakata.context.hide(),i.teardown.call(this)},this.show_contextmenu=function(n,i,r,o){if(n=this.get_node(n),!n||\"#\"===n.id)return!1;var s=this.settings.contextmenu,a=this.get_node(n,!0),l=a.children(\".jstree-anchor\"),c=!1,h=!1;(s.show_at_node||i===e||r===e)&&(c=l.offset(),i=c.left,r=c.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(n)&&(this.deselect_all(),this.select_node(n,!1,!1,o)),h=s.items,t.isFunction(h)&&(h=h.call(this,n,t.proxy(function(t){this._show_contextmenu(n,i,r,t)},this))),t.isPlainObject(h)&&this._show_contextmenu(n,i,r,h)},this._show_contextmenu=function(e,n,i,r){var o=this.get_node(e,!0),s=o.children(\".jstree-anchor\");t(document).one(\"context_show.vakata\",t.proxy(function(e,n){var i=\"jstree-contextmenu jstree-\"+this.get_theme()+\"-contextmenu\";t(n.element).addClass(i)},this)),this._data.contextmenu.visible=!0,t.vakata.context.show(s,{x:n,y:i},r),this.trigger(\"show_contextmenu\",{node:e,x:n,y:i})}},function(t){var e=!1,n={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:\"\",is_visible:!1};t.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(e){t(document).triggerHandler(\"context_\"+e+\".vakata\",{reference:n.reference,element:n.element,position:{x:n.position_x,y:n.position_y}})},_execute:function(e){return e=n.items[e],e&&(!e._disabled||t.isFunction(e._disabled)&&!e._disabled({item:e,reference:n.reference,element:n.element}))&&e.action?e.action.call(null,{item:e,reference:n.reference,element:n.element,position:{x:n.position_x,y:n.position_y}}):!1},_parse:function(e,i){if(!e)return!1;i||(n.html=\"\",n.items=[]);var r,o=\"\",s=!1;return i&&(o+=\"<ul>\"),t.each(e,function(e,i){return i?(n.items.push(i),!s&&i.separator_before&&(o+=\"<li class='vakata-context-separator'><a href='#' \"+(t.vakata.context.settings.icons?\"\":'style=\"margin-left:0px;\"')+\">&#160;</a></li>\"),s=!1,o+=\"<li class='\"+(i._class||\"\")+(i._disabled===!0||t.isFunction(i._disabled)&&i._disabled({item:i,reference:n.reference,element:n.element})?\" vakata-contextmenu-disabled \":\"\")+\"' \"+(i.shortcut?\" data-shortcut='\"+i.shortcut+\"' \":\"\")+\">\",o+=\"<a href='#' rel='\"+(n.items.length-1)+\"'>\",t.vakata.context.settings.icons&&(o+=\"<i \",i.icon&&(o+=-1!==i.icon.indexOf(\"/\")||-1!==i.icon.indexOf(\".\")?\" style='background:url(\\\"\"+i.icon+\"\\\") center center no-repeat' \":\" class='\"+i.icon+\"' \"),o+=\"></i><span class='vakata-contextmenu-sep'>&#160;</span>\"),o+=i.label+(i.shortcut?' <span class=\"vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+i.shortcut+'\">'+(i.shortcut_label||\"\")+\"</span>\":\"\")+\"</a>\",i.submenu&&(r=t.vakata.context._parse(i.submenu,!0),r&&(o+=r)),o+=\"</li>\",void(i.separator_after&&(o+=\"<li class='vakata-context-separator'><a href='#' \"+(t.vakata.context.settings.icons?\"\":'style=\"margin-left:0px;\"')+\">&#160;</a></li>\",s=!0))):!0\n",
        "                }),o=o.replace(/<li class\\='vakata-context-separator'\\><\\/li\\>$/,\"\"),i&&(o+=\"</ul>\"),i||(n.html=o,t.vakata.context._trigger(\"parse\")),o.length>10?o:!1},_show_submenu:function(n){if(n=t(n),n.length&&n.children(\"ul\").length){var i=n.children(\"ul\"),r=n.offset().left+n.outerWidth(),o=n.offset().top,s=i.width(),a=i.height(),l=t(window).width()+t(window).scrollLeft(),c=t(window).height()+t(window).scrollTop();e?n[r-(s+10+n.outerWidth())<0?\"addClass\":\"removeClass\"](\"vakata-context-left\"):n[r+s+10>l?\"addClass\":\"removeClass\"](\"vakata-context-right\"),o+a+10>c&&i.css(\"bottom\",\"-1px\"),i.show()}},show:function(i,r,o){var s,a,l,c,h,u,p,d,f=!0;switch(n.element&&n.element.length&&n.element.width(\"\"),f){case!r&&!i:return!1;case!!r&&!!i:n.reference=i,n.position_x=r.x,n.position_y=r.y;break;case!r&&!!i:n.reference=i,s=i.offset(),n.position_x=s.left+i.outerHeight(),n.position_y=s.top;break;case!!r&&!i:n.position_x=r.x,n.position_y=r.y}i&&!o&&t(i).data(\"vakata_contextmenu\")&&(o=t(i).data(\"vakata_contextmenu\")),t.vakata.context._parse(o)&&n.element.html(n.html),n.items.length&&(a=n.element,l=n.position_x,c=n.position_y,h=a.width(),u=a.height(),p=t(window).width()+t(window).scrollLeft(),d=t(window).height()+t(window).scrollTop(),e&&(l-=a.outerWidth(),l<t(window).scrollLeft()+20&&(l=t(window).scrollLeft()+20)),l+h+20>p&&(l=p-(h+20)),c+u+20>d&&(c=d-(u+20)),n.element.css({left:l,top:c}).show().find(\"a:eq(0)\").focus().parent().addClass(\"vakata-context-hover\"),n.is_visible=!0,t.vakata.context._trigger(\"show\"))},hide:function(){n.is_visible&&(n.element.hide().find(\"ul\").hide().end().find(\":focus\").blur(),n.is_visible=!1,t.vakata.context._trigger(\"hide\"))}},t(function(){e=\"rtl\"===t(\"body\").css(\"direction\");var i=!1;n.element=t(\"<ul class='vakata-context'></ul>\"),n.element.on(\"mouseenter\",\"li\",function(e){e.stopImmediatePropagation(),t.contains(this,e.relatedTarget)||(i&&clearTimeout(i),n.element.find(\".vakata-context-hover\").removeClass(\"vakata-context-hover\").end(),t(this).siblings().find(\"ul\").hide().end().end().parentsUntil(\".vakata-context\",\"li\").addBack().addClass(\"vakata-context-hover\"),t.vakata.context._show_submenu(this))}).on(\"mouseleave\",\"li\",function(e){t.contains(this,e.relatedTarget)||t(this).find(\".vakata-context-hover\").addBack().removeClass(\"vakata-context-hover\")}).on(\"mouseleave\",function(){t(this).find(\".vakata-context-hover\").removeClass(\"vakata-context-hover\"),t.vakata.context.settings.hide_onmouseleave&&(i=setTimeout(function(){return function(){t.vakata.context.hide()}}(this),t.vakata.context.settings.hide_onmouseleave))}).on(\"click\",\"a\",function(t){t.preventDefault()}).on(\"mouseup\",\"a\",function(){t(this).blur().parent().hasClass(\"vakata-context-disabled\")||t.vakata.context._execute(t(this).attr(\"rel\"))===!1||t.vakata.context.hide()}).on(\"keydown\",\"a\",function(e){var i=null;switch(e.which){case 13:case 32:e.type=\"mouseup\",e.preventDefault(),t(e.currentTarget).trigger(e);break;case 37:n.is_visible&&(n.element.find(\".vakata-context-hover\").last().parents(\"li:eq(0)\").find(\"ul\").hide().find(\".vakata-context-hover\").removeClass(\"vakata-context-hover\").end().end().children(\"a\").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 38:n.is_visible&&(i=n.element.find(\"ul:visible\").addBack().last().children(\".vakata-context-hover\").removeClass(\"vakata-context-hover\").prevAll(\"li:not(.vakata-context-separator)\").first(),i.length||(i=n.element.find(\"ul:visible\").addBack().last().children(\"li:not(.vakata-context-separator)\").last()),i.addClass(\"vakata-context-hover\").children(\"a\").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 39:n.is_visible&&(n.element.find(\".vakata-context-hover\").last().children(\"ul\").show().children(\"li:not(.vakata-context-separator)\").removeClass(\"vakata-context-hover\").first().addClass(\"vakata-context-hover\").children(\"a\").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 40:n.is_visible&&(i=n.element.find(\"ul:visible\").addBack().last().children(\".vakata-context-hover\").removeClass(\"vakata-context-hover\").nextAll(\"li:not(.vakata-context-separator)\").first(),i.length||(i=n.element.find(\"ul:visible\").addBack().last().children(\"li:not(.vakata-context-separator)\").first()),i.addClass(\"vakata-context-hover\").children(\"a\").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 27:t.vakata.context.hide(),e.preventDefault()}}).on(\"keydown\",function(t){t.preventDefault();var e=n.element.find(\".vakata-contextmenu-shortcut-\"+t.which).parent();e.parent().not(\".vakata-context-disabled\")&&e.mouseup()}).appendTo(\"body\"),t(document).on(\"mousedown\",function(e){n.is_visible&&!t.contains(n.element[0],e.target)&&t.vakata.context.hide()}).on(\"context_show.vakata\",function(){n.element.find(\"li:has(ul)\").children(\"a\").addClass(\"vakata-context-parent\"),e&&n.element.addClass(\"vakata-context-rtl\").css(\"direction\",\"rtl\"),n.element.find(\"ul\").hide().end()})})}(t),t.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0},t.jstree.plugins.dnd=function(e,n){this.bind=function(){n.bind.call(this),this.element.on(\"mousedown touchstart\",\".jstree-anchor\",t.proxy(function(e){var n=this.get_node(e.target),i=this.is_selected(n)?this.get_selected().length:1;return n&&n.id&&\"#\"!==n.id&&(1===e.which||\"touchstart\"===e.type)&&(this.settings.dnd.is_draggable===!0||t.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,n))?(this.element.trigger(\"mousedown.jstree\"),t.vakata.dnd.start(e,{jstree:!0,origin:this,obj:this.get_node(n,!0),nodes:i>1?this.get_selected():[n.id]},'<div id=\"jstree-dnd\" class=\"jstree-'+this.get_theme()+'\"><i class=\"jstree-icon jstree-er\"></i>'+(i>1?i+\" \"+this.get_string(\"nodes\"):this.get_text(e.currentTarget,!0))+'<ins class=\"jstree-copy\" style=\"display:none;\">+</ins></div>')):void 0},this))}},t(function(){var e=!1,n=!1,i=!1,r=t('<div id=\"jstree-marker\">&#160;</div>').hide().appendTo(\"body\");t(document).bind(\"dnd_start.vakata\",function(){e=!1}).bind(\"dnd_move.vakata\",function(o,s){if(i&&clearTimeout(i),s.data.jstree&&(!s.event.target.id||\"jstree-marker\"!==s.event.target.id)){var a,l,c,h,u,p,d,f,_,g,m,v,y=t.jstree.reference(s.event.target),b=!1,w=!1,x=!1;if(y&&y._data&&y._data.dnd)if(r.attr(\"class\",\"jstree-\"+y.get_theme()),s.helper.children().attr(\"class\",\"jstree-\"+y.get_theme()).find(\".jstree-copy:eq(0)\")[s.data.origin&&s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey)?\"show\":\"hide\"](),s.event.target!==y.element[0]&&s.event.target!==y.get_container_ul()[0]||0!==y.get_container_ul().children().length){if(b=t(s.event.target).closest(\"a\"),b&&b.length&&b.parent().is(\".jstree-closed, .jstree-open, .jstree-leaf\")&&(w=b.offset(),x=s.event.pageY-w.top,c=b.height(),p=c/3>x?[\"b\",\"i\",\"a\"]:x>c-c/3?[\"a\",\"i\",\"b\"]:x>c/2?[\"i\",\"a\",\"b\"]:[\"i\",\"b\",\"a\"],t.each(p,function(o,x){switch(x){case\"b\":a=w.left-6,l=w.top-5,h=y.get_parent(b),u=b.parent().index();break;case\"i\":a=w.left-2,l=w.top-5+c/2+1,h=b.parent(),u=0;break;case\"a\":a=w.left-6,l=w.top-5+c,h=y.get_parent(b),u=b.parent().index()+1}for(d=!0,f=0,_=s.data.nodes.length;_>f;f++)if(g=s.data.origin&&s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey)?\"copy_node\":\"move_node\",m=u,\"move_node\"===g&&\"a\"===x&&s.data.origin&&s.data.origin===y&&h===y.get_parent(s.data.nodes[f])&&(v=y.get_node(h),m>t.inArray(s.data.nodes[f],v.children)&&(m-=1)),d=d&&(y&&y.settings&&y.settings.dnd&&y.settings.dnd.check_while_dragging===!1||y.check(g,s.data.origin&&s.data.origin!==y?s.data.origin.get_node(s.data.nodes[f]):s.data.nodes[f],h,m)),!d){y&&y.last_error&&(n=y.last_error());break}return d?(\"i\"===x&&b.parent().is(\".jstree-closed\")&&y.settings.dnd.open_timeout&&(i=setTimeout(function(t,e){return function(){t.open_node(e)}}(y,b),y.settings.dnd.open_timeout)),e={ins:y,par:h,pos:u},r.css({left:a+\"px\",top:l+\"px\"}).show(),s.helper.find(\".jstree-icon:eq(0)\").removeClass(\"jstree-er\").addClass(\"jstree-ok\"),n={},p=!0,!1):void 0}),p===!0))return}else{for(d=!0,f=0,_=s.data.nodes.length;_>f&&(d=d&&y.check(s.data.origin&&s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey)?\"copy_node\":\"move_node\",s.data.origin&&s.data.origin!==y?s.data.origin.get_node(s.data.nodes[f]):s.data.nodes[f],\"#\",\"last\"),d);f++);if(d)return e={ins:y,par:\"#\",pos:\"last\"},r.hide(),void s.helper.find(\".jstree-icon:eq(0)\").removeClass(\"jstree-er\").addClass(\"jstree-ok\")}e=!1,s.helper.find(\".jstree-icon\").removeClass(\"jstree-ok\").addClass(\"jstree-er\"),r.hide()}}).bind(\"dnd_scroll.vakata\",function(t,n){n.data.jstree&&(r.hide(),e=!1,n.helper.find(\".jstree-icon:eq(0)\").removeClass(\"jstree-ok\").addClass(\"jstree-er\"))}).bind(\"dnd_stop.vakata\",function(o,s){if(i&&clearTimeout(i),s.data.jstree){r.hide();var a,l,c=[];if(e){for(a=0,l=s.data.nodes.length;l>a;a++)c[a]=s.data.origin?s.data.origin.get_node(s.data.nodes[a]):s.data.nodes[a];e.ins[s.data.origin&&s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey)?\"copy_node\":\"move_node\"](c,e.par,e.pos)}else a=t(s.event.target).closest(\".jstree\"),a.length&&n&&n.error&&\"check\"===n.error&&(a=a.jstree(!0),a&&a.settings.core.error.call(this,n))}}).bind(\"keyup keydown\",function(e,n){n=t.vakata.dnd._get(),n.data&&n.data.jstree&&n.helper.find(\".jstree-copy:eq(0)\")[n.data.origin&&n.data.origin.settings.dnd.copy&&(e.metaKey||e.ctrlKey)?\"show\":\"hide\"]()})}),function(t){t.fn.vakata_reverse=[].reverse;var e={element:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1};t.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5},_trigger:function(e,n){var i=t.vakata.dnd._get();i.event=n,t(document).triggerHandler(\"dnd_\"+e+\".vakata\",i)},_get:function(){return{data:e.data,element:e.element,helper:e.helper}},_clean:function(){e.helper&&e.helper.remove(),e.scroll_i&&(clearInterval(e.scroll_i),e.scroll_i=!1),e={element:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1},t(document).off(\"mousemove touchmove\",t.vakata.dnd.drag),t(document).off(\"mouseup touchend\",t.vakata.dnd.stop)},_scroll:function(n){if(!e.scroll_e||!e.scroll_l&&!e.scroll_t)return e.scroll_i&&(clearInterval(e.scroll_i),e.scroll_i=!1),!1;if(!e.scroll_i)return e.scroll_i=setInterval(t.vakata.dnd._scroll,100),!1;if(n===!0)return!1;var i=e.scroll_e.scrollTop(),r=e.scroll_e.scrollLeft();e.scroll_e.scrollTop(i+e.scroll_t*t.vakata.dnd.settings.scroll_speed),e.scroll_e.scrollLeft(r+e.scroll_l*t.vakata.dnd.settings.scroll_speed),(i!==e.scroll_e.scrollTop()||r!==e.scroll_e.scrollLeft())&&t.vakata.dnd._trigger(\"scroll\",e.scroll_e)},start:function(n,i,r){\"touchstart\"===n.type&&n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(n.pageX=n.originalEvent.changedTouches[0].pageX,n.pageY=n.originalEvent.changedTouches[0].pageY,n.target=document.elementFromPoint(n.originalEvent.changedTouches[0].pageX-window.pageXOffset,n.originalEvent.changedTouches[0].pageY-window.pageYOffset)),e.is_drag&&t.vakata.dnd.stop({});try{n.currentTarget.unselectable=\"on\",n.currentTarget.onselectstart=function(){return!1},n.currentTarget.style&&(n.currentTarget.style.MozUserSelect=\"none\")}catch(o){}return e.init_x=n.pageX,e.init_y=n.pageY,e.data=i,e.is_down=!0,e.element=n.currentTarget,r!==!1&&(e.helper=t(\"<div id='vakata-dnd'></div>\").html(r).css({display:\"block\",margin:\"0\",padding:\"0\",position:\"absolute\",top:\"-2000px\",lineHeight:\"16px\",zIndex:\"10000\"})),t(document).bind(\"mousemove touchmove\",t.vakata.dnd.drag),t(document).bind(\"mouseup touchend\",t.vakata.dnd.stop),!1},drag:function(n){if(\"touchmove\"===n.type&&n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(n.pageX=n.originalEvent.changedTouches[0].pageX,n.pageY=n.originalEvent.changedTouches[0].pageY,n.target=document.elementFromPoint(n.originalEvent.changedTouches[0].pageX-window.pageXOffset,n.originalEvent.changedTouches[0].pageY-window.pageYOffset)),e.is_down){if(!e.is_drag){if(!(Math.abs(n.pageX-e.init_x)>t.vakata.dnd.settings.threshold||Math.abs(n.pageY-e.init_y)>t.vakata.dnd.settings.threshold))return;e.helper&&(e.helper.appendTo(\"body\"),e.helper_w=e.helper.outerWidth()),e.is_drag=!0,t.vakata.dnd._trigger(\"start\",n)}var i=!1,r=!1,o=!1,s=!1,a=!1,l=!1,c=!1,h=!1,u=!1,p=!1;e.scroll_t=0,e.scroll_l=0,e.scroll_e=!1,t(n.target).parentsUntil(\"body\").addBack().vakata_reverse().filter(function(){return/^auto|scroll$/.test(t(this).css(\"overflow\"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var i=t(this),r=i.offset();return this.scrollHeight>this.offsetHeight&&(r.top+i.height()-n.pageY<t.vakata.dnd.settings.scroll_proximity&&(e.scroll_t=1),n.pageY-r.top<t.vakata.dnd.settings.scroll_proximity&&(e.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(r.left+i.width()-n.pageX<t.vakata.dnd.settings.scroll_proximity&&(e.scroll_l=1),n.pageX-r.left<t.vakata.dnd.settings.scroll_proximity&&(e.scroll_l=-1)),e.scroll_t||e.scroll_l?(e.scroll_e=t(this),!1):void 0}),e.scroll_e||(i=t(document),r=t(window),o=i.height(),s=r.height(),a=i.width(),l=r.width(),c=i.scrollTop(),h=i.scrollLeft(),o>s&&n.pageY-c<t.vakata.dnd.settings.scroll_proximity&&(e.scroll_t=-1),o>s&&s-(n.pageY-c)<t.vakata.dnd.settings.scroll_proximity&&(e.scroll_t=1),a>l&&n.pageX-h<t.vakata.dnd.settings.scroll_proximity&&(e.scroll_l=-1),a>l&&l-(n.pageX-h)<t.vakata.dnd.settings.scroll_proximity&&(e.scroll_l=1),(e.scroll_t||e.scroll_l)&&(e.scroll_e=i)),e.scroll_e&&t.vakata.dnd._scroll(!0),e.helper&&(u=parseInt(n.pageY+t.vakata.dnd.settings.helper_top,10),p=parseInt(n.pageX+t.vakata.dnd.settings.helper_left,10),o&&u+25>o&&(u=o-50),a&&p+e.helper_w>a&&(p=a-(e.helper_w+2)),e.helper.css({left:p+\"px\",top:u+\"px\"})),t.vakata.dnd._trigger(\"move\",n)}},stop:function(n){\"touchend\"===n.type&&n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(n.pageX=n.originalEvent.changedTouches[0].pageX,n.pageY=n.originalEvent.changedTouches[0].pageY,n.target=document.elementFromPoint(n.originalEvent.changedTouches[0].pageX-window.pageXOffset,n.originalEvent.changedTouches[0].pageY-window.pageYOffset)),e.is_drag&&t.vakata.dnd._trigger(\"stop\",n),t.vakata.dnd._clean()}}}(jQuery),t.jstree.defaults.search={ajax:!1,fuzzy:!0,case_sensitive:!1,show_only_matches:!1,close_opened_onclear:!0},t.jstree.plugins.search=function(e,n){this.bind=function(){n.bind.call(this),this._data.search.str=\"\",this._data.search.dom=t(),this._data.search.res=[],this._data.search.opn=[],this._data.search.sln=null,this.settings.search.show_only_matches&&this.element.on(\"search.jstree\",function(e,n){n.nodes.length&&(t(this).find(\"li\").hide().filter(\".jstree-last\").filter(function(){return this.nextSibling}).removeClass(\"jstree-last\"),n.nodes.parentsUntil(\".jstree\").addBack().show().filter(\"ul\").each(function(){t(this).children(\"li:visible\").eq(-1).addClass(\"jstree-last\")}))}).on(\"clear_search.jstree\",function(e,n){n.nodes.length&&t(this).find(\"li\").css(\"display\",\"\").filter(\".jstree-last\").filter(function(){return this.nextSibling}).removeClass(\"jstree-last\")})},this.search=function(e,n){if(e===!1||\"\"===t.trim(e))return this.clear_search();var i,r,o=this.settings.search,s=o.ajax?t.extend({},o.ajax):!1,a=null,l=[],c=[];if(this._data.search.res.length&&this.clear_search(),!n&&s!==!1)return s.data||(s.data={}),s.data.str=e,t.ajax(s).fail(t.proxy(function(){this._data.core.last_error={error:\"ajax\",plugin:\"search\",id:\"search_01\",reason:\"Could not load search parents\",data:JSON.stringify(s)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(t.proxy(function(n){n&&n.d&&(n=n.d),this._data.search.sln=t.isArray(n)?n:[],this._search_load(e)},this));if(this._data.search.str=e,this._data.search.dom=t(),this._data.search.res=[],this._data.search.opn=[],a=new t.vakata.search(e,!0,{caseSensitive:o.case_sensitive,fuzzy:o.fuzzy}),t.each(this._model.data,function(t,e){e.text&&a.search(e.text).isMatch&&(l.push(t),c=c.concat(e.parents))}),l.length){for(c=t.vakata.array_unique(c),this._search_open(c),i=0,r=l.length;r>i;i++)a=this.get_node(l[i],!0),a&&(this._data.search.dom=this._data.search.dom.add(a));this._data.search.res=l,this._data.search.dom.children(\".jstree-anchor\").addClass(\"jstree-search\")}this.trigger(\"search\",{nodes:this._data.search.dom,str:e,res:this._data.search.res})},this.clear_search=function(){this._data.search.dom.children(\".jstree-anchor\").removeClass(\"jstree-search\"),this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger(\"clear_search\",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.str=\"\",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=t()},this._search_open=function(e){var n=this;t.each(e.concat([]),function(t,i){i=document.getElementById(i),i&&n.is_closed(i)&&(n._data.search.opn.push(i.id),n.open_node(i,function(){n._search_open(e)},0))})},this._search_load=function(e){var n=!0,i=this,r=i._model.data;t.isArray(this._data.search.sln)&&(this._data.search.sln.length?(t.each(this._data.search.sln,function(o,s){r[s]&&(t.vakata.array_remove_item(i._data.search.sln,s),r[s].state.loaded||(i.load_node(s,function(t,n){n&&i._search_load(e)}),n=!1))}),n&&(this._data.search.sln=[],this._search_load(e))):(this._data.search.sln=null,this.search(e,!0)))}},function(t){t.vakata.search=function(t,e,n){n=n||{},n.fuzzy!==!1&&(n.fuzzy=!0),t=n.caseSensitive?t:t.toLowerCase();var i,r,o,s,a=n.location||0,l=n.distance||100,c=n.threshold||.6,h=t.length;return h>32&&(n.fuzzy=!1),n.fuzzy&&(i=1<<h-1,r=function(){var e={},n=0;for(n=0;h>n;n++)e[t.charAt(n)]=0;for(n=0;h>n;n++)e[t.charAt(n)]|=1<<h-n-1;return e}(),o=function(t,e){var n=t/h,i=Math.abs(a-e);return l?n+i/l:i?1:n}),s=function(e){if(e=n.caseSensitive?e:e.toLowerCase(),t===e||-1!==e.indexOf(t))return{isMatch:!0,score:0};if(!n.fuzzy)return{isMatch:!1,score:1};var s,l,u,p,d,f,_,g,m,v=e.length,y=c,b=e.indexOf(t,a),w=h+v,x=1,k=[];for(-1!==b&&(y=Math.min(o(0,b),y),b=e.lastIndexOf(t,a+h),-1!==b&&(y=Math.min(o(0,b),y))),b=-1,s=0;h>s;s++){for(u=0,p=w;p>u;)o(s,a+p)<=y?u=p:w=p,p=Math.floor((w-u)/2+u);for(w=p,f=Math.max(1,a-p+1),_=Math.min(a+p,v)+h,g=new Array(_+2),g[_+1]=(1<<s)-1,l=_;l>=f;l--)if(m=r[e.charAt(l-1)],g[l]=0===s?(g[l+1]<<1|1)&m:(g[l+1]<<1|1)&m|((d[l+1]|d[l])<<1|1)|d[l+1],g[l]&i&&(x=o(s,l-1),y>=x)){if(y=x,b=l-1,k.push(b),!(b>a))break;f=Math.max(1,2*a-b)}if(o(s+1,a)>y)break;d=g}return{isMatch:b>=0,score:x}},e===!0?{search:s}:s(e)}}(jQuery),t.jstree.defaults.sort=function(t,e){return this.get_text(t)>this.get_text(e)?1:-1},t.jstree.plugins.sort=function(e,n){this.bind=function(){n.bind.call(this),this.element.on(\"model.jstree\",t.proxy(function(t,e){this.sort(e.parent,!0)},this)).on(\"rename_node.jstree create_node.jstree\",t.proxy(function(t,e){this.sort(e.parent||e.node.parent,!1),this.redraw_node(e.parent||e.node.parent,!0)},this)).on(\"move_node.jstree copy_node.jstree\",t.proxy(function(t,e){this.sort(e.parent,!1),this.redraw_node(e.parent,!0)},this))},this.sort=function(e,n){var i,r;if(e=this.get_node(e),e&&e.children&&e.children.length&&(e.children.sort(t.proxy(this.settings.sort,this)),n))for(i=0,r=e.children_d.length;r>i;i++)this.sort(e.children_d[i],!1)}};var d=!1;t.jstree.defaults.state={key:\"jstree\",events:\"changed.jstree open_node.jstree close_node.jstree\",ttl:!1,filter:!1},t.jstree.plugins.state=function(e,n){this.bind=function(){n.bind.call(this);var e=t.proxy(function(){this.element.on(this.settings.state.events,t.proxy(function(){d&&clearTimeout(d),d=setTimeout(t.proxy(function(){this.save_state()},this),100)},this))},this);this.element.on(\"ready.jstree\",t.proxy(function(){this.element.one(\"restore_state.jstree\",e),this.restore_state()||e()},this))},this.save_state=function(){var e={state:this.get_state(),ttl:this.settings.state.ttl,sec:+new Date};t.vakata.storage.set(this.settings.state.key,JSON.stringify(e))},this.restore_state=function(){var e=t.vakata.storage.get(this.settings.state.key);if(e)try{e=JSON.parse(e)}catch(n){return!1}return e&&e.ttl&&e.sec&&+new Date-e.sec>e.ttl?!1:(e&&e.state&&(e=e.state),e&&t.isFunction(this.settings.state.filter)&&(e=this.settings.state.filter.call(this,e)),e?(this.element.one(\"set_state.jstree\",function(n,i){i.instance.trigger(\"restore_state\",{state:t.extend(!0,{},e)})}),this.set_state(e),!0):!1)},this.clear_state=function(){return t.vakata.storage.del(this.settings.state.key)}},function(t){t.vakata.storage={set:function(t,e){return window.localStorage.setItem(t,e)},get:function(t){return window.localStorage.getItem(t)},del:function(t){return window.localStorage.removeItem(t)}}}(jQuery),t.jstree.defaults.types={\"#\":{},\"default\":{}},t.jstree.plugins.types=function(n,i){this.init=function(t,n){var r,o;if(n&&n.types&&n.types[\"default\"])for(r in n.types)if(\"default\"!==r&&\"#\"!==r&&n.types.hasOwnProperty(r))for(o in n.types[\"default\"])n.types[\"default\"].hasOwnProperty(o)&&n.types[r][o]===e&&(n.types[r][o]=n.types[\"default\"][o]);i.init.call(this,t,n),this._model.data[\"#\"].type=\"#\"},this.bind=function(){i.bind.call(this),this.element.on(\"model.jstree\",t.proxy(function(t,n){var i,r,o=this._model.data,s=n.nodes,a=this.settings.types,l=\"default\";for(i=0,r=s.length;r>i;i++)l=\"default\",o[s[i]].original&&o[s[i]].original.type&&a[o[s[i]].original.type]&&(l=o[s[i]].original.type),o[s[i]].data&&o[s[i]].data.jstree&&o[s[i]].data.jstree.type&&a[o[s[i]].data.jstree.type]&&(l=o[s[i]].data.jstree.type),o[s[i]].type=l,o[s[i]].icon===!0&&a[l].icon!==e&&(o[s[i]].icon=a[l].icon)},this))},this.get_json=function(e,n,r){var o,s,a=this._model.data,l=n?t.extend(!0,{},n,{no_id:!1}):{},c=i.get_json.call(this,e,l,r);if(c===!1)return!1;if(t.isArray(c))for(o=0,s=c.length;s>o;o++)c[o].type=c[o].id&&a[c[o].id]&&a[c[o].id].type?a[c[o].id].type:\"default\",n&&n.no_id&&(delete c[o].id,c[o].li_attr&&c[o].li_attr.id&&delete c[o].li_attr.id);else c.type=c.id&&a[c.id]&&a[c.id].type?a[c.id].type:\"default\",n&&n.no_id&&(c=this._delete_ids(c));return c},this._delete_ids=function(e){if(t.isArray(e)){for(var n=0,i=e.length;i>n;n++)e[n]=this._delete_ids(e[n]);return e}return delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.children&&t.isArray(e.children)&&(e.children=this._delete_ids(e.children)),e},this.check=function(n,r,o,s){if(i.check.call(this,n,r,o,s)===!1)return!1;r=r&&r.id?r:this.get_node(r),o=o&&o.id?o:this.get_node(o);var a,l,c,h,u=r&&r.id?t.jstree.reference(r.id):null;switch(u=u&&u._model&&u._model.data?u._model.data:null,n){case\"create_node\":case\"move_node\":case\"copy_node\":if(\"move_node\"!==n||-1===t.inArray(r.id,o.children)){if(a=this.get_rules(o),a.max_children!==e&&-1!==a.max_children&&a.max_children===o.children.length)return this._data.core.last_error={error:\"check\",plugin:\"types\",id:\"types_01\",reason:\"max_children prevents function: \"+n,data:JSON.stringify({chk:n,pos:s,obj:r&&r.id?r.id:!1,par:o&&o.id?o.id:!1})},!1;if(a.valid_children!==e&&-1!==a.valid_children&&-1===t.inArray(r.type,a.valid_children))return this._data.core.last_error={error:\"check\",plugin:\"types\",id:\"types_02\",reason:\"valid_children prevents function: \"+n,data:JSON.stringify({chk:n,pos:s,obj:r&&r.id?r.id:!1,par:o&&o.id?o.id:!1})},!1;if(u&&r.children_d&&r.parents){for(l=0,c=0,h=r.children_d.length;h>c;c++)l=Math.max(l,u[r.children_d[c]].parents.length);l=l-r.parents.length+1}(0>=l||l===e)&&(l=1);do{if(a.max_depth!==e&&-1!==a.max_depth&&a.max_depth<l)return this._data.core.last_error={error:\"check\",plugin:\"types\",id:\"types_03\",reason:\"max_depth prevents function: \"+n,data:JSON.stringify({chk:n,pos:s,obj:r&&r.id?r.id:!1,par:o&&o.id?o.id:!1})},!1;o=this.get_node(o.parent),a=this.get_rules(o),l++}while(o)}}return!0},this.get_rules=function(t){if(t=this.get_node(t),!t)return!1;var n=this.get_type(t,!0);return n.max_depth===e&&(n.max_depth=-1),n.max_children===e&&(n.max_children=-1),n.valid_children===e&&(n.valid_children=-1),n},this.get_type=function(e,n){return e=this.get_node(e),e?n?t.extend({type:e.type},this.settings.types[e.type]):e.type:!1},this.set_type=function(n,i){var r,o,s,a,l;if(t.isArray(n)){for(n=n.slice(),o=0,s=n.length;s>o;o++)this.set_type(n[o],i);return!0}return r=this.settings.types,n=this.get_node(n),r[i]&&n?(a=n.type,l=this.get_icon(n),n.type=i,(l===!0||r[a]&&r[a].icon&&l===r[a].icon)&&this.set_icon(n,r[i].icon!==e?r[i].icon:!0),!0):!1}},t.jstree.plugins.unique=function(e,n){this.check=function(e,i,r,o){if(n.check.call(this,e,i,r,o)===!1)return!1;if(i=i&&i.id?i:this.get_node(i),r=r&&r.id?r:this.get_node(r),!r||!r.children)return!0;var s,a,l=\"rename_node\"===e?o:i.text,c=[],h=this._model.data;for(s=0,a=r.children.length;a>s;s++)c.push(h[r.children[s]].text);switch(e){case\"delete_node\":return!0;case\"rename_node\":case\"copy_node\":return s=-1===t.inArray(l,c),s||(this._data.core.last_error={error:\"check\",plugin:\"unique\",id:\"unique_01\",reason:\"Child with name \"+l+\" already exists. Preventing: \"+e,data:JSON.stringify({chk:e,pos:o,obj:i&&i.id?i.id:!1,par:r&&r.id?r.id:!1})}),s;case\"move_node\":return s=i.parent===r.id||-1===t.inArray(l,c),s||(this._data.core.last_error={error:\"check\",plugin:\"unique\",id:\"unique_01\",reason:\"Child with name \"+l+\" already exists. Preventing: \"+e,data:JSON.stringify({chk:e,pos:o,obj:i&&i.id?i.id:!1,par:r&&r.id?r.id:!1})}),s}return!0}};var f=document.createElement(\"DIV\");f.setAttribute(\"unselectable\",\"on\"),f.className=\"jstree-wholerow\",f.innerHTML=\"&#160;\",t.jstree.plugins.wholerow=function(e,n){this.bind=function(){n.bind.call(this),this.element.on(\"loading\",t.proxy(function(){f.style.height=this._data.core.li_height+\"px\"},this)).on(\"ready.jstree set_state.jstree\",t.proxy(function(){this.hide_dots()},this)).on(\"ready.jstree\",t.proxy(function(){this.get_container_ul().addClass(\"jstree-wholerow-ul\")},this)).on(\"deselect_all.jstree\",t.proxy(function(){this.element.find(\".jstree-wholerow-clicked\").removeClass(\"jstree-wholerow-clicked\")},this)).on(\"changed.jstree\",t.proxy(function(t,e){this.element.find(\".jstree-wholerow-clicked\").removeClass(\"jstree-wholerow-clicked\");var n,i,r=!1;for(n=0,i=e.selected.length;i>n;n++)r=this.get_node(e.selected[n],!0),r&&r.length&&r.children(\".jstree-wholerow\").addClass(\"jstree-wholerow-clicked\")},this)).on(\"open_node.jstree\",t.proxy(function(t,e){this.get_node(e.node,!0).find(\".jstree-clicked\").parent().children(\".jstree-wholerow\").addClass(\"jstree-wholerow-clicked\")},this)).on(\"hover_node.jstree dehover_node.jstree\",t.proxy(function(t,e){this.get_node(e.node,!0).children(\".jstree-wholerow\")[\"hover_node\"===t.type?\"addClass\":\"removeClass\"](\"jstree-wholerow-hovered\")},this)).on(\"contextmenu.jstree\",\".jstree-wholerow\",t.proxy(function(e){e.preventDefault(),t(e.currentTarget).closest(\"li\").children(\"a:eq(0)\").trigger(\"contextmenu\",e)},this)).on(\"click.jstree\",\".jstree-wholerow\",function(e){e.stopImmediatePropagation();var n=t.Event(\"click\",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(\"li\").children(\"a:eq(0)\").trigger(n).focus()}).on(\"click.jstree\",\".jstree-leaf > .jstree-ocl\",t.proxy(function(e){e.stopImmediatePropagation();var n=t.Event(\"click\",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(\"li\").children(\"a:eq(0)\").trigger(n).focus()},this)).on(\"mouseover.jstree\",\".jstree-wholerow, .jstree-icon\",t.proxy(function(t){return t.stopImmediatePropagation(),this.hover_node(t.currentTarget),!1},this)).on(\"mouseleave.jstree\",\".jstree-node\",t.proxy(function(t){this.dehover_node(t.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(\".jstree-wholerow\").remove(),n.teardown.call(this)},this.redraw_node=function(e,i,r){if(e=n.redraw_node.call(this,e,i,r)){var o=f.cloneNode(!0);-1!==t.inArray(e.id,this._data.core.selected)&&(o.className+=\" jstree-wholerow-clicked\"),e.insertBefore(o,e.childNodes[0])}return e}}}}),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},i={}.hasOwnProperty,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};n(\"widget/object_explorer\",[\"underscore\",\"jquery\",\"jstree\",\"backbone\",\"common/has_properties\",\"common/continuum_view\",\"source/column_data_source\"],function(n,o,s,a,l,c,h){var u,p,d,f,_,g;return p=function(s){function a(){return this.createContextMenu=t(this.createContextMenu,this),this.onEvent=t(this.onEvent,this),f=a.__super__.constructor.apply(this,arguments)}return r(a,s),a.prototype.initialize=function(t){return a.__super__.initialize.call(this,t),this.onEvent=n.debounce(this.onEvent,t.debounce||200),this.showToolbar=t.showToolbar||!1,this.arrayLimit=t.arrayLimit||100,this.render()},a.prototype.base=function(){return null==this._base&&(this._base=e(\"common/base\")),this._base},a.prototype.resolve_ref=function(t){return this.base().Collections(t.type).get(t.id)},a.prototype.delegateEvents=function(t){var e,i,r,o,s;for(a.__super__.delegateEvents.call(this,t),o=n.keys(this.base().locations),s=[],i=0,r=o.length;r>i;i++)e=o[i],s.push(this.base().Collections(e).on(\"all\",this.onEvent));return s},a.prototype.onEvent=function(){return this.reRender()},a.prototype.createTree=function(t){var e,i,r,o,s,a,l,c;if(null==t&&(t=!0),o=function(){var t,r,o,a,l=this;for(o=n.keys(this.base().locations),a=[],t=0,r=o.length;r>t;t++)s=o[t],i=this.base().Collections(s),e=i.map(function(t,e){var n;return n={},n[t.id]=1,l.descend(e,t,n)}),a.push(this.node(s,i,null,e));return a}.call(this),t){for(c=[],a=0,l=o.length;l>a;a++)r=o[a],r.children.length>0&&c.push(r);return c}return o},a.prototype.descend=function(t,e,r){var o,s,a,c,h,u,p,d,f,_,g,m,v;return this.isRef(e)&&(f=!0,null==r[e.id]?e=this.base().Collections(e.type).get(e.id):console.log(\"Cyclic reference to \"+e.type+\":\"+e.id)),e instanceof l?(r=n.clone(r),r[e.id]=1,a=function(){var t,n;t=e.attributes,n=[];for(s in t)i.call(t,s)&&(m=t[s],this.isAttr(s)&&n.push(this.descend(s,m,r)));return n}.call(this),g=e.type,u=\"object\",m=null,c=null):n.isArray(e)?(_=e.length>this.arrayLimit,o=this.arrayLimit||e.length,a=function(){var t,n,i,o;for(i=e.slice(0,+this.arrayLimit+1||9e9),o=[],p=t=0,n=i.length;n>t;p=++t)m=i[p],o.push(this.descend(p,m,r));return o}.call(this),g=\"Array[\"+e.length+\"]\"+(_?\" (showing first \"+this.arrayLimit+\" items)\":\"\"),u=\"array\",m=null,c=null):n.isObject(e)?(a=function(){var t;t=[];for(d in e)i.call(e,d)&&(m=e[d],t.push(this.descend(d,m,r)));return t}.call(this),g=\"Object[\"+n.keys(e).length+\"]\",u=\"object\",m=null,c=null):(a=[],v=n.isUndefined(e)?[null,\"object\",null,\"orchid\"]:n.isNull(e)?[null,\"object\",null,\"teal\"]:n.isBoolean(e)?[\"Boolean\",\"boolean\",null,\"darkmagenta\"]:n.isNumber(e)?[\"Number\",\"number\",null,\"green\"]:n.isString(e)?[\"String\",\"string\",'\"'+e+'\"',\"firebrick\"]:n.isFunction(e)?[\"Function\",\"function\",null,null]:n.isDate(e)?[\"Date\",\"date\",null,null]:n.isRegExp(e)?[\"RegExp\",\"regexp\",null,null]:n.isElement(e)?[\"Element\",\"domnode\",null,null]:[typeof e,\"object\",null,null],g=v[0],u=v[1],m=v[2],c=v[3],null==m&&(m=\"\"+e),null==c&&(c=\"black\")),h=['<span style=\"color:gray\">'+t+\"</span>\"],null!=g&&(h=h.concat([\": \",'<span style=\"color:blue\">'+g+(f?'<span style=\"color:red\">*</span>':\"\")+\"</span>\"])),null!=m&&(h=h.concat([\" = \",'<span style=\"color:'+c+'\">'+m+\"</span>\"])),this.node(h.join(\"\"),e,u,a)},a.prototype.isRef=function(t){return n.isObject(t)&&(n.isEqual(n.keys(t),[\"id\",\"type\"])||n.isEqual(n.keys(t),[\"type\",\"id\"]))},a.prototype.isAttr=function(t){return t.length>0&&\"_\"!==t[0]},a.prototype.node=function(t,e,n,i,r){return{text:t,data:{obj:e instanceof l?{type:e.type,id:e.id}:null},icon:n?\"bk-icon-type-\"+n:null,children:i||[],state:{open:r||!1}}},a.prototype.renderToolbar=function(){var t,e,n=this;return e=o('<div class=\"bk-bs-btn-group\"></div>'),t=o('<button type=\"button\" class=\"bk-bs-btn bk-bs-btn-default\">Refresh</button>'),t.click(function(){return n.reRender()}),e.append(t),this.showToolbar||e.hide(),e},a.prototype.themeUrl=function(){return null},a.prototype.createContextMenu=function(t){var e,n;return e=t.original,n={}\n",
        "                },a.prototype.renderTree=function(){var t,e=this;return t=o(\"<div/>\"),t.on(\"changed.jstree\",function(t,n){var i,r,o,s,a,l;for(l=[],i=s=0,a=n.selected.length;a>=0?a>s:s>a;i=a>=0?++s:--s)o=n.instance.get_node(n.selected[i]).data.ref,null!=o?(r=e.resolve_ref(o),l.push(r instanceof h.Model&&null!=e.mget(\"data_widget\")?e.mget_obj(\"data_widget\").set_obj(\"source\",r):void 0)):l.push(void 0);return l}),t.jstree({core:{data:this.createTree(),themes:{url:this.themeUrl()}},contextmenu:{items:this.createContextMenu},plugins:[\"contextmenu\"]}),t},a.prototype.render=function(){return this.$toolbar=this.renderToolbar(),this.$tree=this.renderTree(),this.$el.append([this.$toolbar,this.$tree])},a.prototype.reRender=function(){return this.$tree.jstree(\"destroy\"),this.$el.empty(),this.render()},a}(c.View),u=function(t){function e(){return _=e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"ObjectExplorer\",e.prototype.default_view=p,e.prototype.defaults=function(){return{data_widget:null}},e}(l),d=function(t){function e(){return g=e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.model=u,e}(a.Collection),{Model:u,Collection:new d,View:p}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"tool/object_explorer_tool\",[\"underscore\",\"jquery\",\"bootstrap/modal\",\"backbone\",\"./tool\",\"./event_generators\",\"./object_explorer_tool_template\",\"widget/object_explorer\"],function(t,n,i,r,o,s,a,l){var c,h,u,p,d,f,_;return c=s.ButtonEventGenerator,u=function(t){function i(){return d=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t)},i.prototype.eventGeneratorClass=c,i.prototype.evgen_options={buttonText:\"Object Explorer\",buttonIcon:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAJHSURBVEiJvZbPTlNREManQmtSvTvqI7gw4R1cQpP6ABoahKWURxBfgo0ulRfgGYA9lI1dIdEFMSo0sZLY3p+L+514eu85t7dKOskk58838+XMmTNnaoAtUu4tlM3MDLCqpwQ2KMrGPDzREwLLQJKmaU3zB2a2pu1fUjOzNaBpZpamaQ1IgOWZzLm1OrADfAQ6wCOgDfwAJsCudKK1dWGeyeYVUA/y5AmBhsh8+QqMNb4EHksvtTYRxpcdoFFKCCx5ZCOgD9xofgOcAm8UgbrGpzlMX7aOdKmMMAEGAve1tgUcA92Sa+kKs6V5Xz4GQBIl1KV3gN/AN2Azevlx8k3ZjoGOl3ThO9SmC9HJPxCeuPDm1ovPQiFtm9l9MxuZ2X7AYYssY9tAK8C5L9uGMA/zDpx2gQ/e6c4CZKvAoZeJh8BqAHfmJdF7soIxHVKm5ROwl3OyAhxp/4sUra3ksHvy4UuQcET2oJ9QfLhtYa6Ap9Irra3nsHX52OXvE4mWNqRVpAwX9hMJ6QXwOodreSH9LC0L6cWskLqkGQpwF0kzlM9ugVDARHd1C/wEngeclT4L4IVsb4WJVxrPyD2N4/D1xIV5Hr4rbWbWNLPvZvZuXkIzeyvbJl5pKzBrHCveR8B2yam2hXmpebXiTfn3NATOKX5P516iXTPP96SNBtBjWlz1h6yCuA/YVZOxML70mPUBe5uuxRiQtQ2uxbgm+9170lCLMZBttRbDAxSaKODAC7cL2wEVmqiZhJHk+O82sVaV7K5k4Z33H/QTdNyD5wyAAAAAAElFTkSuQmCC\"},i.prototype.toolType=\"ObjectExplorerTool\",i.prototype.tool_events={activated:\"_activated\",deactivated:\"_close_modal\"},i.prototype._activated=function(){var t=this;return this.$modal=n(a({})),this.$object_explorer_view=new l.View({el:this.$modal.find(\".bk-bs-modal-body\")}),n(\"body\").append(this.$modal),this.$modal.on(\"hidden\",function(){return t.plot_view.eventSink.trigger(\"clear_active_tool\")}),this.$modal.modal({show:!0})},i.prototype._close_modal=function(){return this.$modal.remove()},i}(o.View),h=function(t){function n(){return f=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.default_view=u,n.prototype.type=\"ObjectExplorerTool\",n.prototype.display_defaults=function(){return n.__super__.display_defaults.call(this)},n}(o.Model),p=function(t){function n(){return _=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=h,n}(r.Collection),{Model:h,Collection:new p,View:u}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/data_slider\",[\"common/plot_widget\",\"common/has_parent\"],function(n,i){var r,o,s,a,l,c;return o=function(n){function i(){return a=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.attributes={\"class\":\"dataslider bk-bs-pull-left\"},i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t),this.render_init(),this.select=_.throttle(this._select,50)},i.prototype.delegateEvents=function(t){return i.__super__.delegateEvents.call(this,t),\"pass\"},i.prototype.label=function(t,e){return this.$(\".minlabel\").text(t),this.$(\".maxlabel\").text(e)},i.prototype.render_init=function(){var t,e,n,i,r=this;return this.$el.html(\"\"),this.$el.append(\"<div class='maxlabel'></div>\"),this.$el.append(\"<div class='slider'></div>\"),this.$el.append(\"<div class='minlabel'></div>\"),this.plot_view.$(\".plotarea\").append(this.$el),t=this.mget_obj(\"data_source\").getcolumn(this.mget(\"field\")),i=[_.min(t),_.max(t)],n=i[0],e=i[1],this.$el.find(\".slider\").slider({orientation:\"vertical\",animate:\"fast\",step:(e-n)/50,min:n,max:e,values:[n,e],slide:function(t,e){return r.set_selection_range(t,e),r.select(t,e)}}),this.label(n,e),this.$el.find(\".slider\").height(this.plot_view.view_state.get(\"inner_height\"))},i.prototype.set_selection_range=function(t,e){var n,i,r,o;return o=_.min(e.values),r=_.max(e.values),this.label(o,r),n=this.mget_obj(\"data_source\"),i=this.mget(\"field\"),null==n.range_selections&&(n.range_selections={}),n.range_selections[i]=[o,r]},i.prototype._select=function(){var e,n,i,r,o,s,a,l,c,h,u,p,d,f;i=this.mget_obj(\"data_source\"),n={},a=0,d=i.range_selections;for(e in d)t.call(d,e)&&(u=d[e],n[e]=i.getcolumn(e),a=n[e].length);for(c=[],r=p=0;a>=0?a>p:p>a;r=a>=0?++p:--p){l=!0,f=i.range_selections;for(e in f)if(t.call(f,e)&&(u=f[e],s=u[0],o=u[1],h=n[e][r],s>h||h>o)){l=!1;break}l&&c.push(r)}return i.save({selected:c},{patch:!0})},i}(n),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"DataSlider\",n.prototype.default_view=o,n.prototype.defaults=function(){return{data_source:null,field:null}},n.prototype.display_defaults=function(){return{level:\"tool\"}},n}(i),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(Backbone.Collection),{Model:r,Collection:new s}})}.call(this),n(\"widget/data_table_template\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){var t,n,r,o,s,a,l,c,h,u,p;for(i(e('<table class=\"bk-bs-table bk-bs-table-bordered\">\\n  <thead>\\n    ')),this.counts&&i(e(\"\\n      <th>counts</th>\\n    \")),i(e(\"\\n    <th>index</th>\\n    \")),h=this.columns,r=0,a=h.length;a>r;r++)t=h[r],i(e(\"\\n      \")),this.skip[t]||(i(e('\\n        <th style=\"white-space: nowrap;\" data-cdx-column=\"')),i(t),i(e('\">\\n          <a class=\"pandascolumn\">')),i(t),i(e(\"</a>\\n          \")),i(this.sort_ascendings[t]===!0?e('\\n            <i class=\"cdx-column-sort fa fa-sort-up\"></i>\\n          '):this.sort_ascendings[t]===!1?e('\\n            <i class=\"cdx-column-sort fa fa-sort-down\"></i>\\n          '):e('\\n            <i class=\"cdx-column-sort fa fa-sort\"></i>\\n          ')),i(e(\"\\n        </th>\\n      \"))),i(e(\"\\n    \"));for(i(e(\"\\n  </thead>\\n  \")),u=_.range(this.length),o=0,l=u.length;l>o;o++){for(n=u[o],i(e('\\n  <tr class=\"pandasrow\" rownum=\"')),i(n),i(e('\">\\n    ')),this.selected&&this.selected[n]?(i(e('\\n      <td style=\"background-color:')),i(this.colors[n]),i(e('\">\\n        ')),i(this.selected[n]),i(e(\"/\")),i(this.counts[n]),i(e(\"\\n      </td>\\n    \"))):(i(e(\"\\n      <td> \")),i(this.counts[n]),i(e(\" </td>\\n    \"))),i(e(\"\\n    <td> \")),i(this.index[n]),i(e(\" </td>\\n    \")),p=this.columns,s=0,c=p.length;c>s;s++)t=p[s],i(e(\"\\n      \")),this.skip[t]||(i(e(\"\\n      <td> \")),i(this.data[t][n]),i(e(\" </td>\\n      \"))),i(e(\"\\n    \"));i(e(\"\\n  </tr>\\n  \"))}i(e('\\n</table>\\n<form>\\n  <center>\\n    <ul class=\"pagination\">\\n      <li><a href=\"javascript://\" class=\"cdx-go-first\">First</a></li>\\n      <li><a href=\"javascript://\" class=\"cdx-go-prev\">Previous</a></li>\\n      <li><a href=\"javascript://\" class=\"cdx-go-next\">Next</a></li>\\n      <li><a href=\"javascript://\" class=\"cdx-go-last\">Last</a></li>\\n    </ul>\\n    <div class=\"paginatedisplay\">\\n      Show <input type=\"text\" class=\"pandassize\" value=\"')),i(this.length),i(e('\"> records\\n      From <input type=\"text\" class=\"pandasoffset\" value=\"')),i(this.offset),i(e('\">\\n      to ')),i(this.length+this.offset),i(e(\" -\\n      Total: \")),i(this.totallength),i(e(\"\\n    </div>\\n  </center>\\n</form>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"widget/data_table\",[\"underscore\",\"backbone\",\"common/has_parent\",\"common/continuum_view\",\"./data_table_template\"],function(e,n,r,o,s){var a,l,c,h,u,p,d;return h=13,l=function(n){function r(){return this.colors=t(this.colors,this),this.go_last=t(this.go_last,this),this.go_next=t(this.go_next,this),this.go_prev=t(this.go_prev,this),this.go_first=t(this.go_first,this),this.toggle_more_controls=t(this.toggle_more_controls,this),this.sort=t(this.sort,this),this.rowclick=t(this.rowclick,this),this.toggle_filterselected=t(this.toggle_filterselected,this),this.clearselected=t(this.clearselected,this),this.computedtxtbox=t(this.computedtxtbox,this),this.column_del=t(this.column_del,this),this.search=t(this.search,this),u=r.__super__.constructor.apply(this,arguments)}return i(r,n),r.prototype.template=s,r.prototype.initialize=function(t){return r.__super__.initialize.call(this,t),this.listenTo(this.model,\"destroy\",this.remove),this.listenTo(this.model,\"change\",this.render),this.render()},r.prototype.events={\"keyup .pandasgroup\":\"pandasgroup\",\"keyup .pandasoffset\":\"pandasoffset\",\"keyup .pandassize\":\"pandassize\",\"change .pandasagg\":\"pandasagg\",\"click .cdx-go-first\":\"go_first\",\"click .cdx-go-prev\":\"go_prev\",\"click .cdx-go-next\":\"go_next\",\"click .cdx-go-last\":\"go_last\",\"click .controlsmore\":\"toggle_more_controls\",\"click .cdx-column-sort\":\"sort\",\"click .pandasrow\":\"rowclick\",\"click .filterselected\":\"toggle_filterselected\",\"click .clearselected\":\"clearselected\",\"keyup .computedtxtbox\":\"computedtxtbox\",\"click .column_del\":\"column_del\",\"keyup .search\":\"search\"},r.prototype.search=function(t){var e,n;return t.keyCode===h?(e=$(t.currentTarget).val(),n=this.model.get_obj(\"source\"),n.rpc(\"search\",[e]),t.preventDefault()):void 0},r.prototype.column_del=function(t){var n,i,r,o;return o=this.model.get_obj(\"source\"),r=o.get(\"computed_columns\"),i=$(t.currentTarget).attr(\"name\"),n=e.filter(r,function(t){return t.name!==i}),o.rpc(\"set_computed_columns\",[n])},r.prototype.computedtxtbox=function(t){var e,n,i,r;return t.keyCode===h?(n=this.$(\".computedname\").val(),e=this.$(\".computedtxtbox\").val(),r=this.model.get_obj(\"source\"),i=r.get(\"computed_columns\"),i.push({name:n,code:e}),r.rpc(\"set_computed_columns\",[i]),t.preventDefault()):void 0},r.prototype.clearselected=function(){return this.model.rpc(\"setselect\",[[]])},r.prototype.toggle_filterselected=function(){var t;return t=this.$(\".filterselected\").is(\":checked\"),this.mset(\"filterselected\",t),this.model.save()},r.prototype.rowclick=function(t){var n,i,r,o,s,a,l,c,h,u;return i=this.counts(),u=this.selected(),a=function(){var t,r,o,s,a;for(o=e.zip(u,i),a=[],t=0,r=o.length;r>t;t++)s=o[t],h=s[0],n=s[1],a.push(h/n);return a}(),u=function(){var t,e,n;for(n=[],r=t=0,e=a.length;e>t;r=++t)s=a[r],s>.5&&n.push(r);return n}(),c=Number($(t.currentTarget).attr(\"rownum\")),o=u.indexOf(c),l=-1===o?this.model.rpc(\"select\",[[c]]):this.model.rpc(\"deselect\",[[c]]),null},r.prototype.sort=function(t){var e;return e=$(t.currentTarget).parent().data(\"cdx-column\"),this.model.toggle_column_sort(e)},r.prototype.toggle_more_controls=function(){return this.controls_hide=this.controls_hide?!1:!0,this.render()},r.prototype.go_first=function(){return this.model.go_first()},r.prototype.go_prev=function(){return this.model.go_prev()},r.prototype.go_next=function(){return this.model.go_next()},r.prototype.go_last=function(){return this.model.go_last()},r.prototype.pandasoffset=function(t){var n;return t.keyCode===h?(n=this.$el.find(\".pandasoffset\").val(),n=Number(n),e.isNaN(n)&&(n=this.model.defaults.offset),this.model.save(\"offset\",n,{wait:!0}),t.preventDefault()):void 0},r.prototype.pandassize=function(t){var n,i;return t.keyCode===h?(i=this.$el.find(\".pandassize\").val(),n=Number(i),(e.isNaN(n)||\"\"===i)&&(n=this.model.defaults.length),n+this.mget(\"offset\")>this.mget(\"maxlength\")&&(n=this.mget(\"maxlength\")-this.mget(\"offset\")),this.model.save(\"length\",n,{wait:!0}),t.preventDefault()):void 0},r.prototype.pandasagg=function(){return this.model.save(\"agg\",this.$el.find(\".pandasagg\").val(),{wait:!0})},r.prototype.fromcsv=function(t){return t?e.map(t.split(\",\"),function(t){return t.trim()}):[]},r.prototype.pandasgroup=function(t){return t.keyCode===h?(this.model.set({group:this.fromcsv(this.$el.find(\".pandasgroup\").val()),offset:0}),this.model.save(),t.preventDefault(),!1):void 0},r.prototype.counts=function(){return this.mget(\"tabledata\").data._counts},r.prototype.selected=function(){return this.mget(\"tabledata\").data._selected},r.prototype.colors=function(){var t,n;return t=this.counts(),n=this.selected(),t&&n?e.map(e.zip(t,n),function(t){var e,i;return i=t[0],n=t[1],e=.3*n/i,\"rgba(0,0,255,\"+e+\")\"}):null},r.prototype.render=function(){var t,n,i,r,o,s,a,l,c,h,u;for(n=this.mget(\"group\"),e.isArray(n)&&(n=n.join(\",\")),o=this.mget(\"sort\"),e.isArray(o)&&(o=o.join(\",\")),t=this.colors(),s={},u=this.mget(\"sort\"),c=0,h=u.length;h>c;c++)r=u[c],s[r.column]=r.ascending;return a=this.mget_obj(\"source\"),l={skip:{_counts:!0,_selected:!0,index:!0},computed_columns:this.mget_obj(\"source\").get(\"computed_columns\"),columns:this.mget(\"tabledata\").column_names,data:this.mget(\"tabledata\").data,group:n,sort_ascendings:s,offset:this.mget(\"offset\"),length:this.model.length(),filterselected:this.mget(\"filterselected\"),totallength:this.mget(\"totallength\"),counts:this.mget(\"tabledata\").data._counts,selected:this.mget(\"tabledata\").data._selected,controls_hide:this.controls_hide,colors:t,index:this.mget(\"tabledata\").data.index},this.$el.empty(),i=this.template(l),this.$el.html(i),this.$(\".pandasagg\").find('option[value=\"'+this.mget(\"agg\")+'\"]').attr(\"selected\",\"selected\"),this.$el.addClass(\"bokehtable\")},r}(o.View),a=function(n){function r(){return this.toggle_column_sort=t(this.toggle_column_sort,this),p=r.__super__.constructor.apply(this,arguments)}return i(r,n),r.prototype.type=\"DataTable\",r.prototype.initialize=function(t,n){var i=this;return r.__super__.initialize.call(this,t,n),this.throttled_fetch=e.throttle(function(){return i.fetch()},500)},r.prototype.fetch=function(t){return r.__super__.fetch.call(this,t)},r.prototype.length=function(){return e.values(this.get(\"tabledata\").data)[0].length},r.prototype.toggle_column_sort=function(t){var n,i;return i=this.get(\"sort\"),this.unset(\"sort\",{silent:!0}),n=e.filter(i,function(e){return e.column===t}),n.length>0?(n=n[0],void(n.ascending?(n.ascending=!1,this.save(\"sort\",i,{wait:!0})):(i=e.filter(i,function(e){return e.column!==t}),this.save(\"sort\",i,{wait:!0})))):(i=e.clone(i),i.push({column:t,ascending:!0}),void this.save(\"sort\",i,{wait:!0}))},r.prototype.go_first=function(){return this.set(\"offset\",0),this.save()},r.prototype.go_prev=function(){var t;return t=this.get(\"offset\"),t-=this.length(),0>t&&(t=0),this.set(\"offset\",t),this.save()},r.prototype.go_next=function(){var t,e;return e=this.get(\"offset\"),e+=this.length(),t=this.get(\"maxlength\")-this.length(),e>t&&(e=t),this.set(\"offset\",e),this.save()},r.prototype.go_last=function(){var t;return t=this.get(\"maxlength\")-this.length(),this.set(\"offset\",t),this.save()},r.prototype.default_view=l,r.prototype.defaults=function(){return{sort:[],group:[],agg:\"sum\",offset:0,length:100,maxlength:1e3,tabledata:null,columns_names:[]}},r}(r),c=function(t){function e(){return d=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=a,e}(n.Collection),{Model:a,Collection:new c,View:l}})}.call(this),function(){function t(t){this._value=t}function e(t,e,n,i){var r,o,s=Math.pow(10,e);return o=(n(t*s)/s).toFixed(e),i&&(r=new RegExp(\"0{1,\"+i+\"}$\"),o=o.replace(r,\"\")),o}function i(t,e,n){var i;return i=e.indexOf(\"$\")>-1?o(t,e,n):e.indexOf(\"%\")>-1?s(t,e,n):e.indexOf(\":\")>-1?a(t,e):c(t._value,e,n)}function r(t,e){var n,i,r,o,s,a=e,c=[\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],h=!1;if(e.indexOf(\":\")>-1)t._value=l(e);else if(e===m)t._value=0;else{for(\".\"!==_[g].delimiters.decimal&&(e=e.replace(/\\./g,\"\").replace(_[g].delimiters.decimal,\".\")),n=new RegExp(\"[^a-zA-Z]\"+_[g].abbreviations.thousand+\"(?:\\\\)|(\\\\\"+_[g].currency.symbol+\")?(?:\\\\))?)?$\"),i=new RegExp(\"[^a-zA-Z]\"+_[g].abbreviations.million+\"(?:\\\\)|(\\\\\"+_[g].currency.symbol+\")?(?:\\\\))?)?$\"),r=new RegExp(\"[^a-zA-Z]\"+_[g].abbreviations.billion+\"(?:\\\\)|(\\\\\"+_[g].currency.symbol+\")?(?:\\\\))?)?$\"),o=new RegExp(\"[^a-zA-Z]\"+_[g].abbreviations.trillion+\"(?:\\\\)|(\\\\\"+_[g].currency.symbol+\")?(?:\\\\))?)?$\"),s=0;s<=c.length&&!(h=e.indexOf(c[s])>-1?Math.pow(1024,s+1):!1);s++);t._value=(h?h:1)*(a.match(n)?Math.pow(10,3):1)*(a.match(i)?Math.pow(10,6):1)*(a.match(r)?Math.pow(10,9):1)*(a.match(o)?Math.pow(10,12):1)*(e.indexOf(\"%\")>-1?.01:1)*((e.split(\"-\").length+Math.min(e.split(\"(\").length-1,e.split(\")\").length-1))%2?1:-1)*Number(e.replace(/[^0-9\\.]+/g,\"\")),t._value=h?Math.ceil(t._value):t._value}return t._value}function o(t,e,n){var i,r,o=e.indexOf(\"$\"),s=e.indexOf(\"(\"),a=e.indexOf(\"-\"),l=\"\";return e.indexOf(\" $\")>-1?(l=\" \",e=e.replace(\" $\",\"\")):e.indexOf(\"$ \")>-1?(l=\" \",e=e.replace(\"$ \",\"\")):e=e.replace(\"$\",\"\"),r=c(t._value,e,n),1>=o?r.indexOf(\"(\")>-1||r.indexOf(\"-\")>-1?(r=r.split(\"\"),i=1,(s>o||a>o)&&(i=0),r.splice(i,0,_[g].currency.symbol+l),r=r.join(\"\")):r=_[g].currency.symbol+l+r:r.indexOf(\")\")>-1?(r=r.split(\"\"),r.splice(-1,0,l+_[g].currency.symbol),r=r.join(\"\")):r=r+l+_[g].currency.symbol,r}function s(t,e,n){var i,r=\"\",o=100*t._value;return e.indexOf(\" %\")>-1?(r=\" \",e=e.replace(\" %\",\"\")):e=e.replace(\"%\",\"\"),i=c(o,e,n),i.indexOf(\")\")>-1?(i=i.split(\"\"),i.splice(-1,0,r+\"%\"),i=i.join(\"\")):i=i+r+\"%\",i}function a(t){var e=Math.floor(t._value/60/60),n=Math.floor((t._value-60*e*60)/60),i=Math.round(t._value-60*e*60-60*n);return e+\":\"+(10>n?\"0\"+n:n)+\":\"+(10>i?\"0\"+i:i)}function l(t){var e=t.split(\":\"),n=0;return 3===e.length?(n+=60*Number(e[0])*60,n+=60*Number(e[1]),n+=Number(e[2])):2===e.length&&(n+=60*Number(e[0]),n+=Number(e[1])),Number(n)}function c(t,n,i){var r,o,s,a,l,c,h=!1,u=!1,p=!1,d=\"\",f=!1,v=!1,y=!1,b=!1,w=!1,x=\"\",k=\"\",C=Math.abs(t),S=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],T=\"\",A=!1;if(0===t&&null!==m)return m;if(n.indexOf(\"(\")>-1?(h=!0,n=n.slice(1,-1)):n.indexOf(\"+\")>-1&&(u=!0,n=n.replace(/\\+/g,\"\")),n.indexOf(\"a\")>-1&&(f=n.indexOf(\"aK\")>=0,v=n.indexOf(\"aM\")>=0,y=n.indexOf(\"aB\")>=0,b=n.indexOf(\"aT\")>=0,w=f||v||y||b,n.indexOf(\" a\")>-1?(d=\" \",n=n.replace(\" a\",\"\")):n=n.replace(\"a\",\"\"),C>=Math.pow(10,12)&&!w||b?(d+=_[g].abbreviations.trillion,t/=Math.pow(10,12)):C<Math.pow(10,12)&&C>=Math.pow(10,9)&&!w||y?(d+=_[g].abbreviations.billion,t/=Math.pow(10,9)):C<Math.pow(10,9)&&C>=Math.pow(10,6)&&!w||v?(d+=_[g].abbreviations.million,t/=Math.pow(10,6)):(C<Math.pow(10,6)&&C>=Math.pow(10,3)&&!w||f)&&(d+=_[g].abbreviations.thousand,t/=Math.pow(10,3))),n.indexOf(\"b\")>-1)for(n.indexOf(\" b\")>-1?(x=\" \",n=n.replace(\" b\",\"\")):n=n.replace(\"b\",\"\"),s=0;s<=S.length;s++)if(r=Math.pow(1024,s),o=Math.pow(1024,s+1),t>=r&&o>t){x+=S[s],r>0&&(t/=r);break}return n.indexOf(\"o\")>-1&&(n.indexOf(\" o\")>-1?(k=\" \",n=n.replace(\" o\",\"\")):n=n.replace(\"o\",\"\"),k+=_[g].ordinal(t)),n.indexOf(\"[.]\")>-1&&(p=!0,n=n.replace(\"[.]\",\".\")),a=t.toString().split(\".\")[0],l=n.split(\".\")[1],c=n.indexOf(\",\"),l?(l.indexOf(\"[\")>-1?(l=l.replace(\"]\",\"\"),l=l.split(\"[\"),T=e(t,l[0].length+l[1].length,i,l[1].length)):T=e(t,l.length,i),a=T.split(\".\")[0],T=T.split(\".\")[1].length?_[g].delimiters.decimal+T.split(\".\")[1]:\"\",p&&0===Number(T.slice(1))&&(T=\"\")):a=e(t,null,i),a.indexOf(\"-\")>-1&&(a=a.slice(1),A=!0),c>-1&&(a=a.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+_[g].delimiters.thousands)),0===n.indexOf(\".\")&&(a=\"\"),(h&&A?\"(\":\"\")+(!h&&A?\"-\":\"\")+(!A&&u?\"+\":\"\")+a+T+(k?k:\"\")+(d?d:\"\")+(x?x:\"\")+(h&&A?\")\":\"\")}function h(t,e){_[t]=e}function u(t){var e=t.toString().split(\".\");return e.length<2?1:Math.pow(10,e[1].length)}function p(){var t=Array.prototype.slice.call(arguments);return t.reduce(function(t,e){var n=u(t),i=u(e);return n>i?n:i},-1/0)}var d,f=\"1.5.3\",_={},g=\"en\",m=null,v=\"0,0\",y=\"undefined\"!=typeof module&&module.exports;d=function(e){return d.isNumeral(e)?e=e.value():0===e||\"undefined\"==typeof e?e=0:Number(e)||(e=d.fn.unformat(e)),new t(Number(e))},d.version=f,d.isNumeral=function(e){return e instanceof t},d.language=function(t,e){if(!t)return g;if(t&&!e){if(!_[t])throw new Error(\"Unknown language : \"+t);g=t}return(e||!_[t])&&h(t,e),d},d.languageData=function(t){if(!t)return _[g];if(!_[t])throw new Error(\"Unknown language : \"+t);return _[t]},d.language(\"en\",{delimiters:{thousands:\",\",decimal:\".\"},abbreviations:{thousand:\"k\",million:\"m\",billion:\"b\",trillion:\"t\"},ordinal:function(t){var e=t%10;return 1===~~(t%100/10)?\"th\":1===e?\"st\":2===e?\"nd\":3===e?\"rd\":\"th\"},currency:{symbol:\"$\"}}),d.zeroFormat=function(t){m=\"string\"==typeof t?t:null},d.defaultFormat=function(t){v=\"string\"==typeof t?t:\"0.0\"},\"function\"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(t,e){if(null===this||\"undefined\"==typeof this)throw new TypeError(\"Array.prototype.reduce called on null or undefined\");if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");var n,i,r=this.length>>>0,o=!1;for(1<arguments.length&&(i=e,o=!0),n=0;r>n;++n)this.hasOwnProperty(n)&&(o?i=t(i,this[n],n,this):(i=this[n],o=!0));if(!o)throw new TypeError(\"Reduce of empty array with no initial value\");return i}),d.fn=t.prototype={clone:function(){return d(this)},format:function(t,e){return i(this,t?t:v,void 0!==e?e:Math.round)},unformat:function(t){return\"[object Number]\"===Object.prototype.toString.call(t)?t:r(this,t?t:v)},value:function(){return this._value},valueOf:function(){return this._value},set:function(t){return this._value=Number(t),this},add:function(t){function e(t,e){return t+n*e}var n=p.call(null,this._value,t);return this._value=[this._value,t].reduce(e,0)/n,this},subtract:function(t){function e(t,e){return t-n*e}var n=p.call(null,this._value,t);return this._value=[t].reduce(e,this._value*n)/n,this},multiply:function(t){function e(t,e){var n=p(t,e);return t*n*e*n/(n*n)}return this._value=[this._value,t].reduce(e,1),this},divide:function(t){function e(t,e){var n=p(t,e);return t*n/(e*n)}return this._value=[this._value,t].reduce(e),this},difference:function(t){return Math.abs(d(this._value).subtract(t).value())}},y&&(module.exports=d),\"undefined\"==typeof ender&&(this.numeral=d),\"function\"==typeof n&&n.amd&&n(\"numeral\",[],function(){return d})}.call(this);var i={extension:{},plugins:{},helper:{}};return function(t,e,i){function r(){this.refCounter=0,this.init()}function o(){function t(){var t=this;t.registerTimeout(\"enableObserveChanges\",function(){t.updateSettings({observeChanges:!0})},0)}function e(t){return function(e,n){return e[1]===n[1]?0:null===e[1]?1:null===n[1]?-1:e[1]<n[1]?t?-1:1:e[1]>n[1]?t?1:-1:0}}function n(t){return function(e,n){if(e[1]===n[1])return 0;if(null===e[1])return 1;if(null===n[1])return-1;var i=new Date(e[1]),r=new Date(n[1]);return r>i?t?-1:1:i>r?t?1:-1:0}}function i(t){return\"undefined\"!=typeof t.sortColumn}var r=this;this.init=function(e){var n,i,o=this,l=o.getSettings().columnSorting;if(o.sortingEnabled=!!l,o.sortingEnabled){o.sortIndex=[];var c=s.call(o);\"undefined\"!=typeof c?(n=c.sortColumn,i=c.sortOrder):(n=l.column,i=l.sortOrder),r.sortByColumn.call(o,n,i),o.sort=function(){var t=Array.prototype.slice.call(arguments);return r.sortByColumn.apply(o,t)},\"undefined\"==typeof o.getSettings().observeChanges&&t.call(o),\"afterInit\"==e&&(a.call(o),o.addHook(\"afterCreateRow\",r.afterCreateRow),o.addHook(\"afterRemoveRow\",r.afterRemoveRow),o.addHook(\"afterLoadData\",r.init))}else delete o.sort,o.removeHook(\"afterCreateRow\",r.afterCreateRow),o.removeHook(\"afterRemoveRow\",r.afterRemoveRow),o.removeHook(\"afterLoadData\",r.init)},this.setSortingColumn=function(t,e){var n=this;return\"undefined\"==typeof t?(delete n.sortColumn,void delete n.sortOrder):(n.sortOrder=n.sortColumn===t&&\"undefined\"==typeof e?!n.sortOrder:\"undefined\"!=typeof e?e:!0,void(n.sortColumn=t))},this.sortByColumn=function(t,e){var n=this;r.setSortingColumn.call(n,t,e),\"undefined\"!=typeof n.sortColumn&&(n.PluginHooks.run(\"beforeColumnSort\",n.sortColumn,n.sortOrder),r.sort.call(n),n.render(),o.call(n),n.PluginHooks.run(\"afterColumnSort\",n.sortColumn,n.sortOrder))};var o=function(){var t=this,e={};\"undefined\"!=typeof t.sortColumn&&(e.sortColumn=t.sortColumn),\"undefined\"!=typeof t.sortOrder&&(e.sortOrder=t.sortOrder),(e.hasOwnProperty(\"sortColumn\")||e.hasOwnProperty(\"sortOrder\"))&&t.PluginHooks.run(\"persistentStateSave\",\"columnSorting\",e)},s=function(){var t=this,e={};return t.PluginHooks.run(\"persistentStateLoad\",\"columnSorting\",e),e.value},a=function(){function t(){var t=n.view.TBODY.querySelector(\"tr\").querySelectorAll(\"th\");return t.length}function e(e){var i=n.view.wt.wtDom.closest(e,\"TH\");return n.view.wt.wtDom.index(i)-t()}var n=this;n.rootElement.on(\"click.handsontable\",\".columnSorting\",function(t){if(n.view.wt.wtDom.hasClass(t.target,\"columnSorting\")){var i=e(t.target);r.sortByColumn.call(n,i)}})};this.sort=function(){var t=this;if(\"undefined\"!=typeof t.sortOrder){t.sortingEnabled=!1,t.sortIndex.length=0;for(var i=this.colOffset(),r=0,o=this.countRows()-t.getSettings().minSpareRows;o>r;r++)this.sortIndex.push([r,t.getDataAtCell(r,this.sortColumn+i)]);var s,a=t.getCellMeta(0,t.sortColumn);switch(a.type){case\"date\":s=n;break;default:s=e}this.sortIndex.sort(s(t.sortOrder));for(var r=this.sortIndex.length;r<t.countRows();r++)this.sortIndex.push([r,t.getDataAtCell(r,this.sortColumn+i)]);t.sortingEnabled=!0}},this.translateRow=function(t){var e=this;return e.sortingEnabled&&e.sortIndex&&e.sortIndex.length&&e.sortIndex[t]?e.sortIndex[t][0]:t},this.onBeforeGetSet=function(t){var e=this;t.row=r.translateRow.call(e,t.row)},this.untranslateRow=function(t){var e=this;if(e.sortingEnabled&&e.sortIndex&&e.sortIndex.length)for(var n=0;n<e.sortIndex.length;n++)if(e.sortIndex[n][0]==t)return n},this.getColHeader=function(t,e){this.getSettings().columnSorting&&this.view.wt.wtDom.addClass(e.querySelector(\".colHeader\"),\"columnSorting\")},this.afterCreateRow=function(t,e){var n=this;if(i(n)){for(var r=0;r<n.sortIndex.length;r++)n.sortIndex[r][0]>=t&&(n.sortIndex[r][0]+=e);for(var r=0;e>r;r++)n.sortIndex.splice(t+r,0,[t+r,n.getData()[t+r][n.sortColumn+n.colOffset()]]);o.call(n)}},this.afterRemoveRow=function(t,e){var n=this;if(i(n)){var s=r.translateRow.call(n,t);n.sortIndex.splice(t,e);for(var a=0;a<n.sortIndex.length;a++)n.sortIndex[a][0]>s&&(n.sortIndex[a][0]-=e);o.call(n)}},this.afterChangeSort=function(t){var e=this,n=!1,i={};if(t){for(var o=0;o<t.length;o++)if(t[o][1]==e.sortColumn){n=!0,i.row=r.translateRow.call(e,t[o][0]),i.col=t[o][1];break}n&&setTimeout(function(){r.sort.call(e),e.render(),e.selectCell(r.untranslateRow.call(e,i.row),i.col)},0)}}}function s(){var e,n,i,r,o,s=document.createElement(\"DIV\"),a=s.style;s.className=\"ghost\",a.position=\"absolute\",a.top=\"25px\",a.left=0,a.width=\"10px\",a.height=\"10px\",a.backgroundColor=\"#CCC\",a.opacity=.7;var l=function(){var t=this;t.PluginHooks.run(\"persistentStateSave\",\"manualColumnPositions\",t.manualColumnPositions)},c=function(){var t=this,e={};return t.PluginHooks.run(\"persistentStateLoad\",\"manualColumnPositions\",e),e.value},h=function(){var c=this;c.rootElement.on(\"mousemove.manualColumnMove\",function(t){e&&(a.left=o+t.pageX-r+6+\"px\",\"none\"===a.display&&(a.display=\"block\"))}),c.rootElement.on(\"mouseup.manualColumnMove\",function(){e&&(i>n&&i--,c.getSettings().rowHeaders&&(n--,i--),c.manualColumnPositions.splice(i,0,c.manualColumnPositions.splice(n,1)[0]),t(\".manualColumnMover.active\").removeClass(\"active\"),e=!1,c.forceFullRender=!0,c.view.render(),a.display=\"none\",l.call(c),c.PluginHooks.run(\"afterColumnMove\",n,i))}),c.rootElement.on(\"mousedown.manualColumnMove\",\".manualColumnMover\",function(t){var l=t.currentTarget,h=c.view.wt.wtDom.closest(l,\"TH\");n=c.view.wt.wtDom.index(h)+c.colOffset(),i=n,e=!0,r=t.pageX;var u=c.$table[0];u.parentNode.appendChild(s),a.width=c.view.wt.wtDom.outerWidth(h)+\"px\",a.height=c.view.wt.wtDom.outerHeight(u)+\"px\",o=parseInt(c.view.wt.wtDom.offset(h).left-c.view.wt.wtDom.offset(u).left,10),a.left=o+6+\"px\"}),c.rootElement.on(\"mouseenter.manualColumnMove\",\"td, th\",function(){if(e){var t=c.view.THEAD.querySelector(\".manualColumnMover.active\");t&&c.view.wt.wtDom.removeClass(t,\"active\"),i=c.view.wt.wtDom.index(this)+c.colOffset();var n=c.view.THEAD.querySelectorAll(\"th\"),r=n[i].querySelector(\".manualColumnMover\");c.view.wt.wtDom.addClass(r,\"active\")}}),c.addHook(\"afterDestroy\",u)},u=function(){var t=this;t.rootElement.off(\"mouseup.manualColumnMove\"),t.rootElement.off(\"mousemove.manualColumnMove\"),t.rootElement.off(\"mousedown.manualColumnMove\"),t.rootElement.off(\"mouseenter.manualColumnMove\")};this.beforeInit=function(){this.manualColumnPositions=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualColumnMove;if(n){var i=this.getSettings().manualColumnMove,r=c.call(e);this.manualColumnPositions=\"undefined\"!=typeof r?r:i instanceof Array?i:[],e.forceFullRender=!0,\"afterInit\"==t&&(h.call(this),this.manualColumnPositions.length>0&&(this.forceFullRender=!0,this.render()))}else u.call(this),this.manualColumnPositions=[]},this.modifyCol=function(t){return this.getSettings().manualColumnMove?(\"undefined\"==typeof this.manualColumnPositions[t]&&(this.manualColumnPositions[t]=t),this.manualColumnPositions[t]):t},this.getColHeader=function(t,e){if(this.getSettings().manualColumnMove){var n=document.createElement(\"DIV\");n.className=\"manualColumnMover\",e.firstChild.appendChild(n)}}}function a(){function e(t){a=this,r=t;var e=this.view.wt.wtTable.getCoords(t)[1];if(e>=0){o=e;var n=this.view.wt.wtDom.offset(this.rootElement[0]).left,i=this.view.wt.wtDom.offset(t).left;u=i-n-6,p.style.left=u+parseInt(this.view.wt.wtDom.outerWidth(t),10)+\"px\",this.rootElement[0].appendChild(p)}}function n(){var t=this;h=parseInt(this.view.wt.wtDom.outerWidth(r),10),t.view.wt.wtDom.addClass(p,\"active\"),_.height=t.view.wt.wtDom.outerHeight(t.$table[0])+\"px\",i=t}var i,r,o,s,a,l,c,h,u,p=document.createElement(\"DIV\"),d=document.createElement(\"DIV\"),f=document.createElement(\"DIV\"),_=f.style;p.className=\"manualColumnResizer\",d.className=\"manualColumnResizerHandle\",p.appendChild(d),f.className=\"manualColumnResizerLine\",p.appendChild(f);var g=t(document);g.mousemove(function(t){i&&(s=h+(t.pageX-c),l=b(o,s),p.style.left=u+s+\"px\")}),g.mouseup(function(){i&&(a.view.wt.wtDom.removeClass(p,\"active\"),i=!1,l!=h&&(a.forceFullRender=!0,a.view.render(),m.call(a),a.PluginHooks.run(\"afterColumnResize\",o,l)),e.call(a,r))});var m=function(){var t=this;t.PluginHooks.run(\"persistentStateSave\",\"manualColumnWidths\",t.manualColumnWidths)},v=function(){var t=this,e={};return t.PluginHooks.run(\"persistentStateLoad\",\"manualColumnWidths\",e),e.value},y=function(){var t=this,r=0,s=null;this.rootElement.on(\"mouseenter.handsontable\",\"th\",function(n){i||e.call(t,n.currentTarget)}),this.rootElement.on(\"mousedown.handsontable\",\".manualColumnResizer\",function(){null==s&&(s=setTimeout(function(){r>=2&&(l=t.determineColumnWidth.call(t,o),b(o,l),t.forceFullRender=!0,t.view.render(),t.PluginHooks.run(\"afterColumnResize\",o,l)),r=0,s=null\n",
        "                },500)),r++}),this.rootElement.on(\"mousedown.handsontable\",\".manualColumnResizer\",function(e){c=e.pageX,n.call(t),l=h})};this.beforeInit=function(){this.manualColumnWidths=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualColumnResize;if(n){var i=this.getSettings().manualColumnResize,r=v.call(e);this.manualColumnWidths=\"undefined\"!=typeof r?r:i instanceof Array?i:[],\"afterInit\"==t&&(y.call(this),e.forceFullRender=!0,e.render())}};var b=function(t,e){return e=Math.max(e,20),t=a.PluginHooks.execute(\"modifyCol\",t),a.manualColumnWidths[t]=e,e};this.getColWidth=function(t,e){this.getSettings().manualColumnResize&&this.manualColumnWidths[t]&&(e.width=this.manualColumnWidths[t])}}function l(t){var n,i=function(){e.localStorage[t+\"__persistentStateKeys\"]=JSON.stringify(n)},r=function(){var i=e.localStorage[t+\"__persistentStateKeys\"],r=\"string\"==typeof i?JSON.parse(i):void 0;n=r?r:[]},o=function(){n=[],i()};r(),this.saveValue=function(r,o){e.localStorage[t+\"_\"+r]=JSON.stringify(o),-1==n.indexOf(r)&&(n.push(r),i())},this.loadValue=function(n,i){n=\"undefined\"!=typeof n?n:i;var r=e.localStorage[t+\"_\"+n];return\"undefined\"==typeof r?void 0:JSON.parse(r)},this.reset=function(n){e.localStorage.removeItem(t+\"_\"+n)},this.resetAll=function(){for(var i=0;i<n.length;i++)e.localStorage.removeItem(t+\"_\"+n[i]);o()}}function c(){this.boundaries=null,this.callback=null}function h(){this.maxOuts=10}function u(e,n){var i;this.instance=e,this.settings=n,this.wtDom=this.instance.wtDom,this.main=document.createElement(\"div\"),i=this.main.style,i.position=\"absolute\",i.top=0,i.left=0;for(var r=0;5>r;r++){var o=document.createElement(\"DIV\");o.className=\"wtBorder \"+(n.className||\"\"),i=o.style,i.backgroundColor=n.border.color,i.height=n.border.width+\"px\",i.width=n.border.width+\"px\",this.main.appendChild(o)}this.top=this.main.childNodes[0],this.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.style,this.corner=this.main.childNodes[4],this.corner.className+=\" corner\",this.cornerStyle=this.corner.style,this.cornerStyle.width=\"5px\",this.cornerStyle.height=\"5px\",this.cornerStyle.border=\"2px solid #FFF\",this.disappear(),e.wtTable.bordersHolder||(e.wtTable.bordersHolder=document.createElement(\"div\"),e.wtTable.bordersHolder.className=\"htBorders\",e.wtTable.hider.appendChild(e.wtTable.bordersHolder)),e.wtTable.bordersHolder.appendChild(this.main);var s=!1,a=t(document.body);a.on(\"mousedown.walkontable.\"+e.guid,function(){s=!0}),a.on(\"mouseup.walkontable.\"+e.guid,function(){s=!1}),t(this.main.childNodes).on(\"mouseenter\",function(n){if(s&&e.getSetting(\"hideBorderOnMouseDownOver\")){n.preventDefault(),n.stopImmediatePropagation();var i=this.getBoundingClientRect(),r=t(this);r.hide();var o=function(t){return t.clientY<Math.floor(i.top)?!0:t.clientY>Math.ceil(i.top+i.height)?!0:t.clientX<Math.floor(i.left)?!0:t.clientX>Math.ceil(i.left+i.width)?!0:void 0};a.on(\"mousemove.border.\"+e.guid,function(t){o(t)&&(a.off(\"mousemove.border.\"+e.guid),r.show())})}})}function p(){this.offset=0,this.total=0,this.fixedCount=0}function d(t){this.instance=t}function f(){this.cache=[]}function _(){this.countTH=0}function g(t,e,n,i){var r,o=0;for(d.apply(this,arguments),this.containerSizeFn=e,this.cellSizesSum=0,this.cellSizes=[],this.cellStretch=[],this.cellCount=0,this.remainingSize=0,this.strategy=i;;){if(r=n(o),void 0===r)break;if(this.cellSizesSum>=this.getContainerSize(this.cellSizesSum+r))break;this.cellSizes.push(r),this.cellSizesSum+=r,this.cellCount++,o++}var s=this.getContainerSize(this.cellSizesSum);this.remainingSize=this.cellSizesSum-s}function m(t){var e=this,n=[];if(this.guid=\"wt_\"+w(),this.wtDom=new y,t.cloneSource?(this.cloneSource=t.cloneSource,this.cloneOverlay=t.cloneOverlay,this.wtSettings=t.cloneSource.wtSettings,this.wtTable=new O(this,t.table),this.wtScroll=new C(this),this.wtViewport=t.cloneSource.wtViewport):(this.wtSettings=new P(this,t),this.wtTable=new O(this,t.table),this.wtScroll=new C(this),this.wtViewport=new R(this),this.wtScrollbars=new M(this),this.wtWheel=new j(this),this.wtEvent=new b(this)),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var i=0,r=this.wtTable.THEAD.childNodes[0].childNodes.length;r>i;i++)n.push(this.wtTable.THEAD.childNodes[0].childNodes[i].innerHTML);this.getSetting(\"columnHeaders\").length||this.update(\"columnHeaders\",[function(t,i){e.wtDom.fastInnerText(i,n[t])}])}this.selections={};var o=this.getSetting(\"selections\");if(o)for(var s in o)o.hasOwnProperty(s)&&(this.selections[s]=new E(this,o[s]));this.drawn=!1,this.drawInterrupted=!1}function v(e){this.instance=e,this.init(),this.clone=this.makeClone(\"debug\"),this.clone.wtTable.holder.style.opacity=.4,this.clone.wtTable.holder.style.textShadow=\"0 0 2px #ff0000\";var n,i=this,r=0,o=0,s=i.clone.wtTable.holder.parentNode;t(document.body).on(\"mousemove.\"+this.instance.guid,function(t){i.instance.wtTable.holder.parentNode&&(t.clientX-r>-5&&t.clientX-r<5&&t.clientY-o>-5&&t.clientY-o<5||(r=t.clientX,o=t.clientY,y.prototype.addClass(s,\"wtDebugHidden\"),y.prototype.removeClass(s,\"wtDebugVisible\"),clearTimeout(n),n=setTimeout(function(){y.prototype.removeClass(s,\"wtDebugHidden\"),y.prototype.addClass(s,\"wtDebugVisible\")},1e3)))})}function y(){}function b(e){var n=this;this.instance=e,this.wtDom=this.instance.wtDom;var i,r=[null,null],o=[null,null],s=function(t){var e=n.parentCell(t.target);n.wtDom.hasClass(t.target,\"corner\")?n.instance.getSetting(\"onCellCornerMouseDown\",t,t.target):e.TD&&\"TD\"===e.TD.nodeName&&n.instance.hasSetting(\"onCellMouseDown\")&&n.instance.getSetting(\"onCellMouseDown\",t,e.coords,e.TD),2!==t.button&&e.TD&&\"TD\"===e.TD.nodeName&&(r[0]=e.TD,clearTimeout(o[0]),o[0]=setTimeout(function(){r[0]=null},1e3))},a=function(t){if(n.instance.hasSetting(\"onCellMouseOver\")){var e=n.instance.wtTable.TABLE,r=n.wtDom.closest(t.target,[\"TD\",\"TH\"],e);r&&r!==i&&n.wtDom.isChildOf(r,e)&&(i=r,\"TD\"===r.nodeName&&n.instance.getSetting(\"onCellMouseOver\",t,n.instance.wtTable.getCoords(r),r))}},l=function(t){if(2!==t.button){var e=n.parentCell(t.target);e.TD===r[0]&&e.TD===r[1]?(n.wtDom.hasClass(t.target,\"corner\")?n.instance.getSetting(\"onCellCornerDblClick\",t,e.coords,e.TD):e.TD&&n.instance.getSetting(\"onCellDblClick\",t,e.coords,e.TD),r[0]=null,r[1]=null):e.TD===r[0]&&(r[1]=e.TD,clearTimeout(o[1]),o[1]=setTimeout(function(){r[1]=null},500))}};t(this.instance.wtTable.holder).on(\"mousedown\",s),t(this.instance.wtTable.TABLE).on(\"mouseover\",a),t(this.instance.wtTable.holder).on(\"mouseup\",l)}function w(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+t()+t()}function x(){}function k(t,e,n){d.apply(this,arguments),this.containerSizeFn=e,this.sizeAtIndex=n,this.cellSizesSum=0,this.cellSizes=[],this.cellCount=0,this.remainingSize=-1/0}function C(t){this.instance=t}function S(){}function T(t){this.instance=t,this.init(),this.clone=this.makeClone(\"corner\")}function A(t){this.instance=t,this.type=\"horizontal\",this.cellSize=50,this.init(),this.clone=this.makeClone(\"left\")}function D(t){this.instance=t,this.type=\"vertical\",this.cellSize=23,this.init(),this.clone=this.makeClone(\"top\")}function M(t){this.instance=t,t.getSetting(\"nativeScrollbars\")?(t.update(\"scrollbarWidth\",t.wtDom.getScrollbarWidth()),t.update(\"scrollbarHeight\",t.wtDom.getScrollbarWidth()),this.vertical=new D(t),this.horizontal=new A(t),this.corner=new T(t),t.getSetting(\"debug\")&&(this.debug=new v(t)),this.registerListeners()):(this.vertical=new U(t),this.horizontal=new Y(t))}function E(t,e){this.instance=t,this.settings=e,this.selected=[],e.border&&(this.border=new u(t,e))}function P(t,e){var n=this;this.instance=t,this.defaults={table:void 0,debug:!1,scrollH:\"auto\",scrollV:\"auto\",nativeScrollbars:!1,stretchH:\"hybrid\",currentRowClassName:null,currentColumnClassName:null,data:void 0,offsetRow:0,offsetColumn:0,fixedColumnsLeft:0,fixedRowsTop:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,width:null,height:null,cellRenderer:function(t,e,i){var r=n.getSetting(\"data\",t,e);n.instance.wtDom.fastInnerText(i,void 0===r||null===r?\"\":r)},columnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,onCellMouseDown:null,onCellMouseOver:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onScrollVertically:null,onScrollHorizontally:null,scrollbarWidth:10,scrollbarHeight:10},this.settings={};for(var i in this.defaults)if(this.defaults.hasOwnProperty(i))if(void 0!==e[i])this.settings[i]=e[i];else{if(void 0===this.defaults[i])throw new Error('A required setting \"'+i+'\" was not provided');this.settings[i]=this.defaults[i]}}function O(t,e){this.instance=t,this.TABLE=e,this.wtDom=this.instance.wtDom,this.wtDom.removeTextNodes(this.TABLE);var n=this.TABLE.parentNode;if(!n||1!==n.nodeType||!this.wtDom.hasClass(n,\"wtHolder\")){var i=document.createElement(\"DIV\");i.className=\"wtSpreader\",n&&n.insertBefore(i,this.TABLE),i.appendChild(this.TABLE)}if(this.spreader=this.TABLE.parentNode,n=this.spreader.parentNode,!n||1!==n.nodeType||!this.wtDom.hasClass(n,\"wtHolder\")){var r=document.createElement(\"DIV\");r.className=\"wtHider\",n&&n.insertBefore(r,this.spreader),r.appendChild(this.spreader)}if(this.hider=this.spreader.parentNode,this.hiderStyle=this.hider.style,this.hiderStyle.position=\"relative\",n=this.hider.parentNode,!n||1!==n.nodeType||!this.wtDom.hasClass(n,\"wtHolder\")){var o=document.createElement(\"DIV\");o.style.position=\"relative\",o.className=\"wtHolder\",n&&n.insertBefore(o,this.hider),o.appendChild(this.hider)}if(this.holder=this.hider.parentNode,this.TBODY=this.TABLE.getElementsByTagName(\"TBODY\")[0],this.TBODY||(this.TBODY=document.createElement(\"TBODY\"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.getElementsByTagName(\"THEAD\")[0],this.THEAD||(this.THEAD=document.createElement(\"THEAD\"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.getElementsByTagName(\"COLGROUP\")[0],this.COLGROUP||(this.COLGROUP=document.createElement(\"COLGROUP\"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.instance.getSetting(\"columnHeaders\").length&&!this.THEAD.childNodes.length){var s=document.createElement(\"TR\");this.THEAD.appendChild(s)}this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.oldCellCache=new f,this.currentCellCache=new f,this.rowFilter=new x,this.columnFilter=new _,this.verticalRenderReverse=!1}function R(n){if(this.instance=n,this.resetSettings(),this.instance.getSetting(\"nativeScrollbars\")){var i=this;t(e).on(\"resize\",function(){i.clientHeight=i.getWorkspaceHeight()})}}function j(e){e.getSetting(\"nativeScrollbars\")||t(e.wtTable.spreader).on(\"mousewheel\",function(t,n,i,r){i||r||!n||(r=n),(i||r)&&(r>0&&0===e.getSetting(\"offsetRow\")||0>r&&e.wtTable.isLastRowFullyVisible()||0>i&&0===e.getSetting(\"offsetColumn\")||i>0&&e.wtTable.isLastColumnFullyVisible()||(clearTimeout(e.wheelTimeout),e.wheelTimeout=setTimeout(function(){r?e.wtScrollbars.vertical.visible&&e.scrollVertical(-Math.ceil(r)).draw():i&&e.wtScrollbars.horizontal.visible&&e.scrollHorizontal(Math.ceil(i)).draw()},0),t.preventDefault()))})}Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e=this.length>>>0,n=Number(arguments[1])||0;for(n=0>n?Math.ceil(n):Math.floor(n),0>n&&(n+=e);e>n;n++)if(n in this&&this[n]===t)return n;return-1}),Array.prototype.filter||(Array.prototype.filter=function(t,e){function n(t){return/NodeList/i.test(t.item)}function i(t){for(var e=[],n=0,i=t.length;i>n;n++)e[n]=t[n];return e}if(\"undefined\"==typeof this||null===this)throw new TypeError;if(\"function\"!=typeof t)throw new TypeError;e=e||this,n(e)&&(e=i(e));var r,o,s=e.length,a=[];for(r=0;s>r;r+=1)e.hasOwnProperty(r)&&(o=e[r],t.call(e,o,r,e)&&a.push(o));return a}),\"undefined\"==typeof WeakMap&&!function(){var t=Object.defineProperty;try{var n=!0;t(function(){},\"foo\",{})}catch(i){n=!1}var r=+new Date%1e9,o=function(){this.name=\"__st\"+(1e9*Math.random()>>>0)+(r++ +\"__\"),n||(this._wmCache=[])};o.prototype=n?{set:function(e,n){var i=e[this.name];i&&i[0]===e?i[1]=n:t(e,this.name,{value:[e,n],writable:!0})},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},\"delete\":function(t){this.set(t,void 0)}}:{set:function(t,e){if(\"undefined\"!=typeof t&&\"undefined\"!=typeof e){for(var n=0,i=this._wmCache.length;i>n;n++)if(this._wmCache[n].key==t)return void(this._wmCache[n].value=e);this._wmCache.push({key:t,value:e})}},get:function(t){if(\"undefined\"!=typeof t)for(var e=0,n=this._wmCache.length;n>e;e++)if(this._wmCache[e].key==t)return this._wmCache[e].value},\"delete\":function(t){if(\"undefined\"!=typeof t)for(var e=0,n=this._wmCache.length;n>e;e++)this._wmCache[e].key==t&&Array.prototype.slice.call(this._wmCache,e,1)}},e.WeakMap=o}(),i.activeGuid=null,i.Core=function(n,r){function o(){var t=!1;return{validatorsInQueue:0,addValidatorToQueue:function(){this.validatorsInQueue++,t=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){0==this.validatorsInQueue&&0==t&&(t=!0,this.onQueueEmpty())}}}function s(e,n,i){function r(){var r;e.length&&(r=g.PluginHooks.execute(\"beforeChange\",e,n),\"function\"==typeof r?t.when(result).then(function(){i()}):r===!1&&e.splice(0,e.length)),\"function\"!=typeof r&&i()}var s=new o;s.onQueueEmpty=r;for(var a=e.length-1;a>=0;a--)if(null===e[a])e.splice(a,1);else{var l=e[a][0],c=u.propToCol(e[a][1]),h=g.runHooksAndReturn(\"modifyCol\",c),p=g.getCellMeta(l,h);\"numeric\"===p.type&&\"string\"==typeof e[a][3]&&e[a][3].length>0&&/^-?[\\d\\s]*\\.?\\d*$/.test(e[a][3])&&(e[a][3]=numeral().unformat(e[a][3]||\"0\")),g.getCellValidator(p)&&(s.addValidatorToQueue(),g.validateCell(e[a][3],p,function(t,n){return function(i){if(\"boolean\"!=typeof i)throw new Error(\"Validation error: result is not boolean\");i===!1&&n.allowInvalid===!1&&(e.splice(t,1),n.valid=!0,--t),s.removeValidatorFormQueue()}}(a,p),n))}s.checkIfQueueIsEmpty()}function a(t,e){var n=t.length-1;if(!(0>n)){for(;n>=0;n--)if(null!==t[n]){if(h.settings.minSpareRows)for(;t[n][0]>g.countRows()-1;)u.createRow();if(\"array\"===g.dataType&&h.settings.minSpareCols)for(;u.propToCol(t[n][1])>g.countCols()-1;)u.createCol();u.set(t[n][0],t[n][1],t[n][3])}else t.splice(n,1);g.forceFullRender=!0,p.adjustRowsAndCols(),d.refreshBorders(null,!0),g.PluginHooks.run(\"afterChange\",t,e||\"edit\")}}function l(e,n,i){return\"object\"==typeof e?e:t.isPlainObject(i)?i:[[e,n,i]]}function c(t){if(t.hasOwnProperty(\"type\")){var e,n={};if(\"object\"==typeof t.type)e=t.type;else if(\"string\"==typeof t.type&&(e=i.cellTypes[t.type],void 0===e))throw new Error('You declared cell type \"'+t.type+'\" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');for(var r in e)e.hasOwnProperty(r)&&!t.hasOwnProperty(r)&&(n[r]=e[r]);return n}}var h,u,p,d,f,_,g=this,m=function(){};i.helper.extend(m.prototype,N.prototype),i.helper.extend(m.prototype,r),i.helper.extend(m.prototype,c(r)),this.rootElement=n;var v=t(document.documentElement),y=t(document.body);this.guid=\"ht_\"+i.helper.randomString(),this.rootElement[0].id||(this.rootElement[0].id=this.guid),h={cellSettings:[],columnSettings:[],columnsSettingConflicts:[\"data\",\"width\"],settings:new m,settingsFromDOM:{},selStart:new i.SelectionPoint,selEnd:new i.SelectionPoint,isPopulated:null,scrollable:null,extensions:{},firstRun:!0},p={alter:function(t,e,n,r,o){var s;switch(n=n||1,t){case\"insert_row\":s=u.createRow(e,n),s&&(h.selStart.exists()&&h.selStart.row()>=e?(h.selStart.row(h.selStart.row()+s),d.transformEnd(s,0)):d.refreshBorders());break;case\"insert_col\":if(s=u.createCol(e,n)){if(i.helper.isArray(g.getSettings().colHeaders)){var a=[e,0];a.length+=s,Array.prototype.splice.apply(g.getSettings().colHeaders,a)}h.selStart.exists()&&h.selStart.col()>=e?(h.selStart.col(h.selStart.col()+s),d.transformEnd(0,s)):d.refreshBorders()}break;case\"remove_row\":u.removeRow(e,n),h.cellSettings.splice(e,n),p.adjustRowsAndCols(),d.refreshBorders();break;case\"remove_col\":u.removeCol(e,n);for(var l=0,c=u.getAll().length;c>l;l++)l in h.cellSettings&&h.cellSettings[l].splice(e,n);i.helper.isArray(g.getSettings().colHeaders)&&(\"undefined\"==typeof e&&(e=-1),g.getSettings().colHeaders.splice(e,n)),h.columnSettings.splice(e,n),p.adjustRowsAndCols(),d.refreshBorders();break;default:throw new Error('There is no such action \"'+t+'\"')}o||p.adjustRowsAndCols()},adjustRowsAndCols:function(){var t,e,n,i=g.countEmptyRows(!0);if(e=g.countRows(),e<h.settings.minRows)for(t=0;t<h.settings.minRows-e;t++)u.createRow(g.countRows(),1,!0);if(i<h.settings.minSpareRows)for(;i<h.settings.minSpareRows&&g.countRows()<h.settings.maxRows;i++)u.createRow(g.countRows(),1,!0);if(n=g.countEmptyCols(!0),!h.settings.columns&&g.countCols()<h.settings.minCols)for(;g.countCols()<h.settings.minCols;n++)u.createCol(g.countCols(),1,!0);if(!h.settings.columns&&\"array\"===g.dataType&&n<h.settings.minSpareCols)for(;n<h.settings.minSpareCols&&g.countCols()<h.settings.maxCols;n++)u.createCol(g.countCols(),1,!0);if(h.settings.enterBeginsEditing)for(;(h.settings.minRows||h.settings.minSpareRows)&&g.countRows()>h.settings.minRows&&h.settings.minSpareRows&&i>h.settings.minSpareRows;i--)u.removeRow();if(h.settings.enterBeginsEditing&&!h.settings.columns)for(;(h.settings.minCols||h.settings.minSpareCols)&&g.countCols()>h.settings.minCols&&h.settings.minSpareCols&&n>h.settings.minSpareCols;n--)u.removeCol();var r=g.countRows(),o=g.countCols();if((0===r||0===o)&&d.deselect(),h.selStart.exists()){var s,a=h.selStart.row(),l=h.selStart.col(),c=h.selEnd.row(),p=h.selEnd.col();a>r-1?(a=r-1,s=!0,c>a&&(c=a)):c>r-1&&(c=r-1,s=!0,a>c&&(a=c)),l>o-1?(l=o-1,s=!0,p>l&&(p=l)):p>o-1&&(p=o-1,s=!0,l>p&&(l=p)),s&&g.selectCell(a,l,c,p)}},populateFromArray:function(t,e,n,r,o){var s,a,l,c,u=[],p={};if(a=e.length,0===a)return!1;var d,f,_,m;switch(o){case\"shift_down\":for(d=n?n.col-t.col+1:0,f=n?n.row-t.row+1:0,e=i.helper.translateRowsToColumns(e),l=0,c=e.length,_=Math.max(c,d);_>l;l++)if(c>l){for(s=0,a=e[l].length;f-a>s;s++)e[l].push(e[l][s%a]);e[l].unshift(t.col+l,t.row,0),g.spliceCol.apply(g,e[l])}else e[l%c][0]=t.col+l,g.spliceCol.apply(g,e[l%c]);break;case\"shift_right\":for(d=n?n.col-t.col+1:0,f=n?n.row-t.row+1:0,s=0,a=e.length,m=Math.max(a,f);m>s;s++)if(a>s){for(l=0,c=e[s].length;d-c>l;l++)e[s].push(e[s][l%c]);e[s].unshift(t.row+s,t.col,0),g.spliceRow.apply(g,e[s])}else e[s%a][0]=t.row+s,g.spliceRow.apply(g,e[s%a]);break;case\"overwrite\":default:for(p.row=t.row,p.col=t.col,s=0;a>s&&!(n&&p.row>n.row||!h.settings.minSpareRows&&p.row>g.countRows()-1||p.row>=h.settings.maxRows);s++){for(p.col=t.col,c=e[s]?e[s].length:0,l=0;c>l&&!(n&&p.col>n.col||!h.settings.minSpareCols&&p.col>g.countCols()-1||p.col>=h.settings.maxCols);l++)g.getCellMeta(p.row,p.col).readOnly||u.push([p.row,p.col,e[s][l]]),p.col++,n&&l===c-1&&(l=-1);p.row++,n&&s===a-1&&(s=-1)}g.setDataAtCell(u,null,null,r||\"populateFromArray\")}},getCornerCoords:function(e){function n(e,n,i){function r(t){return t[i]}return Array.prototype.map?e.apply(Math,n.map(r)):e.apply(Math,t.map(n,r))}return{TL:{row:n(Math.min,e,\"row\"),col:n(Math.min,e,\"col\")},BR:{row:n(Math.max,e,\"row\"),col:n(Math.max,e,\"col\")}}},getCellsAtCoords:function(t,e){var n,i,r=p.getCornerCoords([t,e]),o=[];for(n=r.TL.row;n<=r.BR.row;n++)for(i=r.TL.col;i<=r.BR.col;i++)o.push(g.view.getCellAtCoords({row:n,col:i}));return o}},this.selection=d={inProgress:!1,begin:function(){g.selection.inProgress=!0},finish:function(){var t=g.getSelected();g.PluginHooks.run(\"afterSelectionEnd\",t[0],t[1],t[2],t[3]),g.PluginHooks.run(\"afterSelectionEndByProp\",t[0],g.colToProp(t[1]),t[2],g.colToProp(t[3])),g.selection.inProgress=!1},isInProgress:function(){return g.selection.inProgress},setRangeStart:function(t){h.selStart.coords(t),d.setRangeEnd(t)},setRangeEnd:function(t,e){g.selection.begin(),h.selEnd.coords(t),h.settings.multiSelect||h.selStart.coords(t),g.view.wt.selections.current.clear(),g.view.wt.selections.current.add(h.selStart.arr()),g.view.wt.selections.area.clear(),d.isMultiple()&&(g.view.wt.selections.area.add(h.selStart.arr()),g.view.wt.selections.area.add(h.selEnd.arr())),(h.settings.currentRowClassName||h.settings.currentColClassName)&&(g.view.wt.selections.highlight.clear(),g.view.wt.selections.highlight.add(h.selStart.arr()),g.view.wt.selections.highlight.add(h.selEnd.arr())),g.PluginHooks.run(\"afterSelection\",h.selStart.row(),h.selStart.col(),h.selEnd.row(),h.selEnd.col()),g.PluginHooks.run(\"afterSelectionByProp\",h.selStart.row(),u.colToProp(h.selStart.col()),h.selEnd.row(),u.colToProp(h.selEnd.col())),e!==!1&&g.view.scrollViewport(t),d.refreshBorders()},refreshBorders:function(t,e){e||f.destroyEditor(t),g.view.render(),d.isSelected()&&!e&&f.prepareEditor()},isMultiple:function(){return!(h.selEnd.col()===h.selStart.col()&&h.selEnd.row()===h.selStart.row())},transformStart:function(t,e,n){h.selStart.row()+t>g.countRows()-1?n&&h.settings.minSpareRows>0?g.alter(\"insert_row\",g.countRows()):h.settings.autoWrapCol&&(t=1-g.countRows(),e=h.selStart.col()+e==g.countCols()-1?1-g.countCols():1):h.settings.autoWrapCol&&h.selStart.row()+t<0&&h.selStart.col()+e>=0&&(t=g.countRows()-1,e=h.selStart.col()+e==0?g.countCols()-1:-1),h.selStart.col()+e>g.countCols()-1?n&&h.settings.minSpareCols>0?g.alter(\"insert_col\",g.countCols()):h.settings.autoWrapRow&&(t=h.selStart.row()+t==g.countRows()-1?1-g.countRows():1,e=1-g.countCols()):h.settings.autoWrapRow&&h.selStart.col()+e<0&&h.selStart.row()+t>=0&&(t=h.selStart.row()+t==0?g.countRows()-1:-1,e=g.countCols()-1);var i=g.countRows(),r=g.countCols(),o={row:h.selStart.row()+t,col:h.selStart.col()+e};o.row<0?o.row=0:o.row>0&&o.row>=i&&(o.row=i-1),o.col<0?o.col=0:o.col>0&&o.col>=r&&(o.col=r-1),d.setRangeStart(o)},transformEnd:function(t,e){if(h.selEnd.exists()){var n=g.countRows(),i=g.countCols(),r={row:h.selEnd.row()+t,col:h.selEnd.col()+e};r.row<0?r.row=0:r.row>0&&r.row>=n&&(r.row=n-1),r.col<0?r.col=0:r.col>0&&r.col>=i&&(r.col=i-1),d.setRangeEnd(r)}},isSelected:function(){return h.selEnd.exists()},inInSelection:function(t){if(!d.isSelected())return!1;var e=p.getCornerCoords([h.selStart.coords(),h.selEnd.coords()]);return e.TL.row<=t.row&&e.BR.row>=t.row&&e.TL.col<=t.col&&e.BR.col>=t.col},deselect:function(){d.isSelected()&&(g.selection.inProgress=!1,h.selEnd=new i.SelectionPoint,g.view.wt.selections.current.clear(),g.view.wt.selections.area.clear(),f.destroyEditor(),d.refreshBorders(),g.PluginHooks.run(\"afterDeselect\"))},selectAll:function(){h.settings.multiSelect&&(d.setRangeStart({row:0,col:0}),d.setRangeEnd({row:g.countRows()-1,col:g.countCols()-1},!1))},empty:function(){if(d.isSelected()){var t,e,n=p.getCornerCoords([h.selStart.coords(),h.selEnd.coords()]),i=[];for(t=n.TL.row;t<=n.BR.row;t++)for(e=n.TL.col;e<=n.BR.col;e++)g.getCellMeta(t,e).readOnly||i.push([t,e,\"\"]);g.setDataAtCell(i)}}},this.autofill=_={handle:null,init:function(){_.handle?_.handle.disabled=!1:_.handle={}},disable:function(){_.handle.disabled=!0},selectAdjacent:function(){var t,e,n,i,r;t=d.isMultiple()?g.view.wt.selections.area.getCorners():g.view.wt.selections.current.getCorners(),e=u.getAll();t:for(n=t[2]+1;n<g.countRows();n++){for(r=t[1];r<=t[3];r++)if(e[n][r])break t;(e[n][t[1]-1]||e[n][t[3]+1])&&(i=n)}i&&(g.view.wt.selections.fill.clear(),g.view.wt.selections.fill.add([t[0],t[1]]),g.view.wt.selections.fill.add([i,t[3]]),_.apply())},apply:function(){var t,e,n,i,r;_.handle.isDragged=0,t=g.view.wt.selections.fill.getCorners(),t&&(g.view.wt.selections.fill.clear(),e=d.isMultiple()?g.view.wt.selections.area.getCorners():g.view.wt.selections.current.getCorners(),t[0]===e[0]&&t[1]<e[1]?(n={row:t[0],col:t[1]},i={row:t[2],col:e[1]-1}):t[0]===e[0]&&t[3]>e[3]?(n={row:t[0],col:e[3]+1},i={row:t[2],col:t[3]}):t[0]<e[0]&&t[1]===e[1]?(n={row:t[0],col:t[1]},i={row:e[0]-1,col:t[3]}):t[2]>e[2]&&t[1]===e[1]&&(n={row:e[2]+1,col:t[1]},i={row:t[2],col:t[3]}),n&&(r=SheetClip.parse(u.getText(h.selStart.coords(),h.selEnd.coords())),g.PluginHooks.run(\"beforeAutofill\",n,i,r),p.populateFromArray(n,r,i,\"autofill\"),d.setRangeStart({row:t[0],col:t[1]}),d.setRangeEnd({row:t[2],col:t[3]})))},showBorder:function(t){t.row=t[0],t.col=t[1];var e=p.getCornerCoords([h.selStart.coords(),h.selEnd.coords()]);if(\"horizontal\"!==h.settings.fillHandle&&(e.BR.row<t.row||e.TL.row>t.row))t=[t.row,e.BR.col];else{if(\"vertical\"===h.settings.fillHandle)return;t=[e.BR.row,t.col]}g.view.wt.selections.fill.clear(),g.view.wt.selections.fill.add([h.selStart.coords().row,h.selStart.coords().col]),g.view.wt.selections.fill.add([h.selEnd.coords().row,h.selEnd.coords().col]),g.view.wt.selections.fill.add(t),g.view.render()}},this.init=function(){g.PluginHooks.run(\"beforeInit\"),this.view=new i.TableView(this),f=new i.EditorManager(g,h,d,u),this.updateSettings(h.settings,!0),this.parseSettingsFromDOM(),this.forceFullRender=!0,this.view.render(),\"object\"==typeof h.firstRun&&(g.PluginHooks.run(\"afterChange\",h.firstRun[0],h.firstRun[1]),h.firstRun=!1),g.PluginHooks.run(\"afterInit\")},this.validateCell=function(t,e,n,i){var r=g.getCellValidator(e);\"[object RegExp]\"===Object.prototype.toString.call(r)&&(r=function(t){return function(e,n){n(t.test(e))}}(r)),\"function\"==typeof r?(t=g.PluginHooks.execute(\"beforeValidate\",t,e.row,e.prop,i),setTimeout(function(){r.call(e,t,function(r){e.valid=r,r=g.PluginHooks.execute(\"afterValidate\",r,t,e.row,e.prop,i),n(r)})})):(e.valid=!0,n(!0))},this.setDataAtCell=function(t,e,n,i){var r,o,c,h=l(t,e,n),p=[];for(r=0,o=h.length;o>r;r++){if(\"object\"!=typeof h[r])throw new Error(\"Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter\");if(\"number\"!=typeof h[r][1])throw new Error(\"Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`\");c=u.colToProp(h[r][1]),p.push([h[r][0],c,u.get(h[r][0],c),h[r][2]])}i||\"object\"!=typeof t||(i=e),s(p,i,function(){a(p,i)})},this.setDataAtRowProp=function(t,e,n,i){var r,o,c=l(t,e,n),h=[];for(r=0,o=c.length;o>r;r++)h.push([c[r][0],c[r][1],u.get(c[r][0],c[r][1]),c[r][2]]);i||\"object\"!=typeof t||(i=e),s(h,i,function(){a(h,i)})},this.listen=function(){i.activeGuid=g.guid,document.activeElement&&document.activeElement!==document.body?document.activeElement.blur():document.activeElement||document.body.focus()},this.unlisten=function(){i.activeGuid=null},this.isListening=function(){return i.activeGuid===g.guid},this.destroyEditor=function(t){d.refreshBorders(t)},this.populateFromArray=function(t,e,n,i,r,o,s){if(\"object\"!=typeof n||\"object\"!=typeof n[0])throw new Error(\"populateFromArray parameter `input` must be an array of arrays\");return p.populateFromArray({row:t,col:e},n,\"number\"==typeof i?{row:i,col:r}:null,o,s)},this.spliceCol=function(){return u.spliceCol.apply(u,arguments)},this.spliceRow=function(){return u.spliceRow.apply(u,arguments)},this.getCornerCoords=function(t){return p.getCornerCoords(t)},this.getSelected=function(){return d.isSelected()?[h.selStart.row(),h.selStart.col(),h.selEnd.row(),h.selEnd.col()]:void 0},this.parseSettingsFromDOM=function(){var t=this.rootElement.css(\"overflow\");if(\"scroll\"===t||\"auto\"===t?(this.rootElement[0].style.overflow=\"visible\",h.settingsFromDOM.overflow=t):(void 0===h.settings.width||void 0===h.settings.height)&&(h.settingsFromDOM.overflow=\"auto\"),h.settingsFromDOM.width=void 0===h.settings.width?this.rootElement.width():void 0,h.settingsFromDOM.height=void 0,void 0===h.settings.height&&(\"scroll\"===h.settingsFromDOM.overflow||\"auto\"===h.settingsFromDOM.overflow)){var n=this.rootElement[0].cloneNode(!1),i=this.rootElement[0].parentNode;if(i){n.removeAttribute(\"id\"),i.appendChild(n);var r=parseInt(n.clientHeight,10),o=parseInt(e.getComputedStyle(n,null).getPropertyValue(\"paddingTop\"),10)||0,s=parseInt(e.getComputedStyle(n,null).getPropertyValue(\"paddingBottom\"),10)||0,a=r-o-s;isNaN(a)&&n.currentStyle&&(a=parseInt(n.currentStyle.height,10)),a>0&&(h.settingsFromDOM.height=a),i.removeChild(n)}}},this.render=function(){g.view&&(g.forceFullRender=!0,g.parseSettingsFromDOM(),d.refreshBorders(null,!0))},this.loadData=function(t){function e(){h.cellSettings.length=0}if(\"object\"==typeof t&&null!==t)t.push&&t.splice||(t=[t]);else{if(null!==t)throw new Error(\"loadData only accepts array of objects or array of arrays (\"+typeof t+\" given)\");t=[];for(var n,r=0,o=h.settings.startRows;o>r;r++){n=[];for(var s=0,a=h.settings.startCols;a>s;s++)n.push(null);t.push(n)}}h.isPopulated=!1,m.prototype.data=t,g.dataType=h.settings.dataSchema instanceof Array||t[0]instanceof Array?\"array\":\"function\"==typeof h.settings.dataSchema?\"function\":\"object\",u=new i.DataMap(g,h,m),e(),p.adjustRowsAndCols(),g.PluginHooks.run(\"afterLoadData\"),h.firstRun?h.firstRun=[null,\"loadData\"]:(g.PluginHooks.run(\"afterChange\",null,\"loadData\"),g.render()),h.isPopulated=!0},this.getData=function(t,e,n,i){return\"undefined\"==typeof t?u.getAll():u.getRange({row:t,col:e},{row:n,col:i},u.DESTINATION_RENDERER)},this.getCopyableData=function(t,e,n,i){return u.getCopyableText({row:t,col:e},{row:n,col:i})},this.updateSettings=function(t,e){var n,r;if(\"undefined\"!=typeof t.rows)throw new Error(\"'rows' setting is no longer supported. do you mean startRows, minRows or maxRows?\");if(\"undefined\"!=typeof t.cols)throw new Error(\"'cols' setting is no longer supported. do you mean startCols, minCols or maxCols?\");for(n in t)\"data\"!==n&&(void 0!==g.PluginHooks.hooks[n]||void 0!==g.PluginHooks.legacy[n]?(\"function\"==typeof t[n]||i.helper.isArray(t[n]))&&g.PluginHooks.add(n,t[n]):(!e&&t.hasOwnProperty(n)&&(m.prototype[n]=t[n]),i.extension[n]&&(h.extensions[n]=new i.extension[n](g,t[n]))));if(void 0===t.data&&void 0===h.settings.data?g.loadData(null):void 0!==t.data?g.loadData(t.data):void 0!==t.columns&&u.createMap(),r=g.countCols(),h.cellSettings.length=0,r>0){var o,s;for(n=0;r>n;n++)h.columnSettings[n]=i.helper.columnFactory(m,h.columnsSettingConflicts),o=h.columnSettings[n].prototype,m.prototype.columns&&(s=m.prototype.columns[n],i.helper.extend(o,s),i.helper.extend(o,c(s)))}\"undefined\"!=typeof t.fillHandle&&(_.handle&&t.fillHandle===!1?_.disable():_.handle||t.fillHandle===!1||_.init()),\"undefined\"!=typeof t.className&&(m.prototype.className&&g.rootElement.removeClass(m.prototype.className),t.className&&g.rootElement.addClass(t.className)),e||g.PluginHooks.run(\"afterUpdateSettings\"),p.adjustRowsAndCols(),g.view&&!h.firstRun&&(g.forceFullRender=!0,d.refreshBorders(null,!0))},this.getValue=function(){var t=g.getSelected();if(m.prototype.getValue){if(\"function\"==typeof m.prototype.getValue)return m.prototype.getValue.call(g);if(t)return g.getData()[t[0]][m.prototype.getValue]}else if(t)return g.getDataAtCell(t[0],t[1])},this.getSettings=function(){return h.settings},this.getSettingsFromDOM=function(){return h.settingsFromDOM},this.clear=function(){d.selectAll(),d.empty()},this.alter=function(t,e,n,i,r){p.alter(t,e,n,i,r)},this.getCell=function(t,e){return g.view.getCellAtCoords({row:t,col:e})},this.colToProp=function(t){return u.colToProp(t)},this.propToCol=function(t){return u.propToCol(t)},this.getDataAtCell=function(t,e){return u.get(t,u.colToProp(e))},this.getDataAtRowProp=function(t,e){return u.get(t,e)},this.getDataAtCol=function(t){return[].concat.apply([],u.getRange({row:0,col:t},{row:h.settings.data.length-1,col:t},u.DESTINATION_RENDERER))},this.getDataAtProp=function(t){return[].concat.apply([],u.getRange({row:0,col:u.propToCol(t)},{row:h.settings.data.length-1,col:u.propToCol(t)},u.DESTINATION_RENDERER))},this.getDataAtRow=function(t){return h.settings.data[t]},this.getCellMeta=function(t,e){function n(t){var e={row:t};return g.PluginHooks.execute(\"beforeGet\",e),e.row\n",
        "                }function r(t){return i.PluginHooks.execute(g,\"modifyCol\",t)}var o,s=u.colToProp(e);if(t=n(t),e=r(e),\"undefined\"==typeof h.columnSettings[e]&&(h.columnSettings[e]=i.helper.columnFactory(m,h.columnsSettingConflicts)),h.cellSettings[t]||(h.cellSettings[t]=[]),h.cellSettings[t][e]||(h.cellSettings[t][e]=new h.columnSettings[e]),o=h.cellSettings[t][e],o.row=t,o.col=e,o.prop=s,o.instance=g,g.PluginHooks.run(\"beforeGetCellMeta\",t,e,o),i.helper.extend(o,c(o)),o.cells){var a=o.cells.call(o,t,e,s);a&&(i.helper.extend(o,a),i.helper.extend(o,c(a)))}return g.PluginHooks.run(\"afterGetCellMeta\",t,e,o),o};var b=i.helper.cellMethodLookupFactory(\"renderer\");this.getCellRenderer=function(t,e){var n=b.call(this,t,e);return i.renderers.getRenderer(n)},this.getCellEditor=i.helper.cellMethodLookupFactory(\"editor\"),this.getCellValidator=i.helper.cellMethodLookupFactory(\"validator\"),this.validateCells=function(t){var e=new o;e.onQueueEmpty=t;for(var n=g.countRows()-1;n>=0;){for(var i=g.countCols()-1;i>=0;)e.addValidatorToQueue(),g.validateCell(g.getDataAtCell(n,i),g.getCellMeta(n,i),function(){e.removeValidatorFormQueue()},\"validateCells\"),i--;n--}e.checkIfQueueIsEmpty()},this.getRowHeader=function(t){if(void 0===t){for(var e=[],n=0,i=g.countRows();i>n;n++)e.push(g.getRowHeader(n));return e}return\"[object Array]\"===Object.prototype.toString.call(h.settings.rowHeaders)&&void 0!==h.settings.rowHeaders[t]?h.settings.rowHeaders[t]:\"function\"==typeof h.settings.rowHeaders?h.settings.rowHeaders(t):h.settings.rowHeaders&&\"string\"!=typeof h.settings.rowHeaders&&\"number\"!=typeof h.settings.rowHeaders?t+1:h.settings.rowHeaders},this.hasRowHeaders=function(){return!!h.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==h.settings.colHeaders&&null!==h.settings.colHeaders)return!!h.settings.colHeaders;for(var t=0,e=g.countCols();e>t;t++)if(g.getColHeader(t))return!0;return!1},this.getColHeader=function(t){if(void 0===t){for(var e=[],n=0,r=g.countCols();r>n;n++)e.push(g.getColHeader(n));return e}return t=i.PluginHooks.execute(g,\"modifyCol\",t),h.settings.columns&&h.settings.columns[t]&&h.settings.columns[t].title?h.settings.columns[t].title:\"[object Array]\"===Object.prototype.toString.call(h.settings.colHeaders)&&void 0!==h.settings.colHeaders[t]?h.settings.colHeaders[t]:\"function\"==typeof h.settings.colHeaders?h.settings.colHeaders(t):h.settings.colHeaders&&\"string\"!=typeof h.settings.colHeaders&&\"number\"!=typeof h.settings.colHeaders?i.helper.spreadsheetColumnLabel(t):h.settings.colHeaders},this._getColWidthFromSettings=function(t){var e=g.getCellMeta(0,t),n=e.width;if((void 0===n||n===h.settings.width)&&(n=e.colWidths),void 0!==n&&null!==n){switch(typeof n){case\"object\":n=n[t];break;case\"function\":n=n(t)}\"string\"==typeof n&&(n=parseInt(n,10))}return n},this.getColWidth=function(t){t=i.PluginHooks.execute(g,\"modifyCol\",t);var e={width:g._getColWidthFromSettings(t)};return e.width||(e.width=50),g.PluginHooks.run(\"afterGetColWidth\",t,e),e.width},this.countRows=function(){return h.settings.data.length},this.countCols=function(){return\"object\"===g.dataType||\"function\"===g.dataType?h.settings.columns&&h.settings.columns.length?h.settings.columns.length:u.colToPropCache.length:\"array\"===g.dataType?h.settings.columns&&h.settings.columns.length?h.settings.columns.length:h.settings.data&&h.settings.data[0]&&h.settings.data[0].length?h.settings.data[0].length:0:void 0},this.rowOffset=function(){return g.view.wt.getSetting(\"offsetRow\")},this.colOffset=function(){return g.view.wt.getSetting(\"offsetColumn\")},this.countVisibleRows=function(){return g.view.wt.drawn?g.view.wt.wtTable.rowStrategy.countVisible():-1},this.countVisibleCols=function(){return g.view.wt.drawn?g.view.wt.wtTable.columnStrategy.countVisible():-1},this.countEmptyRows=function(t){for(var e=g.countRows()-1,n=0;e>=0;){if(u.get(e,0),g.isEmptyRow(u.getVars.row))n++;else if(t)break;e--}return n},this.countEmptyCols=function(t){if(g.countRows()<1)return 0;for(var e=g.countCols()-1,n=0;e>=0;){if(g.isEmptyCol(e))n++;else if(t)break;e--}return n},this.isEmptyRow=function(t){return h.settings.isEmptyRow.call(g,t)},this.isEmptyCol=function(t){return h.settings.isEmptyCol.call(g,t)},this.selectCell=function(t,e,n,i,r){if(\"number\"!=typeof t||0>t||t>=g.countRows())return!1;if(\"number\"!=typeof e||0>e||e>=g.countCols())return!1;if(\"undefined\"!=typeof n){if(\"number\"!=typeof n||0>n||n>=g.countRows())return!1;if(\"number\"!=typeof i||0>i||i>=g.countCols())return!1}return h.selStart.coords({row:t,col:e}),document.activeElement&&document.activeElement!==document.documentElement&&document.activeElement!==document.body&&document.activeElement.blur(),g.listen(),\"undefined\"==typeof n?d.setRangeEnd({row:t,col:e},r):d.setRangeEnd({row:n,col:i},r),g.selection.finish(),!0},this.selectCellByProp=function(){return arguments[1]=u.propToCol(arguments[1]),\"undefined\"!=typeof arguments[3]&&(arguments[3]=u.propToCol(arguments[3])),g.selectCell.apply(g,arguments)},this.deselectCell=function(){d.deselect()},this.destroy=function(){g.clearTimeouts(),g.view&&g.view.wt.destroy(),g.rootElement.empty(),g.rootElement.removeData(\"handsontable\"),g.rootElement.off(\".handsontable\"),t(e).off(\".\"+g.guid),v.off(\".\"+g.guid),y.off(\".\"+g.guid),g.PluginHooks.run(\"afterDestroy\")},this.getActiveEditor=function(){return f.getActiveEditor()},this.getInstance=function(){return g.rootElement.data(\"handsontable\")},function(){g.PluginHooks=new i.PluginHookClass;var t=g.PluginHooks.run,e=g.PluginHooks.execute;g.PluginHooks.run=function(e,n,r,o,s,a){t.call(this,g,e,n,r,o,s,a),i.PluginHooks.run(g,e,n,r,o,s,a)},g.PluginHooks.execute=function(t,n,r,o,s,a){var l=i.PluginHooks.execute(g,t,n,r,o,s,a),c=e.call(this,g,t,l,r,o,s,a);return\"undefined\"==typeof c?l:c},g.addHook=function(){g.PluginHooks.add.apply(g.PluginHooks,arguments)},g.addHookOnce=function(){g.PluginHooks.once.apply(g.PluginHooks,arguments)},g.removeHook=function(){g.PluginHooks.remove.apply(g.PluginHooks,arguments)},g.runHooks=function(){g.PluginHooks.run.apply(g.PluginHooks,arguments)},g.runHooksAndReturn=function(){return g.PluginHooks.execute.apply(g.PluginHooks,arguments)}}(),this.timeouts={},this.registerTimeout=function(t,e,n){clearTimeout(this.timeouts[t]),this.timeouts[t]=setTimeout(e,n||0)},this.clearTimeouts=function(){for(var t in this.timeouts)this.timeouts.hasOwnProperty(t)&&clearTimeout(this.timeouts[t])},this.version=\"0.10.5\"};var N=function(){};N.prototype={data:void 0,width:void 0,height:void 0,startRows:5,startCols:5,rowHeaders:null,colHeaders:null,minRows:0,minCols:0,maxRows:1/0,maxCols:1/0,minSpareRows:0,minSpareCols:0,multiSelect:!0,fillHandle:!0,fixedRowsTop:0,fixedColumnsLeft:0,outsideClickDeselects:!0,enterBeginsEditing:!0,enterMoves:{row:1,col:0},tabMoves:{row:0,col:1},autoWrapRow:!1,autoWrapCol:!1,copyRowsLimit:1e3,copyColsLimit:1e3,pasteMode:\"overwrite\",currentRowClassName:void 0,currentColClassName:void 0,stretchH:\"hybrid\",isEmptyRow:function(t){for(var e,n=0,i=this.countCols();i>n;n++)if(e=this.getDataAtCell(t,n),\"\"!==e&&null!==e&&\"undefined\"!=typeof e)return!1;return!0},isEmptyCol:function(t){for(var e,n=0,i=this.countRows();i>n;n++)if(e=this.getDataAtCell(n,t),\"\"!==e&&null!==e&&\"undefined\"!=typeof e)return!1;return!0},observeDOMVisibility:!0,allowInvalid:!0,invalidCellClassName:\"htInvalid\",placeholderCellClassName:\"htPlaceholder\",readOnlyCellClassName:\"htDimmed\",fragmentSelection:!1,readOnly:!1,nativeScrollbars:!1,type:\"text\",copyable:!0,debug:!1},i.DefaultSettings=N,t.fn.handsontable=function(t){var e,n,r,o,s,a=this.first(),l=a.data(\"handsontable\");if(\"string\"!=typeof t)return s=t||{},l?l.updateSettings(s):(l=new i.Core(a,s),a.data(\"handsontable\",l),l.init()),a;if(r=[],arguments.length>1)for(e=1,n=arguments.length;n>e;e++)r.push(arguments[e]);if(l){if(\"undefined\"==typeof l[t])throw new Error(\"Handsontable do not provide action: \"+t);o=l[t].apply(l,r)}return o},function(t){function e(){function t(t){return null!==t&&!n(t)&&(\"string\"==typeof t||\"number\"==typeof t)}function e(t){return null!==t&&(\"object\"==typeof t||\"function\"==typeof t)}function n(t){return t!==t}var i={arrayMap:[],weakMap:new WeakMap};return{get:function(n){return t(n)?i.arrayMap[n]:e(n)?i.weakMap.get(n):void 0},set:function(n,r){if(t(n))i.arrayMap[n]=r;else{if(!e(n))throw new Error(\"Invalid key type\");i.weakMap.set(n,r)}},\"delete\":function(n){t(n)?delete i.arrayMap[n]:e(n)&&i.weakMap[\"delete\"](n)}}}t.MultiMap||(t.MultiMap=e)}(e),i.TableView=function(n){var r=this,o=t(e),s=t(document.documentElement);this.instance=n,this.settings=n.getSettings(),this.settingsFromDOM=n.getSettingsFromDOM(),n.rootElement.data(\"originalStyle\",n.rootElement[0].getAttribute(\"style\")),n.rootElement.addClass(\"handsontable\");var a=document.createElement(\"TABLE\");a.className=\"htCore\",this.THEAD=document.createElement(\"THEAD\"),a.appendChild(this.THEAD),this.TBODY=document.createElement(\"TBODY\"),a.appendChild(this.TBODY),n.$table=t(a),n.rootElement.prepend(n.$table),n.rootElement.on(\"mousedown.handsontable\",function(t){r.isTextSelectionAllowed(t.target)||(c(),t.preventDefault(),e.focus())}),s.on(\"keyup.\"+n.guid,function(t){n.selection.isInProgress()&&!t.shiftKey&&n.selection.finish()});var l;s.on(\"mouseup.\"+n.guid,function(t){n.selection.isInProgress()&&1===t.which&&n.selection.finish(),l=!1,n.autofill.handle&&n.autofill.handle.isDragged&&(n.autofill.handle.isDragged>1&&n.autofill.apply(),n.autofill.handle.isDragged=0),i.helper.isOutsideInput(document.activeElement)&&n.unlisten()}),s.on(\"mousedown.\"+n.guid,function(t){var e=t.target;if(e!==r.wt.wtTable.spreader)for(;e!==document.documentElement;){if(null===e)return;if(e===n.rootElement[0]||\"HANDSONTABLE-TABLE\"===e.nodeName)return;e=e.parentNode}r.settings.outsideClickDeselects?n.deselectCell():n.destroyEditor()}),n.rootElement.on(\"mousedown.handsontable\",\".dragdealer\",function(){n.destroyEditor()}),n.$table.on(\"selectstart\",function(t){r.settings.fragmentSelection||t.preventDefault()});var c=function(){e.getSelection?e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges():document.selection&&document.selection.empty()},h={debug:function(){return r.settings.debug},table:a,stretchH:this.settings.stretchH,data:n.getDataAtCell,totalRows:n.countRows,totalColumns:n.countCols,nativeScrollbars:this.settings.nativeScrollbars,offsetRow:0,offsetColumn:0,width:this.getWidth(),height:this.getHeight(),fixedColumnsLeft:function(){return r.settings.fixedColumnsLeft},fixedRowsTop:function(){return r.settings.fixedRowsTop},rowHeaders:function(){return n.hasRowHeaders()?[function(t,e){r.appendRowHeader(t,e)}]:[]},columnHeaders:function(){return n.hasColHeaders()?[function(t,e){r.appendColHeader(t,e)}]:[]},columnWidth:n.getColWidth,cellRenderer:function(t,e,n){var i=r.instance.colToProp(e),o=r.instance.getCellMeta(t,e),s=r.instance.getCellRenderer(o),a=r.instance.getDataAtRowProp(t,i);s(r.instance,n,t,e,i,a,o),r.instance.PluginHooks.run(\"afterRenderer\",n,t,e,i,a,o)},selections:{current:{className:\"current\",border:{width:2,color:\"#5292F7\",style:\"solid\",cornerVisible:function(){return r.settings.fillHandle&&!r.isCellEdited()&&!n.selection.isMultiple()}}},area:{className:\"area\",border:{width:1,color:\"#89AFF9\",style:\"solid\",cornerVisible:function(){return r.settings.fillHandle&&!r.isCellEdited()&&n.selection.isMultiple()}}},highlight:{highlightRowClassName:r.settings.currentRowClassName,highlightColumnClassName:r.settings.currentColClassName},fill:{className:\"fill\",border:{width:1,color:\"red\",style:\"solid\"}}},hideBorderOnMouseDownOver:function(){return r.settings.fragmentSelection},onCellMouseDown:function(t,e,i){n.listen(),l=!0;var r={row:e[0],col:e[1]};2===t.button&&n.selection.inInSelection(r)||(t.shiftKey?n.selection.setRangeEnd(r):n.selection.setRangeStart(r)),n.PluginHooks.run(\"afterOnCellMouseDown\",t,e,i)},onCellMouseOver:function(t,e,i){var r={row:e[0],col:e[1]};l?n.selection.setRangeEnd(r):n.autofill.handle&&n.autofill.handle.isDragged&&(n.autofill.handle.isDragged++,n.autofill.showBorder(e)),n.PluginHooks.run(\"afterOnCellMouseOver\",t,e,i)},onCellCornerMouseDown:function(t){n.autofill.handle.isDragged=1,t.preventDefault(),n.PluginHooks.run(\"afterOnCellCornerMouseDown\",t)},onCellCornerDblClick:function(){n.autofill.selectAdjacent()},beforeDraw:function(t){r.beforeRender(t)},onDraw:function(t){r.onDraw(t)},onScrollVertically:function(){n.runHooks(\"afterScrollVertically\")},onScrollHorizontally:function(){n.runHooks(\"afterScrollHorizontally\")}};n.PluginHooks.run(\"beforeInitWalkontable\",h),this.wt=new m(h),o.on(\"resize.\"+n.guid,function(){n.registerTimeout(\"resizeTimeout\",function(){n.parseSettingsFromDOM();var t=r.getWidth(),e=r.getHeight();(h.width!==t||h.height!==e)&&(n.forceFullRender=!0,r.render(),h.width=t,h.height=e)},60)}),t(r.wt.wtTable.spreader).on(\"mousedown.handsontable, contextmenu.handsontable\",function(t){t.target===r.wt.wtTable.spreader&&3===t.which&&t.stopPropagation()}),s.on(\"click.\"+n.guid,function(){r.settings.observeDOMVisibility&&r.wt.drawInterrupted&&(r.instance.forceFullRender=!0,r.render())})},i.TableView.prototype.isTextSelectionAllowed=function(t){return i.helper.isInput(t)?!0:this.settings.fragmentSelection&&this.wt.wtDom.isChildOf(t,this.TBODY)?!0:!1},i.TableView.prototype.isCellEdited=function(){var t=this.instance.getActiveEditor();return t&&t.isOpened()},i.TableView.prototype.getWidth=function(){var t=void 0!==this.settings.width?this.settings.width:this.settingsFromDOM.width;return\"function\"==typeof t?t():t},i.TableView.prototype.getHeight=function(){var t=void 0!==this.settings.height?this.settings.height:this.settingsFromDOM.height;return\"function\"==typeof t?t():t},i.TableView.prototype.beforeRender=function(t){t&&(this.instance.PluginHooks.run(\"beforeRender\",this.instance.forceFullRender),this.wt.update(\"width\",this.getWidth()),this.wt.update(\"height\",this.getHeight()))},i.TableView.prototype.onDraw=function(t){t&&this.instance.PluginHooks.run(\"afterRender\",this.instance.forceFullRender)},i.TableView.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.rootElement.triggerHandler(\"render.handsontable\")},i.TableView.prototype.getCellAtCoords=function(t){var e=this.wt.wtTable.getCell([t.row,t.col]);return 0>e?null:e},i.TableView.prototype.scrollViewport=function(t){this.wt.scrollViewport([t.row,t.col])},i.TableView.prototype.appendRowHeader=function(t,e){if(t>-1)this.wt.wtDom.fastInnerHTML(e,this.instance.getRowHeader(t));else{var n=document.createElement(\"DIV\");n.className=\"relative\",this.wt.wtDom.fastInnerText(n,\"\u00a0\"),this.wt.wtDom.empty(e),e.appendChild(n)}},i.TableView.prototype.appendColHeader=function(t,e){var n=document.createElement(\"DIV\"),i=document.createElement(\"SPAN\");n.className=\"relative\",i.className=\"colHeader\",this.wt.wtDom.fastInnerHTML(i,this.instance.getColHeader(t)),n.appendChild(i),this.wt.wtDom.empty(e),e.appendChild(n),this.instance.PluginHooks.run(\"afterGetColHeader\",t,e)},i.TableView.prototype.maximumVisibleElementWidth=function(t){var e=this.wt.wtViewport.getWorkspaceWidth();return this.settings.nativeScrollbars?e:e-t},i.TableView.prototype.maximumVisibleElementHeight=function(t){var e=this.wt.wtViewport.getWorkspaceHeight();return this.settings.nativeScrollbars?e:e-t},function(t){function e(t){var e,n;n={},e=t,this.getInstance=function(t){return t.guid in n||(n[t.guid]=new e(t)),n[t.guid]}}var n={},i=new WeakMap;t.editors={registerEditor:function(t,r){var o=new e(r);\"string\"==typeof t&&(n[t]=o),i.set(r,o)},getEditor:function(t,e){var r;if(\"function\"==typeof t)i.get(t)||this.registerEditor(null,t),r=i.get(t);else{if(\"string\"!=typeof t)throw Error('Only strings and functions can be passed as \"editor\" parameter ');r=n[t]}if(!r)throw Error('No editor registered under name \"'+t+'\"');return r.getInstance(e)}}}(i),function(e){e.EditorManager=function(n,i,r){var o,s=this,a=t(document),l=e.helper.keyCode,c=function(){function t(t){if(n.isListening()&&(i.settings.beforeOnKeyDown&&i.settings.beforeOnKeyDown.call(n,t),n.PluginHooks.run(\"beforeKeyDown\",t),!t.isImmediatePropagationStopped()&&(i.lastKeyCode=t.keyCode,r.isSelected()))){var a=(t.ctrlKey||t.metaKey)&&!t.altKey;if(!(o.isWaiting()||e.helper.isMetaKey(t.keyCode)||a||s.isEditorOpened()))return s.openEditor(\"\"),void t.stopPropagation();var c=t.shiftKey?r.setRangeEnd:r.setRangeStart;switch(t.keyCode){case l.A:if(a){r.selectAll(),t.preventDefault(),t.stopPropagation();break}case l.ARROW_UP:s.isEditorOpened()&&!o.isWaiting()&&s.closeEditorAndSaveChanges(a),u(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_DOWN:s.isEditorOpened()&&!o.isWaiting()&&s.closeEditorAndSaveChanges(a),p(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_RIGHT:s.isEditorOpened()&&!o.isWaiting()&&s.closeEditorAndSaveChanges(a),d(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_LEFT:s.isEditorOpened()&&!o.isWaiting()&&s.closeEditorAndSaveChanges(a),f(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.TAB:var _=\"function\"==typeof i.settings.tabMoves?i.settings.tabMoves(t):i.settings.tabMoves;t.shiftKey?r.transformStart(-_.row,-_.col):r.transformStart(_.row,_.col,!0),t.preventDefault(),t.stopPropagation();break;case l.BACKSPACE:case l.DELETE:r.empty(t),s.prepareEditor(),t.preventDefault();break;case l.F2:s.openEditor(),t.preventDefault();break;case l.ENTER:s.isEditorOpened()?(o.state!==e.EditorState.WAITING&&s.closeEditorAndSaveChanges(a),h(t.shiftKey)):n.getSettings().enterBeginsEditing?s.openEditor():h(t.shiftKey),t.preventDefault(),t.stopImmediatePropagation();break;case l.ESCAPE:s.isEditorOpened()&&s.closeEditorAndRestoreOriginalValue(a),t.preventDefault();break;case l.HOME:c(t.ctrlKey||t.metaKey?{row:0,col:i.selStart.col()}:{row:i.selStart.row(),col:0}),t.preventDefault(),t.stopPropagation();break;case l.END:c(t.ctrlKey||t.metaKey?{row:n.countRows()-1,col:i.selStart.col()}:{row:i.selStart.row(),col:n.countCols()-1}),t.preventDefault(),t.stopPropagation();break;case l.PAGE_UP:r.transformStart(-n.countVisibleRows(),0),n.view.wt.scrollVertical(-n.countVisibleRows()),n.view.render(),t.preventDefault(),t.stopPropagation();break;case l.PAGE_DOWN:r.transformStart(n.countVisibleRows(),0),n.view.wt.scrollVertical(n.countVisibleRows()),n.view.render(),t.preventDefault(),t.stopPropagation()}}}function c(){s.openEditor()}function h(t){var e=\"function\"==typeof i.settings.enterMoves?i.settings.enterMoves(event):i.settings.enterMoves;t?r.transformStart(-e.row,-e.col):r.transformStart(e.row,e.col,!0)}function u(t){t?r.transformEnd(-1,0):r.transformStart(-1,0)}function p(t){t?r.transformEnd(1,0):r.transformStart(1,0)}function d(t){t?r.transformEnd(0,1):r.transformStart(0,1)}function f(t){t?r.transformEnd(0,-1):r.transformStart(0,-1)}a.on(\"keydown.handsontable.\"+n.guid,t),n.view.wt.update(\"onCellDblClick\",c),n.addHook(\"afterDestroy\",function(){a.off(\"keydown.handsontable.\"+n.guid)})};this.destroyEditor=function(t){this.closeEditor(t)},this.getActiveEditor=function(){return o},this.prepareEditor=function(){if(o&&o.isWaiting())return void this.closeEditor(!1,!1,function(t){t&&s.prepareEditor()});var t=i.selStart.row(),r=i.selStart.col(),a=n.colToProp(r),l=n.getCell(t,r),c=n.getDataAtCell(t,r),h=n.getCellMeta(t,r),u=n.getCellEditor(h);o=e.editors.getEditor(u,n),o.prepare(t,r,a,l,c,h)},this.isEditorOpened=function(){return o.isOpened()},this.openEditor=function(t){o.cellProperties.readOnly||o.beginEditing(t)},this.closeEditor=function(t,e,n){o?o.finishEditing(t,e,n):n&&n(!1)},this.closeEditorAndSaveChanges=function(t){return this.closeEditor(!1,t)},this.closeEditorAndRestoreOriginalValue=function(t){return this.closeEditor(!0,t)},c()}}(i),function(t){var e={};t.renderers={registerRenderer:function(t,n){e[t]=n},getRenderer:function(t){if(\"function\"==typeof t)return t;if(\"string\"!=typeof t)throw Error('Only strings and functions can be passed as \"renderer\" parameter ');if(!(t in e))throw Error('No editor registered under name \"'+t+'\"');return e[t]}}}(i),i.Dom=new y,i.helper.isPrintableChar=function(t){return 32==t||t>=48&&57>=t||t>=96&&111>=t||t>=186&&192>=t||t>=219&&222>=t||t>=226||t>=65&&90>=t},i.helper.isMetaKey=function(t){var e=i.helper.keyCode,n=[e.ARROW_DOWN,e.ARROW_UP,e.ARROW_LEFT,e.ARROW_RIGHT,e.HOME,e.END,e.DELETE,e.BACKSPACE,e.F1,e.F2,e.F3,e.F4,e.F5,e.F6,e.F7,e.F8,e.F9,e.F10,e.F11,e.F12,e.TAB,e.PAGE_DOWN,e.PAGE_UP,e.ENTER,e.ESCAPE,e.SHIFT,e.CAPS_LOCK,e.ALT];return-1!=n.indexOf(t)},i.helper.isCtrlKey=function(t){var e=i.helper.keyCode;return-1!=[e.CONTROL_LEFT,224,e.COMMAND_LEFT,e.COMMAND_RIGHT].indexOf(t)},i.helper.stringify=function(t){switch(typeof t){case\"string\":case\"number\":return t+\"\";case\"object\":return null===t?\"\":t.toString();case\"undefined\":return\"\";default:return t.toString()}},i.helper.spreadsheetColumnLabel=function(t){for(var e,n=t+1,i=\"\";n>0;)e=(n-1)%26,i=String.fromCharCode(65+e)+i,n=parseInt((n-e)/26,10);return i},i.helper.isNumeric=function(t){var e=typeof t;return\"number\"==e?!isNaN(t)&&isFinite(t):\"string\"==e?t.length?1==t.length?/\\d/.test(t):/^\\s*[+-]?\\s*(?:(?:\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?)|(?:0x[a-f\\d]+))\\s*$/i.test(t):!1:\"object\"==e?!(!t||\"number\"!=typeof t.valueOf()||t instanceof Date):!1},i.helper.isArray=function(t){return null!==Object.prototype.toString.call(t).match(/array/i)},i.helper.isDescendant=function(t,e){for(var n=e.parentNode;null!=n;){if(n==t)return!0;n=n.parentNode}return!1},i.helper.randomString=function(){return w()},i.helper.inherit=function(t,e){return e.prototype.constructor=e,t.prototype=new e,t.prototype.constructor=t,t},i.helper.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},i.helper.getPrototypeOf=function(t){var e;if(\"object\"==typeof t.__proto__)e=t.__proto__;else{var n,i=t.constructor;\"function\"==typeof t.constructor&&(n=i,delete t.constructor&&(i=t.constructor,t.constructor=n)),e=i?i.prototype:null}return e},i.helper.columnFactory=function(t,e){function n(){}i.helper.inherit(n,t);for(var r=0,o=e.length;o>r;r++)n.prototype[e[r]]=void 0;return n},i.helper.translateRowsToColumns=function(t){var e,n,i,r,o=[],s=0;for(e=0,n=t.length;n>e;e++)for(i=0,r=t[e].length;r>i;i++)i==s&&(o.push([]),s++),o[i].push(t[e][i]);return o},i.helper.to2dArray=function(t){for(var e=0,n=t.length;n>e;)t[e]=[t[e]],e++},i.helper.extendArray=function(t,e){for(var n=0,i=e.length;i>n;)t.push(e[n]),n++},i.helper.isInput=function(t){var e=[\"INPUT\",\"SELECT\",\"TEXTAREA\"];return e.indexOf(t.nodeName)>-1},i.helper.isOutsideInput=function(t){return i.helper.isInput(t)&&-1==t.className.indexOf(\"handsontableInput\")},i.helper.keyCode={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL_LEFT:91,COMMAND_LEFT:17,COMMAND_RIGHT:93,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86},i.helper.isObject=function(t){return\"[object Object]\"==Object.prototype.toString.call(t)},i.helper.isArray=function(t){return Array.isArray?Array.isArray(t):\"[object Array]\"==Object.prototype.toString.call(t)},i.helper.pivot=function(t){var e=[];if(!t||0==t.length||!t[0]||0==t[0].length)return e;for(var n=t.length,i=t[0].length,r=0;n>r;r++)for(var o=0;i>o;o++)e[o]||(e[o]=[]),e[o][r]=t[r][o];return e},i.helper.proxy=function(t,e){return function(){return t.apply(e,arguments)}},i.helper.cellMethodLookupFactory=function(t,e){function n(t){var e=i.cellTypes[t];if(\"undefined\"==typeof e)throw new Error('You declared cell type \"'+t+'\" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');return e}return e=\"undefined\"==typeof e?!0:e,function(r,o){return function s(r){if(r){if(r.hasOwnProperty(t)&&r[t])return r[t];if(r.hasOwnProperty(\"type\")&&r.type){var o;if(\"string\"!=typeof r.type)throw new Error(\"Cell type must be a string \");if(o=n(r.type),o.hasOwnProperty(t))return o[t];if(e)return}return s(i.helper.getPrototypeOf(r))}}(\"number\"==typeof r?this.getCellMeta(r,o):r)}},i.helper.toString=function(t){return\"\"+t},i.SelectionPoint=function(){this._row=null,this._col=null},i.SelectionPoint.prototype.exists=function(){return null!==this._row},i.SelectionPoint.prototype.row=function(t){return void 0!==t&&(this._row=t),this._row},i.SelectionPoint.prototype.col=function(t){return void 0!==t&&(this._col=t),this._col},i.SelectionPoint.prototype.coords=function(t){return void 0!==t&&(this._row=t.row,this._col=t.col),{row:this._row,col:this._col}},i.SelectionPoint.prototype.arr=function(t){return void 0!==t&&(this._row=t[0],this._col=t[1]),[this._row,this._col]},function(e){e.DataMap=function(t,e,n){this.instance=t,this.priv=e,this.GridSettings=n,this.dataSource=this.instance.getSettings().data,this.duckSchema=this.dataSource[0]?this.recursiveDuckSchema(this.dataSource[0]):{},this.createMap(),this.getVars={},this.setVars={}},e.DataMap.prototype.DESTINATION_RENDERER=1,e.DataMap.prototype.DESTINATION_CLIPBOARD_GENERATOR=2,e.DataMap.prototype.recursiveDuckSchema=function(e){var n;if(t.isPlainObject(e)){n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t.isPlainObject(e[i])?this.recursiveDuckSchema(e[i]):null)}else n=[];return n},e.DataMap.prototype.recursiveDuckColumns=function(e,n,i){var r,o;if(\"undefined\"==typeof n&&(n=0,i=\"\"),t.isPlainObject(e))for(o in e)e.hasOwnProperty(o)&&(null===e[o]?(r=i+o,this.colToPropCache.push(r),this.propToColCache.set(r,n),n++):n=this.recursiveDuckColumns(e[o],n,o+\".\"));return n},e.DataMap.prototype.createMap=function(){if(\"undefined\"==typeof this.getSchema())throw new Error(\"trying to create `columns` definition but you didnt' provide `schema` nor `data`\");var t,e,n=this.getSchema();this.colToPropCache=[],this.propToColCache=new MultiMap;var i=this.instance.getSettings().columns;if(i)for(t=0,e=i.length;e>t;t++)\"undefined\"!=typeof i[t].data&&(this.colToPropCache[t]=i[t].data,this.propToColCache.set(i[t].data,t));else this.recursiveDuckColumns(n)},e.DataMap.prototype.colToProp=function(t){return t=e.PluginHooks.execute(this.instance,\"modifyCol\",t),this.colToPropCache&&\"undefined\"!=typeof this.colToPropCache[t]?this.colToPropCache[t]:t},e.DataMap.prototype.propToCol=function(t){var n;return n=\"undefined\"!=typeof this.propToColCache.get(t)?this.propToColCache.get(t):t,n=e.PluginHooks.execute(this.instance,\"modifyCol\",n)},e.DataMap.prototype.getSchema=function(){var t=this.instance.getSettings().dataSchema;return t?\"function\"==typeof t?t():t:this.duckSchema},e.DataMap.prototype.createRow=function(e,n,i){var r,o,s=this.instance.countCols(),a=0;n||(n=1),(\"number\"!=typeof e||e>=this.instance.countRows())&&(e=this.instance.countRows()),o=e;for(var l=this.instance.getSettings().maxRows;n>a&&this.instance.countRows()<l;){if(\"array\"===this.instance.dataType){r=[];for(var c=0;s>c;c++)r.push(null)}else r=\"function\"===this.instance.dataType?this.instance.getSettings().dataSchema(e):t.extend(!0,{},this.getSchema());e===this.instance.countRows()?this.dataSource.push(r):this.dataSource.splice(e,0,r),a++,o++}return this.instance.PluginHooks.run(\"afterCreateRow\",e,a,i),this.instance.forceFullRender=!0,a},e.DataMap.prototype.createCol=function(t,n,i){if(\"object\"===this.instance.dataType||this.instance.getSettings().columns)throw new Error(\"Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.\");var r,o,s=this.instance.countRows(),a=this.dataSource,l=0;n||(n=1),o=t;for(var c=this.instance.getSettings().maxCols;n>l&&this.instance.countCols()<c;){if(r=e.helper.columnFactory(this.GridSettings,this.priv.columnsSettingConflicts),\"number\"!=typeof t||t>=this.instance.countCols()){for(var h=0;s>h;h++)\"undefined\"==typeof a[h]&&(a[h]=[]),a[h].push(null);this.priv.columnSettings.push(r)}else{for(var h=0;s>h;h++)a[h].splice(o,0,null);this.priv.columnSettings.splice(o,0,r)}l++,o++}return this.instance.PluginHooks.run(\"afterCreateCol\",t,l,i),this.instance.forceFullRender=!0,l},e.DataMap.prototype.removeRow=function(t,e){e||(e=1),\"number\"!=typeof t&&(t=-e),t=(this.instance.countRows()+t)%this.instance.countRows();var n=this.physicalRowsToLogical(t,e),i=this.instance.PluginHooks.execute(\"beforeRemoveRow\",t,e);if(i!==!1){var r=this.dataSource,o=r.filter(function(t,e){return-1==n.indexOf(e)});r.length=0,Array.prototype.push.apply(r,o),this.instance.PluginHooks.run(\"afterRemoveRow\",t,e),this.instance.forceFullRender=!0}},e.DataMap.prototype.removeCol=function(t,e){if(\"object\"===this.instance.dataType||this.instance.getSettings().columns)throw new Error(\"cannot remove column with object data source or columns option specified\");e||(e=1),\"number\"!=typeof t&&(t=-e),t=(this.instance.countCols()+t)%this.instance.countCols();var n=this.instance.PluginHooks.execute(\"beforeRemoveCol\",t,e);if(n!==!1){for(var i=this.dataSource,r=0,o=this.instance.countRows();o>r;r++)i[r].splice(t,e);this.priv.columnSettings.splice(t,e),this.instance.PluginHooks.run(\"afterRemoveCol\",t,e),this.instance.forceFullRender=!0}},e.DataMap.prototype.spliceCol=function(t,n,i){var r=4<=arguments.length?[].slice.call(arguments,3):[],o=this.instance.getDataAtCol(t),s=o.slice(n,n+i),a=o.slice(n+i);e.helper.extendArray(r,a);for(var l=0;i>l;)r.push(null),l++;return e.helper.to2dArray(r),this.instance.populateFromArray(n,t,r,null,null,\"spliceCol\"),s},e.DataMap.prototype.spliceRow=function(t,n,i){var r=4<=arguments.length?[].slice.call(arguments,3):[],o=this.instance.getDataAtRow(t),s=o.slice(n,n+i),a=o.slice(n+i);e.helper.extendArray(r,a);for(var l=0;i>l;)r.push(null),l++;return this.instance.populateFromArray(t,n,[r],null,null,\"spliceRow\"),s},e.DataMap.prototype.get=function(t,e){if(this.getVars.row=t,this.getVars.prop=e,this.instance.PluginHooks.run(\"beforeGet\",this.getVars),\"string\"==typeof this.getVars.prop&&this.getVars.prop.indexOf(\".\")>-1){var n=this.getVars.prop.split(\".\"),i=this.dataSource[this.getVars.row];if(!i)return null;for(var r=0,o=n.length;o>r;r++)if(i=i[n[r]],\"undefined\"==typeof i)return null;return i}return\"function\"==typeof this.getVars.prop?this.getVars.prop(this.dataSource.slice(this.getVars.row,this.getVars.row+1)[0]):this.dataSource[this.getVars.row]?this.dataSource[this.getVars.row][this.getVars.prop]:null};var n=e.helper.cellMethodLookupFactory(\"copyable\",!1);e.DataMap.prototype.getCopyable=function(t,e){return n.call(this.instance,t,this.propToCol(e))?this.get(t,e):\"\"},e.DataMap.prototype.set=function(t,e,n,i){if(this.setVars.row=t,this.setVars.prop=e,this.setVars.value=n,this.instance.PluginHooks.run(\"beforeSet\",this.setVars,i||\"datamapGet\"),\"string\"==typeof this.setVars.prop&&this.setVars.prop.indexOf(\".\")>-1){for(var r=this.setVars.prop.split(\".\"),o=this.dataSource[this.setVars.row],s=0,a=r.length-1;a>s;s++)o=o[r[s]];o[r[s]]=this.setVars.value}else\"function\"==typeof this.setVars.prop?this.setVars.prop(this.dataSource.slice(this.setVars.row,this.setVars.row+1)[0],this.setVars.value):this.dataSource[this.setVars.row][this.setVars.prop]=this.setVars.value},e.DataMap.prototype.physicalRowsToLogical=function(t,e){for(var n=this.instance.countRows(),i=(n+t)%n,r=[],o=e;n>i&&o;)this.get(i,0),r.push(this.getVars.row),o--,i++;return r},e.DataMap.prototype.clear=function(){for(var t=0;t<this.instance.countRows();t++)for(var e=0;e<this.instance.countCols();e++)this.set(t,this.colToProp(e),\"\")},e.DataMap.prototype.getAll=function(){return this.dataSource},e.DataMap.prototype.getRange=function(t,e,n){var i,r,o,s,a,l=[],c=n===this.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get;for(r=Math.max(t.row,e.row),s=Math.max(t.col,e.col),i=Math.min(t.row,e.row);r>=i;i++){for(a=[],o=Math.min(t.col,e.col);s>=o;o++)a.push(c.call(this,i,this.colToProp(o)));l.push(a)}return l},e.DataMap.prototype.getText=function(t,e){return SheetClip.stringify(this.getRange(t,e,this.DESTINATION_RENDERER))\n",
        "                },e.DataMap.prototype.getCopyableText=function(t,e){return SheetClip.stringify(this.getRange(t,e,this.DESTINATION_CLIPBOARD_GENERATOR))}}(i),function(t){t.renderers.cellDecorator=function(t,e,n,i,r,o,s){s.readOnly&&t.view.wt.wtDom.addClass(e,s.readOnlyCellClassName),s.valid===!1&&s.invalidCellClassName&&t.view.wt.wtDom.addClass(e,s.invalidCellClassName),!o&&s.placeholder&&t.view.wt.wtDom.addClass(e,s.placeholderCellClassName)}}(i),function(t){var e=function(e,n,i,r,o,s,a){t.renderers.cellDecorator.apply(this,arguments),!s&&a.placeholder&&(s=a.placeholder);var l=t.helper.stringify(s);if(a.rendererTemplate){e.view.wt.wtDom.empty(n);var c=document.createElement(\"TEMPLATE\");c.setAttribute(\"bind\",\"{{}}\"),c.innerHTML=a.rendererTemplate,HTMLTemplateElement.decorate(c),c.model=e.getDataAtRow(i),n.appendChild(c)}else e.view.wt.wtDom.fastInnerText(n,l)};t.renderers.TextRenderer=e,t.renderers.registerRenderer(\"text\",e)}(i),function(t){var e=document.createElement(\"DIV\");e.className=\"htAutocompleteWrapper\";var n=document.createElement(\"DIV\");n.className=\"htAutocompleteArrow\",n.appendChild(document.createTextNode(\"\u25bc\"));var i=function(i,r,o,s,a,l,c){var h=(e.cloneNode(!0),n.cloneNode(!0));t.renderers.TextRenderer(i,r,o,s,a,l,c),r.appendChild(h),t.Dom.addClass(r,\"htAutocomplete\"),r.firstChild||r.appendChild(document.createTextNode(\"\u00a0\")),i.acArrowListener||(i.acArrowListener=function(){i.view.wt.getSetting(\"onCellDblClick\")},i.rootElement.on(\"mousedown.htAutocompleteArrow\",\".htAutocompleteArrow\",i.acArrowListener),i.addHookOnce(\"afterDestroy\",function(){this.rootElement.off(\"mousedown.htAutocompleteArrow\")}))};t.AutocompleteRenderer=i,t.renderers.AutocompleteRenderer=i,t.renderers.registerRenderer(\"autocomplete\",i)}(i),function(e){var n=document.createElement(\"INPUT\");n.className=\"htCheckboxRendererInput\",n.type=\"checkbox\",n.setAttribute(\"autocomplete\",\"off\");var i=function(i,r,o,s,a,l,c){\"undefined\"==typeof c.checkedTemplate&&(c.checkedTemplate=!0),\"undefined\"==typeof c.uncheckedTemplate&&(c.uncheckedTemplate=!1),i.view.wt.wtDom.empty(r);var h=n.cloneNode(!1);l===c.checkedTemplate||l===e.helper.stringify(c.checkedTemplate)?(h.checked=!0,r.appendChild(h)):l===c.uncheckedTemplate||l===e.helper.stringify(c.uncheckedTemplate)?r.appendChild(h):null===l?(h.className+=\" noValue\",r.appendChild(h)):i.view.wt.wtDom.fastInnerText(r,\"#bad value#\");var u=t(h);c.readOnly?u.on(\"click\",function(t){t.preventDefault()}):(u.on(\"mousedown\",function(t){t.stopPropagation()}),u.on(\"mouseup\",function(t){t.stopPropagation()}),u.on(\"change\",function(){this.checked?i.setDataAtRowProp(o,a,c.checkedTemplate):i.setDataAtRowProp(o,a,c.uncheckedTemplate)})),i.CheckboxRenderer&&i.CheckboxRenderer.beforeKeyDownHookBound||(i.CheckboxRenderer={beforeKeyDownHookBound:!0},i.addHook(\"beforeKeyDown\",function(n){if(n.keyCode==e.helper.keyCode.SPACE)for(var r,o,s,a=i.getSelected(),l={row:Math.min(a[0],a[2]),col:Math.min(a[1],a[3])},c={row:Math.max(a[0],a[2]),col:Math.max(a[1],a[3])},h=l.row;h<=c.row;h++)for(var u=c.col;u<=c.col;u++)if(r=i.getCell(h,u),s=i.getCellMeta(h,u),o=r.querySelectorAll(\"input[type=checkbox]\"),o.length>0&&!s.readOnly){n.isImmediatePropagationStopped()||(n.stopImmediatePropagation(),n.preventDefault());for(var p=0,d=o.length;d>p;p++)o[p].checked=!o[p].checked,t(o[p]).trigger(\"change\")}}))};e.CheckboxRenderer=i,e.renderers.CheckboxRenderer=i,e.renderers.registerRenderer(\"checkbox\",i)}(i),function(t){var e=function(e,n,i,r,o,s,a){t.helper.isNumeric(s)&&(\"undefined\"!=typeof a.language&&numeral.language(a.language),s=numeral(s).format(a.format||\"0\"),e.view.wt.wtDom.addClass(n,\"htNumeric\")),t.renderers.TextRenderer(e,n,i,r,o,s,a)};t.NumericRenderer=e,t.renderers.NumericRenderer=e,t.renderers.registerRenderer(\"numeric\",e)}(i),function(t){var e=function(t,e,n,r,o,s,a){i.renderers.TextRenderer.apply(this,arguments),s=e.innerHTML;var l,c=a.hashLength||s.length,h=a.hashSymbol||\"*\";for(l=\"\";l.split(h).length-1<c;l+=h);t.view.wt.wtDom.fastInnerHTML(e,l)};t.PasswordRenderer=e,t.renderers.PasswordRenderer=e,t.renderers.registerRenderer(\"password\",e)}(i),function(t){function e(e,n,i,r,o,s){t.renderers.cellDecorator.apply(this,arguments),t.Dom.fastInnerHTML(n,s)}t.renderers.registerRenderer(\"html\",e),t.renderers.HtmlRenderer=e}(i),function(t){function e(e){this.instance=e,this.state=t.EditorState.VIRGIN,this._opened=!1,this._closeCallback=null,this.init()}t.EditorState={VIRGIN:\"STATE_VIRGIN\",EDITING:\"STATE_EDITING\",WAITING:\"STATE_WAITING\",FINISHED:\"STATE_FINISHED\"},e.prototype._fireCallbacks=function(t){this._closeCallback&&(this._closeCallback(t),this._closeCallback=null)},e.prototype.init=function(){},e.prototype.getValue=function(){throw Error(\"Editor getValue() method unimplemented\")},e.prototype.setValue=function(){throw Error(\"Editor setValue() method unimplemented\")},e.prototype.open=function(){throw Error(\"Editor open() method unimplemented\")},e.prototype.close=function(){throw Error(\"Editor close() method unimplemented\")},e.prototype.prepare=function(e,n,i,r,o,s){this.TD=r,this.row=e,this.col=n,this.prop=i,this.originalValue=o,this.cellProperties=s,this.state=t.EditorState.VIRGIN},e.prototype.extend=function(){function t(){n.apply(this,arguments)}function e(t,e){function n(){}return n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t,t}var n=this.constructor;return e(t,n)},e.prototype.saveValue=function(t,e){if(e){var n=this.instance.getSelected();this.instance.populateFromArray(n[0],n[1],t,n[2],n[3],\"edit\")}else this.instance.populateFromArray(this.row,this.col,t,null,null,\"edit\")},e.prototype.beginEditing=function(e){this.state==t.EditorState.VIRGIN&&(this.instance.view.scrollViewport({row:this.row,col:this.col}),this.instance.view.render(),this.state=t.EditorState.EDITING,e=\"string\"==typeof e?e:this.originalValue,this.setValue(t.helper.stringify(e)),this.open(),this._opened=!0,this.focus(),this.instance.view.render())},e.prototype.finishEditing=function(e,n,i){if(i){var r=this._closeCallback;this._closeCallback=function(t){r&&r(t),i(t)}}if(!this.isWaiting()){if(this.state==t.EditorState.VIRGIN){var o=this;return void setTimeout(function(){o._fireCallbacks(!0)})}if(this.state==t.EditorState.EDITING){if(e)return void this.cancelChanges();var s=[[String.prototype.trim.call(this.getValue())]];if(this.state=t.EditorState.WAITING,this.saveValue(s,n),this.instance.getCellValidator(this.cellProperties)){var o=this;this.instance.addHookOnce(\"afterValidate\",function(e){o.state=t.EditorState.FINISHED,o.discardEditor(e)})}else this.state=t.EditorState.FINISHED,this.discardEditor(!0)}}},e.prototype.cancelChanges=function(){this.state=t.EditorState.FINISHED,this.discardEditor()},e.prototype.discardEditor=function(e){this.state===t.EditorState.FINISHED&&(e===!1&&this.cellProperties.allowInvalid!==!0?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=t.EditorState.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this.state=t.EditorState.VIRGIN,this._fireCallbacks(!0)))},e.prototype.isOpened=function(){return this._opened},e.prototype.isWaiting=function(){return this.state===t.EditorState.WAITING},t.editors.BaseEditor=e}(i),function(e){var n=e.editors.BaseEditor.prototype.extend();n.prototype.init=function(){this.createElements(),this.bindEvents()},n.prototype.getValue=function(){return this.TEXTAREA.value},n.prototype.setValue=function(t){this.TEXTAREA.value=t};var i=function(t){var n=this,i=n.getActiveEditor(),r=e.helper.keyCode,o=(t.ctrlKey||t.metaKey)&&!t.altKey;if(t.target===i.TEXTAREA&&!t.isImmediatePropagationStopped()){if(17===t.keyCode||224===t.keyCode||91===t.keyCode||93===t.keyCode)return void t.stopImmediatePropagation();switch(t.keyCode){case r.ARROW_RIGHT:i.wtDom.getCaretPosition(i.TEXTAREA)!==i.TEXTAREA.value.length&&t.stopImmediatePropagation();break;case r.ARROW_LEFT:0!==i.wtDom.getCaretPosition(i.TEXTAREA)&&t.stopImmediatePropagation();break;case r.ENTER:var s=i.instance.getSelected(),a=!(s[0]===s[2]&&s[1]===s[3]);(o&&!a||t.altKey)&&(i.isOpened()?(i.setValue(i.getValue()+\"\\n\"),i.focus()):i.beginEditing(i.originalValue+\"\\n\"),t.stopImmediatePropagation()),t.preventDefault();break;case r.A:case r.X:case r.C:case r.V:if(o){t.stopImmediatePropagation();break}case r.BACKSPACE:case r.DELETE:case r.HOME:case r.END:t.stopImmediatePropagation()}}};n.prototype.open=function(){this.refreshDimensions(),this.instance.addHook(\"beforeKeyDown\",i)},n.prototype.close=function(){this.textareaParentStyle.display=\"none\",document.activeElement===this.TEXTAREA&&this.instance.listen(),this.instance.removeHook(\"beforeKeyDown\",i)},n.prototype.focus=function(){this.TEXTAREA.focus(),this.wtDom.setCaretPosition(this.TEXTAREA,this.TEXTAREA.value.length)},n.prototype.createElements=function(){this.$body=t(document.body),this.wtDom=new y,this.TEXTAREA=document.createElement(\"TEXTAREA\"),this.$textarea=t(this.TEXTAREA),this.wtDom.addClass(this.TEXTAREA,\"handsontableInput\"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement(\"DIV\"),this.wtDom.addClass(this.TEXTAREA_PARENT,\"handsontableInputHolder\"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.top=0,this.textareaParentStyle.left=0,this.textareaParentStyle.display=\"none\",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.instance.rootElement[0].appendChild(this.TEXTAREA_PARENT);var n=this;e.PluginHooks.add(\"afterRender\",function(){n.instance.registerTimeout(\"refresh_editor_dimensions\",function(){n.refreshDimensions()},0)})},n.prototype.refreshDimensions=function(){if(this.state===e.EditorState.EDITING&&(this.TD=this.instance.getCell(this.row,this.col),this.TD)){var n=t(this.TD),i=this.wtDom.offset(this.TD),r=this.wtDom.offset(this.instance.rootElement[0]),o=this.instance.rootElement.scrollTop(),s=this.instance.rootElement.scrollLeft(),a=i.top-r.top+o-1,l=i.left-r.left+s-1,c=this.instance.getSettings(),h=c.rowHeaders===!1?0:1,u=c.colHeaders===!1?0:1;0>a&&(a=0),0>l&&(l=0),h>0&&parseInt(n.css(\"border-top-width\"),10)>0&&(a+=1),u>0&&parseInt(n.css(\"border-left-width\"),10)>0&&(l+=1),this.textareaParentStyle.top=a+\"px\",this.textareaParentStyle.left=l+\"px\";var p=n.width(),d=this.instance.view.maximumVisibleElementWidth(l)-10,f=n.outerHeight()-4,_=this.instance.view.maximumVisibleElementHeight(a)-5;parseInt(n.css(\"border-top-width\"),10)>0&&(f-=1),parseInt(n.css(\"border-left-width\"),10)>0&&h>0&&(p-=1),this.$textarea.autoResize({minHeight:Math.min(f,_),maxHeight:_,minWidth:Math.min(p,d),maxWidth:d,animate:!1,extraSpace:0}),this.textareaParentStyle.display=\"block\"}},n.prototype.bindEvents=function(){this.$textarea.on(\"cut.editor\",function(t){t.stopPropagation()}),this.$textarea.on(\"paste.editor\",function(t){t.stopPropagation()})},e.editors.TextEditor=n,e.editors.registerEditor(\"text\",e.editors.TextEditor)}(i),function(e){var n=e.editors.BaseEditor.prototype.extend();n.prototype.beginEditing=function(){var e=this.TD.querySelector('input[type=\"checkbox\"]');e&&t(e).trigger(\"click\")},n.prototype.finishEditing=function(){},n.prototype.init=function(){},n.prototype.open=function(){},n.prototype.close=function(){},n.prototype.getValue=function(){},n.prototype.setValue=function(){},n.prototype.focus=function(){},e.editors.CheckboxEditor=n,e.editors.registerEditor(\"checkbox\",n)}(i),function(e){var n=e.editors.TextEditor.prototype.extend();n.prototype.init=function(){if(!t.datepicker)throw new Error(\"jQuery UI Datepicker dependency not found. Did you forget to include jquery-ui.custom.js or its substitute?\");e.editors.TextEditor.prototype.init.apply(this,arguments),this.isCellEdited=!1;var n=this;this.instance.addHook(\"afterDestroy\",function(){n.destroyElements()})},n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments),this.datePicker=document.createElement(\"DIV\"),this.instance.view.wt.wtDom.addClass(this.datePicker,\"htDatepickerHolder\"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position=\"absolute\",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=99,document.body.appendChild(this.datePicker),this.$datePicker=t(this.datePicker);var n=this,i={dateFormat:\"yy-mm-dd\",showButtonPanel:!0,changeMonth:!0,changeYear:!0,onSelect:function(t){n.setValue(t),n.finishEditing(!1)}};this.$datePicker.datepicker(i),this.$datePicker.on(\"mousedown\",function(t){t.stopPropagation()}),this.hideDatepicker()},n.prototype.destroyElements=function(){this.$datePicker.datepicker(\"destroy\"),this.$datePicker.remove()},n.prototype.open=function(){e.editors.TextEditor.prototype.open.call(this),this.showDatepicker()},n.prototype.finishEditing=function(){this.hideDatepicker(),e.editors.TextEditor.prototype.finishEditing.apply(this,arguments)},n.prototype.showDatepicker=function(){var e=t(this.TD),n=e.offset();this.datePickerStyle.top=n.top+e.height()+\"px\",this.datePickerStyle.left=n.left+\"px\";var i={defaultDate:this.originalValue||void 0};t.extend(i,this.cellProperties),this.$datePicker.datepicker(\"option\",i),this.originalValue&&this.$datePicker.datepicker(\"setDate\",this.originalValue),this.datePickerStyle.display=\"block\"},n.prototype.hideDatepicker=function(){this.datePickerStyle.display=\"none\"},e.editors.DateEditor=n,e.editors.registerEditor(\"date\",n)}(i),function(e){var n=e.editors.TextEditor.prototype.extend();n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments);var n=document.createElement(\"DIV\");n.className=\"handsontableEditor\",this.TEXTAREA_PARENT.appendChild(n),this.$htContainer=t(n),this.$htContainer.handsontable()},n.prototype.prepare=function(n,i,r,o,s,a){e.editors.TextEditor.prototype.prepare.apply(this,arguments);var l=this,c={startRows:0,startCols:0,minRows:0,minCols:0,className:\"listbox\",copyPaste:!1,cells:function(){return{readOnly:!0}},fillHandle:!1,afterOnCellMouseDown:function(){var t=this.getValue();void 0!==t&&l.setValue(t),l.instance.destroyEditor()},beforeOnKeyDown:function(t){var n=this;switch(t.keyCode){case e.helper.keyCode.ESCAPE:l.instance.destroyEditor(!0),t.stopImmediatePropagation(),t.preventDefault();break;case e.helper.keyCode.ENTER:var i=n.getSelected(),r=this.getDataAtCell(i[0],i[1]);void 0!==r&&l.setValue(r),l.instance.destroyEditor();break;case e.helper.keyCode.ARROW_UP:n.getSelected()&&0==n.getSelected()[0]&&!l.cellProperties.strict&&(n.deselectCell(),l.instance.listen(),l.focus(),t.preventDefault(),t.stopImmediatePropagation())}}};this.cellProperties.handsontable&&(c=t.extend(c,a.handsontable)),this.$htContainer.handsontable(\"destroy\"),this.$htContainer.handsontable(c)};var i=function(t){if(!t.isImmediatePropagationStopped()){var n=this.getActiveEditor(),i=n.$htContainer.handsontable(\"getInstance\");if(t.keyCode==e.helper.keyCode.ARROW_DOWN){if(i.getSelected()){var r=i.getSelected()[0],o=r<i.countRows()-1?r+1:r;i.selectCell(o,0)}else i.selectCell(0,0);t.preventDefault(),t.stopImmediatePropagation()}}};n.prototype.open=function(){this.instance.addHook(\"beforeKeyDown\",i),e.editors.TextEditor.prototype.open.apply(this,arguments),this.$htContainer.handsontable(\"render\"),this.cellProperties.strict?(this.$htContainer.handsontable(\"selectCell\",0,0),this.$textarea[0].style.visibility=\"hidden\"):(this.$htContainer.handsontable(\"deselectCell\"),this.$textarea[0].style.visibility=\"visible\"),this.wtDom.setCaretPosition(this.$textarea[0],0,this.$textarea[0].value.length)},n.prototype.close=function(){this.instance.removeHook(\"beforeKeyDown\",i),this.instance.listen(),e.editors.TextEditor.prototype.close.apply(this,arguments)},n.prototype.focus=function(){this.instance.listen(),e.editors.TextEditor.prototype.focus.apply(this,arguments)},n.prototype.beginEditing=function(){var t=this.instance.getSettings().onBeginEditing;t&&t()===!1||e.editors.TextEditor.prototype.beginEditing.apply(this,arguments)},n.prototype.finishEditing=function(){if(this.$htContainer.handsontable(\"isListening\")&&this.instance.listen(),this.$htContainer.handsontable(\"getSelected\")){var t=this.$htContainer.handsontable(\"getInstance\").getValue();void 0!==t&&this.setValue(t)}return e.editors.TextEditor.prototype.finishEditing.apply(this,arguments)},e.editors.HandsontableEditor=n,e.editors.registerEditor(\"handsontable\",n)}(i),function(t){var e=t.editors.HandsontableEditor.prototype.extend();e.prototype.init=function(){t.editors.HandsontableEditor.prototype.init.apply(this,arguments),this.query=null,this.choices=[]},e.prototype.createElements=function(){t.editors.HandsontableEditor.prototype.createElements.apply(this,arguments),this.$htContainer.addClass(\"autocompleteEditor\")},e.prototype.bindEvents=function(){var e=this;this.$textarea.on(\"keydown.autocompleteEditor\",function(n){t.helper.isMetaKey(n.keyCode)&&-1==[t.helper.keyCode.BACKSPACE,t.helper.keyCode.DELETE].indexOf(n.keyCode)?n.keyCode==t.helper.keyCode.ENTER&&e.cellProperties.strict!==!0&&e.$htContainer.handsontable(\"deselectCell\"):setTimeout(function(){e.queryChoices(e.$textarea.val())})}),this.$htContainer.on(\"mouseleave\",function(){e.cellProperties.strict===!0&&e.highlightBestMatchingChoice()}),this.$htContainer.on(\"mouseenter\",function(){e.$htContainer.handsontable(\"deselectCell\")}),t.editors.HandsontableEditor.prototype.bindEvents.apply(this,arguments)};var n;e.prototype.open=function(){t.editors.HandsontableEditor.prototype.open.apply(this,arguments),this.$textarea[0].style.visibility=\"visible\",this.focus();var e=this.$htContainer.handsontable(\"getInstance\"),i=this;e.updateSettings({colWidths:[this.wtDom.outerWidth(this.TEXTAREA)-2],afterRenderer:function(t,e,n,r,o){var s=this.getCellMeta(e,n).filteringCaseSensitive===!0,a=s?o.indexOf(this.query):o.toLowerCase().indexOf(i.query.toLowerCase());if(-1!=a){var l=o.substr(a,i.query.length);t.innerHTML=o.replace(l,\"<strong>\"+l+\"</strong>\")}}}),n=function(e){var n=this;e.keyCode==t.helper.keyCode.ARROW_UP&&n.getSelected()&&0==n.getSelected()[0]&&(parent.cellProperties.strict||n.deselectCell(),parent.instance.listen(),parent.focus(),e.preventDefault(),e.stopImmediatePropagation())},e.addHook(\"beforeKeyDown\",n),this.queryChoices(this.TEXTAREA.value)},e.prototype.close=function(){this.$htContainer.handsontable(\"getInstance\").removeHook(\"beforeKeyDown\",n),t.editors.HandsontableEditor.prototype.close.apply(this,arguments)},e.prototype.queryChoices=function(e){if(this.query=e,\"function\"==typeof this.cellProperties.source){var n=this;this.cellProperties.source(e,function(t){n.updateChoicesList(t)})}else if(t.helper.isArray(this.cellProperties.source)){var i;if(e&&this.cellProperties.filter!==!1){var r=this.cellProperties.filteringCaseSensitive===!0,o=e.toLowerCase();i=this.cellProperties.source.filter(function(t){return r?-1!=t.indexOf(e):-1!=t.toLowerCase().indexOf(o)})}else i=this.cellProperties.source;this.updateChoicesList(i)}else this.updateChoicesList([])},e.prototype.updateChoicesList=function(e){this.choices=e,this.$htContainer.handsontable(\"loadData\",t.helper.pivot([e])),this.cellProperties.strict===!0&&this.highlightBestMatchingChoice(),this.focus()},e.prototype.highlightBestMatchingChoice=function(){var t=this.findBestMatchingChoice();\"undefined\"==typeof t&&this.cellProperties.allowInvalid===!1&&(t=0),\"undefined\"==typeof t?this.$htContainer.handsontable(\"deselectCell\"):this.$htContainer.handsontable(\"selectCell\",t,0)},e.prototype.findBestMatchingChoice=function(){for(var t,e,n,i={},r=this.getValue().length,o=0,s=this.choices.length;s>o;o++)t=this.choices[o],e=r>0?t.indexOf(this.getValue()):t===this.getValue()?0:-1,-1!=e&&(n=t.length-e-r,(\"undefined\"==typeof i.indexOfValue||i.indexOfValue>e||i.indexOfValue==e&&i.charsLeft>n)&&(i.indexOfValue=e,i.charsLeft=n,i.index=o));return i.index},t.editors.AutocompleteEditor=e,t.editors.registerEditor(\"autocomplete\",e)}(i),function(e){var n=e.editors.TextEditor.prototype.extend(),i=new y;n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments),this.TEXTAREA=document.createElement(\"input\"),this.TEXTAREA.setAttribute(\"type\",\"password\"),this.TEXTAREA.className=\"handsontableInput\",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.$textarea=t(this.TEXTAREA),i.empty(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)},e.editors.PasswordEditor=n,e.editors.registerEditor(\"password\",n)}(i),function(t){var e=t.editors.BaseEditor.prototype.extend();e.prototype.init=function(){this.select=document.createElement(\"SELECT\"),t.Dom.addClass(this.select,\"htSelectEditor\"),this.select.style.display=\"none\",this.instance.rootElement[0].appendChild(this.select)},e.prototype.prepare=function(){t.editors.BaseEditor.prototype.prepare.apply(this,arguments);var e,n=this.cellProperties.selectOptions;e=this.prepareOptions(\"function\"==typeof n?n(this.row,this.col,this.prop):n),t.Dom.empty(this.select);for(var i in e)if(e.hasOwnProperty(i)){var r=document.createElement(\"OPTION\");r.value=i,t.Dom.fastInnerHTML(r,e[i]),this.select.appendChild(r)}},e.prototype.prepareOptions=function(e){var n={};if(t.helper.isArray(e))for(var i=0,r=e.length;r>i;i++)n[e[i]]=e[i];else\"object\"==typeof e&&(n=e);return n},e.prototype.getValue=function(){return this.select.value},e.prototype.setValue=function(t){this.select.value=t};var n=function(e){var n=this,i=n.getActiveEditor();switch(e.keyCode){case t.helper.keyCode.ARROW_UP:var r=i.select.find(\"option:selected\").prev();1==r.length&&r.prop(\"selected\",!0),e.stopImmediatePropagation(),e.preventDefault();break;case t.helper.keyCode.ARROW_DOWN:var o=i.select.find(\"option:selected\").next();1==o.length&&o.prop(\"selected\",!0),e.stopImmediatePropagation(),e.preventDefault()}};e.prototype.open=function(){var e=t.Dom.outerWidth(this.TD),i=t.Dom.outerHeight(this.TD),r=t.Dom.offset(this.instance.rootElement[0]),o=t.Dom.offset(this.TD);this.select.style.height=i+\"px\",this.select.style.minWidth=e+\"px\",this.select.style.top=o.top-r.top+\"px\",this.select.style.left=o.left-r.left-2+\"px\",this.select.style.display=\"\",this.instance.addHook(\"beforeKeyDown\",n)},e.prototype.close=function(){this.select.style.display=\"none\",this.instance.removeHook(\"beforeKeyDown\",n)},e.prototype.focus=function(){this.select.focus()},t.editors.SelectEditor=e,t.editors.registerEditor(\"select\",e)}(i),function(t){var e=t.editors.AutocompleteEditor.prototype.extend();e.prototype.prepare=function(){t.editors.AutocompleteEditor.prototype.prepare.apply(this,arguments),this.cellProperties.filter=!1,this.cellProperties.strict=!0},t.editors.DropdownEditor=e,t.editors.registerEditor(\"dropdown\",e)}(i),i.NumericValidator=function(t,e){null===t&&(t=\"\"),e(/^-?\\d*\\.?\\d*$/.test(t))};var H=function(t,e){var n=t,i=\"string\"==typeof n?n.toLowerCase():null;return function(t){for(var r=!1,o=0,s=t.length;s>o;o++){if(n===t[o]){r=!0;break}if(i===t[o].toLowerCase()){r=!0;break}}e(r)}};i.AutocompleteValidator=function(t,e){this.strict&&this.source?\"function\"==typeof this.source?this.source(t,H(t,e)):H(t,e)(this.source):e(!0)},i.AutocompleteCell={editor:i.editors.AutocompleteEditor,renderer:i.renderers.AutocompleteRenderer,validator:i.AutocompleteValidator},i.CheckboxCell={editor:i.editors.CheckboxEditor,renderer:i.renderers.CheckboxRenderer},i.TextCell={editor:i.editors.TextEditor,renderer:i.renderers.TextRenderer},i.NumericCell={editor:i.editors.TextEditor,renderer:i.renderers.NumericRenderer,validator:i.NumericValidator,dataType:\"number\"},i.DateCell={editor:i.editors.DateEditor,renderer:i.renderers.AutocompleteRenderer},i.HandsontableCell={editor:i.editors.HandsontableEditor,renderer:i.renderers.AutocompleteRenderer},i.PasswordCell={editor:i.editors.PasswordEditor,renderer:i.renderers.PasswordRenderer,copyable:!1},i.DropdownCell={editor:i.editors.DropdownEditor,renderer:i.renderers.AutocompleteRenderer,validator:i.AutocompleteValidator},i.cellTypes={text:i.TextCell,date:i.DateCell,numeric:i.NumericCell,checkbox:i.CheckboxCell,autocomplete:i.AutocompleteCell,handsontable:i.HandsontableCell,password:i.PasswordCell,dropdown:i.DropdownCell},i.cellLookup={validator:{numeric:i.NumericValidator,autocomplete:i.AutocompleteValidator}},function(t){function e(i){return this.filter(e.resizableFilterSelector).each(function(){new n(t(this),i)}),this}function n(n,i){this.clones||(this.config=t.extend({},e.defaults,i),this.el=n,this.nodeName=n[0].nodeName.toLowerCase(),this.previousScrollTop=null,\"original\"===i.maxWidth&&(i.maxWidth=n.width()),\"original\"===i.minWidth&&(i.minWidth=n.width()),\"original\"===i.maxHeight&&(i.maxHeight=n.height()),\"original\"===i.minHeight&&(i.minHeight=n.height()),\"textarea\"===this.nodeName&&n.css({resize:\"none\",overflowY:\"none\"}),n.data(\"AutoResizer\",this),this.createClone(),this.injectClone(),this.bind())}e.defaults={onResize:function(){},animate:{duration:200,complete:function(){}},extraSpace:50,minHeight:\"original\",maxHeight:500,minWidth:\"original\",maxWidth:500},e.cloneCSSProperties=[\"lineHeight\",\"textDecoration\",\"letterSpacing\",\"fontSize\",\"fontFamily\",\"fontStyle\",\"fontWeight\",\"textTransform\",\"textAlign\",\"direction\",\"wordSpacing\",\"fontSizeAdjust\",\"padding\"],e.cloneCSSValues={position:\"absolute\",top:-9999,left:-9999,opacity:0,overflow:\"hidden\",overflowX:\"hidden\",overflowY:\"hidden\",border:\"1px solid black\",padding:\"0.49em\"},e.resizableFilterSelector=\"textarea,input:not(input[type]),input[type=text],input[type=password]\",e.AutoResizer=n,t.fn.autoResize=e,n.prototype={bind:function(){var e=t.proxy(function(){return this.check(),!0},this);this.unbind(),this.el.bind(\"keyup.autoResize\",e).bind(\"change.autoResize\",e),this.check(null,!0)},unbind:function(){this.el.unbind(\".autoResize\")},createClone:function(){var n=this.el,i=this,r=this.config;this.clones=t(),(\"original\"!==r.minHeight||\"original\"!==r.maxHeight)&&(this.hClone=n.clone().height(\"auto\"),this.clones=this.clones.add(this.hClone)),(\"original\"!==r.minWidth||\"original\"!==r.maxWidth)&&(this.wClone=t(\"<div/>\").width(\"auto\").css({whiteSpace:\"nowrap\",\"float\":\"left\"}),this.clones=this.clones.add(this.wClone)),t.each(e.cloneCSSProperties,function(t,e){i.clones.css(e,n.css(e))}),this.clones.removeAttr(\"name\").removeAttr(\"id\").attr(\"tabIndex\",-1).css(e.cloneCSSValues).css(\"overflowY\",\"scroll\")},check:function(t,e){var n=this.config,i=this.wClone,r=this.hClone,o=this.el,s=o.val();if(i){i.text(s);var a=i.outerWidth(),l=a+n.extraSpace>=n.minWidth?a+n.extraSpace:n.minWidth,c=o.width();l=Math.min(l,n.maxWidth),(c>l&&l>=n.minWidth||l>=n.minWidth&&l<=n.maxWidth)&&(n.onResize.call(o),o.scrollLeft(0),n.animate&&!e?o.stop(1,1).animate({width:l},n.animate):o.width(l))}if(r){l&&r.width(l),r.height(0).val(s).scrollTop(1e4);var h=r[0].scrollTop+n.extraSpace;if(this.previousScrollTop===h)return;this.previousScrollTop=h,h>=n.maxHeight&&(h=n.maxHeight),h<n.minHeight&&(h=n.minHeight),h==n.maxHeight&&l==n.maxWidth?o.css(\"overflowY\",\"scroll\"):o.css(\"overflowY\",\"hidden\"),n.onResize.call(o),n.animate&&!e?o.stop(1,1).animate({height:h},n.animate):o.height(h)}},destroy:function(){this.unbind(),this.el.removeData(\"AutoResizer\"),this.clones.remove(),delete this.el,delete this.hClone,delete this.wClone,delete this.clones},injectClone:function(){(e.cloneContainer||(e.cloneContainer=t(\"<arclones/>\").appendTo(\"body\"))).empty().append(this.clones)}}}(jQuery),function(t){function e(t){return t.split('\"').length-1}t.SheetClip={parse:function(t){var n,i,r,o,s,a,l,c=[],h=0;for(r=t.split(\"\\n\"),r.length>1&&\"\"===r[r.length-1]&&r.pop(),n=0,i=r.length;i>n;n+=1){for(r[n]=r[n].split(\"\t\"),o=0,s=r[n].length;s>o;o+=1)c[h]||(c[h]=[]),a&&0===o?(l=c[h].length-1,c[h][l]=c[h][l]+\"\\n\"+r[n][0],a&&1&e(r[n][0])&&(a=!1,c[h][l]=c[h][l].substring(0,c[h][l].length-1).replace(/\"\"/g,'\"'))):o===s-1&&0===r[n][o].indexOf('\"')?(c[h].push(r[n][o].substring(1).replace(/\"\"/g,'\"')),a=!0):(c[h].push(r[n][o].replace(/\"\"/g,'\"')),a=!1);a||(h+=1)}return c},stringify:function(t){var e,n,i,r,o,s=\"\";for(e=0,n=t.length;n>e;e+=1){for(i=0,r=t[e].length;r>i;i+=1)i>0&&(s+=\"\t\"),o=t[e][i],s+=\"string\"==typeof o?o.indexOf(\"\\n\")>-1?'\"'+o.replace(/\"/g,'\"\"')+'\"':o:null===o||void 0===o?\"\":o;s+=\"\\n\"}return s}}}(e);var I=function(){var t;return{getInstance:function(){return t?t.hasBeenDestroyed()&&t.init():t=new r,t.refCounter++,t}}}();r.prototype.init=function(){var t,e,n=this;this.copyCallbacks=[],this.cutCallbacks=[],this.pasteCallbacks=[],this.listenerElement=document.documentElement,e=document.body,document.getElementById(\"CopyPasteDiv\")?(this.elDiv=document.getElementById(\"CopyPasteDiv\"),this.elTextarea=this.elDiv.firstChild):(this.elDiv=document.createElement(\"DIV\"),this.elDiv.id=\"CopyPasteDiv\",t=this.elDiv.style,t.position=\"fixed\",t.top=\"-10000px\",t.left=\"-10000px\",e.appendChild(this.elDiv),this.elTextarea=document.createElement(\"TEXTAREA\"),this.elTextarea.className=\"copyPaste\",t=this.elTextarea.style,t.width=\"10000px\",t.height=\"10000px\",t.overflow=\"hidden\",this.elDiv.appendChild(this.elTextarea),\"undefined\"!=typeof t.opacity&&(t.opacity=0)),this.keydownListener=function(t){var e=!1;if(t.metaKey?e=!0:t.ctrlKey&&-1===navigator.userAgent.indexOf(\"Mac\")&&(e=!0),e){if(document.activeElement!==n.elTextarea&&(\"\"!=n.getSelectionText()||-1!=[\"INPUT\",\"SELECT\",\"TEXTAREA\"].indexOf(document.activeElement.nodeName)))return;n.selectNodeText(n.elTextarea),setTimeout(function(){n.selectNodeText(n.elTextarea)},0)}!e||67!==t.keyCode&&86!==t.keyCode&&88!==t.keyCode||(88===t.keyCode?setTimeout(function(){n.triggerCut(t)},0):86===t.keyCode&&setTimeout(function(){n.triggerPaste(t)},0))},this._bindEvent(this.listenerElement,\"keydown\",this.keydownListener)},r.prototype.selectNodeText=function(t){t.select()},r.prototype.getSelectionText=function(){var t=\"\";return e.getSelection?t=e.getSelection().toString():document.selection&&\"Control\"!=document.selection.type&&(t=document.selection.createRange().text),t},r.prototype.copyable=function(t){if(\"string\"!=typeof t&&void 0===t.toString)throw new Error(\"copyable requires string parameter\");this.elTextarea.value=t},r.prototype.onCut=function(t){this.cutCallbacks.push(t)},r.prototype.onPaste=function(t){this.pasteCallbacks.push(t)},r.prototype.removeCallback=function(t){var e,n;for(e=0,n=this.copyCallbacks.length;n>e;e++)if(this.copyCallbacks[e]===t)return this.copyCallbacks.splice(e,1),!0;for(e=0,n=this.cutCallbacks.length;n>e;e++)if(this.cutCallbacks[e]===t)return this.cutCallbacks.splice(e,1),!0;for(e=0,n=this.pasteCallbacks.length;n>e;e++)if(this.pasteCallbacks[e]===t)return this.pasteCallbacks.splice(e,1),!0;return!1},r.prototype.triggerCut=function(t){var e=this;e.cutCallbacks&&setTimeout(function(){for(var n=0,i=e.cutCallbacks.length;i>n;n++)e.cutCallbacks[n](t)},50)},r.prototype.triggerPaste=function(t,e){var n=this;n.pasteCallbacks&&setTimeout(function(){for(var i=(e||n.elTextarea.value).replace(/\\n$/,\"\"),r=0,o=n.pasteCallbacks.length;o>r;r++)n.pasteCallbacks[r](i,t)},50)},r.prototype.destroy=function(){this.hasBeenDestroyed()||0!=--this.refCounter||(this.elDiv&&this.elDiv.parentNode&&this.elDiv.parentNode.removeChild(this.elDiv),this._unbindEvent(this.listenerElement,\"keydown\",this.keydownListener))},r.prototype.hasBeenDestroyed=function(){return!this.refCounter},r.prototype._bindEvent=function(){return e.jQuery?function(e,n,i){t(e).on(n+\".copypaste\",i)}:function(t,e,n){t.addEventListener(e,n,!1)}}(),r.prototype._unbindEvent=function(){return e.jQuery?function(e,n,i){t(e).off(n+\".copypaste\",i)}:function(t,e,n){t.removeEventListener(e,n,!1)}}();var z;!function(t){function n(t){return-1===t.indexOf(\"/\")&&-1===t.indexOf(\"~\")?t:t.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")}function i(t,e){var r;for(var o in t)if(t.hasOwnProperty(o)){if(t[o]===e)return n(o)+\"/\";if(\"object\"==typeof t[o]&&(r=i(t[o],e),\"\"!=r))return n(o)+\"/\"+r}return\"\"}function r(t,e){if(t===e)return\"/\";var n=i(t,e);if(\"\"===n)throw new Error(\"Object not found in root\");return\"/\"+n}function o(t){for(var e=0,n=v.length;n>e;e++)if(v[e].obj===t)return v[e]}function s(t,e){for(var n=0,i=t.observers.length;i>n;n++)if(t.observers[n].callback===e)return t.observers[n].observer}function a(t,e){for(var n=0,i=t.observers.length;i>n;n++)if(t.observers[n].observer===e)return void t.observers.splice(n,1)\n",
        "                }function l(t,e){p(e),Object.observe?u(e,t):clearTimeout(e.next);var n=o(t);a(n,e)}function c(t,n){var i,a=[],l=t,c=o(t);if(c?i=s(c,n):(c=new y(t),v.push(c)),i)return i;if(Object.observe)i=function(e){u(i,t),h(i,t);for(var o=0,s=e.length;s>o;){if((\"length\"!==e[o].name||!x(e[o].object))&&\"__Jasmine_been_here_before__\"!==e[o].name){var c=e[o].type;switch(c){case\"new\":c=\"add\";break;case\"deleted\":c=\"delete\";break;case\"updated\":c=\"update\"}m[c].call(e[o],a,r(l,e[o].object))}o++}a&&n&&n(a),i.patches=a,a=[]};else if(i={},c.value=JSON.parse(JSON.stringify(t)),n){i.callback=n,i.next=null;var d=this.intervals||[100,1e3,1e4,6e4],f=0,_=function(){p(i)},g=function(){clearTimeout(i.next),i.next=setTimeout(function(){_(),f=0,i.next=setTimeout(w,d[f++])},0)},w=function(){_(),f==d.length&&(f=d.length-1),i.next=setTimeout(w,d[f++])};\"undefined\"!=typeof e&&(e.addEventListener?(e.addEventListener(\"mousedown\",g),e.addEventListener(\"mouseup\",g),e.addEventListener(\"keydown\",g)):(e.attachEvent(\"onmousedown\",g),e.attachEvent(\"onmouseup\",g),e.attachEvent(\"onkeydown\",g))),i.next=setTimeout(w,d[f++])}return i.patches=a,i.object=t,c.observers.push(new b(n,i)),h(i,t)}function h(t,e){if(Object.observe){Object.observe(e,t);for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];i&&\"object\"==typeof i&&h(t,i)}}return t}function u(t,e){if(Object.observe){Object.unobserve(e,t);for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];i&&\"object\"==typeof i&&u(t,i)}}return t}function p(t){if(Object.observe)Object.deliverChangeRecords(t);else{for(var e,n=0,i=v.length;i>n;n++)if(v[n].obj===t.object){e=v[n];break}d(e.value,t.object,t.patches,\"\")}var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function d(t,e,i,r){for(var o=w(e),s=w(t),a=!1,l=!1,c=s.length-1;c>=0;c--){var h=s[c],u=t[h];if(e.hasOwnProperty(h)){var p=e[h];u instanceof Object?d(u,p,i,r+\"/\"+n(h)):u!=p&&(a=!0,i.push({op:\"replace\",path:r+\"/\"+n(h),value:p}),t[h]=p)}else i.push({op:\"remove\",path:r+\"/\"+n(h)}),delete t[h],l=!0}if(l||o.length!=s.length)for(var c=0;c<o.length;c++){var h=o[c];t.hasOwnProperty(h)||(i.push({op:\"add\",path:r+\"/\"+n(h),value:e[h]}),t[h]=JSON.parse(JSON.stringify(e[h])))}}function f(t,e){for(var n,i=!1,r=0,o=e.length;o>r;){n=e[r];for(var s=n.path.split(\"/\"),a=t,l=1,c=s.length;;)if(x(a)){var h=parseInt(s[l],10);if(l++,l>=c){i=g[n.op].call(n,a,h,t);break}a=a[h]}else{var u=s[l];if(-1!=u.indexOf(\"~\")&&(u=u.replace(/~1/g,\"/\").replace(/~0/g,\"~\")),l++,l>=c){i=_[n.op].call(n,a,u,t);break}a=a[u]}r++}return i}var _={add:function(t,e){return t[e]=this.value,!0},remove:function(t,e){return delete t[e],!0},replace:function(t,e){return t[e]=this.value,!0},move:function(t,e,n){var i={op:\"_get\",path:this.from};return f(n,[i]),f(n,[{op:\"remove\",path:this.from}]),f(n,[{op:\"add\",path:this.path,value:i.value}]),!0},copy:function(t,e,n){var i={op:\"_get\",path:this.from};return f(n,[i]),f(n,[{op:\"add\",path:this.path,value:i.value}]),!0},test:function(t,e){return JSON.stringify(t[e])===JSON.stringify(this.value)},_get:function(t,e){this.value=t[e]}},g={add:function(t,e){return t.splice(e,0,this.value),!0},remove:function(t,e){return t.splice(e,1),!0},replace:function(t,e){return t[e]=this.value,!0},move:_.move,copy:_.copy,test:_.test,_get:_._get},m={add:function(t,e){var i={op:\"add\",path:e+n(this.name),value:this.object[this.name]};t.push(i)},\"delete\":function(t,e){var i={op:\"remove\",path:e+n(this.name)};t.push(i)},update:function(t,e){var i={op:\"replace\",path:e+n(this.name),value:this.object[this.name]};t.push(i)}},v=[];t.intervals;var y=function(){function t(t){this.observers=[],this.obj=t}return t}(),b=function(){function t(t,e){this.callback=t,this.observer=e}return t}();t.unobserve=l,t.observe=c,t.generate=p;var w;w=Object.keys?Object.keys:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e};var x;x=Array.isArray?Array.isArray:function(t){return t.push&&\"number\"==typeof t.length},t.apply=f}(z||(z={})),\"undefined\"!=typeof exports&&(exports.apply=z.apply,exports.observe=z.observe,exports.unobserve=z.unobserve,exports.generate=z.generate),i.PluginHookClass=function(){function t(){this.hooks=e(),this.legacy=n}var e=function(){return{beforeInitWalkontable:[],beforeInit:[],beforeRender:[],beforeChange:[],beforeRemoveCol:[],beforeRemoveRow:[],beforeValidate:[],beforeGet:[],beforeSet:[],beforeGetCellMeta:[],beforeAutofill:[],beforeKeyDown:[],beforeColumnSort:[],afterInit:[],afterLoadData:[],afterUpdateSettings:[],afterRender:[],afterRenderer:[],afterChange:[],afterValidate:[],afterGetCellMeta:[],afterGetColHeader:[],afterGetColWidth:[],afterDestroy:[],afterRemoveRow:[],afterCreateRow:[],afterRemoveCol:[],afterCreateCol:[],afterColumnResize:[],afterColumnMove:[],afterColumnSort:[],afterDeselect:[],afterSelection:[],afterSelectionByProp:[],afterSelectionEnd:[],afterSelectionEndByProp:[],afterCopyLimit:[],afterOnCellMouseDown:[],afterOnCellMouseOver:[],afterOnCellCornerMouseDown:[],afterScrollVertically:[],afterScrollHorizontally:[],modifyCol:[]}},n={onBeforeChange:\"beforeChange\",onChange:\"afterChange\",onCreateRow:\"afterCreateRow\",onCreateCol:\"afterCreateCol\",onSelection:\"afterSelection\",onCopyLimit:\"afterCopyLimit\",onSelectionEnd:\"afterSelectionEnd\",onSelectionByProp:\"afterSelectionByProp\",onSelectionEndByProp:\"afterSelectionEndByProp\"};return t.prototype.add=function(t,e){if(i.helper.isArray(e))for(var r=0,o=e.length;o>r;r++)this.add(t,e[r]);else t in n&&(t=n[t]),\"undefined\"==typeof this.hooks[t]&&(this.hooks[t]=[]),-1==this.hooks[t].indexOf(e)&&this.hooks[t].push(e);return this},t.prototype.once=function(t,e){if(i.helper.isArray(e))for(var n=0,r=e.length;r>n;n++)e[n].runOnce=!0,this.add(t,e[n]);else e.runOnce=!0,this.add(t,e)},t.prototype.remove=function(t,e){var i=!1;if(t in n&&(t=n[t]),\"undefined\"!=typeof this.hooks[t])for(var r=0,o=this.hooks[t].length;o>r;r++)if(this.hooks[t][r]==e){delete this.hooks[t][r].runOnce,this.hooks[t].splice(r,1),i=!0;break}return i},t.prototype.run=function(t,e,i,r,o,s,a){if(e in n&&(e=n[e]),\"undefined\"!=typeof this.hooks[e])for(var l=Array.prototype.slice.call(this.hooks[e]),c=0,h=l.length;h>c;c++)l[c].call(t,i,r,o,s,a),l[c].runOnce&&this.remove(e,l[c])},t.prototype.execute=function(t,e,i,r,o,s,a){var l,c;if(e in n&&(e=n[e]),\"undefined\"!=typeof this.hooks[e]){c=Array.prototype.slice.call(this.hooks[e]);for(var h=0,u=c.length;u>h;h++)if(l=c[h].call(t,i,r,o,s,a),void 0!==l&&(i=l),c[h].runOnce&&this.remove(e,c[h]),l===!1)return!1}return i},t}(),i.PluginHooks=new i.PluginHookClass,function(t){function e(){function e(t){var e=document,n=this;n.table=e.createElement(\"table\"),n.theadTh=e.createElement(\"th\"),n.table.appendChild(e.createElement(\"thead\")).appendChild(e.createElement(\"tr\")).appendChild(n.theadTh),n.tableStyle=n.table.style,n.tableStyle.tableLayout=\"auto\",n.tableStyle.width=\"auto\",n.tbody=e.createElement(\"tbody\"),n.table.appendChild(n.tbody),n.container=e.createElement(\"div\"),n.container.className=t.rootElement[0].className+\" hidden\",n.containerStyle=n.container.style,n.container.appendChild(n.table)}var i=this,r=5;this.beforeInit=function(){var t=this;t.autoColumnWidths=[],t.getSettings().autoColumnSize!==!1?t.autoColumnSizeTmp||(t.autoColumnSizeTmp={table:null,tableStyle:null,theadTh:null,tbody:null,container:null,containerStyle:null,determineBeforeNextRender:!0},t.addHook(\"beforeRender\",n.determineIfChanged),t.addHook(\"afterGetColWidth\",n.getColWidth),t.addHook(\"afterDestroy\",n.afterDestroy),t.determineColumnWidth=i.determineColumnWidth):t.autoColumnSizeTmp&&(t.removeHook(\"beforeRender\",n.determineIfChanged),t.removeHook(\"afterGetColWidth\",n.getColWidth),t.removeHook(\"afterDestroy\",n.afterDestroy),delete t.determineColumnWidth,i.afterDestroy.call(t))},this.determineIfChanged=function(t){t&&n.determineColumnsWidth.apply(this,arguments)},this.determineColumnWidth=function(n){var i=this,o=i.autoColumnSizeTmp;o.container||e.call(o,i),o.container.className=i.rootElement[0].className+\" htAutoColumnSize\",o.table.className=i.$table[0].className;for(var s=i.countRows(),a={},l=0,c=0;s>c;c++){var h=t.helper.stringify(i.getDataAtCell(c,n)),u=h.length;u>l&&(l=u),a[u]||(a[u]={needed:r,strings:[]}),a[u].needed&&(a[u].strings.push({value:h,row:c}),a[u].needed--)}var p=i.getSettings();p.colHeaders&&i.view.appendColHeader(n,o.theadTh),i.view.wt.wtDom.empty(o.tbody);for(var d in a)if(a.hasOwnProperty(d))for(var f=0,_=a[d].strings.length;_>f;f++){var g=a[d].strings[f].row,m=i.getCellMeta(g,n);m.col=n,m.row=g;var v=i.getCellRenderer(m),y=document.createElement(\"tr\"),b=document.createElement(\"td\");v(i,b,g,n,i.colToProp(n),a[d].strings[f].value,m),c++,y.appendChild(b),o.tbody.appendChild(y)}var w=i.rootElement[0].parentNode;w.appendChild(o.container);var x=i.view.wt.wtDom.outerWidth(o.table);if(w.removeChild(o.container),!p.nativeScrollbars){var k=i.view.wt.wtViewport.getViewportWidth()-2;x>k&&(x=k)}return x},this.determineColumnsWidth=function(){var t=this,e=this.getSettings();if(e.autoColumnSize||!e.colWidths)for(var n=this.countCols(),r=0;n>r;r++)t._getColWidthFromSettings(r)||(this.autoColumnWidths[r]=i.determineColumnWidth.call(t,r))},this.getColWidth=function(t,e){this.autoColumnWidths[t]&&this.autoColumnWidths[t]>e.width&&(e.width=this.autoColumnWidths[t])},this.afterDestroy=function(){var t=this;t.autoColumnSizeTmp&&t.autoColumnSizeTmp.container&&t.autoColumnSizeTmp.container.parentNode&&t.autoColumnSizeTmp.container.parentNode.removeChild(t.autoColumnSizeTmp.container),t.autoColumnSizeTmp=null}}var n=new e;t.PluginHooks.add(\"beforeInit\",n.beforeInit),t.PluginHooks.add(\"afterUpdateSettings\",n.beforeInit)}(i);var F=new o;i.PluginHooks.add(\"afterInit\",function(){F.init.call(this,\"afterInit\")}),i.PluginHooks.add(\"afterUpdateSettings\",function(){F.init.call(this,\"afterUpdateSettings\")}),i.PluginHooks.add(\"beforeGet\",F.onBeforeGetSet),i.PluginHooks.add(\"beforeSet\",F.onBeforeGetSet),i.PluginHooks.add(\"afterGetColHeader\",F.getColHeader),function(e){function n(i,r){function o(){var n=t(\"body > .htContextMenu\")[0];return n||(n=document.createElement(\"DIV\"),e.Dom.addClass(n,\"htContextMenu\"),document.getElementsByTagName(\"body\")[0].appendChild(n)),n}this.instance=i;var s=this;this.menu=o(),this.enabled=!0,this.bindMouseEvents(),this.bindTableEvents(),this.instance.addHook(\"afterDestroy\",function(){s.destroy()}),this.defaultOptions={items:{row_above:{name:\"Insert row above\",callback:function(t,e){this.alter(\"insert_row\",e.start.row())},disabled:function(){return this.countRows()>=this.getSettings().maxRows}},row_below:{name:\"Insert row below\",callback:function(t,e){this.alter(\"insert_row\",e.end.row()+1)},disabled:function(){return this.countRows()>=this.getSettings().maxRows}},hsep1:n.SEPARATOR,col_left:{name:\"Insert column on the left\",callback:function(t,e){this.alter(\"insert_col\",e.start.col())},disabled:function(){return this.countCols()>=this.getSettings().maxCols}},col_right:{name:\"Insert column on the right\",callback:function(t,e){this.alter(\"insert_col\",e.end.col()+1)},disabled:function(){return this.countCols()>=this.getSettings().maxCols}},hsep2:n.SEPARATOR,remove_row:{name:\"Remove row\",callback:function(t,e){var n=e.end.row()-e.start.row()+1;this.alter(\"remove_row\",e.start.row(),n)}},remove_col:{name:\"Remove column\",callback:function(t,e){var n=e.end.col()-e.start.col()+1;this.alter(\"remove_col\",e.start.col(),n)}},hsep3:n.SEPARATOR,undo:{name:\"Undo\",callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}},redo:{name:\"Redo\",callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}}}},this.options={},e.helper.extend(this.options,this.defaultOptions),this.updateOptions(r)}function i(){var t=this,i=t.getSettings().contextMenu,r=e.helper.isObject(i)?i:{};i?(t.contextMenu||(t.contextMenu=new n(t,r)),t.contextMenu.enable(),e.helper.isArray(i)&&t.contextMenu.filterItems(i)):t.contextMenu&&(t.contextMenu.destroy(),delete t.contextMenu)}n.prototype.bindMouseEvents=function(){function i(i){i.preventDefault(),(\"TD\"==i.target.nodeName||e.Dom.hasClass(i.target,\"current\")&&e.Dom.hasClass(i.target,\"wtBorder\"))&&(this.show(i.pageY,i.pageX),t(document).on(\"mousedown.htContextMenu\",e.helper.proxy(n.prototype.close,this)))}this.instance.rootElement.on(\"contextmenu.htContextMenu\",e.helper.proxy(i,this))},n.prototype.bindTableEvents=function(){var t=this;this._afterScrollCallback=function(){t.close()},this.instance.addHook(\"afterScrollVertically\",this._afterScrollCallback),this.instance.addHook(\"afterScrollHorizontally\",this._afterScrollCallback)},n.prototype.unbindTableEvents=function(){this._afterScrollCallback&&(this.instance.removeHook(\"afterScrollVertically\",this._afterScrollCallback),this.instance.removeHook(\"afterScrollHorizontally\",this._afterScrollCallback),this._afterScrollCallback=null)},n.prototype.performAction=function(){var e=t(this.menu).handsontable(\"getInstance\"),i=e.getSelected()[0],r=e.getData()[i];if(r.disabled!==!0&&(\"function\"!=typeof r.disabled||r.disabled.call(this.instance)!==!0)&&\"function\"==typeof r.callback){var o=this.instance.getSelected(),s=n.utils.normalizeSelection(o);r.callback.call(this.instance,r.key,s)}},n.prototype.unbindMouseEvents=function(){this.instance.rootElement.off(\"contextmenu.htContextMenu\"),t(document).off(\"mousedown.htContextMenu\")},n.prototype.show=function(i,r){this.menu.style.display=\"block\",t(this.menu).off(\"mousedown.htContextMenu\").on(\"mousedown.htContextMenu\",e.helper.proxy(this.performAction,this)),t(this.menu).handsontable({data:n.utils.convertItemsToArray(this.getItems()),colHeaders:!1,colWidths:[160],readOnly:!0,copyPaste:!1,columns:[{data:\"name\",renderer:e.helper.proxy(this.renderer,this)}],beforeKeyDown:e.helper.proxy(this.onBeforeKeyDown,this)}),this.bindTableEvents(),this.setMenuPosition(i,r),t(this.menu).handsontable(\"listen\")},n.prototype.close=function(){this.hide(),t(document).off(\"mousedown.htContextMenu\"),this.unbindTableEvents(),this.instance.listen()},n.prototype.hide=function(){this.menu.style.display=\"none\",t(this.menu).handsontable(\"destroy\")},n.prototype.renderer=function(i,r,o,s,a,l){function c(t){return new RegExp(n.SEPARATOR,\"i\").test(t.name)}function h(t){return t.disabled===!0||\"function\"==typeof t.disabled&&t.disabled.call(u.instance)===!0}var u=this,p=i.getData()[o],d=document.createElement(\"DIV\");e.Dom.empty(r),r.appendChild(d),c(p)?e.Dom.addClass(r,\"htSeparator\"):e.Dom.fastInnerText(d,l),h(p,u.instance)?(e.Dom.addClass(r,\"htDisabled\"),t(d).on(\"mouseenter\",function(){i.deselectCell()})):(e.Dom.removeClass(r,\"htDisabled\"),t(d).on(\"mouseenter\",function(){i.selectCell(o,s)}))},n.prototype.onBeforeKeyDown=function(i){function r(t){var e=t.getCell(0,0);n.utils.isSeparator(e)||n.utils.isDisabled(e)?s(0,0,t):t.selectCell(0,0)}function o(t){var e=t.countRows()-1,i=t.getCell(e,0);n.utils.isSeparator(i)||n.utils.isDisabled(i)?a(e,0,t):t.selectCell(e,0)}function s(t,e,i){var r=t+1,o=r<i.countRows()?i.getCell(r,e):null;o&&(n.utils.isSeparator(o)||n.utils.isDisabled(o)?s(r,e,i):i.selectCell(r,e))}function a(t,e,i){var r=t-1,o=r>=0?i.getCell(r,e):null;o&&(n.utils.isSeparator(o)||n.utils.isDisabled(o)?a(r,e,i):i.selectCell(r,e))}var l=this,c=t(l.menu).handsontable(\"getInstance\"),h=c.getSelected();switch(i.keyCode){case e.helper.keyCode.ESCAPE:l.close(),i.preventDefault(),i.stopImmediatePropagation();break;case e.helper.keyCode.ENTER:c.getSelected()&&(l.performAction(),l.close());break;case e.helper.keyCode.ARROW_DOWN:h?s(h[0],h[1],c):r(c),i.preventDefault(),i.stopImmediatePropagation();break;case e.helper.keyCode.ARROW_UP:h?a(h[0],h[1],c):o(c),i.preventDefault(),i.stopImmediatePropagation()}},n.prototype.getItems=function(){function t(t){\"string\"==typeof t?this.name=t:e.helper.extend(this,t)}var n={};t.prototype=this.options;for(var i in this.options.items)!this.options.items.hasOwnProperty(i)||this.itemsFilter&&-1==this.itemsFilter.indexOf(i)||(n[i]=new t(this.options.items[i]));return n},n.prototype.updateOptions=function(t){if(t=t||{},t.items)for(var n in t.items){var i={};t.items.hasOwnProperty(n)&&this.defaultOptions.items.hasOwnProperty(n)&&e.helper.isObject(t.items[n])&&(e.helper.extend(i,this.defaultOptions.items[n]),e.helper.extend(i,t.items[n]),t.items[n]=i)}e.helper.extend(this.options,t)},n.prototype.setMenuPosition=function(t,e){var n={top:t,topRelative:t-document.documentElement.scrollTop,left:e,leftRelative:e-document.documentElement.scrollLeft};this.menuFitsBelowCursor(n)?this.positionMenuBelowCursor(n):this.positionMenuAboveCursor(n),this.menuFitsOnRightOfCursor(n)?this.positionMenuOnRightOfCursor(n):this.positionMenuOnLeftOfCursor(n)},n.prototype.menuFitsBelowCursor=function(t){return t.topRelative+this.menu.offsetHeight<=document.documentElement.scrollTop+document.documentElement.clientHeight},n.prototype.menuFitsOnRightOfCursor=function(t){return t.leftRelative+this.menu.offsetWidth<=document.documentElement.scrollLeft+document.documentElement.clientWidth},n.prototype.positionMenuBelowCursor=function(t){this.menu.style.top=t.top+\"px\"},n.prototype.positionMenuAboveCursor=function(t){this.menu.style.top=t.top-this.menu.offsetHeight+\"px\"},n.prototype.positionMenuOnRightOfCursor=function(t){this.menu.style.left=t.left+\"px\"},n.prototype.positionMenuOnLeftOfCursor=function(t){this.menu.style.left=t.left-this.menu.offsetWidth+\"px\"},n.utils={},n.utils.convertItemsToArray=function(t){var e,n=[];for(var i in t)if(t.hasOwnProperty(i)){if(\"string\"==typeof t[i])e={name:t[i]};else{if(t[i].visible===!1)continue;e=t[i]}e.key=i,n.push(e)}return n},n.utils.normalizeSelection=function(t){var n={start:new e.SelectionPoint,end:new e.SelectionPoint};return n.start.row(Math.min(t[0],t[2])),n.start.col(Math.min(t[1],t[3])),n.end.row(Math.max(t[0],t[2])),n.end.col(Math.max(t[1],t[3])),n},n.utils.isSeparator=function(t){return e.Dom.hasClass(t,\"htSeparator\")},n.utils.isDisabled=function(t){return e.Dom.hasClass(t,\"htDisabled\")},n.prototype.enable=function(){this.enabled||(this.enabled=!0,this.bindMouseEvents())},n.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.close(),this.unbindMouseEvents(),this.unbindTableEvents())},n.prototype.destroy=function(){this.close(),this.unbindMouseEvents(),this.unbindTableEvents(),this.isMenuEnabledByOtherHotInstance()||this.removeMenu()},n.prototype.isMenuEnabledByOtherHotInstance=function(){for(var e=t(\".handsontable\"),n=!1,i=0,r=e.length;r>i;i++){var o=t(e[i]).handsontable(\"getInstance\");if(o&&o.getSettings().contextMenu){n=!0;break}}return n},n.prototype.removeMenu=function(){this.menu.parentNode&&this.menu.parentNode.removeChild(this.menu)},n.prototype.filterItems=function(t){this.itemsFilter=t},n.SEPARATOR=\"---------\",e.PluginHooks.add(\"afterInit\",i),e.PluginHooks.add(\"afterUpdateSettings\",i),e.ContextMenu=n}(i),i.PluginHooks.add(\"beforeGetCellMeta\",function(t,e,n){if(n.isWritable=!n.readOnly,n.autoComplete)throw new Error(\"Support for legacy autocomplete syntax was removed in Handsontable 0.10.0. Please remove the property named 'autoComplete' from your config. For replacement instructions, see wiki page https://github.com/warpech/jquery-handsontable/wiki/Migration-guide-to-0.10.x\")});var L=new s;i.PluginHooks.add(\"beforeInit\",L.beforeInit),i.PluginHooks.add(\"afterInit\",function(){L.init.call(this,\"afterInit\")}),i.PluginHooks.add(\"afterUpdateSettings\",function(){L.init.call(this,\"afterUpdateSettings\")}),i.PluginHooks.add(\"afterGetColHeader\",L.getColHeader),i.PluginHooks.add(\"modifyCol\",L.modifyCol);var V=new a;i.PluginHooks.add(\"beforeInit\",V.beforeInit),i.PluginHooks.add(\"afterInit\",function(){V.init.call(this,\"afterInit\")}),i.PluginHooks.add(\"afterUpdateSettings\",function(){V.init.call(this,\"afterUpdateSettings\")}),i.PluginHooks.add(\"afterGetColWidth\",V.getColWidth),function(){function t(){var t=this,n=t.getSettings().observeChanges;n?(t.observer&&r.call(t),e.call(t),s.call(t)):n||r.call(t)}function e(){var t=this;t.observeChangesActive=!0,t.pauseObservingChanges=function(){t.observeChangesActive=!1},t.resumeObservingChanges=function(){t.observeChangesActive=!0},t.observedData=t.getData(),t.observer=z.observe(t.observedData,function(e){t.observeChangesActive&&(n.call(t,e),t.render()),t.runHooks(\"afterChangesObserved\")})}function n(t){function e(t){var e;return e=i(t),e=n(e)}function n(t){var e=[];return t.filter(function(t){var n=r(t.path);if(-1!=[\"add\",\"remove\"].indexOf(t.op)&&!isNaN(n.col)){if(-1!=e.indexOf(n.col))return!1;e.push(n.col)}return!0})}function i(t){return t.filter(function(t){return!/[/]length/gi.test(t.path)})}function r(t){var e=t.match(/^\\/(\\d+)\\/?(.*)?$/);return{row:parseInt(e[1],10),col:/^\\d*$/.test(e[2])?parseInt(e[2],10):e[2]}}for(var o=this,s=e(t),a=0,l=s.length;l>a;a++){var c=s[a],h=r(c.path);switch(c.op){case\"add\":isNaN(h.col)?o.runHooks(\"afterCreateRow\",h.row):o.runHooks(\"afterCreateCol\",h.col);break;case\"remove\":isNaN(h.col)?o.runHooks(\"afterRemoveRow\",h.row,1):o.runHooks(\"afterRemoveCol\",h.col,1);break;case\"replace\":o.runHooks(\"afterChange\",[h.row,h.col,null,c.value],\"external\")}}}function r(){var t=this;t.observer&&(o.call(t),a.call(t))}function o(){var t=this;z.unobserve(t.observedData,t.observer),delete t.observeChangesActive,delete t.pauseObservingChanges,delete t.resumeObservingChanges}function s(){var t=this;t.addHook(\"afterDestroy\",r),t.addHook(\"afterCreateRow\",l),t.addHook(\"afterRemoveRow\",l),t.addHook(\"afterCreateCol\",l),t.addHook(\"afterRemoveCol\",l),t.addHook(\"afterChange\",function(t,e){\"loadData\"!=e&&l.call(this)})}function a(){var t=this;t.removeHook(\"afterDestroy\",r),t.removeHook(\"afterCreateRow\",l),t.removeHook(\"afterRemoveRow\",l),t.removeHook(\"afterCreateCol\",l),t.removeHook(\"afterRemoveCol\",l),t.removeHook(\"afterChange\",l)}function l(){var t=this;t.pauseObservingChanges(),t.addHookOnce(\"afterChangesObserved\",function(){t.resumeObservingChanges()})}i.PluginHooks.add(\"afterLoadData\",t),i.PluginHooks.add(\"afterUpdateSettings\",t)}(),function(t){function e(){function e(){var t=this;for(var e in o)o.hasOwnProperty(e)&&!i.call(t,e)&&t.PluginHooks.add(e,o[e])}function n(){var t=this;for(var e in o)o.hasOwnProperty(e)&&i.call(t,e)&&t.PluginHooks.remove(e,o[e])}function i(t){var e=this;return e.PluginHooks.hooks.hasOwnProperty(t)}var r=this;this.init=function(){var i=this,o=i.getSettings().persistentState;return r.enabled=!!o,r.enabled?(i.storage||(i.storage=new t(i.rootElement[0].id)),i.resetState=r.resetValue,void e.call(i)):void n.call(i)},this.saveValue=function(t,e){var n=this;n.storage.saveValue(t,e)},this.loadValue=function(t,e){var n=this;e.value=n.storage.loadValue(t)},this.resetValue=function(t){var e=this;\"undefined\"!=typeof t?e.storage.reset(t):e.storage.resetAll()};var o={persistentStateSave:r.saveValue,persistentStateLoad:r.loadValue,persistentStateReset:r.resetValue}}var n=new e;i.PluginHooks.add(\"beforeInit\",n.init),i.PluginHooks.add(\"afterUpdateSettings\",n.init)}(l),function(e){e.UndoRedo=function(t){var n=this;this.instance=t,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,t.addHook(\"afterChange\",function(t){if(t){var i=new e.UndoRedo.ChangeAction(t);n.done(i)}}),t.addHook(\"afterCreateRow\",function(t,i,r){if(!r){var o=new e.UndoRedo.CreateRowAction(t,i);n.done(o)}}),t.addHook(\"beforeRemoveRow\",function(t,i){var r=n.instance.getData();t=(r.length+t)%r.length;var o=r.slice(t,t+i),s=new e.UndoRedo.RemoveRowAction(t,o);n.done(s)}),t.addHook(\"afterCreateCol\",function(t,i,r){if(!r){var o=new e.UndoRedo.CreateColumnAction(t,i);n.done(o)}}),t.addHook(\"beforeRemoveCol\",function(i,r){var o=n.instance.getData();i=(n.instance.countCols()+i)%n.instance.countCols();for(var s=[],a=0,l=o.length;l>a;a++)s[a]=o[a].slice(i,i+r);var c;e.helper.isArray(t.getSettings().colHeaders)&&(c=t.getSettings().colHeaders.slice(i,i+s.length));var h=new e.UndoRedo.RemoveColumnAction(i,s,c);n.done(h)})},e.UndoRedo.prototype.done=function(t){this.ignoreNewActions||(this.doneActions.push(t),this.undoneActions.length=0)},e.UndoRedo.prototype.undo=function(){if(this.isUndoAvailable()){var t=this.doneActions.pop();this.ignoreNewActions=!0;var e=this;t.undo(this.instance,function(){e.ignoreNewActions=!1,e.undoneActions.push(t)})}},e.UndoRedo.prototype.redo=function(){if(this.isRedoAvailable()){var t=this.undoneActions.pop();this.ignoreNewActions=!0;var e=this;t.redo(this.instance,function(){e.ignoreNewActions=!1,e.doneActions.push(t)})}},e.UndoRedo.prototype.isUndoAvailable=function(){return this.doneActions.length>0},e.UndoRedo.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},e.UndoRedo.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},e.UndoRedo.Action=function(){},e.UndoRedo.Action.prototype.undo=function(){},e.UndoRedo.Action.prototype.redo=function(){},e.UndoRedo.ChangeAction=function(t){this.changes=t},e.helper.inherit(e.UndoRedo.ChangeAction,e.UndoRedo.Action),e.UndoRedo.ChangeAction.prototype.undo=function(e,n){for(var i=t.extend(!0,[],this.changes),r=0,o=i.length;o>r;r++)i[r].splice(3,1);e.addHookOnce(\"afterChange\",n),e.setDataAtRowProp(i,null,null,\"undo\")},e.UndoRedo.ChangeAction.prototype.redo=function(e,n){for(var i=t.extend(!0,[],this.changes),r=0,o=i.length;o>r;r++)i[r].splice(2,1);e.addHookOnce(\"afterChange\",n),e.setDataAtRowProp(i,null,null,\"redo\")},e.UndoRedo.CreateRowAction=function(t,e){this.index=t,this.amount=e},e.helper.inherit(e.UndoRedo.CreateRowAction,e.UndoRedo.Action),e.UndoRedo.CreateRowAction.prototype.undo=function(t,e){t.addHookOnce(\"afterRemoveRow\",e),t.alter(\"remove_row\",this.index,this.amount)},e.UndoRedo.CreateRowAction.prototype.redo=function(t,e){t.addHookOnce(\"afterCreateRow\",e),t.alter(\"insert_row\",this.index+1,this.amount)},e.UndoRedo.RemoveRowAction=function(t,e){this.index=t,this.data=e},e.helper.inherit(e.UndoRedo.RemoveRowAction,e.UndoRedo.Action),e.UndoRedo.RemoveRowAction.prototype.undo=function(t,e){var n=[this.index,0];Array.prototype.push.apply(n,this.data),Array.prototype.splice.apply(t.getData(),n),t.addHookOnce(\"afterRender\",e),t.render()},e.UndoRedo.RemoveRowAction.prototype.redo=function(t,e){t.addHookOnce(\"afterRemoveRow\",e),t.alter(\"remove_row\",this.index,this.data.length)},e.UndoRedo.CreateColumnAction=function(t,e){this.index=t,this.amount=e},e.helper.inherit(e.UndoRedo.CreateColumnAction,e.UndoRedo.Action),e.UndoRedo.CreateColumnAction.prototype.undo=function(t,e){t.addHookOnce(\"afterRemoveCol\",e),t.alter(\"remove_col\",this.index,this.amount)},e.UndoRedo.CreateColumnAction.prototype.redo=function(t,e){t.addHookOnce(\"afterCreateCol\",e),t.alter(\"insert_col\",this.index+1,this.amount)},e.UndoRedo.RemoveColumnAction=function(t,e,n){this.index=t,this.data=e,this.amount=this.data[0].length,this.headers=n},e.helper.inherit(e.UndoRedo.RemoveColumnAction,e.UndoRedo.Action),e.UndoRedo.RemoveColumnAction.prototype.undo=function(t,e){for(var n,i,r=0,o=t.getData().length;o>r;r++)n=t.getDataAtRow(r),i=[this.index,0],Array.prototype.push.apply(i,this.data[r]),Array.prototype.splice.apply(n,i);\"undefined\"!=typeof this.headers&&(i=[this.index,0],Array.prototype.push.apply(i,this.headers),Array.prototype.splice.apply(t.getSettings().colHeaders,i)),t.addHookOnce(\"afterRender\",e),t.render()},e.UndoRedo.RemoveColumnAction.prototype.redo=function(t,e){t.addHookOnce(\"afterRemoveCol\",e),t.alter(\"remove_col\",this.index,this.amount)}}(i),function(t){function e(){var e=this,s=\"undefined\"==typeof e.getSettings().undo||e.getSettings().undo;s?e.undoRedo||(e.undoRedo=new t.UndoRedo(e),r(e),e.addHook(\"beforeKeyDown\",n),e.addHook(\"afterChange\",i)):e.undoRedo&&(delete e.undoRedo,o(e),e.removeHook(\"beforeKeyDown\",n),e.removeHook(\"afterChange\",i))}function n(t){var e=this,n=(t.ctrlKey||t.metaKey)&&!t.altKey;n&&(89===t.keyCode||t.shiftKey&&90===t.keyCode?(e.undoRedo.redo(),t.stopImmediatePropagation()):90===t.keyCode&&(e.undoRedo.undo(),t.stopImmediatePropagation()))}function i(t,e){var n=this;return\"loadData\"==e?n.undoRedo.clear():void 0}function r(t){t.undo=function(){return t.undoRedo.undo()},t.redo=function(){return t.undoRedo.redo()},t.isUndoAvailable=function(){return t.undoRedo.isUndoAvailable()},t.isRedoAvailable=function(){return t.undoRedo.isRedoAvailable()},t.clearUndo=function(){return t.undoRedo.clear()}}function o(t){delete t.undo,delete t.redo,delete t.isUndoAvailable,delete t.isRedoAvailable,delete t.clearUndo}t.PluginHooks.add(\"afterInit\",e),t.PluginHooks.add(\"afterUpdateSettings\",e)}(i),c.prototype.setBoundaries=function(t){this.boundaries=t},c.prototype.setCallback=function(t){this.callback=t},c.prototype.check=function(t,e){var n=0,i=0;e<this.boundaries.top?i=e-this.boundaries.top:e>this.boundaries.bottom&&(i=e-this.boundaries.bottom),t<this.boundaries.left?n=t-this.boundaries.left:t>this.boundaries.right&&(n=t-this.boundaries.right),this.callback(n,i)};var B,W=!1;if(\"undefined\"!=typeof i){var $=function(t){var n=t.view.wt.wtScrollbars.vertical.scrollHandler;B=new c,n!==e&&(B.setBoundaries(n?n.getBoundingClientRect():t.$table[0].getBoundingClientRect()),B.setCallback(function(e,i){0>e?n?n.scrollLeft-=50:t.view.wt.scrollHorizontal(-1).draw():e>0&&(n?n.scrollLeft+=50:t.view.wt.scrollHorizontal(1).draw()),0>i?n?n.scrollTop-=20:t.view.wt.scrollVertical(-1).draw():i>0&&(n?n.scrollTop+=20:t.view.wt.scrollVertical(1).draw())}),W=!0)};i.PluginHooks.add(\"afterInit\",function(){t(document).on(\"mouseup.\"+this.guid,function(){W=!1}),t(document).on(\"mousemove.\"+this.guid,function(t){W&&B.check(t.clientX,t.clientY)})}),i.PluginHooks.add(\"destroy\",function(){t(document).off(\".\"+this.guid)}),i.PluginHooks.add(\"afterOnCellMouseDown\",function(){$(this)}),i.PluginHooks.add(\"afterOnCellCornerMouseDown\",function(){$(this)}),i.plugins.DragToScroll=c}if(function(t,e,n){function i(i){function r(){i.isListening()&&i.selection.empty()}function o(t){if(i.isListening()&&i.selection.isSelected()){var e=t.replace(/^[\\r\\n]*/g,\"\").replace(/[\\r\\n]*$/g,\"\"),r=n.parse(e),o=i.getSelected(),s=i.getCornerCoords([{row:o[0],col:o[1]},{row:o[2],col:o[3]}]),a=s.TL,l={row:Math.max(s.BR.row,r.length-1+s.TL.row),col:Math.max(s.BR.col,r[0].length-1+s.TL.col)};i.PluginHooks.once(\"afterChange\",function(t){t&&t.length&&this.selectCell(a.row,a.col,l.row,l.col)}),i.populateFromArray(a.row,a.col,r,l.row,l.col,\"paste\",i.getSettings().pasteMode)}}function s(e){if(t.helper.isCtrlKey(e.keyCode)&&i.getSelected())return a.setCopyableText(),void e.stopImmediatePropagation();var n=(e.ctrlKey||e.metaKey)&&!e.altKey;e.keyCode==t.helper.keyCode.A&&n&&setTimeout(t.helper.proxy(a.setCopyableText,a))}this.copyPasteInstance=e.getInstance(),this.copyPasteInstance.onCut(r),this.copyPasteInstance.onPaste(o);var a=this;i.addHook(\"beforeKeyDown\",s),this.destroy=function(){this.copyPasteInstance.removeCallback(r),this.copyPasteInstance.removeCallback(o),this.copyPasteInstance.destroy(),i.removeHook(\"beforeKeyDown\",s)},i.addHook(\"afterDestroy\",t.helper.proxy(this.destroy,this)),this.triggerPaste=t.helper.proxy(this.copyPasteInstance.triggerPaste,this.copyPasteInstance),this.triggerCut=t.helper.proxy(this.copyPasteInstance.triggerCut,this.copyPasteInstance),this.setCopyableText=function(){var t=i.getSelected(),e=i.getSettings(),n=e.copyRowsLimit,r=e.copyColsLimit,o=Math.min(t[0],t[2]),s=Math.min(t[1],t[3]),a=Math.max(t[0],t[2]),l=Math.max(t[1],t[3]),c=Math.min(a,o+n-1),h=Math.min(l,s+r-1);i.copyPaste.copyPasteInstance.copyable(i.getCopyableData(o,s,c,h)),(a!==c||l!==h)&&i.PluginHooks.run(\"afterCopyLimit\",a-o+1,l-s+1,n,r)}}function r(){var t=this,e=t.getSettings().copyPaste!==!1;e&&!t.copyPaste?t.copyPaste=new i(t):!e&&t.copyPaste&&(t.copyPaste.destroy(),delete t.copyPaste)}t.PluginHooks.add(\"afterInit\",r),t.PluginHooks.add(\"afterUpdateSettings\",r)}(i,I,SheetClip),function(t){function e(){var e=this,n=!!e.getSettings().search;n?e.search=new t.Search(e):delete e.search}t.Search=function(e){this.query=function(n,i,r){var o=e.countRows(),s=e.countCols(),a=[];i||(i=t.Search.global.getDefaultCallback()),r||(r=t.Search.global.getDefaultQueryMethod());for(var l=0;o>l;l++)for(var c=0;s>c;c++){var h=e.getDataAtCell(l,c),u=e.getCellMeta(l,c),p=u.search.callback||i,d=u.search.queryMethod||r,f=d(n,h);\n",
        "                if(f){var _={row:l,col:c,data:h};a.push(_)}p&&p(e,l,c,h,f)}return a}},t.Search.DEFAULT_CALLBACK=function(t,e,n,i,r){t.getCellMeta(e,n).isSearchResult=r},t.Search.DEFAULT_QUERY_METHOD=function(t,e){return\"undefined\"!=typeof t&&null!=t&&t.toLowerCase&&0!=t.length?-1!=e.toString().toLowerCase().indexOf(t.toLowerCase()):!1},t.Search.DEFAULT_SEARCH_RESULT_CLASS=\"htSearchResult\",t.Search.global=function(){var e=t.Search.DEFAULT_CALLBACK,n=t.Search.DEFAULT_QUERY_METHOD,i=t.Search.DEFAULT_SEARCH_RESULT_CLASS;return{getDefaultCallback:function(){return e},setDefaultCallback:function(t){e=t},getDefaultQueryMethod:function(){return n},setDefaultQueryMethod:function(t){n=t},getDefaultSearchResultClass:function(){return i},setDefaultSearchResultClass:function(t){i=t}}}(),t.SearchCellDecorator=function(e,n,i,r,o,s,a){var l=\"object\"==typeof a.search&&a.search.searchResultClass||t.Search.global.getDefaultSearchResultClass();a.isSearchResult?t.Dom.addClass(n,l):t.Dom.removeClass(n,l)};var n=t.renderers.cellDecorator;t.renderers.cellDecorator=function(){n.apply(this,arguments),t.SearchCellDecorator.apply(this,arguments)},t.PluginHooks.add(\"afterInit\",e),t.PluginHooks.add(\"afterUpdateSettings\",e)}(i),h.prototype.init=function(){this.TABLE=this.instance.wtTable.TABLE,this.fixed=this.instance.wtTable.hider,this.fixedContainer=this.instance.wtTable.holder,this.fixed.style.position=\"absolute\",this.fixed.style.left=\"0\",this.scrollHandler=this.getScrollableElement(this.TABLE),this.$scrollHandler=t(this.scrollHandler)},h.prototype.makeClone=function(t){var e=document.createElement(\"DIV\");e.className=\"ht_clone_\"+t+\" handsontable\",e.style.position=\"fixed\",e.style.overflow=\"hidden\";var n=document.createElement(\"TABLE\");return n.className=this.instance.wtTable.TABLE.className,e.appendChild(n),this.instance.wtTable.holder.parentNode.appendChild(e),new m({cloneSource:this.instance,cloneOverlay:this,table:n})},h.prototype.getScrollableElement=function(t){for(var n=t.parentNode;n&&n.style;){if(\"visible\"!==n.style.overflow&&\"\"!==n.style.overflow)return n;if(this instanceof A&&\"visible\"!==n.style.overflowX&&\"\"!==n.style.overflowX)return n;n=n.parentNode}return e},h.prototype.prepare=function(){},h.prototype.onScroll=function(t){this.windowScrollPosition=this.getScrollPosition(),this.readSettings(),t&&(this.windowScrollPosition=t),this.resetFixedPosition()},h.prototype.availableSize=function(){var t;return t=this.windowScrollPosition>this.tableParentOffset?this.instance.wtTable.getLastVisibleRow()===this.total-1?this.instance.wtDom.outerHeight(this.TABLE):this.windowSize:this.windowSize-this.tableParentOffset},h.prototype.refresh=function(t){var e=this.getLastCell();this.measureBefore=this.sumCellSizes(0,this.offset),this.measureAfter=-1===e?0:this.sumCellSizes(e,this.total-e),this.applyToDOM(),this.clone&&this.clone.draw(t)},h.prototype.destroy=function(){this.$scrollHandler.off(\".\"+this.instance.guid),t(e).off(\".\"+this.instance.guid),t(document).off(\".\"+this.instance.guid)},u.prototype.appear=function(t){var e,n,i,r,o,s,a,l,c,h,u,p;if(!this.disabled){var d,f,_,g,m,v,y,b=this.instance,w=!1,x=!1,k=!1,C=!1;for(b.wtTable.isRowInViewport(t[0])||(w=!0),b.wtTable.isRowInViewport(t[2])||(k=!0),v=b.wtTable.rowStrategy.countVisible(),m=0;v>m;m++)if(y=b.wtTable.rowFilter.visibleToSource(m),y>=t[0]&&y<=t[2]){d=y;break}for(m=v-1;m>=0;m--)if(y=b.wtTable.rowFilter.visibleToSource(m),y>=t[0]&&y<=t[2]){_=y;break}if(w&&k)x=!0,C=!0;else{for(b.wtTable.isColumnInViewport(t[1])||(x=!0),b.wtTable.isColumnInViewport(t[3])||(C=!0),v=b.wtTable.columnStrategy.countVisible(),m=0;v>m;m++)if(y=b.wtTable.columnFilter.visibleToSource(m),y>=t[1]&&y<=t[3]){f=y;break}for(m=v-1;m>=0;m--)if(y=b.wtTable.columnFilter.visibleToSource(m),y>=t[1]&&y<=t[3]){g=y;break}}if(void 0===d||void 0===f)return void this.disappear();e=d!==_||f!==g,n=b.wtTable.getCell([d,f]),i=e?b.wtTable.getCell([_,g]):n,r=this.wtDom.offset(n),o=e?this.wtDom.offset(i):r,s=this.wtDom.offset(b.wtTable.TABLE),l=r.top,u=o.top+this.wtDom.outerHeight(i)-l,h=r.left,p=o.left+this.wtDom.outerWidth(i)-h,a=l-s.top-1,c=h-s.left-1;var S=this.wtDom.getComputedStyle(n);parseInt(S.borderTopWidth,10)>0&&(a+=1,u=u>0?u-1:0),parseInt(S.borderLeftWidth,10)>0&&(c+=1,p=p>0?p-1:0),w?this.topStyle.display=\"none\":(this.topStyle.top=a+\"px\",this.topStyle.left=c+\"px\",this.topStyle.width=p+\"px\",this.topStyle.display=\"block\"),x?this.leftStyle.display=\"none\":(this.leftStyle.top=a+\"px\",this.leftStyle.left=c+\"px\",this.leftStyle.height=u+\"px\",this.leftStyle.display=\"block\");var T=Math.floor(this.settings.border.width/2);k?this.bottomStyle.display=\"none\":(this.bottomStyle.top=a+u-T+\"px\",this.bottomStyle.left=c+\"px\",this.bottomStyle.width=p+\"px\",this.bottomStyle.display=\"block\"),C?this.rightStyle.display=\"none\":(this.rightStyle.top=a+\"px\",this.rightStyle.left=c+p-T+\"px\",this.rightStyle.height=u+1+\"px\",this.rightStyle.display=\"block\"),k||C||!this.hasSetting(this.settings.border.cornerVisible)?this.cornerStyle.display=\"none\":(this.cornerStyle.top=a+u-4+\"px\",this.cornerStyle.left=c+p-4+\"px\",this.cornerStyle.display=\"block\")}},u.prototype.disappear=function(){this.topStyle.display=\"none\",this.leftStyle.display=\"none\",this.bottomStyle.display=\"none\",this.rightStyle.display=\"none\",this.cornerStyle.display=\"none\"},u.prototype.hasSetting=function(t){return\"function\"==typeof t?t():!!t},p.prototype.source=function(t){return t},p.prototype.offsetted=function(t){return t+this.offset},p.prototype.unOffsetted=function(t){return t-this.offset},p.prototype.fixed=function(t){return t<this.fixedCount?t-this.offset:t},p.prototype.unFixed=function(t){return t<this.fixedCount?t+this.offset:t},p.prototype.visibleToSource=function(t){return this.source(this.offsetted(this.fixed(t)))},p.prototype.sourceToVisible=function(t){return this.source(this.unOffsetted(this.unFixed(t)))},d.prototype.getSize=function(t){return this.cellSizes[t]},d.prototype.getContainerSize=function(t){return\"function\"==typeof this.containerSizeFn?this.containerSizeFn(t):this.containerSizeFn},d.prototype.countVisible=function(){return this.cellCount},d.prototype.isLastIncomplete=function(){if(this.instance.getSetting(\"nativeScrollbars\")){var t=this.instance.cloneFrom?this.instance.cloneFrom.wtScrollbars.vertical:this.instance.wtScrollbars.vertical;return this.remainingSize>t.sumCellSizes(t.offset,t.offset+t.curOuts+1)}return this.remainingSize>0},f.prototype.add=function(t,e,n){this.cache[t]||(this.cache[t]=[]),this.cache[t][e]||(this.cache[t][e]=[]),this.cache[t][e][n]=!0},f.prototype.test=function(t,e,n){return this.cache[t]&&this.cache[t][e]&&this.cache[t][e][n]},_.prototype=new p,_.prototype.readSettings=function(t){this.offset=t.wtSettings.settings.offsetColumn,this.total=t.getSetting(\"totalColumns\"),this.fixedCount=t.getSetting(\"fixedColumnsLeft\"),this.countTH=t.getSetting(\"rowHeaders\").length},_.prototype.offsettedTH=function(t){return t-this.countTH},_.prototype.unOffsettedTH=function(t){return t+this.countTH},_.prototype.visibleRowHeadedColumnToSourceColumn=function(t){return this.visibleToSource(this.offsettedTH(t))},_.prototype.sourceColumnToVisibleRowHeadedColumn=function(t){return this.unOffsettedTH(this.sourceToVisible(t))},g.prototype=new d,g.prototype.getSize=function(t){return this.cellSizes[t]+(this.cellStretch[t]||0)},g.prototype.stretch=function(){var t=this.getContainerSize(this.cellSizesSum),e=0;if(this.remainingSize=this.cellSizesSum-t,this.cellStretch.length=0,\"all\"===this.strategy){if(this.remainingSize<0){for(var n,i=t/this.cellSizesSum;e<this.cellCount-1;)n=Math.floor(i*this.cellSizes[e]),this.remainingSize+=n-this.cellSizes[e],this.cellStretch[e]=n-this.cellSizes[e],e++;this.cellStretch[this.cellCount-1]=-this.remainingSize,this.remainingSize=0}}else\"last\"===this.strategy&&this.remainingSize<0&&1/0!==t&&(this.cellStretch[this.cellCount-1]=-this.remainingSize,this.remainingSize=0)},m.prototype.draw=function(t){return this.drawInterrupted=!1,t||this.wtDom.isVisible(this.wtTable.TABLE)?(this.getSetting(\"beforeDraw\",!t),t=t&&this.getSetting(\"offsetRow\")===this.lastOffsetRow&&this.getSetting(\"offsetColumn\")===this.lastOffsetColumn,this.drawn&&(this.scrollVertical(0),this.scrollHorizontal(0)),this.lastOffsetRow=this.getSetting(\"offsetRow\"),this.lastOffsetColumn=this.getSetting(\"offsetColumn\"),this.wtTable.draw(t),this.cloneSource||this.getSetting(\"onDraw\",!t),this):void(this.drawInterrupted=!0)},m.prototype.update=function(t,e){return this.wtSettings.update(t,e)},m.prototype.scrollVertical=function(t){var e=this.wtScroll.scrollVertical(t);return this.getSetting(\"onScrollVertically\"),e},m.prototype.scrollHorizontal=function(t){var e=this.wtScroll.scrollHorizontal(t);return this.getSetting(\"onScrollHorizontally\"),e},m.prototype.scrollViewport=function(t){return this.wtScroll.scrollViewport(t),this},m.prototype.getViewport=function(){return[this.wtTable.rowFilter.visibleToSource(0),this.wtTable.columnFilter.visibleToSource(0),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]},m.prototype.getSetting=function(t,e,n,i){return this.wtSettings.getSetting(t,e,n,i)},m.prototype.hasSetting=function(t){return this.wtSettings.has(t)},m.prototype.destroy=function(){t(document.body).off(\".\"+this.guid),this.wtScrollbars.destroy(),clearTimeout(this.wheelTimeout),this.wtEvent&&this.wtEvent.destroy()},v.prototype=new h,v.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode,e=this.instance.wtTable.holder.getBoundingClientRect();t.style.top=Math.ceil(e.top,10)+\"px\",t.style.left=Math.ceil(e.left,10)+\"px\"}},v.prototype.prepare=function(){},v.prototype.refresh=function(t){this.clone&&this.clone.draw(t)},v.prototype.getScrollPosition=function(){},v.prototype.getLastCell=function(){},v.prototype.applyToDOM=function(){},v.prototype.scrollTo=function(){},v.prototype.readWindowSize=function(){},v.prototype.readSettings=function(){},y.prototype.closest=function(t,e,n){for(;null!=t&&t!==n;){if(1===t.nodeType&&e.indexOf(t.nodeName)>-1)return t;t=t.parentNode}return null},y.prototype.isChildOf=function(t,e){for(var n=t.parentNode;null!=n;){if(n==e)return!0;n=n.parentNode}return!1},y.prototype.index=function(t){for(var e=0;t=t.previousSibling;)++e;return e},document.documentElement.classList?(y.prototype.hasClass=function(t,e){return t.classList.contains(e)},y.prototype.addClass=function(t,e){t.classList.add(e)},y.prototype.removeClass=function(t,e){t.classList.remove(e)}):(y.prototype.hasClass=function(t,e){return t.className.match(new RegExp(\"(\\\\s|^)\"+e+\"(\\\\s|$)\"))},y.prototype.addClass=function(t,e){this.hasClass(t,e)||(t.className+=\" \"+e)},y.prototype.removeClass=function(t,e){if(this.hasClass(t,e)){var n=new RegExp(\"(\\\\s|^)\"+e+\"(\\\\s|$)\");t.className=t.className.replace(n,\" \").trim()}}),y.prototype.removeTextNodes=function(t,e){if(3===t.nodeType)e.removeChild(t);else if([\"TABLE\",\"THEAD\",\"TBODY\",\"TFOOT\",\"TR\"].indexOf(t.nodeName)>-1)for(var n=t.childNodes,i=n.length-1;i>=0;i--)this.removeTextNodes(n[i],t)},y.prototype.empty=function(t){for(var e;e=t.lastChild;)t.removeChild(e)},y.prototype.HTML_CHARACTERS=/(<(.*)>|&(.*);)/,y.prototype.fastInnerHTML=function(t,e){this.HTML_CHARACTERS.test(e)?t.innerHTML=e:this.fastInnerText(t,e)},y.prototype.fastInnerText=document.createTextNode(\"test\").textContent?function(t,e){var n=t.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.textContent=e:(this.empty(t),t.appendChild(document.createTextNode(e)))}:function(t,e){var n=t.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.data=e:(this.empty(t),t.appendChild(document.createTextNode(e)))},y.prototype.isVisible=function(t){for(var e=t;e!==document.documentElement;){if(null===e)return!1;if(11===e.nodeType){if(e.host){if(e.host.impl)return y.prototype.isVisible(e.host.impl);if(e.host)return y.prototype.isVisible(e.host);throw new Error(\"Lost in Web Components world\")}return!1}if(\"none\"===e.style.display)return!1;e=e.parentNode}return!0},y.prototype.offset=function(t){if(this.hasCaptionProblem()&&t.firstChild&&\"CAPTION\"===t.firstChild.nodeName){var n=t.getBoundingClientRect();return{top:n.top+(e.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0),left:n.left+(e.pageXOffset||document.documentElement.scrollLeft)-(document.documentElement.clientLeft||0)}}for(var i=t.offsetLeft,r=t.offsetTop,o=t;(t=t.offsetParent)&&t!==document.body;)i+=t.offsetLeft,r+=t.offsetTop,o=t;return o&&\"fixed\"===o.style.position&&(i+=e.pageXOffset||document.documentElement.scrollLeft,r+=e.pageYOffset||document.documentElement.scrollTop),{left:i,top:r}},y.prototype.getComputedStyle=function(t){return t.currentStyle||document.defaultView.getComputedStyle(t)},y.prototype.outerWidth=function(t){return t.offsetWidth},y.prototype.outerHeight=function(t){return this.hasCaptionProblem()&&t.firstChild&&\"CAPTION\"===t.firstChild.nodeName?t.offsetHeight+t.firstChild.offsetHeight:t.offsetHeight},function(){function t(){var t=document.createElement(\"TABLE\");t.style.borderSpacing=0,t.style.borderWidth=0,t.style.padding=0;var e=document.createElement(\"TBODY\");t.appendChild(e),e.appendChild(document.createElement(\"TR\")),e.firstChild.appendChild(document.createElement(\"TD\")),e.firstChild.firstChild.innerHTML=\"<tr><td>t<br>t</td></tr>\";var i=document.createElement(\"CAPTION\");i.innerHTML=\"c<br>c<br>c<br>c\",i.style.padding=0,i.style.margin=0,t.insertBefore(i,e),document.body.appendChild(t),n=t.offsetHeight<2*t.lastChild.offsetHeight,document.body.removeChild(t)}function e(){var t=document.createElement(\"p\");t.style.width=\"100%\",t.style.height=\"200px\";var e=document.createElement(\"div\");e.style.position=\"absolute\",e.style.top=\"0px\",e.style.left=\"0px\",e.style.visibility=\"hidden\",e.style.width=\"200px\",e.style.height=\"150px\",e.style.overflow=\"hidden\",e.appendChild(t),(document.body||document.documentElement).appendChild(e);var n=t.offsetWidth;e.style.overflow=\"scroll\";var i=t.offsetWidth;return n==i&&(i=e.clientWidth),(document.body||document.documentElement).removeChild(e),n-i}var n;y.prototype.hasCaptionProblem=function(){return void 0===n&&t(),n},y.prototype.getCaretPosition=function(t){if(t.selectionStart)return t.selectionStart;if(document.selection){t.focus();var e=document.selection.createRange();if(null==e)return 0;var n=t.createTextRange(),i=n.duplicate();return n.moveToBookmark(e.getBookmark()),i.setEndPoint(\"EndToStart\",n),i.text.length}return 0},y.prototype.setCaretPosition=function(t,e,n){if(void 0===n&&(n=e),t.setSelectionRange)t.focus(),t.setSelectionRange(e,n);else if(t.createTextRange){var i=t.createTextRange();i.collapse(!0),i.moveEnd(\"character\",n),i.moveStart(\"character\",e),i.select()}};var i;y.prototype.getScrollbarWidth=function(){return void 0===i&&(i=e()),i}}(),b.prototype.parentCell=function(t){var e={},n=this.instance.wtTable.TABLE,i=this.wtDom.closest(t,[\"TD\",\"TH\"],n);return i&&this.wtDom.isChildOf(i,n)?(e.coords=this.instance.wtTable.getCoords(i),e.TD=i):this.wtDom.hasClass(t,\"wtBorder\")&&this.wtDom.hasClass(t,\"current\")&&(e.coords=this.instance.selections.current.selected[0],e.TD=this.instance.wtTable.getCell(e.coords)),e},b.prototype.destroy=function(){clearTimeout(this.dblClickTimeout0),clearTimeout(this.dblClickTimeout1)},e.requestAnimFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return e.setTimeout(t,1e3/60)}}(),e.cancelRequestAnimFrame=function(){return e.cancelAnimationFrame||e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}(),e.getComputedStyle||!function(){var t,n={getPropertyValue:function(e){return\"float\"==e&&(e=\"styleFloat\"),t.currentStyle[e.toUpperCase()]||null}};e.getComputedStyle=function(e){return t=e,n}}(),!String.prototype.trim){var q=/^\\s+|\\s+$/g;String.prototype.trim=function(){return this.replace(q,\"\")}}x.prototype=new p,x.prototype.readSettings=function(t){this.offset=t.cloneOverlay instanceof v?0:t.wtSettings.settings.offsetRow,this.total=t.getSetting(\"totalRows\"),this.fixedCount=t.getSetting(\"fixedRowsTop\")},k.prototype=new d,k.prototype.add=function(t,e,n){if(!this.isLastIncomplete()&&0!=this.remainingSize){var i=this.sizeAtIndex(t,e);if(void 0===i)return!1;var r=this.getContainerSize(this.cellSizesSum+i);return n?this.cellSizes.unshift(i):this.cellSizes.push(i),this.cellSizesSum+=i,this.cellCount++,this.remainingSize=this.cellSizesSum-r,n&&this.isLastIncomplete()?!1:!0}return!1},k.prototype.remove=function(){var t=this.cellSizes.pop();this.cellSizesSum-=t,this.cellCount--,this.remainingSize-=t},k.prototype.removeOutstanding=function(){for(;this.cellCount>0&&this.cellSizes[this.cellCount-1]<this.remainingSize;)this.remove()},C.prototype.scrollVertical=function(t){if(!this.instance.drawn)throw new Error(\"scrollVertical can only be called after table was drawn to DOM\");var e,n=this.instance,i=n.getSetting(\"offsetRow\"),r=n.getSetting(\"fixedRowsTop\"),o=n.getSetting(\"totalRows\"),s=n.wtViewport.getViewportHeight();return e=o>0?this.scrollLogicVertical(t,i,o,r,s,function(t){return r>t-i&&t-i>=0?n.getSetting(\"rowHeight\",t-i):n.getSetting(\"rowHeight\",t)},function(t){n.wtTable.verticalRenderReverse=t}):0,e!==i&&this.instance.wtScrollbars.vertical.scrollTo(e),n},C.prototype.scrollHorizontal=function(t){if(!this.instance.drawn)throw new Error(\"scrollHorizontal can only be called after table was drawn to DOM\");var e,n=this.instance,i=n.getSetting(\"offsetColumn\"),r=n.getSetting(\"fixedColumnsLeft\"),o=n.getSetting(\"totalColumns\"),s=n.wtViewport.getViewportWidth();return e=o>0?this.scrollLogicHorizontal(t,i,o,r,s,function(t){return r>t-i&&t-i>=0?n.getSetting(\"columnWidth\",t-i):n.getSetting(\"columnWidth\",t)}):0,e!==i&&this.instance.wtScrollbars.horizontal.scrollTo(e),n},C.prototype.scrollLogicVertical=function(t,e,n,i,r,o,s){var a=e+t;return a>=n-i&&(a=n-i-1,s(!0)),0>a&&(a=0),a},C.prototype.scrollLogicHorizontal=function(t,e,n,i,r,o){var s,a=e+t,l=0;if(a>i){for(a>=n-i&&(a=n-i-1),s=a;r>l&&n>s;)l+=o(s),s++;if(r>l)for(;a>0&&(l+=o(a-1),r>l);)a--}else 0>a&&(a=0);return a},C.prototype.scrollViewport=function(t){if(this.instance.drawn){var n=this.instance.getSetting(\"offsetRow\"),i=(this.instance.getSetting(\"offsetColumn\"),this.instance.wtTable.getLastVisibleRow()),r=this.instance.getSetting(\"totalRows\"),o=this.instance.getSetting(\"totalColumns\"),s=this.instance.getSetting(\"fixedRowsTop\"),a=this.instance.getSetting(\"fixedColumnsLeft\");if(this.instance.getSetting(\"nativeScrollbars\")){var l=this.instance.wtTable.getCell(t);if(\"object\"==typeof l){var c=y.prototype.offset(l),h=y.prototype.outerWidth(l),u=y.prototype.outerHeight(l),p=this.instance.wtScrollbars.horizontal.getScrollPosition(),d=this.instance.wtScrollbars.vertical.getScrollPosition(),f=y.prototype.outerWidth(this.instance.wtScrollbars.horizontal.scrollHandler),_=y.prototype.outerHeight(this.instance.wtScrollbars.vertical.scrollHandler);return this.instance.wtScrollbars.horizontal.scrollHandler!==e&&(c.left=c.left-y.prototype.offset(this.instance.wtScrollbars.horizontal.scrollHandler).left),this.instance.wtScrollbars.vertical.scrollHandler!==e&&(c.top=c.top-y.prototype.offset(this.instance.wtScrollbars.vertical.scrollHandler).top),f-=20,_-=20,f>h&&(c.left<p?this.instance.wtScrollbars.horizontal.setScrollPosition(c.left):c.left+h>p+f&&this.instance.wtScrollbars.horizontal.setScrollPosition(c.left-f+h)),void(_>u&&(c.top<d?this.instance.wtScrollbars.vertical.setScrollPosition(c.top):c.top+u>d+_&&this.instance.wtScrollbars.vertical.setScrollPosition(c.top-_+u)))}}if(t[0]<0||t[0]>r-1)throw new Error(\"row \"+t[0]+\" does not exist\");if(t[1]<0||t[1]>o-1)throw new Error(\"column \"+t[1]+\" does not exist\");if(t[0]>i?(this.scrollVertical(t[0]-s-n),this.instance.wtTable.verticalRenderReverse=!0):t[0]===i&&this.instance.wtTable.rowStrategy.isLastIncomplete()?(this.scrollVertical(t[0]-s-n),this.instance.wtTable.verticalRenderReverse=!0):this.scrollVertical(t[0]-s<n?t[0]-s-n:0),this.instance.wtTable.isColumnBeforeViewport(t[1]))this.instance.wtScrollbars.horizontal.scrollTo(t[1]-a);else if(this.instance.wtTable.isColumnAfterViewport(t[1])||this.instance.wtTable.getLastVisibleColumn()===t[1]&&!this.instance.wtTable.isLastColumnFullyVisible()){for(var g=0,m=0;a>m;m++)g+=this.instance.getSetting(\"columnWidth\",m);var v=t[1];g+=this.instance.getSetting(\"columnWidth\",v);var b=this.instance.wtViewport.getViewportWidth();if(b>g)for(var w=this.instance.getSetting(\"columnWidth\",v-1);b>=g+w&&v>=a;)v--,g+=w,w=this.instance.getSetting(\"columnWidth\",v-1);this.instance.wtScrollbars.horizontal.scrollTo(v-a)}return this.instance}},S.prototype.init=function(){var e=this;this.$table=t(this.instance.wtTable.TABLE),this.slider=document.createElement(\"DIV\"),this.sliderStyle=this.slider.style,this.sliderStyle.position=\"absolute\",this.sliderStyle.top=\"0\",this.sliderStyle.left=\"0\",this.sliderStyle.display=\"none\",this.slider.className=\"dragdealer \"+this.type,this.handle=document.createElement(\"DIV\"),this.handleStyle=this.handle.style,this.handle.className=\"handle\",this.slider.appendChild(this.handle),this.container=this.instance.wtTable.holder,this.container.appendChild(this.slider);var n=!0;this.dragTimeout=null;var i,r=function(){e.onScroll(i)};this.dragdealer=new Q(this.slider,{vertical:\"vertical\"===this.type,horizontal:\"horizontal\"===this.type,slide:!1,speed:100,animationCallback:function(t,o){return n?void(n=!1):(e.skipRefresh=!0,i=\"vertical\"===e.type?o:t,void(null===e.dragTimeout&&(e.dragTimeout=setInterval(r,100),r())))},callback:function(t,n){e.skipRefresh=!1,clearInterval(e.dragTimeout),e.dragTimeout=null,i=\"vertical\"===e.type?n:t,e.onScroll(i)}}),this.skipRefresh=!1},S.prototype.onScroll=function(t){if(this.instance.drawn&&(this.readSettings(),this.total>this.visibleCount)){var e=Math.round(this.handlePosition*this.total/this.sliderSize);1===t?\"vertical\"===this.type?this.instance.scrollVertical(1/0).draw():this.instance.scrollHorizontal(1/0).draw():e!==this.offset?\"vertical\"===this.type?this.instance.scrollVertical(e-this.offset).draw():this.instance.scrollHorizontal(e-this.offset).draw():this.refresh()}},S.prototype.getHandleSizeRatio=function(t,e){return!e||t>e||t==e?1:1/e},S.prototype.prepare=function(){if(!this.skipRefresh){var t=this.getHandleSizeRatio(this.visibleCount,this.total);this.visible=(1===t||isNaN(t))&&\"auto\"===this.scrollMode||\"none\"===this.scrollMode?!1:!0}},S.prototype.refresh=function(){if(!this.skipRefresh){if(!this.visible)return void(this.sliderStyle.display=\"none\");var t,e,n,i,r=this.visibleCount,o=this.instance.wtViewport.getWorkspaceWidth(),s=this.instance.wtViewport.getWorkspaceHeight();1/0===o&&(o=this.instance.wtViewport.getWorkspaceActualWidth()),1/0===s&&(s=this.instance.wtViewport.getWorkspaceActualHeight()),\"vertical\"===this.type?(this.instance.wtTable.rowStrategy.isLastIncomplete()&&r--,e=s-2,this.sliderStyle.top=this.instance.wtDom.offset(this.$table[0]).top-this.instance.wtDom.offset(this.container).top+\"px\",this.sliderStyle.left=o-1+\"px\",this.sliderStyle.height=Math.max(e,0)+\"px\"):(e=o-2,this.sliderStyle.left=this.instance.wtDom.offset(this.$table[0]).left-this.instance.wtDom.offset(this.container).left+\"px\",this.sliderStyle.top=s-1+\"px\",this.sliderStyle.width=Math.max(e,0)+\"px\"),t=this.getHandleSizeRatio(r,this.total),n=Math.round(e*t),10>n&&(n=15),i=Math.floor(e*(this.offset/this.total)),n+i>e&&(i=e-n),\"vertical\"===this.type?(this.handleStyle.height=n+\"px\",this.handleStyle.top=i+\"px\"):(this.handleStyle.width=n+\"px\",this.handleStyle.left=i+\"px\"),this.sliderStyle.display=\"block\"}},S.prototype.destroy=function(){clearInterval(this.dragdealer.interval)};var U=function(t){this.instance=t,this.type=\"vertical\",this.init()};U.prototype=new S,U.prototype.scrollTo=function(t){this.instance.update(\"offsetRow\",t)},U.prototype.readSettings=function(){this.scrollMode=this.instance.getSetting(\"scrollV\"),this.offset=this.instance.getSetting(\"offsetRow\"),this.total=this.instance.getSetting(\"totalRows\"),this.visibleCount=this.instance.wtTable.rowStrategy.countVisible(),this.visibleCount>1&&this.instance.wtTable.rowStrategy.isLastIncomplete()&&this.visibleCount--,this.handlePosition=parseInt(this.handleStyle.top,10),this.sliderSize=parseInt(this.sliderStyle.height,10),this.fixedCount=this.instance.getSetting(\"fixedRowsTop\")};var Y=function(t){this.instance=t,this.type=\"horizontal\",this.init()};Y.prototype=new S,Y.prototype.scrollTo=function(t){this.instance.update(\"offsetColumn\",t)},Y.prototype.readSettings=function(){this.scrollMode=this.instance.getSetting(\"scrollH\"),this.offset=this.instance.getSetting(\"offsetColumn\"),this.total=this.instance.getSetting(\"totalColumns\"),this.visibleCount=this.instance.wtTable.columnStrategy.countVisible(),this.visibleCount>1&&this.instance.wtTable.columnStrategy.isLastIncomplete()&&this.visibleCount--,this.handlePosition=parseInt(this.handleStyle.left,10),this.sliderSize=parseInt(this.sliderStyle.width,10),this.fixedCount=this.instance.getSetting(\"fixedColumnsLeft\")},Y.prototype.getHandleSizeRatio=function(t,e){return!e||t>e||t==e?1:t/e},T.prototype=new h,T.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t,n=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===e){t=this.instance.wtTable.hider.getBoundingClientRect();var i=Math.ceil(t.top,10),r=Math.ceil(t.bottom,10);n.style.top=0>i&&r>0?\"0\":i+\"px\";var o=Math.ceil(t.left,10),s=Math.ceil(t.right,10);n.style.left=0>o&&s>0?\"0\":o+\"px\"}else t=this.scrollHandler.getBoundingClientRect(),n.style.top=Math.ceil(t.top,10)+\"px\",n.style.left=Math.ceil(t.left,10)+\"px\";n.style.width=y.prototype.outerWidth(this.clone.wtTable.TABLE)+4+\"px\",n.style.height=y.prototype.outerHeight(this.clone.wtTable.TABLE)+4+\"px\"}},T.prototype.prepare=function(){},T.prototype.refresh=function(t){this.measureBefore=0,this.measureAfter=0,this.clone&&this.clone.draw(t)},T.prototype.getScrollPosition=function(){},T.prototype.getLastCell=function(){},T.prototype.applyToDOM=function(){},T.prototype.scrollTo=function(){},T.prototype.readWindowSize=function(){},T.prototype.readSettings=function(){},A.prototype=new h,A.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t,n=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===e){t=this.instance.wtTable.hider.getBoundingClientRect();var i=Math.ceil(t.left,10),r=Math.ceil(t.right,10);n.style.left=0>i&&r>0?\"0\":i+\"px\"}else t=this.scrollHandler.getBoundingClientRect(),n.style.top=Math.ceil(t.top,10)+\"px\",n.style.left=Math.ceil(t.left,10)+\"px\"}},A.prototype.react=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode;if(this.instance.wtScrollbars.vertical.scrollHandler===e){var n=this.instance.wtTable.hider.getBoundingClientRect();t.style.top=Math.ceil(n.top,10)+\"px\",t.style.height=y.prototype.outerHeight(this.clone.wtTable.TABLE)+\"px\"}else this.clone.wtTable.holder.style.top=-(this.instance.wtScrollbars.vertical.windowScrollPosition-this.instance.wtScrollbars.vertical.measureBefore)+\"px\",t.style.height=this.instance.wtViewport.getWorkspaceHeight()+\"px\";t.style.width=y.prototype.outerWidth(this.clone.wtTable.TABLE)+4+\"px\"}},A.prototype.prepare=function(){},A.prototype.refresh=function(t){this.measureBefore=0,this.measureAfter=0,this.clone&&this.clone.draw(t)},A.prototype.getScrollPosition=function(){return this.scrollHandler===e?this.scrollHandler.scrollX:this.scrollHandler.scrollLeft},A.prototype.setScrollPosition=function(t){this.scrollHandler.scrollLeft=t},A.prototype.onScroll=function(){h.prototype.onScroll.apply(this,arguments),this.instance.getSetting(\"onScrollHorizontally\")},A.prototype.getLastCell=function(){return this.instance.wtTable.getLastVisibleColumn()},A.prototype.applyToDOM=function(){this.fixedContainer.style.paddingLeft=this.measureBefore+\"px\",this.fixedContainer.style.paddingRight=this.measureAfter+\"px\"},A.prototype.scrollTo=function(t){this.$scrollHandler.scrollLeft(this.tableParentOffset+t*this.cellSize)},A.prototype.readWindowSize=function(){this.scrollHandler===e?(this.windowSize=document.documentElement.clientWidth,this.tableParentOffset=this.instance.wtTable.holderOffset.left):(this.windowSize=y.prototype.outerWidth(this.scrollHandler),this.tableParentOffset=0),this.windowScrollPosition=this.getScrollPosition()},A.prototype.readSettings=function(){this.offset=this.instance.getSetting(\"offsetColumn\"),this.total=this.instance.getSetting(\"totalColumns\")},D.prototype=new h,D.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t,n=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===e){t=this.instance.wtTable.hider.getBoundingClientRect();var i=Math.ceil(t.top,10),r=Math.ceil(t.bottom,10);n.style.top=0>i&&r>0?\"0\":i+\"px\"}else t=this.instance.wtScrollbars.horizontal.scrollHandler.getBoundingClientRect(),n.style.top=Math.ceil(t.top,10)+\"px\",n.style.left=Math.ceil(t.left,10)+\"px\";n.style.width=this.instance.wtScrollbars.horizontal.scrollHandler===e?this.instance.wtViewport.getWorkspaceActualWidth()+\"px\":y.prototype.outerWidth(this.instance.wtTable.holder.parentNode)+\"px\",n.style.height=y.prototype.outerHeight(this.clone.wtTable.TABLE)+4+\"px\"}},D.prototype.react=function(){if(this.instance.wtTable.holder.parentNode&&this.instance.wtScrollbars.horizontal.scrollHandler!==e){var t=this.clone.wtTable.holder.parentNode;t.firstChild.style.left=-this.instance.wtScrollbars.horizontal.windowScrollPosition+\"px\"}},D.prototype.getScrollPosition=function(){return this.scrollHandler===e?this.scrollHandler.scrollY:this.scrollHandler.scrollTop},D.prototype.setScrollPosition=function(t){this.scrollHandler.scrollTop=t},D.prototype.onScroll=function(){h.prototype.onScroll.apply(this,arguments);var t,e=0;if(t=this.windowScrollPosition-this.tableParentOffset,G=0,t>0){for(var n,i=0,r=0;r<this.total&&(n=this.instance.getSetting(\"rowHeight\",r),i+=n,!(i>t));r++);this.offset>0&&(G=i-t),e=r,e=Math.min(e,this.total)}this.curOuts=e>this.maxOuts?this.maxOuts:e,e-=this.curOuts,this.instance.update(\"offsetRow\",e),this.readSettings(),this.instance.draw(),this.instance.getSetting(\"onScrollVertically\")},D.prototype.getLastCell=function(){return this.instance.getSetting(\"offsetRow\")+this.instance.wtTable.tbodyChildrenLength-1};var G=0;D.prototype.sumCellSizes=function(t,e){for(var n=0;e>t;)n+=this.instance.getSetting(\"rowHeight\",t),t++;return n},D.prototype.applyToDOM=function(){var t=this.instance.wtViewport.getColumnHeaderHeight();this.fixedContainer.style.height=t+this.sumCellSizes(0,this.total)+4+\"px\",this.fixed.style.top=this.measureBefore+\"px\",this.fixed.style.bottom=\"\"},D.prototype.scrollTo=function(t){var e=this.tableParentOffset+t*this.cellSize;this.$scrollHandler.scrollTop(e),this.onScroll(e)},D.prototype.readWindowSize=function(){this.scrollHandler===e?(this.windowSize=document.documentElement.clientHeight,this.tableParentOffset=this.instance.wtTable.holderOffset.top):(this.windowSize=this.scrollHandler.clientHeight,this.tableParentOffset=0),this.windowScrollPosition=this.getScrollPosition()},D.prototype.readSettings=function(){this.offset=this.instance.getSetting(\"offsetRow\"),this.total=this.instance.getSetting(\"totalRows\")},M.prototype.registerListeners=function(){function n(){return c.instance.wtTable.holder.parentNode?(c.vertical.windowScrollPosition=c.vertical.getScrollPosition(),c.horizontal.windowScrollPosition=c.horizontal.getScrollPosition(),c.box=c.instance.wtTable.hider.getBoundingClientRect(),c.box.width===a&&c.box.height===l||!c.instance.rowHeightCache||(a=c.box.width,l=c.box.height,c.instance.draw()),void((c.vertical.windowScrollPosition!==i||c.horizontal.windowScrollPosition!==r||c.box.top!==o||c.box.left!==s)&&(c.vertical.onScroll(),c.horizontal.onScroll(),c.vertical.react(),c.horizontal.react(),i=c.vertical.windowScrollPosition,r=c.horizontal.windowScrollPosition,o=c.box.top,s=c.box.left))):void c.destroy()}var i,r,o,s,a,l,c=this,h=t(e);this.vertical.$scrollHandler.on(\"scroll.\"+this.instance.guid,n),this.vertical.scrollHandler!==this.horizontal.scrollHandler&&this.horizontal.$scrollHandler.on(\"scroll.\"+this.instance.guid,n),this.vertical.scrollHandler!==e&&this.horizontal.scrollHandler!==e&&h.on(\"scroll.\"+this.instance.guid,n),h.on(\"load.\"+this.instance.guid,n),h.on(\"resize.\"+this.instance.guid,n),t(document).on(\"ready.\"+this.instance.guid,n),setInterval(n,100)\n",
        "                },M.prototype.destroy=function(){this.vertical&&this.vertical.destroy(),this.horizontal&&this.horizontal.destroy()},M.prototype.refresh=function(t){this.horizontal&&this.horizontal.readSettings(),this.vertical&&this.vertical.readSettings(),this.horizontal&&this.horizontal.prepare(),this.vertical&&this.vertical.prepare(),this.horizontal&&this.horizontal.refresh(t),this.vertical&&this.vertical.refresh(t),this.corner&&this.corner.refresh(t),this.debug&&this.debug.refresh(t)},E.prototype.add=function(t){this.selected.push(t)},E.prototype.clear=function(){this.selected.length=0},E.prototype.getCorners=function(){var t,e,n,i,r,o=this.selected.length;if(o>0&&(t=n=this.selected[0][0],e=i=this.selected[0][1],o>1))for(r=1;o>r;r++)this.selected[r][0]<t?t=this.selected[r][0]:this.selected[r][0]>n&&(n=this.selected[r][0]),this.selected[r][1]<e?e=this.selected[r][1]:this.selected[r][1]>i&&(i=this.selected[r][1]);return[t,e,n,i]},E.prototype.draw=function(){var t,e,n,i,r,o=this.instance.wtTable.rowStrategy.countVisible(),s=this.instance.wtTable.columnStrategy.countVisible();if(this.selected.length){for(t=this.getCorners(),e=0;o>e;e++)for(n=0;s>n;n++)i=this.instance.wtTable.rowFilter.visibleToSource(e),r=this.instance.wtTable.columnFilter.visibleToSource(n),i>=t[0]&&i<=t[2]&&r>=t[1]&&r<=t[3]?this.instance.wtTable.currentCellCache.add(e,n,this.settings.className):i>=t[0]&&i<=t[2]?this.instance.wtTable.currentCellCache.add(e,n,this.settings.highlightRowClassName):r>=t[1]&&r<=t[3]&&this.instance.wtTable.currentCellCache.add(e,n,this.settings.highlightColumnClassName);this.border&&this.border.appear(t)}else this.border&&this.border.disappear()},P.prototype.update=function(t,e){if(void 0===e)for(var n in t)t.hasOwnProperty(n)&&(this.settings[n]=t[n]);else this.settings[t]=e;return this.instance},P.prototype.getSetting=function(t,e,n,i){return this[t]?this[t](e,n,i):this._getSetting(t,e,n,i)},P.prototype._getSetting=function(t,e,n,i){return\"function\"==typeof this.settings[t]?this.settings[t](e,n,i):void 0!==e&&\"[object Array]\"===Object.prototype.toString.call(this.settings[t])?this.settings[t][e]:this.settings[t]},P.prototype.has=function(t){return!!this.settings[t]},P.prototype.rowHeight=function(t,e){if(this.instance.rowHeightCache||(this.instance.rowHeightCache=[]),void 0===this.instance.rowHeightCache[t]){var n=23;return e&&(n=this.instance.wtDom.outerHeight(e),this.instance.rowHeightCache[t]=n),n}return this.instance.rowHeightCache[t]},O.prototype.refreshHiderDimensions=function(){var t=this.instance.wtViewport.getWorkspaceHeight(),e=this.instance.wtViewport.getWorkspaceWidth(),n=this.spreader.style;1/0===t&&1/0===e||this.instance.getSetting(\"nativeScrollbars\")?(n.position=\"relative\",n.width=\"auto\",n.height=\"auto\"):(1/0===t&&(t=this.instance.wtViewport.getWorkspaceActualHeight()),1/0===e&&(e=this.instance.wtViewport.getWorkspaceActualWidth()),this.hiderStyle.overflow=\"hidden\",n.position=\"absolute\",n.top=\"0\",n.left=\"0\",this.instance.getSetting(\"nativeScrollbars\")||(n.height=\"4000px\",n.width=\"4000px\"),0>t&&(t=0),this.hiderStyle.height=t+\"px\",this.hiderStyle.width=e+\"px\")},O.prototype.refreshStretching=function(){if(!this.instance.cloneSource){var t=this.instance,e=t.getSetting(\"stretchH\"),n=t.getSetting(\"totalRows\"),i=t.getSetting(\"totalColumns\"),r=t.getSetting(\"offsetColumn\"),o=function(t){var e=s.instance.wtViewport.getViewportWidth(t);return t>e&&s.instance.getSetting(\"nativeScrollbars\")?1/0:e},s=this,a=function(e){var n=s.columnFilter.visibleToSource(e);return i>n?t.getSetting(\"columnWidth\",n):void 0};\"hybrid\"===e&&(e=r>0?\"last\":\"none\");var l=function(t){return s.instance.getSetting(\"nativeScrollbars\")?s.instance.cloneOverlay instanceof v?1/0:2*s.instance.wtViewport.getViewportHeight(t):s.instance.wtViewport.getViewportHeight(t)},c=function(t,e){if(s.instance.getSetting(\"nativeScrollbars\"))return 20;var i=s.rowFilter.visibleToSource(t);return n>i?s.verticalRenderReverse&&0===t?s.instance.getSetting(\"rowHeight\",i,e)-1:s.instance.getSetting(\"rowHeight\",i,e):void 0};this.columnStrategy=new g(t,o,a,e),this.rowStrategy=new k(t,l,c)}},O.prototype.adjustAvailableNodes=function(){for(var t,e,n,i,r=this.instance.getSetting(\"rowHeaders\"),o=r.length,s=this.instance.getSetting(\"columnHeaders\");this.colgroupChildrenLength<o;)this.COLGROUP.appendChild(document.createElement(\"COL\")),this.colgroupChildrenLength++;for(this.refreshStretching(),t=this.instance.cloneSource&&(this.instance.cloneOverlay instanceof A||this.instance.cloneOverlay instanceof T)?this.instance.getSetting(\"fixedColumnsLeft\"):this.columnStrategy.cellCount;this.colgroupChildrenLength<t+o;)this.COLGROUP.appendChild(document.createElement(\"COL\")),this.colgroupChildrenLength++;for(;this.colgroupChildrenLength>t+o;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.colgroupChildrenLength--;if(e=this.THEAD.firstChild,s.length){for(e||(e=document.createElement(\"TR\"),this.THEAD.appendChild(e)),this.theadChildrenLength=e.childNodes.length;this.theadChildrenLength<t+o;)e.appendChild(document.createElement(\"TH\")),this.theadChildrenLength++;for(;this.theadChildrenLength>t+o;)e.removeChild(e.lastChild),this.theadChildrenLength--}else e&&this.wtDom.empty(e);for(i=0;i<this.colgroupChildrenLength;i++)o>i?this.wtDom.addClass(this.COLGROUP.childNodes[i],\"rowHeader\"):this.wtDom.removeClass(this.COLGROUP.childNodes[i],\"rowHeader\");if(s.length&&(e=this.THEAD.firstChild,o))for(n=e.firstChild,i=0;o>i;i++)r[i](-o+i,n),n=n.nextSibling;for(i=0;t>i;i++)s.length&&s[0](this.columnFilter.visibleToSource(i),e.childNodes[o+i])},O.prototype.adjustColumns=function(t,e){for(var n=t.childNodes.length;e>n;){var i=document.createElement(\"TD\");t.appendChild(i),n++}for(;n>e;)t.removeChild(t.lastChild),n--},O.prototype.draw=function(t){return this.instance.getSetting(\"nativeScrollbars\")&&(this.verticalRenderReverse=!1),this.rowFilter.readSettings(this.instance),this.columnFilter.readSettings(this.instance),t?this.instance.wtScrollbars&&this.instance.wtScrollbars.refresh(!0):(this.instance.getSetting(\"nativeScrollbars\")?this.instance.cloneSource?this.tableOffset=this.instance.cloneSource.wtTable.tableOffset:(this.holderOffset=this.wtDom.offset(this.holder),this.tableOffset=this.wtDom.offset(this.TABLE),this.instance.wtScrollbars.vertical.readWindowSize(),this.instance.wtScrollbars.horizontal.readWindowSize(),this.instance.wtViewport.resetSettings()):(this.tableOffset=this.wtDom.offset(this.TABLE),this.instance.wtViewport.resetSettings()),this._doDraw()),this.refreshPositions(t),t||this.instance.getSetting(\"nativeScrollbars\")&&(this.instance.cloneSource||(this.instance.wtScrollbars.vertical.resetFixedPosition(),this.instance.wtScrollbars.horizontal.resetFixedPosition(),this.instance.wtScrollbars.corner.resetFixedPosition(),this.instance.wtScrollbars.debug&&this.instance.wtScrollbars.debug.resetFixedPosition())),this.instance.drawn=!0,this},O.prototype._doDraw=function(){var t,e,n,i,r,o,s,a,l,c,h=0,u=this.instance.getSetting(\"offsetRow\"),p=this.instance.getSetting(\"totalRows\"),d=this.instance.getSetting(\"totalColumns\"),f=this.instance.getSetting(\"rowHeaders\"),_=f.length,g=!1;this.verticalRenderReverse&&(l=u);var m=!1;if(this.verticalRenderReverse&&(u===p-this.rowFilter.fixedCount-1?m=!0:(this.instance.update(\"offsetRow\",u+1),this.rowFilter.readSettings(this.instance))),this.instance.cloneSource&&(this.columnStrategy=this.instance.cloneSource.wtTable.columnStrategy,this.rowStrategy=this.instance.cloneSource.wtTable.rowStrategy),d>0){t=this.rowFilter.visibleToSource(h);var y,b=this.instance.getSetting(\"fixedRowsTop\");for(this.instance.cloneSource&&(this.instance.cloneOverlay instanceof D||this.instance.cloneOverlay instanceof T?y=b:this.instance.cloneOverlay instanceof A&&(y=this.rowStrategy.countVisible())),this.adjustAvailableNodes(),g=!0,i=this.instance.cloneSource&&(this.instance.cloneOverlay instanceof A||this.instance.cloneOverlay instanceof T)?this.instance.getSetting(\"fixedColumnsLeft\"):this.columnStrategy.cellCount,this.instance.cloneSource||(a=this.instance.wtViewport.getWorkspaceWidth(),this.columnStrategy.stretch()),e=0;i>e;e++)this.COLGROUP.childNodes[e+_].style.width=this.columnStrategy.getSize(e)+\"px\";for(;p>t&&t>=0;){if(h>1e3)throw new Error(\"Security brake: Too much TRs. Please define height for your table, which will enforce scrollbars.\");if(void 0!==y&&h===y)break;if(h>=this.tbodyChildrenLength||this.verticalRenderReverse&&h>=this.rowFilter.fixedCount){for(r=document.createElement(\"TR\"),e=0;_>e;e++)r.appendChild(document.createElement(\"TH\"));this.verticalRenderReverse&&h>=this.rowFilter.fixedCount?this.TBODY.insertBefore(r,this.TBODY.childNodes[this.rowFilter.fixedCount]||this.TBODY.firstChild):this.TBODY.appendChild(r),this.tbodyChildrenLength++}else r=0===h?this.TBODY.firstChild:r.nextSibling;for(s=r.firstChild,e=0;_>e;e++)\"TD\"==s.nodeName&&(o=s,s=document.createElement(\"TH\"),r.insertBefore(s,o),r.removeChild(o)),f[e](t,s),s=s.nextSibling;for(this.adjustColumns(r,i+_),e=0;i>e;e++)n=this.columnFilter.visibleToSource(e),o=0===e?r.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)]:o.nextSibling,\"TH\"==o.nodeName&&(s=o,o=document.createElement(\"TD\"),r.insertBefore(o,s),r.removeChild(s)),o.className=\"\",o.removeAttribute(\"style\"),this.instance.getSetting(\"cellRenderer\",t,n,o);if(u=this.instance.getSetting(\"offsetRow\"),this.verticalRenderReverse&&m){if(-this.wtDom.outerHeight(r.firstChild)<this.rowStrategy.remainingSize){this.TBODY.removeChild(r),this.instance.update(\"offsetRow\",u+1),this.tbodyChildrenLength--,this.rowFilter.readSettings(this.instance);break}this.instance.cloneSource||(c=this.rowStrategy.add(h,o,this.verticalRenderReverse),c===!1&&this.rowStrategy.removeOutstanding())}else if(!this.instance.cloneSource&&(c=this.rowStrategy.add(h,o,this.verticalRenderReverse),c===!1&&(this.instance.getSetting(\"nativeScrollbars\")||this.rowStrategy.removeOutstanding()),this.rowStrategy.isLastIncomplete())){if(this.verticalRenderReverse&&!this.isRowInViewport(l))return this.verticalRenderReverse=!1,this.instance.update(\"offsetRow\",l),void this.draw();break}if(this.instance.getSetting(\"nativeScrollbars\")&&(this.instance.cloneSource?r.style.height=this.instance.getSetting(\"rowHeight\",t)+\"px\":this.instance.getSetting(\"rowHeight\",t,o)),this.verticalRenderReverse&&h>=this.rowFilter.fixedCount){if(0===u)break;this.instance.update(\"offsetRow\",u-1),this.rowFilter.readSettings(this.instance)}else h++;t=this.rowFilter.visibleToSource(h)}}if(g||this.adjustAvailableNodes(),!(this.instance.cloneOverlay instanceof v))for(h=this.rowStrategy.countVisible();this.tbodyChildrenLength>h;)this.TBODY.removeChild(this.TBODY.lastChild),this.tbodyChildrenLength--;if(this.instance.wtScrollbars&&this.instance.wtScrollbars.refresh(!1),!this.instance.cloneSource&&a!==this.instance.wtViewport.getWorkspaceWidth())for(this.columnStrategy.stretch(),e=0;e<this.columnStrategy.cellCount;e++)this.COLGROUP.childNodes[e+_].style.width=this.columnStrategy.getSize(e)+\"px\";this.verticalRenderReverse=!1},O.prototype.refreshPositions=function(t){this.refreshHiderDimensions(),this.refreshSelections(t)},O.prototype.refreshSelections=function(t){var e,n,i,r,o,s,a=[],l=this.rowStrategy.countVisible(),c=this.columnStrategy.countVisible();if(this.oldCellCache=this.currentCellCache,this.currentCellCache=new f,this.instance.selections)for(n in this.instance.selections)this.instance.selections.hasOwnProperty(n)&&(this.instance.selections[n].draw(),this.instance.selections[n].settings.className&&a.push(this.instance.selections[n].settings.className),this.instance.selections[n].settings.highlightRowClassName&&a.push(this.instance.selections[n].settings.highlightRowClassName),this.instance.selections[n].settings.highlightColumnClassName&&a.push(this.instance.selections[n].settings.highlightColumnClassName));for(s=a.length,e=0;l>e;e++)for(i=0;c>i;i++)for(n=this.rowFilter.visibleToSource(e),r=this.columnFilter.visibleToSource(i),o=0;s>o;o++)this.currentCellCache.test(e,i,a[o])?this.wtDom.addClass(this.getCell([n,r]),a[o]):t&&this.oldCellCache.test(e,i,a[o])&&this.wtDom.removeClass(this.getCell([n,r]),a[o])},O.prototype.getCell=function(t){return this.isRowBeforeViewport(t[0])?-1:this.isRowAfterViewport(t[0])?-2:this.isColumnBeforeViewport(t[1])?-3:this.isColumnAfterViewport(t[1])?-4:this.TBODY.childNodes[this.rowFilter.sourceToVisible(t[0])].childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(t[1])]},O.prototype.getCoords=function(t){return[this.rowFilter.visibleToSource(this.wtDom.index(t.parentNode)),this.columnFilter.visibleRowHeadedColumnToSourceColumn(t.cellIndex)]},O.prototype.getLastVisibleRow=function(){return this.rowFilter.visibleToSource(this.rowStrategy.cellCount-1)},O.prototype.getLastVisibleColumn=function(){return this.columnFilter.visibleToSource(this.columnStrategy.cellCount-1)},O.prototype.isRowBeforeViewport=function(t){return this.rowFilter.sourceToVisible(t)<this.rowFilter.fixedCount&&t>=this.rowFilter.fixedCount},O.prototype.isRowAfterViewport=function(t){return t>this.getLastVisibleRow()},O.prototype.isColumnBeforeViewport=function(t){return this.columnFilter.sourceToVisible(t)<this.columnFilter.fixedCount&&t>=this.columnFilter.fixedCount},O.prototype.isColumnAfterViewport=function(t){return t>this.getLastVisibleColumn()},O.prototype.isRowInViewport=function(t){return!this.isRowBeforeViewport(t)&&!this.isRowAfterViewport(t)},O.prototype.isColumnInViewport=function(t){return!this.isColumnBeforeViewport(t)&&!this.isColumnAfterViewport(t)},O.prototype.isLastRowFullyVisible=function(){return this.getLastVisibleRow()===this.instance.getSetting(\"totalRows\")-1&&!this.rowStrategy.isLastIncomplete()},O.prototype.isLastColumnFullyVisible=function(){return this.getLastVisibleColumn()===this.instance.getSetting(\"totalColumns\")-1&&!this.columnStrategy.isLastIncomplete()},R.prototype.getWorkspaceHeight=function(t){if(this.instance.getSetting(\"nativeScrollbars\"))return this.instance.wtScrollbars.vertical.windowSize;var e=this.instance.getSetting(\"height\");return(1/0===e||void 0===e||null===e||1>e)&&(e=this.instance.wtScrollbars.vertical instanceof h?this.instance.wtScrollbars.vertical.availableSize():1/0),1/0!==e&&(t>=e?e-=this.instance.getSetting(\"scrollbarHeight\"):this.instance.wtScrollbars.horizontal.visible&&(e-=this.instance.getSetting(\"scrollbarHeight\"))),e},R.prototype.getWorkspaceWidth=function(t){var e=this.instance.getSetting(\"width\");return(1/0===e||void 0===e||null===e||1>e)&&(e=this.instance.wtScrollbars.horizontal instanceof h?this.instance.wtScrollbars.horizontal.availableSize():1/0),1/0!==e&&(t>=e?e-=this.instance.getSetting(\"scrollbarWidth\"):this.instance.wtScrollbars.vertical.visible&&(e-=this.instance.getSetting(\"scrollbarWidth\"))),e},R.prototype.getWorkspaceActualHeight=function(){return this.instance.wtDom.outerHeight(this.instance.wtTable.TABLE)},R.prototype.getWorkspaceActualWidth=function(){return this.instance.wtDom.outerWidth(this.instance.wtTable.TABLE)||this.instance.wtDom.outerWidth(this.instance.wtTable.TBODY)||this.instance.wtDom.outerWidth(this.instance.wtTable.THEAD)},R.prototype.getColumnHeaderHeight=function(){if(isNaN(this.columnHeaderHeight)){var t=this.instance.wtDom.offset(this.instance.wtTable.TBODY),e=this.instance.wtTable.tableOffset;this.columnHeaderHeight=t.top-e.top}return this.columnHeaderHeight},R.prototype.getViewportHeight=function(t){var e=this.getWorkspaceHeight(t);if(1/0===e)return e;var n=this.getColumnHeaderHeight();return n>0?e-n:e},R.prototype.getRowHeaderWidth=function(){if(this.instance.cloneSource)return this.instance.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth)){var t=this.instance.getSetting(\"rowHeaders\");if(t.length){var e=this.instance.wtTable.TABLE.querySelector(\"TH\");this.rowHeaderWidth=0;for(var n=0,i=t.length;i>n;n++)e?(this.rowHeaderWidth+=this.instance.wtDom.outerWidth(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0}return this.rowHeaderWidth},R.prototype.getViewportWidth=function(t){var e=this.getWorkspaceWidth(t);if(1/0===e)return e;var n=this.getRowHeaderWidth();return n>0?e-n:e},R.prototype.resetSettings=function(){this.rowHeaderWidth=0/0,this.columnHeaderHeight=0/0};var X={x:0,y:0,init:function(){this.setEvent(\"mouse\"),this.setEvent(\"touch\")},setEvent:function(t){var e=document[\"on\"+t+\"move\"]||function(){};document[\"on\"+t+\"move\"]=function(t){e(t),X.refresh(t)}},refresh:function(t){t||(t=e.event),\"mousemove\"==t.type?this.set(t):t.touches&&this.set(t.touches[0])},set:function(t){t.pageX||t.pageY?(this.x=t.pageX,this.y=t.pageY):document.body&&(t.clientX||t.clientY)&&(this.x=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.y=t.clientY+document.body.scrollTop+document.documentElement.scrollTop)}};X.init();var K={get:function(t){var e=0,n=0;if(t.offsetParent)do n+=t.offsetLeft,e+=t.offsetTop;while(t=t.offsetParent);return[n,e]}},Q=function(t,e){if(\"string\"==typeof t&&(t=document.getElementById(t)),t){var n=t.getElementsByTagName(\"div\")[0];n&&-1!=n.className.search(/(^|\\s)handle(\\s|$)/)&&(this.init(t,n,e||{}),this.setup())}};Q.prototype={init:function(t,e,n){this.wrapper=t,this.handle=e,this.options=n,this.disabled=this.getOption(\"disabled\",!1),this.horizontal=this.getOption(\"horizontal\",!0),this.vertical=this.getOption(\"vertical\",!1),this.slide=this.getOption(\"slide\",!0),this.steps=this.getOption(\"steps\",0),this.snap=this.getOption(\"snap\",!1),this.loose=this.getOption(\"loose\",!1),this.speed=this.getOption(\"speed\",10)/100,this.xPrecision=this.getOption(\"xPrecision\",0),this.yPrecision=this.getOption(\"yPrecision\",0),this.callback=n.callback||null,this.animationCallback=n.animationCallback||null,this.bounds={left:n.left||0,right:-(n.right||0),top:n.top||0,bottom:-(n.bottom||0),x0:0,x1:0,xRange:0,y0:0,y1:0,yRange:0},this.value={prev:[-1,-1],current:[n.x||0,n.y||0],target:[n.x||0,n.y||0]},this.offset={wrapper:[0,0],mouse:[0,0],prev:[-999999,-999999],current:[0,0],target:[0,0]},this.change=[0,0],this.activity=!1,this.dragging=!1,this.tapping=!1},getOption:function(t,e){return void 0!==this.options[t]?this.options[t]:e},setup:function(){this.setWrapperOffset(),this.setBoundsPadding(),this.setBounds(),this.setSteps(),this.addListeners()},setWrapperOffset:function(){this.offset.wrapper=K.get(this.wrapper)},setBoundsPadding:function(){this.bounds.left||this.bounds.right||(this.bounds.left=K.get(this.handle)[0]-this.offset.wrapper[0],this.bounds.right=-this.bounds.left),this.bounds.top||this.bounds.bottom||(this.bounds.top=K.get(this.handle)[1]-this.offset.wrapper[1],this.bounds.bottom=-this.bounds.top)},setBounds:function(){this.bounds.x0=this.bounds.left,this.bounds.x1=this.wrapper.offsetWidth+this.bounds.right,this.bounds.xRange=this.bounds.x1-this.bounds.x0-this.handle.offsetWidth,this.bounds.y0=this.bounds.top,this.bounds.y1=this.wrapper.offsetHeight+this.bounds.bottom,this.bounds.yRange=this.bounds.y1-this.bounds.y0-this.handle.offsetHeight,this.bounds.xStep=1/(this.xPrecision||Math.max(this.wrapper.offsetWidth,this.handle.offsetWidth)),this.bounds.yStep=1/(this.yPrecision||Math.max(this.wrapper.offsetHeight,this.handle.offsetHeight))},setSteps:function(){if(this.steps>1){this.stepRatios=[];for(var t=0;t<=this.steps-1;t++)this.stepRatios[t]=t/(this.steps-1)}},addListeners:function(){var t=this;this.wrapper.onselectstart=function(){return!1},this.handle.onmousedown=this.handle.ontouchstart=function(e){t.handleDownHandler(e)},this.wrapper.onmousedown=this.wrapper.ontouchstart=function(e){t.wrapperDownHandler(e)};var n=document.onmouseup||function(){};document.onmouseup=function(e){n(e),t.documentUpHandler(e)};var i=document.ontouchend||function(){};document.ontouchend=function(e){i(e),t.documentUpHandler(e)};var r=e.onresize||function(){};e.onresize=function(e){r(e),t.documentResizeHandler(e)},this.wrapper.onmousemove=function(){t.activity=!0},this.wrapper.onclick=function(){return!t.activity},this.interval=setInterval(function(){t.animate()},25),t.animate(!1,!0)},handleDownHandler:function(t){this.activity=!1,X.refresh(t),this.preventDefaults(t,!0),this.startDrag()},wrapperDownHandler:function(t){X.refresh(t),this.preventDefaults(t,!0),this.startTap()},documentUpHandler:function(){this.stopDrag(),this.stopTap()},documentResizeHandler:function(){this.setWrapperOffset(),this.setBounds(),this.update()},enable:function(){this.disabled=!1,this.handle.className=this.handle.className.replace(/\\s?disabled/g,\"\")},disable:function(){this.disabled=!0,this.handle.className+=\" disabled\"},setStep:function(t,e,n){this.setValue(this.steps&&t>1?(t-1)/(this.steps-1):0,this.steps&&e>1?(e-1)/(this.steps-1):0,n)},setValue:function(t,e,n){this.setTargetValue([t,e||0]),n&&this.groupCopy(this.value.current,this.value.target)},startTap:function(t){this.disabled||(this.tapping=!0,this.setWrapperOffset(),this.setBounds(),void 0===t&&(t=[X.x-this.offset.wrapper[0]-this.handle.offsetWidth/2,X.y-this.offset.wrapper[1]-this.handle.offsetHeight/2]),this.setTargetOffset(t))},stopTap:function(){!this.disabled&&this.tapping&&(this.tapping=!1,this.setTargetValue(this.value.current),this.result())},startDrag:function(){this.disabled||(this.setWrapperOffset(),this.setBounds(),this.offset.mouse=[X.x-K.get(this.handle)[0],X.y-K.get(this.handle)[1]],this.dragging=!0)},stopDrag:function(){if(!this.disabled&&this.dragging){this.dragging=!1;var t=this.groupClone(this.value.current);if(this.slide){var e=this.change;t[0]+=4*e[0],t[1]+=4*e[1]}this.setTargetValue(t),this.result()}},feedback:function(){var t=this.value.current;this.snap&&this.steps>1&&(t=this.getClosestSteps(t)),this.groupCompare(t,this.value.prev)||(\"function\"==typeof this.animationCallback&&this.animationCallback(t[0],t[1]),this.groupCopy(this.value.prev,t))},result:function(){\"function\"==typeof this.callback&&this.callback(this.value.target[0],this.value.target[1])},animate:function(t,e){if(!t||this.dragging){if(this.dragging){var n=this.groupClone(this.value.target),i=[X.x-this.offset.wrapper[0]-this.offset.mouse[0],X.y-this.offset.wrapper[1]-this.offset.mouse[1]];this.setTargetOffset(i,this.loose),this.change=[this.value.target[0]-n[0],this.value.target[1]-n[1]]}(this.dragging||e)&&this.groupCopy(this.value.current,this.value.target),(this.dragging||this.glide()||e)&&(this.update(),this.feedback())}},glide:function(){var t=[this.value.target[0]-this.value.current[0],this.value.target[1]-this.value.current[1]];return t[0]||t[1]?(Math.abs(t[0])>this.bounds.xStep||Math.abs(t[1])>this.bounds.yStep?(this.value.current[0]+=t[0]*this.speed,this.value.current[1]+=t[1]*this.speed):this.groupCopy(this.value.current,this.value.target),!0):!1},update:function(){this.offset.current=this.getOffsetsByRatios(this.snap?this.getClosestSteps(this.value.current):this.value.current),this.show()},show:function(){this.groupCompare(this.offset.current,this.offset.prev)||(this.horizontal&&(this.handle.style.left=String(this.offset.current[0])+\"px\"),this.vertical&&(this.handle.style.top=String(this.offset.current[1])+\"px\"),this.groupCopy(this.offset.prev,this.offset.current))},setTargetValue:function(t,e){var n=e?this.getLooseValue(t):this.getProperValue(t);this.groupCopy(this.value.target,n),this.offset.target=this.getOffsetsByRatios(n)},setTargetOffset:function(t,e){var n=this.getRatiosByOffsets(t),i=e?this.getLooseValue(n):this.getProperValue(n);this.groupCopy(this.value.target,i),this.offset.target=this.getOffsetsByRatios(i)},getLooseValue:function(t){var e=this.getProperValue(t);return[e[0]+(t[0]-e[0])/4,e[1]+(t[1]-e[1])/4]},getProperValue:function(t){var e=this.groupClone(t);return e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0),e[0]=Math.min(e[0],1),e[1]=Math.min(e[1],1),(!this.dragging&&!this.tapping||this.snap)&&this.steps>1&&(e=this.getClosestSteps(e)),e},getRatiosByOffsets:function(t){return[this.getRatioByOffset(t[0],this.bounds.xRange,this.bounds.x0),this.getRatioByOffset(t[1],this.bounds.yRange,this.bounds.y0)]},getRatioByOffset:function(t,e,n){return e?(t-n)/e:0},getOffsetsByRatios:function(t){return[this.getOffsetByRatio(t[0],this.bounds.xRange,this.bounds.x0),this.getOffsetByRatio(t[1],this.bounds.yRange,this.bounds.y0)]},getOffsetByRatio:function(t,e,n){return Math.round(t*e)+n},getClosestSteps:function(t){return[this.getClosestStep(t[0]),this.getClosestStep(t[1])]},getClosestStep:function(t){for(var e=0,n=1,i=0;i<=this.steps-1;i++)Math.abs(this.stepRatios[i]-t)<n&&(n=Math.abs(this.stepRatios[i]-t),e=i);return this.stepRatios[e]},groupCompare:function(t,e){return t[0]==e[0]&&t[1]==e[1]},groupCopy:function(t,e){t[0]=e[0],t[1]=e[1]},groupClone:function(t){return[t[0],t[1]]},preventDefaults:function(t,n){t||(t=e.event),t.preventDefault&&t.preventDefault(),t.returnValue=!1,n&&document.selection&&document.selection.empty()},cancelEvent:function(t){t||(t=e.event),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}},function(t){\"function\"==typeof n&&n.amd?n(\"handsontable\",[\"jquery\"],t):\"object\"==typeof exports?module.exports=t:t(jQuery)}(function(t){function n(n){var o,s=n||e.event,a=[].slice.call(arguments,1),l=0,c=0,h=0,u=0,p=0;return n=t.event.fix(s),n.type=\"mousewheel\",s.wheelDelta&&(l=s.wheelDelta),s.detail&&(l=-1*s.detail),s.deltaY&&(h=-1*s.deltaY,l=h),s.deltaX&&(c=s.deltaX,l=-1*c),void 0!==s.wheelDeltaY&&(h=s.wheelDeltaY),void 0!==s.wheelDeltaX&&(c=-1*s.wheelDeltaX),u=Math.abs(l),(!i||i>u)&&(i=u),p=Math.max(Math.abs(h),Math.abs(c)),(!r||r>p)&&(r=p),o=l>0?\"floor\":\"ceil\",l=Math[o](l/i),c=Math[o](c/r),h=Math[o](h/r),a.unshift(n,l,c,h),(t.event.dispatch||t.event.handle).apply(this,a)}var i,r,o=[\"wheel\",\"mousewheel\",\"DOMMouseScroll\",\"MozMousePixelScroll\"],s=\"onwheel\"in document||document.documentMode>=9?[\"wheel\"]:[\"mousewheel\",\"DomMouseScroll\",\"MozMousePixelScroll\"];if(t.event.fixHooks)for(var a=o.length;a;)t.event.fixHooks[o[--a]]=t.event.mouseHooks;t.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var t=s.length;t;)this.addEventListener(s[--t],n,!1);else this.onmousewheel=n},teardown:function(){if(this.removeEventListener)for(var t=s.length;t;)this.removeEventListener(s[--t],n,!1);else this.onmousewheel=null}},t.fn.extend({mousewheel:function(t){return t?this.bind(\"mousewheel\",t):this.trigger(\"mousewheel\")},unmousewheel:function(t){return this.unbind(\"mousewheel\",t)}})})}(jQuery,window,i),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/handson_table\",[\"underscore\",\"jquery\",\"handsontable\",\"backbone\",\"common/has_properties\",\"common/continuum_view\"],function(t,n,i,r,o,s){var a,l,c,h,u,p;return l=function(n){function i(){return h=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,\"change:source\",this.render)},i.prototype.render=function(){var t,e,n,i,r,o,s,a,l,c,h=this;if(o=this.mget_obj(\"source\"),null!=o){for(i=[],e=[],c=this.mget_obj(\"columns\"),a=0,l=c.length;l>a;a++)t=c[a],i.push(t.get(\"header\")),n=t.get(\"data\"),s=t.get(\"type\"),e.push({data:n,type:s});return this.$el.handsontable({data:o.datapoints(),colHeaders:i,columns:e,afterChange:function(t,e){return\"edit\"===e?h.editData(t):void 0}}),r=this.$el.handsontable(\"getInstance\"),r.view.wt.draw(!0)}return this.$el.handsontable()},i.prototype.editData=function(e){var n,i,r,o,s,a,l,c,h,u,p,d,f;for(h=this.mget_obj(\"source\"),o=h.get(\"data\"),u=0,d=e.length;d>u;u++){if(i=e[u],a=i[0],r=i[1],c=i[2],l=i[3],n=t.clone(o[r]),a<n.length)n[a]=l;else{for(s=p=0,f=n.length-a;f>=0?f>p:p>f;s=f>=0?++p:--p)n.push(0/0);n.push(l)}o[r]=n}return h.set(o)},i}(s.View),a=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"HandsonTable\",n.prototype.default_view=l,n.prototype.defaults=function(){return{source:null,columns:[]}},n}(o),c=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(r.Collection),{Model:a,Collection:new c,View:l}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/table_column\",[\"underscore\",\"jquery\",\"backbone\",\"common/has_properties\"],function(t,n,i,r){var o,s,a,l;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"TableColumn\",n.prototype.default_view=null,n.prototype.defaults=function(){return{}},n}(r),s=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(i.Collection),{Model:o,Collection:new s}})}.call(this),n(\"jquery_ui/core\",[\"jquery\"],function(t){!function(t,e){function n(e,n){var r,o,s,a=e.nodeName.toLowerCase();return\"area\"===a?(r=e.parentNode,o=r.name,e.href&&o&&\"map\"===r.nodeName.toLowerCase()?(s=t(\"img[usemap=#\"+o+\"]\")[0],!!s&&i(s)):!1):(/input|select|textarea|button|object/.test(a)?!e.disabled:\"a\"===a?e.href||n:n)&&i(e)}function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return\"hidden\"===t.css(this,\"visibility\")}).length}var r=0,o=/^ui-id-\\d+$/;t.ui=t.ui||{},t.ui.version||(t.extend(t.ui,{version:\"1.10.0\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({_focus:t.fn.focus,focus:function(e,n){return\"number\"==typeof e?this.each(function(){var i=this;setTimeout(function(){t(i).focus(),n&&n.call(i)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css(\"position\"))||/absolute/.test(this.css(\"position\"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,\"position\"))&&/(auto|scroll)/.test(t.css(this,\"overflow\")+t.css(this,\"overflow-y\")+t.css(this,\"overflow-x\"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,\"overflow\")+t.css(this,\"overflow-y\")+t.css(this,\"overflow-x\"))}).eq(0),/fixed/.test(this.css(\"position\"))||!e.length?t(document):e},zIndex:function(n){if(n!==e)return this.css(\"zIndex\",n);if(this.length)for(var i,r,o=t(this[0]);o.length&&o[0]!==document;){if(i=o.css(\"position\"),(\"absolute\"===i||\"relative\"===i||\"fixed\"===i)&&(r=parseInt(o.css(\"zIndex\"),10),!isNaN(r)&&0!==r))return r;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++r)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr(\"id\")})}}),t.extend(t.expr[\":\"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(e){return n(e,!isNaN(t.attr(e,\"tabindex\")))},tabbable:function(e){var i=t.attr(e,\"tabindex\"),r=isNaN(i);return(r||i>=0)&&n(e,!r)}}),t(\"<a>\").outerWidth(1).jquery||t.each([\"Width\",\"Height\"],function(n,i){function r(e,n,i,r){return t.each(o,function(){n-=parseFloat(t.css(e,\"padding\"+this))||0,i&&(n-=parseFloat(t.css(e,\"border\"+this+\"Width\"))||0),r&&(n-=parseFloat(t.css(e,\"margin\"+this))||0)}),n}var o=\"Width\"===i?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],s=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn[\"inner\"+i]=function(n){return n===e?a[\"inner\"+i].call(this):this.each(function(){t(this).css(s,r(this,n)+\"px\")})},t.fn[\"outer\"+i]=function(e,n){return\"number\"!=typeof e?a[\"outer\"+i].call(this,e):this.each(function(){t(this).css(s,r(this,e,!0,n)+\"px\")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t(\"<a>\").data(\"a-b\",\"a\").removeData(\"a-b\").data(\"a-b\")&&(t.fn.removeData=function(e){return function(n){return arguments.length?e.call(this,t.camelCase(n)):e.call(this)\n",
        "                }}(t.fn.removeData)),t.ui.ie=!!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart=\"onselectstart\"in document.createElement(\"div\"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),t.extend(t.ui,{plugin:{add:function(e,n,i){var r,o=t.ui[e].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(t,e,n){var i,r=t.plugins[e];if(r&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(i=0;i<r.length;i++)t.options[r[i][0]]&&r[i][1].apply(t.element,n)}},hasScroll:function(e,n){if(\"hidden\"===t(e).css(\"overflow\"))return!1;var i=n&&\"left\"===n?\"scrollLeft\":\"scrollTop\",r=!1;return e[i]>0?!0:(e[i]=1,r=e[i]>0,e[i]=0,r)}}))}(t)}),n(\"jquery_ui/widget\",[\"jquery\"],function(t){!function(t,e){var n=0,i=Array.prototype.slice,r=t.cleanData;t.cleanData=function(e){for(var n,i=0;null!=(n=e[i]);i++)try{t(n).triggerHandler(\"remove\")}catch(o){}r(e)},t.widget=function(e,n,i){var r,o,s,a,l={},c=e.split(\".\")[0];e=e.split(\".\")[1],r=c+\"-\"+e,i||(i=n,n=t.Widget),t.expr[\":\"][r.toLowerCase()]=function(e){return!!t.data(e,r)},t[c]=t[c]||{},o=t[c][e],s=t[c][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new s(t,e)},t.extend(s,o,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),a=new n,a.options=t.widget.extend({},a.options),t.each(i,function(e,i){return t.isFunction(i)?void(l[e]=function(){var t=function(){return n.prototype[e].apply(this,arguments)},r=function(t){return n.prototype[e].apply(this,t)};return function(){var e,n=this._super,o=this._superApply;return this._super=t,this._superApply=r,e=i.apply(this,arguments),this._super=n,this._superApply=o,e}}()):void(l[e]=i)}),s.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix:e},l,{constructor:s,namespace:c,widgetName:e,widgetFullName:r}),o?(t.each(o._childConstructors,function(e,n){var i=n.prototype;t.widget(i.namespace+\".\"+i.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),t.widget.bridge(e,s)},t.widget.extend=function(n){for(var r,o,s=i.call(arguments,1),a=0,l=s.length;l>a;a++)for(r in s[a])o=s[a][r],s[a].hasOwnProperty(r)&&o!==e&&(n[r]=t.isPlainObject(o)?t.isPlainObject(n[r])?t.widget.extend({},n[r],o):t.widget.extend({},o):o);return n},t.widget.bridge=function(n,r){var o=r.prototype.widgetFullName||n;t.fn[n]=function(s){var a=\"string\"==typeof s,l=i.call(arguments,1),c=this;return s=!a&&l.length?t.widget.extend.apply(null,[s].concat(l)):s,this.each(a?function(){var i,r=t.data(this,o);return r?t.isFunction(r[s])&&\"_\"!==s.charAt(0)?(i=r[s].apply(r,l),i!==r&&i!==e?(c=i&&i.jquery?c.pushStack(i.get()):i,!1):void 0):t.error(\"no such method '\"+s+\"' for \"+n+\" widget instance\"):t.error(\"cannot call methods on \"+n+\" prior to initialization; attempted to call method '\"+s+\"'\")}:function(){var e=t.data(this,o);e?e.option(s||{})._init():t.data(this,o,new r(s,this))}),c}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:\"widget\",widgetEventPrefix:\"\",defaultElement:\"<div>\",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=n++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:t.noop,widget:function(){return this.element},option:function(n,i){var r,o,s,a=n;if(0===arguments.length)return t.widget.extend({},this.options);if(\"string\"==typeof n)if(a={},r=n.split(\".\"),n=r.shift(),r.length){for(o=a[n]=t.widget.extend({},this.options[n]),s=0;s<r.length-1;s++)o[r[s]]=o[r[s]]||{},o=o[r[s]];if(n=r.pop(),i===e)return o[n]===e?null:o[n];o[n]=i}else{if(i===e)return this.options[n]===e?null:this.options[n];a[n]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,\"disabled\"===t&&(this.widget().toggleClass(this.widgetFullName+\"-disabled ui-state-disabled\",!!e).attr(\"aria-disabled\",e),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")),this},enable:function(){return this._setOption(\"disabled\",!1)},disable:function(){return this._setOption(\"disabled\",!0)},_on:function(e,n,i){var r,o=this;\"boolean\"!=typeof e&&(i=n,n=e,e=!1),i?(n=r=t(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),t.each(i,function(i,s){function a(){return e||o.options.disabled!==!0&&!t(this).hasClass(\"ui-state-disabled\")?(\"string\"==typeof s?o[s]:s).apply(o,arguments):void 0}\"string\"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=i.match(/^(\\w+)\\s*(.*)$/),c=l[1]+o.eventNamespace,h=l[2];h?r.delegate(h,c,a):n.bind(c,a)})},_off:function(t,e){e=(e||\"\").split(\" \").join(this.eventNamespace+\" \")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function n(){return(\"string\"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass(\"ui-state-hover\")},mouseleave:function(e){t(e.currentTarget).removeClass(\"ui-state-hover\")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass(\"ui-state-focus\")},focusout:function(e){t(e.currentTarget).removeClass(\"ui-state-focus\")}})},_trigger:function(e,n,i){var r,o,s=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(t.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},t.each({show:\"fadeIn\",hide:\"fadeOut\"},function(e,n){t.Widget.prototype[\"_\"+e]=function(i,r,o){\"string\"==typeof r&&(r={effect:r});var s,a=r?r===!0||\"number\"==typeof r?n:r.effect||n:e;r=r||{},\"number\"==typeof r&&(r={duration:r}),s=!t.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),s&&t.effects&&t.effects.effect[a]?i[e](r):a!==e&&i[a]?i[a](r.duration,r.easing,o):i.queue(function(n){t(this)[e](),o&&o.call(i[0]),n()})}})}(t)}),n(\"jquery_ui/mouse\",[\"jquery\",\"./widget\"],function(t){!function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget(\"ui.mouse\",{version:\"1.10.0\",options:{cancel:\"input,textarea,button,select,option\",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind(\"mousedown.\"+this.widgetName,function(t){return e._mouseDown(t)}).bind(\"click.\"+this.widgetName,function(n){return!0===t.data(n.target,e.widgetName+\".preventClickEvent\")?(t.removeData(n.target,e.widgetName+\".preventClickEvent\"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind(\".\"+this.widgetName),this._mouseMoveDelegate&&t(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!e){this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,r=1===n.which,o=\"string\"==typeof this.options.cancel&&n.target.nodeName?t(n.target).closest(this.options.cancel).length:!1;return r&&!o&&this._mouseCapture(n)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=this._mouseStart(n)!==!1,!this._mouseStarted)?(n.preventDefault(),!0):(!0===t.data(n.target,this.widgetName+\".preventClickEvent\")&&t.removeData(n.target,this.widgetName+\".preventClickEvent\"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},t(document).bind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).bind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),n.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(t)}),n(\"jquery_ui/sortable\",[\"jquery\",\"./core\",\"./mouse\",\"./widget\"],function(t){!function(t){function e(t,e,n){return t>e&&e+n>t}t.widget(\"ui.sortable\",t.ui.mouse,{version:\"1.10.0\",widgetEventPrefix:\"sort\",ready:!1,options:{appendTo:\"parent\",axis:!1,connectWith:!1,containment:!1,cursor:\"auto\",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:\"original\",items:\"> *\",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:\"default\",tolerance:\"intersect\",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass(\"ui-sortable\"),this.refresh(),this.floating=this.items.length?\"x\"===t.axis||/left|right/.test(this.items[0].item.css(\"float\"))||/inline|table-cell/.test(this.items[0].item.css(\"display\")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass(\"ui-sortable ui-sortable-disabled\"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+\"-item\");return this},_setOption:function(e,n){\"disabled\"===e?(this.options[e]=n,this.widget().toggleClass(\"ui-sortable-disabled\",!!n)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,n){var i=null,r=!1,o=this;return this.reverting?!1:this.options.disabled||\"static\"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+\"-item\")===o?(i=t(this),!1):void 0}),t.data(e.target,o.widgetName+\"-item\")===o&&(i=t(e.target)),i?!this.options.handle||n||(t(this.options.handle,i).find(\"*\").addBack().each(function(){this===e.target&&(r=!0)}),r)?(this.currentItem=i,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,n,i){var r,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css(\"position\",\"absolute\"),this.cssPosition=this.helper.css(\"position\"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&(t(\"body\").css(\"cursor\")&&(this._storedCursor=t(\"body\").css(\"cursor\")),t(\"body\").css(\"cursor\",o.cursor)),o.opacity&&(this.helper.css(\"opacity\")&&(this._storedOpacity=this.helper.css(\"opacity\")),this.helper.css(\"opacity\",o.opacity)),o.zIndex&&(this.helper.css(\"zIndex\")&&(this._storedZIndex=this.helper.css(\"zIndex\")),this.helper.css(\"zIndex\",o.zIndex)),this.scrollParent[0]!==document&&\"HTML\"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger(\"start\",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger(\"activate\",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass(\"ui-sortable-helper\"),this._mouseDrag(e),!0},_mouseDrag:function(e){var n,i,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo(\"absolute\"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&\"HTML\"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-t(document).scrollTop()<s.scrollSensitivity?a=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(a=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed)),e.pageX-t(document).scrollLeft()<s.scrollSensitivity?a=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(a=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo(\"absolute\"),this.options.axis&&\"y\"===this.options.axis||(this.helper[0].style.left=this.position.left+\"px\"),this.options.axis&&\"x\"===this.options.axis||(this.helper[0].style.top=this.position.top+\"px\"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],r=i.item[0],o=this._intersectsWithPointer(i),o&&i.instance===this.currentContainer&&r!==this.currentItem[0]&&this.placeholder[1===o?\"next\":\"prev\"]()[0]!==r&&!t.contains(this.placeholder[0],r)&&(\"semi-dynamic\"===this.options.type?!t.contains(this.element[0],r):!0)){if(this.direction=1===o?\"down\":\"up\",\"pointer\"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(e,i),this._trigger(\"change\",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger(\"sort\",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,n){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var i=this,r=this.placeholder.offset();this.reverting=!0,t(this.helper).animate({left:r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft),top:r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){i._clear(e)})}else this._clear(e,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),\"original\"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger(\"deactivate\",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger(\"out\",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),\"original\"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},t(n).each(function(){var n=(t(e.item||this).attr(e.attribute||\"id\")||\"\").match(e.expression||/(.+)[\\-=_](.+)/);n&&i.push((e.key||n[1]+\"[]\")+\"=\"+(e.key&&e.expression?n[1]:n[2]))}),!i.length&&e.key&&i.push(e.key+\"=\"),i.join(\"&\")},toArray:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},n.each(function(){i.push(t(e.item||this).attr(e.attribute||\"id\")||\"\")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,n=e+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=t.left,s=o+t.width,a=t.top,l=a+t.height,c=this.offset.click.top,h=this.offset.click.left,u=i+c>a&&l>i+c&&e+h>o&&s>e+h;return\"pointer\"===this.options.tolerance||this.options.forcePointerForContainers||\"pointer\"!==this.options.tolerance&&this.helperProportions[this.floating?\"width\":\"height\"]>t[this.floating?\"width\":\"height\"]?u:o<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var n=\"x\"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),i=\"y\"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),r=n&&i,o=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return r?this.floating?s&&\"right\"===s||\"down\"===o?2:1:o&&(\"down\"===o?2:1):!1},_intersectsWithSides:function(t){var n=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?\"right\"===o&&i||\"left\"===o&&!i:r&&(\"down\"===r&&n||\"up\"===r&&!n)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?\"down\":\"up\")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?\"right\":\"left\")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var n,i,r,o,s=[],a=[],l=this._connectWith();if(l&&e)for(n=l.length-1;n>=0;n--)for(r=t(l[n]),i=r.length-1;i>=0;i--)o=t.data(r[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&a.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),o]);for(a.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),this]),n=a.length-1;n>=0;n--)a[n][0].each(function(){s.push(this)});return t(s)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(\":data(\"+this.widgetName+\"-item)\");this.items=t.grep(this.items,function(t){for(var n=0;n<e.length;n++)if(e[n]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var n,i,r,o,s,a,l,c,h=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(n=p.length-1;n>=0;n--)for(r=t(p[n]),i=r.length-1;i>=0;i--)o=t.data(r[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(n=u.length-1;n>=0;n--)for(s=u[n][1],a=u[n][0],i=0,c=a.length;c>i;i++)l=t(a[i]),l.data(this.widgetName+\"-item\",s),h.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,r,o;for(n=this.items.length-1;n>=0;n--)i=this.items[n],i.instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?t(this.options.toleranceElement,i.item):i.item,e||(i.width=r.outerWidth(),i.height=r.outerHeight()),o=r.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var n,i=e.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=t(document.createElement(e.currentItem[0].nodeName)).addClass(n||e.currentItem[0].className+\" ui-sortable-placeholder\").removeClass(\"ui-sortable-helper\")[0];return n||(i.style.visibility=\"hidden\"),i},update:function(t,r){(!n||i.forcePlaceholderSize)&&(r.height()||r.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css(\"paddingTop\")||0,10)-parseInt(e.currentItem.css(\"paddingBottom\")||0,10)),r.width()||r.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css(\"paddingLeft\")||0,10)-parseInt(e.currentItem.css(\"paddingRight\")||0,10)))}}),e.placeholder=t(i.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),i.placeholder.update(e,e.placeholder)},_contactContainers:function(e){var n,i,r,o,s,a,l,c,h,u=null,p=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(u&&t.contains(this.containers[n].element[0],u.element[0]))continue;u=this.containers[n],p=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger(\"out\",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(u)if(1===this.containers.length)this.containers[p]._trigger(\"over\",e,this._uiHash(this)),this.containers[p].containerCache.over=1;else{for(r=1e4,o=null,s=this.containers[p].floating?\"left\":\"top\",a=this.containers[p].floating?\"width\":\"height\",l=this.positionAbs[s]+this.offset.click[s],i=this.items.length-1;i>=0;i--)t.contains(this.containers[p].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(c=this.items[i].item.offset()[s],h=!1,Math.abs(c-l)>Math.abs(c+this.items[i][a]-l)&&(h=!0,c+=this.items[i][a]),Math.abs(c-l)<r&&(r=Math.abs(c-l),o=this.items[i],this.direction=h?\"up\":\"down\"));if(!o&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[p],o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger(\"change\",e,this._uiHash()),this.containers[p]._trigger(\"change\",e,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger(\"over\",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e,this.currentItem])):\"clone\"===n.helper?this.currentItem.clone():this.currentItem;return i.parents(\"body\").length||t(\"parent\"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(\"position\"),top:this.currentItem.css(\"top\"),left:this.currentItem.css(\"left\")}),(!i[0].style.width||n.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||n.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){\"string\"==typeof e&&(e=e.split(\" \")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),\"left\"in e&&(this.offset.click.left=e.left+this.margins.left),\"right\"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),\"top\"in e&&(this.offset.click.top=e.top+this.margins.top),\"bottom\"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return\"absolute\"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&\"html\"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css(\"borderTopWidth\"),10)||0),left:e.left+(parseInt(this.offsetParent.css(\"borderLeftWidth\"),10)||0)}},_getRelativeOffset:function(){if(\"relative\"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css(\"top\"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css(\"left\"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css(\"marginLeft\"),10)||0,top:parseInt(this.currentItem.css(\"marginTop\"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,r=this.options;\"parent\"===r.containment&&(r.containment=this.helper[0].parentNode),(\"document\"===r.containment||\"window\"===r.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t(\"document\"===r.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t(\"document\"===r.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=t(r.containment)[0],n=t(r.containment).offset(),i=\"hidden\"!==t(e).css(\"overflow\"),this.containment=[n.left+(parseInt(t(e).css(\"borderLeftWidth\"),10)||0)+(parseInt(t(e).css(\"paddingLeft\"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css(\"borderTopWidth\"),10)||0)+(parseInt(t(e).css(\"paddingTop\"),10)||0)-this.margins.top,n.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css(\"borderLeftWidth\"),10)||0)-(parseInt(t(e).css(\"paddingRight\"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css(\"borderTopWidth\"),10)||0)-(parseInt(t(e).css(\"paddingBottom\"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,n){n||(n=this.position);var i=\"absolute\"===e?1:-1,r=\"absolute\"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i}},_generatePosition:function(e){var n,i,r=this.options,o=e.pageX,s=e.pageY,a=\"absolute\"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return\"relative\"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-r.grid[1]:n+r.grid[1]:n,i=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-r.grid[0]:i+r.grid[0]:i)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,n,i){n?n[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],\"down\"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(e,n){this.reverting=!1;var i,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)(\"auto\"===this._storedCSS[i]||\"static\"===this._storedCSS[i])&&(this._storedCSS[i]=\"\");this.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\")}else this.currentItem.show();for(this.fromOutside&&!n&&r.push(function(t){this._trigger(\"receive\",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(\".ui-sortable-helper\")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||n||r.push(function(t){this._trigger(\"update\",t,this._uiHash())}),this!==this.currentContainer&&(n||(r.push(function(t){this._trigger(\"remove\",t,this._uiHash())}),r.push(function(t){return function(e){t._trigger(\"receive\",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger(\"update\",e,this._uiHash(this))\n",
        "                }}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)n||r.push(function(t){return function(e){t._trigger(\"deactivate\",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(t){return function(e){t._trigger(\"out\",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this._storedCursor&&t(\"body\").css(\"cursor\",this._storedCursor),this._storedOpacity&&this.helper.css(\"opacity\",this._storedOpacity),this._storedZIndex&&this.helper.css(\"zIndex\",\"auto\"===this._storedZIndex?\"\":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!n){for(this._trigger(\"beforeStop\",e,this._uiHash()),i=0;i<r.length;i++)r[i].call(this,e);this._trigger(\"stop\",e,this._uiHash())}return this.fromOutside=!1,!1}if(n||this._trigger(\"beforeStop\",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!n){for(i=0;i<r.length;i++)r[i].call(this,e);this._trigger(\"stop\",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var n=e||this;return{helper:n.helper,placeholder:n.placeholder||t([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:e?e.element:null}}})}(t)}),n(\"bootstrap/dropdown\",[\"jquery\"],function(t){+function(t){function e(e){t(i).remove(),t(r).each(function(){var i=n(t(this)),r={relatedTarget:this};i.hasClass(\"bk-bs-open\")&&(i.trigger(e=t.Event(\"hide.bk-bs.dropdown\",r)),e.isDefaultPrevented()||i.removeClass(\"bk-bs-open\").trigger(\"hidden.bk-bs.dropdown\",r))})}function n(e){var n=e.attr(\"data-bk-bs-target\");n||(n=e.attr(\"href\"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\\s]*$)/,\"\"));var i=n&&t(n);return i&&i.length?i:e.parent()}var i=\".bk-bs-dropdown-backdrop\",r=\"[data-bk-bs-toggle=dropdown]\",o=function(e){t(e).on(\"click.bk-bs.dropdown\",this.toggle)};o.prototype.toggle=function(i){var r=t(this);if(!r.is(\".bk-bs-disabled, :disabled\")){var o=n(r),s=o.hasClass(\"bk-bs-open\");if(e(),!s){\"ontouchstart\"in document.documentElement&&!o.closest(\".bk-bs-navbar-nav\").length&&t('<div class=\"bk-bs-dropdown-backdrop\"/>').insertAfter(t(this)).on(\"click\",e);var a={relatedTarget:this};if(o.trigger(i=t.Event(\"show.bk-bs.dropdown\",a)),i.isDefaultPrevented())return;o.toggleClass(\"bk-bs-open\").trigger(\"shown.bk-bs.dropdown\",a),r.focus()}return!1}},o.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var i=t(this);if(e.preventDefault(),e.stopPropagation(),!i.is(\".bk-bs-disabled, :disabled\")){var o=n(i),s=o.hasClass(\"bk-bs-open\");if(!s||s&&27==e.keyCode)return 27==e.which&&o.find(r).focus(),i.click();var a=\" li:not(.bk-bs-divider):visible a\",l=o.find(\"[role=menu]\"+a+\", [role=listbox]\"+a);if(l.length){var c=l.index(l.filter(\":focus\"));38==e.keyCode&&c>0&&c--,40==e.keyCode&&c<l.length-1&&c++,~c||(c=0),l.eq(c).focus()}}}};var s=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var n=t(this),i=n.data(\"bk-bs.dropdown\");i||n.data(\"bk-bs.dropdown\",i=new o(this)),\"string\"==typeof e&&i[e].call(n)})},t.fn.dropdown.Constructor=o,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on(\"click.bk-bs.dropdown.data-api\",e).on(\"click.bk-bs.dropdown.data-api\",\".bk-bs-dropdown form\",function(t){t.stopPropagation()}).on(\"click.bk-bs.dropdown.data-api\",r,o.prototype.toggle).on(\"keydown.bk-bs.dropdown.data-api\",r+\", [role=menu], [role=listbox]\",o.prototype.keydown)}(t)}),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"widget/pivot_table\",[\"underscore\",\"jquery\",\"jquery_ui/sortable\",\"bootstrap/dropdown\",\"backbone\",\"common/has_parent\",\"common/has_properties\",\"common/continuum_view\"],function(n,r,o,s,a,l,c,h){var u,p,d,f,_,g;return p=function(o){function s(){return this.getAggregator=t(this.getAggregator,this),f=s.__super__.constructor.apply(this,arguments)}return i(s,o),s.prototype.initialize=function(t){return s.__super__.initialize.call(this,t),this.listenTo(this.model,\"destroy\",this.remove),this.listenTo(this.model,\"change\",this.rerenderToolbox),this.listenTo(this.model,\"change:data\",this.rerenderPivotTable),this.render()},s.prototype.mpush=function(t,e){return this.mset(t,this.mget(t).concat([e]))},s.prototype.mupdate=function(t,e){var i;return i=n.map(this.mget(t),function(t){return n.clone(t)}),e(i),this.mset(t,i)},s.prototype.fieldNames=function(){var t,e,n,i,r;for(i=this.mget(\"fields\"),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(t.name);return r},s.prototype.fieldDTypes=function(){var t,e,n,i,r;for(i=this.mget(\"fields\"),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(t.dtype);return r},s.prototype.getDType=function(t){return n.find(this.mget(\"fields\"),function(e){return e.name===t}).dtype},s.prototype.render=function(){var t;return t=r('<table class=\"bk-pivot\"></table>'),this.$description=r('<td class=\"bk-pivot-description\" valign=\"center\"></td>'),this.$toolbox=r('<td class=\"bk-pivot-toolbox\" valign=\"top\"></td>'),this.$pivot=r('<td class=\"bk-pivot-table\" valign=\"top\"></td>'),this.$description.html(this.renderDescription()),this.$toolbox.html(this.renderToolbox()),this.$pivot.html(this.renderWait()),t.append([r(\"<tr></tr>\").append(this.$desciption),r(\"<tr></tr>\").append([this.$toolbox,this.$pivot])]),this.$el.html(t),this.delayRenderPivotTable()},s.prototype.renderWait=function(){return r('<span class=\"bk-wait\">Rendering ...</span>')},s.prototype.rerenderPivotTable=function(){return this.$pivot.html(this.renderWait()),this.delayRenderPivotTable()},s.prototype.delayRenderPivotTable=function(){var t=this;return n.delay(function(){return t.$pivot.html(t.renderPivotTable())},50)},s.prototype.rerenderToolbox=function(){return this.$toolbox.html(this.renderToolbox())},s.prototype.renderToolbox=function(){var t;return t=r(\"<ul></ul>\"),t.append(this.renderRows()),t.append(this.renderColumns()),t.append(this.renderValues()),t.append(this.renderFilters()),t.append(this.renderUpdate()),t},s.prototype.renderAdd=function(t,e){var n,i;return i=r('<div class=\"bk-bs-dropdown bk-bs-pull-right\"></div>'),n=r('<button class=\"bk-bs-btn bk-bs-btn-link bk-bs-btn-xs\" data-bk-bs-toggle=\"dropdown\">Add</button>'),i.append([n.dropdown(),this.renderFields(t,e)]),i},s.prototype.renderFields=function(t,e){var i,o,s;return i=n.difference(this.fieldNames(),t),s=r('<ul class=\"bk-bs-dropdown-menu\"></ul>'),o=n.map(i,function(t){var e,n;return n=r('<a tabindex=\"-1\" href=\"javascript://\"></a>'),n.text(t),e=r(\"<li></li>\"),e.append(n)}),s.append(o),s.click(function(t){return e(r(t.target).text())})},s.prototype.renderRemove=function(t,e){var i,o=this;return i=function(){return o.mset(t,n.reject(o.mget(t),function(t){return t.field===e}))},r('<span class=\"bk-bs-close bk-bs-pull-right\">&times;</span>').click(i)},s.prototype.renderOptions=function(t,e,i){var o,s,a,l,c;return l=r('<ul class=\"bk-bs-dropdown-menu\"></ul>'),a=n.map(t,function(t){var e,n;return n=r('<a tabindex=\"-1\" href=\"javascript://\"></a>'),n.text(t),e=r(\"<li></li>\"),e.append(n)}),l.append(a),l.click(function(t){return i(r(t.target).text())}),s=r('<span class=\"bk-bs-dropdown\"></span>'),o=r('<button class=\"bk-bs-btn bk-bs-btn-link bk-bs-btn-xs\" data-bk-bs-toggle=\"dropdown\"></button>'),c=\"number\"==typeof e?t[e]:e,o.text(c),o.append(\"&nbsp;\"),o.append(r('<span class=\"bk-bs-caret\"></span>')),s.append([o.dropdown(),l])},s.prototype.makeSortable=function(t,e){var i=this;return e.sortable({handle:\".bk-pivot-box-header\",axis:\"y\",distance:10}).on(\"sortstop\",function(){var o,s;return s=function(){var t,n,i,s;for(i=e.children(),s=[],t=0,n=i.length;n>t;t++)o=i[t],s.push(r(o).data(\"bk-field\"));return s}(),i.mset(t,n.sortBy(i.mget(t),function(t){return s.indexOf(t.field)}))})},s.prototype.renderFieldName=function(t){return r('<span class=\"bk-field\"></span').text(t)},s.prototype.renderDType=function(t){return r('<span class=\"bk-dtype\"></span').text(\"(\"+this.getDType(t)+\")\")},s.prototype.defaultRowColumn=function(t){return{field:t,order:\"ascending\",sort_by:t,totals:!0}},s.prototype.usedFields=function(){return n.map(this.mget(\"rows\").concat(this.mget(\"columns\")),function(t){return t.field})},s.prototype.renderRows=function(){var t,e,i,o,s=this;return i=r(\"<li></li>\"),o=r(\"<div>Rows</div>\"),e=this.renderAdd(this.usedFields(),function(t){return s.mpush(\"rows\",s.defaultRowColumn(t))}),o.append(e),t=r(\"<ul></ul>\"),n.each(this.mget(\"rows\"),function(e,n){var i,o,a,l,c,h,u,p;return c=r('<li class=\"bk-pivot-box-header\">Group by:</li>'),o=s.renderFieldName(e.field),i=s.renderDType(e.field),a=s.renderRemove(\"rows\",e.field),c.append([\"&nbsp;\",o,\"&nbsp;\",i,a]),h=r(\"<li>Order:&nbsp;</li>\"),h.append(s.renderOptions([\"ascending\",\"descending\"],e.order,function(t){return s.mupdate(\"rows\",function(e){return e[n].order=t})})),u=r(\"<li>Sort by:&nbsp;</li>\"),u.append(s.renderOptions([e.field],e.sort_by,function(t){return s.mupdate(\"rows\",function(e){return e[n].sort_by=t})})),p=r(\"<li>Totals:&nbsp;</li>\"),p.append(s.renderOptions([\"on\",\"off\"],e.totals?0:1,function(t){return s.mupdate(\"rows\",function(e){return e[n].totals=\"on\"===t?!0:!1})})),l=r('<ul class=\"bk-pivot-box\"></ul>'),l.data(\"bk-field\",e.field),l.append([c,h,u,p]),t.append(l)}),this.makeSortable(\"rows\",t),i.append([o,t])},s.prototype.renderColumns=function(){var t,e,i,o,s=this;return i=r(\"<li></li>\"),o=r(\"<div>Columns</div>\"),e=this.renderAdd(this.usedFields(),function(t){return s.mpush(\"columns\",s.defaultRowColumn(t))}),o.append(e),t=r(\"<ul></ul>\"),n.each(this.mget(\"columns\"),function(e,n){var i,o,a,l,c,h,u,p;return c=r('<li class=\"bk-pivot-box-header\">Group by:</li>'),a=s.renderFieldName(e.field),o=s.renderDType(e.field),l=s.renderRemove(\"columns\",e.field),c.append([\"&nbsp;\",a,\"&nbsp;\",o,l]),h=r(\"<li>Order:&nbsp;</li>\"),h.append(s.renderOptions([\"ascending\",\"descending\"],e.order,function(t){return s.mupdate(\"columns\",function(e){return e[n].order=t})})),u=r(\"<li>Sort by:&nbsp;</li>\"),u.append(s.renderOptions([e.field],e.sort_by,function(t){return s.mupdate(\"columns\",function(e){return e[n].sort_by=t})})),p=r(\"<li>Totals:&nbsp;</li>\"),p.append(s.renderOptions([\"on\",\"off\"],e.totals?0:1,function(t){return s.mupdate(\"columns\",function(e){return e[n].totals=\"on\"===t?!0:!1})})),i=r('<ul class=\"bk-pivot-box\"></ul>'),i.data(\"bk-field\",e.field),i.append([c,h,u,p]),t.append(i)}),this.makeSortable(\"columns\",t),i.append([o,t])},s.prototype.defaultValue=function(t){return{field:t,aggregate:\"count\",renderer:\"default\",formatter:\"none\"}},s.prototype.renderValues=function(){var t,e,i,o,s=this;return i=r(\"<li></li>\"),o=r(\"<div>Values</div>\"),e=this.renderAdd([],function(t){return s.mpush(\"values\",s.defaultValue(t))}),o.append(e),t=r(\"<ul></ul>\"),n.each(this.mget(\"values\"),function(e,n){var i,o,a,l,c,h,u,p;return h=r('<li class=\"bk-pivot-box-header\">Display:</li>'),o=s.renderFieldName(e.field),i=s.renderDType(e.field),a=s.renderRemove(\"values\",e.field),h.append([\"&nbsp;\",o,\"&nbsp;\",i,a]),c=r(\"<li>Aggregate:&nbsp;</li>\"),c.append(s.renderOptions(s.model.aggregates,e.aggregate,function(t){return s.mupdate(\"values\",function(e){return e[n].aggregate=t})})),p=r(\"<li>Renderer:&nbsp;</li>\"),p.append(s.renderOptions(s.model.renderers,e.renderer,function(t){return s.mupdate(\"values\",function(e){return e[n].renderer=t})})),u=r(\"<li>Formatter:&nbsp;</li>\"),u.append(s.renderOptions(s.model.formatters,e.formatter,function(t){return s.mupdate(\"values\",function(e){return e[n].formatter=t})})),l=r('<ul class=\"bk-pivot-box\"></ul>'),l.data(\"bk-field\",e.field),l.append([h,c,p,u]),t.append(l)}),this.makeSortable(\"values\",t),i.append([o,t])},s.prototype.defaultFilter=function(t){return{field:t}},s.prototype.renderFilters=function(){var t,e,i,o,s=this;return i=r(\"<li></li>\"),o=r(\"<div>Filters</div>\"),e=this.renderAdd([],function(t){return s.mpush(\"filters\",s.defaultFilter(t))}),o.append(e),t=r(\"<ul></ul>\"),n.each(this.mget(\"filters\"),function(e){var n,i,o,a,l;return l=r('<li class=\"bk-pivot-box-header\">Filter:</li>'),i=s.renderFieldName(e.field),n=s.renderDType(e.field),a=s.renderRemove(\"filters\",e.field),l.append([\"&nbsp;\",i,\"&nbsp;\",n,a]),o=r('<ul class=\"bk-pivot-box\"></ul>'),o.data(\"bk-field\",e.field),o.append([l]),t.append(o)}),this.makeSortable(\"filters\",t),i.append([o,t])},s.prototype.renderUpdate=function(){var t,e,n,i,o=this;return n=this.mget(\"manual_update\"),e=r(\"<li></li>\"),i=r(\"<div>Update:&nbsp;</div>\"),i.append(this.renderOptions([\"Manual\",\"Automatic\"],n?0:1,function(t){return o.mset(\"manual_update\",\"Manual\"===t?!0:!1)})),e.append(i),n&&(t=r('<button type=\"button\" class=\"bk-bs-btn bk-bs-btn-primary\">Update</button>'),t.click(function(){return o.model.save()}),e.append(t)),e},s.prototype.renderDescription=function(){return r(\"<div></div>\").text(this.mget(\"description\"))},s.prototype.spanSize=function(t,e,n){var i,r,o,s,a,l;if(0!==e){for(r=!0,s=a=0;n>=0?n>=a:a>=n;s=n>=0?++a:--a)t[e-1][s]!==t[e][s]&&(r=!1);if(r)return-1}for(i=0;e+i<t.length;){for(o=!1,s=l=0;n>=0?n>=l:l>=n;s=n>=0?++l:--l)t[e][s]!==t[e+i][s]&&(o=!0);if(o)break;i++}return i},s.prototype.getAggregator=function(t,e){var n,i,r,o;return i=this.mget(\"data\"),r=i.rows.indexOf(t),n=i.cols.indexOf(e),-1===r&&(r=i.rows.length-1),-1===n&&(n=i.cols.length-1),o=-1===r||-1===n?null:i.values[r][n],{value:function(){return o},format:function(t){return\"\"+t}}},s.prototype.renderPivotTable=function(){var t,n,i,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y;u=this.mget(\"rows\"),i=this.mget(\"columns\"),d=this.mget(\"data\").rows,s=this.mget(\"data\").cols,h=r(\"<table class='bk-pivot-table pvtTable'>\");for(l in i)if(e.call(i,l)){n=i[l],g=r(\"<tr>\"),0===parseInt(l)&&0!==u.length&&g.append(r(\"<th>\").attr(\"colspan\",u.length).attr(\"rowspan\",i.length)),g.append(r(\"<th class='pvtAxisLabel'>\").text(n.field));for(a in s)e.call(s,a)&&(o=s[a],y=this.spanSize(s,parseInt(a),parseInt(l)),-1!==y&&(f=r(\"<th class='pvtColLabel'>\").text(o[l]).attr(\"colspan\",y),parseInt(l)===i.length-1&&0!==u.length&&f.attr(\"rowspan\",2),g.append(f)));0===parseInt(l)&&g.append(r(\"<th class='pvtTotalLabel'>\").text(\"Totals\").attr(\"rowspan\",i.length+(0===u.length?0:1))),h.append(g)}if(0!==u.length){g=r(\"<tr>\");for(a in u)e.call(u,a)&&(c=u[a],g.append(r(\"<th class='pvtAxisLabel'>\").text(c.field)));f=r(\"<th>\"),0===i.length&&f.addClass(\"pvtTotalLabel\").text(\"Totals\"),g.append(f),h.append(g)}for(a in d)if(e.call(d,a)){p=d[a],g=r(\"<tr>\");for(l in p)e.call(p,l)&&(m=p[l],y=this.spanSize(d,parseInt(a),parseInt(l)),-1!==y&&(f=r(\"<th class='pvtRowLabel'>\").text(m).attr(\"rowspan\",y),parseInt(l)===u.length-1&&0!==i.length&&f.attr(\"colspan\",2),g.append(f)));for(l in s)e.call(s,l)&&(o=s[l],t=this.getAggregator(p,o),v=t.value(),g.append(r(\"<td class='pvtVal row\"+a+\" col\"+l+\"'>\").text(t.format(v)).data(\"value\",v)));_=this.getAggregator(p,[]),v=_.value(),g.append(r(\"<td class='pvtTotal rowTotal'>\").text(_.format(v)).data(\"value\",v).data(\"for\",\"row\"+a)),h.append(g)}g=r(\"<tr>\"),f=r(\"<th class='pvtTotalLabel'>\").text(\"Totals\"),f.attr(\"colspan\",u.length+(0===i.length?0:1)),g.append(f);for(l in s)e.call(s,l)&&(o=s[l],_=this.getAggregator([],o),v=_.value(),g.append(r(\"<td class='pvtTotal colTotal'>\").text(_.format(v)).data(\"value\",v).data(\"for\",\"col\"+l)));return _=this.getAggregator([],[]),v=_.value(),g.append(r(\"<td class='pvtGrandTotal'>\").text(_.format(v)).data(\"value\",v)),h.append(g),h},s}(h.View),u=function(t){function e(){return _=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=p,e.prototype.type=\"PivotTable\",e.prototype.defaults={title:\"Pivot Table\",description:\"\",source:null,data:{},fields:[],rows:[],columns:[],values:[],filters:[],manual_update:!0},e.prototype.aggregates=[\"count\",\"counta\",\"countunique\",\"average\",\"max\",\"min\",\"median\",\"sum\",\"product\",\"stdev\",\"stdevp\",\"var\",\"varp\"],e.prototype.renderers=[\"default\",\"heatmap\"],e.prototype.formatters=[\"none\"],e.prototype.mset=function(){return this.get(\"manual_update\")?this.set.apply(this,arguments):this.save.apply(this,arguments)},e}(l),d=function(t){function e(){return g=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=u,e}(a.Collection),{Model:u,Collection:new d,View:p}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/pandas/ipython_remote_data\",[\"backbone\",\"common/has_properties\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"IPythonRemoteData\",n.prototype.defaults={computed_columns:[]},n}(n),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),{Model:i,Collection:new r}})}.call(this),n(\"widget/pandas/pandas_pivot_template\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){var t,n,r,o,s,a,l,c,h,u,p,d,f,g,m;if(i(e('<form class=\"form-inline tablecontrolform\">\\n<label>Transform </label>:  <select class=\"tablecontrolstate\">\\n    <option value=\"groupby\" selected=\"selected\">Group By</option>\\n    <option value=\"filtering\">Filtering</option>\\n    <option value=\"computed\">Computed Columns</option>\\n  </select>\\n  <br/>\\n  ')),\"groupby\"===this.tablecontrolstate&&(i(e('\\n  <label>GroupBy </label>\\n  <input type=\"text\" class=\"pandasgroup\" value=\"')),i(this.group),i(e('\"/>\\n  <label>Aggregation</label>\\n  <select class=\"pandasagg\">\\n    <option value=\"sum\">sum</option>\\n    <option value=\"mean\">mean</option>\\n    <option value=\"std\">std</option>\\n    <option value=\"max\">max</option>\\n    <option value=\"min\">min</option>\\n  </select>\\n  '))),i(e(\"\\n  \")),\"filtering\"===this.tablecontrolstate&&(i(e('\\n  <label class=\"checkbox\" >\\n    ')),i(this.filterselected?e('\\n    <input type=\"checkbox\" class=\"filterselected\" checked=\"checked\"/>\\n    '):e('\\n    <input type=\"checkbox\" class=\"filterselected\"/>\\n    ')),i(e('\\n    Filter Selection\\n  </label>\\n  <input type=\"button\" class=\"clearselected btn btn-mini\" value=\"Clear Selection\"/>\\n  <label>\\n    Search\\n  </label>\\n  <input type=\"text\" class=\"search input-large\"/>\\n  '))),i(e(\"\\n  \\n  \")),\"computed\"===this.tablecontrolstate){for(i(e('\\n  <table class=\"table\">\\n    <thead>\\n      <th>\\n        Name\\n      </th>\\n      <th>\\n        Value\\n      </th>\\n      <th>\\n      </th>\\n    </thead>\\n    ')),d=this.computed_columns,o=0,c=d.length;c>o;o++)n=d[o],i(e(\"\\n    <tr>\\n      <td>\\n        \")),i(n.name),i(e(\"\\n      </td>\\n      <td>\\n        \")),i(n.code),i(e('\\n      </td>\\n      <td>\\n        <a class=\"column_del\" \\n           name=\"')),i(n.name),i(e('\" href=\"#\">[delete]</a>\\n      </td>\\n    </tr>\\n    '));i(e('\\n    <tr>\\n      <td>\\n        <input type=\"text\" class=\"computedname input-mini\"/>\\n      </td>\\n      <td>\\n        <input type=\"text\" class=\"computedtxtbox input-medium\"/>\\n      </td>\\n      <td>\\n      </td>\\n    </tr>\\n  </table>\\n  '))}for(i(e('\\n  \\n</form>\\n\\n<table class=\"bokehdatatable table table-bordered\"\\n')),this.width?(i(e('\\n       style=\"max-height:')),i(this.height),i(e(\"px;max-width:\")),i(this.width),i(e('px\"\\n'))):(i(e('\\n       style=\"max-height:')),i(this.height),i(e('px\"\\n'))),i(e(\"\\n       >\\n  <thead>\\n    \")),this.counts&&i(e(\"\\n    <th>counts</th>\\n    \")),i(e(\"\\n    <th>index</th>\\n    \")),f=this.columns,s=0,h=f.length;h>s;s++)t=f[s],i(e(\"\\n    \")),this.skip[t]||(i(e('\\n    <th><a class=\"pandascolumn\">')),i(t),i(e(\"</a>\\n      \\n      \")),this.sort_ascendings[t]===!0?i(e('\\n      <i class=\"icon-caret-up\"></i>\\n      ')):this.sort_ascendings[t]===!1&&i(e('\\n      <i class=\"icon-caret-down\"></i>\\n      ')),i(e(\"\\n      \\n      \"))),i(e(\"\\n    </th>\\n    \"));for(i(e(\"\\n  </thead>\\n  \")),g=_.range(this.length),a=0,u=g.length;u>a;a++){for(r=g[a],i(e('\\n  <tr class=\"pandasrow\" rownum=\"')),i(r),i(e('\">\\n    ')),this.selected&&this.selected[r]?(i(e('\\n      <td style=\"background-color:')),i(this.colors[r]),i(e('\"> \\n        ')),i(this.selected[r]),i(e(\"/\")),i(this.counts[r]),i(e(\"\\n      </td>      \\n    \"))):(i(e(\"\\n      <td> \")),i(this.counts[r]),i(e(\" </td>\\n    \"))),i(e(\"\\n    <td> \")),i(this.index[r]),i(e(\" </td>\\n    \")),m=this.columns,l=0,p=m.length;p>l;l++)t=m[l],i(e(\"\\n      \")),this.skip[t]||(i(e(\"    \\n      <td> \")),i(this.data[t][r]),i(e(\" </td>\\n      \"))),i(e(\"\\n    \"));i(e(\"\\n  </tr>\\n  \"))}i(e('\\n</table>\\n<form>\\n  <center>\\n    <div class=\"btn-group pagination\">\\n      <button class=\"btn btn-mini\">First</button>\\n      <button class=\"btn btn-mini\">Previous</button>\\n      <button class=\"btn btn-mini\">Next</button>\\n      <button class=\"btn btn-mini\">Last</button>  \\n    </div>\\n    <div class=\"paginatedisplay\">\\n      Show <input type=\"text\" class=\"pandassize\" value=\"')),i(this.length),i(e('\"> records\\n      From <input type=\"text\" class=\"pandasoffset\" value=\"')),i(this.offset),i(e('\">\\n      to ')),i(this.length+this.offset),i(e(\" - \\n      Total : \")),i(this.totallength),i(e(\"\\n    </div>\\n  </center>\\n</form>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"widget/pandas/pandas_pivot_table\",[\"underscore\",\"backbone\",\"common/has_parent\",\"common/continuum_view\",\"./pandas_pivot_template\"],function(e,n,r,o,s){var a,l,c,h,u,p,d;return a=13,h=function(n){function r(){return this.colors=t(this.colors,this),this.pandasend=t(this.pandasend,this),this.pandasnext=t(this.pandasnext,this),this.pandasback=t(this.pandasback,this),this.pandasbeginning=t(this.pandasbeginning,this),this.toggle_more_controls=t(this.toggle_more_controls,this),this.sort=t(this.sort,this),this.rowclick=t(this.rowclick,this),this.toggle_filterselected=t(this.toggle_filterselected,this),this.clearselected=t(this.clearselected,this),this.computedtxtbox=t(this.computedtxtbox,this),this.column_del=t(this.column_del,this),this.search=t(this.search,this),u=r.__super__.constructor.apply(this,arguments)}return i(r,n),r.prototype.template=s,r.prototype.initialize=function(t){return r.__super__.initialize.call(this,t),this.listenTo(this.model,\"destroy\",this.remove),this.listenTo(this.model,\"change\",this.render),this.render()},r.prototype.events={\"keyup .pandasgroup\":\"pandasgroup\",\"keyup .pandasoffset\":\"pandasoffset\",\"keyup .pandassize\":\"pandassize\",\"change .pandasagg\":\"pandasagg\",\"change .tablecontrolstate\":\"tablecontrolstate\",\"click .pandasbeginning\":\"pandasbeginning\",\"click .pandasback\":\"pandasback\",\"click .pandasnext\":\"pandasnext\",\"click .pandasend\":\"pandasend\",\"click .controlsmore\":\"toggle_more_controls\",\"click .pandascolumn\":\"sort\",\"click .pandasrow\":\"rowclick\",\"click .filterselected\":\"toggle_filterselected\",\"click .clearselected\":\"clearselected\",\"keyup .computedtxtbox\":\"computedtxtbox\",\"click .column_del\":\"column_del\",\"keyup .search\":\"search\"},r.prototype.search=function(t){var e,n;return t.keyCode===a?(e=$(t.currentTarget).val(),n=this.model.get_obj(\"source\"),n.rpc(\"search\",[e]),t.preventDefault()):void 0},r.prototype.column_del=function(t){var n,i,r,o;return o=this.model.get_obj(\"source\"),r=o.get(\"computed_columns\"),i=$(t.currentTarget).attr(\"name\"),n=e.filter(r,function(t){return t.name!==i}),o.rpc(\"set_computed_columns\",[n])},r.prototype.computedtxtbox=function(t){var e,n,i,r;return t.keyCode===a?(n=this.$(\".computedname\").val(),e=this.$(\".computedtxtbox\").val(),r=this.model.get_obj(\"source\"),i=r.get(\"computed_columns\"),i.push({name:n,code:e}),r.rpc(\"set_computed_columns\",[i]),t.preventDefault()):void 0},r.prototype.clearselected=function(){return this.model.rpc(\"setselect\",[[]])},r.prototype.toggle_filterselected=function(){var t;return t=this.$(\".filterselected\").is(\":checked\"),this.mset(\"filterselected\",t),this.model.save()},r.prototype.rowclick=function(t){var n,i,r,o,s,a,l,c,h,u;return i=this.counts(),u=this.selected(),a=function(){var t,r,o,s,a;for(o=e.zip(u,i),a=[],t=0,r=o.length;r>t;t++)s=o[t],h=s[0],n=s[1],a.push(h/n);return a}(),u=function(){var t,e,n;for(n=[],r=t=0,e=a.length;e>t;r=++t)s=a[r],s>.5&&n.push(r);return n}(),c=Number($(t.currentTarget).attr(\"rownum\")),o=u.indexOf(c),l=-1===o?this.model.rpc(\"select\",[[c]]):this.model.rpc(\"deselect\",[[c]]),null},r.prototype.sort=function(t){var e;return e=$(t.currentTarget).text(),this.model.toggle_column_sort(e)},r.prototype.toggle_more_controls=function(){return this.controls_hide=this.controls_hide?!1:!0,this.render()},r.prototype.pandasbeginning=function(){return this.model.go_beginning()},r.prototype.pandasback=function(){return this.model.go_back()},r.prototype.pandasnext=function(){return this.model.go_forward()},r.prototype.pandasend=function(){return this.model.go_end()},r.prototype.pandasoffset=function(t){var n;return t.keyCode===a?(n=this.$el.find(\".pandasoffset\").val(),n=Number(n),e.isNaN(n)&&(n=this.model.defaults.offset),this.model.save(\"offset\",n,{wait:!0}),t.preventDefault()):void 0},r.prototype.pandassize=function(t){var n,i;return t.keyCode===a?(i=this.$el.find(\".pandassize\").val(),n=Number(i),(e.isNaN(n)||\"\"===i)&&(n=this.model.defaults.length),n+this.mget(\"offset\")>this.mget(\"maxlength\")&&(n=this.mget(\"maxlength\")-this.mget(\"offset\")),this.model.save(\"length\",n,{wait:!0}),t.preventDefault()):void 0},r.prototype.tablecontrolstate=function(){return this.mset(\"tablecontrolstate\",this.$(\".tablecontrolstate\").val())},r.prototype.pandasagg=function(){return this.model.save(\"agg\",this.$el.find(\".pandasagg\").val(),{wait:!0})},r.prototype.fromcsv=function(t){return t?e.map(t.split(\",\"),function(t){return t.trim()}):[]},r.prototype.pandasgroup=function(t){return t.keyCode===a?(this.model.set({group:this.fromcsv(this.$el.find(\".pandasgroup\").val()),offset:0}),this.model.save(),t.preventDefault(),!1):void 0},r.prototype.counts=function(){return this.mget(\"tabledata\").data._counts},r.prototype.selected=function(){return this.mget(\"tabledata\").data._selected},r.prototype.colors=function(){var t,n;return t=this.counts(),n=this.selected(),t&&n?e.map(e.zip(t,n),function(t){var e,i;return i=t[0],n=t[1],e=.3*n/i,\"rgba(0,0,255,\"+e+\")\"}):null},r.prototype.render=function(){var t,n,i,r,o,s,a,l,c,h,u;for(n=this.mget(\"group\"),e.isArray(n)&&(n=n.join(\",\")),o=this.mget(\"sort\"),e.isArray(o)&&(o=o.join(\",\")),t=this.colors(),s={},u=this.mget(\"sort\"),c=0,h=u.length;h>c;c++)r=u[c],s[r.column]=r.ascending;return a=this.mget_obj(\"source\"),l={skip:{_counts:!0,_selected:!0,index:!0},tablecontrolstate:this.mget(\"tablecontrolstate\"),computed_columns:this.mget_obj(\"source\").get(\"computed_columns\"),columns:this.mget(\"tabledata\").column_names,data:this.mget(\"tabledata\").data,group:n,sort_ascendings:s,height:this.mget(\"height\"),width:this.mget(\"width\"),offset:this.mget(\"offset\"),length:this.model.length(),filterselected:this.mget(\"filterselected\"),totallength:this.mget(\"totallength\"),counts:this.mget(\"tabledata\").data._counts,selected:this.mget(\"tabledata\").data._selected,controls_hide:this.controls_hide,colors:t,index:this.mget(\"tabledata\").data.index},this.$el.empty(),i=this.template(l),this.$el.html(i),this.$(\".pandasagg\").find('option[value=\"'+this.mget(\"agg\")+'\"]').attr(\"selected\",\"selected\"),this.$(\".tablecontrolstate\").find('option[value=\"'+this.mget(\"tablecontrolstate\")+'\"]').attr(\"selected\",\"selected\"),this.$el.addClass(\"bokehtable\")},r}(o.View),l=function(n){function r(){return this.toggle_column_sort=t(this.toggle_column_sort,this),p=r.__super__.constructor.apply(this,arguments)}return i(r,n),r.prototype.type=\"PandasPivotTable\",r.prototype.initialize=function(t,n){var i=this;return r.__super__.initialize.call(this,t,n),this.throttled_fetch=e.throttle(function(){return i.fetch()},500)},r.prototype.fetch=function(t){return r.__super__.fetch.call(this,t)},r.prototype.length=function(){return e.values(this.get(\"tabledata\").data)[0].length},r.prototype.toggle_column_sort=function(t){var n,i;return i=this.get(\"sort\"),this.unset(\"sort\",{silent:!0}),n=e.filter(i,function(e){return e.column===t}),n.length>0?(n=n[0],void(n.ascending?(n.ascending=!1,this.save(\"sort\",i,{wait:!0})):(i=e.filter(i,function(e){return e.column!==t}),this.save(\"sort\",i,{wait:!0})))):(i=e.clone(i),i.push({column:t,ascending:!0}),void this.save(\"sort\",i,{wait:!0}))},r.prototype.go_beginning=function(){return this.set(\"offset\",0),this.save()},r.prototype.go_back=function(){var t;return t=this.get(\"offset\"),t-=this.length(),0>t&&(t=0),this.set(\"offset\",t),this.save()},r.prototype.go_forward=function(){var t,e;return e=this.get(\"offset\"),e+=this.length(),t=this.get(\"maxlength\")-this.length(),e>t&&(e=t),this.set(\"offset\",e),this.save()},r.prototype.go_end=function(){var t;return t=this.get(\"maxlength\")-this.length(),this.set(\"offset\",t),this.save()},r.prototype.default_view=h,r.prototype.defaults=function(){return{sort:[],group:[],agg:\"sum\",offset:0,length:100,maxlength:1e3,tabledata:null,columns_names:[],width:null,tablecontrolstate:\"groupby\"}},r}(r),c=function(t){function e(){return d=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=l,e}(n.Collection),{Model:l,Collection:new c,View:h}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/pandas/pandas_plot_source\",[\"backbone\",\"source/column_data_source\"],function(t,n){var i,r,o,s;return i=function(t){function n(){return o=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"PandasPlotSource\",n}(n.Model),r=function(t){function n(){return s=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),{Model:i,Collection:new r}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/paragraph\",[\"common/has_parent\",\"common/continuum_view\",\"backbone\"],function(t,n,i){var r,o,s,a,l,c,h,u;return r=n.View,s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.tagName=\"p\",n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,\"change\",this.render)},n.prototype.render=function(){return this.$el.text(this.mget(\"text\"))},n}(r),o=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Paragraph\",n.prototype.default_view=s,n.prototype.defaults=function(){return{text:\"\"}},n}(t),a=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=o,n}(i.Collection),l=new a,{Model:o,Collection:l,View:s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/hbox\",[\"common/has_parent\",\"common/continuum_view\",\"common/build_views\",\"backbone\"],function(n,i,r,o){var s,a,l,c,h,u,p,d;return s=i.View,l=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.tag=\"div\",i.prototype.attributes={\"class\":\"bk-hbox\"},i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t),this.views={},this.render(),this.listenTo(this.model,\"change\",this.render)\n",
        "                },i.prototype.render=function(){var e,n,i,o,s,a,l,c;n=this.mget_obj(\"children\"),r(this.views,n),l=this.views;for(i in l)t.call(l,i)&&(o=l[i],o.$el.detach());for(this.$el.empty(),c=[],s=0,a=n.length;a>s;s++)e=n[s],c.push(this.$el.append(this.views[e.id].$el));return c},i}(s),a=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"HBox\",n.prototype.default_view=l,n.prototype.defaults=function(){return{children:[]}},n}(n),c=function(t){function n(){return d=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(o.Collection),h=new c,{Model:a,Collection:h,View:l}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/vbox\",[\"common/has_parent\",\"common/continuum_view\",\"common/build_views\",\"backbone\"],function(n,i,r,o){var s,a,l,c,h,u,p,d;return s=i.View,l=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.tag=\"div\",i.prototype.attributes={\"class\":\"bk-vbox\"},i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t),this.views={},this.render(),this.listenTo(this.model,\"change\",this.render)},i.prototype.render=function(){var e,n,i,o,s,a,l,c;n=this.mget_obj(\"children\"),r(this.views,n),l=this.views;for(i in l)t.call(l,i)&&(o=l[i],o.$el.detach());for(this.$el.empty(),c=[],s=0,a=n.length;a>s;s++)e=n[s],c.push(this.$el.append(this.views[e.id].$el));return c},i}(s),a=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"VBox\",n.prototype.default_view=l,n.prototype.defaults=function(){return{children:[]}},n}(n),c=function(t){function n(){return d=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(o.Collection),h=new c,{Model:a,Collection:h,View:l}})}.call(this),n(\"widget/textinputtemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<label for=\"')),i(this.id),i(e('\"> ')),i(this.title),i(e(' </label>\\n<input class=\"bk-widget-form-input\" type=\"text\" id=\"')),i(this.id),i(e('\" name=\"')),i(this.name),i(e('\" value=\"')),i(this.value),i(e('\"/>\\n'))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/textinput\",[\"common/has_parent\",\"common/continuum_view\",\"common/build_views\",\"backbone\",\"./textinputtemplate\"],function(t,n,i,r,o){var s,a,l,c,h,u,p,d;return s=n.View,l=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.tagName=\"div\",n.prototype.attributes={\"class\":\"bk-widget-form-group\"},n.prototype.template=o,n.prototype.events={\"change input\":\"change_input\"},n.prototype.change_input=function(){return this.mset(\"value\",this.$(\"input\").val()),this.model.save(),console.log(\"set\",this.model.attributes)},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,\"change\",this.render)},n.prototype.render=function(){return this.$el.html(this.template(this.model.attributes)),this},n}(s),a=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"TextInput\",n.prototype.default_view=l,n.prototype.defaults=function(){var t;return t={name:\"\",value:\"\",title:\"\"}},n}(t),c=function(t){function n(){return d=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(r.Collection),h=new c,{Model:a,Collection:h}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/vboxmodelform\",[\"common/has_parent\",\"common/continuum_view\",\"common/build_views\",\"backbone\"],function(n,i,r,o){var s,a,l,c,h,u,p,d;return s=i.View,l=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.tagName=\"form\",i.prototype.attributes={\"class\":\"bk-widget-form\",role:\"form\"},i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t),this.views={},this.render(),this.listenTo(this.model,\"change:children\",this.change_children),this.bind_children()},i.prototype.change_children=function(){var t,e,n,i,r;for(n=this.model.previous(\"children\"),i=0,r=n.length;r>i;i++)e=n[i],t=this.resolve_ref(e),t&&this.stopListening(t,\"change:value\");return this.bind_children()},i.prototype.bind_children=function(){var t,e,n,i,r;for(e=this.mget_obj(\"_children\"),r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(this.listenTo(t,{\"change:value\":this.set_data}));return r},i.prototype.set_data=function(t,e){var n,i,r,o,s,a;if(null!=t)o=[t.get(\"name\"),t.get(\"value\")],n=o[0],e=o[1],e=this.model.convert_val(n,e),this.mset(n,e),this.model.save();else{for(s=this.mget_obj(\"children\"),i=0,r=s.length;r>i;i++)t=s[i],a=[t.get(\"name\"),t.get(\"value\")],n=a[0],e=a[1],null!=n&&null!=e&&(e=this.model.convert_val(n,e),this.mset(n,e));this.model.save()}return console.log(this.model.attributes)},i.prototype.render=function(){var e,n,i,o,s,a,l,c;n=this.mget_obj(\"_children\"),r(this.views,n),l=this.views;for(i in l)t.call(l,i)&&(o=l[i],o.$el.detach());for(this.$el.empty(),c=[],s=0,a=n.length;a>s;s++)e=n[s],this.$el.append(\"<br/\"),c.push(this.$el.append(this.views[e.id].$el));return c},i}(s),a=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"VBoxModelForm\",n.prototype.default_view=l,n.prototype.convert_val=function(t,e){var n;return n=this.get(\"_field_defs\"),null!=n[t]&&(\"Float\"===n[t]?e=parseFloat(e):\"Int\"===n[t]&&(e=parseInt(e))),e},n.prototype.defaults=function(){var t;return t={_children:[],_field_defs:{}}},n}(n),c=function(t){function n(){return d=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(o.Collection),h=new c,{Model:a,Collection:h,View:l}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/pretext\",[\"backbone\",\"./paragraph\"],function(t,n){var i,r,o,s,a,l,c;return r=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.tagName=\"pre\",n}(n.View),i=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"PreText\",n.prototype.default_view=r,n.prototype.defaults=function(){return{text:\"\"}},n}(n.Model),o=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=i,n}(t.Collection),s=new o,{Model:i,Collection:s,View:r}})}.call(this),n(\"widget/selecttemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){var t,n,r,o;for(i(e('<label for=\"')),i(this.id),i(e('\"> ')),i(this.title),i(e(' </label>\\n<select class=\"bk-widget-form-input\" id=\"')),i(this.id),i(e('\" name=\"')),i(this.name),i(e('\">\\n  ')),o=this.options,n=0,r=o.length;r>n;n++)t=o[n],i(e(\"\\n    \")),_.isString(t)?(i(e(\"\\n      <option \")),i(t===this.value?i(e('selected=\"selected\"')):void 0),i(e(' value=\"')),i(t),i(e('\">')),i(t),i(e(\"</option>\\n    \"))):(i(e(\"\\n      <option \")),i(t.value===this.value?i(e('selected=\"selected\"')):void 0),i(e(' value=\"')),i(t.value),i(e('\">')),i(t.name),i(e(\"</option>\\n    \"))),i(e(\"\\n  \"));i(e(\"\\n</select>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/selectbox\",[\"common/has_parent\",\"common/continuum_view\",\"backbone\",\"underscore\",\"./selecttemplate\"],function(t,n,i,r,o){var s,a,l,c,h,u,p,d;return s=n.View,l=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.events={\"change select\":\"change_input\"},n.prototype.change_input=function(){return console.log(\"set\",this.model.attributes),this.mset(\"value\",this.$(\"select\").val()),this.model.save()},n.prototype.tagName=\"div\",n.prototype.template=o,n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,\"change\",this.render)},n.prototype.render=function(){var t;return this.$el.empty(),t=this.template(this.model.attributes),this.$el.html(t),this},n}(s),a=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Select\",n.prototype.default_view=l,n.prototype.defaults=function(){var t;return t={title:\"\",value:\"\",options:[]}},n}(t),c=function(t){function n(){return d=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(i.Collection),h=new c,{Model:a,Collection:h,View:l}})}.call(this),n(\"widget/slidertemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<label for=\"')),i(this.id),i(e('\"> ')),i(this.title),i(e(' </label>\\n<div class=\"bk-slider-')),i(this.orientation),i(e('\">\\n  <div class=\"slider \" id=\"')),i(this.id),i(e('\">\\n</div>\\n'))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),n(\"jquery_ui/slider\",[\"jquery\",\"./core\",\"./mouse\",\"./widget\"],function(t){!function(t){var e=5;t.widget(\"ui.slider\",t.ui.mouse,{version:\"1.10.0\",widgetEventPrefix:\"slide\",options:{animate:!1,distance:0,max:100,min:0,orientation:\"horizontal\",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){var e,n,i=this.options,r=this.element.find(\".ui-slider-handle\").addClass(\"ui-state-default ui-corner-all\"),o=\"<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>\",s=[];for(this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass(\"ui-slider ui-slider-\"+this.orientation+\" ui-widget ui-widget-content ui-corner-all\"),this.range=t([]),i.range&&(i.range===!0&&(i.values?i.values.length&&2!==i.values.length?i.values=[i.values[0],i.values[0]]:t.isArray(i.values)&&(i.values=i.values.slice(0)):i.values=[this._valueMin(),this._valueMin()]),this.range=t(\"<div></div>\").appendTo(this.element).addClass(\"ui-slider-range ui-widget-header\"+(\"min\"===i.range||\"max\"===i.range?\" ui-slider-range-\"+i.range:\"\"))),n=i.values&&i.values.length||1,e=r.length;n>e;e++)s.push(o);this.handles=r.add(t(s.join(\"\")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter(\"a\").click(function(t){t.preventDefault()}).mouseenter(function(){i.disabled||t(this).addClass(\"ui-state-hover\")}).mouseleave(function(){t(this).removeClass(\"ui-state-hover\")}).focus(function(){i.disabled?t(this).blur():(t(\".ui-slider .ui-state-focus\").removeClass(\"ui-state-focus\"),t(this).addClass(\"ui-state-focus\"))}).blur(function(){t(this).removeClass(\"ui-state-focus\")}),this.handles.each(function(e){t(this).data(\"ui-slider-handle-index\",e)}),this._setOption(\"disabled\",i.disabled),this._on(this.handles,this._handleEvents),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass(\"ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all\"),this._mouseDestroy()},_mouseCapture:function(e){var n,i,r,o,s,a,l,c,h=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(n),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var n=Math.abs(i-h.values(e));(r>n||r===n&&(e===h._lastChangedValue||h.values(e)===u.min))&&(r=n,o=t(this),s=e)}),a=this._start(e,s),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=s,o.addClass(\"ui-state-active\").focus(),l=o.offset(),c=!t(e.target).parents().addBack().is(\".ui-slider-handle\"),this._clickOffset=c?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css(\"borderTopWidth\"),10)||0)-(parseInt(o.css(\"borderBottomWidth\"),10)||0)+(parseInt(o.css(\"marginTop\"),10)||0)},this.handles.hasClass(\"ui-state-hover\")||this._slide(e,s,i),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,n),!1},_mouseStop:function(t){return this.handles.removeClass(\"ui-state-active\"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=\"vertical\"===this.options.orientation?\"vertical\":\"horizontal\"},_normValueFromMouse:function(t){var e,n,i,r,o;return\"horizontal\"===this.orientation?(e=this.elementSize.width,n=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,n=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),i=n/e,i>1&&(i=1),0>i&&(i=0),\"vertical\"===this.orientation&&(i=1-i),r=this._valueMax()-this._valueMin(),o=this._valueMin()+i*r,this._trimAlignValue(o)},_start:function(t,e){var n={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._trigger(\"start\",t,n)},_slide:function(t,e,n){var i,r,o;this.options.values&&this.options.values.length?(i=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&n>i||1===e&&i>n)&&(n=i),n!==this.values(e)&&(r=this.values(),r[e]=n,o=this._trigger(\"slide\",t,{handle:this.handles[e],value:n,values:r}),i=this.values(e?0:1),o!==!1&&this.values(e,n,!0))):n!==this.value()&&(o=this._trigger(\"slide\",t,{handle:this.handles[e],value:n}),o!==!1&&this.value(n))},_stop:function(t,e){var n={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._trigger(\"stop\",t,n)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._lastChangedValue=e,this._trigger(\"change\",t,n)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,n){var i,r,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(i=this.options.values,r=arguments[0],o=0;o<i.length;o+=1)i[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,n){var i,r=0;switch(t.isArray(this.options.values)&&(r=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case\"disabled\":n?(this.handles.filter(\".ui-state-focus\").blur(),this.handles.removeClass(\"ui-state-hover\"),this.handles.prop(\"disabled\",!0)):this.handles.prop(\"disabled\",!1);break;case\"orientation\":this._detectOrientation(),this.element.removeClass(\"ui-slider-horizontal ui-slider-vertical\").addClass(\"ui-slider-\"+this.orientation),this._refreshValue();break;case\"value\":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case\"values\":for(this._animateOff=!0,this._refreshValue(),i=0;r>i;i+=1)this._change(null,i);this._animateOff=!1;break;case\"min\":case\"max\":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,n,i;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,n=(t-this._valueMin())%e,i=t-n;return 2*Math.abs(n)>=e&&(i+=n>0?e:-e),parseFloat(i.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,n,i,r,o,s=this.options.range,a=this.options,l=this,c=this._animateOff?!1:a.animate,h={};this.options.values&&this.options.values.length?this.handles.each(function(i){n=(l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())*100,h[\"horizontal\"===l.orientation?\"left\":\"bottom\"]=n+\"%\",t(this).stop(1,1)[c?\"animate\":\"css\"](h,a.animate),l.options.range===!0&&(\"horizontal\"===l.orientation?(0===i&&l.range.stop(1,1)[c?\"animate\":\"css\"]({left:n+\"%\"},a.animate),1===i&&l.range[c?\"animate\":\"css\"]({width:n-e+\"%\"},{queue:!1,duration:a.animate})):(0===i&&l.range.stop(1,1)[c?\"animate\":\"css\"]({bottom:n+\"%\"},a.animate),1===i&&l.range[c?\"animate\":\"css\"]({height:n-e+\"%\"},{queue:!1,duration:a.animate}))),e=n}):(i=this.value(),r=this._valueMin(),o=this._valueMax(),n=o!==r?(i-r)/(o-r)*100:0,h[\"horizontal\"===this.orientation?\"left\":\"bottom\"]=n+\"%\",this.handle.stop(1,1)[c?\"animate\":\"css\"](h,a.animate),\"min\"===s&&\"horizontal\"===this.orientation&&this.range.stop(1,1)[c?\"animate\":\"css\"]({width:n+\"%\"},a.animate),\"max\"===s&&\"horizontal\"===this.orientation&&this.range[c?\"animate\":\"css\"]({width:100-n+\"%\"},{queue:!1,duration:a.animate}),\"min\"===s&&\"vertical\"===this.orientation&&this.range.stop(1,1)[c?\"animate\":\"css\"]({height:n+\"%\"},a.animate),\"max\"===s&&\"vertical\"===this.orientation&&this.range[c?\"animate\":\"css\"]({height:100-n+\"%\"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(n){var i,r,o,s,a=t(n.target).data(\"ui-slider-handle-index\");switch(n.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(n.target).addClass(\"ui-state-active\"),i=this._start(n,a),i===!1))return}switch(s=this.options.step,r=o=this.options.values&&this.options.values.length?this.values(a):this.value(),n.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(r+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(r-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(r===this._valueMax())return;o=this._trimAlignValue(r+s);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(r===this._valueMin())return;o=this._trimAlignValue(r-s)}this._slide(n,a,o)},keyup:function(e){var n=t(e.target).data(\"ui-slider-handle-index\");this._keySliding&&(this._keySliding=!1,this._stop(e,n),this._change(e,n),t(e.target).removeClass(\"ui-state-active\"))}}})}(t)}),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"widget/slider\",[\"common/has_parent\",\"common/continuum_view\",\"backbone\",\"underscore\",\"./slidertemplate\",\"jquery_ui/slider\"],function(e,n,r,o,s){var a,l,c,h,u,p,d,f;return a=n.View,c=function(e){function n(){return this.slide=t(this.slide,this),p=n.__super__.constructor.apply(this,arguments)}return i(n,e),n.prototype.tagName=\"div\",n.prototype.template=s,n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render()},n.prototype.render=function(){var t,e,n,i;return this.$el.empty(),t=this.template(this.model.attributes),this.$el.html(t),e=this.mget(\"end\"),n=this.mget(\"start\"),i=this.mget(\"step\")||(e-n)/50,console.log(\"sliderval\",n,e,i),this.$(\".slider\").slider({orientation:this.mget(\"orientation\"),animate:\"fast\",slide:o.throttle(this.slide,200),value:this.mget(\"value\"),min:n,max:e,step:i})},n.prototype.slide=function(t,e){var n;return n=e.value,console.log(\"sliding\",n),this.mset(\"value\",n),this.model.save()},n}(a),l=function(t){function e(){return d=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"Slider\",e.prototype.default_view=c,e.prototype.defaults=function(){var t;return t={title:\"\",value:.5,start:0,end:1,step:0,orientation:\"horizontal\"}},e}(e),h=function(t){function e(){return f=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=l,e}(r.Collection),u=new h,{Model:l,Collection:u,View:c}})}.call(this),n(\"jquery_ui/draggable\",[\"jquery\",\"./core\",\"./mouse\",\"./widget\"],function(t){!function(t){t.widget(\"ui.draggable\",t.ui.mouse,{version:\"1.10.0\",widgetEventPrefix:\"drag\",options:{addClasses:!0,appendTo:\"parent\",axis:!1,connectToSortable:!1,containment:!1,cursor:\"auto\",cursorAt:!1,grid:!1,handle:!1,helper:\"original\",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:\"default\",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:\"both\",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){\"original\"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css(\"position\"))||(this.element[0].style.position=\"relative\"),this.options.addClasses&&this.element.addClass(\"ui-draggable\"),this.options.disabled&&this.element.addClass(\"ui-draggable-disabled\"),this._mouseInit()},_destroy:function(){this.element.removeClass(\"ui-draggable ui-draggable-dragging ui-draggable-disabled\"),this._mouseDestroy()},_mouseCapture:function(e){var n=this.options;return this.helper||n.disabled||t(e.target).closest(\".ui-resizable-handle\").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(n.iframeFix===!0?\"iframe\":n.iframeFix).each(function(){t(\"<div class='ui-draggable-iframeFix' style='background: #fff;'></div>\").css({width:this.offsetWidth+\"px\",height:this.offsetHeight+\"px\",position:\"absolute\",opacity:\"0.001\",zIndex:1e3}).css(t(this).offset()).appendTo(\"body\")}),!0):!1)},_mouseStart:function(e){var n=this.options;return this.helper=this._createHelper(e),this.helper.addClass(\"ui-draggable-dragging\"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css(\"position\"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger(\"start\",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,n){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo(\"absolute\"),!n){var i=this._uiHash();if(this._trigger(\"drag\",e,i)===!1)return this._mouseUp({}),!1;this.position=i.position}return this.options.axis&&\"y\"===this.options.axis||(this.helper[0].style.left=this.position.left+\"px\"),this.options.axis&&\"x\"===this.options.axis||(this.helper[0].style.top=this.position.top+\"px\"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var n,i=this,r=!1,o=!1;for(t.ui.ddmanager&&!this.options.dropBehaviour&&(o=t.ui.ddmanager.drop(this,e)),this.dropped&&(o=this.dropped,this.dropped=!1),n=this.element[0];n&&(n=n.parentNode);)n===document&&(r=!0);return r||\"original\"!==this.options.helper?(\"invalid\"===this.options.revert&&!o||\"valid\"===this.options.revert&&o||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,o)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger(\"stop\",e)!==!1&&i._clear()}):this._trigger(\"stop\",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t(\"div.ui-draggable-iframeFix\").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(\".ui-draggable-dragging\")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){var n=this.options.handle&&t(this.options.handle,this.element).length?!1:!0;return t(this.options.handle,this.element).find(\"*\").addBack().each(function(){this===e.target&&(n=!0)}),n},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e])):\"clone\"===n.helper?this.element.clone().removeAttr(\"id\"):this.element;return i.parents(\"body\").length||i.appendTo(\"parent\"===n.appendTo?this.element[0].parentNode:n.appendTo),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css(\"position\"))||i.css(\"position\",\"absolute\"),i},_adjustOffsetFromHelper:function(e){\"string\"==typeof e&&(e=e.split(\" \")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),\"left\"in e&&(this.offset.click.left=e.left+this.margins.left),\"right\"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),\"top\"in e&&(this.offset.click.top=e.top+this.margins.top),\"bottom\"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return\"absolute\"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&\"html\"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css(\"borderTopWidth\"),10)||0),left:e.left+(parseInt(this.offsetParent.css(\"borderLeftWidth\"),10)||0)}},_getRelativeOffset:function(){if(\"relative\"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css(\"top\"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css(\"left\"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css(\"marginLeft\"),10)||0,top:parseInt(this.element.css(\"marginTop\"),10)||0,right:parseInt(this.element.css(\"marginRight\"),10)||0,bottom:parseInt(this.element.css(\"marginBottom\"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,r=this.options;if(\"parent\"===r.containment&&(r.containment=this.helper[0].parentNode),(\"document\"===r.containment||\"window\"===r.containment)&&(this.containment=[\"document\"===r.containment?0:t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,\"document\"===r.containment?0:t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(\"document\"===r.containment?0:t(window).scrollLeft())+t(\"document\"===r.containment?document:window).width()-this.helperProportions.width-this.margins.left,(\"document\"===r.containment?0:t(window).scrollTop())+(t(\"document\"===r.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||r.containment.constructor===Array)r.containment.constructor===Array&&(this.containment=r.containment);else{if(n=t(r.containment),i=n[0],!i)return;e=\"hidden\"!==t(i).css(\"overflow\"),this.containment=[(parseInt(t(i).css(\"borderLeftWidth\"),10)||0)+(parseInt(t(i).css(\"paddingLeft\"),10)||0),(parseInt(t(i).css(\"borderTopWidth\"),10)||0)+(parseInt(t(i).css(\"paddingTop\"),10)||0),(e?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t(i).css(\"borderLeftWidth\"),10)||0)-(parseInt(t(i).css(\"paddingRight\"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t(i).css(\"borderTopWidth\"),10)||0)-(parseInt(t(i).css(\"paddingBottom\"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}},_convertPositionTo:function(e,n){n||(n=this.position);var i=\"absolute\"===e?1:-1,r=\"absolute\"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i}},_generatePosition:function(e){var n,i,r,o,s=this.options,a=\"absolute\"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName),c=e.pageX,h=e.pageY;return this.originalPosition&&(this.containment&&(this.relative_container?(i=this.relative_container.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.left<n[0]&&(c=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(h=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(c=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(h=n[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,h=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((c-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,c=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-s.grid[0]:o+s.grid[0]:o)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:c-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}\n",
        "                },_clear:function(){this.helper.removeClass(\"ui-draggable-dragging\"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,n,i){return i=i||this._uiHash(),t.ui.plugin.call(this,e,[n,i]),\"drag\"===e&&(this.positionAbs=this._convertPositionTo(\"absolute\")),t.Widget.prototype._trigger.call(this,e,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add(\"draggable\",\"connectToSortable\",{start:function(e,n){var i=t(this).data(\"ui-draggable\"),r=i.options,o=t.extend({},n,{item:i.element});i.sortables=[],t(r.connectToSortable).each(function(){var n=t.data(this,\"ui-sortable\");n&&!n.options.disabled&&(i.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger(\"activate\",e,o))})},stop:function(e,n){var i=t(this).data(\"ui-draggable\"),r=t.extend({},n,{item:i.element});t.each(i.sortables,function(){this.instance.isOver?(this.instance.isOver=0,i.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,\"original\"===i.options.helper&&this.instance.currentItem.css({top:\"auto\",left:\"auto\"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger(\"deactivate\",e,r))})},drag:function(e,n){var i=t(this).data(\"ui-draggable\"),r=this;t.each(i.sortables,function(){var o=!1,s=this;this.instance.positionAbs=i.positionAbs,this.instance.helperProportions=i.helperProportions,this.instance.offset.click=i.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(i.sortables,function(){return this.instance.positionAbs=i.positionAbs,this.instance.helperProportions=i.helperProportions,this.instance.offset.click=i.offset.click,this!==s&&this.instance._intersectsWith(this.instance.containerCache)&&t.ui.contains(s.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(r).clone().removeAttr(\"id\").appendTo(this.instance.element).data(\"ui-sortable-item\",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=i.offset.click.top,this.instance.offset.click.left=i.offset.click.left,this.instance.offset.parent.left-=i.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=i.offset.parent.top-this.instance.offset.parent.top,i._trigger(\"toSortable\",e),i.dropped=this.instance.element,i.currentItem=i.element,this.instance.fromOutside=i),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger(\"out\",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),i._trigger(\"fromSortable\",e),i.dropped=!1)})}}),t.ui.plugin.add(\"draggable\",\"cursor\",{start:function(){var e=t(\"body\"),n=t(this).data(\"ui-draggable\").options;e.css(\"cursor\")&&(n._cursor=e.css(\"cursor\")),e.css(\"cursor\",n.cursor)},stop:function(){var e=t(this).data(\"ui-draggable\").options;e._cursor&&t(\"body\").css(\"cursor\",e._cursor)}}),t.ui.plugin.add(\"draggable\",\"opacity\",{start:function(e,n){var i=t(n.helper),r=t(this).data(\"ui-draggable\").options;i.css(\"opacity\")&&(r._opacity=i.css(\"opacity\")),i.css(\"opacity\",r.opacity)},stop:function(e,n){var i=t(this).data(\"ui-draggable\").options;i._opacity&&t(n.helper).css(\"opacity\",i._opacity)}}),t.ui.plugin.add(\"draggable\",\"scroll\",{start:function(){var e=t(this).data(\"ui-draggable\");e.scrollParent[0]!==document&&\"HTML\"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var n=t(this).data(\"ui-draggable\"),i=n.options,r=!1;n.scrollParent[0]!==document&&\"HTML\"!==n.scrollParent[0].tagName?(i.axis&&\"x\"===i.axis||(n.overflowOffset.top+n.scrollParent[0].offsetHeight-e.pageY<i.scrollSensitivity?n.scrollParent[0].scrollTop=r=n.scrollParent[0].scrollTop+i.scrollSpeed:e.pageY-n.overflowOffset.top<i.scrollSensitivity&&(n.scrollParent[0].scrollTop=r=n.scrollParent[0].scrollTop-i.scrollSpeed)),i.axis&&\"y\"===i.axis||(n.overflowOffset.left+n.scrollParent[0].offsetWidth-e.pageX<i.scrollSensitivity?n.scrollParent[0].scrollLeft=r=n.scrollParent[0].scrollLeft+i.scrollSpeed:e.pageX-n.overflowOffset.left<i.scrollSensitivity&&(n.scrollParent[0].scrollLeft=r=n.scrollParent[0].scrollLeft-i.scrollSpeed))):(i.axis&&\"x\"===i.axis||(e.pageY-t(document).scrollTop()<i.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-i.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<i.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+i.scrollSpeed))),i.axis&&\"y\"===i.axis||(e.pageX-t(document).scrollLeft()<i.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-i.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<i.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+i.scrollSpeed)))),r!==!1&&t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add(\"draggable\",\"snap\",{start:function(){var e=t(this).data(\"ui-draggable\"),n=e.options;e.snapElements=[],t(n.snap.constructor!==String?n.snap.items||\":data(ui-draggable)\":n.snap).each(function(){var n=t(this),i=n.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:n.outerWidth(),height:n.outerHeight(),top:i.top,left:i.left})})},drag:function(e,n){var i,r,o,s,a,l,c,h,u,p,d=t(this).data(\"ui-draggable\"),f=d.options,_=f.snapTolerance,g=n.offset.left,m=g+d.helperProportions.width,v=n.offset.top,y=v+d.helperProportions.height;for(u=d.snapElements.length-1;u>=0;u--)a=d.snapElements[u].left,l=a+d.snapElements[u].width,c=d.snapElements[u].top,h=c+d.snapElements[u].height,g>a-_&&l+_>g&&v>c-_&&h+_>v||g>a-_&&l+_>g&&y>c-_&&h+_>y||m>a-_&&l+_>m&&v>c-_&&h+_>v||m>a-_&&l+_>m&&y>c-_&&h+_>y?(\"inner\"!==f.snapMode&&(i=Math.abs(c-y)<=_,r=Math.abs(h-v)<=_,o=Math.abs(a-m)<=_,s=Math.abs(l-g)<=_,i&&(n.position.top=d._convertPositionTo(\"relative\",{top:c-d.helperProportions.height,left:0}).top-d.margins.top),r&&(n.position.top=d._convertPositionTo(\"relative\",{top:h,left:0}).top-d.margins.top),o&&(n.position.left=d._convertPositionTo(\"relative\",{top:0,left:a-d.helperProportions.width}).left-d.margins.left),s&&(n.position.left=d._convertPositionTo(\"relative\",{top:0,left:l}).left-d.margins.left)),p=i||r||o||s,\"outer\"!==f.snapMode&&(i=Math.abs(c-v)<=_,r=Math.abs(h-y)<=_,o=Math.abs(a-g)<=_,s=Math.abs(l-m)<=_,i&&(n.position.top=d._convertPositionTo(\"relative\",{top:c,left:0}).top-d.margins.top),r&&(n.position.top=d._convertPositionTo(\"relative\",{top:h-d.helperProportions.height,left:0}).top-d.margins.top),o&&(n.position.left=d._convertPositionTo(\"relative\",{top:0,left:a}).left-d.margins.left),s&&(n.position.left=d._convertPositionTo(\"relative\",{top:0,left:l-d.helperProportions.width}).left-d.margins.left)),!d.snapElements[u].snapping&&(i||r||o||s||p)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,e,t.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=i||r||o||s||p):(d.snapElements[u].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,e,t.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=!1)}}),t.ui.plugin.add(\"draggable\",\"stack\",{start:function(){var e,n=t(this).data(\"ui-draggable\").options,i=t.makeArray(t(n.stack)).sort(function(e,n){return(parseInt(t(e).css(\"zIndex\"),10)||0)-(parseInt(t(n).css(\"zIndex\"),10)||0)});i.length&&(e=parseInt(i[0].style.zIndex,10)||0,t(i).each(function(t){this.style.zIndex=e+t}),this[0].style.zIndex=e+i.length)}}),t.ui.plugin.add(\"draggable\",\"zIndex\",{start:function(e,n){var i=t(n.helper),r=t(this).data(\"ui-draggable\").options;i.css(\"zIndex\")&&(r._zIndex=i.css(\"zIndex\")),i.css(\"zIndex\",r.zIndex)},stop:function(e,n){var i=t(this).data(\"ui-draggable\").options;i._zIndex&&t(n.helper).css(\"zIndex\",i._zIndex)}})}(t)}),n(\"jquery_ui/droppable\",[\"jquery\",\"./core\",\"./widget\",\"./mouse\",\"./draggable\"],function(t){!function(t){function e(t,e,n){return t>e&&e+n>t}t.widget(\"ui.droppable\",{version:\"1.10.0\",widgetEventPrefix:\"drop\",options:{accept:\"*\",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:\"default\",tolerance:\"intersect\",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,n=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass(\"ui-droppable\")},_destroy:function(){for(var e=0,n=t.ui.ddmanager.droppables[this.options.scope];e<n.length;e++)n[e]===this&&n.splice(e,1);this.element.removeClass(\"ui-droppable ui-droppable-disabled\")},_setOption:function(e,n){\"accept\"===e&&(this.accept=t.isFunction(n)?n:function(t){return t.is(n)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var n=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger(\"activate\",e,this.ui(n))},_deactivate:function(e){var n=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger(\"deactivate\",e,this.ui(n))},_over:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger(\"over\",e,this.ui(n)))},_out:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger(\"out\",e,this.ui(n)))},_drop:function(e,n){var i=n||t.ui.ddmanager.current,r=!1;return i&&(i.currentItem||i.element)[0]!==this.element[0]?(this.element.find(\":data(ui-droppable)\").not(\".ui-draggable-dragging\").each(function(){var e=t.data(this,\"ui-droppable\");return e.options.greedy&&!e.options.disabled&&e.options.scope===i.options.scope&&e.accept.call(e.element[0],i.currentItem||i.element)&&t.ui.intersect(i,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(r=!0,!1):void 0}),r?!1:this.accept.call(this.element[0],i.currentItem||i.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger(\"drop\",e,this.ui(i)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,n,i){if(!n.offset)return!1;var r,o,s=(t.positionAbs||t.position.absolute).left,a=s+t.helperProportions.width,l=(t.positionAbs||t.position.absolute).top,c=l+t.helperProportions.height,h=n.offset.left,u=h+n.proportions.width,p=n.offset.top,d=p+n.proportions.height;switch(i){case\"fit\":return s>=h&&u>=a&&l>=p&&d>=c;case\"intersect\":return h<s+t.helperProportions.width/2&&a-t.helperProportions.width/2<u&&p<l+t.helperProportions.height/2&&c-t.helperProportions.height/2<d;case\"pointer\":return r=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,p,n.proportions.height)&&e(r,h,n.proportions.width);case\"touch\":return(l>=p&&d>=l||c>=p&&d>=c||p>l&&c>d)&&(s>=h&&u>=s||a>=h&&u>=a||h>s&&a>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{\"default\":[]},prepareOffsets:function(e,n){var i,r,o=t.ui.ddmanager.droppables[e.options.scope]||[],s=n?n.type:null,a=(e.currentItem||e.element).find(\":data(ui-droppable)\").addBack();t:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||e&&!o[i].accept.call(o[i].element[0],e.currentItem||e.element))){for(r=0;r<a.length;r++)if(a[r]===o[i].element[0]){o[i].proportions.height=0;continue t}o[i].visible=\"none\"!==o[i].element.css(\"display\"),o[i].visible&&(\"mousedown\"===s&&o[i]._activate.call(o[i],n),o[i].offset=o[i].element.offset(),o[i].proportions={width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight})}},drop:function(e,n){var i=!1;return t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(i=this._drop.call(this,n)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))}),i},dragStart:function(e,n){e.element.parentsUntil(\"body\").bind(\"scroll.droppable\",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)})},drag:function(e,n){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,n),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var i,r,o,s=t.ui.intersect(e,this,this.options.tolerance),a=!s&&this.isover?\"isout\":s&&!this.isover?\"isover\":null;a&&(this.options.greedy&&(r=this.options.scope,o=this.element.parents(\":data(ui-droppable)\").filter(function(){return t.data(this,\"ui-droppable\").options.scope===r}),o.length&&(i=t.data(o[0],\"ui-droppable\"),i.greedyChild=\"isover\"===a)),i&&\"isover\"===a&&(i.isover=!1,i.isout=!0,i._out.call(i,n)),this[a]=!0,this[\"isout\"===a?\"isover\":\"isout\"]=!1,this[\"isover\"===a?\"_over\":\"_out\"].call(this,n),i&&\"isout\"===a&&(i.isout=!1,i.isover=!0,i._over.call(i,n)))}})},dragStop:function(e,n){e.element.parentsUntil(\"body\").unbind(\"scroll.droppable\"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}}}(t)}),n(\"widget/crossfiltertemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<div class=\"bk-crossfilter-container\">\\n  <table>\\n    <tr>\\n      <td class=\"aligntable\">\\n        <div class=\"bk-crossfilter-configuration bk-bs-container\">\\n          <div class=\"bk-crossfilter-row\">\\n            <div class=\"col-md-4 bk-column-list\">\\n            </div>\\n            <div class=\"col-md-5 bk-filters-facets\">\\n              <div class=\"bk-bs-panel bk-bs-panel-primary bk-filters\">\\n                <div class=\"bk-bs-panel-heading bk-crossfilter-panel-heading\">\\n                  Filter\\n                </div>\\n                <div class=\"bk-bs-panel-body bk-filters-selections\">\\n                </div>\\n              </div>\\n              <div class=\"bk-bs-panel bk-bs-panel-primary bk-facet bk-facet-x\">\\n                <div class=\"bk-bs-panel-heading bk-crossfilter-panel-heading\">\\n                  Facet X\\n                </div>\\n                <div class=\"bk-facets-selections \">\\n                </div>\\n              </div>\\n              <div class=\"bk-bs-panel bk-bs-panel-primary bk-facet bk-facet-y\">\\n                <div class=\"bk-bs-panel-heading bk-crossfilter-panel-heading\">\\n                  Facet Y\\n                </div>\\n                <div class=\"bk-facets-selections \">\\n                </div>\\n              </div>\\n              <div class=\"bk-bs-panel bk-bs-panel-primary bk-facet bk-facet-tab\">\\n                <div class=\"bk-bs-panel-heading bk-crossfilter-panel-heading\">\\n                  Facet Tab (Coming Soon)\\n                </div>\\n                <div class=\"bk-facets-selections \">\\n                </div>\\n              </div>\\n            </div>\\n            <div class=\"col-md-3 bk-plot-selection\">\\n              <form class=\"bk-widget-form\">\\n                <div class=\"bk-plot-selector\">\\n                </div>\\n                <div class=\"bk-x-selector\">\\n                </div>\\n                <div class=\"bk-y-selector\">\\n                </div>\\n                <div class=\"bk-agg-selector\">\\n                </div>\\n              </form>\\n            </div>\\n          </div>\\n        </div>\\n      </td>\\n      <td class=\"aligntable\">\\n        <div class=\"bk-plot\">\\n        </div>\\n      </td>\\n    </tr>\\n  </table>\\n</div>\\n'))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),n(\"widget/discretecolumntemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<div class=\"bk-bs-panel-heading bk-crossfilter-panel-heading\">\\n  Factor: ')),i(this.name),i(e('\\n</div>\\n<div class=\"bk-bs-panel-body\">\\n  <table class=\"bk-table\">\\n    <tbody>\\n      <tr>\\n        <td>\\n          count\\n        </td>\\n        <td>\\n          ')),i(this.count),i(e(\"\\n        </td>\\n      </tr>\\n      <tr>\\n        <td>\\n          unique\\n        </td>\\n        <td>\\n          \")),i(this.unique),i(e(\"\\n        </td>\\n      </tr>\\n      <tr>\\n        <td>\\n          top\\n        </td>\\n        <td>\\n          \")),i(this.top),i(e(\"\\n        </td>\\n      </tr>\\n      <tr>\\n        <td>\\n          freq\\n        </td>\\n        <td>\\n          \")),i(this.freq),i(e(\"\\n        </td>\\n      </tr>\\n    </tbody>\\n  </table>\\n</div>\\n</div>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),n(\"widget/continuouscolumntemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<div class=\"bk-bs-panel-heading bk-crossfilter-panel-heading\">\\n  Continuous: ')),i(this.name),i(e('\\n</div>\\n<div class=\"bk-bs-panel-body\">\\n  <table class=\"bk-table\">\\n    <tbody>\\n      <tr>\\n        <td>\\n          count\\n        </td>\\n        <td>\\n          ')),i(this.count),i(e(\"\\n        </td>\\n      </tr>\\n      <tr>\\n        <td>\\n          mean\\n        </td>\\n        <td>\\n          \")),i(this.mean),i(e(\"\\n        </td>\\n      </tr>\\n      <tr>\\n        <td>\\n          std\\n        </td>\\n        <td>\\n          \")),i(this.std),i(e(\"\\n        </td>\\n      </tr>\\n      <tr>\\n        <td>\\n          max\\n        </td>\\n        <td>\\n          \")),i(this.max),i(e(\"\\n        </td>\\n      </tr>\\n      <tr>\\n        <td>\\n          min\\n        </td>\\n        <td>\\n          \")),i(this.min),i(e(\"\\n        </td>\\n      </tr>\\n    </tbody>\\n  </table>\\n</div>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),n(\"widget/facetcolumntemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(this.name),i(e(\" &nbsp; [x]\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e},i=function(t,e){return function(){return t.apply(e,arguments)}};n(\"widget/crossfilter\",[\"common/has_parent\",\"common/has_properties\",\"common/continuum_view\",\"common/build_views\",\"backbone\",\"underscore\",\"jquery_ui/draggable\",\"jquery_ui/droppable\",\"./crossfiltertemplate\",\"./discretecolumntemplate\",\"./continuouscolumntemplate\",\"./facetcolumntemplate\"],function(n,r,o,s,a,l,c,h,u,p,d,f){var _,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z,F,L,V,B,W,$,q,U,Y,G,X;return w=o.View,_=o.CloseWrapper,k=function(t){function n(){return j=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.tag=\"div\",n.prototype.attributes={\"class\":\"bk-crossfilter\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.views={},this.listenTo(this.model,\"change:plot\",this.render_plot),this.render(),this.render_plot(),this},n.prototype.render_plot=function(){var t,e;return t=this.mget_obj(\"plot\"),e=new t.default_view({model:t}),this.$el.find(\".bk-plot\").empty(),this.$el.find(\".bk-plot\").append(e.$el)},n.prototype.render=function(){var t;return null!=this.columnview&&this.columnview.$el.detach(),this.$el.empty(),t=u(),this.$el.html(t),this.filterview=new M({el:this.$(\".bk-filters\"),collection:this.model.columns,model:this.model}),this.facetsview=new D({el:this.$el,model:this.model}),this.plotattributeview=new E({el:this.$el,model:this.model}),this.columnview=new v({collection:this.model.columns}),this.$(\".bk-column-list\").append(this.columnview.el),this.$(\".bk-crossfilter-configuration\").height(this.mget(\"height\")),this.$(\".bk-crossfilter-configuration\").width(500),this},n}(w),x=function(t){function n(){return this._set_columns=i(this._set_columns,this),N=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),this.columns=new g,this._set_columns(),this.listenTo(this,\"change:columns\",this._set_columns),console.log(this.columns.models)},n.prototype._set_columns=function(){return this.columns.reset(this.get(\"columns\"))},n.prototype.type=\"CrossFilter\",n.prototype.default_view=k,n.prototype.defaults={height:700,width:1300},n}(n),C=function(t){function n(){return B=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=x,n}(a.Collection),R=new C,E=function(t){function n(){return W=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.listenTo(this.model,\"change:plot_selector\",this.render_plot_selector),this.listenTo(this.model,\"change:x_selector\",this.render_x_selector),this.listenTo(this.model,\"change:y_selector\",this.render_y_selector),this.listenTo(this.model,\"change:agg_selector\",this.render_agg_selector),this.render_plot_selector(),this.render_x_selector(),this.render_y_selector(),this.render_agg_selector()},n.prototype.render_selector=function(t,e){return t.empty(),e?(this.plot_selector_view=new e.default_view({model:e}),t.append(this.plot_selector_view.$el)):void 0},n.prototype.render_plot_selector=function(){var t,e;return e=this.$(\".bk-plot-selector\"),t=this.mget_obj(\"plot_selector\"),this.render_selector(e,t)},n.prototype.render_x_selector=function(){var t,e;return e=this.$(\".bk-x-selector\"),t=this.mget_obj(\"x_selector\"),this.render_selector(e,t)},n.prototype.render_y_selector=function(){var t,e;return e=this.$(\".bk-y-selector\"),t=this.mget_obj(\"y_selector\"),this.render_selector(e,t)},n.prototype.render_agg_selector=function(){var t,e;return e=this.$(\".bk-agg-selector\"),t=this.mget_obj(\"agg_selector\"),this.render_selector(e,t)},n}(w),v=function(t){function n(){return $=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.views={},this.listenTo(this.collection,\"all\",this.render),this.render(),this},n.prototype.render=function(){var t=this;return l.map(this.views,function(t){return t.$el.detach()}),s(this.views,this.collection.models),l.map(this.collection.models,function(e){return t.$el.append(t.views[e.id].$el)}),this},n}(a.View),A=function(t){function n(){return q=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.events={click:\"remove\"},n.prototype.tagName=\"span\",n.prototype.attributes={\"class\":\"bk-facet-label\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.name=t.name,this.render()},n.prototype.render=function(){return this.$el.html(f({name:this.name}))},n}(w),D=function(t){function n(){return this.drop_tab=i(this.drop_tab,this),this.drop_y=i(this.drop_y,this),this.drop_x=i(this.drop_x,this),this.drop=i(this.drop,this),this.add_facet=i(this.add_facet,this),this.remove_facet=i(this.remove_facet,this),U=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render_init(),this.render_all_facets(),this.listenTo(this.model,\"change:facet_x\",this.render_all_facets),this.listenTo(this.model,\"change:facet_y\",this.render_all_facets),this.listenTo(this.model,\"change:facet_tab\",this.render_all_facets)},n.prototype.render_init=function(){return this.facet_x_node=this.$(\".bk-facet-x\"),this.facet_y_node=this.$(\".bk-facet-y\"),this.facet_tab_node=this.$(\".bk-facet-tab\"),this.facet_x_node.droppable({drop:this.drop_x,tolerance:\"pointer\",hoverClass:\"bk-droppable-hover\"}),this.facet_y_node.droppable({drop:this.drop_y,tolerance:\"pointer\",hoverClass:\"bk-droppable-hover\"}),this.facet_tab_node.droppable({drop:this.drop_tab,tolerance:\"pointer\",hoverClass:\"bk-droppable-hover\"})},n.prototype.render_all_facets=function(){this.render_facets(this.facet_x_node,\"facet_x\",this.model.get(\"facet_x\")),this.render_facets(this.facet_y_node,\"facet_y\",this.model.get(\"facet_y\")),this.render_facets(this.facet_tab_node,\"facet_tab\",this.model.get(\"facet_tab\"))},n.prototype.render_facets=function(t,e,n){var i,r,o,s,a;for(t=t.find(\".bk-facets-selections\"),t.empty(),a=[],o=0,s=n.length;s>o;o++)i=n[o],r=new A({name:i}),this.listenTo(r,\"remove\",function(){var t;return this.remove_facet(i,t=!0)}),a.push(t.append(r.$el));return a},n.prototype.remove_facet=function(t,e){var n,i,r,o,s,a;for(null==e&&(e=!0),a=[\"facet_x\",\"facet_y\",\"facet_tab\"],o=0,s=a.length;s>o;o++)i=a[o],n=l.clone(this.model.get(i)),n=function(){var e,i,o;for(o=[],e=0,i=n.length;i>e;e++)r=n[e],r!==t&&o.push(r);return o}(),this.model.set(i,n);return e?this.model.save():void 0},n.prototype.add_facet=function(t,e){var n,i;return this.remove_facet(e,i=!1),n=l.clone(this.model.get(t)),n.indexOf(e)<0&&(n.push(e),this.model.set(t,n)),this.model.save()},n.prototype.drop=function(t,e,n){var i,r;return i=n.helper.data(\"model\"),r=i.get(\"name\"),this.add_facet(t,r)},n.prototype.drop_x=function(t,e){return this.drop(\"facet_x\",t,e)},n.prototype.drop_y=function(t,e){return this.drop(\"facet_y\",t,e)},n.prototype.drop_tab=function(t,e){return this.drop(\"facet_tab\",t,e)},n}(w),M=function(n){function r(){return this.drop=i(this.drop,this),Y=r.__super__.constructor.apply(this,arguments)}return e(r,n),r.prototype.initialize=function(t){return r.__super__.initialize.call(this,t),this.views={},this.render(),this.render_columns_selectors,this.listenTo(this.model,\"change:filter_widgets\",this.render_column_selectors)},r.prototype.drop=function(t,e){var n,i;return n=e.helper.data(\"model\"),i=l.clone(this.model.get(\"filtering_columns\")),i.push(n.get(\"name\")),this.model.set(\"filtering_columns\",i),this.model.save()},r.prototype.render=function(){return this.$el.droppable({drop:this.drop,tolerance:\"pointer\",hoverClass:\"bk-droppable-hover\"})},r.prototype.render_column_selectors=function(){var e,n,i,r,o,a,c,h,u=this;l.map(this.views,function(t){return t.$el.detach()}),this.$el.find(\".bk-filters-selections\").empty(),n={},h=this.mget(\"filter_widgets\");for(o in h)t.call(h,o)&&(c=h[o],n[o]=this.model.resolve_ref(c));return r=this.mget(\"filtering_columns\"),i=function(){var t,i,o;for(o=[],t=0,i=r.length;i>t;t++)e=r[t],null!=n[e]&&o.push(n[e]);return o}(),a=s(this.views,i),l.map(a,function(t){return u.listenTo(t,\"remove\",u.child_remove)}),l.map(i,function(t){var e;return e=new _({view:u.views[t.id]}),u.$el.find(\".bk-filters-selections\").append(e.$el)})},r.prototype.child_remove=function(e){var n,i,r,o,s,a;a=this.mget(\"filter_widgets\");for(n in a)if(t.call(a,n)&&(s=a[n],i=this.model.resolve_ref(s),i===e.model)){o=n;break}return r=l.filter(this.mget(\"filtering_columns\"),function(t){return t!==o}),this.mset(\"filtering_columns\",r),this.model.save()},r}(w),g=function(t){function n(){return G=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=function(t){return\"DiscreteColumn\"===t.type?new S(t):\"TimeColumn\"===t.type?new P(t):new y(t)},n}(a.Collection),m=function(t){function n(){return this.dragging_helper=i(this.dragging_helper,this),X=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"bk-crossfilter-column-entry bk-bs-panel bk-bs-panel-primary\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render()},n.prototype.dragging_helper=function(){var t;return t=this.$el.clone()},n.prototype.render=function(){var t=this;return this.$el.html(this.template(this.model.attributes)),this.$el.draggable({appendTo:\"body\",containment:\"document\",helper:\"clone\",start:function(e,n){return n.helper.data(\"model\",t.model)}}),this},n}(w),O=function(t){function n(){return H=n.__super__.constructor.apply(this,arguments)}return e(n,t),n}(m),T=function(t){function n(){return I=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.template=p,n}(m),b=function(t){function n(){return z=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.template=d,n}(m),P=function(t){function n(){return F=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.idAttribute=\"name\",n.prototype.default_view=O,n.prototype.defaults={type:\"TimeColumn\",name:\"\",count:0,unique:0,first:0,last:0},n}(r),S=function(t){function n(){return L=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.idAttribute=\"name\",n.prototype.default_view=T,n.prototype.defaults={type:\"DiscreteColumn\",name:\"\",count:0,unique:0,top:0,freq:0},n}(r),y=function(t){function n(){return V=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.idAttribute=\"name\",n.prototype.default_view=b,n.prototype.defaults={type:\"ContinuousColumn\",name:\"\",count:0,mean:0,std:0,min:0,max:0},n}(r),{Model:x,Collection:R,View:k}})}.call(this),n(\"widget/multiselecttemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){var t,n,r,o;for(i(e('<label for=\"')),i(this.id),i(e('\"> ')),i(this.title),i(e(' </label>\\n<select multiple class=\"bk-widget-form-input\" id=\"')),i(this.id),i(e('\" name=\"')),i(this.name),i(e('\">\\n  ')),o=this.options,n=0,r=o.length;r>n;n++)t=o[n],i(e(\"\\n  \")),t.value===this.value?(i(e('\\n  <option selected=\"selected\" value=\"')),i(t.value),i(e('\">')),i(t.name),i(e(\"</option>\\n  \"))):(i(e('\\n  <option value=\"')),i(t.value),i(e('\">')),i(t.name),i(e(\"</option> \\n  \"))),i(e(\"\\n\\n  \"));i(e(\"\\n</select>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e\n",
        "                }for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/multiselect\",[\"common/has_parent\",\"common/continuum_view\",\"backbone\",\"underscore\",\"./multiselecttemplate\"],function(t,n,i,r,o){var s,a,l,c,h,u,p,d;return s=n.View,l=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.events={\"change select\":\"change_input\"},n.prototype.change_input=function(){return this.mset(\"value\",this.$(\"select\").val(),{silent:!0}),this.model.save()},n.prototype.tagName=\"div\",n.prototype.template=o,n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,\"change:value\",this.render_selection),this.listenTo(this.model,\"change:options\",this.render),this.listenTo(this.model,\"change:name\",this.render),this.listenTo(this.model,\"change:title\",this.render)},n.prototype.render=function(){var t;return this.$el.empty(),t=this.template(this.model.attributes),this.$el.html(t),this.render_selection(),this},n.prototype.render_selection=function(){var t;return t={},r.map(this.mget(\"value\"),function(e){return t[e]=!0}),this.$(\"option\").each(function(e){return e=$(e),t[e.attr(\"value\")]?e.attr(\"selected\",\"selected\"):void 0})},n}(s),a=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"MultiSelect\",n.prototype.default_view=l,n.prototype.defaults=function(){var t;return t={title:\"\",value:[],options:[]}},n}(t),c=function(t){function n(){return d=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(i.Collection),h=new c,{Model:a,Collection:h,View:l}})}.call(this),function(t){\"function\"==typeof n&&n.amd?n(\"jquery_mousewheel\",[\"jquery\"],t):\"object\"==typeof exports?module.exports=t:t(jQuery)}(function(t){function e(e){var s=e||window.event,a=l.call(arguments,1),c=0,h=0,u=0,p=0;if(e=t.event.fix(s),e.type=\"mousewheel\",\"detail\"in s&&(u=-1*s.detail),\"wheelDelta\"in s&&(u=s.wheelDelta),\"wheelDeltaY\"in s&&(u=s.wheelDeltaY),\"wheelDeltaX\"in s&&(h=-1*s.wheelDeltaX),\"axis\"in s&&s.axis===s.HORIZONTAL_AXIS&&(h=-1*u,u=0),c=0===u?h:u,\"deltaY\"in s&&(u=-1*s.deltaY,c=u),\"deltaX\"in s&&(h=s.deltaX,0===u&&(c=-1*h)),0!==u||0!==h){if(1===s.deltaMode){var d=t.data(this,\"mousewheel-line-height\");c*=d,u*=d,h*=d}else if(2===s.deltaMode){var f=t.data(this,\"mousewheel-page-height\");c*=f,u*=f,h*=f}return p=Math.max(Math.abs(u),Math.abs(h)),(!o||o>p)&&(o=p,i(s,p)&&(o/=40)),i(s,p)&&(c/=40,h/=40,u/=40),c=Math[c>=1?\"floor\":\"ceil\"](c/o),h=Math[h>=1?\"floor\":\"ceil\"](h/o),u=Math[u>=1?\"floor\":\"ceil\"](u/o),e.deltaX=h,e.deltaY=u,e.deltaFactor=o,e.deltaMode=0,a.unshift(e,c,h,u),r&&clearTimeout(r),r=setTimeout(n,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function n(){o=null}function i(t,e){return h.settings.adjustOldDeltas&&\"mousewheel\"===t.type&&e%120===0}var r,o,s=[\"wheel\",\"mousewheel\",\"DOMMouseScroll\",\"MozMousePixelScroll\"],a=\"onwheel\"in document||document.documentMode>=9?[\"wheel\"]:[\"mousewheel\",\"DomMouseScroll\",\"MozMousePixelScroll\"],l=Array.prototype.slice;if(t.event.fixHooks)for(var c=s.length;c;)t.event.fixHooks[s[--c]]=t.event.mouseHooks;var h=t.event.special.mousewheel={version:\"3.1.9\",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],e,!1);else this.onmousewheel=e;t.data(this,\"mousewheel-line-height\",h.getLineHeight(this)),t.data(this,\"mousewheel-page-height\",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=a.length;t;)this.removeEventListener(a[--t],e,!1);else this.onmousewheel=null},getLineHeight:function(e){return parseInt(t(e)[\"offsetParent\"in t.fn?\"offsetParent\":\"parent\"]().css(\"fontSize\"),10)},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind(\"mousewheel\",t):this.trigger(\"mousewheel\")},unmousewheel:function(t){return this.unbind(\"mousewheel\",t)}})}),function(t){n(\"jqrangeslider\",[\"jquery_ui/core\",\"jquery_ui/widget\",\"jquery_ui/mouse\",\"jquery_mousewheel\"],function(){return function(){return!function(t){t.widget(\"ui.rangeSliderMouseTouch\",t.ui.mouse,{enabled:!0,_mouseInit:function(){var e=this;t.ui.mouse.prototype._mouseInit.apply(this),this._mouseDownEvent=!1,this.element.bind(\"touchstart.\"+this.widgetName,function(t){return e._touchStart(t)})},_mouseDestroy:function(){t(document).unbind(\"touchmove.\"+this.widgetName,this._touchMoveDelegate).unbind(\"touchend.\"+this.widgetName,this._touchEndDelegate),t.ui.mouse.prototype._mouseDestroy.apply(this)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),t.ui.mouse.prototype.destroy.apply(this),this._mouseInit=null},_touchStart:function(e){if(!this.enabled)return!1;e.which=1,e.preventDefault(),this._fillTouchEvent(e);var n=this,i=this._mouseDownEvent;this._mouseDown(e),i!==this._mouseDownEvent&&(this._touchEndDelegate=function(t){n._touchEnd(t)},this._touchMoveDelegate=function(t){n._touchMove(t)},t(document).bind(\"touchmove.\"+this.widgetName,this._touchMoveDelegate).bind(\"touchend.\"+this.widgetName,this._touchEndDelegate))},_mouseDown:function(e){return this.enabled?t.ui.mouse.prototype._mouseDown.apply(this,[e]):!1},_touchEnd:function(e){this._fillTouchEvent(e),this._mouseUp(e),t(document).unbind(\"touchmove.\"+this.widgetName,this._touchMoveDelegate).unbind(\"touchend.\"+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,t(document).trigger(\"mouseup\")},_touchMove:function(t){return t.preventDefault(),this._fillTouchEvent(t),this._mouseMove(t)},_fillTouchEvent:function(t){var e;e=\"undefined\"==typeof t.targetTouches&&\"undefined\"==typeof t.changedTouches?t.originalEvent.targetTouches[0]||t.originalEvent.changedTouches[0]:t.targetTouches[0]||t.changedTouches[0],t.pageX=e.pageX,t.pageY=e.pageY}})}(jQuery),function(t){t.widget(\"ui.rangeSliderDraggable\",t.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){t.ui.rangeSliderMouseTouch.prototype._create.apply(this),setTimeout(t.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,t.ui.rangeSliderMouseTouch.prototype.destroy.apply(this)},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(e,n){\"containment\"===e&&(this.options.containment=null===n||0===t(n).length?null:t(n))},_mouseStart:function(t){return this._cache(),this.cache.click={left:t.pageX,top:t.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent(\"mousestart\"),!0},_mouseDrag:function(t){var e=t.pageX-this.cache.click.left;return e=this._constraintPosition(e+this.cache.initialOffset.left),this._applyPosition(e),this._triggerMouseEvent(\"sliderDrag\"),!1},_mouseStop:function(){this._triggerMouseEvent(\"stop\")},_constraintPosition:function(t){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(t=Math.min(t,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),t=Math.max(t,this.cache.parent.offset.left)),t},_applyPosition:function(t){var e={top:this.cache.offset.top,left:t};this.element.offset({left:t}),this.cache.offset=e},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,\"marginLeft\"),right:this._parsePixels(this.element,\"marginRight\"),top:this._parsePixels(this.element,\"marginTop\"),bottom:this._parsePixels(this.element,\"marginBottom\")}},_cacheParent:function(){if(null!==this.options.parent){var t=this.element.parent();this.cache.parent={offset:t.offset(),width:t.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(t,e){return parseInt(t.css(e),10)||0},_triggerMouseEvent:function(t){var e=this._prepareEventData();this.element.trigger(t,e)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(t,e){t.widget(\"ui.rangeSlider\",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:\"show\",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(t.proxy(this.resize,this),1),setTimeout(t.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var e=this;this._resizeProxy=function(t){e.resize(t)},t(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css(\"width\",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css(\"width\",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(t,e){this._setWheelOption(t,e),this._setArrowsOption(t,e),this._setLabelsOption(t,e),this._setLabelsDurations(t,e),this._setFormatterOption(t,e),this._setBoundsOption(t,e),this._setRangeOption(t,e),this._setStepOption(t,e),this._setScalesOption(t,e),this._setEnabledOption(t,e),this._setPositionningOption(t,e)},_validProperty:function(t,e,n){return null===t||\"undefined\"==typeof t[e]?n:t[e]},_setStepOption:function(t,e){\"step\"===t&&(this.options.step=e,this._leftHandle(\"option\",\"step\",e),this._rightHandle(\"option\",\"step\",e),this._changed(!0))},_setScalesOption:function(t,e){\"scales\"===t&&(e===!1||null===e?(this.options.scales=!1,this._destroyRuler()):e instanceof Array&&(this.options.scales=e,this._updateRuler()))},_setRangeOption:function(t,e){\"range\"===t&&(this._bar(\"option\",\"range\",e),this.options.range=this._bar(\"option\",\"range\"),this._changed(!0))},_setBoundsOption:function(t,e){\"bounds\"===t&&\"undefined\"!=typeof e.min&&\"undefined\"!=typeof e.max&&this.bounds(e.min,e.max)},_setWheelOption:function(t,e){(\"wheelMode\"===t||\"wheelSpeed\"===t)&&(this._bar(\"option\",t,e),this.options[t]=this._bar(\"option\",t))},_setLabelsOption:function(t,e){if(\"valueLabels\"===t){if(\"hide\"!==e&&\"show\"!==e&&\"change\"!==e)return;this.options.valueLabels=e,\"hide\"!==e?(this._createLabels(),this._leftLabel(\"update\"),this._rightLabel(\"update\")):this._destroyLabels()}},_setFormatterOption:function(t,e){\"formatter\"===t&&null!==e&&\"function\"==typeof e&&\"hide\"!==this.options.valueLabels&&(this._leftLabel(\"option\",\"formatter\",e),this.options.formatter=this._rightLabel(\"option\",\"formatter\",e))},_setArrowsOption:function(t,e){\"arrows\"!==t||e!==!0&&e!==!1||e===this.options.arrows||(e===!0?(this.element.removeClass(\"ui-rangeSlider-noArrow\").addClass(\"ui-rangeSlider-withArrows\"),this.arrows.left.css(\"display\",\"block\"),this.arrows.right.css(\"display\",\"block\"),this.options.arrows=!0):e===!1&&(this.element.addClass(\"ui-rangeSlider-noArrow\").removeClass(\"ui-rangeSlider-withArrows\"),this.arrows.left.css(\"display\",\"none\"),this.arrows.right.css(\"display\",\"none\"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(t,e){if(\"durationIn\"===t||\"durationOut\"===t||\"delayOut\"===t){if(parseInt(e,10)!==e)return;null!==this.labels.left&&this._leftLabel(\"option\",t,e),null!==this.labels.right&&this._rightLabel(\"option\",t,e),this.options[t]=e}},_setEnabledOption:function(t,e){\"enabled\"===t&&this.toggle(e)},_setPositionningOption:function(t,e){\"symmetricPositionning\"===t&&(this._rightHandle(\"option\",t,e),this.options[t]=this._leftHandle(\"option\",t,e))},_createElements:function(){\"absolute\"!==this.element.css(\"position\")&&this.element.css(\"position\",\"relative\"),this.element.addClass(\"ui-rangeSlider\"),this.container=t(\"<div class='ui-rangeSlider-container' />\").css(\"position\",\"absolute\").appendTo(this.element),this.innerBar=t(\"<div class='ui-rangeSlider-innerBar' />\").css(\"position\",\"absolute\").css(\"top\",0).css(\"left\",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),\"hide\"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(e){return t(\"<div />\")[this._handleType()](e).bind(\"sliderDrag\",t.proxy(this._changing,this)).bind(\"stop\",t.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=t(\"<div />\").prependTo(this.container).bind(\"sliderDrag scroll zoom\",t.proxy(this._changing,this)).bind(\"stop\",t.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar(\"option\",\"range\"),this.options.wheelMode=this._bar(\"option\",\"wheelMode\"),this.options.wheelSpeed=this._bar(\"option\",\"wheelSpeed\")},_createArrows:function(){this.arrows.left=this._createArrow(\"left\"),this.arrows.right=this._createArrow(\"right\"),this.options.arrows?this.element.addClass(\"ui-rangeSlider-withArrows\"):(this.arrows.left.css(\"display\",\"none\"),this.arrows.right.css(\"display\",\"none\"),this.element.addClass(\"ui-rangeSlider-noArrow\"))},_createArrow:function(e){var n,i=t(\"<div class='ui-rangeSlider-arrow' />\").append(\"<div class='ui-rangeSlider-arrow-inner' />\").addClass(\"ui-rangeSlider-\"+e+\"Arrow\").css(\"position\",\"absolute\").css(e,0).appendTo(this.element);return n=\"right\"===e?t.proxy(this._scrollRightClick,this):t.proxy(this._scrollLeftClick,this),i.bind(\"mousedown touchstart\",n),i},_proxy:function(t,e,n){var i=Array.prototype.slice.call(n);return t&&t[e]?t[e].apply(t,i):null},_handleType:function(){return\"rangeSliderHandle\"},_barType:function(){return\"rangeSliderBar\"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return\"rangeSliderLabel\"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(t,e){return e===this.rightHandle&&(t-=e.outerWidth()),t*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-e.outerWidth(!0))+this.options.bounds.min},_trigger:function(t){var e=this;setTimeout(function(){e.element.trigger(t,{label:e.element,values:e.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger(\"valuesChanging\"),this._valuesChanged=!0)},_deactivateLabels:function(){\"change\"===this.options.valueLabels&&(this._leftLabel(\"option\",\"show\",\"hide\"),this._rightLabel(\"option\",\"show\",\"hide\"))},_reactivateLabels:function(){\"change\"===this.options.valueLabels&&(this._leftLabel(\"option\",\"show\",\"change\"),this._rightLabel(\"option\",\"show\",\"change\"))},_changed:function(t){t===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger(\"valuesChanged\"),t!==!0&&this._trigger(\"userValuesChanged\"),this._valuesChanged=!1),t===!0&&this._reactivateLabels()},_updateValues:function(){var t=this._leftHandle(\"value\"),e=this._rightHandle(\"value\"),n=this._min(t,e),i=this._max(t,e),r=n!==this._values.min||i!==this._values.max;return this._values.min=this._min(t,e),this._values.max=this._max(t,e),r},_min:function(t,e){return Math.min(t,e)},_max:function(t,e){return Math.max(t,e)},_createLabel:function(e,n){var i;return null===e?(i=this._getLabelConstructorParameters(e,n),e=t(\"<div />\").appendTo(this.element)[this._labelType()](i)):(i=this._getLabelRefreshParameters(e,n),e[this._labelType()](i)),e},_getLabelConstructorParameters:function(t,e){return{handle:e,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter:this.options.formatter},_defaultFormatter:function(t){return Math.round(t)},_destroyLabel:function(t){return null!==t&&(t[this._labelType()](\"destroy\"),t.remove(),t=null),t},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel(\"pair\",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle(\"stepRatio\")},_scrollRightClick:function(t){return this.options.enabled?(t.preventDefault(),this._bar(\"startScroll\"),this._bindStopScroll(),void this._continueScrolling(\"scrollRight\",4*this._stepRatio(),1)):!1},_continueScrolling:function(t,e,n,i){if(!this.options.enabled)return!1;this._bar(t,n),i=i||5,i--;var r=this,o=16,s=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===i&&(e>o?e=Math.max(o,e/1.5):n=Math.min(s,2*n),i=5),r._continueScrolling(t,e,n,i)},e)},_scrollLeftClick:function(t){return this.options.enabled?(t.preventDefault(),this._bar(\"startScroll\"),this._bindStopScroll(),void this._continueScrolling(\"scrollLeft\",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var e=this;this._stopScrollHandle=function(t){t.preventDefault(),e._stopScroll()},t(document).bind(\"mouseup touchend\",this._stopScrollHandle)},_stopScroll:function(){t(document).unbind(\"mouseup touchend\",this._stopScrollHandle),this._stopScrollHandle=null,this._bar(\"stopScroll\"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=t(\"<div class='ui-rangeSlider-ruler' />\").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&t.fn.ruler&&(this.ruler.ruler(\"destroy\"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&t.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(t,e){var n;if(\"undefined\"!=typeof t&&\"undefined\"!=typeof e){if(!this._initialized)return this._values.min=t,this._values.max=e,this._values;this._deactivateLabels(),n=this._bar(\"values\",t,e),this._changed(!0),this._reactivateLabels()}else n=this._bar(\"values\",t,e);return n},min:function(t){return this._values.min=this.values(t,this._values.max).min,this._values.min},max:function(t){return this._values.max=this.values(this._values.min,t).max,this._values.max},bounds:function(t,e){return this._isValidValue(t)&&this._isValidValue(e)&&e>t&&(this._setBounds(t,e),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(t){return\"undefined\"!=typeof t&&parseFloat(t)===t},_setBounds:function(t,e){this.options.bounds={min:t,max:e},this._leftHandle(\"option\",\"bounds\",this.options.bounds),this._rightHandle(\"option\",\"bounds\",this.options.bounds),this._bar(\"option\",\"bounds\",this.options.bounds)},zoomIn:function(t){this._bar(\"zoomIn\",t)},zoomOut:function(t){this._bar(\"zoomOut\",t)},scrollLeft:function(t){this._bar(\"startScroll\"),this._bar(\"scrollLeft\",t),this._bar(\"stopScroll\")},scrollRight:function(t){this._bar(\"startScroll\"),this._bar(\"scrollRight\",t),this._bar(\"stopScroll\")},resize:function(){this._initWidth(),this._leftHandle(\"update\"),this._rightHandle(\"update\"),this._bar(\"update\")},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(t){t===e&&(t=!this.options.enabled),this.options.enabled!==t&&this._toggle(t)},_toggle:function(t){this.options.enabled=t,this.element.toggleClass(\"ui-rangeSlider-disabled\",!t);var e=t?\"enable\":\"disable\";this._bar(e),this._leftHandle(e),this._rightHandle(e),this._leftLabel(e),this._rightLabel(e)},destroy:function(){this.element.removeClass(\"ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled\"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass(\"ui-rangeSlider\"),this.options=null,t(window).unbind(\"resize\",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,t.Widget.prototype.destroy.apply(this,arguments)},_destroyWidget:function(t){this[\"_\"+t](\"destroy\"),this[t].remove(),this[t]=null},_destroyWidgets:function(){this._destroyWidget(\"bar\"),this._destroyWidget(\"leftHandle\"),this._destroyWidget(\"rightHandle\"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(t){t.widget(\"ui.rangeSliderHandle\",t.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){t.ui.rangeSliderDraggable.prototype._create.apply(this),this.element.css(\"position\",\"absolute\").css(\"top\",0).addClass(\"ui-rangeSlider-handle\").toggleClass(\"ui-rangeSlider-leftHandle\",this.options.isLeft).toggleClass(\"ui-rangeSlider-rightHandle\",!this.options.isLeft),this.element.append(\"<div class='ui-rangeSlider-handle-inner' />\"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),t.ui.rangeSliderDraggable.prototype.destroy.apply(this)},_setOption:function(e,n){\"isLeft\"!==e||n!==!0&&n!==!1||n===this.options.isLeft?\"step\"===e&&this._checkStep(n)?(this.options.step=n,this.update()):\"bounds\"===e?(this.options.bounds=n,this.update()):\"range\"===e&&this._checkRange(n)?(this.options.range=n,this.update()):\"symmetricPositionning\"===e&&(this.options.symmetricPositionning=n===!0,this.update()):(this.options.isLeft=n,this.element.toggleClass(\"ui-rangeSlider-leftHandle\",this.options.isLeft).toggleClass(\"ui-rangeSlider-rightHandle\",!this.options.isLeft),this._position(this._value),this.element.trigger(\"switch\",this.options.isLeft)),t.ui.rangeSliderDraggable.prototype._setOption.apply(this,[e,n])},_checkRange:function(t){return t===!1||!this._isValidValue(t.min)&&!this._isValidValue(t.max)},_isValidValue:function(t){return\"undefined\"!=typeof t&&t!==!1&&parseFloat(t)!==t},_checkStep:function(t){return t===!1||parseFloat(t)===t},_initElement:function(){t.ui.rangeSliderDraggable.prototype._initElement.apply(this),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(t.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent(\"initialize\"))},_bounds:function(){return this.options.bounds},_cache:function(){t.ui.rangeSliderDraggable.prototype._cache.apply(this),this._cacheParent()},_cacheParent:function(){var t=this.element.parent();this.cache.parent={element:t,offset:t.offset(),padding:{left:this._parsePixels(t,\"paddingLeft\")},width:t.width()}},_position:function(t){var e=this._getPositionForValue(t);this._applyPosition(e)},_constraintPosition:function(t){var e=this._getValueForPosition(t);return this._getPositionForValue(e)},_applyPosition:function(e){t.ui.rangeSliderDraggable.prototype._applyPosition.apply(this,[e]),this._left=e,this._setValue(this._getValueForPosition(e)),this._triggerMouseEvent(\"moving\")},_prepareEventData:function(){var e=t.ui.rangeSliderDraggable.prototype._prepareEventData.apply(this);return e.value=this._value,e},_setValue:function(t){t!==this._value&&(this._value=t)},_constraintValue:function(t){if(t=Math.min(t,this._bounds().max),t=Math.max(t,this._bounds().min),t=this._round(t),this.options.range!==!1){var e=this.options.range.min||!1,n=this.options.range.max||!1;e!==!1&&(t=Math.max(t,this._round(e))),n!==!1&&(t=Math.min(t,this._round(n))),t=Math.min(t,this._bounds().max),t=Math.max(t,this._bounds().min)}return t},_round:function(t){return this.options.step!==!1&&this.options.step>0?Math.round(t/this.options.step)*this.options.step:t},_getPositionForValue:function(t){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;t=this._constraintValue(t);var e=(t-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),n=this.cache.parent.width,i=this.cache.parent.offset.left,r=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?e*(n-2*this.cache.width.outer)+i+r:e*n+i-r},_getValueForPosition:function(t){var e=this._getRawValueForPositionAndBounds(t,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(e)},_getRawValueForPositionAndBounds:function(t,e,n){var i,r,o=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(t-=this.options.isLeft?0:this.cache.width.outer,i=this.cache.parent.width-2*this.cache.width.outer):(t+=this.options.isLeft?0:this.cache.width.outer,i=this.cache.parent.width),0===i?this._value:(r=(t-o)/i,r*(n-e)+e)},value:function(t){return\"undefined\"!=typeof t&&(this._cache(),t=this._constraintValue(t),this._position(t)),this._value},update:function(){this._cache();var t=this._constraintValue(this._value),e=this._getPositionForValue(t);t!==this._value?(this._triggerMouseEvent(\"updating\"),this._position(t),this._triggerMouseEvent(\"update\")):e!==this.cache.offset.left&&(this._triggerMouseEvent(\"updating\"),this._position(t),this._triggerMouseEvent(\"update\"))},position:function(t){return\"undefined\"!=typeof t&&(this._cache(),t=this._constraintPosition(t),this._applyPosition(t)),this._left},add:function(t,e){return t+e},substract:function(t,e){return t-e},stepsBetween:function(t,e){return this.options.step===!1?e-t:(e-t)/this.options.step},multiplyStep:function(t,e){return t*e},moveRight:function(t){var e;return this.options.step===!1?(e=this._left,this.position(this._left+t),this._left-e):(e=this._value,this.value(this.add(e,this.multiplyStep(this.options.step,t))),this.stepsBetween(e,this._value))},moveLeft:function(t){return-this.moveRight(-t)},stepRatio:function(){if(this.options.step===!1)return 1;var t=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/t}})}(jQuery),function(t){function e(t,e){return\"undefined\"==typeof t?e||!1:t}t.widget(\"ui.rangeSliderBar\",t.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:\"rangeSliderHandle\",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){t.ui.rangeSliderDraggable.prototype._create.apply(this),this.element.css(\"position\",\"absolute\").css(\"top\",0).addClass(\"ui-rangeSlider-bar\"),this.options.leftHandle.bind(\"initialize\",t.proxy(this._onInitialized,this)).bind(\"mousestart\",t.proxy(this._cache,this)).bind(\"stop\",t.proxy(this._onHandleStop,this)),this.options.rightHandle.bind(\"initialize\",t.proxy(this._onInitialized,this)).bind(\"mousestart\",t.proxy(this._cache,this)).bind(\"stop\",t.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(\".bar\"),this.options.rightHandle.unbind(\".bar\"),this.options=null,t.ui.rangeSliderDraggable.prototype.destroy.apply(this)},_setOption:function(t,e){\"range\"===t?this._setRangeOption(e):\"wheelSpeed\"===t?this._setWheelSpeedOption(e):\"wheelMode\"===t&&this._setWheelModeOption(e)},_setRangeOption:function(t){if((\"object\"!=typeof t||null===t)&&(t=!1),t!==!1||this.options.range!==!1){if(t!==!1){var n=e(t.min,this.options.range.min),i=e(t.max,this.options.range.max);this.options.range={min:n,max:i}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(t){\"number\"==typeof t&&t>0&&(this.options.wheelSpeed=t)},_setWheelModeOption:function(t){(null===t||t===!1||\"zoom\"===t||\"scroll\"===t)&&(this.options.wheelMode!==t&&this.element.parent().unbind(\"mousewheel.bar\"),this._bindMouseWheel(t),this.options.wheelMode=t)},_bindMouseWheel:function(e){\"zoom\"===e?this.element.parent().bind(\"mousewheel.bar\",t.proxy(this._mouseWheelZoom,this)):\"scroll\"===e&&this.element.parent().bind(\"mousewheel.bar\",t.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var t=this._values.max,e={min:!1,max:!1};e.max=\"undefined\"!=typeof this.options.range.min&&this.options.range.min!==!1?this._leftHandle(\"substract\",t,this.options.range.min):!1,e.min=\"undefined\"!=typeof this.options.range.max&&this.options.range.max!==!1?this._leftHandle(\"substract\",t,this.options.range.max):!1,this._leftHandle(\"option\",\"range\",e)},_setRightRange:function(){var t=this._values.min,e={min:!1,max:!1};e.min=\"undefined\"!=typeof this.options.range.min&&this.options.range.min!==!1?this._rightHandle(\"add\",t,this.options.range.min):!1,e.max=\"undefined\"!=typeof this.options.range.max&&this.options.range.max!==!1?this._rightHandle(\"add\",t,this.options.range.max):!1,this._rightHandle(\"option\",\"range\",e)},_deactivateRange:function(){this._leftHandle(\"option\",\"range\",!1),this._rightHandle(\"option\",\"range\",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var t=this._leftHandle(\"position\"),e=this._rightHandle(\"position\")+this.options.rightHandle.width();this.element.offset({left:t}),this.element.css(\"width\",e-t)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(t,e){var n=Array.prototype.slice.call(e);return t[this.options.type].apply(t,n)},_cache:function(){t.ui.rangeSliderDraggable.prototype._cache.apply(this),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(e){t.ui.rangeSliderDraggable.prototype._mouseStart.apply(this,[e]),this._deactivateRange()},_mouseStop:function(e){t.ui.rangeSliderDraggable.prototype._mouseStop.apply(this,[e]),this._cacheHandles(),this._values.min=this._leftHandle(\"value\"),this._values.max=this._rightHandle(\"value\"),this._reactivateRange(),this._leftHandle().trigger(\"stop\"),this._rightHandle().trigger(\"stop\")},_onDragLeftHandle:function(t,e){if(this._cacheIfNecessary(),e.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(t,e);\n",
        "                this._values.min=e.value,this.cache.offset.left=e.offset.left,this.cache.leftHandle.offset=e.offset,this._positionBar()}},_onDragRightHandle:function(t,e){if(this._cacheIfNecessary(),e.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(t,e);this._values.max=e.value,this.cache.rightHandle.offset=e.offset,this._positionBar()}},_positionBar:function(){var t=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=t,this.element.css(\"width\",t).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var t=this._values.min;return this._values.min=this._values.max,this._values.max=t,!0}return!1},_switchHandles:function(){var t=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=t,this._leftHandle(\"option\",\"isLeft\",!0),this._rightHandle(\"option\",\"isLeft\",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(\".bar\").bind(\"sliderDrag.bar update.bar moving.bar\",t.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(\".bar\").bind(\"sliderDrag.bar update.bar moving.bar\",t.proxy(this._onDragRightHandle,this))},_constraintPosition:function(e){var n,i={};return i.left=t.ui.rangeSliderDraggable.prototype._constraintPosition.apply(this,[e]),i.left=this._leftHandle(\"position\",i.left),n=this._rightHandle(\"position\",i.left+this.cache.width.outer-this.cache.rightHandle.width),i.width=n-i.left+this.cache.rightHandle.width,i},_applyPosition:function(e){t.ui.rangeSliderDraggable.prototype._applyPosition.apply(this,[e.left]),this.element.width(e.width)},_mouseWheelZoom:function(e,n,i,r){if(!this.enabled)return!1;var o=this._values.min+(this._values.max-this._values.min)/2,s={},a={};return this.options.range===!1||this.options.range.min===!1?(s.max=o,a.min=o):(s.max=o-this.options.range.min/2,a.min=o+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(s.min=o-this.options.range.max/2,a.max=o+this.options.range.max/2),this._leftHandle(\"option\",\"range\",s),this._rightHandle(\"option\",\"range\",a),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(t.proxy(this._wheelStop,this),200),this.zoomIn(r*this.options.wheelSpeed),!1},_mouseWheelScroll:function(e,n,i,r){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(t.proxy(this._wheelStop,this),200),this.scrollLeft(r*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(t){return this._leftHandle(\"value\",t)},max:function(t){return this._rightHandle(\"value\",t)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent(\"stop\"),this._leftHandle().trigger(\"stop\"),this._rightHandle().trigger(\"stop\")},scrollLeft:function(t){return t=t||1,0>t?this.scrollRight(-t):(t=this._leftHandle(\"moveLeft\",t),this._rightHandle(\"moveLeft\",t),this.update(),void this._triggerMouseEvent(\"scroll\"))},scrollRight:function(t){return t=t||1,0>t?this.scrollLeft(-t):(t=this._rightHandle(\"moveRight\",t),this._leftHandle(\"moveRight\",t),this.update(),void this._triggerMouseEvent(\"scroll\"))},zoomIn:function(t){if(t=t||1,0>t)return this.zoomOut(-t);var e=this._rightHandle(\"moveLeft\",t);t>e&&(e/=2,this._rightHandle(\"moveRight\",e)),this._leftHandle(\"moveRight\",e),this.update(),this._triggerMouseEvent(\"zoom\")},zoomOut:function(t){if(t=t||1,0>t)return this.zoomIn(-t);var e=this._rightHandle(\"moveRight\",t);t>e&&(e/=2,this._rightHandle(\"moveLeft\",e)),this._leftHandle(\"moveLeft\",e),this.update(),this._triggerMouseEvent(\"zoom\")},values:function(t,e){if(\"undefined\"!=typeof t&&\"undefined\"!=typeof e){var n=Math.min(t,e),i=Math.max(t,e);this._deactivateRange(),this.options.leftHandle.unbind(\".bar\"),this.options.rightHandle.unbind(\".bar\"),this._values.min=this._leftHandle(\"value\",n),this._values.max=this._rightHandle(\"value\",i),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(t){function e(e,n,i,r){this.label1=e,this.label2=n,this.type=i,this.options=r,this.handle1=this.label1[this.type](\"option\",\"handle\"),this.handle2=this.label2[this.type](\"option\",\"handle\"),this.cache=null,this.left=e,this.right=n,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),\"show\"===this.options.show?(setTimeout(t.proxy(this.PositionLabels,this),1),this.initialized=!0):setTimeout(t.proxy(this.AfterInit,this),1e3),this._resizeProxy=t.proxy(this.onWindowResize,this),t(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(t(window).unbind(\"resize\",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(\".positionner\"),this.handle1=null,this.handle2.unbind(\".positionner\"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){\"none\"!==this.label1.css(\"display\")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(t,e){this.CacheWidth(t,e),this.CacheHeight(t,e),e.offset=t.offset(),e.margin={left:this.ParsePixels(\"marginLeft\",t),right:this.ParsePixels(\"marginRight\",t)},e.border={left:this.ParsePixels(\"borderLeftWidth\",t),right:this.ParsePixels(\"borderRightWidth\",t)}},this.CacheWidth=function(t,e){e.width=t.width(),e.outerWidth=t.outerWidth()},this.CacheHeight=function(t,e){e.outerHeightMargin=t.outerHeight(!0)},this.ParsePixels=function(t,e){return parseInt(e.css(t),10)||0},this.BindHandle=function(e){e.bind(\"updating.positionner\",t.proxy(this.onHandleUpdating,this)),e.bind(\"update.positionner\",t.proxy(this.onHandleUpdated,this)),e.bind(\"moving.positionner\",t.proxy(this.onHandleMoving,this)),e.bind(\"stop.positionner\",t.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var t=this.GetRawPosition(this.cache.label1,this.cache.handle1),e=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[i](\"option\",\"isLeft\")?this.ConstraintPositions(t,e):this.ConstraintPositions(e,t),this.PositionLabel(this.label1,t.left,this.cache.label1),this.PositionLabel(this.label2,e.left,this.cache.label2)}},this.PositionLabel=function(t,e,n){var i,r,o,s=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;s-e>=0?(t.css(\"right\",\"\"),t.offset({left:e})):(i=s+this.cache.offsetParent.width,r=e+n.margin.left+n.outerWidth+n.margin.right,o=i-r,t.css(\"left\",\"\"),t.css(\"right\",o))},this.ConstraintPositions=function(t,e){(t.center<e.center&&t.outerRight>e.outerLeft||t.center>e.center&&e.outerRight>t.outerLeft)&&(t=this.getLeftPosition(t,e),e=this.getRightPosition(t,e))},this.getLeftPosition=function(t,e){var n=(e.center+t.center)/2,i=n-t.cache.outerWidth-t.cache.margin.right+t.cache.border.left;return t.left=i,t},this.getRightPosition=function(t,e){var n=(e.center+t.center)/2;return e.left=n+e.cache.margin.left+e.cache.border.left,e},this.ShowIfNecessary=function(){\"show\"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(t,e){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(e),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(t){null!==this.cache&&(t.element[0]===this.handle1[0]?this.UpdatePosition(t,this.cache.handle1):this.UpdatePosition(t,this.cache.handle2))},this.UpdatePosition=function(t,e){e.offset=t.offset,e.value=t.value},this.GetRawPosition=function(t,e){var n=e.offset.left+e.outerWidth/2,i=n-t.outerWidth/2,r=i+t.outerWidth-t.border.left-t.border.right,o=i-t.margin.left-t.border.left,s=e.offset.top-t.outerHeightMargin;return{left:i,outerLeft:o,top:s,right:r,outerRight:o+t.outerWidth+t.margin.left+t.margin.right,cache:t,center:n}},this.Init()}t.widget(\"ui.rangeSliderLabel\",t.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:\"rangeSliderHandle\",show:\"show\",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle(\"option\",\"isLeft\"),this.element.addClass(\"ui-rangeSlider-label\").css(\"position\",\"absolute\").css(\"display\",\"block\"),this._createElements(),this._toggleClass(),this.options.handle.bind(\"moving.label\",t.proxy(this._onMoving,this)).bind(\"update.label\",t.proxy(this._onUpdate,this)).bind(\"switch.label\",t.proxy(this._onSwitch,this)),\"show\"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(\".label\"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),t.ui.rangeSliderMouseTouch.prototype.destroy.apply(this)},_createElements:function(){this._valueContainer=t(\"<div class='ui-rangeSlider-label-value' />\").appendTo(this.element),this._innerElement=t(\"<div class='ui-rangeSlider-label-inner' />\").appendTo(this.element)},_handle:function(){var t=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,t)},_setOption:function(t,e){\"show\"===t?this._updateShowOption(e):(\"durationIn\"===t||\"durationOut\"===t||\"delayOut\"===t)&&this._updateDurations(t,e),this._setFormatterOption(t,e)},_setFormatterOption:function(t,e){\"formatter\"===t&&(\"function\"==typeof e||e===!1)&&(this.options.formatter=e,this._display(this._value))},_updateShowOption:function(t){this.options.show=t,\"show\"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType](\"value\")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(t,e){parseInt(e,10)===e&&(this._positionner.options[t]=e,this.options[t]=e)},_display:function(t){this._displayText(this.options.formatter===!1?Math.round(t):this.options.formatter(t)),this._value=t},_displayText:function(t){this._valueContainer.text(t)},_toggleClass:function(){this.element.toggleClass(\"ui-rangeSlider-leftLabel\",this.options.isLeft).toggleClass(\"ui-rangeSlider-rightLabel\",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(t){this.options.handle.trigger(t)},_mouseUp:function(t){this.options.handle.trigger(t)},_mouseMove:function(t){this.options.handle.trigger(t)},_onMoving:function(t,e){this._display(e.value)},_onUpdate:function(){\"show\"===this.options.show&&this.update()},_onSwitch:function(t,e){this.options.isLeft=e,this._toggleClass(),this._positionLabels()},pair:function(t){null===this._positionner&&(this._positionner=new e(this.element,t,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),t[this.widgetName](\"positionner\",this._positionner))},positionner:function(t){return\"undefined\"!=typeof t&&(this._positionner=t),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle(\"value\")),\"show\"===this.options.show&&this._positionLabels()}})}(jQuery),function(t){t.widget(\"ui.dateRangeSlider\",t.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){t.ui.rangeSlider.prototype._create.apply(this),this.element.addClass(\"ui-dateRangeSlider\")},destroy:function(){this.element.removeClass(\"ui-dateRangeSlider\"),t.ui.rangeSlider.prototype.destroy.apply(this)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min),max:new Date(this.options.bounds.max),scales:this.options.scales})},_setOption:function(e,n){(\"defaultValues\"===e||\"bounds\"===e)&&\"undefined\"!=typeof n&&null!==n&&this._isValidDate(n.min)&&this._isValidDate(n.max)?t.ui.rangeSlider.prototype._setOption.apply(this,[e,{min:n.min.valueOf(),max:n.max.valueOf()}]):t.ui.rangeSlider.prototype._setOption.apply(this,this._toArray(arguments))},_handleType:function(){return\"dateRangeSliderHandle\"},option:function(e){if(\"bounds\"===e||\"defaultValues\"===e){var n=t.ui.rangeSlider.prototype.option.apply(this,arguments);return{min:new Date(n.min),max:new Date(n.max)}}return t.ui.rangeSlider.prototype.option.apply(this,this._toArray(arguments))},_defaultFormatter:function(t){var e=t.getMonth()+1,n=t.getDate();return\"\"+t.getFullYear()+\"-\"+(10>e?\"0\"+e:e)+\"-\"+(10>n?\"0\"+n:n)},_getFormatter:function(){var t=this.options.formatter;return(this.options.formatter===!1||null===this.options.formatter)&&(t=this._defaultFormatter),function(t){return function(e){return t(new Date(e))}}(t)},values:function(e,n){var i=null;return i=this._isValidDate(e)&&this._isValidDate(n)?t.ui.rangeSlider.prototype.values.apply(this,[e.valueOf(),n.valueOf()]):t.ui.rangeSlider.prototype.values.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},min:function(e){return new Date(this._isValidDate(e)?t.ui.rangeSlider.prototype.min.apply(this,[e.valueOf()]):t.ui.rangeSlider.prototype.min.apply(this))},max:function(e){return new Date(this._isValidDate(e)?t.ui.rangeSlider.prototype.max.apply(this,[e.valueOf()]):t.ui.rangeSlider.prototype.max.apply(this))},bounds:function(e,n){var i;return i=this._isValidDate(e)&&this._isValidDate(n)?t.ui.rangeSlider.prototype.bounds.apply(this,[e.valueOf(),n.valueOf()]):t.ui.rangeSlider.prototype.bounds.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},_isValidDate:function(t){return\"undefined\"!=typeof t&&t instanceof Date},_toArray:function(t){return Array.prototype.slice.call(t)}})}(jQuery),function(t){t.widget(\"ui.dateRangeSliderHandle\",t.ui.rangeSliderHandle,{_steps:!1,_boundsValues:{},_create:function(){this._createBoundsValues(),t.ui.rangeSliderHandle.prototype._create.apply(this)},_getValueForPosition:function(t){var e=this._getRawValueForPositionAndBounds(t,this.options.bounds.min.valueOf(),this.options.bounds.max.valueOf());return this._constraintValue(new Date(e))},_setOption:function(e,n){return\"step\"===e?(this.options.step=n,this._createSteps(),void this.update()):(t.ui.rangeSliderHandle.prototype._setOption.apply(this,[e,n]),void(\"bounds\"===e&&this._createBoundsValues()))},_createBoundsValues:function(){this._boundsValues={min:this.options.bounds.min.valueOf(),max:this.options.bounds.max.valueOf()}},_bounds:function(){return this._boundsValues},_createSteps:function(){if(this.options.step===!1||!this._isValidStep())return void(this._steps=!1);var t=new Date(this.options.bounds.min),e=new Date(this.options.bounds.max),n=t,i=0,r=new Date;for(this._steps=[];e>=n&&(1===i||r.valueOf()!==n.valueOf());)r=n,this._steps.push(n.valueOf()),n=this._addStep(t,i,this.options.step),i++;r.valueOf()===n.valueOf()&&(this._steps=!1)},_isValidStep:function(){return\"object\"==typeof this.options.step},_addStep:function(t,e,n){var i=new Date(t.valueOf());return i=this._addThing(i,\"FullYear\",e,n.years),i=this._addThing(i,\"Month\",e,n.months),i=this._addThing(i,\"Date\",e,7*n.weeks),i=this._addThing(i,\"Date\",e,n.days),i=this._addThing(i,\"Hours\",e,n.hours),i=this._addThing(i,\"Minutes\",e,n.minutes),i=this._addThing(i,\"Seconds\",e,n.seconds)},_addThing:function(t,e,n,i){return 0===n||0===(i||0)?t:(t[\"set\"+e](t[\"get\"+e]()+n*(i||0)),t)},_round:function(t){if(this._steps===!1)return t;for(var e,n,i=this.options.bounds.max.valueOf(),r=this.options.bounds.min.valueOf(),o=Math.max(0,(t-r)/(i-r)),s=Math.floor(this._steps.length*o);this._steps[s]>t;)s--;for(;s+1<this._steps.length&&this._steps[s+1]<=t;)s++;return s>=this._steps.length-1?this._steps[this._steps.length-1]:0===s?this._steps[0]:(e=this._steps[s],n=this._steps[s+1],n-t>t-e?e:n)},update:function(){this._createBoundsValues(),this._createSteps(),t.ui.rangeSliderHandle.prototype.update.apply(this)},add:function(t,e){return this._addStep(new Date(t),1,e).valueOf()},substract:function(t,e){return this._addStep(new Date(t),-1,e).valueOf()},stepsBetween:function(t,e){if(this.options.step===!1)return e-t;var n=Math.min(t,e),i=Math.max(t,e),r=0,o=!1,s=t>e;for(this.add(n,this.options.step)-n<0&&(o=!0);i>n;)o?i=this.add(i,this.options.step):n=this.add(n,this.options.step),r++;return s?-r:r},multiplyStep:function(t,e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]*e);return n},stepRatio:function(){if(this.options.step===!1)return 1;var t=this._steps.length;return this.cache.parent.width/t}})}(jQuery),function(t){t.widget(\"ui.editRangeSlider\",t.ui.rangeSlider,{options:{type:\"text\",round:1},_create:function(){t.ui.rangeSlider.prototype._create.apply(this),this.element.addClass(\"ui-editRangeSlider\")},destroy:function(){this.element.removeClass(\"ui-editRangeSlider\"),t.ui.rangeSlider.prototype.destroy.apply(this)},_setOption:function(e,n){(\"type\"===e||\"step\"===e)&&this._setLabelOption(e,n),\"type\"===e&&(this.options[e]=null===this.labels.left?n:this._leftLabel(\"option\",e)),t.ui.rangeSlider.prototype._setOption.apply(this,[e,n])},_setLabelOption:function(t,e){null!==this.labels.left&&(this._leftLabel(\"option\",t,e),this._rightLabel(\"option\",t,e))},_labelType:function(){return\"editRangeSliderLabel\"},_createLabel:function(e,n){var i=t.ui.rangeSlider.prototype._createLabel.apply(this,[e,n]);return null===e&&i.bind(\"valueChange\",t.proxy(this._onValueChange,this)),i},_addPropertiesToParameter:function(t){return t.type=this.options.type,t.step=this.options.step,t.id=this.element.attr(\"id\"),t},_getLabelConstructorParameters:function(e,n){var i=t.ui.rangeSlider.prototype._getLabelConstructorParameters.apply(this,[e,n]);return this._addPropertiesToParameter(i)},_getLabelRefreshParameters:function(e,n){var i=t.ui.rangeSlider.prototype._getLabelRefreshParameters.apply(this,[e,n]);return this._addPropertiesToParameter(i)},_onValueChange:function(t,e){var n=!1;n=e.isLeft?this._values.min!==this.min(e.value):this._values.max!==this.max(e.value),n&&this._trigger(\"userValuesChanged\")}})}(jQuery),function(t){t.widget(\"ui.editRangeSliderLabel\",t.ui.rangeSliderLabel,{options:{type:\"text\",step:!1,id:\"\"},_input:null,_text:\"\",_create:function(){t.ui.rangeSliderLabel.prototype._create.apply(this),this._createInput()},_setOption:function(e,n){\"type\"===e?this._setTypeOption(n):\"step\"===e&&this._setStepOption(n),t.ui.rangeSliderLabel.prototype._setOption.apply(this,[e,n])},_createInput:function(){this._input=t(\"<input type='\"+this.options.type+\"' />\").addClass(\"ui-editRangeSlider-inputValue\").appendTo(this._valueContainer),this._setInputName(),this._input.bind(\"keyup\",t.proxy(this._onKeyUp,this)),this._input.blur(t.proxy(this._onChange,this)),\"number\"===this.options.type&&(this.options.step!==!1&&this._input.attr(\"step\",this.options.step),this._input.click(t.proxy(this._onChange,this))),this._input.val(this._text)},_setInputName:function(){var t=this.options.isLeft?\"left\":\"right\";this._input.attr(\"name\",this.options.id+t)},_onSwitch:function(e,n){t.ui.rangeSliderLabel.prototype._onSwitch.apply(this,[e,n]),this._setInputName()},_destroyInput:function(){this._input.remove(),this._input=null},_onKeyUp:function(t){return 13===t.which?(this._onChange(t),!1):void 0},_onChange:function(){var t=this._returnCheckedValue(this._input.val());t!==!1&&this._triggerValue(t)},_triggerValue:function(t){var e=this.options.handle[this.options.handleType](\"option\",\"isLeft\");this.element.trigger(\"valueChange\",[{isLeft:e,value:t}])},_returnCheckedValue:function(t){var e=parseFloat(t);return isNaN(e)||isNaN(Number(t))?!1:e},_setTypeOption:function(t){\"text\"!==t&&\"number\"!==t||this.options.type===t||(this._destroyInput(),this.options.type=t,this._createInput())},_setStepOption:function(t){this.options.step=t,\"number\"===this.options.type&&this._input.attr(\"step\",t!==!1?t:\"any\")},_displayText:function(t){this._input.val(t),this._text=t},enable:function(){t.ui.rangeSliderLabel.prototype.enable.apply(this),this._input.attr(\"disabled\",null)},disable:function(){t.ui.rangeSliderLabel.prototype.disable.apply(this),this._input.attr(\"disabled\",\"disabled\")}})}(jQuery),function(t){var e={first:function(t){return t},next:function(t){return t+1},format:function(){},label:function(t){return Math.round(t)},stop:function(){return!1}};t.widget(\"ui.ruler\",{options:{min:0,max:100,scales:[]},_create:function(){this.element.addClass(\"ui-ruler\"),this._createScales()},destroy:function(){this.element.removeClass(\"ui-ruler\"),this.element.empty()},_regenerate:function(){this.element.empty(),this._createScales()},_setOption:function(t,e){return\"min\"===t||\"max\"===t&&e!==this.options[t]?(this.options[t]=e,void this._regenerate()):\"scales\"===t&&e instanceof Array?(this.options.scales=e,void this._regenerate()):void 0},_createScales:function(){if(this.options.max!==this.options.min)for(var t=0;t<this.options.scales.length;t++)this._createScale(this.options.scales[t],t)},_createScale:function(n,i){var r=t.extend({},e,n),o=t(\"<div class='ui-ruler-scale' />\").appendTo(this.element);o.addClass(\"ui-ruler-scale\"+i),this._createTicks(o,r)},_createTicks:function(t,e){var n,i,r,o=e.first(this.options.min,this.options.max),s=this.options.max-this.options.min,a=!0;do n=o,o=e.next(n),i=(Math.min(o,this.options.max)-Math.max(n,this.options.min))/s,r=this._createTick(n,o,e),t.append(r),r.css(\"width\",100*i+\"%\"),a&&n>this.options.min&&r.css(\"margin-left\",100*(n-this.options.min)/s+\"%\"),a=!1;while(!this._stop(e,o))},_stop:function(t,e){return t.stop(e)||e>=this.options.max},_createTick:function(e,n,i){var r=t(\"<div class='ui-ruler-tick' style='display:inline-block' />\"),o=t(\"<div class='ui-ruler-tick-inner' />\").appendTo(r),s=t(\"<span class='ui-ruler-tick-label' />\").appendTo(o);return s.text(i.label(e,n)),i.format(r,e,n),r}})}(jQuery),$.fn.rangeSlider}.apply(t,arguments)})}(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/date_range_slider\",[\"underscore\",\"jquery\",\"jqrangeslider\",\"backbone\",\"common/continuum_view\",\"common/has_properties\"],function(t,n,i,r,o,s){var a,l,c,h,u,p;return l=function(n){function i(){return h=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){var e=this;return i.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,\"change\",function(){return e.render})},i.prototype.render=function(){var e,n,i,r,o,s,a,l,c,h=this;return this.$el.empty(),a=this.mget(\"value\"),s=a[0],o=a[1],l=this.mget(\"range\"),r=l[0],i=l[1],c=this.mget(\"bounds\"),n=c[0],e=c[1],this.$el.dateRangeSlider({defaultValues:{min:new Date(s),max:new Date(o)},bounds:{min:new Date(n),max:new Date(e)},range:{min:t.isObject(r)?r:!1,max:t.isObject(i)?i:!1},step:this.mget(\"step\")||{},enabled:this.mget(\"enabled\"),arrows:this.mget(\"arrows\"),valueLabels:this.mget(\"value_labels\"),wheelMode:this.mget(\"wheel_mode\")}),this.$el.on(\"userValuesChanged\",function(t,e){return h.mset(\"value\",[e.values.min,e.values.max]),h.model.save()})},i}(o.View),a=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.type=\"DateRangeSlider\",i.prototype.default_view=l,i.prototype.defaults=function(){return t.extend({},i.__super__.defaults.call(this),{})},i}(s),c=function(t){function n(){return p=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=a,n}(r.Collection),{Model:a,Collection:new c,View:l}})}.call(this),n(\"jquery_ui/datepicker\",[\"jquery\",\"./core\"],function(t){!function(t,e){function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId=\"ui-datepicker-div\",this._inlineClass=\"ui-datepicker-inline\",this._appendClass=\"ui-datepicker-append\",this._triggerClass=\"ui-datepicker-trigger\",this._dialogClass=\"ui-datepicker-dialog\",this._disableClass=\"ui-datepicker-disabled\",this._unselectableClass=\"ui-datepicker-unselectable\",this._currentClass=\"ui-datepicker-current-day\",this._dayOverClass=\"ui-datepicker-days-cell-over\",this.regional=[],this.regional[\"\"]={closeText:\"Done\",prevText:\"Prev\",nextText:\"Next\",currentText:\"Today\",monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],weekHeader:\"Wk\",dateFormat:\"mm/dd/yy\",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:\"\"},this._defaults={showOn:\"focus\",showAnim:\"fadeIn\",showOptions:{},defaultDate:null,appendText:\"\",buttonText:\"...\",buttonImage:\"\",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:\"c-10:c+10\",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:\"+10\",minDate:null,maxDate:null,duration:\"fast\",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:\"\",altFormat:\"\",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[\"\"]),this.dpDiv=i(t(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"))}function i(e){var n=\"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";return e.delegate(n,\"mouseout\",function(){t(this).removeClass(\"ui-state-hover\"),-1!==this.className.indexOf(\"ui-datepicker-prev\")&&t(this).removeClass(\"ui-datepicker-prev-hover\"),-1!==this.className.indexOf(\"ui-datepicker-next\")&&t(this).removeClass(\"ui-datepicker-next-hover\")}).delegate(n,\"mouseover\",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\"),t(this).addClass(\"ui-state-hover\"),-1!==this.className.indexOf(\"ui-datepicker-prev\")&&t(this).addClass(\"ui-datepicker-prev-hover\"),-1!==this.className.indexOf(\"ui-datepicker-next\")&&t(this).addClass(\"ui-datepicker-next-hover\"))})}function r(e,n){t.extend(e,n);for(var i in n)null==n[i]&&(e[i]=n[i]);return e}t.extend(t.ui,{datepicker:{version:\"1.10.0\"}});var o,s=\"datepicker\",a=(new Date).getTime();t.extend(n.prototype,{markerClassName:\"hasDatepicker\",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return r(this._defaults,t||{}),this},_attachDatepicker:function(e,n){var i,r,o;i=e.nodeName.toLowerCase(),r=\"div\"===i||\"span\"===i,e.id||(this.uuid+=1,e.id=\"dp\"+this.uuid),o=this._newInst(t(e),r),o.settings=t.extend({},n||{}),\"input\"===i?this._connectDatepicker(e,o):r&&this._inlineDatepicker(e,o)},_newInst:function(e,n){var r=e[0].id.replace(/([^A-Za-z0-9_\\-])/g,\"\\\\\\\\$1\");return{id:r,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?i(t(\"<div class='\"+this._inlineClass+\" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\")):this.dpDiv}},_connectDatepicker:function(e,n){var i=t(e);n.append=t([]),n.trigger=t([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(n),t.data(e,s,n),n.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,n){var i,r,o,s=this._get(n,\"appendText\"),a=this._get(n,\"isRTL\");n.append&&n.append.remove(),s&&(n.append=t(\"<span class='\"+this._appendClass+\"'>\"+s+\"</span>\"),e[a?\"before\":\"after\"](n.append)),e.unbind(\"focus\",this._showDatepicker),n.trigger&&n.trigger.remove(),i=this._get(n,\"showOn\"),(\"focus\"===i||\"both\"===i)&&e.focus(this._showDatepicker),(\"button\"===i||\"both\"===i)&&(r=this._get(n,\"buttonText\"),o=this._get(n,\"buttonImage\"),n.trigger=t(this._get(n,\"buttonImageOnly\")?t(\"<img/>\").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):t(\"<button type='button'></button>\").addClass(this._triggerClass).html(o?t(\"<img/>\").attr({src:o,alt:r,title:r}):r)),e[a?\"before\":\"after\"](n.trigger),n.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,\"autoSize\")&&!t.inline){var e,n,i,r,o=new Date(2009,11,20),s=this._get(t,\"dateFormat\");s.match(/[DM]/)&&(e=function(t){for(n=0,i=0,r=0;r<t.length;r++)t[r].length>n&&(n=t[r].length,i=r);return i},o.setMonth(e(this._get(t,s.match(/MM/)?\"monthNames\":\"monthNamesShort\"))),o.setDate(e(this._get(t,s.match(/DD/)?\"dayNames\":\"dayNamesShort\"))+20-o.getDay())),t.input.attr(\"size\",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,n){var i=t(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),t.data(e,s,n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(e),n.dpDiv.css(\"display\",\"block\"))},_dialogDatepicker:function(e,n,i,o,a){var l,c,h,u,p,d=this._dialogInst;return d||(this.uuid+=1,l=\"dp\"+this.uuid,this._dialogInput=t(\"<input type='text' id='\"+l+\"' style='position: absolute; top: -100px; width: 0px;'/>\"),this._dialogInput.keydown(this._doKeyDown),t(\"body\").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],s,d)),r(d.settings,o||{}),n=n&&n.constructor===Date?this._formatDate(d,n):n,this._dialogInput.val(n),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,p=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+u,h/2-150+p]),this._dialogInput.css(\"left\",this._pos[0]+20+\"px\").css(\"top\",this._pos[1]+\"px\"),d.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],s,d),this\n",
        "                },_destroyDatepicker:function(e){var n,i=t(e),r=t.data(e,s);i.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),t.removeData(e,s),\"input\"===n?(r.append.remove(),r.trigger.remove(),i.removeClass(this.markerClassName).unbind(\"focus\",this._showDatepicker).unbind(\"keydown\",this._doKeyDown).unbind(\"keypress\",this._doKeyPress).unbind(\"keyup\",this._doKeyUp)):(\"div\"===n||\"span\"===n)&&i.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,s);r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),\"input\"===n?(e.disabled=!1,o.trigger.filter(\"button\").each(function(){this.disabled=!1}).end().filter(\"img\").css({opacity:\"1.0\",cursor:\"\"})):(\"div\"===n||\"span\"===n)&&(i=r.children(\".\"+this._inlineClass),i.children().removeClass(\"ui-state-disabled\"),i.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,s);r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),\"input\"===n?(e.disabled=!0,o.trigger.filter(\"button\").each(function(){this.disabled=!0}).end().filter(\"img\").css({opacity:\"0.5\",cursor:\"default\"})):(\"div\"===n||\"span\"===n)&&(i=r.children(\".\"+this._inlineClass),i.children().addClass(\"ui-state-disabled\"),i.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,s)}catch(n){throw\"Missing instance data for this datepicker\"}},_optionDatepicker:function(n,i,o){var s,a,l,c,h=this._getInst(n);return 2===arguments.length&&\"string\"==typeof i?\"defaults\"===i?t.extend({},t.datepicker._defaults):h?\"all\"===i?t.extend({},h.settings):this._get(h,i):null:(s=i||{},\"string\"==typeof i&&(s={},s[i]=o),void(h&&(this._curInst===h&&this._hideDatepicker(),a=this._getDateDatepicker(n,!0),l=this._getMinMaxDate(h,\"min\"),c=this._getMinMaxDate(h,\"max\"),r(h.settings,s),null!==l&&s.dateFormat!==e&&s.minDate===e&&(h.settings.minDate=this._formatDate(h,l)),null!==c&&s.dateFormat!==e&&s.maxDate===e&&(h.settings.maxDate=this._formatDate(h,c)),\"disabled\"in s&&(s.disabled?this._disableDatepicker(n):this._enableDatepicker(n)),this._attachments(t(n),h),this._autoSize(h),this._setDate(h,a),this._updateAlternate(h),this._updateDatepicker(h))))},_changeDatepicker:function(t,e,n){this._optionDatepicker(t,e,n)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var n=this._getInst(t);n&&(this._setDate(n,e),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(t,e){var n=this._getInst(t);return n&&!n.inline&&this._setDateFromField(n,e),n?this._getDate(n):null},_doKeyDown:function(e){var n,i,r,o=t.datepicker._getInst(e.target),s=!0,a=o.dpDiv.is(\".ui-datepicker-rtl\");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),s=!1;break;case 13:return r=t(\"td.\"+t.datepicker._dayOverClass+\":not(.\"+t.datepicker._currentClass+\")\",o.dpDiv),r[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,r[0]),n=t.datepicker._get(o,\"onSelect\"),n?(i=t.datepicker._formatDate(o),n.apply(o.input?o.input[0]:null,[i,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,\"stepBigMonths\"):-t.datepicker._get(o,\"stepMonths\"),\"M\");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,\"stepBigMonths\"):+t.datepicker._get(o,\"stepMonths\"),\"M\");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,\"D\"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,\"stepBigMonths\"):-t.datepicker._get(o,\"stepMonths\"),\"M\");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,\"D\"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,\"D\"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,\"stepBigMonths\"):+t.datepicker._get(o,\"stepMonths\"),\"M\");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,\"D\"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var n,i,r=t.datepicker._getInst(e.target);return t.datepicker._get(r,\"constrainInput\")?(n=t.datepicker._possibleChars(t.datepicker._get(r,\"dateFormat\")),i=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||\" \">i||!n||n.indexOf(i)>-1):void 0},_doKeyUp:function(e){var n,i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{n=t.datepicker.parseDate(t.datepicker._get(i,\"dateFormat\"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i)),n&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(r){}return!0},_showDatepicker:function(e){if(e=e.target||e,\"input\"!==e.nodeName.toLowerCase()&&(e=t(\"input\",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var n,i,o,s,a,l,c;n=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==n&&(t.datepicker._curInst.dpDiv.stop(!0,!0),n&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),i=t.datepicker._get(n,\"beforeShow\"),o=i?i.apply(e,[e,n]):{},o!==!1&&(r(n.settings,o),n.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(n),t.datepicker._inDialog&&(e.value=\"\"),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),s=!1,t(e).parents().each(function(){return s|=\"fixed\"===t(this).css(\"position\"),!s}),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:\"absolute\",display:\"block\",top:\"-1000px\"}),t.datepicker._updateDatepicker(n),a=t.datepicker._checkOffset(n,a,s),n.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?\"static\":s?\"fixed\":\"absolute\",display:\"none\",left:a.left+\"px\",top:a.top+\"px\"}),n.inline||(l=t.datepicker._get(n,\"showAnim\"),c=t.datepicker._get(n,\"duration\"),n.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?n.dpDiv.show(l,t.datepicker._get(n,\"showOptions\"),c):n.dpDiv[l||\"show\"](l?c:null),n.input.is(\":visible\")&&!n.input.is(\":disabled\")&&n.input.focus(),t.datepicker._curInst=n))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find(\".\"+this._dayOverClass+\" a\").mouseover();var n,i=this._getNumberOfMonths(e),r=i[1],s=17;e.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\"),r>1&&e.dpDiv.addClass(\"ui-datepicker-multi-\"+r).css(\"width\",s*r+\"em\"),e.dpDiv[(1!==i[0]||1!==i[1]?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-multi\"),e.dpDiv[(this._get(e,\"isRTL\")?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-rtl\"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&e.input&&e.input.is(\":visible\")&&!e.input.is(\":disabled\")&&e.input[0]!==document.activeElement&&e.input.focus(),e.yearshtml&&(n=e.yearshtml,setTimeout(function(){n===e.yearshtml&&e.yearshtml&&e.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(e.yearshtml),n=e.yearshtml=null},0))},_getBorders:function(t){var e=function(t){return{thin:1,medium:2,thick:3}[t]||t};return[parseFloat(e(t.css(\"border-left-width\"))),parseFloat(e(t.css(\"border-top-width\")))]},_checkOffset:function(e,n,i){var r=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:t(document).scrollLeft()),c=document.documentElement.clientHeight+(i?0:t(document).scrollTop());return n.left-=this._get(e,\"isRTL\")?r-s:0,n.left-=i&&n.left===e.input.offset().left?t(document).scrollLeft():0,n.top-=i&&n.top===e.input.offset().top+a?t(document).scrollTop():0,n.left-=Math.min(n.left,n.left+r>l&&l>r?Math.abs(n.left+r-l):0),n.top-=Math.min(n.top,n.top+o>c&&c>o?Math.abs(o+a):0),n},_findPos:function(e){for(var n,i=this._getInst(e),r=this._get(i,\"isRTL\");e&&(\"hidden\"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[r?\"previousSibling\":\"nextSibling\"];return n=t(e).offset(),[n.left,n.top]},_hideDatepicker:function(e){var n,i,r,o,a=this._curInst;!a||e&&a!==t.data(e,s)||this._datepickerShowing&&(n=this._get(a,\"showAnim\"),i=this._get(a,\"duration\"),r=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[n]||t.effects[n])?a.dpDiv.hide(n,t.datepicker._get(a,\"showOptions\"),i,r):a.dpDiv[\"slideDown\"===n?\"slideUp\":\"fadeIn\"===n?\"fadeOut\":\"hide\"](n?i:null,r),n||r(),this._datepickerShowing=!1,o=this._get(a,\"onClose\"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():\"\",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:\"absolute\",left:\"0\",top:\"-100px\"}),t.blockUI&&(t.unblockUI(),t(\"body\").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(\".ui-datepicker-calendar\")},_checkExternalClick:function(e){if(t.datepicker._curInst){var n=t(e.target),i=t.datepicker._getInst(n[0]);(n[0].id!==t.datepicker._mainDivId&&0===n.parents(\"#\"+t.datepicker._mainDivId).length&&!n.hasClass(t.datepicker.markerClassName)&&!n.closest(\".\"+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||n.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==i)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,n,i){var r=t(e),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,n+(\"M\"===i?this._get(o,\"showCurrentAtPos\"):0),i),this._updateDatepicker(o))},_gotoToday:function(e){var n,i=t(e),r=this._getInst(i[0]);this._get(r,\"gotoCurrent\")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(n=new Date,r.selectedDay=n.getDate(),r.drawMonth=r.selectedMonth=n.getMonth(),r.drawYear=r.selectedYear=n.getFullYear()),this._notifyChange(r),this._adjustDate(i)},_selectMonthYear:function(e,n,i){var r=t(e),o=this._getInst(r[0]);o[\"selected\"+(\"M\"===i?\"Month\":\"Year\")]=o[\"draw\"+(\"M\"===i?\"Month\":\"Year\")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(e,n,i,r){var o,s=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(o=this._getInst(s[0]),o.selectedDay=o.currentDay=t(\"a\",r).html(),o.selectedMonth=o.currentMonth=n,o.selectedYear=o.currentYear=i,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var n=t(e);this._selectDate(n,\"\")},_selectDate:function(e,n){var i,r=t(e),o=this._getInst(r[0]);n=null!=n?n:this._formatDate(o),o.input&&o.input.val(n),this._updateAlternate(o),i=this._get(o,\"onSelect\"),i?i.apply(o.input?o.input[0]:null,[n,o]):o.input&&o.input.trigger(\"change\"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],\"object\"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var n,i,r,o=this._get(e,\"altField\");o&&(n=this._get(e,\"altFormat\")||this._get(e,\"dateFormat\"),i=this._getDate(e),r=this.formatDate(n,i,this._getFormatConfig(e)),t(o).each(function(){t(this).val(r)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,\"\"]},iso8601Week:function(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1},parseDate:function(e,n,i){if(null==e||null==n)throw\"Invalid arguments\";if(n=\"object\"==typeof n?n.toString():n+\"\",\"\"===n)return null;var r,o,s,a,l=0,c=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,h=\"string\"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),u=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,p=(i?i.dayNames:null)||this._defaults.dayNames,d=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,f=(i?i.monthNames:null)||this._defaults.monthNames,_=-1,g=-1,m=-1,v=-1,y=!1,b=function(t){var n=r+1<e.length&&e.charAt(r+1)===t;return n&&r++,n},w=function(t){var e=b(t),i=\"@\"===t?14:\"!\"===t?20:\"y\"===t&&e?4:\"o\"===t?3:2,r=new RegExp(\"^\\\\d{1,\"+i+\"}\"),o=n.substring(l).match(r);if(!o)throw\"Missing number at position \"+l;return l+=o[0].length,parseInt(o[0],10)},x=function(e,i,r){var o=-1,s=t.map(b(e)?r:i,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(s,function(t,e){var i=e[1];return n.substr(l,i.length).toLowerCase()===i.toLowerCase()?(o=e[0],l+=i.length,!1):void 0}),-1!==o)return o+1;throw\"Unknown name at position \"+l},k=function(){if(n.charAt(l)!==e.charAt(r))throw\"Unexpected literal at position \"+l;l++};for(r=0;r<e.length;r++)if(y)\"'\"!==e.charAt(r)||b(\"'\")?k():y=!1;else switch(e.charAt(r)){case\"d\":m=w(\"d\");break;case\"D\":x(\"D\",u,p);break;case\"o\":v=w(\"o\");break;case\"m\":g=w(\"m\");break;case\"M\":g=x(\"M\",d,f);break;case\"y\":_=w(\"y\");break;case\"@\":a=new Date(w(\"@\")),_=a.getFullYear(),g=a.getMonth()+1,m=a.getDate();break;case\"!\":a=new Date((w(\"!\")-this._ticksTo1970)/1e4),_=a.getFullYear(),g=a.getMonth()+1,m=a.getDate();break;case\"'\":b(\"'\")?k():y=!0;break;default:k()}if(l<n.length&&(s=n.substr(l),!/^\\s+/.test(s)))throw\"Extra/unparsed characters found in date: \"+s;if(-1===_?_=(new Date).getFullYear():100>_&&(_+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h>=_?0:-100)),v>-1)for(g=1,m=v;;){if(o=this._getDaysInMonth(_,g-1),o>=m)break;g++,m-=o}if(a=this._daylightSavingAdjust(new Date(_,g-1,m)),a.getFullYear()!==_||a.getMonth()+1!==g||a.getDate()!==m)throw\"Invalid date\";return a},ATOM:\"yy-mm-dd\",COOKIE:\"D, dd M yy\",ISO_8601:\"yy-mm-dd\",RFC_822:\"D, d M y\",RFC_850:\"DD, dd-M-y\",RFC_1036:\"D, d M y\",RFC_1123:\"D, d M yy\",RFC_2822:\"D, d M yy\",RSS:\"D, d M y\",TICKS:\"!\",TIMESTAMP:\"@\",W3C:\"yy-mm-dd\",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,n){if(!e)return\"\";var i,r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,o=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,a=(n?n.monthNames:null)||this._defaults.monthNames,l=function(e){var n=i+1<t.length&&t.charAt(i+1)===e;return n&&i++,n},c=function(t,e,n){var i=\"\"+e;if(l(t))for(;i.length<n;)i=\"0\"+i;return i},h=function(t,e,n,i){return l(t)?i[e]:n[e]},u=\"\",p=!1;if(e)for(i=0;i<t.length;i++)if(p)\"'\"!==t.charAt(i)||l(\"'\")?u+=t.charAt(i):p=!1;else switch(t.charAt(i)){case\"d\":u+=c(\"d\",e.getDate(),2);break;case\"D\":u+=h(\"D\",e.getDay(),r,o);break;case\"o\":u+=c(\"o\",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case\"m\":u+=c(\"m\",e.getMonth()+1,2);break;case\"M\":u+=h(\"M\",e.getMonth(),s,a);break;case\"y\":u+=l(\"y\")?e.getFullYear():(e.getYear()%100<10?\"0\":\"\")+e.getYear()%100;break;case\"@\":u+=e.getTime();break;case\"!\":u+=1e4*e.getTime()+this._ticksTo1970;break;case\"'\":l(\"'\")?u+=\"'\":p=!0;break;default:u+=t.charAt(i)}return u},_possibleChars:function(t){var e,n=\"\",i=!1,r=function(n){var i=e+1<t.length&&t.charAt(e+1)===n;return i&&e++,i};for(e=0;e<t.length;e++)if(i)\"'\"!==t.charAt(e)||r(\"'\")?n+=t.charAt(e):i=!1;else switch(t.charAt(e)){case\"d\":case\"m\":case\"y\":case\"@\":n+=\"0123456789\";break;case\"D\":case\"M\":return null;case\"'\":r(\"'\")?n+=\"'\":i=!0;break;default:n+=t.charAt(e)}return n},_get:function(t,n){return t.settings[n]!==e?t.settings[n]:this._defaults[n]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var n=this._get(t,\"dateFormat\"),i=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,s=this._getFormatConfig(t);try{o=this.parseDate(n,i,s)||r}catch(a){i=e?\"\":i}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=i?o.getDate():0,t.currentMonth=i?o.getMonth():0,t.currentYear=i?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,\"defaultDate\"),new Date))},_determineDate:function(e,n,i){var r=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(n){try{return t.datepicker.parseDate(t.datepicker._get(e,\"dateFormat\"),n,t.datepicker._getFormatConfig(e))}catch(i){}for(var r=(n.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=r.getFullYear(),s=r.getMonth(),a=r.getDate(),l=/([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,c=l.exec(n);c;){switch(c[2]||\"d\"){case\"d\":case\"D\":a+=parseInt(c[1],10);break;case\"w\":case\"W\":a+=7*parseInt(c[1],10);break;case\"m\":case\"M\":s+=parseInt(c[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s));break;case\"y\":case\"Y\":o+=parseInt(c[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s))}c=l.exec(n)}return new Date(o,s,a)},s=null==n||\"\"===n?i:\"string\"==typeof n?o(n):\"number\"==typeof n?isNaN(n)?i:r(n):new Date(n.getTime());return s=s&&\"Invalid Date\"===s.toString()?i:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,n){var i=!e,r=t.selectedMonth,o=t.selectedYear,s=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=s.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=s.getMonth(),t.drawYear=t.selectedYear=t.currentYear=s.getFullYear(),r===t.selectedMonth&&o===t.selectedYear||n||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?\"\":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&\"\"===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var n=this._get(e,\"stepMonths\"),i=\"#\"+e.id.replace(/\\\\\\\\/g,\"\\\\\");e.dpDiv.find(\"[data-handler]\").map(function(){var e={prev:function(){window[\"DP_jQuery_\"+a].datepicker._adjustDate(i,-n,\"M\")},next:function(){window[\"DP_jQuery_\"+a].datepicker._adjustDate(i,+n,\"M\")},hide:function(){window[\"DP_jQuery_\"+a].datepicker._hideDatepicker()},today:function(){window[\"DP_jQuery_\"+a].datepicker._gotoToday(i)},selectDay:function(){return window[\"DP_jQuery_\"+a].datepicker._selectDay(i,+this.getAttribute(\"data-month\"),+this.getAttribute(\"data-year\"),this),!1},selectMonth:function(){return window[\"DP_jQuery_\"+a].datepicker._selectMonthYear(i,this,\"M\"),!1},selectYear:function(){return window[\"DP_jQuery_\"+a].datepicker._selectMonthYear(i,this,\"Y\"),!1}};t(this).bind(this.getAttribute(\"data-event\"),e[this.getAttribute(\"data-handler\")])})},_generateHTML:function(t){var e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w,x,k,C,S,T,A,D,M,E,P,O,R,j,N,H,I,z,F,L=new Date,V=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),B=this._get(t,\"isRTL\"),W=this._get(t,\"showButtonPanel\"),$=this._get(t,\"hideIfNoPrevNext\"),q=this._get(t,\"navigationAsDateFormat\"),U=this._getNumberOfMonths(t),Y=this._get(t,\"showCurrentAtPos\"),G=this._get(t,\"stepMonths\"),X=1!==U[0]||1!==U[1],K=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,\"min\"),J=this._getMinMaxDate(t,\"max\"),Z=t.drawMonth-Y,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,n=this._get(t,\"prevText\"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z-G,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,te,Z)?\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='\"+n+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(B?\"e\":\"w\")+\"'>\"+n+\"</span></a>\":$?\"\":\"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\"+n+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(B?\"e\":\"w\")+\"'>\"+n+\"</span></a>\",r=this._get(t,\"nextText\"),r=q?this.formatDate(r,this._daylightSavingAdjust(new Date(te,Z+G,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,te,Z)?\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='\"+r+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(B?\"w\":\"e\")+\"'>\"+r+\"</span></a>\":$?\"\":\"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\"+r+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(B?\"w\":\"e\")+\"'>\"+r+\"</span></a>\",s=this._get(t,\"currentText\"),a=this._get(t,\"gotoCurrent\")&&t.currentDay?K:V,s=q?this.formatDate(s,a,this._getFormatConfig(t)):s,l=t.inline?\"\":\"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\"+this._get(t,\"closeText\")+\"</button>\",c=W?\"<div class='ui-datepicker-buttonpane ui-widget-content'>\"+(B?l:\"\")+(this._isInRange(t,a)?\"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>\"+s+\"</button>\":\"\")+(B?\"\":l)+\"</div>\":\"\",h=parseInt(this._get(t,\"firstDay\"),10),h=isNaN(h)?0:h,u=this._get(t,\"showWeek\"),p=this._get(t,\"dayNames\"),d=this._get(t,\"dayNamesMin\"),f=this._get(t,\"monthNames\"),_=this._get(t,\"monthNamesShort\"),g=this._get(t,\"beforeShowDay\"),m=this._get(t,\"showOtherMonths\"),v=this._get(t,\"selectOtherMonths\"),y=this._getDefaultDate(t),b=\"\",x=0;x<U[0];x++){for(k=\"\",this.maxRows=4,C=0;C<U[1];C++){if(S=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),T=\" ui-corner-all\",A=\"\",X){if(A+=\"<div class='ui-datepicker-group\",U[1]>1)switch(C){case 0:A+=\" ui-datepicker-group-first\",T=\" ui-corner-\"+(B?\"right\":\"left\");break;case U[1]-1:A+=\" ui-datepicker-group-last\",T=\" ui-corner-\"+(B?\"left\":\"right\");break;default:A+=\" ui-datepicker-group-middle\",T=\"\"}A+=\"'>\"}for(A+=\"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\"+T+\"'>\"+(/all|left/.test(T)&&0===x?B?o:i:\"\")+(/all|right/.test(T)&&0===x?B?i:o:\"\")+this._generateMonthYearHeader(t,Z,te,Q,J,x>0||C>0,f,_)+\"</div><table class='ui-datepicker-calendar'><thead><tr>\",D=u?\"<th class='ui-datepicker-week-col'>\"+this._get(t,\"weekHeader\")+\"</th>\":\"\",w=0;7>w;w++)M=(w+h)%7,D+=\"<th\"+((w+h+6)%7>=5?\" class='ui-datepicker-week-end'\":\"\")+\"><span title='\"+p[M]+\"'>\"+d[M]+\"</span></th>\";for(A+=D+\"</tr></thead><tbody>\",E=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,E)),P=(this._getFirstDayOfMonth(te,Z)-h+7)%7,O=Math.ceil((P+E)/7),R=X?this.maxRows>O?this.maxRows:O:O,this.maxRows=R,j=this._daylightSavingAdjust(new Date(te,Z,1-P)),N=0;R>N;N++){for(A+=\"<tr>\",H=u?\"<td class='ui-datepicker-week-col'>\"+this._get(t,\"calculateWeek\")(j)+\"</td>\":\"\",w=0;7>w;w++)I=g?g.apply(t.input?t.input[0]:null,[j]):[!0,\"\"],z=j.getMonth()!==Z,F=z&&!v||!I[0]||Q&&Q>j||J&&j>J,H+=\"<td class='\"+((w+h+6)%7>=5?\" ui-datepicker-week-end\":\"\")+(z?\" ui-datepicker-other-month\":\"\")+(j.getTime()===S.getTime()&&Z===t.selectedMonth&&t._keyEvent||y.getTime()===j.getTime()&&y.getTime()===S.getTime()?\" \"+this._dayOverClass:\"\")+(F?\" \"+this._unselectableClass+\" ui-state-disabled\":\"\")+(z&&!m?\"\":\" \"+I[1]+(j.getTime()===K.getTime()?\" \"+this._currentClass:\"\")+(j.getTime()===V.getTime()?\" ui-datepicker-today\":\"\"))+\"'\"+(z&&!m||!I[2]?\"\":\" title='\"+I[2]+\"'\")+(F?\"\":\" data-handler='selectDay' data-event='click' data-month='\"+j.getMonth()+\"' data-year='\"+j.getFullYear()+\"'\")+\">\"+(z&&!m?\"&#xa0;\":F?\"<span class='ui-state-default'>\"+j.getDate()+\"</span>\":\"<a class='ui-state-default\"+(j.getTime()===V.getTime()?\" ui-state-highlight\":\"\")+(j.getTime()===K.getTime()?\" ui-state-active\":\"\")+(z?\" ui-priority-secondary\":\"\")+\"' href='#'>\"+j.getDate()+\"</a>\")+\"</td>\",j.setDate(j.getDate()+1),j=this._daylightSavingAdjust(j);A+=H+\"</tr>\"}Z++,Z>11&&(Z=0,te++),A+=\"</tbody></table>\"+(X?\"</div>\"+(U[0]>0&&C===U[1]-1?\"<div class='ui-datepicker-row-break'></div>\":\"\"):\"\"),k+=A}b+=k}return b+=c,t._keyEvent=!1,b},_generateMonthYearHeader:function(t,e,n,i,r,o,s,a){var l,c,h,u,p,d,f,_,g=this._get(t,\"changeMonth\"),m=this._get(t,\"changeYear\"),v=this._get(t,\"showMonthAfterYear\"),y=\"<div class='ui-datepicker-title'>\",b=\"\";if(o||!g)b+=\"<span class='ui-datepicker-month'>\"+s[e]+\"</span>\";else{for(l=i&&i.getFullYear()===n,c=r&&r.getFullYear()===n,b+=\"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\",h=0;12>h;h++)(!l||h>=i.getMonth())&&(!c||h<=r.getMonth())&&(b+=\"<option value='\"+h+\"'\"+(h===e?\" selected='selected'\":\"\")+\">\"+a[h]+\"</option>\");b+=\"</select>\"}if(v||(y+=b+(!o&&g&&m?\"\":\"&#xa0;\")),!t.yearshtml)if(t.yearshtml=\"\",o||!m)y+=\"<span class='ui-datepicker-year'>\"+n+\"</span>\";else{for(u=this._get(t,\"yearRange\").split(\":\"),p=(new Date).getFullYear(),d=function(t){var e=t.match(/c[+\\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\\-].*/)?p+parseInt(t,10):parseInt(t,10);return isNaN(e)?p:e},f=d(u[0]),_=Math.max(f,d(u[1]||\"\")),f=i?Math.max(f,i.getFullYear()):f,_=r?Math.min(_,r.getFullYear()):_,t.yearshtml+=\"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";_>=f;f++)t.yearshtml+=\"<option value='\"+f+\"'\"+(f===n?\" selected='selected'\":\"\")+\">\"+f+\"</option>\";t.yearshtml+=\"</select>\",y+=t.yearshtml,t.yearshtml=null}return y+=this._get(t,\"yearSuffix\"),v&&(y+=(!o&&g&&m?\"\":\"&#xa0;\")+b),y+=\"</div>\"},_adjustInstDate:function(t,e,n){var i=t.drawYear+(\"Y\"===n?e:0),r=t.drawMonth+(\"M\"===n?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(i,r))+(\"D\"===n?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,r,o)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),(\"M\"===n||\"Y\"===n)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var n=this._getMinMaxDate(t,\"min\"),i=this._getMinMaxDate(t,\"max\"),r=n&&n>e?n:e;return i&&r>i?i:r},_notifyChange:function(t){var e=this._get(t,\"onChangeMonthYear\");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,\"numberOfMonths\");return null==e?[1,1]:\"number\"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+\"Date\"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,n,i){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(n,i+(0>e?e:r[0]*r[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var n,i,r=this._getMinMaxDate(t,\"min\"),o=this._getMinMaxDate(t,\"max\"),s=null,a=null,l=this._get(t,\"yearRange\");return l&&(n=l.split(\":\"),i=(new Date).getFullYear(),s=parseInt(n[0],10)+i,a=parseInt(n[1],10)+i),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!s||e.getFullYear()>=s)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,\"shortYearCutoff\");return e=\"string\"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,\"dayNamesShort\"),dayNames:this._get(t,\"dayNames\"),monthNamesShort:this._get(t,\"monthNamesShort\"),monthNames:this._get(t,\"monthNames\")}},_formatDate:function(t,e,n,i){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?\"object\"==typeof e?e:this._daylightSavingAdjust(new Date(i,n,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,\"dateFormat\"),r,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t(\"#\"+t.datepicker._mainDivId).length&&t(\"body\").append(t.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return\"string\"!=typeof e||\"isDisabled\"!==e&&\"getDate\"!==e&&\"widget\"!==e?\"option\"===e&&2===arguments.length&&\"string\"==typeof arguments[1]?t.datepicker[\"_\"+e+\"Datepicker\"].apply(t.datepicker,[this[0]].concat(n)):this.each(function(){\"string\"==typeof e?t.datepicker[\"_\"+e+\"Datepicker\"].apply(t.datepicker,[this].concat(n)):t.datepicker._attachDatepicker(this,e)}):t.datepicker[\"_\"+e+\"Datepicker\"].apply(t.datepicker,[this[0]].concat(n))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version=\"1.10.0\",window[\"DP_jQuery_\"+a]=t}(t)}),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"widget/date_picker\",[\"underscore\",\"jquery\",\"jquery_ui/datepicker\",\"backbone\",\"common/continuum_view\",\"common/has_properties\"],function(e,n,r,o,s,a){var l,c,h,u,p,d;return c=function(e){function r(){return this.onSelect=t(this.onSelect,this),u=r.__super__.constructor.apply(this,arguments)}return i(r,e),r.prototype.initialize=function(t){return r.__super__.initialize.call(this,t),this.render()},r.prototype.render=function(){var t,e;return this.$el.empty(),e=n(\"<label>\").text(this.mget(\"title\")),t=n(\"<div>\").datepicker({defaultDate:new Date(this.mget(\"value\")),minDate:null!=this.mget(\"min_date\")?new Date(this.mget(\"min_date\")):null,maxDate:null!=this.mget(\"max_date\")?new Date(this.mget(\"max_date\")):null,onSelect:this.onSelect}),this.$el.append([e,t])},r.prototype.onSelect=function(t){return this.mset(\"value\",new Date(t)),this.model.save()},r}(s.View),l=function(t){function e(){return p=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"DatePicker\",e.prototype.default_view=c,e.prototype.defaults=function(){return{value:Date.now()}},e}(a),h=function(t){function e(){return d=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=l,e}(o.Collection),{Model:l,Collection:new h,View:c}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/panel\",[\"underscore\",\"jquery\",\"backbone\",\"common/continuum_view\",\"common/has_properties\"],function(t,n,i,r,o){var s,a,l,c,h,u;return a=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render()},n.prototype.render=function(){return this.$el.empty()},n}(r.View),s=function(t){function n(){return h=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Panel\",n.prototype.default_view=a,n.prototype.defaults=function(){return{title:\"\",child:null,closable:!1}},n}(o),l=function(t){function n(){return u=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=s,n}(i.Collection),{Model:s,Collection:new l,View:a}})}.call(this),n(\"bootstrap/tab\",[\"jquery\"],function(t){+function(t){var e=function(e){this.element=t(e)};e.prototype.show=function(){var e=this.element,n=e.closest(\"ul:not(.bk-bs-dropdown-menu)\"),i=e.data(\"bk-bs-target\");if(i||(i=e.attr(\"href\"),i=i&&i.replace(/.*(?=#[^\\s]*$)/,\"\")),!e.parent(\"li\").hasClass(\"bk-bs-active\")){var r=n.find(\".bk-bs-active:last a\")[0],o=t.Event(\"show.bk-bs.tab\",{relatedTarget:r});\n",
        "                if(e.trigger(o),!o.isDefaultPrevented()){var s=t(i);this.activate(e.parent(\"li\"),n),this.activate(s,s.parent(),function(){e.trigger({type:\"shown.bk-bs.tab\",relatedTarget:r})})}}},e.prototype.activate=function(e,n,i){function r(){o.removeClass(\"bk-bs-active\").find(\"> .bk-bs-dropdown-menu > .bk-bs-active\").removeClass(\"bk-bs-active\"),e.addClass(\"bk-bs-active\"),s?(e[0].offsetWidth,e.addClass(\"bk-bs-in\")):e.removeClass(\"bk-bs-fade\"),e.parent(\".bk-bs-dropdown-menu\")&&e.closest(\"li.bk-bs-dropdown\").addClass(\"bk-bs-active\"),i&&i()}var o=n.find(\"> .bk-bs-active\"),s=i&&t.support.transition&&o.hasClass(\"bk-bs-fade\");s?o.one(t.support.transition.end,r).emulateTransitionEnd(150):r(),o.removeClass(\"bk-bs-in\")};var n=t.fn.tab;t.fn.tab=function(n){return this.each(function(){var i=t(this),r=i.data(\"bk-bs.tab\");r||i.data(\"bk-bs.tab\",r=new e(this)),\"string\"==typeof n&&r[n]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=n,this},t(document).on(\"click.bk-bs.tab.data-api\",'[data-bk-bs-toggle=\"tab\"], [data-bk-bs-toggle=\"pill\"]',function(e){e.preventDefault(),t(this).tab(\"show\")})}(t)}),n(\"widget/tabs_template\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){var t,n,r,o,s,a,l,c;for(i(e('<ul class=\"bk-bs-nav bk-bs-nav-tabs\">\\n  ')),l=this.tabs,t=r=0,s=l.length;s>r;t=++r)n=l[t],i(e('\\n    <li class=\"')),i(this.active(t)),i(e('\">\\n      <a href=\"#tab-')),i(n.get(\"id\")),i(e('\">')),i(n.get(\"title\")),i(e(\"</a>\\n    </li>\\n  \"));for(i(e('\\n</ul>\\n<div class=\"bk-bs-tab-content\">\\n  ')),c=this.tabs,t=o=0,a=c.length;a>o;t=++o)n=c[t],i(e('\\n    <div class=\"bk-bs-tab-pane ')),i(this.active(t)),i(e('\" id=\"tab-')),i(n.get(\"id\")),i(e('\"></div>\\n  '));i(e(\"\\n</div>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"widget/tabs\",[\"underscore\",\"jquery\",\"bootstrap/tab\",\"backbone\",\"common/continuum_view\",\"common/has_properties\",\"common/build_views\",\"./tabs_template\"],function(n,i,r,o,s,a,l,c){var h,u,p,d,f,_;return u=function(r){function o(){return d=o.__super__.constructor.apply(this,arguments)}return e(o,r),o.prototype.initialize=function(t){return o.__super__.initialize.call(this,t),this.views={},this.render()},o.prototype.render=function(){var e,r,o,s,a,h,u,p,d,f,_,g,m,v,y;m=this.views;for(h in m)t.call(m,h)&&(f=m[h],f.$el.detach());for(this.$el.empty(),d=this.mget_obj(\"tabs\"),r=this.mget(\"active\"),s=function(){var t,e,n;for(n=[],t=0,e=d.length;e>t;t++)p=d[t],n.push(p.get_obj(\"child\"));return n}(),l(this.views,s),a=i(c({tabs:d,active:function(t){return t===r?\"bk-bs-active\":\"\"}})),a.find(\"> li > a\").click(function(t){return t.preventDefault(),i(this).tab(\"show\")}),e=a.children(\".bk-bs-tab-pane\"),v=n.zip(s,e),_=0,g=v.length;g>_;_++)y=v[_],o=y[0],u=y[1],i(u).html(this.views[o.id].$el);return this.$el.append(a),this.$el.tabs},o}(s.View),h=function(t){function n(){return f=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Tabs\",n.prototype.default_view=u,n.prototype.defaults=function(){return{tabs:[],active:0}},n}(a),p=function(t){function n(){return _=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=h,n}(o.Collection),{Model:h,Collection:new p,View:u}})}.call(this),n(\"widget/dialog_template\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){var t,n,r,o,s;for(i(e('<div class=\"bk-bs-modal\" tabindex=\"-1\">\\n  <div class=\"bk-bs-modal-dialog\">\\n    <div class=\"bk-bs-modal-content\">\\n      <div class=\"bk-bs-modal-header\">\\n        ')),this.closable&&i(e('\\n          <button type=\"button\" class=\"bk-bs-close\" data-bk-bs-dismiss=\"modal\">&times;</button>\\n        ')),i(e('\\n        <h4 class=\"bk-bs-modal-title\">')),i(this.title),i(e('</h4>\\n      </div>\\n      <div class=\"bk-bs-modal-body\">\\n        ')),i(this.content),i(e('\\n      </div>\\n      <div class=\"bk-bs-modal-footer\">\\n        ')),s=this.buttons,n=r=0,o=s.length;o>r;n=++r)t=s[n],i(e(\"\\n          \")),0===n?(i(e('\\n            <button type=\"button\" class=\"bk-bs-btn bk-bs-btn-primary\" data-bk-bs-dismiss=\"modal\">')),i(t),i(e(\"</button>\\n          \"))):(i(e('\\n            <button type=\"button\" class=\"bk-bs-btn bk-bs-btn-default\">')),i(t),i(e(\"</button>\\n          \"))),i(e(\"\\n        \"));i(e(\"\\n      </div>\\n    </div>\\n  </div>\\n</div>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e={}.hasOwnProperty,i=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};n(\"widget/dialog\",[\"underscore\",\"backbone\",\"jquery\",\"bootstrap/modal\",\"common/has_properties\",\"common/continuum_view\",\"./dialog_template\"],function(e,n,r,o,s,a,l){var c,h,u,p,d,f;return h=function(e){function n(){return this.changeContent=t(this.changeContent,this),this.changeVisibility=t(this.changeVisibility,this),this.onHide=t(this.onHide,this),p=n.__super__.constructor.apply(this,arguments)}return i(n,e),n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,\"destroy\",this.remove),this.listenTo(this.model,\"change:visible\",this.changeVisibility),this.listenTo(this.model,\"change:content\",this.changeContent)},n.prototype.render=function(){return this.$modal=r(l(this.model.attributes)),this.$modal.modal({show:this.mget(\"visible\")}),this.$modal.on(\"hidden.bk-bs.modal\",this.onHide),this.$el.html(this.$modal)},n.prototype.onHide=function(){return this.mset(\"visible\",!1,{silent:!0})},n.prototype.changeVisibility=function(){return this.$modal.modal(this.mget(\"visible\")?\"show\":\"hide\")},n.prototype.changeContent=function(){return this.$modal.find(\".bk-bs-modal-body\").text(this.mget(\"content\"))},n}(a.View),c=function(t){function e(){return d=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"Dialog\",e.prototype.default_view=h,e.prototype.defaults=function(){return{visible:!1,closable:!0,title:\"\",content:\"\",buttons:[]}},e}(s),u=function(t){function e(){return f=e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.model=c,e}(n.Collection),{Model:c,Collection:new u,View:h}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"transforms/const\",[\"common/continuum_view\",\"backbone\",\"common/has_parent\"],function(t,n,i){var r,o,s,a,l,c;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"ConstView\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render_init()},n.prototype.delegateEvents=function(t){return n.__super__.delegateEvents.call(this,t),\"pass\"},n.prototype.render_init=function(){return this.$el.html(\"\")},n}(t.View),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Const\",n.prototype.default_view=o,n}(i),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"transforms/count\",[\"common/continuum_view\",\"backbone\",\"common/has_parent\"],function(t,n,i){var r,o,s,a,l,c;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"CountView\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render_init()},n.prototype.delegateEvents=function(t){return n.__super__.delegateEvents.call(this,t),\"pass\"},n.prototype.render_init=function(){return this.$el.html(\"\")},n}(t.View),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Count\",n.prototype.default_view=o,n}(i),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"transforms/cuberoot\",[\"common/continuum_view\",\"backbone\",\"common/has_parent\"],function(t,n,i){var r,o,s,a,l,c;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"CuberootView\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render_init()},n.prototype.delegateEvents=function(t){return n.__super__.delegateEvents.call(this,t),\"pass\"},n.prototype.render_init=function(){return this.$el.html(\"\")},n}(t.View),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Cuberoot\",n.prototype.default_view=o,n}(i),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"transforms/id\",[\"common/continuum_view\",\"backbone\",\"common/has_parent\"],function(t,n,i){var r,o,s,a,l,c;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"IdView\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render_init()},n.prototype.delegateEvents=function(t){return n.__super__.delegateEvents.call(this,t),\"pass\"},n.prototype.render_init=function(){return this.$el.html(\"\")},n}(t.View),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Id\",n.prototype.default_view=o,n}(i),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"transforms/interpolate\",[\"common/continuum_view\",\"backbone\",\"common/has_parent\"],function(t,n,i){var r,o,s,a,l,c;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"InterpolateView\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render_init()},n.prototype.delegateEvents=function(t){return n.__super__.delegateEvents.call(this,t),\"pass\"},n.prototype.render_init=function(){return this.$el.html(\"\")},n}(t.View),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Interpolate\",n.prototype.default_view=o,n}(i),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"transforms/seq\",[\"common/continuum_view\",\"backbone\",\"common/has_parent\"],function(t,n,i){var r,o,s,a,l,c;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"SeqView\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render_init()},n.prototype.delegateEvents=function(t){return n.__super__.delegateEvents.call(this,t),\"pass\"},n.prototype.render_init=function(){return this.$el.html(\"\")},n}(t.View),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Seq\",n.prototype.default_view=o,n}(i),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new s}})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"transforms/spread\",[\"common/continuum_view\",\"backbone\",\"common/has_parent\"],function(t,n,i){var r,o,s,a,l,c;return o=function(t){function n(){return a=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.attributes={\"class\":\"SpreadView\"},n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.render_init()},n.prototype.delegateEvents=function(t){return n.__super__.delegateEvents.call(this,t),\"pass\"},n.prototype.render_init=function(){return this.$el.html(\"\")},n}(t.View),r=function(t){function n(){return l=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.type=\"Spread\",n.prototype.default_view=o,n}(i),s=function(t){function n(){return c=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=r,n}(n.Collection),{Model:r,Collection:new s}})}.call(this),function(){n(\"common/base\",[\"underscore\",\"require\",\"common/custom\",\"common/gmap_plot\",\"common/grid_plot\",\"common/plot\",\"common/plot_context\",\"mapper/1d/categorical_mapper\",\"mapper/1d/linear_mapper\",\"mapper/1d/log_mapper\",\"mapper/2d/grid_mapper\",\"mapper/color/linear_color_mapper\",\"range/data_factor_range\",\"range/data_range1d\",\"range/factor_range\",\"range/range1d\",\"renderer/annotation/legend\",\"renderer/glyph/glyph_factory\",\"renderer/guide/categorical_axis\",\"renderer/guide/datetime_axis\",\"renderer/guide/grid\",\"renderer/guide/linear_axis\",\"renderer/guide/log_axis\",\"renderer/overlay/box_selection\",\"source/column_data_source\",\"source/server_data_source\",\"ticking/abstract_ticker\",\"ticking/adaptive_ticker\",\"ticking/basic_tick_formatter\",\"ticking/basic_ticker\",\"ticking/log_ticker\",\"ticking/log_tick_formatter\",\"ticking/categorical_tick_formatter\",\"ticking/categorical_ticker\",\"ticking/composite_ticker\",\"ticking/datetime_tick_formatter\",\"ticking/datetime_ticker\",\"ticking/days_ticker\",\"ticking/months_ticker\",\"ticking/single_interval_ticker\",\"ticking/years_ticker\",\"tool/box_select_tool\",\"tool/box_zoom_tool\",\"tool/click_tool\",\"tool/crosshair_tool\",\"tool/data_range_box_select_tool\",\"tool/embed_tool\",\"tool/hover_tool\",\"tool/pan_tool\",\"tool/preview_save_tool\",\"tool/reset_tool\",\"tool/resize_tool\",\"tool/wheel_zoom_tool\",\"tool/object_explorer_tool\",\"widget/data_slider\",\"widget/data_table\",\"widget/handson_table\",\"widget/table_column\",\"widget/pivot_table\",\"widget/object_explorer\",\"widget/pandas/ipython_remote_data\",\"widget/pandas/pandas_pivot_table\",\"widget/pandas/pandas_plot_source\",\"widget/paragraph\",\"widget/hbox\",\"widget/vbox\",\"widget/textinput\",\"widget/vboxmodelform\",\"widget/pretext\",\"widget/selectbox\",\"widget/slider\",\"widget/crossfilter\",\"widget/multiselect\",\"widget/date_range_slider\",\"widget/date_picker\",\"widget/panel\",\"widget/tabs\",\"widget/dialog\",\"transforms/const\",\"transforms/count\",\"transforms/cuberoot\",\"transforms/id\",\"transforms/interpolate\",\"transforms/seq\",\"transforms/spread\"],function(t,e){var n,i,r,o,s,a;return e(\"common/custom\").monkey_patch(),i={},a=window.location.href,i.prefix=a.indexOf(\"/bokeh\")>0?a.slice(0,a.indexOf(\"/bokeh\"))+\"/\":\"/\",console.log(\"setting prefix to\",i.prefix),o={Plot:\"common/plot\",GMapPlot:\"common/gmap_plot\",GridPlot:\"common/grid_plot\",PlotContext:\"common/plot_context\",PlotList:\"common/plot_context\",DataFactorRange:\"range/data_factor_range\",DataRange1d:\"range/data_range1d\",FactorRange:\"range/factor_range\",Range1d:\"range/range1d\",Glyph:\"renderer/glyph/glyph_factory\",LinearAxis:\"renderer/guide/linear_axis\",LogAxis:\"renderer/guide/log_axis\",CategoricalAxis:\"renderer/guide/categorical_axis\",DatetimeAxis:\"renderer/guide/datetime_axis\",Grid:\"renderer/guide/grid\",Legend:\"renderer/annotation/legend\",BoxSelection:\"renderer/overlay/box_selection\",ColumnDataSource:\"source/column_data_source\",ServerDataSource:\"source/server_data_source\",AbstractTicker:\"ticking/abstract_ticker\",AdaptiveTicker:\"ticking/adaptive_ticker\",BasicTicker:\"ticking/basic_ticker\",BasicTickFormatter:\"ticking/basic_tick_formatter\",LogTicker:\"ticking/log_ticker\",LogTickFormatter:\"ticking/log_tick_formatter\",CategoricalTicker:\"ticking/categorical_ticker\",CategoricalTickFormatter:\"ticking/categorical_tick_formatter\",CompositeTicker:\"ticking/composite_ticker\",DatetimeTicker:\"ticking/datetime_ticker\",DatetimeTickFormatter:\"ticking/datetime_tick_formatter\",DaysTicker:\"ticking/days_ticker\",MonthsTicker:\"ticking/months_ticker\",SingleIntervalTicker:\"ticking/single_interval_ticker\",YearsTicker:\"ticking/years_ticker\",PanTool:\"tool/pan_tool\",WheelZoomTool:\"tool/wheel_zoom_tool\",ResizeTool:\"tool/resize_tool\",ClickTool:\"tool/click_tool\",CrosshairTool:\"tool/crosshair_tool\",BoxSelectTool:\"tool/box_select_tool\",BoxZoomTool:\"tool/box_zoom_tool\",HoverTool:\"tool/hover_tool\",DataRangeBoxSelectTool:\"tool/data_range_box_select_tool\",PreviewSaveTool:\"tool/preview_save_tool\",EmbedTool:\"tool/embed_tool\",ResetTool:\"tool/reset_tool\",ObjectExplorerTool:\"tool/object_explorer_tool\",DataSlider:\"widget/data_slider\",DataTable:\"widget/data_table\",HandsonTable:\"widget/handson_table\",TableColumn:\"widget/table_column\",PivotTable:\"widget/pivot_table\",ObjectExplorer:\"widget/object_explorer\",IPythonRemoteData:\"widget/pandas/ipython_remote_data\",PandasPivotTable:\"widget/pandas/pandas_pivot_table\",PandasPlotSource:\"widget/pandas/pandas_plot_source\",Paragraph:\"widget/paragraph\",HBox:\"widget/hbox\",VBox:\"widget/vbox\",VBoxModelForm:\"widget/vboxmodelform\",TextInput:\"widget/textinput\",PreText:\"widget/pretext\",Select:\"widget/selectbox\",Slider:\"widget/slider\",CrossFilter:\"widget/crossfilter\",MultiSelect:\"widget/multiselect\",DateRangeSlider:\"widget/date_range_slider\",DatePicker:\"widget/date_picker\",Panel:\"widget/panel\",Tabs:\"widget/tabs\",Dialog:\"widget/dialog\",Const:\"transforms/const\",Count:\"transforms/count\",Cuberoot:\"transforms/cuberoot\",Id:\"transforms/id\",Interpolate:\"transforms/interpolate\",Seq:\"transforms/seq\",Spread:\"transforms/spread\"},s={},r={},n=function(t){var n,i;if(r[t])return r[t];if(!o[t])throw\"./base: Unknown Collection \"+t;if(i=o[t],null==s[i]){if(n=e(i),null==n)throw Error(\"improperly implemented collection: \"+i);s[i]=n}return s[i].Collection},n.register=function(t,e){return r[t]=e},{collection_overrides:r,mod_cache:s,locations:o,Collections:n,Config:i}})}.call(this),function(){n(\"common/plotting\",[\"underscore\",\"jquery\",\"./plot\",\"range/data_range1d\",\"range/factor_range\",\"range/range1d\",\"renderer/annotation/legend\",\"renderer/glyph/glyph_factory\",\"renderer/guide/categorical_axis\",\"renderer/guide/linear_axis\",\"renderer/guide/grid\",\"renderer/overlay/box_selection\",\"source/column_data_source\",\"tool/box_select_tool\",\"tool/box_zoom_tool\",\"tool/hover_tool\",\"tool/pan_tool\",\"tool/preview_save_tool\",\"tool/resize_tool\",\"tool/wheel_zoom_tool\",\"tool/reset_tool\",\"renderer/guide/datetime_axis\"],function(t,e,n,i,r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w){var x,k,C,S,T,A,D,M,E;return D=function(e){var n,i,r,o;for(t.isArray(e)||(e=[e]),i=[],r=0,o=e.length;o>r;r++)n=e[r],i.push(n instanceof p.Model?n:p.Collection.create({data:n}));return i},A=function(t,e,n){var s;return\"auto\"===t?i.Collection.create({sources:function(){var t,i,r;for(r=[],t=0,i=e.length;i>t;t++)s=e[t],r.push({source:s.ref(),columns:n});return r}()}):t instanceof o.Model||t instanceof r.Model?t:\"string\"==typeof t[0]?r.Collection.create({factors:t}):o.Collection.create({start:t[0],end:t[1]})},T=function(e,n,i,r){var o,s,l,c,h,u,p,d,f,_;for(s=[],t.isArray(n)||(n=[n]),1===i.length&&(i=function(){var t,e,r;for(r=[],t=0,e=n.length;e>t;t++)p=n[t],r.push(i[0]);return r}()),null==r&&(r={fill_alpha:.1,line_alpha:.1}),t.isArray(r)||(r=function(){var t,e,i;for(i=[],t=0,e=n.length;e>t;t++)p=n[t],i.push(r);return i}()),_=t.zip(n,r,i),d=0,f=_.length;f>d;d++)u=_[d],h=u[0],l=u[1],c=u[2],o=a.Collection.create({parent:e.ref(),data_source:c.ref(),glyphspec:h,nonselection_glyphspec:l}),s.push(o);return s},x=function(e,n,i,r,o){var s,a,h,u,p,d,f,_,g,m,v,y,b;if(u=[],n)if(n===!0&&(n=[\"min\",\"max\"]),t.isArray(n)||(n=[n]),\"datetime\"===n[0])a=w.Collection.create({dimension:0,axis_label:\"x\",location:\"min\",parent:e.ref(),plot:e.ref()}),u.push(a);else if(\"FactorRange\"===r.type)for(d=0,m=n.length;m>d;d++)h=n[d],a=l.Collection.create({dimension:0,axis_label:\"x\",location:h,parent:e.ref(),plot:e.ref()}),u.push(a);else for(f=0,v=n.length;v>f;f++)h=n[f],a=c.Collection.create({dimension:0,axis_label:\"x\",location:h,parent:e.ref(),plot:e.ref()}),u.push(a);if(p=[],i)if(i===!0&&(i=[\"min\",\"max\"]),t.isArray(i)||(i=[i]),\"datetime\"===i[0])a=w.Collection.create({dimension:1,axis_label:\"y\",location:\"min\",parent:e.ref(),plot:e.ref()}),p.push(a);else if(\"FactorRange\"===o.type)for(_=0,y=i.length;y>_;_++)h=i[_],a=l.Collection.create({dimension:1,axis_label:\"y\",location:h,parent:e.ref(),plot:e.ref()}),p.push(a);else for(g=0,b=i.length;b>g;g++)h=i[g],a=c.Collection.create({dimension:1,axis_label:\"y\",location:h,parent:e.ref(),plot:e.ref()}),p.push(a);return e.add_renderers(function(){var t,e,n;for(n=[],e=0,t=u.length;t>e;e++)s=u[e],n.push(s.ref());return n}()),e.add_renderers(function(){var t,e,n;for(n=[],e=0,t=p.length;t>e;e++)s=p[e],n.push(s.ref());return n}()),[u,p]},k=function(t,e,n,i,r){var o,s,a;return a=[],e&&i.length>0&&(s=h.Collection.create({dimension:0,parent:t.ref(),plot:t.ref(),axis:i[0].ref()}),a.push(s)),n&&r.length>0?(s=h.Collection.create({dimension:1,parent:t.ref(),plot:t.ref(),axis:r[0].ref()}),a.push(s),t.add_renderers(function(){var t,e,n;for(n=[],t=0,e=a.length;e>t;t++)o=a[t],n.push(o.ref());return n}())):void 0},S=function(t,e,n,i,r){var o,s,a,l,c,h,p,w,x,k,C,S;if(e!==!1)return e===!0&&(e=\"pan,wheel_zoom,select,resize,preview,reset,box_zoom\"),o=[],e.indexOf(\"pan\")>-1&&(h=g.Collection.create({dataranges:[i.ref(),r.ref()],dimensions:[\"width\",\"height\"]}),o.push(h)),e.indexOf(\"wheel_zoom\")>-1&&(S=y.Collection.create({dataranges:[i.ref(),r.ref()],dimensions:[\"width\",\"height\"]}),o.push(S)),e.indexOf(\"hover\")>-1&&(c=_.Collection.create({plot:t.ref()}),o.push(c)),e.indexOf(\"select\")>-1&&(C=d.Collection.create({renderers:function(){var t,e,i;for(i=[],t=0,e=n.length;e>t;t++)l=n[t],i.push(l.ref());return i}()}),k=u.Collection.create({tool:C.ref()}),o.push(C),t.add_renderers([k.ref()])),e.indexOf(\"resize\")>-1&&(x=v.Collection.create(),o.push(x)),e.indexOf(\"preview\")>-1&&(p=m.Collection.create(),o.push(p)),e.indexOf(\"reset\")>-1&&(w=b.Collection.create(),o.push(w)),e.indexOf(\"box_zoom\")>-1&&(a=f.Collection.create(),s=u.Collection.create({tool:a.ref()}),o.push(a),t.add_renderers([s.ref()])),t.set_obj(\"tools\",o)},C=function(t,e,n){var i,r,o,a,l,c;if(e){for(a={},r=l=0,c=n.length;c>l;r=++l)i=n[r],a[e+String(r)]=[i.ref()];return o=s.Collection.create({parent:t.ref(),plot:t.ref(),orientation:\"top_right\",legends:a}),t.add_renderers([o.ref()])}},M=function(t,e,i){var r,o,s,a,l,c,h,u,p,d,f,_,g,m,v,y,b,w;return l=i.nonselected,u=i.title,r=i.dims,g=i.xrange,b=i.yrange,d=i.xaxes,m=i.yaxes,_=i.xgrid,y=i.ygrid,f=i.xdr,v=i.ydr,p=i.tools,a=i.legend,null==l&&(l=null),null==u&&(u=\"\"),null==r&&(r=[400,400]),null==g&&(g=\"auto\"),null==b&&(b=\"auto\"),null==d&&(d=!0),null==m&&(m=!0),null==_&&(_=!0),null==y&&(y=!0),null==p&&(p=!0),null==a&&(a=!1),h=D(e),f=A(g,h,[\"x\"]),v=A(b,h,[\"y\"]),c=n.Collection.create({x_range:f.ref(),y_range:v.ref(),canvas_width:r[0],canvas_height:r[1],outer_width:r[0],outer_height:r[1],title:u}),s=T(c,t,h,l),c.add_renderers(function(){var t,e,n;for(n=[],t=0,e=s.length;e>t;t++)o=s[t],n.push(o.ref());return n}()),w=x(c,d,m,f,v),d=w[0],m=w[1],k(c,_,y,d,m),S(c,p,s,f,v),C(c,a,s),c},E=function(n,i){var r,o;return null==i&&(i=!1),r=e('<div class=\"plotdiv\"></div>'),i=e(i?i:\"body\"),i.append(r),o=function(){var t;return t=new n.default_view({model:n}),window.pview=t,r.append(t.$el),console.log(\"added plot: \"+n.get(\"title\"))},t.defer(o)},{make_plot:M,create_glyphs:T,show:E}})}.call(this),function(){n(\"common/affine\",[],function(){var t;return t=function(){function t(t,e,n,i,r,o){this.a=null!=t?t:1,this.b=null!=e?e:0,this.c=null!=n?n:0,this.d=null!=i?i:1,this.tx=null!=r?r:0,this.ty=null!=o?o:0}return t.prototype.apply=function(t,e){return[this.a*t+this.b*e+this.tx,this.c*t+this.d*e+this.ty]},t.prototype.v_apply=function(t,e){var n,i,r,o,s;for(i=new Float32Array(t.length),r=new Float32Array(e.length),n=o=0,s=t.length;s>=0?s>o:o>s;n=s>=0?++o:--o)i[n]=this.a*t[n]+this.b*e[n]+this.tx,r[n]=this.c*t[n]+this.d*e[n]+this.ty;return[i,r]},t.prototype.is_identity=function(){return 1===this.a&&0===this.b&&0===this.c&&1===this.d&&0===this.tx&&0===this.ty},t.prototype.translate=function(t,e){return this.tx=this.a*t+this.b*e,this.ty=this.c*t+this.d*e},t.prototype.scale=function(t,e){return this.a*=t,this.b*=e,this.c*=t,this.d*=e},t.prototype.rotate=function(t){var e,n,i,r,o,s;return e=Math.cos(t),n=Math.sin(t),i=e*this.a+n*this.b,r=e*this.b-n*this.a,o=e*this.c+n*this.d,s=e*this.d-n*this.c,this.a=i,this.b=r,this.c=o,this.d=s},t.prototype.shear=function(t,e){var n,i,r,o;return n=this.a+t*this.c,i=this.b+t*this.d,r=this.c+e*this.a,o=this.d+e*this.b,this.a=n,this.b=i,this.c=r,this.d=o},t.prototype.reflect_x=function(t){return this.tx=2*this.a*t+this.tx,this.ty=2*this.c*t+this.ty,this.a=-this.a,this.c=-this.c},t.prototype.reflect_y=function(t){return this.tx=2*this.b*t+this.tx,this.ty=2*this.d*t+this.ty,this.b=-this.b,this.d=-this.d},t.prototype.reflect_xy=function(t,e){return this.tx=2*(this.a*t+this.b*e)+this.tx,this.ty=2*(this.c*t+this.d*e)+this.ty,this.a=-this.a,this.b=-this.b,this.c=-this.c,this.d=-this.d},t.prototype.compose_right=function(t){var e,n,i,r,o,s;return e=this.a*t.a+this.b*t.c,n=this.a*t.b+this.b*t.d,i=this.c*t.a+this.d*t.c,r=this.c*t.b+this.d*t.d,o=this.a*t.tx+this.b*t.ty+this.tx,s=this.c*t.tx+this.d*t.ty+this.ty,this.a=e,this.b=n,this.c=i,this.d=r,this.tx=o,this.ty=s},t.prototype.compose_left=function(t){var e,n,i,r,o,s;return e=t.a*this.a+t.b*this.c,n=t.a*this.b+t.b*this.d,i=t.c*this.a+t.d*this.c,r=t.c*this.b+t.d*this.d,o=t.a*this.tx+t.b*this.ty+t.tx,s=t.c*this.tx+t.d*this.ty+t.ty,this.a=e,this.b=n,this.c=i,this.d=r,this.tx=o,this.ty=s},t}()})}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"common/png_view\",[\"./continuum_view\"],function(t){var n,i;return n=function(t){function n(){return i=n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(t){return n.__super__.initialize.call(this,t),this.thumb_x=t.thumb_x||40,this.thumb_y=t.thumb_y||40,this.render(),this},n.prototype.render=function(){var t;return this.$el.html(\"\"),t=this.model.get(\"png\"),this.$el.append($(\"<p> \"+this.model.get(\"title\")+\" </p>\")),this.$el.append($(\"<img modeltype='\"+this.model.type+\"' modelid='\"+this.model.get(\"id\")+\"' class='pngview' width='\"+this.thumb_x+\"'  height='\"+this.thumb_y+\"'  src='\"+t+\"'/>\"))},n}(t.View)})}.call(this),function(){n(\"common/random\",[],function(){var t;return t=function(){function t(t){this.seed=t,this.multiplier=1664525,this.modulo=4294967296,this.offset=1013904223,null!=this.seed&&t>=0&&t<this.modulo||(this.seed=(new Date).valueOf()*(new Date).getMilliseconds()%this.modulo)}return t.prototype.seed=function(t){return this.seed=t},t.prototype.randn=function(){return this.seed=(this.multiplier*this.seed+this.offset)%this.modulo},t.prototype.randf=function(){return this.randn()/this.modulo},t.prototype.rand=function(t){return Math.floor(this.randf()*t)},t.prototype.rand2=function(t,e){return t+this.rand(e-t)},t}()})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};n(\"common/socket\",[\"backbone\",\"underscore\",\"common/base\",\"common/load_models\"],function(e,n,i,r){var o,s,a,l;return o=i.Config,s=function(){function i(e){this.onmessage=t(this.onmessage,this);var n=this;this.auth={},this.ws_conn_string=e,this._connected=$.Deferred(),this.connected=this._connected.promise(),this.s=window.MozWebSocket?new MozWebSocket(e):new WebSocket(e),this.s.onopen=function(){return n._connected.resolve()},this.s.onmessage=this.onmessage}return n.extend(i.prototype,e.Events),i.prototype.onmessage=function(t){var e,n,i;return e=t.data,n=e.indexOf(\":\"),n=e.indexOf(\":\",n+1),i=e.substring(0,n),e=e.substring(n+1),this.trigger(\"msg:\"+i,e),null},i.prototype.send=function(t){var e=this;return $.when(this.connected).done(function(){return e.s.send(t)})},i.prototype.subscribe=function(t,e){var n;return this.auth[t]=e,n=JSON.stringify({msgtype:\"subscribe\",topic:t,auth:e}),this.send(n)},i}(),l=function(t,e,n){return t.subscribe(e,n),t.on(\"msg:\"+e,function(t){var e,n,i,s,a,l,c;if(i=JSON.parse(t),\"modelpush\"===i.msgtype)r(i.modelspecs);else if(\"modeldel\"===i.msgtype)for(c=i.modelspecs,a=0,l=c.length;l>a;a++)s=c[a],n=resolve_ref(s.type,s.id),n&&n.destroy({local:!0});else\"status\"===i.msgtype&&\"subscribesuccess\"===i.status[0]?(e=i.status[2],o.clientid=e,$.ajaxSetup({headers:{\"Continuum-Clientid\":e}})):console.log(i);return null})},a={WebSocketWrapper:s,submodels:l}})}.call(this),function(){n(\"server/serverutils\",[\"common/base\",\"common/socket\",\"common/load_models\",\"backbone\",\"common/has_properties\"],function(t,n,i,r,o){var s,a,l,c,h,u;return s={},a={},c={},l=n.WebSocketWrapper,h=n.submodels,s._doc_loaded=$.Deferred(),s._doc_requested=$.Deferred(),a.doc_loaded=s._doc_loaded.promise(),a.doc_requested=s._doc_requested.promise(),a.doc_promises={},c.wswrapper=null,c.plotcontext=null,c.plotcontextview=null,c.Promises=a,u={load_one_object_chain:function(t,n){var s,a,l;return null==c.wswrapper&&(u.make_websocket(),o.prototype.sync=r.sync),s=e(\"common/base\").Config,l=\"\"+s.prefix+\"bokeh/objinfo/\"+t+\"/\"+n,console.log(l),a=$.get(l),a.done(function(e){var n,r;return n=e.all_models,i(n),r=e.apikey,h(c.wswrapper,\"bokehplot:\"+t,r)}),a},load_user:function(){var t;return t=$.get(\"/bokeh/userinfo/\",{})},load_doc_once:function(t){var e;return _.has(a.doc_promises,t)?(console.log(\"already found \"+t+\" in promises\"),a.doc_promises[t]):(console.log(\"\"+t+\" not in promises, loading it\"),e=u.load_doc(t),a.doc_promises[t]=e,e)},load_doc_by_title:function(t){var n,r;return n=e(\"common/base\").Config,r=$.get(n.prefix+\"bokeh/doc\",{title:t}).done(function(t){var e,n,r;return e=t.all_models,i(e),n=t.apikey,r=t.docid,h(c.wswrapper,\"bokehplot:\"+r,n)})},load_doc_static:function(t,e){\" loads data without making a websocket connection \";var n;return load_data(e.all_models),n=jQuery.Deferred(),n.resolve(),n},load_doc:function(t){var n,r,o;return o=u.make_websocket(),n=e(\"common/base\").Config,r=$.get(n.prefix+(\"bokeh/bokehinfo/\"+t+\"/\"),{}).done(function(e){var n,r;\n",
        "                return n=e.all_models,i(n),r=e.apikey,h(c.wswrapper,\"bokehplot:\"+t,r)})},make_websocket:function(){var t,n;return t=e(\"common/base\").Config,n=new l(t.ws_conn_string),c.wswrapper=n,n},render_plots:function(t,n,i){var r,o,s,a;return null==n&&(n=null),null==i&&(i={}),r=e(\"common/base\").Collections,s=r(t.type).get(t.id),n||(n=s.default_view),o=_.extend(i,{model:s}),a=new n(o),s=s,a=a,a.render(),c.plotcontext=s,c.plotcontextview=a},bokeh_connection:function(t,e,n){return _.isUndefined(n)&&(n=\"https\"),\"pending\"===a.doc_requested.state()?(s._doc_requested.resolve(),$.get(\"\"+n+\"://\"+t+\"/bokeh/publicbokehinfo/\"+e,{},function(t){return console.log(\"instatiate_doc_single, docid\",e),t=JSON.parse(t),i(t.all_models),s._doc_loaded.resolve(t)})):void 0}},c.utility=u,c})}.call(this),function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};n(\"server/embed_core\",[\"common/base\",\"common/load_models\",\"server/serverutils\"],function(e,n,i){var r,o,s,a,l,c,h,u,p,d,f,g,m;return m=i.utility,a=function(t,e){return s(t.bokeh_modelid,t.bokeh_modeltype,t.element,e)},s=function(t,i,r,o){var s,a,l;return s=_.keys(o)[0],!s!==t?(console.log(\"addPlot\"),console.log(t,i,r),n(o[s]),a=e.Collections(i).get(t),l=new a.default_view({model:a}),l.render(),_.delay(function(){return $(r).replaceWith(l.$el)})):void 0},o=function(t){return console.log(\"addDirectPlotWrap\"),r(t.bokeh_docid,t.bokeh_ws_conn_string,t.bokeh_docapikey,t.bokeh_root_url,t.bokeh_modelid,t.bokeh_modeltype,t.element)},f=function(t,n,i,r){var o,s;return console.log(\"serverLoad\"),s={\"BOKEH-API-KEY\":i},$.ajaxSetup({headers:s}),o=e.Config,o.prefix=r,o.ws_conn_string=n,m.load_doc_once(t)},r=function(t,n,i,r,o,s,a){return f(t,n,i,r).done(function(){var t,n,i;return console.log(\"addPlot\"),console.log(o,s,a),n=e.Collections(s),t=n.get(o),i=new t.default_view({model:t}),_.delay(function(){return $(a).replaceWith(i.$el)})})},u=function(t){var e,n;return e=[\"\"+t+\"css/bokeh.css\"],n=function(t){var e;return e=document.createElement(\"link\"),e.href=t,e.rel=\"stylesheet\",e.type=\"text/css\",document.body.appendChild(e)},_.map(e,n)},h=[],p=function(t){\"this takes a bokeh embed script element and returns the relvant\\nattributes through to a dictionary, \";var e,n,i,r,o,s,a;for(n=t.attributes,r=/bokeh.*/,o={},i=0,s=0,a=n.length;a>s;s++)e=n[s],e.name.match(r)&&(o[e.name]=e.value,i++);return i>0?o:!1},g={},c=function(){var e,n,i,r,o,s,a,l,c,u,d;for(r=document.getElementsByTagName(\"script\"),c=/.*embed.js.*/,l=[],u=0,d=r.length;d>u;u++)i=r[u],s=t.call(h,i)<0,a=i.src.match(c),s&&a&&(h.push(i),o=p(i),n=document.createElement(\"div\"),e=document.createElement(\"div\"),e.className=\"bokeh-container\",i.parentNode.insertBefore(e,i),o.element=e,l.push(o));return l},d=function(t){var e,n;return n=function(e,n){var i;return\"embeddata\"!==e.bokeh_plottype?(o(e),delete g[n]):(i=_.keys(t)[0],n===i?(a(e,t),delete g[n]):void 0)},e=c(),_.each(e,function(t){return g[t.bokeh_modelid]=t}),_.map(g,n)},l={search_and_plot:d,injectCss:u}})}.call(this),function(){n(\"server/embed\",[\"jquery\",\"common/base\",\"common/load_models\",\"server/serverutils\"],function(t,e,n,i){var r,o,s,a;return s=function(e){var n;return n=t(\"<link href='\"+e+\"' rel='stylesheet' type='text/css'>\"),t(\"body\").append(n)},o=function(i,r,o){var s,a,l,c;return a=r.bokehModelid,n(o),l=r.bokehModeltype,s=e.Collections(l).get(a),c=new s.default_view({model:s}),_.delay(function(){return t(i).replaceWith(c.$el)})},r=function(n,r){var o;return o=i.utility.load_one_object_chain(r.bokehDocid,r.bokehModelid),o.done(function(){var i,o;return i=e.Collections(r.bokehModeltype).get(r.bokehModelid),o=new i.default_view({model:i}),_.delay(function(){return t(n).replaceWith(o.$el)})})},a=function(n,i){var s,a,l;if(console.log(\"Injecting plot for script tag with id: #\"+n),l=t(\"#\"+n),0===l.length)throw\"Error injecting plot: could not find script tag with id: \"+n;if(l.length>1)throw\"Error injecting plot: found too many script tags with id: \"+n;if(!document.body.contains(l[0]))throw\"Error injecting plot: autoload script tag may only be under <body>\";if(a=l.data(),e.Config.ws_conn_string=a.bokehConnString,e.Config.prefix=a.bokehRootUrl,s=t(\"<div>\",{\"class\":\"bokeh-container\"}),s.insertBefore(l),\"static\"===a.bokehData)return console.log(\" - using static data\"),o(s,a,i);if(\"server\"===a.bokehData)return console.log(\" - using server data\"),r(s,a);throw\"Unknown bokehData value for inject_plot: \"+a.bokehData},{inject_plot:a,add_plot_server:r,add_plot_static:o,inject_css:s}})}.call(this),n(\"server/usercontext/userdocstemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<div class=\"accordion\">\\n</div>\\n'))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),n(\"server/usercontext/documentationtemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e(\"<p>\\n  <b>\\n    You have no Plots. Follow the instructions below to create some.\\n  </b>\\n</p>\\n\"))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),n(\"server/usercontext/wrappertemplate\",[],function(){var t=function(t){var e=function(t){\"undefined\"==typeof t&&null==t&&(t=\"\");var e=new String(t);return e.ecoSafe=!0,e};return function(){var t=[],n=this,i=function(e){\"undefined\"!=typeof e&&null!=e&&t.push(e.ecoSafe?e:n.escape(e))};return function(){i(e('<div class=\"panel panel-default\">\\n  <div class=\"panel-heading\">\\n    <h4 class=\"panel-title\">\\n      <a class=\"bokehdoclabel\" href=\"#')),i(this.bodyid),i(e('\" data-toggle=\"collapse\">\\n        Document: ')),i(this.model.get(\"title\")),i(e(' <span class=\"bokehdelete glyphicon glyphicon-trash\"></i>\\n      </a>\\n    </h4>\\n  </div>\\n  <div id=\"')),i(this.bodyid),i(e('\" class=\"panel-collapse collapse\">\\n    <div class=\"panel-body plots\"></div>\\n  </div>\\n</div>\\n'))}.call(this),t.join(\"\")}.call(function(){var n,i={escape:function(t){return(\"\"+t).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\")},safe:e};for(n in t)i[n]=t[n];return i}())};return t}),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};n(\"server/usercontext/usercontext\",[\"underscore\",\"jquery\",\"common/base\",\"../serverutils\",\"common/continuum_view\",\"./userdocstemplate\",\"./documentationtemplate\",\"./wrappertemplate\",\"common/has_parent\",\"common/build_views\",\"common/load_models\"],function(t,n,i,r,o,s,a,l,c,h){var u,p,d,f,_,g,m,v,y,b,w;return g={},u=o.View,m=r.utility,d=function(n){function i(){return v=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.template=l,i.prototype.attributes={\"class\":\"panel-group\"},i.prototype.events={\"click .bokehdoclabel\":\"loaddoc\",\"click .bokehdelete\":\"deldoc\"},i.prototype.deldoc=function(t){return t.preventDefault(),this.model.destroy(),!1},i.prototype.loaddoc=function(){return this.model.load()},i.prototype.initialize=function(t){return i.__super__.initialize.call(this,t),this.render_init()},i.prototype.delegateEvents=function(t){return i.__super__.delegateEvents.call(this,t),this.listenTo(this.model,\"loaded\",this.render)},i.prototype.render_init=function(){var e;return e=this.template({model:this.model,bodyid:t.uniqueId()}),this.$el.html(e)},i.prototype.render=function(){var t;return t=this.model.get_obj(\"plot_context\"),this.plot_context_view=new t.default_view({model:t}),this.$el.find(\".plots\").append(this.plot_context_view.el),!0},i}(u),_=function(n){function i(){return y=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.initialize=function(t){return this.docs=t.docs,this.collection=t.collection,this.views={},i.__super__.initialize.call(this,t),this.render()},i.prototype.attributes={\"class\":\"usercontext\"},i.prototype.events={\"click .bokehrefresh\":function(){return this.collection.fetch({update:!0})}},i.prototype.delegateEvents=function(t){var e=this;return i.__super__.delegateEvents.call(this,t),this.listenTo(this.collection,\"add\",this.render),this.listenTo(this.collection,\"remove\",this.render),this.listenTo(this.collection,\"add\",function(t){return e.listenTo(t,\"loaded\",function(){return e.listenTo(t.get_obj(\"plot_context\"),\"change\",function(){return e.trigger(\"show\")})})}),this.listenTo(this.collection,\"remove\",function(t){return e.stopListening(t)})},i.prototype.render_docs=function(){return this.$el.html(a()),this.$el.append(this.docs)},i.prototype.render=function(){var e,n,i,r,o;if(0===this.collection.models.length&&this.docs)return this.render_docs();for(e=s(),t.map(t.values(this.views),function(t){return t.$el.detach()}),i=this.collection.models.slice().reverse(),h(this.views,i,{}),this.$el.html(e),r=0,o=i.length;o>r;r++)n=i[r],this.$el.find(\".accordion\").append(this.views[n.id].el);return this},i}(u),p=function(t){function i(){return b=i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.default_view=d,i.prototype.idAttribute=\"docid\",i.prototype.defaults={docid:null,title:null,plot_context:null,apikey:null},i.prototype.sync=function(){},i.prototype.destroy=function(t){return i.__super__.destroy.call(this,t),n.ajax({url:\"/bokeh/doc/\"+this.get(\"docid\")+\"/\",type:\"delete\"})},i.prototype.load=function(t){var e,n,i,r=this;if(!this.loaded)return t?(i=this.get(\"title\"),n=m.load_doc_by_title(i)):(e=this.get(\"docid\"),n=m.load_doc(e)),n.done(function(t){return r.set(\"docid\",t.docid),r.set(\"apikey\",t.apikey),r.set(\"plot_context\",t.plot_context_ref),r.trigger(\"loaded\"),r.loaded=!0})},i}(c),f=function(r){function o(){return w=o.__super__.constructor.apply(this,arguments)}return e(o,r),o.prototype.model=p,o.prototype.subscribe=function(t,e){return t.subscribe(\"bokehuser:\"+e,null),this.listenTo(t,\"msg:bokehuser:\"+e,function(t){return t=JSON.parse(t),\"docchange\"===t.msgtype?this.fetch({update:!0}):void 0})},o.prototype.fetch=function(e){var r,o,s,a=this;return t.isUndefined(e)&&(e={}),s=i.Config.prefix+\"bokeh/userinfo/\",r=o=n.get(s,{}),r.done(function(t){var n;return n=t.docs,e.update?a.set(n,e):a.reset(n,e)}),r},o}(Backbone.Collection),g.UserDocs=f,g.UserDocsView=_,g.Doc=p,g.DocView=d,g})}.call(this),function(){n(\"server/serverrun\",[\"common/base\",\"./serverutils\",\"./usercontext/usercontext\",\"common/has_properties\"],function(t,n,i,r){var o,s,a,l,c,h,u,p;return o=t.Config,s=n.Promises,o.ws_conn_string=\"ws://\"+window.location.host+\"/bokeh/sub\",c=function(){var t;return o=e(\"common/base\").Config,t=\"\"+o.prefix+\"bokeh/ping\",$.get(t).success(function(){return console.log(\"reloading\"),window.location.reload()}).fail(_.delay(function(){return c()},1e3)),null},l=function(e,i){return r.prototype.sync=Backbone.sync,$(function(){var r,o;return o=n.utility.make_websocket(),r=n.utility.load_one_object_chain(e,i),r.done(function(e){var n,r;return n=t.Collections(e.type).get(i),r=new n.default_view({model:n}),h(r.el)}),o.subscribe(\"debug:debug\",\"\"),o.on(\"msg:debug:debug\",function(t){return\"reload\"===t?c():void 0})})},a=function(t){return r.prototype.sync=Backbone.sync,$(function(){var e,r;return r=n.utility.make_websocket(),e=new i.UserDocs,e.subscribe(r,\"defaultuser\"),window.userdocs=e,a=e.fetch(),a.done(function(){return null!=t?p(e,t):u(e)}),console.log(\"subscribing to debug\"),r.subscribe(\"debug:debug\",\"\"),r.on(\"msg:debug:debug\",function(t){return\"reload\"===t?c():void 0})})},u=function(t){var e;return e=new i.UserDocsView({collection:t}),h(e.el)},p=function(t,e){var n,i;return n=t.find(function(t){return t.get(\"title\")===e}),null!=n?(n.on(\"loaded\",function(){var t,e;return t=n.get_obj(\"plot_context\"),e=new t.default_view({model:t}),h(e.el)}),n.load()):(i=\"Document '\"+e+\"' wasn't found on this server.\",h(i),console.error(i))},h=function(t){return $(\"#PlotPane\").append(t)},{load:a,load_one_object:l}})}.call(this),function(){n(\"main\",[\"require\",\"exports\",\"module\",\"underscore\",\"jquery\",\"backbone\",\"common/base\",\"common/base\",\"common/gmap_plot\",\"common/grid_plot\",\"common/has_parent\",\"common/has_properties\",\"common/plot\",\"common/plotting\",\"common/affine\",\"common/build_views\",\"common/bulk_save\",\"common/continuum_view\",\"common/grid_view_state\",\"common/load_models\",\"common/plot_context\",\"common/plot_widget\",\"common/png_view\",\"common/random\",\"common/safebind\",\"common/svg_colors\",\"common/view_state\",\"mapper/1d/linear_mapper\",\"mapper/1d/log_mapper\",\"mapper/1d/categorical_mapper\",\"mapper/2d/grid_mapper\",\"mapper/color/linear_color_mapper\",\"palettes/palettes\",\"renderer/annotation/legend\",\"renderer/glyph/glyph\",\"renderer/glyph/glyph_factory\",\"renderer/guide/categorical_axis\",\"renderer/guide/datetime_axis\",\"renderer/guide/grid\",\"renderer/guide/linear_axis\",\"renderer/guide/log_axis\",\"renderer/overlay/box_selection\",\"renderer/properties\",\"server/embed_core\",\"server/embed\",\"server/serverrun\",\"server/serverutils\",\"source/column_data_source\",\"ticking/abstract_ticker\",\"ticking/adaptive_ticker\",\"ticking/basic_ticker\",\"ticking/basic_tick_formatter\",\"ticking/log_ticker\",\"ticking/log_tick_formatter\",\"ticking/categorical_ticker\",\"ticking/categorical_tick_formatter\",\"ticking/composite_ticker\",\"ticking/datetime_ticker\",\"ticking/datetime_tick_formatter\",\"ticking/days_ticker\",\"ticking/months_ticker\",\"ticking/single_interval_ticker\",\"ticking/years_ticker\",\"tool/box_select_tool\",\"tool/box_zoom_tool\",\"tool/click_tool\",\"tool/crosshair_tool\",\"tool/data_range_box_select_tool\",\"tool/embed_tool\",\"tool/hover_tool\",\"tool/pan_tool\",\"tool/preview_save_tool\",\"tool/reset_tool\",\"tool/resize_tool\",\"tool/wheel_zoom_tool\",\"tool/object_explorer_tool\",\"server/serverrun\",\"server/serverrun\",\"widget/data_slider\",\"widget/hbox\",\"widget/vbox\",\"widget/vboxmodelform\",\"widget/textinput\",\"widget/crossfilter\",\"widget/object_explorer\"],function(t,e){var n,i,r;return window.Float64Array||(console.warn(\"Float64Array is not supported. Using generic Array instead.\"),window.Float64Array=Array),n={},n.require=t,n.version=\"0.5.1\",n._=t(\"underscore\"),n.$=t(\"jquery\"),n.Backbone=t(\"backbone\"),r=window.$,window.jQuery.noConflict(),\"undefined\"==typeof $&&(window.$=r),n.Collections=t(\"common/base\").Collections,n.Config=t(\"common/base\").Config,n.GMapPlot=t(\"common/gmap_plot\"),n.GridPlot=t(\"common/grid_plot\"),n.HasParent=t(\"common/has_parent\"),n.HasProperties=t(\"common/has_properties\"),n.Plot=t(\"common/plot\"),n.Plotting=t(\"common/plotting\"),n.Affine=t(\"common/affine\"),n.build_views=t(\"common/build_views\"),n.bulk_save=t(\"common/bulk_save\"),n.ContinuumView=t(\"common/continuum_view\"),n.GridViewState=t(\"common/grid_view_state\"),n.load_models=t(\"common/load_models\"),n.PlotContext=t(\"common/plot_context\"),n.PlotWidget=t(\"common/plot_widget\"),n.PNGView=t(\"common/png_view\"),n.Random=t(\"common/random\"),n.safebind=t(\"common/safebind\"),n.SVGColors=t(\"common/svg_colors\"),n.ViewState=t(\"common/view_state\"),n.LinearMapper=t(\"mapper/1d/linear_mapper\"),n.LogMapper=t(\"mapper/1d/log_mapper\"),n.CategoricalMapper=t(\"mapper/1d/categorical_mapper\"),n.GridMapper=t(\"mapper/2d/grid_mapper\"),n.LinearColorMapper=t(\"mapper/color/linear_color_mapper\"),n.Palettes=t(\"palettes/palettes\"),n.Legend=t(\"renderer/annotation/legend\"),n.Glyph=t(\"renderer/glyph/glyph\"),i=t(\"renderer/glyph/glyph_factory\"),n.AnnularWedge=i.annular_wedge,n.Annulus=i.annulus,n.Arc=i.arc,n.Asterisk=i.asterisk,n.Bezier=i.bezier,n.Circle=i.circle,n.CircleCross=i.circle_cross,n.CircleX=i.circle_x,n.Cross=i.cross,n.Diamond=i.diamond,n.DiamondCross=i.diamond_cross,n.Image=i.image,n.ImageRGBA=i.image_rgba,n.ImageURL=i.image_url,n.InvertedTriangle=i.inverted_triangle,n.Line=i.line,n.MultiLine=i.multi_line,n.Oval=i.oval,n.Patch=i.patch,n.Patches=i.patches,n.Quad=i.quad,n.Quadratic=i.quadratic,n.Ray=i.ray,n.Rect=i.rect,n.Segment=i.segment,n.Square=i.square,n.SquareCross=i.square_cross,n.SquareX=i.square_x,n.Text=i.text,n.Triangle=i.triangle,n.Wedge=i.wedge,n.X=i.x,n.CategoricalAxis=t(\"renderer/guide/categorical_axis\"),n.DatetimeAxis=t(\"renderer/guide/datetime_axis\"),n.Grid=t(\"renderer/guide/grid\"),n.LinearAxis=t(\"renderer/guide/linear_axis\"),n.LogAxis=t(\"renderer/guide/log_axis\"),n.BoxSelection=t(\"renderer/overlay/box_selection\"),n.Properties=t(\"renderer/properties\"),n.embed_core=t(\"server/embed_core\"),n.embed=t(\"server/embed\"),n.serverrun=t(\"server/serverrun\"),n.serverutils=t(\"server/serverutils\"),n.ColumnDataSource=t(\"source/column_data_source\"),n.AbstractTicker=t(\"ticking/abstract_ticker\"),n.AdaptiveTicker=t(\"ticking/adaptive_ticker\"),n.BasicTicker=t(\"ticking/basic_ticker\"),n.BasicTickFormatter=t(\"ticking/basic_tick_formatter\"),n.LogTicker=t(\"ticking/log_ticker\"),n.LogTickFormatter=t(\"ticking/log_tick_formatter\"),n.CategoricalTicker=t(\"ticking/categorical_ticker\"),n.CategoricalTickFormatter=t(\"ticking/categorical_tick_formatter\"),n.CompositeTicker=t(\"ticking/composite_ticker\"),n.DatetimeTicker=t(\"ticking/datetime_ticker\"),n.DatetimeTickFormatter=t(\"ticking/datetime_tick_formatter\"),n.DaysTicker=t(\"ticking/days_ticker\"),n.MonthsTicker=t(\"ticking/months_ticker\"),n.SingleIntervalTicker=t(\"ticking/single_interval_ticker\"),n.YearsTicker=t(\"ticking/years_ticker\"),n.BoxSelectTool=t(\"tool/box_select_tool\"),n.BoxZoomTool=t(\"tool/box_zoom_tool\"),n.ClickTool=t(\"tool/click_tool\"),n.CrosshairTool=t(\"tool/crosshair_tool\"),n.DataRangeBoxSelectTool=t(\"tool/data_range_box_select_tool\"),n.EmbedTool=t(\"tool/embed_tool\"),n.HoverTool=t(\"tool/hover_tool\"),n.PanTool=t(\"tool/pan_tool\"),n.PreviewSaveTool=t(\"tool/preview_save_tool\"),n.ResetTool=t(\"tool/reset_tool\"),n.ResizeTool=t(\"tool/resize_tool\"),n.WheelZoomTool=t(\"tool/wheel_zoom_tool\"),n.ObjectExplorerTool=t(\"tool/object_explorer_tool\"),n.one_object_page=t(\"server/serverrun\").load_one_object,n.server_page=t(\"server/serverrun\").load,n.DataSlider=t(\"widget/data_slider\"),n.HBox=t(\"widget/hbox\"),n.VBox=t(\"widget/vbox\"),n.VBoxModelForm=t(\"widget/vboxmodelform\"),n.TextInput=t(\"widget/textinput\"),n.CrossFilter=t(\"widget/crossfilter\"),n.ObjectExplorer=t(\"widget/object_explorer\"),e.Bokeh=n,n})}.call(this),e(\"main\")});\n",
        "                /* END /Library/Python/2.7/site-packages/bokeh/server/static/js/bokeh.min.js */\n",
        "        </script>\n",
        "    <div>\n",
        "        <a href=\"http://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
        "        <span>BokehJS successfully loaded.</span>\n",
        "    </div>\n",
        "    <p style=\"background-color: #f2d7dc;\">Warning: BokehJS previously loaded</p>"
       ],
       "metadata": {},
       "output_type": "display_data"
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# If no outliers, shrink lengths of stems to be no longer than the minimums or maximums\n",
      "qmin = groups.quantile(q=0.00) \n",
      "qmax = groups.quantile(q=1.00)\n",
      "upper.score = [min([x,y]) for (x,y) in zip(list(qmax.iloc[:,0]),upper.score) ]\n",
      "lower.score = [max([x,y]) for (x,y) in zip(list(qmin.iloc[:,0]),lower.score) ]\n",
      "\n",
      "figure(tools=\"previewsave\", background_fill=\"#EFE8E2\", title=\"\")\n",
      "hold()\n",
      "\n",
      "# stems\n",
      "segment(cats, upper.score, cats, q3.score, x_range=cats, \n",
      "        line_width=2, line_color=\"black\")\n",
      "segment(cats, lower.score, cats, q1.score, x_range=cats,\n",
      "        line_width=2, line_color=\"black\")\n",
      "# boxes\n",
      "rect(cats, (q3.score+q2.score)/2, 0.7, q3.score-q2.score,\n",
      "     fill_color=\"#E08E79\", line_width=2, line_color=\"black\")\n",
      "rect(cats, (q2.score+q1.score)/2, 0.7, q2.score-q1.score,\n",
      "     fill_color=\"#3B8686\", line_width=2, line_color=\"black\")\n",
      "\n",
      "# whisters (0-height rects simpler than segments)\n",
      "rect(cats, lower.score, 0.2, 0, line_color=\"black\")\n",
      "rect(cats, upper.score, 0.2, 0, line_color=\"black\")\n",
      "\n",
      "# outliers\n",
      "circle(outx, outy, size=6, color=\"#F38630\", fill_alpha=0.6)\n",
      "\n",
      "xgrid().grid_line_color = None\n",
      "ygrid().grid_line_color = \"white\"\n",
      "ygrid().grid_line_width = 2\n",
      "xaxis().major_label_text_font_size=\"12pt\"\n",
      "\n",
      "show()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<script type=\"text/javascript\">\n",
        "        $(function() {\n",
        "            var modelid = \"85879ebe-f43e-4903-ba26-63013c6733c7\";\n",
        "            var modeltype = \"Plot\";\n",
        "            var elementid = \"3e5894c8-b084-4d73-96a5-dcbc03752597\";\n",
        "            console.log(\"  modeltype:\", modeltype);\n",
        "            console.log(\"  modelid:\", modelid);\n",
        "            console.log(\"  elementid:\", elementid);\n",
        "            var all_models = [{\"attributes\": {\"doc\": null, \"id\": \"fb68c440-22cf-4223-8563-67299eb77f11\", \"factors\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]}, \"type\": \"FactorRange\", \"id\": \"fb68c440-22cf-4223-8563-67299eb77f11\"}, {\"attributes\": {\"sources\": [{\"source\": {\"type\": \"ColumnDataSource\", \"id\": \"753e7418-db5b-4d05-916d-542711685a00\"}, \"columns\": [\"y0\", \"y1\"]}, {\"source\": {\"type\": \"ColumnDataSource\", \"id\": \"6a52dd6a-94e5-4bac-b2f7-54f98bb7b010\"}, \"columns\": [\"y0\", \"y1\"]}, {\"source\": {\"type\": \"ColumnDataSource\", \"id\": \"9a8b1075-9543-4972-a97e-c14b52b00ba6\"}, \"columns\": [\"y\"]}, {\"source\": {\"type\": \"ColumnDataSource\", \"id\": \"ab62349b-a746-44ea-a4bb-2ff4014946fd\"}, \"columns\": [\"y\"]}, {\"source\": {\"type\": \"ColumnDataSource\", \"id\": \"ea1644f3-fa22-475b-abdc-2971b151f3c5\"}, \"columns\": [\"y\"]}, {\"source\": {\"type\": \"ColumnDataSource\", \"id\": \"b668c3c4-886e-49b3-a9e6-09698be5bd70\"}, \"columns\": [\"y\"]}, {\"source\": {\"type\": \"ColumnDataSource\", \"id\": \"f6eb39df-cd44-4913-83b7-ae989136edb2\"}, \"columns\": [\"y\"]}], \"id\": \"232a0f99-6748-43e5-aa6f-b77324cc1bed\", \"doc\": null}, \"type\": \"DataRange1d\", \"id\": \"232a0f99-6748-43e5-aa6f-b77324cc1bed\"}, {\"attributes\": {\"data_source\": {\"type\": \"ColumnDataSource\", \"id\": \"f6eb39df-cd44-4913-83b7-ae989136edb2\"}, \"name\": null, \"server_data_source\": null, \"doc\": null, \"nonselection_glyphspec\": {\"line_color\": {\"value\": \"#1f77b4\"}, \"angle_units\": \"deg\", \"fill_color\": {\"value\": \"#1f77b4\"}, \"visible\": null, \"line_dash_offset\": 0, \"line_join\": \"miter\", \"size\": {\"units\": \"screen\", \"value\": 6}, \"line_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"radius_units\": \"screen\", \"end_angle_units\": \"deg\", \"valign\": null, \"length_units\": \"screen\", \"start_angle_units\": \"deg\", \"line_cap\": \"butt\", \"line_dash\": [], \"line_width\": {\"units\": \"data\", \"field\": \"line_width\"}, \"type\": \"circle\", \"fill_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"halign\": null, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"margin\": null}, \"xdata_range\": null, \"ydata_range\": null, \"glyphspec\": {\"line_color\": {\"value\": \"#F38630\"}, \"line_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"fill_color\": {\"value\": \"#F38630\"}, \"line_width\": {\"units\": \"data\", \"field\": \"line_width\"}, \"fill_alpha\": {\"units\": \"data\", \"value\": 0.6}, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"type\": \"circle\", \"size\": {\"units\": \"screen\", \"value\": 6}}, \"id\": \"915d0ad6-d8c0-41db-8ad4-c9af5e6cd171\"}, \"type\": \"Glyph\", \"id\": \"915d0ad6-d8c0-41db-8ad4-c9af5e6cd171\"}, {\"attributes\": {\"plot\": {\"type\": \"Plot\", \"id\": \"85879ebe-f43e-4903-ba26-63013c6733c7\"}, \"ticker\": {\"type\": \"CategoricalTicker\", \"id\": \"209b6f38-33b2-4e7f-8a88-91922c19e718\"}, \"bounds\": \"auto\", \"id\": \"8cdcb1d5-e146-48eb-acad-03b03493164b\", \"location\": \"min\", \"doc\": null, \"formatter\": {\"type\": \"CategoricalTickFormatter\", \"id\": \"b004e980-188b-4305-9639-c131a854d0fd\"}, \"major_label_text_font_size\": \"12pt\", \"dimension\": 0}, \"type\": \"CategoricalAxis\", \"id\": \"8cdcb1d5-e146-48eb-acad-03b03493164b\"}, {\"attributes\": {\"doc\": null, \"id\": \"209b6f38-33b2-4e7f-8a88-91922c19e718\", \"num_minor_ticks\": 5}, \"type\": \"CategoricalTicker\", \"id\": \"209b6f38-33b2-4e7f-8a88-91922c19e718\"}, {\"attributes\": {\"doc\": null, \"id\": \"b004e980-188b-4305-9639-c131a854d0fd\"}, \"type\": \"CategoricalTickFormatter\", \"id\": \"b004e980-188b-4305-9639-c131a854d0fd\"}, {\"attributes\": {\"plot\": {\"type\": \"Plot\", \"id\": \"85879ebe-f43e-4903-ba26-63013c6733c7\"}, \"grid_line_color\": null, \"doc\": null, \"dimension\": 0, \"id\": \"4cafc54a-31b6-444d-94fb-0fe9c374803c\", \"axis\": {\"type\": \"CategoricalAxis\", \"id\": \"8cdcb1d5-e146-48eb-acad-03b03493164b\"}}, \"type\": \"Grid\", \"id\": \"4cafc54a-31b6-444d-94fb-0fe9c374803c\"}, {\"attributes\": {\"plot\": {\"type\": \"Plot\", \"id\": \"85879ebe-f43e-4903-ba26-63013c6733c7\"}, \"doc\": null, \"bounds\": \"auto\", \"id\": \"fde33678-3ab9-45b7-aab9-3bd41bc42b73\", \"location\": \"min\", \"formatter\": {\"type\": \"BasicTickFormatter\", \"id\": \"41eb9005-6a45-4358-82e6-9ea94822da0e\"}, \"ticker\": {\"type\": \"BasicTicker\", \"id\": \"b96ea82d-c8ee-40b5-818b-c7d5e311a84e\"}, \"dimension\": 1}, \"type\": \"LinearAxis\", \"id\": \"fde33678-3ab9-45b7-aab9-3bd41bc42b73\"}, {\"attributes\": {\"doc\": null, \"id\": \"b96ea82d-c8ee-40b5-818b-c7d5e311a84e\", \"num_minor_ticks\": 5}, \"type\": \"BasicTicker\", \"id\": \"b96ea82d-c8ee-40b5-818b-c7d5e311a84e\"}, {\"attributes\": {\"doc\": null, \"id\": \"41eb9005-6a45-4358-82e6-9ea94822da0e\"}, \"type\": \"BasicTickFormatter\", \"id\": \"41eb9005-6a45-4358-82e6-9ea94822da0e\"}, {\"attributes\": {\"plot\": {\"type\": \"Plot\", \"id\": \"85879ebe-f43e-4903-ba26-63013c6733c7\"}, \"grid_line_color\": \"white\", \"doc\": null, \"id\": \"a8dbb803-b416-4ea9-86f8-54ea2e0d2936\", \"grid_line_width\": 2, \"dimension\": 1, \"axis\": {\"type\": \"LinearAxis\", \"id\": \"fde33678-3ab9-45b7-aab9-3bd41bc42b73\"}}, \"type\": \"Grid\", \"id\": \"a8dbb803-b416-4ea9-86f8-54ea2e0d2936\"}, {\"attributes\": {\"data_source\": {\"type\": \"ColumnDataSource\", \"id\": \"9a8b1075-9543-4972-a97e-c14b52b00ba6\"}, \"name\": null, \"server_data_source\": null, \"doc\": null, \"nonselection_glyphspec\": {\"line_color\": {\"value\": \"#1f77b4\"}, \"angle_units\": \"deg\", \"fill_color\": {\"value\": \"#1f77b4\"}, \"height\": {\"units\": \"data\", \"field\": \"height\"}, \"visible\": null, \"end_angle_units\": \"deg\", \"line_dash_offset\": 0, \"line_join\": \"miter\", \"line_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"angle\": {\"units\": \"data\", \"field\": \"angle\"}, \"dilate\": false, \"radius_units\": \"screen\", \"width\": {\"units\": \"data\", \"value\": 0.7}, \"valign\": null, \"length_units\": \"screen\", \"start_angle_units\": \"deg\", \"line_cap\": \"butt\", \"line_dash\": [], \"line_width\": {\"units\": \"data\", \"value\": 2}, \"type\": \"rect\", \"fill_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"halign\": null, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"margin\": null}, \"xdata_range\": null, \"ydata_range\": null, \"glyphspec\": {\"line_color\": {\"value\": \"black\"}, \"line_width\": {\"units\": \"data\", \"value\": 2}, \"angle\": {\"units\": \"data\", \"field\": \"angle\"}, \"fill_color\": {\"value\": \"#E08E79\"}, \"line_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"fill_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"height\": {\"units\": \"data\", \"field\": \"height\"}, \"width\": {\"units\": \"data\", \"value\": 0.7}, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"type\": \"rect\"}, \"id\": \"c6d8c810-22b4-4aaf-b080-efefc36196e6\"}, \"type\": \"Glyph\", \"id\": \"c6d8c810-22b4-4aaf-b080-efefc36196e6\"}, {\"attributes\": {\"data_source\": {\"type\": \"ColumnDataSource\", \"id\": \"753e7418-db5b-4d05-916d-542711685a00\"}, \"name\": null, \"server_data_source\": null, \"doc\": null, \"nonselection_glyphspec\": {\"line_color\": {\"value\": \"#1f77b4\"}, \"line_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"angle_units\": \"deg\", \"type\": \"segment\", \"y1\": {\"units\": \"data\", \"field\": \"y1\"}, \"line_width\": {\"units\": \"data\", \"value\": 2}, \"valign\": null, \"start_angle_units\": \"deg\", \"margin\": null, \"radius_units\": \"screen\", \"visible\": null, \"length_units\": \"screen\", \"end_angle_units\": \"deg\", \"line_dash_offset\": 0, \"line_cap\": \"butt\", \"line_dash\": [], \"y0\": {\"units\": \"data\", \"field\": \"y0\"}, \"x0\": {\"units\": \"data\", \"field\": \"x0\"}, \"x1\": {\"units\": \"data\", \"field\": \"x1\"}, \"line_join\": \"miter\", \"halign\": null}, \"xdata_range\": null, \"ydata_range\": null, \"glyphspec\": {\"line_color\": {\"value\": \"black\"}, \"line_width\": {\"units\": \"data\", \"value\": 2}, \"line_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"y1\": {\"units\": \"data\", \"field\": \"y1\"}, \"y0\": {\"units\": \"data\", \"field\": \"y0\"}, \"x0\": {\"units\": \"data\", \"field\": \"x0\"}, \"x1\": {\"units\": \"data\", \"field\": \"x1\"}, \"type\": \"segment\"}, \"id\": \"c55b02cc-da48-4de0-b14a-3328d4626778\"}, \"type\": \"Glyph\", \"id\": \"c55b02cc-da48-4de0-b14a-3328d4626778\"}, {\"attributes\": {\"plot\": {\"type\": \"Plot\", \"id\": \"85879ebe-f43e-4903-ba26-63013c6733c7\"}, \"id\": \"17c842dc-695d-477d-b351-c561b5de99d4\", \"doc\": null}, \"type\": \"PreviewSaveTool\", \"id\": \"17c842dc-695d-477d-b351-c561b5de99d4\"}, {\"attributes\": {\"data_source\": {\"type\": \"ColumnDataSource\", \"id\": \"ea1644f3-fa22-475b-abdc-2971b151f3c5\"}, \"name\": null, \"server_data_source\": null, \"doc\": null, \"nonselection_glyphspec\": {\"line_color\": {\"value\": \"#1f77b4\"}, \"angle_units\": \"deg\", \"fill_color\": {\"value\": \"#1f77b4\"}, \"height\": {\"units\": \"data\", \"value\": 0}, \"visible\": null, \"end_angle_units\": \"deg\", \"line_dash_offset\": 0, \"line_join\": \"miter\", \"line_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"angle\": {\"units\": \"data\", \"field\": \"angle\"}, \"dilate\": false, \"radius_units\": \"screen\", \"width\": {\"units\": \"data\", \"value\": 0.2}, \"valign\": null, \"length_units\": \"screen\", \"start_angle_units\": \"deg\", \"line_cap\": \"butt\", \"line_dash\": [], \"line_width\": {\"units\": \"data\", \"field\": \"line_width\"}, \"type\": \"rect\", \"fill_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"halign\": null, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"margin\": null}, \"xdata_range\": null, \"ydata_range\": null, \"glyphspec\": {\"line_color\": {\"value\": \"black\"}, \"line_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"angle\": {\"units\": \"data\", \"field\": \"angle\"}, \"fill_color\": {\"value\": \"#1f77b4\"}, \"line_width\": {\"units\": \"data\", \"field\": \"line_width\"}, \"fill_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"height\": {\"units\": \"data\", \"value\": 0}, \"width\": {\"units\": \"data\", \"value\": 0.2}, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"type\": \"rect\"}, \"id\": \"1fb1e810-16b6-47fe-974c-bf70ddfe014f\"}, \"type\": \"Glyph\", \"id\": \"1fb1e810-16b6-47fe-974c-bf70ddfe014f\"}, {\"attributes\": {\"column_names\": [\"x0\", \"x1\", \"y0\", \"y1\"], \"doc\": null, \"selected\": [], \"discrete_ranges\": {}, \"cont_ranges\": {}, \"data\": {\"y1\": [-0.7200740621349544, -0.7117073329883276, 0.3166575197717362, 0.40591563505894324, 1.2409631139323052, 1.2415874487633203], \"y0\": [-1.9152715946970351, -2.0319096188399417, -1.1988339444595508, -0.8498281569474699, -0.13621397905504917, 0.027993524991098973], \"x0\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"], \"x1\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]}, \"id\": \"6a52dd6a-94e5-4bac-b2f7-54f98bb7b010\"}, \"type\": \"ColumnDataSource\", \"id\": \"6a52dd6a-94e5-4bac-b2f7-54f98bb7b010\"}, {\"attributes\": {\"data_source\": {\"type\": \"ColumnDataSource\", \"id\": \"b668c3c4-886e-49b3-a9e6-09698be5bd70\"}, \"name\": null, \"server_data_source\": null, \"doc\": null, \"nonselection_glyphspec\": {\"line_color\": {\"value\": \"#1f77b4\"}, \"angle_units\": \"deg\", \"fill_color\": {\"value\": \"#1f77b4\"}, \"height\": {\"units\": \"data\", \"value\": 0}, \"visible\": null, \"end_angle_units\": \"deg\", \"line_dash_offset\": 0, \"line_join\": \"miter\", \"line_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"angle\": {\"units\": \"data\", \"field\": \"angle\"}, \"dilate\": false, \"radius_units\": \"screen\", \"width\": {\"units\": \"data\", \"value\": 0.2}, \"valign\": null, \"length_units\": \"screen\", \"start_angle_units\": \"deg\", \"line_cap\": \"butt\", \"line_dash\": [], \"line_width\": {\"units\": \"data\", \"field\": \"line_width\"}, \"type\": \"rect\", \"fill_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"halign\": null, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"margin\": null}, \"xdata_range\": null, \"ydata_range\": null, \"glyphspec\": {\"line_color\": {\"value\": \"black\"}, \"line_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"angle\": {\"units\": \"data\", \"field\": \"angle\"}, \"fill_color\": {\"value\": \"#1f77b4\"}, \"line_width\": {\"units\": \"data\", \"field\": \"line_width\"}, \"fill_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"height\": {\"units\": \"data\", \"value\": 0}, \"width\": {\"units\": \"data\", \"value\": 0.2}, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"type\": \"rect\"}, \"id\": \"609627ff-3050-4ae6-95ad-dd39cead90f6\"}, \"type\": \"Glyph\", \"id\": \"609627ff-3050-4ae6-95ad-dd39cead90f6\"}, {\"attributes\": {\"data_source\": {\"type\": \"ColumnDataSource\", \"id\": \"ab62349b-a746-44ea-a4bb-2ff4014946fd\"}, \"name\": null, \"server_data_source\": null, \"doc\": null, \"nonselection_glyphspec\": {\"line_color\": {\"value\": \"#1f77b4\"}, \"angle_units\": \"deg\", \"fill_color\": {\"value\": \"#1f77b4\"}, \"height\": {\"units\": \"data\", \"field\": \"height\"}, \"visible\": null, \"end_angle_units\": \"deg\", \"line_dash_offset\": 0, \"line_join\": \"miter\", \"line_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"angle\": {\"units\": \"data\", \"field\": \"angle\"}, \"dilate\": false, \"radius_units\": \"screen\", \"width\": {\"units\": \"data\", \"value\": 0.7}, \"valign\": null, \"length_units\": \"screen\", \"start_angle_units\": \"deg\", \"line_cap\": \"butt\", \"line_dash\": [], \"line_width\": {\"units\": \"data\", \"value\": 2}, \"type\": \"rect\", \"fill_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"halign\": null, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"margin\": null}, \"xdata_range\": null, \"ydata_range\": null, \"glyphspec\": {\"line_color\": {\"value\": \"black\"}, \"line_width\": {\"units\": \"data\", \"value\": 2}, \"angle\": {\"units\": \"data\", \"field\": \"angle\"}, \"fill_color\": {\"value\": \"#3B8686\"}, \"line_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"fill_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"height\": {\"units\": \"data\", \"field\": \"height\"}, \"width\": {\"units\": \"data\", \"value\": 0.7}, \"y\": {\"units\": \"data\", \"field\": \"y\"}, \"x\": {\"units\": \"data\", \"field\": \"x\"}, \"type\": \"rect\"}, \"id\": \"e0890197-2e1e-410f-a211-85162ddf8e4a\"}, \"type\": \"Glyph\", \"id\": \"e0890197-2e1e-410f-a211-85162ddf8e4a\"}, {\"attributes\": {\"data_source\": {\"type\": \"ColumnDataSource\", \"id\": \"6a52dd6a-94e5-4bac-b2f7-54f98bb7b010\"}, \"name\": null, \"server_data_source\": null, \"doc\": null, \"nonselection_glyphspec\": {\"line_color\": {\"value\": \"#1f77b4\"}, \"line_alpha\": {\"units\": \"data\", \"value\": 0.1}, \"angle_units\": \"deg\", \"type\": \"segment\", \"y1\": {\"units\": \"data\", \"field\": \"y1\"}, \"line_width\": {\"units\": \"data\", \"value\": 2}, \"valign\": null, \"start_angle_units\": \"deg\", \"margin\": null, \"radius_units\": \"screen\", \"visible\": null, \"length_units\": \"screen\", \"end_angle_units\": \"deg\", \"line_dash_offset\": 0, \"line_cap\": \"butt\", \"line_dash\": [], \"y0\": {\"units\": \"data\", \"field\": \"y0\"}, \"x0\": {\"units\": \"data\", \"field\": \"x0\"}, \"x1\": {\"units\": \"data\", \"field\": \"x1\"}, \"line_join\": \"miter\", \"halign\": null}, \"xdata_range\": null, \"ydata_range\": null, \"glyphspec\": {\"line_color\": {\"value\": \"black\"}, \"line_width\": {\"units\": \"data\", \"value\": 2}, \"line_alpha\": {\"units\": \"data\", \"value\": 1.0}, \"y1\": {\"units\": \"data\", \"field\": \"y1\"}, \"y0\": {\"units\": \"data\", \"field\": \"y0\"}, \"x0\": {\"units\": \"data\", \"field\": \"x0\"}, \"x1\": {\"units\": \"data\", \"field\": \"x1\"}, \"type\": \"segment\"}, \"id\": \"4dfdb055-d86f-4d29-9f10-1d90de3989f6\"}, \"type\": \"Glyph\", \"id\": \"4dfdb055-d86f-4d29-9f10-1d90de3989f6\"}, {\"attributes\": {\"column_names\": [\"x\", \"y\"], \"doc\": null, \"selected\": [], \"discrete_ranges\": {}, \"cont_ranges\": {}, \"data\": {\"y\": [1.7462003589351689, -2.0974852427090758, -2.4476462812664215, 1.9772479935266412, 1.7803706230247407, 2.2041504623118948, 3.2355449717595302, 1.8166221886815679, 1.9913673528285043, -2.6696625884715637, 2.5827925433082188, 2.4895948271158166, -2.1054158517934711, 2.0136809013329202, 1.790881084253257, -2.2883032282864355, 1.8732132652017, -2.097279538389766, -2.6722094862099959, -2.9180692736413909, -2.2551012988249899, 1.8834421558512475, -2.0312358803897221, 2.0407391431394277, 1.770291082238505, 2.2863010520015274, -2.2550767006487167, -2.3487325431834658, 2.3676565803063387, 2.0811299442812987, -2.5956437013079232, 2.3979589365329042, 2.3370776410628444, -2.4679268553887805, 2.1221743912848892, 2.8223735012462923, -2.2206481652597505, 2.0524207066209716, -2.3213948225592165, 2.1396527024465568, -2.039216393332429, -1.4356530803985184, 3.2681297226146033, 3.7965255432844849, 3.6443144122157602, -2.4360693788270091, 3.2530981848671092, -1.3040011560768803, 3.7562130353490502, 3.350716020018766, -1.3464978649242623, 4.2186598951042358, 3.7367427869574534, 3.5588056061739226, 3.8009617732929528, 3.0851978363554351, -1.1586333833042457, 3.2244599853593003, -0.86365098665533546, 3.2579903102338514, -1.596963691530509, -2.4242088781926654, -0.87721270378400806, -1.1310967535613443, -0.98207910083709593, 3.2804807071856978, 2.9726967379641684, -1.2644261912713035, 3.4473997120824595, 3.9898346217646687, -0.51792674402726258, -0.15228985219441027, -0.18616290372480115, -0.75767427277482335, 4.4423812154163684, 4.3421925590432799, -0.60833837533132717, 4.83638656922232, 4.2948524137670141, -0.1958145477990767, -0.42264304376307038, -0.12322346234882176, 5.1269480745003229, -1.1242608804004526, 5.0570479054416193, -0.34453573991081177, 4.1340902469815557, 4.8983491184589409, -0.01526119465311826, -0.41053435149254813, 0.0072944180629075372, 3.9630050371377044, 4.5760774507557143, 3.9185853751014301, -0.38038806619094334, 3.9115706910479284, -0.64124330910060712], \"x\": [\"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\", \"c\", \"c\", \"c\", \"c\", \"c\", \"c\", \"c\", \"c\", \"c\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"d\", \"e\", \"e\", \"e\", \"e\", \"e\", \"e\", \"e\", \"e\", \"e\", \"e\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\", \"f\"]}, \"id\": \"f6eb39df-cd44-4913-83b7-ae989136edb2\"}, \"type\": \"ColumnDataSource\", \"id\": \"f6eb39df-cd44-4913-83b7-ae989136edb2\"}, {\"attributes\": {\"column_names\": [\"height\", \"x\", \"y\"], \"doc\": null, \"selected\": [], \"discrete_ranges\": {}, \"cont_ranges\": {}, \"data\": {\"y\": [0.20550608986205882, 0.26665709589237907, 1.3421185864522425, 1.3201310196058085, 2.3918460248806683, 2.213069574312048], \"x\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"], \"height\": [0.5859259652508592, 0.6648160571290087, 0.802208744712827, 0.6389088797863844, 0.6413885100105383, 0.5822822887982859]}, \"id\": \"9a8b1075-9543-4972-a97e-c14b52b00ba6\"}, \"type\": \"ColumnDataSource\", \"id\": \"9a8b1075-9543-4972-a97e-c14b52b00ba6\"}, {\"attributes\": {\"x_range\": {\"type\": \"FactorRange\", \"id\": \"fb68c440-22cf-4223-8563-67299eb77f11\"}, \"outer_width\": 600, \"title\": \"\", \"y_range\": {\"type\": \"DataRange1d\", \"id\": \"232a0f99-6748-43e5-aa6f-b77324cc1bed\"}, \"background_fill\": \"#EFE8E2\", \"renderers\": [{\"type\": \"CategoricalAxis\", \"id\": \"8cdcb1d5-e146-48eb-acad-03b03493164b\"}, {\"type\": \"Grid\", \"id\": \"4cafc54a-31b6-444d-94fb-0fe9c374803c\"}, {\"type\": \"LinearAxis\", \"id\": \"fde33678-3ab9-45b7-aab9-3bd41bc42b73\"}, {\"type\": \"Grid\", \"id\": \"a8dbb803-b416-4ea9-86f8-54ea2e0d2936\"}, {\"type\": \"Glyph\", \"id\": \"c55b02cc-da48-4de0-b14a-3328d4626778\"}, {\"type\": \"Glyph\", \"id\": \"4dfdb055-d86f-4d29-9f10-1d90de3989f6\"}, {\"type\": \"Glyph\", \"id\": \"c6d8c810-22b4-4aaf-b080-efefc36196e6\"}, {\"type\": \"Glyph\", \"id\": \"e0890197-2e1e-410f-a211-85162ddf8e4a\"}, {\"type\": \"Glyph\", \"id\": \"1fb1e810-16b6-47fe-974c-bf70ddfe014f\"}, {\"type\": \"Glyph\", \"id\": \"609627ff-3050-4ae6-95ad-dd39cead90f6\"}, {\"type\": \"Glyph\", \"id\": \"915d0ad6-d8c0-41db-8ad4-c9af5e6cd171\"}], \"outer_height\": 600, \"data_sources\": [], \"doc\": null, \"canvas_height\": 600, \"id\": \"85879ebe-f43e-4903-ba26-63013c6733c7\", \"tools\": [{\"type\": \"PreviewSaveTool\", \"id\": \"17c842dc-695d-477d-b351-c561b5de99d4\"}], \"canvas_width\": 600}, \"type\": \"Plot\", \"id\": \"85879ebe-f43e-4903-ba26-63013c6733c7\"}, {\"attributes\": {\"column_names\": [\"x\", \"y\"], \"doc\": null, \"selected\": [], \"discrete_ranges\": {}, \"cont_ranges\": {}, \"data\": {\"y\": [1.7403578091702936, 1.9004077534956914, 3.0808623726512083, 2.8511813163727027, 4.278517518805848, 3.8158633348347113], \"x\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]}, \"id\": \"b668c3c4-886e-49b3-a9e6-09698be5bd70\"}, \"type\": \"ColumnDataSource\", \"id\": \"b668c3c4-886e-49b3-a9e6-09698be5bd70\"}, {\"attributes\": {\"column_names\": [\"x\", \"y\"], \"doc\": null, \"selected\": [], \"discrete_ranges\": {}, \"cont_ranges\": {}, \"data\": {\"y\": [-1.9152715946970351, -2.0319096188399417, -1.1988339444595508, -0.8498281569474699, -0.13621397905504917, 0.027993524991098973], \"x\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]}, \"id\": \"ea1644f3-fa22-475b-abdc-2971b151f3c5\"}, \"type\": \"ColumnDataSource\", \"id\": \"ea1644f3-fa22-475b-abdc-2971b151f3c5\"}, {\"attributes\": {\"column_names\": [\"x0\", \"x1\", \"y0\", \"y1\"], \"doc\": null, \"selected\": [], \"discrete_ranges\": {}, \"cont_ranges\": {}, \"data\": {\"y1\": [0.4984690724874884, 0.5990651244568834, 1.7432229588086559, 1.6395854594990007, 2.7125402798859377, 2.504210718711191], \"y0\": [1.7403578091702936, 1.9004077534956914, 3.0808623726512083, 2.8511813163727027, 4.278517518805848, 3.8158633348347113], \"x0\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"], \"x1\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]}, \"id\": \"753e7418-db5b-4d05-916d-542711685a00\"}, \"type\": \"ColumnDataSource\", \"id\": \"753e7418-db5b-4d05-916d-542711685a00\"}, {\"attributes\": {\"column_names\": [\"height\", \"x\", \"y\"], \"doc\": null, \"selected\": [], \"discrete_ranges\": {}, \"cont_ranges\": {}, \"data\": {\"y\": [-0.4037654774491626, -0.3887291328302264, 0.6288358669337826, 0.7032961073857797, 1.6560574419038523, 1.5817579393381127], \"x\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"], \"height\": [0.6326171693715836, 0.6459564003162023, 0.6243566943240927, 0.594760944653673, 0.8301886559430942, 0.6803409811495849]}, \"id\": \"ab62349b-a746-44ea-a4bb-2ff4014946fd\"}, \"type\": \"ColumnDataSource\", \"id\": \"ab62349b-a746-44ea-a4bb-2ff4014946fd\"}];\n",
        "            Bokeh.load_models(all_models);\n",
        "            var model = Bokeh.Collections(modeltype).get(modelid);\n",
        "            var view = new model.default_view({model: model, el: '#3e5894c8-b084-4d73-96a5-dcbc03752597'});\n",
        "        });\n",
        "    </script>\n",
        "<div class=\"plotdiv\" id=\"3e5894c8-b084-4d73-96a5-dcbc03752597\"></div>\n",
        "\n"
       ],
       "metadata": {},
       "output_type": "display_data"
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 29
    }
   ],
   "metadata": {}
  }
 ]
}