// Compiled by ClojureScript 1.9.562 {}
goog.provide('hoplon.app_pages._mission_DOT_html');
goog.require('cljs.core');
goog.require('weathergen.ipc');
goog.require('weathergen.progress');
goog.require('weathergen.ui');
goog.require('taoensso.timbre');
goog.require('javelin.core');
goog.require('hoplon.jquery');
goog.require('hoplon.core');
cljs.core._add_method.call(null,weathergen.ipc.on_message,"open-mission",(function (_,event,installations,path){
try{var _STAR_reporter_STAR_48667_48668 = weathergen.progress._STAR_reporter_STAR_;
weathergen.progress._STAR_reporter_STAR_ = ((function (_STAR_reporter_STAR_48667_48668){
return (function (p1__48665_SHARP_){
return weathergen.ipc.send_to_main.call(null,"progress-message",p1__48665_SHARP_);
});})(_STAR_reporter_STAR_48667_48668))
;

try{taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"debug","debug",-1608172596),"hoplon.app-pages._mission_DOT_html",null,16,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay(((function (_STAR_reporter_STAR_48667_48668){
return (function (){
return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, ["open-mission",new cljs.core.Keyword(null,"installations","installations",-2091217739),installations,new cljs.core.Keyword(null,"path","path",-188191168),path], null);
});})(_STAR_reporter_STAR_48667_48668))
,null)),null,1751734985);

weathergen.ui.load_mission.call(null,installations,path);
}finally {weathergen.progress._STAR_reporter_STAR_ = _STAR_reporter_STAR_48667_48668;
}
return weathergen.ipc.send_to_main.call(null,"load-complete");
}catch (e48666){var e = e48666;
taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"error","error",-978969032),"hoplon.app-pages._mission_DOT_html",null,20,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay(((function (e){
return (function (){
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [e,"Load failed",new cljs.core.Keyword(null,"stack","stack",-793405930),e.stack], null);
});})(e))
,null)),null,561060568);

return weathergen.ipc.send_to_main.call(null,"load-failed",e.stack);
}}));
cljs.core._add_method.call(null,weathergen.ipc.on_message,"open-briefing",(function (_,event,installations,path){
try{var _STAR_reporter_STAR_48671 = weathergen.progress._STAR_reporter_STAR_;
weathergen.progress._STAR_reporter_STAR_ = ((function (_STAR_reporter_STAR_48671){
return (function (p1__48669_SHARP_){
return weathergen.ipc.send_to_main.call(null,"progress-message",p1__48669_SHARP_);
});})(_STAR_reporter_STAR_48671))
;

try{weathergen.ui.load_briefing.call(null,installations,path);

return weathergen.ipc.send_to_main.call(null,"load-complete");
}finally {weathergen.progress._STAR_reporter_STAR_ = _STAR_reporter_STAR_48671;
}}catch (e48670){var e = e48670;
taoensso.timbre._log_BANG_.call(null,taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"error","error",-978969032),"hoplon.app-pages._mission_DOT_html",null,30,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay(((function (e){
return (function (){
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [e,"Load failed",new cljs.core.Keyword(null,"stack","stack",-793405930),e.stack], null);
});})(e))
,null)),null,1576051318);

return weathergen.ipc.send_to_main.call(null,"load-failed",e.stack);
}}));
cljs.core.reset_BANG_.call(null,weathergen.ui.weather_params,weathergen.ui.default_weather_params);
if(cljs.core.truth_(weathergen.ui.safari_QMARK_)){
cljs.core.swap_BANG_.call(null,weathergen.ui.messages,cljs.core.conj,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Due to bugs related to downloading files in Safari, Safari\n  is not recommended for use with WeatherGen. To use Safari, make use\n  of the workarounds detailed below. Use of Chrome is recommended."], null));
} else {
}
if(cljs.core.truth_(weathergen.ui.ie_QMARK_)){
cljs.core.swap_BANG_.call(null,weathergen.ui.messages,cljs.core.conj,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Unfortunately, the weather design features of\n         WeatherGen (i.e. this page) do not currently work correctly\n         in Internet Explorer. Shared forecasts work fine, so forecast\n         links can be shared with pilots using IE. Use of Chrome is\n         recommended."], null));
} else {
}
weathergen.ui.weather_page.call(null,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),"Mission",new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword(null,"mission-info","mission-info",1263062521),new cljs.core.Keyword(null,"sections","sections",-886710106),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"mission-info-section","mission-info-section",1401749344),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"save-briefing-section","save-briefing-section",143974425),cljs.core.PersistentArrayMap.EMPTY], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),"Map",new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword(null,"map-controls","map-controls",-1453318552),new cljs.core.Keyword(null,"sections","sections",-886710106),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"map-controls-section","map-controls-section",684229466),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"weather-display-controls","weather-display-controls",941597221),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"title","title",636505583),"Weather Display Options"], null)], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),"Air Forces",new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword(null,"air-forces","air-forces",-1539372068),new cljs.core.Keyword(null,"sections","sections",-886710106),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"air-forces-section","air-forces-section",-222064121),cljs.core.PersistentArrayMap.EMPTY], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),"Flights",new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword(null,"flights","flights",-1637719124),new cljs.core.Keyword(null,"sections","sections",-886710106),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"flights-section","flights-section",1247077532),cljs.core.PersistentArrayMap.EMPTY], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"title","title",636505583),"Weather",new cljs.core.Keyword(null,"id","id",-1388402092),new cljs.core.Keyword(null,"weather","weather",1320452344),new cljs.core.Keyword(null,"sections","sections",-886710106),new cljs.core.PersistentVector(null, 20, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"serialization-controls","serialization-controls",-789590644),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"step-controls","step-controls",-854420677),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"weather-display-controls","weather-display-controls",941597221),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"weather-parameters","weather-parameters",-1852076459),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"forecast-section","forecast-section",-1278731643),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"forecast-link?","forecast-link?",93596965),false], null),new cljs.core.Keyword(null,"weather-type-configuration","weather-type-configuration",-358032997),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"cloud-controls","cloud-controls",817145581),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"wind-stability-parameters","wind-stability-parameters",1572956177),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"weather-override-parameters","weather-override-parameters",491414981),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"advanced-controls","advanced-controls",-278238996),cljs.core.PersistentArrayMap.EMPTY], null)], null)], null));
