// Compiled by ClojureScript 1.9.562 {}
goog.provide('weathergen.ui.grids');
goog.require('cljs.core');
goog.require('garden.core');
goog.require('garden.selectors');
goog.require('hoplon.svg');
goog.require('taoensso.timbre');
goog.require('weathergen.help');
goog.require('weathergen.ui.buttons');
goog.require('weathergen.ui.common');
goog.require('javelin.core');
goog.require('hoplon.jquery');
goog.require('hoplon.core');
/**
 * Creates a master-detail grid view. TODO: explain options.
 * @param {...*} var_args
 */
weathergen.ui.grids.master_detail = (function() { 
var weathergen$ui$grids$master_detail__delegate = function (args__29571__auto__){
var vec__36882 = hoplon.core.parse_args.call(null,args__29571__auto__);
var attrs = cljs.core.nth.call(null,vec__36882,(0),null);
var _ = cljs.core.nth.call(null,vec__36882,(1),null);
var map__36885 = attrs;
var map__36885__$1 = ((((!((map__36885 == null)))?((((map__36885.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36885.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36885):map__36885);
var data = cljs.core.get.call(null,map__36885__$1,new cljs.core.Keyword(null,"data","data",-232669377));
var detail = cljs.core.get.call(null,map__36885__$1,new cljs.core.Keyword(null,"detail","detail",-1545345025));
var columns = cljs.core.get.call(null,map__36885__$1,new cljs.core.Keyword(null,"columns","columns",1998437288));
var formatter = cljs.core.get.call(null,map__36885__$1,new cljs.core.Keyword(null,"formatter","formatter",-483008823));
var options = cljs.core.get.call(null,map__36885__$1,new cljs.core.Keyword(null,"options","options",99638489));
return hoplon.core.div.call(null,cljs.core.dissoc.call(null,attrs,new cljs.core.Keyword(null,"data","data",-232669377),new cljs.core.Keyword(null,"detail","detail",-1545345025),new cljs.core.Keyword(null,"columns","columns",1998437288),new cljs.core.Keyword(null,"formatter","formatter",-483008823),new cljs.core.Keyword(null,"options","options",99638489)),(function (){var data_STAR_ = javelin.core.formula.call(null,((function (map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (G__36887){
return G__36887;
});})(map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
).call(null,data);
var columns_STAR_ = javelin.core.formula.call(null,((function (data_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (G__36888){
return G__36888;
});})(data_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
).call(null,columns);
var options_STAR_ = javelin.core.formula.call(null,((function (data_STAR_,columns_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (G__36889){
return G__36889;
});})(data_STAR_,columns_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
).call(null,options);
var td_STAR_ = ((function (data_STAR_,columns_STAR_,options_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function() { 
var G__36978__delegate = function (args){
return cljs.core.apply.call(null,hoplon.core.td,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"border","border",1444987323),"solid 1px #eee",new cljs.core.Keyword(null,"padding","padding",1660304693),"0 2px 0 2px"], null),args);
};
var G__36978 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__36979__i = 0, G__36979__a = new Array(arguments.length -  0);
while (G__36979__i < G__36979__a.length) {G__36979__a[G__36979__i] = arguments[G__36979__i + 0]; ++G__36979__i;}
  args = new cljs.core.IndexedSeq(G__36979__a,0,null);
} 
return G__36978__delegate.call(this,args);};
G__36978.cljs$lang$maxFixedArity = 0;
G__36978.cljs$lang$applyTo = (function (arglist__36980){
var args = cljs.core.seq(arglist__36980);
return G__36978__delegate(args);
});
G__36978.cljs$core$IFn$_invoke$arity$variadic = G__36978__delegate;
return G__36978;
})()
;})(data_STAR_,columns_STAR_,options_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return hoplon.core.table.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"background","background",-863952629),"white",new cljs.core.Keyword(null,"border-collapse","border-collapse",919100239),"collapse",new cljs.core.Keyword(null,"outline","outline",793464534),"solid 1px #ccc"], null),hoplon.core.thead.call(null,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(to bottom, white, white 33%, #eee 66%)"], null),javelin.core.formula.call(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (columns_STAR___$1){
var iter__24010__auto__ = ((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__36890(s__36891){
return (new cljs.core.LazySeq(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
var s__36891__$1 = s__36891;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__36891__$1);
if(temp__5278__auto__){
var s__36891__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36891__$2)){
var c__24008__auto__ = cljs.core.chunk_first.call(null,s__36891__$2);
var size__24009__auto__ = cljs.core.count.call(null,c__24008__auto__);
var b__36893 = cljs.core.chunk_buffer.call(null,size__24009__auto__);
if((function (){var i__36892 = (0);
while(true){
if((i__36892 < size__24009__auto__)){
var column = cljs.core._nth.call(null,c__24008__auto__,i__36892);
cljs.core.chunk_append.call(null,b__36893,hoplon.core.td.call(null,new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(column)));

var G__36981 = (i__36892 + (1));
i__36892 = G__36981;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36893),weathergen$ui$grids$master_detail_$_iter__36890.call(null,cljs.core.chunk_rest.call(null,s__36891__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36893),null);
}
} else {
var column = cljs.core.first.call(null,s__36891__$2);
return cljs.core.cons.call(null,hoplon.core.td.call(null,new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(column)),weathergen$ui$grids$master_detail_$_iter__36890.call(null,cljs.core.rest.call(null,s__36891__$2)));
}
} else {
return null;
}
break;
}
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null,null));
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return iter__24010__auto__.call(null,columns_STAR___$1);
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
).call(null,columns_STAR_))),javelin.core.formula.call(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (data_STAR___$1,columns_STAR___$1){
var iter__24010__auto__ = ((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__36894(s__36895){
return (new cljs.core.LazySeq(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
var s__36895__$1 = s__36895;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__36895__$1);
if(temp__5278__auto__){
var s__36895__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36895__$2)){
var c__24008__auto__ = cljs.core.chunk_first.call(null,s__36895__$2);
var size__24009__auto__ = cljs.core.count.call(null,c__24008__auto__);
var b__36897 = cljs.core.chunk_buffer.call(null,size__24009__auto__);
if((function (){var i__36896 = (0);
while(true){
if((i__36896 < size__24009__auto__)){
var item = cljs.core._nth.call(null,c__24008__auto__,i__36896);
cljs.core.chunk_append.call(null,b__36897,(function (){var expanded_QMARK_ = javelin.core.cell.call(null,true);
var subitems = detail.call(null,item);
var spacer_width = "12px";
var spacer_margin = "3px";
var spacing = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"width","width",-384071477),spacer_width,new cljs.core.Keyword(null,"margin-right","margin-right",809689658),spacer_margin,new cljs.core.Keyword(null,"display","display",242065432),"inline-block"], null);
var spacer = ((function (i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
return hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),spacing);
});})(i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [hoplon.core.tbody.call(null,hoplon.core.tr.call(null,td_STAR_.call(null,new cljs.core.Keyword(null,"colspan","colspan",-1512420934),cljs.core.count.call(null,columns_STAR___$1),(((cljs.core.count.call(null,subitems) === (0)))?spacer.call(null):hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"text-anchor","text-anchor",585613696),new cljs.core.Keyword(null,"line-height","line-height",1870784992),new cljs.core.Keyword(null,"text-align","text-align",1786091845),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),new cljs.core.Keyword(null,"font-size","font-size",-1847940346),new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"border-width","border-width",-1512605390),new cljs.core.Keyword(null,"border-color","border-color",-2059162761),new cljs.core.Keyword(null,"display","display",242065432),new cljs.core.Keyword(null,"margin-right","margin-right",809689658),new cljs.core.Keyword(null,"border-radius","border-radius",419594011),new cljs.core.Keyword(null,"height","height",1025178622)],["solid","6px","12px","center","middle","120%","bold",spacer_width,"1px","black","inline-block",spacer_margin,"50%","12px"]),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
return cljs.core.swap_BANG_.call(null,expanded_QMARK_,cljs.core.not);
});})(i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
return "-";
});})(i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (i__36896,con__29625__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
return "+";
});})(i__36896,con__29625__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null));
var tpl__29627__auto__ = ((function (i__36896,con__29625__auto__,alt__29626__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__36896,con__29625__auto__,alt__29626__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,expanded_QMARK_);
})())),formatter.call(null,item)))),hoplon.core.tbody.call(null,(function (){var iter__24010__auto__ = ((function (i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938(s__36939){
return (new cljs.core.LazySeq(null,((function (i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
var s__36939__$1 = s__36939;
while(true){
var temp__5278__auto____$1 = cljs.core.seq.call(null,s__36939__$1);
if(temp__5278__auto____$1){
var s__36939__$2 = temp__5278__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36939__$2)){
var c__24008__auto____$1 = cljs.core.chunk_first.call(null,s__36939__$2);
var size__24009__auto____$1 = cljs.core.count.call(null,c__24008__auto____$1);
var b__36941 = cljs.core.chunk_buffer.call(null,size__24009__auto____$1);
if((function (){var i__36940 = (0);
while(true){
if((i__36940 < size__24009__auto____$1)){
var subitem = cljs.core._nth.call(null,c__24008__auto____$1,i__36940);
cljs.core.chunk_append.call(null,b__36941,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"fade-toggle","fade-toggle",-1468421852),expanded_QMARK_,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,columns_STAR___$1));
return td_STAR_.call(null,spacer.call(null),spacer.call(null),formatter__$1.call(null,subitem));
})(),(function (){var iter__24010__auto__ = ((function (i__36940,i__36896,subitem,c__24008__auto____$1,size__24009__auto____$1,b__36941,s__36939__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938_$_iter__36950(s__36951){
return (new cljs.core.LazySeq(null,((function (i__36940,i__36896,subitem,c__24008__auto____$1,size__24009__auto____$1,b__36941,s__36939__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
var s__36951__$1 = s__36951;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__36951__$1);
if(temp__5278__auto____$2){
var s__36951__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36951__$2)){
var c__24008__auto____$2 = cljs.core.chunk_first.call(null,s__36951__$2);
var size__24009__auto____$2 = cljs.core.count.call(null,c__24008__auto____$2);
var b__36953 = cljs.core.chunk_buffer.call(null,size__24009__auto____$2);
if((function (){var i__36952 = (0);
while(true){
if((i__36952 < size__24009__auto____$2)){
var column = cljs.core._nth.call(null,c__24008__auto____$2,i__36952);
cljs.core.chunk_append.call(null,b__36953,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()));

var G__36982 = (i__36952 + (1));
i__36952 = G__36982;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36953),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938_$_iter__36950.call(null,cljs.core.chunk_rest.call(null,s__36951__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36953),null);
}
} else {
var column = cljs.core.first.call(null,s__36951__$2);
return cljs.core.cons.call(null,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938_$_iter__36950.call(null,cljs.core.rest.call(null,s__36951__$2)));
}
} else {
return null;
}
break;
}
});})(i__36940,i__36896,subitem,c__24008__auto____$1,size__24009__auto____$1,b__36941,s__36939__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null,null));
});})(i__36940,i__36896,subitem,c__24008__auto____$1,size__24009__auto____$1,b__36941,s__36939__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return iter__24010__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()));

var G__36983 = (i__36940 + (1));
i__36940 = G__36983;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36941),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938.call(null,cljs.core.chunk_rest.call(null,s__36939__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36941),null);
}
} else {
var subitem = cljs.core.first.call(null,s__36939__$2);
return cljs.core.cons.call(null,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"fade-toggle","fade-toggle",-1468421852),expanded_QMARK_,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,columns_STAR___$1));
return td_STAR_.call(null,spacer.call(null),spacer.call(null),formatter__$1.call(null,subitem));
})(),(function (){var iter__24010__auto__ = ((function (i__36896,subitem,s__36939__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938_$_iter__36954(s__36955){
return (new cljs.core.LazySeq(null,((function (i__36896,subitem,s__36939__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
var s__36955__$1 = s__36955;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__36955__$1);
if(temp__5278__auto____$2){
var s__36955__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36955__$2)){
var c__24008__auto____$1 = cljs.core.chunk_first.call(null,s__36955__$2);
var size__24009__auto____$1 = cljs.core.count.call(null,c__24008__auto____$1);
var b__36957 = cljs.core.chunk_buffer.call(null,size__24009__auto____$1);
if((function (){var i__36956 = (0);
while(true){
if((i__36956 < size__24009__auto____$1)){
var column = cljs.core._nth.call(null,c__24008__auto____$1,i__36956);
cljs.core.chunk_append.call(null,b__36957,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()));

var G__36984 = (i__36956 + (1));
i__36956 = G__36984;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36957),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938_$_iter__36954.call(null,cljs.core.chunk_rest.call(null,s__36955__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36957),null);
}
} else {
var column = cljs.core.first.call(null,s__36955__$2);
return cljs.core.cons.call(null,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938_$_iter__36954.call(null,cljs.core.rest.call(null,s__36955__$2)));
}
} else {
return null;
}
break;
}
});})(i__36896,subitem,s__36939__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null,null));
});})(i__36896,subitem,s__36939__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return iter__24010__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36938.call(null,cljs.core.rest.call(null,s__36939__$2)));
}
} else {
return null;
}
break;
}
});})(i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null,null));
});})(i__36896,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24008__auto__,size__24009__auto__,b__36897,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return iter__24010__auto__.call(null,subitems);
})())], null);
})());

var G__36985 = (i__36896 + (1));
i__36896 = G__36985;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36897),weathergen$ui$grids$master_detail_$_iter__36894.call(null,cljs.core.chunk_rest.call(null,s__36895__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36897),null);
}
} else {
var item = cljs.core.first.call(null,s__36895__$2);
return cljs.core.cons.call(null,(function (){var expanded_QMARK_ = javelin.core.cell.call(null,true);
var subitems = detail.call(null,item);
var spacer_width = "12px";
var spacer_margin = "3px";
var spacing = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"width","width",-384071477),spacer_width,new cljs.core.Keyword(null,"margin-right","margin-right",809689658),spacer_margin,new cljs.core.Keyword(null,"display","display",242065432),"inline-block"], null);
var spacer = ((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
return hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),spacing);
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [hoplon.core.tbody.call(null,hoplon.core.tr.call(null,td_STAR_.call(null,new cljs.core.Keyword(null,"colspan","colspan",-1512420934),cljs.core.count.call(null,columns_STAR___$1),(((cljs.core.count.call(null,subitems) === (0)))?spacer.call(null):hoplon.core.div.call(null,new cljs.core.Keyword(null,"css","css",1135045163),cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"text-anchor","text-anchor",585613696),new cljs.core.Keyword(null,"line-height","line-height",1870784992),new cljs.core.Keyword(null,"text-align","text-align",1786091845),new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),new cljs.core.Keyword(null,"font-size","font-size",-1847940346),new cljs.core.Keyword(null,"font-weight","font-weight",2085804583),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"border-width","border-width",-1512605390),new cljs.core.Keyword(null,"border-color","border-color",-2059162761),new cljs.core.Keyword(null,"display","display",242065432),new cljs.core.Keyword(null,"margin-right","margin-right",809689658),new cljs.core.Keyword(null,"border-radius","border-radius",419594011),new cljs.core.Keyword(null,"height","height",1025178622)],["solid","6px","12px","center","middle","120%","bold",spacer_width,"1px","black","inline-block",spacer_margin,"50%","12px"]),new cljs.core.Keyword(null,"click","click",1912301393),((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
return cljs.core.swap_BANG_.call(null,expanded_QMARK_,cljs.core.not);
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
return "-";
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (con__29625__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
return "+";
});})(con__29625__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null));
var tpl__29627__auto__ = ((function (con__29625__auto__,alt__29626__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29625__auto__,alt__29626__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,expanded_QMARK_);
})())),formatter.call(null,item)))),hoplon.core.tbody.call(null,(function (){var iter__24010__auto__ = ((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958(s__36959){
return (new cljs.core.LazySeq(null,((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
var s__36959__$1 = s__36959;
while(true){
var temp__5278__auto____$1 = cljs.core.seq.call(null,s__36959__$1);
if(temp__5278__auto____$1){
var s__36959__$2 = temp__5278__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36959__$2)){
var c__24008__auto__ = cljs.core.chunk_first.call(null,s__36959__$2);
var size__24009__auto__ = cljs.core.count.call(null,c__24008__auto__);
var b__36961 = cljs.core.chunk_buffer.call(null,size__24009__auto__);
if((function (){var i__36960 = (0);
while(true){
if((i__36960 < size__24009__auto__)){
var subitem = cljs.core._nth.call(null,c__24008__auto__,i__36960);
cljs.core.chunk_append.call(null,b__36961,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"fade-toggle","fade-toggle",-1468421852),expanded_QMARK_,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,columns_STAR___$1));
return td_STAR_.call(null,spacer.call(null),spacer.call(null),formatter__$1.call(null,subitem));
})(),(function (){var iter__24010__auto__ = ((function (i__36960,subitem,c__24008__auto__,size__24009__auto__,b__36961,s__36959__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958_$_iter__36970(s__36971){
return (new cljs.core.LazySeq(null,((function (i__36960,subitem,c__24008__auto__,size__24009__auto__,b__36961,s__36959__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
var s__36971__$1 = s__36971;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__36971__$1);
if(temp__5278__auto____$2){
var s__36971__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36971__$2)){
var c__24008__auto____$1 = cljs.core.chunk_first.call(null,s__36971__$2);
var size__24009__auto____$1 = cljs.core.count.call(null,c__24008__auto____$1);
var b__36973 = cljs.core.chunk_buffer.call(null,size__24009__auto____$1);
if((function (){var i__36972 = (0);
while(true){
if((i__36972 < size__24009__auto____$1)){
var column = cljs.core._nth.call(null,c__24008__auto____$1,i__36972);
cljs.core.chunk_append.call(null,b__36973,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()));

var G__36986 = (i__36972 + (1));
i__36972 = G__36986;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36973),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958_$_iter__36970.call(null,cljs.core.chunk_rest.call(null,s__36971__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36973),null);
}
} else {
var column = cljs.core.first.call(null,s__36971__$2);
return cljs.core.cons.call(null,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958_$_iter__36970.call(null,cljs.core.rest.call(null,s__36971__$2)));
}
} else {
return null;
}
break;
}
});})(i__36960,subitem,c__24008__auto__,size__24009__auto__,b__36961,s__36959__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null,null));
});})(i__36960,subitem,c__24008__auto__,size__24009__auto__,b__36961,s__36959__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return iter__24010__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()));

var G__36987 = (i__36960 + (1));
i__36960 = G__36987;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36961),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958.call(null,cljs.core.chunk_rest.call(null,s__36959__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36961),null);
}
} else {
var subitem = cljs.core.first.call(null,s__36959__$2);
return cljs.core.cons.call(null,hoplon.core.tr.call(null,new cljs.core.Keyword(null,"fade-toggle","fade-toggle",-1468421852),expanded_QMARK_,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,columns_STAR___$1));
return td_STAR_.call(null,spacer.call(null),spacer.call(null),formatter__$1.call(null,subitem));
})(),(function (){var iter__24010__auto__ = ((function (subitem,s__36959__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958_$_iter__36974(s__36975){
return (new cljs.core.LazySeq(null,((function (subitem,s__36959__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_){
return (function (){
var s__36975__$1 = s__36975;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__36975__$1);
if(temp__5278__auto____$2){
var s__36975__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36975__$2)){
var c__24008__auto__ = cljs.core.chunk_first.call(null,s__36975__$2);
var size__24009__auto__ = cljs.core.count.call(null,c__24008__auto__);
var b__36977 = cljs.core.chunk_buffer.call(null,size__24009__auto__);
if((function (){var i__36976 = (0);
while(true){
if((i__36976 < size__24009__auto__)){
var column = cljs.core._nth.call(null,c__24008__auto__,i__36976);
cljs.core.chunk_append.call(null,b__36977,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()));

var G__36988 = (i__36976 + (1));
i__36976 = G__36988;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36977),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958_$_iter__36974.call(null,cljs.core.chunk_rest.call(null,s__36975__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36977),null);
}
} else {
var column = cljs.core.first.call(null,s__36975__$2);
return cljs.core.cons.call(null,td_STAR_.call(null,(function (){var formatter__$1 = new cljs.core.Keyword(null,"formatter","formatter",-483008823).cljs$core$IFn$_invoke$arity$1(column);
return formatter__$1.call(null,subitem);
})()),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958_$_iter__36974.call(null,cljs.core.rest.call(null,s__36975__$2)));
}
} else {
return null;
}
break;
}
});})(subitem,s__36959__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null,null));
});})(subitem,s__36959__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return iter__24010__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()),weathergen$ui$grids$master_detail_$_iter__36894_$_iter__36958.call(null,cljs.core.rest.call(null,s__36959__$2)));
}
} else {
return null;
}
break;
}
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null,null));
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__36895__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return iter__24010__auto__.call(null,subitems);
})())], null);
})(),weathergen$ui$grids$master_detail_$_iter__36894.call(null,cljs.core.rest.call(null,s__36895__$2)));
}
} else {
return null;
}
break;
}
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
,null,null));
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
;
return iter__24010__auto__.call(null,data_STAR___$1);
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__36885,map__36885__$1,data,detail,columns,formatter,options,vec__36882,attrs,_))
).call(null,data_STAR_,columns_STAR_));
})());
};
var weathergen$ui$grids$master_detail = function (var_args){
var args__29571__auto__ = null;
if (arguments.length > 0) {
var G__36989__i = 0, G__36989__a = new Array(arguments.length -  0);
while (G__36989__i < G__36989__a.length) {G__36989__a[G__36989__i] = arguments[G__36989__i + 0]; ++G__36989__i;}
  args__29571__auto__ = new cljs.core.IndexedSeq(G__36989__a,0,null);
} 
return weathergen$ui$grids$master_detail__delegate.call(this,args__29571__auto__);};
weathergen$ui$grids$master_detail.cljs$lang$maxFixedArity = 0;
weathergen$ui$grids$master_detail.cljs$lang$applyTo = (function (arglist__36990){
var args__29571__auto__ = cljs.core.seq(arglist__36990);
return weathergen$ui$grids$master_detail__delegate(args__29571__auto__);
});
weathergen$ui$grids$master_detail.cljs$core$IFn$_invoke$arity$variadic = weathergen$ui$grids$master_detail__delegate;
return weathergen$ui$grids$master_detail;
})()
;
/**
 * Returns UI for the sort handles at the top of a column.
 *   `sort-state` is a tuple of column index and direction for the
 *   current sort. `column-id` is a cell the index of the column we're
 *   rendering.
 */
weathergen.ui.grids.sorters = (function weathergen$ui$grids$sorters(sort_criteria,column_id){
return weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),"sorters",hoplon.svg.svg.call(null,new cljs.core.Keyword(null,"width","width",-384071477),"20px",new cljs.core.Keyword(null,"viewBox","viewBox",-469489477),"-100 -100 200 200",weathergen.ui.common.triangle.call(null,new cljs.core.Keyword(null,"transform","transform",1381301764),"rotate(180) translate(0 -50)",new cljs.core.Keyword(null,"r","r",-471384190),(50),new cljs.core.Keyword(null,"stroke","stroke",1741823555),"black",new cljs.core.Keyword(null,"stroke-width","stroke-width",716836435),"2",new cljs.core.Keyword(null,"fill","fill",883462889),javelin.core.formula.call(null,(function (sort_criteria__$1,column_id__$1){
if(cljs.core._EQ_.call(null,sort_criteria__$1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [column_id__$1,new cljs.core.Keyword(null,"ascending","ascending",-988350486)], null))){
return "black";
} else {
return "none";
}
})).call(null,sort_criteria,column_id)),weathergen.ui.common.triangle.call(null,new cljs.core.Keyword(null,"transform","transform",1381301764),"translate(0 -50)",new cljs.core.Keyword(null,"r","r",-471384190),(50),new cljs.core.Keyword(null,"stroke","stroke",1741823555),"black",new cljs.core.Keyword(null,"stroke-width","stroke-width",716836435),"2",new cljs.core.Keyword(null,"fill","fill",883462889),javelin.core.formula.call(null,(function (sort_criteria__$1,column_id__$1){
if(cljs.core._EQ_.call(null,sort_criteria__$1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [column_id__$1,new cljs.core.Keyword(null,"descending","descending",-24766135)], null))){
return "black";
} else {
return "none";
}
})).call(null,sort_criteria,column_id))));
});
/**
 * Moves item `item` in `coll` by one position earlier or later,
 *   depending on the sign of `n`.
 * 
 *   E.g. `(reorder [:a :b :c] :b -1)` returns `[:b :a :c]`
 */
weathergen.ui.grids.nudge = (function weathergen$ui$grids$nudge(coll,item,n){
return cljs.core.mapv.call(null,cljs.core.second,cljs.core.sort_by.call(null,cljs.core.first,cljs.core.map_indexed.call(null,(function (i,v){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [((cljs.core._EQ_.call(null,v,item))?(((n > (0)))?(i + 1.5):(i - 1.5)):i),v], null);
}),coll)));
});
/**
 * Returns a table grid control. Attributes
 * 
 * :data - A cell containing a seq of maps
 * :row-attrs - A function from a cell containing a row to an Hoplon
 *           attrs map
 * :when-empty - UI to show when there are no rows in the data
 * :columns - A map from column IDs to column descriptions
 * :fixed-columns - A seq of IDs of unmovable columns
 * :movable-columns - [cell] A seq of IDs of movable columns
 * :hidden-columns - [cell] A set of IDs of hidden columns
 * 
 * Column description:
 * :title - Shows up in the header row
 * :sort-key - Function from a row value (not cell) to a sort value
 * :formatter - Function from a row cell and row number cell to UI
 * :css - Function from cell of row item and cell of row number to
 *       map of css values.
 * @param {...*} var_args
 */
weathergen.ui.grids.table_grid = (function() { 
var weathergen$ui$grids$table_grid__delegate = function (args__29571__auto__){
var vec__37083 = hoplon.core.parse_args.call(null,args__29571__auto__);
var attrs = cljs.core.nth.call(null,vec__37083,(0),null);
var _ = cljs.core.nth.call(null,vec__37083,(1),null);
weathergen.ui.common.register_styles_BANG_.call(null,new cljs.core.Keyword("weathergen.ui.grids","table-grid","weathergen.ui.grids/table-grid",-1079718067),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"table.table-grid","table.table-grid",1127379830),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"border-collapse","border-collapse",919100239),"collapse"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tr.table-grid-row","tr.table-grid-row",-1812077054),garden.selectors._AMPERSAND_.call(null,garden.selectors.nth_child.call(null,new cljs.core.Keyword(null,"even","even",-275845692))),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"#eee"], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tr.table-grid-row","tr.table-grid-row",-1812077054),garden.selectors._AMPERSAND_.call(null,garden.selectors.nth_child.call(null,new cljs.core.Keyword(null,"odd","odd",-1213409872))),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"white"], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"thead.table-grid-header","thead.table-grid-header",410909598),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td.table-grid-cell","td.table-grid-cell",717270302),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"background","background",-863952629),"#ddd",new cljs.core.Keyword(null,"border","border",1444987323),"solid 1px grey",new cljs.core.Keyword(null,"padding","padding",1660304693),"2px 4px 4px 4px",new cljs.core.Keyword(null,"white-space","white-space",-707351930),"nowrap"], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,".sorters",".sorters",2118548878),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",242065432),"inline-block"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"svg","svg",856789142),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"vertical-align","vertical-align",651007333),"bottom"], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"tbody.table-grid-body","tbody.table-grid-body",-611948556),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td.table-grid-cell","td.table-grid-cell",717270302),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"padding","padding",1660304693),"2px 3px 2px 3px",new cljs.core.Keyword(null,"border","border",1444987323),"solid 1px lightgray"], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td.table-grid-cell.hidden-column","td.table-grid-cell.hidden-column",-561691712),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",242065432),"none"], null)], null)], null));

var map__37086 = attrs;
var map__37086__$1 = ((((!((map__37086 == null)))?((((map__37086.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__37086.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__37086):map__37086);
var movable_columns = cljs.core.get.call(null,map__37086__$1,new cljs.core.Keyword(null,"movable-columns","movable-columns",-1079893862));
var data = cljs.core.get.call(null,map__37086__$1,new cljs.core.Keyword(null,"data","data",-232669377));
var hidden_columns = cljs.core.get.call(null,map__37086__$1,new cljs.core.Keyword(null,"hidden-columns","hidden-columns",-1045524800));
var row_attrs = cljs.core.get.call(null,map__37086__$1,new cljs.core.Keyword(null,"row-attrs","row-attrs",2139633863));
var columns = cljs.core.get.call(null,map__37086__$1,new cljs.core.Keyword(null,"columns","columns",1998437288));
var when_empty = cljs.core.get.call(null,map__37086__$1,new cljs.core.Keyword(null,"when-empty","when-empty",-1825107890));
var fixed_columns = cljs.core.get.call(null,map__37086__$1,new cljs.core.Keyword(null,"fixed-columns","fixed-columns",-1793374858));
var attrs__$1 = cljs.core.dissoc.call(null,attrs,new cljs.core.Keyword(null,"data","data",-232669377),new cljs.core.Keyword(null,"columns","columns",1998437288),new cljs.core.Keyword(null,"row-attrs","row-attrs",2139633863),new cljs.core.Keyword(null,"when-empty","when-empty",-1825107890),new cljs.core.Keyword(null,"fixed-columns","fixed-columns",-1793374858),new cljs.core.Keyword(null,"movable-columns","movable-columns",-1079893862),new cljs.core.Keyword(null,"hidden-columns","hidden-columns",-1045524800));
var sort_criteria = javelin.core.cell.call(null,null);
var sorted_items = javelin.core.formula.call(null,((function (sort_criteria,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (data__$1,sort_criteria__$1){
if(cljs.core.not.call(null,sort_criteria__$1)){
return data__$1;
} else {
var vec__37088 = sort_criteria__$1;
var sort_column = cljs.core.nth.call(null,vec__37088,(0),null);
var sort_direction = cljs.core.nth.call(null,vec__37088,(1),null);
var map__37091 = cljs.core.get.call(null,columns,sort_column);
var map__37091__$1 = ((((!((map__37091 == null)))?((((map__37091.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__37091.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__37091):map__37091);
var sort_key = cljs.core.get.call(null,map__37091__$1,new cljs.core.Keyword(null,"sort-key","sort-key",1285844623));
return cljs.core.sort_by.call(null,sort_key,((cljs.core._EQ_.call(null,sort_direction,new cljs.core.Keyword(null,"ascending","ascending",-988350486)))?cljs.core.compare:((function (vec__37088,sort_column,sort_direction,map__37091,map__37091__$1,sort_key,sort_criteria,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (a,b){
return (- cljs.core.compare.call(null,a,b));
});})(vec__37088,sort_column,sort_direction,map__37091,map__37091__$1,sort_key,sort_criteria,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
),data__$1);
}
});})(sort_criteria,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,data,sort_criteria);
var num_columns = cljs.core.count.call(null,columns);
var column_order = javelin.core.formula.call(null,((function (sort_criteria,sorted_items,num_columns,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (fixed_columns__$1,movable_columns__$1){
return cljs.core.into.call(null,cljs.core.vec.call(null,fixed_columns__$1),cljs.core.vec.call(null,movable_columns__$1));
});})(sort_criteria,sorted_items,num_columns,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,fixed_columns,movable_columns);
var editing_columns_QMARK_ = javelin.core.cell.call(null,false);
var classify = ((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (elem,class$){
return ((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function() { 
var G__37175__delegate = function (args){
return cljs.core.apply.call(null,elem,new cljs.core.Keyword(null,"class","class",-2030961996),class$,args);
};
var G__37175 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__37176__i = 0, G__37176__a = new Array(arguments.length -  0);
while (G__37176__i < G__37176__a.length) {G__37176__a[G__37176__i] = arguments[G__37176__i + 0]; ++G__37176__i;}
  args = new cljs.core.IndexedSeq(G__37176__a,0,null);
} 
return G__37175__delegate.call(this,args);};
G__37175.cljs$lang$maxFixedArity = 0;
G__37175.cljs$lang$applyTo = (function (arglist__37177){
var args = cljs.core.seq(arglist__37177);
return G__37175__delegate(args);
});
G__37175.cljs$core$IFn$_invoke$arity$variadic = G__37175__delegate;
return G__37175;
})()
;
;})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
var table = classify.call(null,hoplon.core.table,"table-grid");
var thead = classify.call(null,hoplon.core.thead,"table-grid-header");
var tbody = classify.call(null,hoplon.core.tbody,"table-grid-body");
var tr = classify.call(null,hoplon.core.tr,"table-grid-row");
var td = classify.call(null,hoplon.core.td,"table-grid-cell");
return table.call(null,thead.call(null,tr.call(null,td.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),"table-grid-cell",new cljs.core.Keyword(null,"colspan","colspan",-1512420934),num_columns,weathergen.ui.buttons.image_button.call(null,new cljs.core.Keyword(null,"src","src",-1651076051),"images/settings.svg",new cljs.core.Keyword(null,"width","width",-384071477),weathergen.ui.common.px.call(null,(16)),new cljs.core.Keyword(null,"title","title",636505583),"Settings",new cljs.core.Keyword(null,"latched?","latched?",2124907793),editing_columns_QMARK_,new cljs.core.Keyword(null,"click","click",1912301393),((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return cljs.core.swap_BANG_.call(null,editing_columns_QMARK_,cljs.core.not);
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
),weathergen.help.help_icon.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"table-grid","table-grid",1980411698),new cljs.core.Keyword(null,"settings","settings",1556144875)], null)))),tr.call(null,(function (){var iter__24010__auto__ = ((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function weathergen$ui$grids$table_grid_$_iter__37093(s__37094){
return (new cljs.core.LazySeq(null,((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
var s__37094__$1 = s__37094;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__37094__$1);
if(temp__5278__auto__){
var s__37094__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__37094__$2)){
var c__24008__auto__ = cljs.core.chunk_first.call(null,s__37094__$2);
var size__24009__auto__ = cljs.core.count.call(null,c__24008__auto__);
var b__37096 = cljs.core.chunk_buffer.call(null,size__24009__auto__);
if((function (){var i__37095 = (0);
while(true){
if((i__37095 < size__24009__auto__)){
var n = cljs.core._nth.call(null,c__24008__auto__,i__37095);
cljs.core.chunk_append.call(null,b__37096,(function (){var column_id = javelin.core.formula.call(null,((function (i__37095,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(i__37095,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (i__37095,column_id,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(i__37095,column_id,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,hidden_columns,column_id);
var disable_sort = javelin.core.formula.call(null,((function (i__37095,column_id,hidden_QMARK_,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_id__$1){
return new cljs.core.Keyword(null,"disable-sort","disable-sort",-579071276).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,columns,column_id__$1));
});})(i__37095,column_id,hidden_QMARK_,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_id);
return td.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (editing_columns_QMARK___$1,hidden_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"hidden-column","hidden-column",298731236),(function (){var and__23136__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23136__auto__){
return hidden_QMARK___$1;
} else {
return and__23136__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
if(cljs.core.truth_(cljs.core.deref.call(null,disable_sort))){
return null;
} else {
cljs.core.swap_BANG_.call(null,sort_criteria,((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__37123){
var vec__37124 = p__37123;
var old_index = cljs.core.nth.call(null,vec__37124,(0),null);
var direction = cljs.core.nth.call(null,vec__37124,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.deref.call(null,column_id),((cljs.core.not_EQ_.call(null,old_index,cljs.core.deref.call(null,column_id)))?new cljs.core.Keyword(null,"ascending","ascending",-988350486):((cljs.core._EQ_.call(null,direction,new cljs.core.Keyword(null,"ascending","ascending",-988350486)))?new cljs.core.Keyword(null,"descending","descending",-24766135):new cljs.core.Keyword(null,"ascending","ascending",-988350486)
))], null);
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
);

return true;
}
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"title","title",636505583),"Move column left",new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(white, white 50%, rgb(195, 194, 194) 100%)"], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
cljs.core.swap_BANG_.call(null,movable_columns,weathergen.ui.grids.nudge,cljs.core.deref.call(null,column_id),(-1));

return false;
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,"<");
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return null;
});})(i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,javelin.core.formula.call(null,((function (i__37095,con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (G__37130,G__37129,G__37127,G__37128){
var and__23136__auto__ = (G__37127.call(null,G__37128) < G__37129);
if(cljs.core.truth_(and__23136__auto__)){
return G__37130;
} else {
return and__23136__auto__;
}
});})(i__37095,con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,editing_columns_QMARK_,n,cljs.core.count,fixed_columns));
})(),(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (hidden_QMARK___$1){
return cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"line-height","line-height",1870784992),new cljs.core.Keyword(null,"color","color",1011675173),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"background","background",-863952629),new cljs.core.Keyword(null,"cursor","cursor",1011937484),new cljs.core.Keyword(null,"border-width","border-width",-1512605390),new cljs.core.Keyword(null,"padding","padding",1660304693),new cljs.core.Keyword(null,"border-radius","border-radius",419594011)],["inset","90%",(cljs.core.truth_(hidden_QMARK___$1)?"red":"green"),weathergen.ui.common.px.call(null,(10)),"white","pointer",weathergen.ui.common.px.call(null,(2)),weathergen.ui.common.px.call(null,(1)),weathergen.ui.common.px.call(null,(3))]);
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (___$1){
cljs.core.swap_BANG_.call(null,hidden_columns,(cljs.core.truth_(cljs.core.deref.call(null,hidden_QMARK_))?cljs.core.disj:cljs.core.conj),cljs.core.deref.call(null,column_id));

return false;
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return "\u2717";
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return "\u2713";
});})(i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,hidden_QMARK_);
})());
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return null;
});})(i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,editing_columns_QMARK_);
})(),javelin.core.formula.call(null,((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_id__$1){
return new cljs.core.Keyword(null,"title","title",636505583).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,columns,column_id__$1));
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_id),(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return cljs.core.PersistentVector.EMPTY;
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return weathergen.ui.grids.sorters.call(null,sort_criteria,column_id);
});})(i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,disable_sort);
})(),(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"title","title",636505583),"Move column right",new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(white, white 50%, rgb(195, 194, 194) 100%)"], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
cljs.core.swap_BANG_.call(null,movable_columns,weathergen.ui.grids.nudge,cljs.core.deref.call(null,column_id),(1));

return false;
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,">");
});})(i__37095,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return null;
});})(i__37095,con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__37095,con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,javelin.core.formula.call(null,((function (i__37095,con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (G__37135,G__37134,G__37133,G__37131,G__37132){
var and__23136__auto__ = (G__37131.call(null,G__37132) <= G__37133);
if(cljs.core.truth_(and__23136__auto__)){
var and__23136__auto____$1 = (G__37133 < (G__37134 - (1)));
if(cljs.core.truth_(and__23136__auto____$1)){
return G__37135;
} else {
return and__23136__auto____$1;
}
} else {
return and__23136__auto__;
}
});})(i__37095,con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24008__auto__,size__24009__auto__,b__37096,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,editing_columns_QMARK_,num_columns,n,cljs.core.count,fixed_columns));
})());
})());

var G__37178 = (i__37095 + (1));
i__37095 = G__37178;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37096),weathergen$ui$grids$table_grid_$_iter__37093.call(null,cljs.core.chunk_rest.call(null,s__37094__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37096),null);
}
} else {
var n = cljs.core.first.call(null,s__37094__$2);
return cljs.core.cons.call(null,(function (){var column_id = javelin.core.formula.call(null,((function (n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (column_id,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(column_id,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,hidden_columns,column_id);
var disable_sort = javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_id__$1){
return new cljs.core.Keyword(null,"disable-sort","disable-sort",-579071276).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,columns,column_id__$1));
});})(column_id,hidden_QMARK_,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_id);
return td.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (editing_columns_QMARK___$1,hidden_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"hidden-column","hidden-column",298731236),(function (){var and__23136__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23136__auto__){
return hidden_QMARK___$1;
} else {
return and__23136__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
if(cljs.core.truth_(cljs.core.deref.call(null,disable_sort))){
return null;
} else {
cljs.core.swap_BANG_.call(null,sort_criteria,((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__37136){
var vec__37137 = p__37136;
var old_index = cljs.core.nth.call(null,vec__37137,(0),null);
var direction = cljs.core.nth.call(null,vec__37137,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.deref.call(null,column_id),((cljs.core.not_EQ_.call(null,old_index,cljs.core.deref.call(null,column_id)))?new cljs.core.Keyword(null,"ascending","ascending",-988350486):((cljs.core._EQ_.call(null,direction,new cljs.core.Keyword(null,"ascending","ascending",-988350486)))?new cljs.core.Keyword(null,"descending","descending",-24766135):new cljs.core.Keyword(null,"ascending","ascending",-988350486)
))], null);
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
);

return true;
}
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"title","title",636505583),"Move column left",new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(white, white 50%, rgb(195, 194, 194) 100%)"], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
cljs.core.swap_BANG_.call(null,movable_columns,weathergen.ui.grids.nudge,cljs.core.deref.call(null,column_id),(-1));

return false;
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,"<");
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return null;
});})(con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,javelin.core.formula.call(null,((function (con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (G__37143,G__37142,G__37140,G__37141){
var and__23136__auto__ = (G__37140.call(null,G__37141) < G__37142);
if(cljs.core.truth_(and__23136__auto__)){
return G__37143;
} else {
return and__23136__auto__;
}
});})(con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,editing_columns_QMARK_,n,cljs.core.count,fixed_columns));
})(),(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return weathergen.ui.common.inl.call(null,new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (hidden_QMARK___$1){
return cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"border-style","border-style",-485574304),new cljs.core.Keyword(null,"line-height","line-height",1870784992),new cljs.core.Keyword(null,"color","color",1011675173),new cljs.core.Keyword(null,"width","width",-384071477),new cljs.core.Keyword(null,"background","background",-863952629),new cljs.core.Keyword(null,"cursor","cursor",1011937484),new cljs.core.Keyword(null,"border-width","border-width",-1512605390),new cljs.core.Keyword(null,"padding","padding",1660304693),new cljs.core.Keyword(null,"border-radius","border-radius",419594011)],["inset","90%",(cljs.core.truth_(hidden_QMARK___$1)?"red":"green"),weathergen.ui.common.px.call(null,(10)),"white","pointer",weathergen.ui.common.px.call(null,(2)),weathergen.ui.common.px.call(null,(1)),weathergen.ui.common.px.call(null,(3))]);
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (___$1){
cljs.core.swap_BANG_.call(null,hidden_columns,(cljs.core.truth_(cljs.core.deref.call(null,hidden_QMARK_))?cljs.core.disj:cljs.core.conj),cljs.core.deref.call(null,column_id));

return false;
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return "\u2717";
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return "\u2713";
});})(con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,hidden_QMARK_);
})());
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return null;
});})(con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,editing_columns_QMARK_);
})(),javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_id__$1){
return new cljs.core.Keyword(null,"title","title",636505583).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,columns,column_id__$1));
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_id),(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return cljs.core.PersistentVector.EMPTY;
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return weathergen.ui.grids.sorters.call(null,sort_criteria,column_id);
});})(con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,disable_sort);
})(),(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return weathergen.ui.buttons.a_button.call(null,new cljs.core.Keyword(null,"title","title",636505583),"Move column right",new cljs.core.Keyword(null,"css","css",1135045163),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"background","background",-863952629),"linear-gradient(white, white 50%, rgb(195, 194, 194) 100%)"], null),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
cljs.core.swap_BANG_.call(null,movable_columns,weathergen.ui.grids.nudge,cljs.core.deref.call(null,column_id),(1));

return false;
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,">");
});})(column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return null;
});})(con__29625__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29625__auto__,alt__29626__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,javelin.core.formula.call(null,((function (con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (G__37148,G__37147,G__37146,G__37144,G__37145){
var and__23136__auto__ = (G__37144.call(null,G__37145) <= G__37146);
if(cljs.core.truth_(and__23136__auto__)){
var and__23136__auto____$1 = (G__37146 < (G__37147 - (1)));
if(cljs.core.truth_(and__23136__auto____$1)){
return G__37148;
} else {
return and__23136__auto____$1;
}
} else {
return and__23136__auto__;
}
});})(con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,column_id,hidden_QMARK_,disable_sort,n,s__37094__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,editing_columns_QMARK_,num_columns,n,cljs.core.count,fixed_columns));
})());
})(),weathergen$ui$grids$table_grid_$_iter__37093.call(null,cljs.core.rest.call(null,s__37094__$2)));
}
} else {
return null;
}
break;
}
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null,null));
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return iter__24010__auto__.call(null,cljs.core.range.call(null,num_columns));
})())),(function (){var con__29625__auto__ = (new cljs.core.Delay(((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return tbody.call(null,tr.call(null,td.call(null,new cljs.core.Keyword(null,"colspan","colspan",-1512420934),num_columns,when_empty)));
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var alt__29626__auto__ = (new cljs.core.Delay(((function (con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
return tbody.call(null,hoplon.core.loop_tpl_STAR_.call(null,javelin.core.formula.call(null,((function (con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (G__37149,G__37150,G__37151){
return G__37149.call(null,G__37150,G__37151);
});})(con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,cljs.core.map_indexed,cljs.core.vector,sorted_items),((function (con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (item__29615__auto__){
var vec__37152 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (indexed){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [indexed], null);
});})(con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,item__29615__auto__));
var indexed = cljs.core.nth.call(null,vec__37152,(0),null);
var vec__37161 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__37164){
var vec__37165 = p__37164;
var rownum = cljs.core.nth.call(null,vec__37165,(0),null);
var item = cljs.core.nth.call(null,vec__37165,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [rownum,item], null);
});})(vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,indexed));
var rownum = cljs.core.nth.call(null,vec__37161,(0),null);
var item = cljs.core.nth.call(null,vec__37161,(1),null);
return tr.call(null,row_attrs.call(null,item,rownum),(function (){var formatteds = cljs.core.apply.call(null,javelin.core.formula.call(null,((function (vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function() { 
var G__37179__delegate = function (formatteds){
return cljs.core.zipmap.call(null,cljs.core.map.call(null,cljs.core.key,columns),formatteds);
};
var G__37179 = function (var_args){
var formatteds = null;
if (arguments.length > 0) {
var G__37180__i = 0, G__37180__a = new Array(arguments.length -  0);
while (G__37180__i < G__37180__a.length) {G__37180__a[G__37180__i] = arguments[G__37180__i + 0]; ++G__37180__i;}
  formatteds = new cljs.core.IndexedSeq(G__37180__a,0,null);
} 
return G__37179__delegate.call(this,formatteds);};
G__37179.cljs$lang$maxFixedArity = 0;
G__37179.cljs$lang$applyTo = (function (arglist__37181){
var formatteds = cljs.core.seq(arglist__37181);
return G__37179__delegate(formatteds);
});
G__37179.cljs$core$IFn$_invoke$arity$variadic = G__37179__delegate;
return G__37179;
})()
;})(vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
),cljs.core.map.call(null,((function (vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (formatter){
return formatter.call(null,item);
});})(vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,cljs.core.map.call(null,new cljs.core.Keyword(null,"formatter","formatter",-483008823),cljs.core.vals.call(null,columns))));
var csses = cljs.core.apply.call(null,javelin.core.formula.call(null,((function (formatteds,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function() { 
var G__37182__delegate = function (csses){
return cljs.core.zipmap.call(null,cljs.core.map.call(null,cljs.core.key,columns),csses);
};
var G__37182 = function (var_args){
var csses = null;
if (arguments.length > 0) {
var G__37183__i = 0, G__37183__a = new Array(arguments.length -  0);
while (G__37183__i < G__37183__a.length) {G__37183__a[G__37183__i] = arguments[G__37183__i + 0]; ++G__37183__i;}
  csses = new cljs.core.IndexedSeq(G__37183__a,0,null);
} 
return G__37182__delegate.call(this,csses);};
G__37182.cljs$lang$maxFixedArity = 0;
G__37182.cljs$lang$applyTo = (function (arglist__37184){
var csses = cljs.core.seq(arglist__37184);
return G__37182__delegate(csses);
});
G__37182.cljs$core$IFn$_invoke$arity$variadic = G__37182__delegate;
return G__37182;
})()
;})(formatteds,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
),cljs.core.map.call(null,((function (formatteds,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (css){
if(cljs.core.truth_(css)){
return css.call(null,item,rownum);
} else {
return null;
}
});})(formatteds,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,cljs.core.map.call(null,new cljs.core.Keyword(null,"css","css",1135045163),cljs.core.vals.call(null,columns))));
var iter__24010__auto__ = ((function (formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function weathergen$ui$grids$table_grid_$_iter__37168(s__37169){
return (new cljs.core.LazySeq(null,((function (formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (){
var s__37169__$1 = s__37169;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__37169__$1);
if(temp__5278__auto__){
var s__37169__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__37169__$2)){
var c__24008__auto__ = cljs.core.chunk_first.call(null,s__37169__$2);
var size__24009__auto__ = cljs.core.count.call(null,c__24008__auto__);
var b__37171 = cljs.core.chunk_buffer.call(null,size__24009__auto__);
if((function (){var i__37170 = (0);
while(true){
if((i__37170 < size__24009__auto__)){
var n = cljs.core._nth.call(null,c__24008__auto__,i__37170);
cljs.core.chunk_append.call(null,b__37171,(function (){var column_id = javelin.core.formula.call(null,((function (i__37170,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(i__37170,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (i__37170,column_id,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(i__37170,column_id,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,hidden_columns,column_id);
var c = td.call(null);
c.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (i__37170,c,column_id,hidden_QMARK_,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (editing_columns_QMARK___$1,hidden_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"hidden-column","hidden-column",298731236),(function (){var and__23136__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23136__auto__){
return hidden_QMARK___$1;
} else {
return and__23136__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(i__37170,c,column_id,hidden_QMARK_,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (i__37170,c,column_id,hidden_QMARK_,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_id__$1,csses__$1){
var or__23148__auto___37185 = cljs.core.get.call(null,csses__$1,column_id__$1);
if(cljs.core.truth_(or__23148__auto___37185)){
} else {
c.removeAttribute("style");

}

return cljs.core.get.call(null,csses__$1,column_id__$1);
});})(i__37170,c,column_id,hidden_QMARK_,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_id,csses),javelin.core.formula.call(null,((function (i__37170,c,column_id,hidden_QMARK_,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_id__$1,formatteds__$1){
return cljs.core.get.call(null,formatteds__$1,column_id__$1);
});})(i__37170,c,column_id,hidden_QMARK_,n,c__24008__auto__,size__24009__auto__,b__37171,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_id,formatteds));

return c;
})());

var G__37186 = (i__37170 + (1));
i__37170 = G__37186;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37171),weathergen$ui$grids$table_grid_$_iter__37168.call(null,cljs.core.chunk_rest.call(null,s__37169__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37171),null);
}
} else {
var n = cljs.core.first.call(null,s__37169__$2);
return cljs.core.cons.call(null,(function (){var column_id = javelin.core.formula.call(null,((function (n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (column_id,n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(column_id,n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,hidden_columns,column_id);
var c = td.call(null);
c.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (c,column_id,hidden_QMARK_,n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (editing_columns_QMARK___$1,hidden_QMARK___$1){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"hidden-column","hidden-column",298731236),(function (){var and__23136__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23136__auto__){
return hidden_QMARK___$1;
} else {
return and__23136__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(c,column_id,hidden_QMARK_,n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (c,column_id,hidden_QMARK_,n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_id__$1,csses__$1){
var or__23148__auto___37187 = cljs.core.get.call(null,csses__$1,column_id__$1);
if(cljs.core.truth_(or__23148__auto___37187)){
} else {
c.removeAttribute("style");

}

return cljs.core.get.call(null,csses__$1,column_id__$1);
});})(c,column_id,hidden_QMARK_,n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_id,csses),javelin.core.formula.call(null,((function (c,column_id,hidden_QMARK_,n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (column_id__$1,formatteds__$1){
return cljs.core.get.call(null,formatteds__$1,column_id__$1);
});})(c,column_id,hidden_QMARK_,n,s__37169__$2,temp__5278__auto__,formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,column_id,formatteds));

return c;
})(),weathergen$ui$grids$table_grid_$_iter__37168.call(null,cljs.core.rest.call(null,s__37169__$2)));
}
} else {
return null;
}
break;
}
});})(formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null,null));
});})(formatteds,csses,vec__37161,rownum,item,vec__37152,indexed,con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return iter__24010__auto__.call(null,cljs.core.range.call(null,num_columns));
})());
});})(con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
));
});})(con__29625__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
,null));
var tpl__29627__auto__ = ((function (con__29625__auto__,alt__29626__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (p__29628__auto__){
return cljs.core.deref.call(null,(function (){var or__23148__auto__ = (cljs.core.truth_(p__29628__auto__)?con__29625__auto__:alt__29626__auto__);
if(cljs.core.truth_(or__23148__auto__)){
return or__23148__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29625__auto__,alt__29626__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
;
return javelin.core.formula.call(null,tpl__29627__auto__).call(null,javelin.core.formula.call(null,((function (con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_){
return (function (G__37174,G__37173,G__37172){
var and__23136__auto__ = (G__37172.call(null,G__37173) === (0));
if(cljs.core.truth_(and__23136__auto__)){
return G__37174;
} else {
return and__23136__auto__;
}
});})(con__29625__auto__,alt__29626__auto__,tpl__29627__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__37086,map__37086__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__37083,attrs,_))
).call(null,when_empty,sorted_items,cljs.core.count));
})());
};
var weathergen$ui$grids$table_grid = function (var_args){
var args__29571__auto__ = null;
if (arguments.length > 0) {
var G__37188__i = 0, G__37188__a = new Array(arguments.length -  0);
while (G__37188__i < G__37188__a.length) {G__37188__a[G__37188__i] = arguments[G__37188__i + 0]; ++G__37188__i;}
  args__29571__auto__ = new cljs.core.IndexedSeq(G__37188__a,0,null);
} 
return weathergen$ui$grids$table_grid__delegate.call(this,args__29571__auto__);};
weathergen$ui$grids$table_grid.cljs$lang$maxFixedArity = 0;
weathergen$ui$grids$table_grid.cljs$lang$applyTo = (function (arglist__37189){
var args__29571__auto__ = cljs.core.seq(arglist__37189);
return weathergen$ui$grids$table_grid__delegate(args__29571__auto__);
});
weathergen$ui$grids$table_grid.cljs$core$IFn$_invoke$arity$variadic = weathergen$ui$grids$table_grid__delegate;
return weathergen$ui$grids$table_grid;
})()
;
