// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.browser');
goog.require('cljs.core');
goog.require('crate.binding');
goog.require('lt.objs.menu');
goog.require('lt.objs.files');
goog.require('lt.util.dom');
goog.require('lt.objs.context');
goog.require('lt.objs.platform');
goog.require('lt.objs.tabs');
goog.require('crate.core');
goog.require('lt.objs.context');
goog.require('lt.objs.notifos');
goog.require('lt.objs.notifos');
goog.require('lt.util.dom');
goog.require('lt.objs.editor.pool');
goog.require('clojure.string');
goog.require('lt.objs.clients.devtools');
goog.require('lt.objs.command');
goog.require('lt.objs.platform');
goog.require('lt.objs.menu');
goog.require('lt.objs.files');
goog.require('lt.objs.sidebar.clients');
goog.require('lt.objs.eval');
goog.require('lt.objs.clients');
goog.require('clojure.string');
goog.require('lt.objs.clients.devtools');
goog.require('crate.binding');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.console');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor');
goog.require('lt.objs.console');
goog.require('crate.core');
goog.require('lt.objs.eval');
goog.require('lt.objs.clients');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.sidebar.clients');
goog.require('lt.objs.command');
goog.require('lt.objs.keyboard');
lt.objs.browser.utils = (function (){var obj9360 = {};return obj9360;
})();
lttools = lt.objs.browser.utils;
lt.objs.browser.check_http = (function check_http(url){if((cljs.core._EQ_.call(null,url.indexOf("http"),-1)) && (cljs.core._EQ_.call(null,url.indexOf("file://"),-1)))
{return [cljs.core.str("http://"),cljs.core.str(url)].join('');
} else
{return url;
}
});
lt.objs.browser.add_util = (function add_util(nme,fn){return (lt.objs.browser.utils[cljs.core.name.call(null,nme)] = fn);
});
lt.objs.browser.browser_id = (function browser_id(this$){return [cljs.core.str("browser"),cljs.core.str(lt.object.__GT_id.call(null,this$))].join('');
});
lt.objs.browser.to_frame = (function to_frame(this$){return lt.util.dom.$.call(null,new cljs.core.Keyword(null,"webview","webview",2238328683),lt.object.__GT_content.call(null,this$));
});
lt.objs.browser.client__GT_devtools = (function client__GT_devtools(ed){return new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))));
});
lt.objs.browser.handle_cb = (function handle_cb(cbid,command,data){return lt.object.raise.call(null,lt.objs.clients.clients,new cljs.core.Keyword(null,"message","message",1968829305),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cbid,command,data], null));
});
lt.objs.browser.connect_client = (function connect_client(this$){return lt.objs.clients.handle_connection_BANG_.call(null,new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"name","name",1017277949),new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"frame","frame",1111596255),this$,new cljs.core.Keyword(null,"frame-id","frame-id",3663850733),lt.objs.browser.browser_id.call(null,this$),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"frame.client","frame.client",2018369246)], null),new cljs.core.Keyword(null,"commands","commands",4706336250),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"editor.eval.cljs.exec","editor.eval.cljs.exec",866638030),null,new cljs.core.Keyword(null,"editor.eval.css","editor.eval.css",1083014276),null,new cljs.core.Keyword(null,"editor.eval.js","editor.eval.js",1847417804),null,new cljs.core.Keyword(null,"editor.eval.html","editor.eval.html",3156465134),null], null), null),new cljs.core.Keyword(null,"type","type",1017479852),new cljs.core.Keyword(null,"frame","frame",1111596255)], null));
});
lt.objs.browser.add = (function add(){var browser = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.browser","browser","lt.objs.browser/browser",1401265285));lt.objs.tabs.add_BANG_.call(null,browser);
lt.objs.tabs.active_BANG_.call(null,browser);
return browser;
});
lt.objs.browser.url_bar = (function url_bar(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input.url-bar","input.url-bar",4150417411),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"url",new cljs.core.Keyword(null,"value","value",1125876963),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"url","url",1014020321))], null)], null));var seq__9367_9373 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"browser.url-bar","browser.url-bar",537128289),this$);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"browser.url-bar","browser.url-bar",537128289));
})], null)));var chunk__9368_9374 = null;var count__9369_9375 = 0;var i__9370_9376 = 0;while(true){
if((i__9370_9376 < count__9369_9375))
{var vec__9371_9377 = cljs.core._nth.call(null,chunk__9368_9374,i__9370_9376);var ev__3326__auto___9378 = cljs.core.nth.call(null,vec__9371_9377,0,null);var func__3327__auto___9379 = cljs.core.nth.call(null,vec__9371_9377,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9378,func__3327__auto___9379);
{
var G__9380 = seq__9367_9373;
var G__9381 = chunk__9368_9374;
var G__9382 = count__9369_9375;
var G__9383 = (i__9370_9376 + 1);
seq__9367_9373 = G__9380;
chunk__9368_9374 = G__9381;
count__9369_9375 = G__9382;
i__9370_9376 = G__9383;
continue;
}
} else
{var temp__4092__auto___9384 = cljs.core.seq.call(null,seq__9367_9373);if(temp__4092__auto___9384)
{var seq__9367_9385__$1 = temp__4092__auto___9384;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9367_9385__$1))
{var c__4262__auto___9386 = cljs.core.chunk_first.call(null,seq__9367_9385__$1);{
var G__9387 = cljs.core.chunk_rest.call(null,seq__9367_9385__$1);
var G__9388 = c__4262__auto___9386;
var G__9389 = cljs.core.count.call(null,c__4262__auto___9386);
var G__9390 = 0;
seq__9367_9373 = G__9387;
chunk__9368_9374 = G__9388;
count__9369_9375 = G__9389;
i__9370_9376 = G__9390;
continue;
}
} else
{var vec__9372_9391 = cljs.core.first.call(null,seq__9367_9385__$1);var ev__3326__auto___9392 = cljs.core.nth.call(null,vec__9372_9391,0,null);var func__3327__auto___9393 = cljs.core.nth.call(null,vec__9372_9391,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9392,func__3327__auto___9393);
{
var G__9394 = cljs.core.next.call(null,seq__9367_9385__$1);
var G__9395 = null;
var G__9396 = 0;
var G__9397 = 0;
seq__9367_9373 = G__9394;
chunk__9368_9374 = G__9395;
count__9369_9375 = G__9396;
i__9370_9376 = G__9397;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.browser.backward = (function backward(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"button","button",3931183780),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"value","value",1125876963),"<"], null),"<"], null));var seq__9404_9410 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"back!","back!",1107397516));
})], null)));var chunk__9405_9411 = null;var count__9406_9412 = 0;var i__9407_9413 = 0;while(true){
if((i__9407_9413 < count__9406_9412))
{var vec__9408_9414 = cljs.core._nth.call(null,chunk__9405_9411,i__9407_9413);var ev__3326__auto___9415 = cljs.core.nth.call(null,vec__9408_9414,0,null);var func__3327__auto___9416 = cljs.core.nth.call(null,vec__9408_9414,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9415,func__3327__auto___9416);
{
var G__9417 = seq__9404_9410;
var G__9418 = chunk__9405_9411;
var G__9419 = count__9406_9412;
var G__9420 = (i__9407_9413 + 1);
seq__9404_9410 = G__9417;
chunk__9405_9411 = G__9418;
count__9406_9412 = G__9419;
i__9407_9413 = G__9420;
continue;
}
} else
{var temp__4092__auto___9421 = cljs.core.seq.call(null,seq__9404_9410);if(temp__4092__auto___9421)
{var seq__9404_9422__$1 = temp__4092__auto___9421;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9404_9422__$1))
{var c__4262__auto___9423 = cljs.core.chunk_first.call(null,seq__9404_9422__$1);{
var G__9424 = cljs.core.chunk_rest.call(null,seq__9404_9422__$1);
var G__9425 = c__4262__auto___9423;
var G__9426 = cljs.core.count.call(null,c__4262__auto___9423);
var G__9427 = 0;
seq__9404_9410 = G__9424;
chunk__9405_9411 = G__9425;
count__9406_9412 = G__9426;
i__9407_9413 = G__9427;
continue;
}
} else
{var vec__9409_9428 = cljs.core.first.call(null,seq__9404_9422__$1);var ev__3326__auto___9429 = cljs.core.nth.call(null,vec__9409_9428,0,null);var func__3327__auto___9430 = cljs.core.nth.call(null,vec__9409_9428,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9429,func__3327__auto___9430);
{
var G__9431 = cljs.core.next.call(null,seq__9404_9422__$1);
var G__9432 = null;
var G__9433 = 0;
var G__9434 = 0;
seq__9404_9410 = G__9431;
chunk__9405_9411 = G__9432;
count__9406_9412 = G__9433;
i__9407_9413 = G__9434;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.browser.forward = (function forward(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"button","button",3931183780),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"value","value",1125876963),">"], null),">"], null));var seq__9441_9447 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"forward!","forward!",1497217390));
})], null)));var chunk__9442_9448 = null;var count__9443_9449 = 0;var i__9444_9450 = 0;while(true){
if((i__9444_9450 < count__9443_9449))
{var vec__9445_9451 = cljs.core._nth.call(null,chunk__9442_9448,i__9444_9450);var ev__3326__auto___9452 = cljs.core.nth.call(null,vec__9445_9451,0,null);var func__3327__auto___9453 = cljs.core.nth.call(null,vec__9445_9451,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9452,func__3327__auto___9453);
{
var G__9454 = seq__9441_9447;
var G__9455 = chunk__9442_9448;
var G__9456 = count__9443_9449;
var G__9457 = (i__9444_9450 + 1);
seq__9441_9447 = G__9454;
chunk__9442_9448 = G__9455;
count__9443_9449 = G__9456;
i__9444_9450 = G__9457;
continue;
}
} else
{var temp__4092__auto___9458 = cljs.core.seq.call(null,seq__9441_9447);if(temp__4092__auto___9458)
{var seq__9441_9459__$1 = temp__4092__auto___9458;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9441_9459__$1))
{var c__4262__auto___9460 = cljs.core.chunk_first.call(null,seq__9441_9459__$1);{
var G__9461 = cljs.core.chunk_rest.call(null,seq__9441_9459__$1);
var G__9462 = c__4262__auto___9460;
var G__9463 = cljs.core.count.call(null,c__4262__auto___9460);
var G__9464 = 0;
seq__9441_9447 = G__9461;
chunk__9442_9448 = G__9462;
count__9443_9449 = G__9463;
i__9444_9450 = G__9464;
continue;
}
} else
{var vec__9446_9465 = cljs.core.first.call(null,seq__9441_9459__$1);var ev__3326__auto___9466 = cljs.core.nth.call(null,vec__9446_9465,0,null);var func__3327__auto___9467 = cljs.core.nth.call(null,vec__9446_9465,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9466,func__3327__auto___9467);
{
var G__9468 = cljs.core.next.call(null,seq__9441_9459__$1);
var G__9469 = null;
var G__9470 = 0;
var G__9471 = 0;
seq__9441_9447 = G__9468;
chunk__9442_9448 = G__9469;
count__9443_9449 = G__9470;
i__9444_9450 = G__9471;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.browser.refresh = (function refresh(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"button","button",3931183780),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"value","value",1125876963),"re"], null),"\u21BA"], null));var seq__9478_9484 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
})], null)));var chunk__9479_9485 = null;var count__9480_9486 = 0;var i__9481_9487 = 0;while(true){
if((i__9481_9487 < count__9480_9486))
{var vec__9482_9488 = cljs.core._nth.call(null,chunk__9479_9485,i__9481_9487);var ev__3326__auto___9489 = cljs.core.nth.call(null,vec__9482_9488,0,null);var func__3327__auto___9490 = cljs.core.nth.call(null,vec__9482_9488,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9489,func__3327__auto___9490);
{
var G__9491 = seq__9478_9484;
var G__9492 = chunk__9479_9485;
var G__9493 = count__9480_9486;
var G__9494 = (i__9481_9487 + 1);
seq__9478_9484 = G__9491;
chunk__9479_9485 = G__9492;
count__9480_9486 = G__9493;
i__9481_9487 = G__9494;
continue;
}
} else
{var temp__4092__auto___9495 = cljs.core.seq.call(null,seq__9478_9484);if(temp__4092__auto___9495)
{var seq__9478_9496__$1 = temp__4092__auto___9495;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9478_9496__$1))
{var c__4262__auto___9497 = cljs.core.chunk_first.call(null,seq__9478_9496__$1);{
var G__9498 = cljs.core.chunk_rest.call(null,seq__9478_9496__$1);
var G__9499 = c__4262__auto___9497;
var G__9500 = cljs.core.count.call(null,c__4262__auto___9497);
var G__9501 = 0;
seq__9478_9484 = G__9498;
chunk__9479_9485 = G__9499;
count__9480_9486 = G__9500;
i__9481_9487 = G__9501;
continue;
}
} else
{var vec__9483_9502 = cljs.core.first.call(null,seq__9478_9496__$1);var ev__3326__auto___9503 = cljs.core.nth.call(null,vec__9483_9502,0,null);var func__3327__auto___9504 = cljs.core.nth.call(null,vec__9483_9502,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9503,func__3327__auto___9504);
{
var G__9505 = cljs.core.next.call(null,seq__9478_9496__$1);
var G__9506 = null;
var G__9507 = 0;
var G__9508 = 0;
seq__9478_9484 = G__9505;
chunk__9479_9485 = G__9506;
count__9480_9486 = G__9507;
i__9481_9487 = G__9508;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.browser.webview = (function webview(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"webview","webview",2238328683),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"src","src",1014018390),crate.binding.bound.call(null,crate.binding.subatom.call(null,this$,new cljs.core.Keyword(null,"url","url",1014020321))),new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.browser.browser_id.call(null,this$),new cljs.core.Keyword(null,"preload","preload",695427451),lt.objs.files.lt_home.call(null,"core/node_modules/lighttable/browserInjection.js")], null)], null));var seq__9515_9521 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
})], null)));var chunk__9516_9522 = null;var count__9517_9523 = 0;var i__9518_9524 = 0;while(true){
if((i__9518_9524 < count__9517_9523))
{var vec__9519_9525 = cljs.core._nth.call(null,chunk__9516_9522,i__9518_9524);var ev__3326__auto___9526 = cljs.core.nth.call(null,vec__9519_9525,0,null);var func__3327__auto___9527 = cljs.core.nth.call(null,vec__9519_9525,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9526,func__3327__auto___9527);
{
var G__9528 = seq__9515_9521;
var G__9529 = chunk__9516_9522;
var G__9530 = count__9517_9523;
var G__9531 = (i__9518_9524 + 1);
seq__9515_9521 = G__9528;
chunk__9516_9522 = G__9529;
count__9517_9523 = G__9530;
i__9518_9524 = G__9531;
continue;
}
} else
{var temp__4092__auto___9532 = cljs.core.seq.call(null,seq__9515_9521);if(temp__4092__auto___9532)
{var seq__9515_9533__$1 = temp__4092__auto___9532;if(cljs.core.chunked_seq_QMARK_.call(null,seq__9515_9533__$1))
{var c__4262__auto___9534 = cljs.core.chunk_first.call(null,seq__9515_9533__$1);{
var G__9535 = cljs.core.chunk_rest.call(null,seq__9515_9533__$1);
var G__9536 = c__4262__auto___9534;
var G__9537 = cljs.core.count.call(null,c__4262__auto___9534);
var G__9538 = 0;
seq__9515_9521 = G__9535;
chunk__9516_9522 = G__9536;
count__9517_9523 = G__9537;
i__9518_9524 = G__9538;
continue;
}
} else
{var vec__9520_9539 = cljs.core.first.call(null,seq__9515_9533__$1);var ev__3326__auto___9540 = cljs.core.nth.call(null,vec__9520_9539,0,null);var func__3327__auto___9541 = cljs.core.nth.call(null,vec__9520_9539,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___9540,func__3327__auto___9541);
{
var G__9542 = cljs.core.next.call(null,seq__9515_9533__$1);
var G__9543 = null;
var G__9544 = 0;
var G__9545 = 0;
seq__9515_9521 = G__9542;
chunk__9516_9522 = G__9543;
count__9517_9523 = G__9544;
i__9518_9524 = G__9545;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","browser","lt.objs.browser/browser",1401265285),new cljs.core.Keyword(null,"name","name",1017277949),"browser",new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"browser","browser",1164844698),null], null), null),new cljs.core.Keyword(null,"url","url",1014020321),"about:blank",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"client","client",3951159101),lt.objs.browser.connect_client.call(null,this$),new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228),lt.object.create.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","devtools-client","lt.objs.clients.devtools/devtools-client",2732459658),new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))], null));
lt.object.raise.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"reconnect!","reconnect!",1644020508));
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#browser","div#browser",741844136),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.frame-shade","div.frame-shade",4348666722)], null),lt.objs.browser.webview.call(null,this$),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"nav","nav",1014013077),lt.objs.browser.backward.call(null,this$),lt.objs.browser.forward.call(null,this$),lt.objs.browser.url_bar.call(null,this$),lt.objs.browser.refresh.call(null,this$)], null)], null);
}));
lt.objs.browser.__BEH__reconnect_on_move = (function __BEH__reconnect_on_move(this$){return lt.object.raise.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"reconnect!","reconnect!",1644020508));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","reconnect-on-move","lt.objs.browser/reconnect-on-move",2151189542),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__reconnect_on_move,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"move","move",1017261891),null], null), null));
lt.objs.browser.__BEH__destroy_on_close = (function __BEH__destroy_on_close(this$){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
lt.object.destroy_BANG_.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
return lt.object.destroy_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","destroy-on-close","lt.objs.browser/destroy-on-close",2232797874),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__destroy_on_close,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"close","close",1108660586),null], null), null));
lt.objs.browser.__BEH__rem_client = (function __BEH__rem_client(this$){if(cljs.core._EQ_.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959)),this$))
{lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959));
} else
{}
var temp__4092__auto___9546 = cljs.core.first.call(null,cljs.core.remove.call(null,cljs.core.PersistentHashSet.fromArray([this$], true),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698))));if(cljs.core.truth_(temp__4092__auto___9546))
{var b_9547 = temp__4092__auto___9546;lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959),b_9547);
} else
{}
return lt.objs.clients.rem_BANG_.call(null,new cljs.core.Keyword(null,"client","client",3951159101).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","rem-client","lt.objs.browser/rem-client",3433438675),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__rem_client,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"destroy","destroy",2571277164),null], null), null));
lt.objs.browser.__BEH__navigate_BANG_ = (function __BEH__navigate_BANG_(this$,n){var bar = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));var url = lt.objs.browser.check_http.call(null,(function (){var or__3520__auto__ = n;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.util.dom.val.call(null,bar);
}
})());lt.objs.notifos.working.call(null);
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"url","url",1014020321),url,new cljs.core.Keyword(null,"loading-counter","loading-counter",2714046941),(new cljs.core.Keyword(null,"loading-counter","loading-counter",2714046941).cljs$core$IFn$_invoke$arity$2(cljs.core.deref.call(null,this$),0) + 1)], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","navigate!","lt.objs.browser/navigate!",803576413),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__navigate_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"navigate!","navigate!",1766726722),null], null), null));
lt.objs.browser.__BEH__url_focus_BANG_ = (function __BEH__url_focus_BANG_(this$){var url_input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));lt.util.dom.focus.call(null,url_input);
return url_input.select();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","url-focus!","lt.objs.browser/url-focus!",3402432972),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__url_focus_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"url.focus!","url.focus!",4046450458),null], null), null));
lt.objs.browser.__BEH__focus_BANG_ = (function __BEH__focus_BANG_(this$){return lt.util.dom.focus.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"webview","webview",2238328683),lt.object.__GT_content.call(null,this$)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","focus!","lt.objs.browser/focus!",3058401254),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__focus_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null], null), null));
lt.objs.browser.__BEH__back_BANG_ = (function __BEH__back_BANG_(this$){var frame = lt.objs.browser.to_frame.call(null,this$);return frame.goBack();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","back!","lt.objs.browser/back!",1427460503),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__back_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"back!","back!",1107397516),null], null), null));
lt.objs.browser.__BEH__forward_BANG_ = (function __BEH__forward_BANG_(this$){var frame = lt.objs.browser.to_frame.call(null,this$);return frame.goForward();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","forward!","lt.objs.browser/forward!",533790641),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__forward_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"forward!","forward!",1497217390),null], null), null));
lt.objs.browser.__BEH__refresh_BANG_ = (function __BEH__refresh_BANG_(this$){var frame = lt.objs.browser.to_frame.call(null,this$);return frame.reload();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","refresh!","lt.objs.browser/refresh!",1696987659),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__refresh_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"refresh!","refresh!",4597922840),null], null), null));
lt.objs.browser.__BEH__menu_BANG_ = (function __BEH__menu_BANG_(this$,e){var items_9548 = cljs.core.sort_by.call(null,new cljs.core.Keyword(null,"order","order",1119910592),lt.object.raise_reduce.call(null,this$,new cljs.core.Keyword(null,"menu+","menu+",1117686302),cljs.core.PersistentVector.EMPTY));lt.objs.menu.show_menu.call(null,lt.objs.menu.menu.call(null,items_9548));
lt.util.dom.prevent.call(null,e);
return lt.util.dom.stop_propagation.call(null,e);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","menu!","lt.objs.browser/menu!",1421234191),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__menu_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu!","menu!",1117686292),null], null), null));
lt.objs.browser.__BEH__menu_PLUS_ = (function __BEH__menu_PLUS_(this$,menu){return cljs.core.conj.call(null,menu,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"forward",new cljs.core.Keyword(null,"order","order",1119910592),0,new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"browser.forward","browser.forward",4326300017));
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"back",new cljs.core.Keyword(null,"order","order",1119910592),1,new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"browser.back","browser.back",2720710495));
})], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"separator",new cljs.core.Keyword(null,"order","order",1119910592),2], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"copy",new cljs.core.Keyword(null,"order","order",1119910592),3,new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.browser.to_frame.call(null,this$).copy();
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"paste",new cljs.core.Keyword(null,"order","order",1119910592),4,new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.browser.to_frame.call(null,this$).paste();
})], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","menu+","lt.objs.browser/menu+",1421234177),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__menu_PLUS_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu+","menu+",1117686302),null], null), null));
lt.objs.browser.__BEH__init_BANG_ = (function __BEH__init_BANG_(this$){var frame = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"webview","webview",2238328683),lt.object.__GT_content.call(null,this$));var bar = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));frame.addEventListener("ipc-message",(function (e,arg){var args = (e.args[0]);var pred__9552 = cljs.core._EQ_;var expr__9553 = e.channel;if(cljs.core.truth_(pred__9552.call(null,"browser-event",expr__9553)))
{return lt.object.raise.call(null,this$,cljs.core.keyword.call(null,(args[0])),(args[1]));
} else
{if(cljs.core.truth_(pred__9552.call(null,"browser-raise",expr__9553)))
{return lt.object.raise.call(null,lt.object.by_id.call(null,(args[0])),cljs.core.keyword.call(null,(args[1])),cljs.core.js__GT_clj.call(null,(args[2]),new cljs.core.Keyword(null,"keywordize-keys","keywordize-keys",4191781672),true));
} else
{throw (new Error([cljs.core.str("No matching clause: "),cljs.core.str(expr__9553)].join('')));
}
}
}));
frame.addEventListener("contextmenu",(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"menu!","menu!",1117686292),e);
}));
return frame.addEventListener("did-finish-load",(function (){var loc = frame.getUrl();lt.objs.clients.devtools.clear_scripts_BANG_.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
lt.util.dom.val.call(null,bar,loc);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"navigate","navigate",3116398819),loc);
}));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","init!","lt.objs.browser/init!",1417774750),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__init_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"init","init",1017141378),null], null), null));
lt.objs.browser.__BEH__handle_hash_change = (function __BEH__handle_hash_change(this$,info){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$)),info.href);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","handle-hash-change","lt.objs.browser/handle-hash-change",1421561479),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__handle_hash_change,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"hashchange","hashchange",2126071216),null], null), null));
lt.objs.browser.__BEH__set_client_name = (function __BEH__set_client_name(this$,loc){var title = lt.objs.browser.to_frame.call(null,this$).getTitle();var title__$1 = ((!(cljs.core.empty_QMARK_.call(null,title)))?title:"browser");lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"name","name",1017277949),title__$1], null));
lt.objs.tabs.refresh_BANG_.call(null,this$);
var n__4362__auto___9555 = new cljs.core.Keyword(null,"loading-counter","loading-counter",2714046941).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var x_9556 = 0;while(true){
if((x_9556 < n__4362__auto___9555))
{lt.objs.notifos.done_working.call(null);
{
var G__9557 = (x_9556 + 1);
x_9556 = G__9557;
continue;
}
} else
{}
break;
}
return lt.object.merge_BANG_.call(null,new cljs.core.Keyword(null,"client","client",3951159101).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"name","name",1017277949),loc], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","set-client-name","lt.objs.browser/set-client-name",1645431759),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__set_client_name,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"navigate","navigate",3116398819),null], null), null));
lt.objs.browser.__BEH__update_devtools_client_url = (function __BEH__update_devtools_client_url(this$,loc){return lt.object.merge_BANG_.call(null,new cljs.core.Keyword(null,"devtools-client","devtools-client",2367412228).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"url","url",1014020321),loc], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","update-devtools-client-url","lt.objs.browser/update-devtools-client-url",3723278333),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__update_devtools_client_url,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"navigate","navigate",3116398819),null], null), null));
lt.objs.browser.__BEH__set_active = (function __BEH__set_active(this$){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959),this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","set-active","lt.objs.browser/set-active",4650437726),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__set_active,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"active","active",3885920888),null,new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.browser.__BEH__active_context = (function __BEH__active_context(this$){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698),this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","active-context","lt.objs.browser/active-context",1990046533),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__active_context,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"active","active",3885920888),null,new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.browser.__BEH__focus_on_show = (function __BEH__focus_on_show(this$){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","focus-on-show","lt.objs.browser/focus-on-show",650060667),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__focus_on_show,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.browser.__BEH__inactive_context = (function __BEH__inactive_context(this$){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","inactive-context","lt.objs.browser/inactive-context",1464142818),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__inactive_context,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"inactive","inactive",1038569437),null], null), null));
lt.objs.browser.__BEH__handle_send_BANG_ = (function __BEH__handle_send_BANG_(this$,msg){return lt.object.raise.call(null,this$,cljs.core.keyword.call(null,[cljs.core.str(new cljs.core.Keyword(null,"command","command",1964298941).cljs$core$IFn$_invoke$arity$1(msg)),cljs.core.str("!")].join('')),msg);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","handle-send!","lt.objs.browser/handle-send!",4165361401),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__handle_send_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"send!","send!",1123226891),null], null), null));
lt.objs.browser.__BEH__handle_refresh_BANG_ = (function __BEH__handle_refresh_BANG_(this$){return lt.object.raise.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","handle-refresh!","lt.objs.browser/handle-refresh!",2985065480),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__handle_refresh_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"client.refresh!","client.refresh!",1210437339),null], null), null));
lt.objs.browser.__BEH__handle_close_BANG_ = (function __BEH__handle_close_BANG_(this$){lt.object.raise.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"close","close",1108660586));
return lt.objs.clients.rem_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","handle-close!","lt.objs.browser/handle-close!",2176426435),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__handle_close_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"client.close!","client.close!",582466590),null], null), null));
lt.objs.browser.__BEH__change_live = (function __BEH__change_live(this$,msg){var temp__4092__auto__ = lt.objs.clients.cb__GT_obj.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;if(cljs.core.truth_(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg))))
{return lt.objs.clients.devtools.changelive_BANG_.call(null,ed,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg)),lt.plugins.watches.watched_range(ed,null,null,lt.objs.langs.js.src__GT_watch),(function (res){return lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"editor.eval.js.change-live.success","editor.eval.js.change-live.success",2994410460));
}),cljs.core.identity);
} else
{return null;
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","change-live","lt.objs.browser/change-live",2720093766),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__change_live,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.js.change-live!","editor.eval.js.change-live!",3424692446),null], null), null));
lt.objs.browser.__BEH__js_eval_file = (function __BEH__js_eval_file(this$,msg,cb){var temp__4092__auto__ = lt.objs.clients.cb__GT_obj.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var data = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);var data__$1 = cljs.core.assoc.call(null,data,new cljs.core.Keyword(null,"code","code",1016963423),[cljs.core.str(new cljs.core.Keyword(null,"code","code",1016963423).cljs$core$IFn$_invoke$arity$1(data)),cljs.core.str("\n\n//# sourceURL="),cljs.core.str(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(data))].join(''));return lt.objs.clients.devtools.eval_in_webview_client.call(null,lt.objs.browser.client__GT_devtools.call(null,this$),data__$1,(function (res){if(cljs.core.truth_(cb))
{cb.call(null);
} else
{}
return lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"editor.eval.js.file.success","editor.eval.js.file.success",4272529943));
}));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","js-eval-file","lt.objs.browser/js-eval-file",817287718),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__js_eval_file,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.js.file!","editor.eval.js.file!",1760417539),null], null), null));
lt.objs.browser.__BEH__html_eval = (function __BEH__html_eval(this$,msg){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"client.refresh!","client.refresh!",1210437339));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","html-eval","lt.objs.browser/html-eval",3721717555),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__html_eval,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.html!","editor.eval.html!",3008782487),null], null), null));
lt.objs.browser.__BEH__css_eval = (function __BEH__css_eval(this$,msg){var info = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);var frame = lt.objs.browser.to_frame.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));return frame.send("editor.eval.css",{"code": new cljs.core.Keyword(null,"code","code",1016963423).cljs$core$IFn$_invoke$arity$1(info), "name": new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(info)});
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","css-eval","lt.objs.browser/css-eval",2220805003),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__css_eval,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.css!","editor.eval.css!",3156315329),null], null), null));
lt.objs.browser.__BEH__cljs_exec = (function __BEH__cljs_exec(this$,msg){var frame = lt.objs.browser.to_frame.call(null,new cljs.core.Keyword(null,"frame","frame",1111596255).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var info = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);return frame.send("editor.eval.cljs.exec",{"client": new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg), "results": cljs.core.clj__GT_js.call(null,new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(info))});
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","cljs-exec","lt.objs.browser/cljs-exec",1664374689),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__cljs_exec,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.cljs.exec!","editor.eval.cljs.exec!",743618999),null], null), null));
lt.objs.browser.eval_js_form = (function eval_js_form(this$,msg){var data = cljs.core.assoc.call(null,new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"code","code",1016963423),lt.objs.eval.append_source_file.call(null,new cljs.core.Keyword(null,"code","code",1016963423).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg)),new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg))));var devtools_client = lt.objs.browser.client__GT_devtools.call(null,this$);lt.objs.clients.devtools.eval_in_webview_client.call(null,devtools_client,data,(function (res){var result = lt.objs.clients.devtools.inspector__GT_result.call(null,devtools_client,res);var req = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);var result__$1 = cljs.core.assoc.call(null,result,new cljs.core.Keyword(null,"meta","meta",1017252215),new cljs.core.Keyword(null,"meta","meta",1017252215).cljs$core$IFn$_invoke$arity$1(req),new cljs.core.Keyword(null,"no-inspect","no-inspect",887813498),true);if(cljs.core.not.call(null,new cljs.core.Keyword(null,"ex","ex",1013907493).cljs$core$IFn$_invoke$arity$1(result__$1)))
{return lt.objs.browser.handle_cb.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"editor.eval.js.result","editor.eval.js.result",3021062051),result__$1);
} else
{return lt.objs.browser.handle_cb.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"editor.eval.js.exception","editor.eval.js.exception",723801901),result__$1);
}
}));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"editor.eval.js.change-live!","editor.eval.js.change-live!",3424692446),msg);
});
lt.objs.browser.must_eval_file_QMARK_ = (function must_eval_file_QMARK_(devtools,msg){if(cljs.core.truth_(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg))))
{return (cljs.core.not.call(null,new cljs.core.Keyword(null,"meta","meta",1017252215).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg)))) || (cljs.core.not.call(null,lt.objs.clients.devtools.find_script.call(null,devtools,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg)))));
} else
{return null;
}
});
lt.objs.browser.__BEH__js_eval = (function __BEH__js_eval(this$,msg){var devtools = lt.objs.browser.client__GT_devtools.call(null,this$);if(cljs.core.truth_(lt.objs.browser.must_eval_file_QMARK_.call(null,devtools,msg)))
{var temp__4092__auto__ = lt.object.by_id.call(null,new cljs.core.Keyword(null,"cb","cb",1013907409).cljs$core$IFn$_invoke$arity$1(msg));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var data = new cljs.core.Keyword(null,"data","data",1016980252).cljs$core$IFn$_invoke$arity$1(msg);var data__$1 = cljs.core.assoc.call(null,data,new cljs.core.Keyword(null,"code","code",1016963423),[cljs.core.str(lt.objs.editor.__GT_val.call(null,ed)),cljs.core.str("\n\n//# sourceURL="),cljs.core.str(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(data))].join(''));return lt.objs.clients.devtools.eval_in_webview_client.call(null,lt.objs.browser.client__GT_devtools.call(null,this$),data__$1,(function (res){return lt.objs.browser.eval_js_form.call(null,this$,msg);
}));
} else
{return null;
}
} else
{return lt.objs.browser.eval_js_form.call(null,this$,msg);
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.browser","js-eval","lt.objs.browser/js-eval",3158449165),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.browser.__BEH__js_eval,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.eval.js!","editor.eval.js!",1083020921),null], null), null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.url-bar.navigate!","browser.url-bar.navigate!",1014303491),new cljs.core.Keyword(null,"desc","desc",1016984067),"BrowserUrlBar: navigate to location",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (loc){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser.url-bar","browser.url-bar",537128289));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"navigate!","navigate!",1766726722),loc);
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.url-bar.focus","browser.url-bar.focus",3353788299),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: focus url",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (loc){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"url.focus!","url.focus!",4046450458));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.focus-content","browser.focus-content",1148241840),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: focus content",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.back","browser.back",2720710495),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: back",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"back!","back!",1107397516));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"browser.forward","browser.forward",4326300017),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: forward",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"browser","browser",1164844698));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"forward!","forward!",1497217390));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"add-browser-tab","add-browser-tab",3663273910),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: add browser tab",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (loc){var b = lt.objs.browser.add.call(null);if(cljs.core.not.call(null,loc))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
} else
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"navigate!","navigate!",1766726722),loc);
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"refresh-connected-browser","refresh-connected-browser",3935980900),new cljs.core.Keyword(null,"desc","desc",1016984067),"Browser: refresh active browser tab",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959));if(cljs.core.truth_(temp__4092__auto__))
{var b = temp__4092__auto__;if(cljs.core.truth_(cljs.core.deref.call(null,b)))
{return lt.object.raise.call(null,b,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
} else
{return null;
}
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.open-current-file-in-browser","editor.open-current-file-in-browser",1439718637),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Open current file in browser",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var b = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959));var ed = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_((function (){var and__3508__auto__ = ed;if(cljs.core.truth_(and__3508__auto__))
{return new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed)));
} else
{return and__3508__auto__;
}
})()))
{if(cljs.core.truth_(b))
{} else
{lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"add-browser-tab","add-browser-tab",3663273910));
}
return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"global.browser","global.browser",3786202959)),new cljs.core.Keyword(null,"navigate!","navigate!",1766726722),[cljs.core.str("file://"),cljs.core.str(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))].join(''));
} else
{return null;
}
})], null));
lt.objs.sidebar.clients.add_connector.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1017277949),"Browser",new cljs.core.Keyword(null,"desc","desc",1016984067),"Open a browser tab to eval JavaScript, CSS, and HTML live.",new cljs.core.Keyword(null,"connect","connect",1965255772),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"add-browser-tab","add-browser-tab",3663273910));
})], null));
