// 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__50563_SHARP_){
if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"id","id",-1388402092).cljs$core$IFn$_invoke$arity$1(p1__50563_SHARP_),id)){
return f.call(null,p1__50563_SHARP_);
} else {
return p1__50563_SHARP_;
}
}),status);
});
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-step-started",(function (_,___$1,p__50564){
var map__50565 = p__50564;
var map__50565__$1 = ((((!((map__50565 == null)))?((((map__50565.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50565.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50565):map__50565);
var id = cljs.core.get.call(null,map__50565__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
var name = cljs.core.get.call(null,map__50565__$1,new cljs.core.Keyword(null,"name","name",1843675177));
var parent = cljs.core.get.call(null,map__50565__$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__50565,map__50565__$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__50565,map__50565__$1,id,name,parent))
,null)),null,-1451992677);

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__50568){
var map__50569 = p__50568;
var map__50569__$1 = ((((!((map__50569 == null)))?((((map__50569.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50569.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50569):map__50569);
var id = cljs.core.get.call(null,map__50569__$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__50569,map__50569__$1,id){
return (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["load-step-succeeded",id], null);
});})(map__50569,map__50569__$1,id))
,null)),null,-687183698);

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__50569,map__50569__$1,id){
return (function (p1__50567_SHARP_){
return cljs.core.assoc.call(null,p1__50567_SHARP_,new cljs.core.Keyword(null,"state","state",-1988618099),new cljs.core.Keyword(null,"succeeded","succeeded",-1860573089));
});})(map__50569,map__50569__$1,id))
);
} else {
return null;
}
}));
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-step-warning",(function (_,___$1,p__50572){
var map__50573 = p__50572;
var map__50573__$1 = ((((!((map__50573 == null)))?((((map__50573.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50573.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50573):map__50573);
var id = cljs.core.get.call(null,map__50573__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
var message = cljs.core.get.call(null,map__50573__$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__50573,map__50573__$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__50573,map__50573__$1,id,message))
,null)),null,205306887);

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__50573,map__50573__$1,id,message){
return (function (p1__50571_SHARP_){
return cljs.core.update.call(null,cljs.core.assoc.call(null,p1__50571_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__50573,map__50573__$1,id,message))
);
} else {
return null;
}
}));
cljs.core._add_method.call(null,weathergen.ipc.on_message,"load-step-failed",(function (_,___$1,p__50576){
var map__50577 = p__50576;
var map__50577__$1 = ((((!((map__50577 == null)))?((((map__50577.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50577.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50577):map__50577);
var id = cljs.core.get.call(null,map__50577__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
var message = cljs.core.get.call(null,map__50577__$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__50577,map__50577__$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__50577,map__50577__$1,id,message))
,null)),null,2017766136);

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__50577,map__50577__$1,id,message){
return (function (p1__50575_SHARP_){
return cljs.core.update.call(null,cljs.core.assoc.call(null,p1__50575_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__50577,map__50577__$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__50577,map__50577__$1,id,message))
);
});})(map__50577,map__50577__$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,561474846);

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__50579_SHARP_){
return cljs.core.assoc.call(null,p1__50579_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,-1240228355);

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__50580_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__50580_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__50581_SHARP_){
return cljs.core.update.call(null,cljs.core.assoc.call(null,p1__50581_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__50585 = temp__5278__auto__;
var path = cljs.core.nth.call(null,vec__50585,(0),null);
javelin.core.dosync_STAR_.call(null,((function (vec__50585,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__50585,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__50591 = temp__5278__auto__;
var path = cljs.core.nth.call(null,vec__50591,(0),null);
javelin.core.dosync_STAR_.call(null,((function (vec__50591,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__50591,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___50596 = arguments.length;
var i__24560__auto___50597 = (0);
while(true){
if((i__24560__auto___50597 < len__24559__auto___50596)){
args__24566__auto__.push((arguments[i__24560__auto___50597]));

var G__50598 = (i__24560__auto___50597 + (1));
i__24560__auto___50597 = G__50598;
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 (seq50594){
var G__50595 = cljs.core.first.call(null,seq50594);
var seq50594__$1 = cljs.core.next.call(null,seq50594);
return hoplon.app_pages._index_DOT_html.inline.cljs$core$IFn$_invoke$arity$variadic(G__50595,seq50594__$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__50599){
var map__50629 = p__50599;
var map__50629__$1 = ((((!((map__50629 == null)))?((((map__50629.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50629.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50629):map__50629);
var item = map__50629__$1;
var id = cljs.core.get.call(null,map__50629__$1,new cljs.core.Keyword(null,"id","id",-1388402092));
var messages = cljs.core.get.call(null,map__50629__$1,new cljs.core.Keyword(null,"messages","messages",345434482));
var state = cljs.core.get.call(null,map__50629__$1,new cljs.core.Keyword(null,"state","state",-1988618099));
var name = cljs.core.get.call(null,map__50629__$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__50631 = cljs.core._EQ_;
var expr__50632 = state;
if(cljs.core.truth_(pred__50631.call(null,new cljs.core.Keyword(null,"succeeded","succeeded",-1860573089),expr__50632))){
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__50631.call(null,new cljs.core.Keyword(null,"failed","failed",-1397425762),expr__50632))){
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__50631.call(null,new cljs.core.Keyword(null,"started","started",585705024),expr__50632))){
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__50631.call(null,new cljs.core.Keyword(null,"warning","warning",-1685650671),expr__50632))){
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__50632)].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__50629,map__50629__$1,item,id,messages,state,name){
return (function hoplon$app_pages$_index_DOT_html$tree_item_$_iter__50634(s__50635){
return (new cljs.core.LazySeq(null,((function (map__50629,map__50629__$1,item,id,messages,state,name){
return (function (){
var s__50635__$1 = s__50635;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__50635__$1);
if(temp__5278__auto__){
var s__50635__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__50635__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__50635__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__50637 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__50636 = (0);
while(true){
if((i__50636 < size__24199__auto__)){
var message = cljs.core._nth.call(null,c__24198__auto__,i__50636);
cljs.core.chunk_append.call(null,b__50637,(function (){var map__50648 = message;
var map__50648__$1 = ((((!((map__50648 == null)))?((((map__50648.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50648.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50648):map__50648);
var type = cljs.core.get.call(null,map__50648__$1,new cljs.core.Keyword(null,"type","type",1174270348));
var text = cljs.core.get.call(null,map__50648__$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__50650 = cljs.core._EQ_;
var expr__50651 = type;
if(cljs.core.truth_(pred__50650.call(null,new cljs.core.Keyword(null,"warning","warning",-1685650671),expr__50651))){
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__50650.call(null,new cljs.core.Keyword(null,"error","error",-978969032),expr__50651))){
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__50651)].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__50658 = (i__50636 + (1));
i__50636 = G__50658;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__50637),hoplon$app_pages$_index_DOT_html$tree_item_$_iter__50634.call(null,cljs.core.chunk_rest.call(null,s__50635__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__50637),null);
}
} else {
var message = cljs.core.first.call(null,s__50635__$2);
return cljs.core.cons.call(null,(function (){var map__50653 = message;
var map__50653__$1 = ((((!((map__50653 == null)))?((((map__50653.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50653.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50653):map__50653);
var type = cljs.core.get.call(null,map__50653__$1,new cljs.core.Keyword(null,"type","type",1174270348));
var text = cljs.core.get.call(null,map__50653__$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__50655 = cljs.core._EQ_;
var expr__50656 = type;
if(cljs.core.truth_(pred__50655.call(null,new cljs.core.Keyword(null,"warning","warning",-1685650671),expr__50656))){
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__50655.call(null,new cljs.core.Keyword(null,"error","error",-978969032),expr__50656))){
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__50656)].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__50634.call(null,cljs.core.rest.call(null,s__50635__$2)));
}
} else {
return null;
}
break;
}
});})(map__50629,map__50629__$1,item,id,messages,state,name))
,null,null));
});})(map__50629,map__50629__$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 args50660 = [];
var len__24559__auto___50675 = arguments.length;
var i__24560__auto___50676 = (0);
while(true){
if((i__24560__auto___50676 < len__24559__auto___50675)){
args50660.push((arguments[i__24560__auto___50676]));

var G__50677 = (i__24560__auto___50676 + (1));
i__24560__auto___50676 = G__50677;
continue;
} else {
}
break;
}

var G__50662 = args50660.length;
switch (G__50662) {
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(args50660.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__50663(s__50664){
return (new cljs.core.LazySeq(null,(function (){
var s__50664__$1 = s__50664;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__50664__$1);
if(temp__5278__auto__){
var s__50664__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__50664__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__50664__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__50666 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__50665 = (0);
while(true){
if((i__50665 < size__24199__auto__)){
var item = cljs.core._nth.call(null,c__24198__auto__,i__50665);
var map__50671 = item;
var map__50671__$1 = ((((!((map__50671 == null)))?((((map__50671.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__50671.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__50671):map__50671);
var id = cljs.core.get.call(null,map__50671__$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__50666,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__50665,s__50664__$1,map__50671,map__50671__$1,id,item,c__24198__auto__,size__24199__auto__,b__50666,s__50664__$2,temp__5278__auto__){
return (function (p1__50659_SHARP_){
return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"parent","parent",-878878779).cljs$core$IFn$_invoke$arity$1(p1__50659_SHARP_),id);
});})(i__50665,s__50664__$1,map__50671,map__50671__$1,id,item,c__24198__auto__,size__24199__auto__,b__50666,s__50664__$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__50679 = (i__50665 + (1));
i__50665 = G__50679;
continue;
} else {
var G__50680 = (i__50665 + (1));
i__50665 = G__50680;
continue;
}
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__50666),hoplon$app_pages$_index_DOT_html$iter__50663.call(null,cljs.core.chunk_rest.call(null,s__50664__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__50666),null);
}
} else {
var item = cljs.core.first.call(null,s__50664__$2);
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)){
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__50664__$1,map__50673,map__50673__$1,id,item,s__50664__$2,temp__5278__auto__){
return (function (p1__50659_SHARP_){
return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"parent","parent",-878878779).cljs$core$IFn$_invoke$arity$1(p1__50659_SHARP_),id);
});})(s__50664__$1,map__50673,map__50673__$1,id,item,s__50664__$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__50663.call(null,cljs.core.rest.call(null,s__50664__$2)));
} else {
var G__50681 = cljs.core.rest.call(null,s__50664__$2);
s__50664__$1 = G__50681;
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;
})())));
