(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("4add13e2-a9d8-41da-a027-7cbe01285f9c");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid '4add13e2-a9d8-41da-a027-7cbe01285f9c' 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 = {"e8aec04d-0398-43bf-bc51-81d305c13e62":{"roots":{"references":[{"attributes":{"below":[{"id":"b576c70c-3b18-4359-879b-3439946e57ae","type":"LinearAxis"}],"left":[{"id":"044facbb-143d-4a37-ba35-0c3cfbeb882a","type":"LinearAxis"}],"plot_height":200,"renderers":[{"id":"b576c70c-3b18-4359-879b-3439946e57ae","type":"LinearAxis"},{"id":"29da7b51-5c8c-40b5-a571-5b3a4fb8850b","type":"Grid"},{"id":"044facbb-143d-4a37-ba35-0c3cfbeb882a","type":"LinearAxis"},{"id":"3ba0e177-f47a-4d55-ab9d-b8744897f88b","type":"Grid"},{"id":"a4f322dd-2ac0-4677-8e00-b1d4e4dae8b2","type":"GlyphRenderer"},{"id":"cfd96467-2af5-4fe7-991f-472bc9cf8af2","type":"GlyphRenderer"},{"id":"a3ee6fc4-1415-4e4c-b8df-b713fc05ad75","type":"BoxAnnotation"}],"title":{"id":"0f08852e-a41f-4ab9-beb3-54803f455312","type":"Title"},"toolbar":{"id":"b3036b83-0f5a-48f9-bf5b-4b3af99c2137","type":"Toolbar"},"x_range":{"id":"ebe1cf9a-2ce4-40f2-9ee6-63486795410a","type":"DataRange1d"},"x_scale":{"id":"b6f04e6b-b4c0-405a-9d7e-e4dd06a8ef68","type":"LinearScale"},"y_range":{"id":"f6602889-94a7-4274-b198-905776210fb0","type":"DataRange1d"},"y_scale":{"id":"be71cd1c-3abf-46ac-a95c-753135fd075b","type":"LinearScale"}},"id":"24755138-1d23-4886-b8c1-9fe84db3d372","subtype":"Figure","type":"Plot"},{"attributes":{"plot":null,"text":""},"id":"0f08852e-a41f-4ab9-beb3-54803f455312","type":"Title"},{"attributes":{"source":{"id":"17e2a08f-6964-42d0-9bfc-abe8c22261e4","type":"ColumnDataSource"}},"id":"b6c596f4-4bb5-4d01-b3dc-2e70e0d609fd","type":"CDSView"},{"attributes":{"formatter":{"id":"7960ff85-0361-4efa-a5e5-363d2567d968","type":"BasicTickFormatter"},"plot":{"id":"24755138-1d23-4886-b8c1-9fe84db3d372","subtype":"Figure","type":"Plot"},"ticker":{"id":"be39f61c-8748-4ab8-8e67-ae96098bf79c","type":"BasicTicker"}},"id":"b576c70c-3b18-4359-879b-3439946e57ae","type":"LinearAxis"},{"attributes":{},"id":"7960ff85-0361-4efa-a5e5-363d2567d968","type":"BasicTickFormatter"},{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[1,2,3],"y":[1,2,1]}},"id":"17e2a08f-6964-42d0-9bfc-abe8c22261e4","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"801d0635-194e-4aa6-81c8-498d4dbc6ee2","type":"ColumnDataSource"},"glyph":{"id":"54c51362-28e8-40f5-951a-572a3d2d7949","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"4ed5d8c8-73af-4734-9180-7c31a53b5521","type":"Line"},"selection_glyph":null,"view":{"id":"01c5cc9e-c58e-4000-926a-eb8029344236","type":"CDSView"}},"id":"cfd96467-2af5-4fe7-991f-472bc9cf8af2","type":"GlyphRenderer"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"4ed5d8c8-73af-4734-9180-7c31a53b5521","type":"Line"},{"attributes":{"formatter":{"id":"4df1ee94-2167-4a8f-80dd-976e96e29c57","type":"BasicTickFormatter"},"plot":{"id":"24755138-1d23-4886-b8c1-9fe84db3d372","subtype":"Figure","type":"Plot"},"ticker":{"id":"f39d6f37-1dde-424c-9c33-db246ed32655","type":"BasicTicker"}},"id":"044facbb-143d-4a37-ba35-0c3cfbeb882a","type":"LinearAxis"},{"attributes":{"line_color":{"value":"pink"},"x":{"field":"x"},"y":{"field":"y"}},"id":"54c51362-28e8-40f5-951a-572a3d2d7949","type":"Line"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto"},"id":"b3036b83-0f5a-48f9-bf5b-4b3af99c2137","type":"Toolbar"},{"attributes":{},"id":"be39f61c-8748-4ab8-8e67-ae96098bf79c","type":"BasicTicker"},{"attributes":{},"id":"f39d6f37-1dde-424c-9c33-db246ed32655","type":"BasicTicker"},{"attributes":{"source":{"id":"801d0635-194e-4aa6-81c8-498d4dbc6ee2","type":"ColumnDataSource"}},"id":"01c5cc9e-c58e-4000-926a-eb8029344236","type":"CDSView"},{"attributes":{"data_source":{"id":"17e2a08f-6964-42d0-9bfc-abe8c22261e4","type":"ColumnDataSource"},"glyph":{"id":"f711f0f4-fdf8-458c-9483-23705b02b2e6","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"d2ac3071-163a-4f71-91f7-2419a611f334","type":"Line"},"selection_glyph":null,"view":{"id":"b6c596f4-4bb5-4d01-b3dc-2e70e0d609fd","type":"CDSView"}},"id":"a4f322dd-2ac0-4677-8e00-b1d4e4dae8b2","type":"GlyphRenderer"},{"attributes":{"children":[{"id":"95eab093-075b-4492-8b34-e256609afade","type":"WidgetBox"},{"id":"f1ca96d9-4941-4a90-99ca-171871672f7f","type":"WidgetBox"}]},"id":"4aaa759b-ced9-4931-84ce-1e98c3b6179f","type":"Row"},{"attributes":{"callback":null},"id":"ebe1cf9a-2ce4-40f2-9ee6-63486795410a","type":"DataRange1d"},{"attributes":{"dimension":1,"plot":{"id":"24755138-1d23-4886-b8c1-9fe84db3d372","subtype":"Figure","type":"Plot"},"ticker":{"id":"f39d6f37-1dde-424c-9c33-db246ed32655","type":"BasicTicker"}},"id":"3ba0e177-f47a-4d55-ab9d-b8744897f88b","type":"Grid"},{"attributes":{"children":[{"id":"b5e09315-9c39-4cc5-a31d-75b1fae058bc","type":"Row"},{"id":"4aaa759b-ced9-4931-84ce-1e98c3b6179f","type":"Row"}]},"id":"6f2cdfbc-14f6-4c44-a560-60aa5c9c791a","type":"Column"},{"attributes":{},"id":"be71cd1c-3abf-46ac-a95c-753135fd075b","type":"LinearScale"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"d2ac3071-163a-4f71-91f7-2419a611f334","type":"Line"},{"attributes":{"plot":{"id":"24755138-1d23-4886-b8c1-9fe84db3d372","subtype":"Figure","type":"Plot"},"ticker":{"id":"be39f61c-8748-4ab8-8e67-ae96098bf79c","type":"BasicTicker"}},"id":"29da7b51-5c8c-40b5-a571-5b3a4fb8850b","type":"Grid"},{"attributes":{"children":[{"id":"36fa95af-e32d-4936-b5c0-bc6853dbb4c2","type":"Toggle"}]},"id":"f1ca96d9-4941-4a90-99ca-171871672f7f","type":"WidgetBox"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"green"},"left":1.5,"plot":{"id":"24755138-1d23-4886-b8c1-9fe84db3d372","subtype":"Figure","type":"Plot"},"right":2.5},"id":"a3ee6fc4-1415-4e4c-b8df-b713fc05ad75","type":"BoxAnnotation"},{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[1,2,3],"y":[2,1,2]}},"id":"801d0635-194e-4aa6-81c8-498d4dbc6ee2","type":"ColumnDataSource"},{"attributes":{"children":[{"id":"1d848fbc-52c6-4e04-9d7d-4027660203a9","type":"Toggle"}]},"id":"95eab093-075b-4492-8b34-e256609afade","type":"WidgetBox"},{"attributes":{},"id":"4df1ee94-2167-4a8f-80dd-976e96e29c57","type":"BasicTickFormatter"},{"attributes":{},"id":"b6f04e6b-b4c0-405a-9d7e-e4dd06a8ef68","type":"LinearScale"},{"attributes":{"callback":null},"id":"f6602889-94a7-4274-b198-905776210fb0","type":"DataRange1d"},{"attributes":{"args":{"object":{"id":"cfd96467-2af5-4fe7-991f-472bc9cf8af2","type":"GlyphRenderer"},"toggle":{"id":"36fa95af-e32d-4936-b5c0-bc6853dbb4c2","type":"Toggle"}},"code":"object.visible = toggle.active;\n"},"id":"41e67b6e-42b4-428b-b5a3-5017f73c4463","type":"CustomJS"},{"attributes":{"children":[{"id":"24755138-1d23-4886-b8c1-9fe84db3d372","subtype":"Figure","type":"Plot"}]},"id":"b5e09315-9c39-4cc5-a31d-75b1fae058bc","type":"Row"},{"attributes":{"button_type":"success","callback":{"id":"e92a660e-d09e-41c3-a541-8705564a8ec0","type":"CustomJS"},"icon":null,"label":"Green Box"},"id":"1d848fbc-52c6-4e04-9d7d-4027660203a9","type":"Toggle"},{"attributes":{"button_type":"success","callback":{"id":"41e67b6e-42b4-428b-b5a3-5017f73c4463","type":"CustomJS"},"icon":null,"label":"Pink Line"},"id":"36fa95af-e32d-4936-b5c0-bc6853dbb4c2","type":"Toggle"},{"attributes":{"line_color":{"value":"blue"},"x":{"field":"x"},"y":{"field":"y"}},"id":"f711f0f4-fdf8-458c-9483-23705b02b2e6","type":"Line"},{"attributes":{"args":{"object":{"id":"a3ee6fc4-1415-4e4c-b8df-b713fc05ad75","type":"BoxAnnotation"},"toggle":{"id":"1d848fbc-52c6-4e04-9d7d-4027660203a9","type":"Toggle"}},"code":"object.visible = toggle.active;\n"},"id":"e92a660e-d09e-41c3-a541-8705564a8ec0","type":"CustomJS"}],"root_ids":["6f2cdfbc-14f6-4c44-a560-60aa5c9c791a"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"e8aec04d-0398-43bf-bc51-81d305c13e62","elementid":"4add13e2-a9d8-41da-a027-7cbe01285f9c","modelid":"6f2cdfbc-14f6-4c44-a560-60aa5c9c791a"}];
                
                    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);
})();
