// Compiled by ClojureScript 1.9.562 {}
goog.provide('hoplon.app_pages._index_DOT_html');
goog.require('cljs.core');
goog.require('cljs.pprint');
goog.require('weathergen.ipc');
goog.require('weathergen.ui');
goog.require('weathergen.ui.buttons');
goog.require('weathergen.ui.common');
goog.require('weathergen.ui.trees');
goog.require('taoensso.timbre');
goog.require('javelin.core');
goog.require('hoplon.jquery');
goog.require('hoplon.core');
hoplon.app_pages._index_DOT_html.electron = require("electron");
hoplon.app_pages._index_DOT_html.load_status = javelin.core.cell.call(null,cljs.core.PersistentVector.EMPTY);
hoplon.app_pages._index_DOT_html.loading_QMARK_ = javelin.core.cell.call(null,false);
/**
 * Updates the entry in `status` whose id is `id`, by replacing it with
 *   the result of calling `f` on it.
 */
hoplon.app_pages._index_DOT_html.update_for_id = (function hoplon$app_pages$_index_DOT_html$update_for_id(status,id,f){
return cljs.core.mapv.call(null,(function (p1__50565_SHARP_){
if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(p1__50565_SHARP_),id)){
return f.call(null,p1__50565_SHARP_);
} else {
return p1__50565_SHARP_;
}
}),status);
});
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-step-started",(function (_,___$1,p__50566){
var map__50567 = p__50566;
var map__50567__$1 = ((((!((map__50567 == null)))?((((map__50567.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50567.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50567):map__50567);
var id = cljs.core.get.call(null,map__50567__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
var name = cljs.core.get.call(null,map__50567__$1,new cljs.core.Keyword(null,"name","name",1843675177));
var parent = cljs.core.get.call(null,map__50567__$1,new cljs.core.Keyword(null,"parent","parent",-878878779));
taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"debug","debug",-1608172596),"hoplon.app-pages._index_DOT_html",null,37,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay(((function (map__50567,map__50567__$1,id,name,parent){
return (function (){
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, ["load-step-started",id,name,parent], null);
});})(map__50567,map__50567__$1,id,name,parent))
,null)),null,-584865550);

if(cljs.core.truth_(cljs.core.deref.call(null,hoplon.app_pages._index_DOT_html.loading_QMARK_))){
return cljs.core.swap_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,cljs.core.conj,new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"started","started",585705024),new cljs.core.Keyword(null,"id","id",-1388402092),id,new cljs.core.Keyword(null,"name","name",1843675177),name,new cljs.core.Keyword(null,"messages","messages",345434482),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"parent","parent",-878878779),(function (){var or__23338__auto__ = parent;
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return new cljs.core.Keyword("hoplon.app-pages._index_DOT_html","root","hoplon.app-pages._index_DOT_html/root",2099050054);
}
})()], null));
} else {
return null;
}
}));
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-step-succeeded",(function (_,___$1,p__50570){
var map__50571 = p__50570;
var map__50571__$1 = ((((!((map__50571 == null)))?((((map__50571.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50571.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50571):map__50571);
var id = cljs.core.get.call(null,map__50571__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"debug","debug",-1608172596),"hoplon.app-pages._index_DOT_html",null,47,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay(((function (map__50571,map__50571__$1,id){
return (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["load-step-succeeded",id], null);
});})(map__50571,map__50571__$1,id))
,null)),null,-1850343416);

if(cljs.core.truth_(cljs.core.deref.call(null,hoplon.app_pages._index_DOT_html.loading_QMARK_))){
return cljs.core.swap_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,hoplon.app_pages._index_DOT_html.update_for_id,id,((function (map__50571,map__50571__$1,id){
return (function (p1__50569_SHARP_){
return cljs.core.assoc.call(null,p1__50569_SHARP_,new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"succeeded","succeeded",-1860573089));
});})(map__50571,map__50571__$1,id))
);
} else {
return null;
}
}));
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-step-warning",(function (_,___$1,p__50574){
var map__50575 = p__50574;
var map__50575__$1 = ((((!((map__50575 == null)))?((((map__50575.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50575.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50575):map__50575);
var id = cljs.core.get.call(null,map__50575__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
var message = cljs.core.get.call(null,map__50575__$1,new cljs.core.Keyword(null,"message","message",-406056002));
taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"debug","debug",-1608172596),"hoplon.app-pages._index_DOT_html",null,53,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay(((function (map__50575,map__50575__$1,id,message){
return (function (){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, ["load-step-warning",id,message], null);
});})(map__50575,map__50575__$1,id,message))
,null)),null,-479077047);

if(cljs.core.truth_(cljs.core.deref.call(null,hoplon.app_pages._index_DOT_html.loading_QMARK_))){
return cljs.core.swap_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,hoplon.app_pages._index_DOT_html.update_for_id,id,((function (map__50575,map__50575__$1,id,message){
return (function (p1__50573_SHARP_){
return cljs.core.update.call(null,cljs.core.assoc.call(null,p1__50573_SHARP_,new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"warning","warning",-1685650671)),new cljs.core.Keyword(null,"messages","messages",345434482),cljs.core.conj,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"warning","warning",-1685650671),new cljs.core.Keyword(null,"text","text",-1790561697),message], null));
});})(map__50575,map__50575__$1,id,message))
);
} else {
return null;
}
}));
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-step-failed",(function (_,___$1,p__50578){
var map__50579 = p__50578;
var map__50579__$1 = ((((!((map__50579 == null)))?((((map__50579.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50579.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50579):map__50579);
var id = cljs.core.get.call(null,map__50579__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
var message = cljs.core.get.call(null,map__50579__$1,new cljs.core.Keyword(null,"message","message",-406056002));
taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"debug","debug",-1608172596),"hoplon.app-pages._index_DOT_html",null,62,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay(((function (map__50579,map__50579__$1,id,message){
return (function (){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, ["load-step-failed",id,message], null);
});})(map__50579,map__50579__$1,id,message))
,null)),null,-1778048280);

if(cljs.core.truth_(cljs.core.deref.call(null,hoplon.app_pages._index_DOT_html.loading_QMARK_))){
return cljs.core.swap_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,hoplon.app_pages._index_DOT_html.update_for_id,id,((function (map__50579,map__50579__$1,id,message){
return (function (p1__50577_SHARP_){
return cljs.core.update.call(null,cljs.core.assoc.call(null,p1__50577_SHARP_,new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"failed","failed",-1397425762)),new cljs.core.Keyword(null,"messages","messages",345434482),((function (map__50579,map__50579__$1,id,message){
return (function (messages){
if(cljs.core.truth_(message)){
return cljs.core.conj.call(null,messages,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"error","error",-978969032),new cljs.core.Keyword(null,"text","text",-1790561697),message], null));
} else {
return messages;
}
});})(map__50579,map__50579__$1,id,message))
);
});})(map__50579,map__50579__$1,id,message))
);
} else {
return null;
}
}));
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-complete",(function (_,event){
taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"debug","debug",-1608172596),"hoplon.app-pages._index_DOT_html",null,75,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay((function (){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["load-complete"], null);
}),null)),null,-348532160);

return javelin.core.dosync_STAR_.call(null,(function (){
cljs.core.reset_BANG_.call(null,hoplon.app_pages._index_DOT_html.loading_QMARK_,false);

return cljs.core.swap_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,hoplon.app_pages._index_DOT_html.update_for_id,new cljs.core.Keyword("hoplon.app-pages._index_DOT_html","root","hoplon.app-pages._index_DOT_html/root",2099050054),(function (p1__50581_SHARP_){
return cljs.core.assoc.call(null,p1__50581_SHARP_,new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"succeeded","succeeded",-1860573089));
}));
}));
}));
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-failed",(function (_,___$1,err){
taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"debug","debug",-1608172596),"hoplon.app-pages._index_DOT_html",null,83,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay((function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["load-failed",err], null);
}),null)),null,-572234874);

return javelin.core.dosync_STAR_.call(null,(function (){
cljs.core.reset_BANG_.call(null,hoplon.app_pages._index_DOT_html.loading_QMARK_,false);

cljs.core.swap_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,(function (p1__50582_SHARP_){
return cljs.core.map.call(null,(function (step){
if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"state","state",-1988618099).cljs$core$IFn$_invoke$arity$1(step),new cljs.core.Keyword(null,"started","started",585705024))){
return cljs.core.assoc.call(null,step,new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"failed","failed",-1397425762));
} else {
return step;
}
}),p1__50582_SHARP_);
}));

return cljs.core.swap_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,hoplon.app_pages._index_DOT_html.update_for_id,new cljs.core.Keyword("hoplon.app-pages._index_DOT_html","root","hoplon.app-pages._index_DOT_html/root",2099050054),(function (p1__50583_SHARP_){
return cljs.core.update.call(null,cljs.core.assoc.call(null,p1__50583_SHARP_,new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"failed","failed",-1397425762)),new cljs.core.Keyword(null,"messages","messages",345434482),(function (messages){
if(cljs.core.truth_(err)){
return cljs.core.conj.call(null,messages,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"error","error",-978969032),new cljs.core.Keyword(null,"text","text",-1790561697),err], null));
} else {
return messages;
}
}));
}));
}));
}));
hoplon.app_pages._index_DOT_html.load_mission = (function hoplon$app_pages$_index_DOT_html$load_mission(){
var temp__5278__auto__ = hoplon.app_pages._index_DOT_html.electron.remote.dialog.showOpenDialog(cljs.core.clj__GT_js.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),"Select a campaign or tactical engagement file",new cljs.core.Keyword(null,"properties","properties",685819552),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["openFile"], null),new cljs.core.Keyword(null,"filters","filters",974726919),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"name","name",1843675177),"Campaign file",new cljs.core.Keyword(null,"extensions","extensions",-1103629196),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["cam"], null)], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"name","name",1843675177),"Tactical engagement file",new cljs.core.Keyword(null,"extensions","extensions",-1103629196),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["tac"], null)], null)], null)], null)));
if(cljs.core.truth_(temp__5278__auto__)){
var vec__50587 = temp__5278__auto__;
var path = cljs.core.nth.call(null,vec__50587,(0),null);
javelin.core.dosync_STAR_.call(null,((function (vec__50587,path,temp__5278__auto__){
return (function (){
cljs.core.reset_BANG_.call(null,hoplon.app_pages._index_DOT_html.loading_QMARK_,true);

return cljs.core.reset_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword("hoplon.app-pages._index_DOT_html","root","hoplon.app-pages._index_DOT_html/root",2099050054),new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"started","started",585705024),new cljs.core.Keyword(null,"name","name",1843675177),"Loading mission"], null)], null));
});})(vec__50587,path,temp__5278__auto__))
);

return weathergen.ipc.send_to_main.call(null,"open-mission",path);
} else {
return null;
}
});
hoplon.app_pages._index_DOT_html.load_briefing = (function hoplon$app_pages$_index_DOT_html$load_briefing(){
var temp__5278__auto__ = hoplon.app_pages._index_DOT_html.electron.remote.dialog.showOpenDialog(({"title": "Select a campaign or tactical engagement file", "openFile": true, "filters": [({"name": "VMT Briefing", "extensions": ["vmtb"]})]}));
if(cljs.core.truth_(temp__5278__auto__)){
var vec__50593 = temp__5278__auto__;
var path = cljs.core.nth.call(null,vec__50593,(0),null);
javelin.core.dosync_STAR_.call(null,((function (vec__50593,path,temp__5278__auto__){
return (function (){
cljs.core.reset_BANG_.call(null,hoplon.app_pages._index_DOT_html.loading_QMARK_,true);

return cljs.core.reset_BANG_.call(null,hoplon.app_pages._index_DOT_html.load_status,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword("hoplon.app-pages._index_DOT_html","root","hoplon.app-pages._index_DOT_html/root",2099050054),new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"started","started",585705024),new cljs.core.Keyword(null,"name","name",1843675177),"Loading briefing"], null)], null));
});})(vec__50593,path,temp__5278__auto__))
);

return weathergen.ipc.send_to_main.call(null,"open-briefing",path);
} else {
return null;
}
});
hoplon.app_pages._index_DOT_html.inline = (function hoplon$app_pages$_index_DOT_html$inline(var_args){
var args__24566__auto__ = [];
var len__24559__auto___50598 = arguments.length;
var i__24560__auto___50599 = (0);
while(true){
if((i__24560__auto___50599 < len__24559__auto___50598)){
args__24566__auto__.push((arguments[i__24560__auto___50599]));

var G__50600 = (i__24560__auto___50599 + (1));
i__24560__auto___50599 = G__50600;
continue;
} else {
}
break;
}

var argseq__24567__auto__ = ((((1) < args__24566__auto__.length))?(new cljs.core.IndexedSeq(args__24566__auto__.slice((1)),(0),null)):null);
return hoplon.app_pages._index_DOT_html.inline.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__24567__auto__);
});

hoplon.app_pages._index_DOT_html.inline.cljs$core$IFn$_invoke$arity$variadic = (function (props,args){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1057191632),cljs.core.assoc_in.call(null,props,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.Keyword(null,"display","display",242065432)], null),"inline-block"),args], null);
});

hoplon.app_pages._index_DOT_html.inline.cljs$lang$maxFixedArity = (1);

hoplon.app_pages._index_DOT_html.inline.cljs$lang$applyTo = (function (seq50596){
var G__50597 = cljs.core.first.call(null,seq50596);
var seq50596__$1 = cljs.core.next.call(null,seq50596);
return hoplon.app_pages._index_DOT_html.inline.cljs$core$IFn$_invoke$arity$variadic(G__50597,seq50596__$1);
});

/**
 * Returns UI for an item in the tree.
 */
hoplon.app_pages._index_DOT_html.tree_item = (function hoplon$app_pages$_index_DOT_html$tree_item(p__50601){
var map__50631 = p__50601;
var map__50631__$1 = ((((!((map__50631 == null)))?((((map__50631.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50631.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50631):map__50631);
var item = map__50631__$1;
var id = cljs.core.get.call(null,map__50631__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
var messages = cljs.core.get.call(null,map__50631__$1,new cljs.core.Keyword(null,"messages","messages",345434482));
var state = cljs.core.get.call(null,map__50631__$1,new cljs.core.Keyword(null,"state","state",-1988618099));
var name = cljs.core.get.call(null,map__50631__$1,new cljs.core.Keyword(null,"name","name",1843675177));
return hoplon.app_pages._index_DOT_html.inline.call(null,cljs.core.PersistentArrayMap.EMPTY,hoplon.app_pages._index_DOT_html.inline.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"verticalAlign","verticalAlign",465597462),"top"], null)], null),(function (){var pred__50633 = cljs.core._EQ_;
var expr__50634 = state;
if(cljs.core.truth_(pred__50633.call(null,new cljs.core.Keyword(null,"succeeded","succeeded",-1860573089),expr__50634))){
return hoplon.app_pages._index_DOT_html.inline.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"color","color",1011675173),"green",new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(24)),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"top"], null)], null),"\u2713");
} else {
if(cljs.core.truth_(pred__50633.call(null,new cljs.core.Keyword(null,"failed","failed",-1397425762),expr__50634))){
return hoplon.app_pages._index_DOT_html.inline.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"color","color",1011675173),"red",new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(24)),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"top"], null)], null),"\u2717");
} else {
if(cljs.core.truth_(pred__50633.call(null,new cljs.core.Keyword(null,"started","started",585705024),expr__50634))){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"img","img",1442687358),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(24)),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"top",new cljs.core.Keyword(null,"margin-top","margin-top",392161226),weathergen.ui.common.px.call(null,(5))], null),new cljs.core.Keyword(null,"src","src",-1651076051),"images/spinner.gif"], null)], null);
} else {
if(cljs.core.truth_(pred__50633.call(null,new cljs.core.Keyword(null,"warning","warning",-1685650671),expr__50634))){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"img","img",1442687358),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(24)),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"top",new cljs.core.Keyword(null,"margin-top","margin-top",392161226),weathergen.ui.common.px.call(null,(5)),new cljs.core.Keyword(null,"margin-right","margin-right",809689658),weathergen.ui.common.px.call(null,(3))], null),new cljs.core.Keyword(null,"src","src",-1651076051),"images/warning.svg"], null)], null);
} else {
throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("No matching clause: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(expr__50634)].join('')));
}
}
}
}
})(),hoplon.app_pages._index_DOT_html.inline.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"normal"], null)], null),name)),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"table","table",-564943036),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-left","margin-left",2015598377),weathergen.ui.common.px.call(null,(30))], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tbody","tbody",-80678300),(function (){var iter__24200__auto__ = ((function (map__50631,map__50631__$1,item,id,messages,state,name){
return (function hoplon$app_pages$_index_DOT_html$tree_item_$_iter__50636(s__50637){
return (new cljs.core.LazySeq(null,((function (map__50631,map__50631__$1,item,id,messages,state,name){
return (function (){
var s__50637__$1 = s__50637;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__50637__$1);
if(temp__5278__auto__){
var s__50637__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__50637__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__50637__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__50639 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__50638 = (0);
while(true){
if((i__50638 < size__24199__auto__)){
var message = cljs.core._nth.call(null,c__24198__auto__,i__50638);
cljs.core.chunk_append.call(null,b__50639,(function (){var map__50650 = message;
var map__50650__$1 = ((((!((map__50650 == null)))?((((map__50650.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50650.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50650):map__50650);
var type = cljs.core.get.call(null,map__50650__$1,new cljs.core.Keyword(null,"type","type",1174270348));
var text = cljs.core.get.call(null,map__50650__$1,new cljs.core.Keyword(null,"text","text",-1790561697));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tr","tr",-1424774646),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td","td",1479933353),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"top"], null)], null),(function (){var pred__50652 = cljs.core._EQ_;
var expr__50653 = type;
if(cljs.core.truth_(pred__50652.call(null,new cljs.core.Keyword(null,"warning","warning",-1685650671),expr__50653))){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"img","img",1442687358),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(24)),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"middle",new cljs.core.Keyword(null,"margin-top","margin-top",392161226),weathergen.ui.common.px.call(null,(-5))], null),new cljs.core.Keyword(null,"src","src",-1651076051),"images/warning.svg"], null)], null);
} else {
if(cljs.core.truth_(pred__50652.call(null,new cljs.core.Keyword(null,"error","error",-978969032),expr__50653))){
return hoplon.app_pages._index_DOT_html.inline.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"color","color",1011675173),"red",new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(24))], null)], null),"\u2717");
} else {
throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("No matching clause: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(expr__50653)].join('')));
}
}
})()], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td","td",1479933353),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1057191632),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),((cljs.core._EQ_.call(null,type,new cljs.core.Keyword(null,"error","error",-978969032)))?new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"pre",new cljs.core.Keyword(null,"font-family","font-family",-667419874),"monospace",new cljs.core.Keyword(null,"margin-top","margin-top",392161226),weathergen.ui.common.px.call(null,(7))], null):new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"normal"], null))], null),text], null)], null)], null);
})());

var G__50660 = (i__50638 + (1));
i__50638 = G__50660;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__50639),hoplon$app_pages$_index_DOT_html$tree_item_$_iter__50636.call(null,cljs.core.chunk_rest.call(null,s__50637__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__50639),null);
}
} else {
var message = cljs.core.first.call(null,s__50637__$2);
return cljs.core.cons.call(null,(function (){var map__50655 = message;
var map__50655__$1 = ((((!((map__50655 == null)))?((((map__50655.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50655.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50655):map__50655);
var type = cljs.core.get.call(null,map__50655__$1,new cljs.core.Keyword(null,"type","type",1174270348));
var text = cljs.core.get.call(null,map__50655__$1,new cljs.core.Keyword(null,"text","text",-1790561697));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tr","tr",-1424774646),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td","td",1479933353),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"top"], null)], null),(function (){var pred__50657 = cljs.core._EQ_;
var expr__50658 = type;
if(cljs.core.truth_(pred__50657.call(null,new cljs.core.Keyword(null,"warning","warning",-1685650671),expr__50658))){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"img","img",1442687358),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(24)),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"middle",new cljs.core.Keyword(null,"margin-top","margin-top",392161226),weathergen.ui.common.px.call(null,(-5))], null),new cljs.core.Keyword(null,"src","src",-1651076051),"images/warning.svg"], null)], null);
} else {
if(cljs.core.truth_(pred__50657.call(null,new cljs.core.Keyword(null,"error","error",-978969032),expr__50658))){
return hoplon.app_pages._index_DOT_html.inline.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),"bold",new cljs.core.Keyword(null,"color","color",1011675173),"red",new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(24))], null)], null),"\u2717");
} else {
throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("No matching clause: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(expr__50658)].join('')));
}
}
})()], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td","td",1479933353),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1057191632),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",-496642736),((cljs.core._EQ_.call(null,type,new cljs.core.Keyword(null,"error","error",-978969032)))?new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"pre",new cljs.core.Keyword(null,"font-family","font-family",-667419874),"monospace",new cljs.core.Keyword(null,"margin-top","margin-top",392161226),weathergen.ui.common.px.call(null,(7))], null):new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"white-space","white-space",-707351930),"normal"], null))], null),text], null)], null)], null);
})(),hoplon$app_pages$_index_DOT_html$tree_item_$_iter__50636.call(null,cljs.core.rest.call(null,s__50637__$2)));
}
} else {
return null;
}
break;
}
});})(map__50631,map__50631__$1,item,id,messages,state,name))
,null,null));
});})(map__50631,map__50631__$1,item,id,messages,state,name))
;
return iter__24200__auto__.call(null,messages);
})()], null)], null));
});
/**
 * Returns data structure describing tree at level having parent `parent`.
 */
hoplon.app_pages._index_DOT_html.tree_level = (function hoplon$app_pages$_index_DOT_html$tree_level(var_args){
var args50662 = [];
var len__24559__auto___50677 = arguments.length;
var i__24560__auto___50678 = (0);
while(true){
if((i__24560__auto___50678 < len__24559__auto___50677)){
args50662.push((arguments[i__24560__auto___50678]));

var G__50679 = (i__24560__auto___50678 + (1));
i__24560__auto___50678 = G__50679;
continue;
} else {
}
break;
}

var G__50664 = args50662.length;
switch (G__50664) {
case 2:
return hoplon.app_pages._index_DOT_html.tree_level.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
case 3:
return hoplon.app_pages._index_DOT_html.tree_level.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));

break;
default:
throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args50662.length)].join('')));

}
});

hoplon.app_pages._index_DOT_html.tree_level.cljs$core$IFn$_invoke$arity$2 = (function (items,collapsed){
return hoplon.app_pages._index_DOT_html.tree_level.call(null,items,collapsed,null);
});

hoplon.app_pages._index_DOT_html.tree_level.cljs$core$IFn$_invoke$arity$3 = (function (items,collapsed,parent){
var iter__24200__auto__ = (function hoplon$app_pages$_index_DOT_html$iter__50665(s__50666){
return (new cljs.core.LazySeq(null,(function (){
var s__50666__$1 = s__50666;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__50666__$1);
if(temp__5278__auto__){
var s__50666__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__50666__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__50666__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__50668 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__50667 = (0);
while(true){
if((i__50667 < size__24199__auto__)){
var item = cljs.core._nth.call(null,c__24198__auto__,i__50667);
var map__50673 = item;
var map__50673__$1 = ((((!((map__50673 == null)))?((((map__50673.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50673.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50673):map__50673);
var id = cljs.core.get.call(null,map__50673__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"parent","parent",-878878779).cljs$core$IFn$_invoke$arity$1(item),parent)){
cljs.core.chunk_append.call(null,b__50668,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"ui","ui",-469653645),hoplon.app_pages._index_DOT_html.tree_item.call(null,item),new cljs.core.Keyword(null,"id","id",-1388402092),id,new cljs.core.Keyword(null,"expanded?","expanded?",2055832296),cljs.core.not.call(null,cljs.core.get.call(null,collapsed,id)),new cljs.core.Keyword(null,"children","children",-940561982),(function (){var temp__5278__auto____$1 = cljs.core.seq.call(null,cljs.core.filter.call(null,((function (i__50667,s__50666__$1,map__50673,map__50673__$1,id,item,c__24198__auto__,size__24199__auto__,b__50668,s__50666__$2,temp__5278__auto__){
return (function (p1__50661_SHARP_){
return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"parent","parent",-878878779).cljs$core$IFn$_invoke$arity$1(p1__50661_SHARP_),id);
});})(i__50667,s__50666__$1,map__50673,map__50673__$1,id,item,c__24198__auto__,size__24199__auto__,b__50668,s__50666__$2,temp__5278__auto__))
,items));
if(temp__5278__auto____$1){
var kids = temp__5278__auto____$1;
return hoplon.app_pages._index_DOT_html.tree_level.call(null,items,collapsed,id);
} else {
return null;
}
})()], null));

var G__50681 = (i__50667 + (1));
i__50667 = G__50681;
continue;
} else {
var G__50682 = (i__50667 + (1));
i__50667 = G__50682;
continue;
}
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__50668),hoplon$app_pages$_index_DOT_html$iter__50665.call(null,cljs.core.chunk_rest.call(null,s__50666__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__50668),null);
}
} else {
var item = cljs.core.first.call(null,s__50666__$2);
var map__50675 = item;
var map__50675__$1 = ((((!((map__50675 == null)))?((((map__50675.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50675.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50675):map__50675);
var id = cljs.core.get.call(null,map__50675__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"parent","parent",-878878779).cljs$core$IFn$_invoke$arity$1(item),parent)){
return cljs.core.cons.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"ui","ui",-469653645),hoplon.app_pages._index_DOT_html.tree_item.call(null,item),new cljs.core.Keyword(null,"id","id",-1388402092),id,new cljs.core.Keyword(null,"expanded?","expanded?",2055832296),cljs.core.not.call(null,cljs.core.get.call(null,collapsed,id)),new cljs.core.Keyword(null,"children","children",-940561982),(function (){var temp__5278__auto____$1 = cljs.core.seq.call(null,cljs.core.filter.call(null,((function (s__50666__$1,map__50675,map__50675__$1,id,item,s__50666__$2,temp__5278__auto__){
return (function (p1__50661_SHARP_){
return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"parent","parent",-878878779).cljs$core$IFn$_invoke$arity$1(p1__50661_SHARP_),id);
});})(s__50666__$1,map__50675,map__50675__$1,id,item,s__50666__$2,temp__5278__auto__))
,items));
if(temp__5278__auto____$1){
var kids = temp__5278__auto____$1;
return hoplon.app_pages._index_DOT_html.tree_level.call(null,items,collapsed,id);
} else {
return null;
}
})()], null),hoplon$app_pages$_index_DOT_html$iter__50665.call(null,cljs.core.rest.call(null,s__50666__$2)));
} else {
var G__50683 = cljs.core.rest.call(null,s__50666__$2);
s__50666__$1 = G__50683;
continue;
}
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__24200__auto__.call(null,items);
});

hoplon.app_pages._index_DOT_html.tree_level.cljs$lang$maxFixedArity = 3;

hoplon.core.html.call(null,weathergen.ui.head.call(null),hoplon.core.body.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin","margin",-995903681),"0"], null),hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"display","display",242065432),"flex",new cljs.core.Keyword(null,"flex-direction","flex-direction",364609438),"column",new cljs.core.Keyword(null,"height","height",1025178622),"100vh"], null),hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"padding","padding",1660304693),"8px 8px 0"], null),weathergen.ui.titlebar.call(null)),(function (){var button_style = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"display","display",242065432),"inline-block",new cljs.core.Keyword(null,"margin","margin",-995903681),weathergen.ui.common.px.call(null,(5),(10))], null);
return hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"font-size","font-size",-1847940346),weathergen.ui.common.pct.call(null,(150))], null),weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"disabled?","disabled?",-1523234181),hoplon.app_pages._index_DOT_html.loading_QMARK_,new cljs.core.Keyword(null,"css","css",1135045163),button_style,new cljs.core.Keyword(null,"click","click",1912301393),hoplon.app_pages._index_DOT_html.load_mission,"Load mission (.cam/.tac)"),weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"disabled?","disabled?",-1523234181),hoplon.app_pages._index_DOT_html.loading_QMARK_,new cljs.core.Keyword(null,"css","css",1135045163),button_style,new cljs.core.Keyword(null,"click","click",1912301393),hoplon.app_pages._index_DOT_html.load_briefing,"Load briefing (.vmtb)"));
})(),(function (){var elem = hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null,"overflow-y","overflow-y",-1436589285),"auto",new cljs.core.Keyword(null,"overflow-x","overflow-x",-26547754),"auto",new cljs.core.Keyword(null,"flex","flex",-1425124628),(1),new cljs.core.Keyword(null,"font-size","font-size",-1847940346),weathergen.ui.common.pct.call(null,(150)),new cljs.core.Keyword(null,"border","border",1444987323),"solid 1px black",new cljs.core.Keyword(null,"margin","margin",-995903681),weathergen.ui.common.px.call(null,(0),(10),(20),(10)),new cljs.core.Keyword(null,"padding","padding",1660304693),weathergen.ui.common.px.call(null,(4),(24),(4),(4))], null),weathergen.ui.common.styled.call(null,new cljs.core.Keyword(null,"garden","garden",-1966516149),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ol","ol",932524051),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"margin-top","margin-top",392161226),(0)], null)], null),(function (){var collapsed = javelin.core.cell.call(null,cljs.core.PersistentArrayMap.EMPTY);
var load_status_tree = javelin.core.formula.call(null,((function (collapsed){
return (function (load_status,collapsed__$1){
return hoplon.app_pages._index_DOT_html.tree_level.call(null,load_status,collapsed__$1);
});})(collapsed))
).call(null,hoplon.app_pages._index_DOT_html.load_status,collapsed);
return weathergen.ui.trees.rtree.call(null,load_status_tree,((function (collapsed,load_status_tree){
return (function (id){
return cljs.core.swap_BANG_.call(null,collapsed,cljs.core.update,id,cljs.core.not);
});})(collapsed,load_status_tree))
);
})()));
cljs.core.add_watch.call(null,hoplon.app_pages._index_DOT_html.load_status,new cljs.core.Keyword("hoplon.app-pages._index_DOT_html","scroll-notifications","hoplon.app-pages._index_DOT_html/scroll-notifications",-475071792),((function (elem){
return (function (_,___$1,___$2,___$3){
return setTimeout(((function (elem){
return (function (){
return elem.scrollTop = elem.scrollHeight;
});})(elem))
,(0));
});})(elem))
);

return elem;
})())));
