(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("16db87b5-34b1-4b4f-b518-3951c1b9a3d1");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid '16db87b5-34b1-4b4f-b518-3951c1b9a3d1' 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 = {"ae09a1de-eb4d-408b-9934-59f8985d08d6":{"roots":{"references":[{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[1,2,3],"y":[2,1,2]}},"id":"a8274091-2b80-4dc4-a89b-9ac4f8b46102","type":"ColumnDataSource"},{"attributes":{"source":{"id":"a8274091-2b80-4dc4-a89b-9ac4f8b46102","type":"ColumnDataSource"}},"id":"4077d0ce-e036-4044-b638-fee6b26d84ad","type":"CDSView"},{"attributes":{"dimension":1,"plot":{"id":"f6dfed69-6a41-4399-a15b-d601e64e8d8b","subtype":"Figure","type":"Plot"},"ticker":{"id":"0072de79-dca5-4670-8646-449fb8690a7f","type":"BasicTicker"}},"id":"f491c895-a565-4306-b161-866026b2fad5","type":"Grid"},{"attributes":{"source":{"id":"453e927f-0043-4f77-8424-dbf578051dcc","type":"ColumnDataSource"}},"id":"9d6f72d2-2faa-4af6-9ca1-5bc2f8008c5e","type":"CDSView"},{"attributes":{"children":[{"id":"05fa4973-cde3-4181-a2b8-858089ca5a32","type":"WidgetBox"},{"id":"83bfcc22-62de-4e11-8361-9ab172cbc2ef","type":"WidgetBox"}]},"id":"3d9b0c36-f15e-4242-880e-c05ac1f6f96c","type":"Row"},{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[1,2,3],"y":[1,2,1]}},"id":"453e927f-0043-4f77-8424-dbf578051dcc","type":"ColumnDataSource"},{"attributes":{"below":[{"id":"4818fe97-1941-4f2f-9d67-8219f37081a2","type":"LinearAxis"}],"left":[{"id":"f68db474-c897-4263-9ca7-aa0e1fc35143","type":"LinearAxis"}],"plot_height":200,"renderers":[{"id":"4818fe97-1941-4f2f-9d67-8219f37081a2","type":"LinearAxis"},{"id":"89b6d8a2-ab2e-4ce8-89d0-691300eefee1","type":"Grid"},{"id":"f68db474-c897-4263-9ca7-aa0e1fc35143","type":"LinearAxis"},{"id":"f491c895-a565-4306-b161-866026b2fad5","type":"Grid"},{"id":"fdc36c47-d65a-4aa5-ae8c-b0cd61ac2559","type":"GlyphRenderer"},{"id":"20b72605-3c36-4813-a1c4-223ad73385eb","type":"GlyphRenderer"},{"id":"e650fc48-8a13-451a-9cbf-26b4aed7e232","type":"BoxAnnotation"}],"title":{"id":"c32897da-d1cb-441d-a373-7678407d23f7","type":"Title"},"toolbar":{"id":"8164e346-15a5-4e59-8d40-8d4f0b46bd8d","type":"Toolbar"},"x_range":{"id":"9b42624f-ac73-40bf-9c88-733b45b88d6c","type":"DataRange1d"},"x_scale":{"id":"ad9bcaa9-cd03-4444-a26b-df2e6c826c38","type":"LinearScale"},"y_range":{"id":"412d53ea-22d5-4f2f-85b4-1cac6066efb5","type":"DataRange1d"},"y_scale":{"id":"ee65c33a-655f-4ed1-86ba-a3e4ef8a89af","type":"LinearScale"}},"id":"f6dfed69-6a41-4399-a15b-d601e64e8d8b","subtype":"Figure","type":"Plot"},{"attributes":{"button_type":"success","callback":{"id":"06eb697b-4214-467a-ac7e-ef2c2dfbe45f","type":"CustomJS"},"icon":null,"label":"Pink Line"},"id":"c25f67b7-85ba-4031-872b-244ce0c3cc4e","type":"Toggle"},{"attributes":{"callback":null},"id":"9b42624f-ac73-40bf-9c88-733b45b88d6c","type":"DataRange1d"},{"attributes":{"args":{"object":{"id":"20b72605-3c36-4813-a1c4-223ad73385eb","type":"GlyphRenderer"},"toggle":{"id":"c25f67b7-85ba-4031-872b-244ce0c3cc4e","type":"Toggle"}},"code":"object.visible = toggle.active;\n"},"id":"06eb697b-4214-467a-ac7e-ef2c2dfbe45f","type":"CustomJS"},{"attributes":{"plot":null,"text":""},"id":"c32897da-d1cb-441d-a373-7678407d23f7","type":"Title"},{"attributes":{"line_color":{"value":"blue"},"x":{"field":"x"},"y":{"field":"y"}},"id":"9360249c-a7a5-4608-9a1f-8b64430bfd40","type":"Line"},{"attributes":{"args":{"object":{"id":"e650fc48-8a13-451a-9cbf-26b4aed7e232","type":"BoxAnnotation"},"toggle":{"id":"aeb3313e-7ed7-4480-97df-8fb83446cec4","type":"Toggle"}},"code":"object.visible = toggle.active;\n"},"id":"12079019-6f54-4e79-8912-abdb97192c26","type":"CustomJS"},{"attributes":{},"id":"ee65c33a-655f-4ed1-86ba-a3e4ef8a89af","type":"LinearScale"},{"attributes":{"children":[{"id":"c25f67b7-85ba-4031-872b-244ce0c3cc4e","type":"Toggle"}]},"id":"83bfcc22-62de-4e11-8361-9ab172cbc2ef","type":"WidgetBox"},{"attributes":{},"id":"10933178-7548-4c12-9a3e-e3d5797b093c","type":"BasicTickFormatter"},{"attributes":{"children":[{"id":"aeb3313e-7ed7-4480-97df-8fb83446cec4","type":"Toggle"}]},"id":"05fa4973-cde3-4181-a2b8-858089ca5a32","type":"WidgetBox"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"c57f5253-e20c-4f1c-9c54-7dbe323c569d","type":"Line"},{"attributes":{"data_source":{"id":"453e927f-0043-4f77-8424-dbf578051dcc","type":"ColumnDataSource"},"glyph":{"id":"9360249c-a7a5-4608-9a1f-8b64430bfd40","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"83ce88b3-908f-4beb-9c88-dcbfc46af907","type":"Line"},"selection_glyph":null,"view":{"id":"9d6f72d2-2faa-4af6-9ca1-5bc2f8008c5e","type":"CDSView"}},"id":"fdc36c47-d65a-4aa5-ae8c-b0cd61ac2559","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"green"},"left":1.5,"plot":{"id":"f6dfed69-6a41-4399-a15b-d601e64e8d8b","subtype":"Figure","type":"Plot"},"right":2.5},"id":"e650fc48-8a13-451a-9cbf-26b4aed7e232","type":"BoxAnnotation"},{"attributes":{},"id":"0072de79-dca5-4670-8646-449fb8690a7f","type":"BasicTicker"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto"},"id":"8164e346-15a5-4e59-8d40-8d4f0b46bd8d","type":"Toolbar"},{"attributes":{"formatter":{"id":"3a9311fe-d4fd-49fa-b244-e076a35c84a7","type":"BasicTickFormatter"},"plot":{"id":"f6dfed69-6a41-4399-a15b-d601e64e8d8b","subtype":"Figure","type":"Plot"},"ticker":{"id":"e01a8093-5251-41f4-bd1c-6f512b4a5495","type":"BasicTicker"}},"id":"4818fe97-1941-4f2f-9d67-8219f37081a2","type":"LinearAxis"},{"attributes":{"formatter":{"id":"10933178-7548-4c12-9a3e-e3d5797b093c","type":"BasicTickFormatter"},"plot":{"id":"f6dfed69-6a41-4399-a15b-d601e64e8d8b","subtype":"Figure","type":"Plot"},"ticker":{"id":"0072de79-dca5-4670-8646-449fb8690a7f","type":"BasicTicker"}},"id":"f68db474-c897-4263-9ca7-aa0e1fc35143","type":"LinearAxis"},{"attributes":{"line_color":{"value":"pink"},"x":{"field":"x"},"y":{"field":"y"}},"id":"f582449e-279e-4405-9106-be5fcba4ebcd","type":"Line"},{"attributes":{"plot":{"id":"f6dfed69-6a41-4399-a15b-d601e64e8d8b","subtype":"Figure","type":"Plot"},"ticker":{"id":"e01a8093-5251-41f4-bd1c-6f512b4a5495","type":"BasicTicker"}},"id":"89b6d8a2-ab2e-4ce8-89d0-691300eefee1","type":"Grid"},{"attributes":{},"id":"ad9bcaa9-cd03-4444-a26b-df2e6c826c38","type":"LinearScale"},{"attributes":{},"id":"3a9311fe-d4fd-49fa-b244-e076a35c84a7","type":"BasicTickFormatter"},{"attributes":{"button_type":"success","callback":{"id":"12079019-6f54-4e79-8912-abdb97192c26","type":"CustomJS"},"icon":null,"label":"Green Box"},"id":"aeb3313e-7ed7-4480-97df-8fb83446cec4","type":"Toggle"},{"attributes":{"children":[{"id":"c70fb476-daa2-4e2c-9ae3-bb317ff016aa","type":"Row"},{"id":"3d9b0c36-f15e-4242-880e-c05ac1f6f96c","type":"Row"}]},"id":"be236d46-e655-47aa-ac93-d68f31fce37c","type":"Column"},{"attributes":{"children":[{"id":"f6dfed69-6a41-4399-a15b-d601e64e8d8b","subtype":"Figure","type":"Plot"}]},"id":"c70fb476-daa2-4e2c-9ae3-bb317ff016aa","type":"Row"},{"attributes":{"callback":null},"id":"412d53ea-22d5-4f2f-85b4-1cac6066efb5","type":"DataRange1d"},{"attributes":{},"id":"e01a8093-5251-41f4-bd1c-6f512b4a5495","type":"BasicTicker"},{"attributes":{"data_source":{"id":"a8274091-2b80-4dc4-a89b-9ac4f8b46102","type":"ColumnDataSource"},"glyph":{"id":"f582449e-279e-4405-9106-be5fcba4ebcd","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"c57f5253-e20c-4f1c-9c54-7dbe323c569d","type":"Line"},"selection_glyph":null,"view":{"id":"4077d0ce-e036-4044-b638-fee6b26d84ad","type":"CDSView"}},"id":"20b72605-3c36-4813-a1c4-223ad73385eb","type":"GlyphRenderer"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"83ce88b3-908f-4beb-9c88-dcbfc46af907","type":"Line"}],"root_ids":["be236d46-e655-47aa-ac93-d68f31fce37c"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"ae09a1de-eb4d-408b-9934-59f8985d08d6","elementid":"16db87b5-34b1-4b4f-b518-3951c1b9a3d1","modelid":"be236d46-e655-47aa-ac93-d68f31fce37c"}];
                
                    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);
})();
