(function() {
  var fn = function() {
    
    (function(root) {
      function now() {
        return new Date();
      }
    
      var force = false;
    
      if (typeof (root._bokeh_onload_callbacks) === "undefined" || force === true) {
        root._bokeh_onload_callbacks = [];
        root._bokeh_is_loading = undefined;
      }
    
      
      
    
      
      
    
      function run_callbacks() {
        try {
          root._bokeh_onload_callbacks.forEach(function(callback) { callback() });
        }
        finally {
          delete root._bokeh_onload_callbacks
        }
        console.info("Bokeh: all callbacks have finished");
      }
    
      function load_libs(js_urls, callback) {
        root._bokeh_onload_callbacks.push(callback);
        if (root._bokeh_is_loading > 0) {
          console.log("Bokeh: BokehJS is being loaded, scheduling callback at", now());
          return null;
        }
        if (js_urls == null || js_urls.length === 0) {
          run_callbacks();
          return null;
        }
        console.log("Bokeh: BokehJS not loaded, scheduling load and callback at", now());
        root._bokeh_is_loading = js_urls.length;
        for (var i = 0; i < js_urls.length; i++) {
          var url = js_urls[i];
          var s = document.createElement('script');
          s.src = url;
          s.async = false;
          s.onreadystatechange = s.onload = function() {
            root._bokeh_is_loading--;
            if (root._bokeh_is_loading === 0) {
              console.log("Bokeh: all BokehJS libraries loaded");
              run_callbacks()
            }
          };
          s.onerror = function() {
            console.warn("failed to load library " + url);
          };
          console.log("Bokeh: injecting script tag for BokehJS library: ", url);
          document.getElementsByTagName("head")[0].appendChild(s);
        }
      };var element = document.getElementById("aa9ad31b-5529-4174-af66-becf8049a7f0");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid 'aa9ad31b-5529-4174-af66-becf8049a7f0' but no matching script tag was found. ")
        return false;
      }
    
      var js_urls = ["https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-gl-0.12.9.min.js"];
    
      var inline_js = [
        function(Bokeh) {
          Bokeh.set_log_level("info");
        },
        
        function(Bokeh) {
          
        },
        
        function(Bokeh) {
          (function() {
            var fn = function() {
              Bokeh.safely(function() {
                (function(root) {
                  function embed_document(root) {
                    var docs_json = {"a41afc62-f92c-4ac1-9f1a-83f35c0e2ee9":{"roots":{"references":[{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[1,2,3],"y":[2,1,2]}},"id":"1cd5e768-b1b3-4f53-be98-7c5ef56277de","type":"ColumnDataSource"},{"attributes":{"source":{"id":"235985c3-e6db-4504-b336-925511a696dc","type":"ColumnDataSource"}},"id":"4e526b2a-242d-4cc6-baab-e33b6e024c31","type":"CDSView"},{"attributes":{"dimension":1,"plot":{"id":"88fd1a16-e92e-4216-bf2d-d614406e8f52","subtype":"Figure","type":"Plot"},"ticker":{"id":"7399daac-0b0c-4e04-9535-62187b45e82a","type":"BasicTicker"}},"id":"8813e6ea-e300-490a-b45f-5e1464c2a35f","type":"Grid"},{"attributes":{"children":[{"id":"25f7dea1-40c2-4c43-94f3-921b75240951","type":"Toggle"}]},"id":"d77d3b7f-e116-46da-b6cd-ef4ad1152ecb","type":"WidgetBox"},{"attributes":{"source":{"id":"1cd5e768-b1b3-4f53-be98-7c5ef56277de","type":"ColumnDataSource"}},"id":"5e6b83d6-f785-445d-99fb-6eb06039ad74","type":"CDSView"},{"attributes":{"args":{"object":{"id":"08a67f93-b4f7-4aba-8335-88a35280bb6d","type":"BoxAnnotation"},"toggle":{"id":"25f7dea1-40c2-4c43-94f3-921b75240951","type":"Toggle"}},"code":"object.visible = toggle.active;\n"},"id":"391fc7e3-7317-4665-912a-eeed93d9354c","type":"CustomJS"},{"attributes":{"below":[{"id":"6ae46708-1c19-4e46-864c-4ed2a1e20618","type":"LinearAxis"}],"left":[{"id":"33ab5768-9f8a-4261-9688-c6135e53be9f","type":"LinearAxis"}],"plot_height":200,"renderers":[{"id":"6ae46708-1c19-4e46-864c-4ed2a1e20618","type":"LinearAxis"},{"id":"fc078cb7-6eb2-4c49-be36-f49ccbfa4bce","type":"Grid"},{"id":"33ab5768-9f8a-4261-9688-c6135e53be9f","type":"LinearAxis"},{"id":"8813e6ea-e300-490a-b45f-5e1464c2a35f","type":"Grid"},{"id":"f1868cee-9e85-4608-8016-072862a8d2f2","type":"GlyphRenderer"},{"id":"c5eb5f40-7fa3-4971-9497-b68187bf76a9","type":"GlyphRenderer"},{"id":"08a67f93-b4f7-4aba-8335-88a35280bb6d","type":"BoxAnnotation"}],"title":{"id":"d786bf08-b6b3-49c4-922d-25450ab6cdea","type":"Title"},"toolbar":{"id":"57840c59-992b-4d12-b8b8-b720a1fa7039","type":"Toolbar"},"x_range":{"id":"30d8b427-9a61-4148-8493-7619d1cb70eb","type":"DataRange1d"},"x_scale":{"id":"b8274e0b-d016-4a34-8b11-f2f1fe28a74e","type":"LinearScale"},"y_range":{"id":"b800920b-57b9-45be-a612-f81ad13b258f","type":"DataRange1d"},"y_scale":{"id":"cb77d8d4-cb23-4fb5-b49e-58d8531b725c","type":"LinearScale"}},"id":"88fd1a16-e92e-4216-bf2d-d614406e8f52","subtype":"Figure","type":"Plot"},{"attributes":{"line_color":{"value":"pink"},"x":{"field":"x"},"y":{"field":"y"}},"id":"7da8d906-8392-4f33-82bd-a9d6f5b488e3","type":"Line"},{"attributes":{},"id":"3fe97f83-3767-4b76-a85a-8c193d10d67c","type":"BasicTicker"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"7d70f91c-31ad-4ddf-9f68-27361c29fde3","type":"Line"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"3a4fcc35-fa05-45fb-9511-3cf0bbeaac01","type":"Line"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto"},"id":"57840c59-992b-4d12-b8b8-b720a1fa7039","type":"Toolbar"},{"attributes":{"button_type":"success","callback":{"id":"391fc7e3-7317-4665-912a-eeed93d9354c","type":"CustomJS"},"icon":null,"label":"Green Box"},"id":"25f7dea1-40c2-4c43-94f3-921b75240951","type":"Toggle"},{"attributes":{"callback":null},"id":"b800920b-57b9-45be-a612-f81ad13b258f","type":"DataRange1d"},{"attributes":{"formatter":{"id":"90948298-1375-43d3-9c33-30e0e0de639f","type":"BasicTickFormatter"},"plot":{"id":"88fd1a16-e92e-4216-bf2d-d614406e8f52","subtype":"Figure","type":"Plot"},"ticker":{"id":"3fe97f83-3767-4b76-a85a-8c193d10d67c","type":"BasicTicker"}},"id":"6ae46708-1c19-4e46-864c-4ed2a1e20618","type":"LinearAxis"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"green"},"left":1.5,"plot":{"id":"88fd1a16-e92e-4216-bf2d-d614406e8f52","subtype":"Figure","type":"Plot"},"right":2.5},"id":"08a67f93-b4f7-4aba-8335-88a35280bb6d","type":"BoxAnnotation"},{"attributes":{"children":[{"id":"8cc0f98b-3c2a-4501-bdb1-4b82f3955a1e","type":"Row"},{"id":"229e344f-0475-46af-8600-813d514b90d4","type":"Row"}]},"id":"950b4f35-1db2-4c4c-98f7-6e7c48092c7e","type":"Column"},{"attributes":{},"id":"7399daac-0b0c-4e04-9535-62187b45e82a","type":"BasicTicker"},{"attributes":{},"id":"c06f76b7-c3a0-4d17-8d7d-7c25de718e2f","type":"BasicTickFormatter"},{"attributes":{"args":{"object":{"id":"c5eb5f40-7fa3-4971-9497-b68187bf76a9","type":"GlyphRenderer"},"toggle":{"id":"56356a62-3613-42ee-b6c6-21b3bd5ade7c","type":"Toggle"}},"code":"object.visible = toggle.active;\n"},"id":"165526e3-9322-49e6-9040-05066cfc9e6b","type":"CustomJS"},{"attributes":{"line_color":{"value":"blue"},"x":{"field":"x"},"y":{"field":"y"}},"id":"b13bfcbe-bc2b-4e9a-81be-d6ddc50fa3cf","type":"Line"},{"attributes":{"children":[{"id":"56356a62-3613-42ee-b6c6-21b3bd5ade7c","type":"Toggle"}]},"id":"b147dd21-6990-42a9-8008-bed36dc25596","type":"WidgetBox"},{"attributes":{"data_source":{"id":"1cd5e768-b1b3-4f53-be98-7c5ef56277de","type":"ColumnDataSource"},"glyph":{"id":"7da8d906-8392-4f33-82bd-a9d6f5b488e3","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"3a4fcc35-fa05-45fb-9511-3cf0bbeaac01","type":"Line"},"selection_glyph":null,"view":{"id":"5e6b83d6-f785-445d-99fb-6eb06039ad74","type":"CDSView"}},"id":"c5eb5f40-7fa3-4971-9497-b68187bf76a9","type":"GlyphRenderer"},{"attributes":{"children":[{"id":"d77d3b7f-e116-46da-b6cd-ef4ad1152ecb","type":"WidgetBox"},{"id":"b147dd21-6990-42a9-8008-bed36dc25596","type":"WidgetBox"}]},"id":"229e344f-0475-46af-8600-813d514b90d4","type":"Row"},{"attributes":{"button_type":"success","callback":{"id":"165526e3-9322-49e6-9040-05066cfc9e6b","type":"CustomJS"},"icon":null,"label":"Pink Line"},"id":"56356a62-3613-42ee-b6c6-21b3bd5ade7c","type":"Toggle"},{"attributes":{"callback":null},"id":"30d8b427-9a61-4148-8493-7619d1cb70eb","type":"DataRange1d"},{"attributes":{"data_source":{"id":"235985c3-e6db-4504-b336-925511a696dc","type":"ColumnDataSource"},"glyph":{"id":"b13bfcbe-bc2b-4e9a-81be-d6ddc50fa3cf","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"7d70f91c-31ad-4ddf-9f68-27361c29fde3","type":"Line"},"selection_glyph":null,"view":{"id":"4e526b2a-242d-4cc6-baab-e33b6e024c31","type":"CDSView"}},"id":"f1868cee-9e85-4608-8016-072862a8d2f2","type":"GlyphRenderer"},{"attributes":{},"id":"cb77d8d4-cb23-4fb5-b49e-58d8531b725c","type":"LinearScale"},{"attributes":{"children":[{"id":"88fd1a16-e92e-4216-bf2d-d614406e8f52","subtype":"Figure","type":"Plot"}]},"id":"8cc0f98b-3c2a-4501-bdb1-4b82f3955a1e","type":"Row"},{"attributes":{"formatter":{"id":"c06f76b7-c3a0-4d17-8d7d-7c25de718e2f","type":"BasicTickFormatter"},"plot":{"id":"88fd1a16-e92e-4216-bf2d-d614406e8f52","subtype":"Figure","type":"Plot"},"ticker":{"id":"7399daac-0b0c-4e04-9535-62187b45e82a","type":"BasicTicker"}},"id":"33ab5768-9f8a-4261-9688-c6135e53be9f","type":"LinearAxis"},{"attributes":{},"id":"90948298-1375-43d3-9c33-30e0e0de639f","type":"BasicTickFormatter"},{"attributes":{},"id":"b8274e0b-d016-4a34-8b11-f2f1fe28a74e","type":"LinearScale"},{"attributes":{"plot":null,"text":""},"id":"d786bf08-b6b3-49c4-922d-25450ab6cdea","type":"Title"},{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[1,2,3],"y":[1,2,1]}},"id":"235985c3-e6db-4504-b336-925511a696dc","type":"ColumnDataSource"},{"attributes":{"plot":{"id":"88fd1a16-e92e-4216-bf2d-d614406e8f52","subtype":"Figure","type":"Plot"},"ticker":{"id":"3fe97f83-3767-4b76-a85a-8c193d10d67c","type":"BasicTicker"}},"id":"fc078cb7-6eb2-4c49-be36-f49ccbfa4bce","type":"Grid"}],"root_ids":["950b4f35-1db2-4c4c-98f7-6e7c48092c7e"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"a41afc62-f92c-4ac1-9f1a-83f35c0e2ee9","elementid":"aa9ad31b-5529-4174-af66-becf8049a7f0","modelid":"950b4f35-1db2-4c4c-98f7-6e7c48092c7e"}];
                
                    root.Bokeh.embed.embed_items(docs_json, render_items);
                  }
                
                  if (root.Bokeh !== undefined) {
                    embed_document(root);
                  } else {
                    var attempts = 0;
                    var timer = setInterval(function(root) {
                      if (root.Bokeh !== undefined) {
                        embed_document(root);
                        clearInterval(timer);
                      }
                      attempts++;
                      if (attempts > 100) {
                        console.log("Bokeh: ERROR: Unable to embed document because BokehJS library is missing")
                        clearInterval(timer);
                      }
                    }, 10, root)
                  }
                })(window);
              });
            };
            if (document.readyState != "loading") fn();
            else document.addEventListener("DOMContentLoaded", fn);
          })();
        },
        function(Bokeh) {
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css");
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css");
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css");
        }
      ];
    
      function run_inline_js() {
        
        for (var i = 0; i < inline_js.length; i++) {
          inline_js[i].call(root, root.Bokeh);
        }
        
      }
    
      if (root._bokeh_is_loading === 0) {
        console.log("Bokeh: BokehJS loaded, going straight to plotting");
        run_inline_js();
      } else {
        load_libs(js_urls, function() {
          console.log("Bokeh: BokehJS plotting callback run at", now());
          run_inline_js();
        });
      }
    }(window));
  };
  if (document.readyState != "loading") fn();
  else document.addEventListener("DOMContentLoaded", fn);
})();
