// 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__29776__auto__){
var vec__38609 = hoplon.core.parse_args.call(null,args__29776__auto__);
var attrs = cljs.core.nth.call(null,vec__38609,(0),null);
var _ = cljs.core.nth.call(null,vec__38609,(1),null);
var map__38612 = attrs;
var map__38612__$1 = ((((!((map__38612 == null)))?((((map__38612.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__38612.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__38612):map__38612);
var data = cljs.core.get.call(null,map__38612__$1,new cljs.core.Keyword(null,"data","data",-232669377));
var detail = cljs.core.get.call(null,map__38612__$1,new cljs.core.Keyword(null,"detail","detail",-1545345025));
var columns = cljs.core.get.call(null,map__38612__$1,new cljs.core.Keyword(null,"columns","columns",1998437288));
var formatter = cljs.core.get.call(null,map__38612__$1,new cljs.core.Keyword(null,"formatter","formatter",-483008823));
var options = cljs.core.get.call(null,map__38612__$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__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (G__38614){
return G__38614;
});})(map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
).call(null,data);
var columns_STAR_ = javelin.core.formula.call(null,((function (data_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (G__38615){
return G__38615;
});})(data_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
).call(null,columns);
var options_STAR_ = javelin.core.formula.call(null,((function (data_STAR_,columns_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (G__38616){
return G__38616;
});})(data_STAR_,columns_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
).call(null,options);
var td_STAR_ = ((function (data_STAR_,columns_STAR_,options_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function() { 
var G__38705__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__38705 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__38706__i = 0, G__38706__a = new Array(arguments.length -  0);
while (G__38706__i < G__38706__a.length) {G__38706__a[G__38706__i] = arguments[G__38706__i + 0]; ++G__38706__i;}
  args = new cljs.core.IndexedSeq(G__38706__a,0,null);
} 
return G__38705__delegate.call(this,args);};
G__38705.cljs$lang$maxFixedArity = 0;
G__38705.cljs$lang$applyTo = (function (arglist__38707){
var args = cljs.core.seq(arglist__38707);
return G__38705__delegate(args);
});
G__38705.cljs$core$IFn$_invoke$arity$variadic = G__38705__delegate;
return G__38705;
})()
;})(data_STAR_,columns_STAR_,options_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,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__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (columns_STAR___$1){
var iter__24200__auto__ = ((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38617(s__38618){
return (new cljs.core.LazySeq(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
var s__38618__$1 = s__38618;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__38618__$1);
if(temp__5278__auto__){
var s__38618__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38618__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38618__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38620 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38619 = (0);
while(true){
if((i__38619 < size__24199__auto__)){
var column = cljs.core._nth.call(null,c__24198__auto__,i__38619);
cljs.core.chunk_append.call(null,b__38620,hoplon.core.td.call(null,new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(column)));

var G__38708 = (i__38619 + (1));
i__38619 = G__38708;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38620),weathergen$ui$grids$master_detail_$_iter__38617.call(null,cljs.core.chunk_rest.call(null,s__38618__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38620),null);
}
} else {
var column = cljs.core.first.call(null,s__38618__$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__38617.call(null,cljs.core.rest.call(null,s__38618__$2)));
}
} else {
return null;
}
break;
}
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null,null));
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return iter__24200__auto__.call(null,columns_STAR___$1);
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
).call(null,columns_STAR_))),javelin.core.formula.call(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (data_STAR___$1,columns_STAR___$1){
var iter__24200__auto__ = ((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38621(s__38622){
return (new cljs.core.LazySeq(null,((function (data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
var s__38622__$1 = s__38622;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__38622__$1);
if(temp__5278__auto__){
var s__38622__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38622__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38622__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38624 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38623 = (0);
while(true){
if((i__38623 < size__24199__auto__)){
var item = cljs.core._nth.call(null,c__24198__auto__,i__38623);
cljs.core.chunk_append.call(null,b__38624,(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__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
return hoplon.core.span.call(null,new cljs.core.Keyword(null,"css","css",1135045163),spacing);
});})(i__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,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__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
return cljs.core.swap_BANG_.call(null,expanded_QMARK_,cljs.core.not);
});})(i__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (i__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
return "-";
});})(i__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (i__38623,con__29830__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
return "+";
});})(i__38623,con__29830__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null));
var tpl__29832__auto__ = ((function (i__38623,con__29830__auto__,alt__29831__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38623,con__29830__auto__,alt__29831__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,expanded_QMARK_);
})())),formatter.call(null,item)))),hoplon.core.tbody.call(null,(function (){var iter__24200__auto__ = ((function (i__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38665(s__38666){
return (new cljs.core.LazySeq(null,((function (i__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
var s__38666__$1 = s__38666;
while(true){
var temp__5278__auto____$1 = cljs.core.seq.call(null,s__38666__$1);
if(temp__5278__auto____$1){
var s__38666__$2 = temp__5278__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38666__$2)){
var c__24198__auto____$1 = cljs.core.chunk_first.call(null,s__38666__$2);
var size__24199__auto____$1 = cljs.core.count.call(null,c__24198__auto____$1);
var b__38668 = cljs.core.chunk_buffer.call(null,size__24199__auto____$1);
if((function (){var i__38667 = (0);
while(true){
if((i__38667 < size__24199__auto____$1)){
var subitem = cljs.core._nth.call(null,c__24198__auto____$1,i__38667);
cljs.core.chunk_append.call(null,b__38668,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__24200__auto__ = ((function (i__38667,i__38623,subitem,c__24198__auto____$1,size__24199__auto____$1,b__38668,s__38666__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38665_$_iter__38677(s__38678){
return (new cljs.core.LazySeq(null,((function (i__38667,i__38623,subitem,c__24198__auto____$1,size__24199__auto____$1,b__38668,s__38666__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
var s__38678__$1 = s__38678;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__38678__$1);
if(temp__5278__auto____$2){
var s__38678__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38678__$2)){
var c__24198__auto____$2 = cljs.core.chunk_first.call(null,s__38678__$2);
var size__24199__auto____$2 = cljs.core.count.call(null,c__24198__auto____$2);
var b__38680 = cljs.core.chunk_buffer.call(null,size__24199__auto____$2);
if((function (){var i__38679 = (0);
while(true){
if((i__38679 < size__24199__auto____$2)){
var column = cljs.core._nth.call(null,c__24198__auto____$2,i__38679);
cljs.core.chunk_append.call(null,b__38680,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__38709 = (i__38679 + (1));
i__38679 = G__38709;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38680),weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38665_$_iter__38677.call(null,cljs.core.chunk_rest.call(null,s__38678__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38680),null);
}
} else {
var column = cljs.core.first.call(null,s__38678__$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__38621_$_iter__38665_$_iter__38677.call(null,cljs.core.rest.call(null,s__38678__$2)));
}
} else {
return null;
}
break;
}
});})(i__38667,i__38623,subitem,c__24198__auto____$1,size__24199__auto____$1,b__38668,s__38666__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null,null));
});})(i__38667,i__38623,subitem,c__24198__auto____$1,size__24199__auto____$1,b__38668,s__38666__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()));

var G__38710 = (i__38667 + (1));
i__38667 = G__38710;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38668),weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38665.call(null,cljs.core.chunk_rest.call(null,s__38666__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38668),null);
}
} else {
var subitem = cljs.core.first.call(null,s__38666__$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__24200__auto__ = ((function (i__38623,subitem,s__38666__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38665_$_iter__38681(s__38682){
return (new cljs.core.LazySeq(null,((function (i__38623,subitem,s__38666__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
var s__38682__$1 = s__38682;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__38682__$1);
if(temp__5278__auto____$2){
var s__38682__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38682__$2)){
var c__24198__auto____$1 = cljs.core.chunk_first.call(null,s__38682__$2);
var size__24199__auto____$1 = cljs.core.count.call(null,c__24198__auto____$1);
var b__38684 = cljs.core.chunk_buffer.call(null,size__24199__auto____$1);
if((function (){var i__38683 = (0);
while(true){
if((i__38683 < size__24199__auto____$1)){
var column = cljs.core._nth.call(null,c__24198__auto____$1,i__38683);
cljs.core.chunk_append.call(null,b__38684,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__38711 = (i__38683 + (1));
i__38683 = G__38711;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38684),weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38665_$_iter__38681.call(null,cljs.core.chunk_rest.call(null,s__38682__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38684),null);
}
} else {
var column = cljs.core.first.call(null,s__38682__$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__38621_$_iter__38665_$_iter__38681.call(null,cljs.core.rest.call(null,s__38682__$2)));
}
} else {
return null;
}
break;
}
});})(i__38623,subitem,s__38666__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null,null));
});})(i__38623,subitem,s__38666__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()),weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38665.call(null,cljs.core.rest.call(null,s__38666__$2)));
}
} else {
return null;
}
break;
}
});})(i__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null,null));
});})(i__38623,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,c__24198__auto__,size__24199__auto__,b__38624,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return iter__24200__auto__.call(null,subitems);
})())], null);
})());

var G__38712 = (i__38623 + (1));
i__38623 = G__38712;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38624),weathergen$ui$grids$master_detail_$_iter__38621.call(null,cljs.core.chunk_rest.call(null,s__38622__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38624),null);
}
} else {
var item = cljs.core.first.call(null,s__38622__$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__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,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__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,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__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,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__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
return "-";
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
return "+";
});})(con__29830__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,expanded_QMARK_);
})())),formatter.call(null,item)))),hoplon.core.tbody.call(null,(function (){var iter__24200__auto__ = ((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38685(s__38686){
return (new cljs.core.LazySeq(null,((function (expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
var s__38686__$1 = s__38686;
while(true){
var temp__5278__auto____$1 = cljs.core.seq.call(null,s__38686__$1);
if(temp__5278__auto____$1){
var s__38686__$2 = temp__5278__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38686__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38686__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38688 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38687 = (0);
while(true){
if((i__38687 < size__24199__auto__)){
var subitem = cljs.core._nth.call(null,c__24198__auto__,i__38687);
cljs.core.chunk_append.call(null,b__38688,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__24200__auto__ = ((function (i__38687,subitem,c__24198__auto__,size__24199__auto__,b__38688,s__38686__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38685_$_iter__38697(s__38698){
return (new cljs.core.LazySeq(null,((function (i__38687,subitem,c__24198__auto__,size__24199__auto__,b__38688,s__38686__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
var s__38698__$1 = s__38698;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__38698__$1);
if(temp__5278__auto____$2){
var s__38698__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38698__$2)){
var c__24198__auto____$1 = cljs.core.chunk_first.call(null,s__38698__$2);
var size__24199__auto____$1 = cljs.core.count.call(null,c__24198__auto____$1);
var b__38700 = cljs.core.chunk_buffer.call(null,size__24199__auto____$1);
if((function (){var i__38699 = (0);
while(true){
if((i__38699 < size__24199__auto____$1)){
var column = cljs.core._nth.call(null,c__24198__auto____$1,i__38699);
cljs.core.chunk_append.call(null,b__38700,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__38713 = (i__38699 + (1));
i__38699 = G__38713;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38700),weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38685_$_iter__38697.call(null,cljs.core.chunk_rest.call(null,s__38698__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38700),null);
}
} else {
var column = cljs.core.first.call(null,s__38698__$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__38621_$_iter__38685_$_iter__38697.call(null,cljs.core.rest.call(null,s__38698__$2)));
}
} else {
return null;
}
break;
}
});})(i__38687,subitem,c__24198__auto__,size__24199__auto__,b__38688,s__38686__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null,null));
});})(i__38687,subitem,c__24198__auto__,size__24199__auto__,b__38688,s__38686__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()));

var G__38714 = (i__38687 + (1));
i__38687 = G__38714;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38688),weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38685.call(null,cljs.core.chunk_rest.call(null,s__38686__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38688),null);
}
} else {
var subitem = cljs.core.first.call(null,s__38686__$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__24200__auto__ = ((function (subitem,s__38686__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38685_$_iter__38701(s__38702){
return (new cljs.core.LazySeq(null,((function (subitem,s__38686__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_){
return (function (){
var s__38702__$1 = s__38702;
while(true){
var temp__5278__auto____$2 = cljs.core.seq.call(null,s__38702__$1);
if(temp__5278__auto____$2){
var s__38702__$2 = temp__5278__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38702__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38702__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38704 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38703 = (0);
while(true){
if((i__38703 < size__24199__auto__)){
var column = cljs.core._nth.call(null,c__24198__auto__,i__38703);
cljs.core.chunk_append.call(null,b__38704,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__38715 = (i__38703 + (1));
i__38703 = G__38715;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38704),weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38685_$_iter__38701.call(null,cljs.core.chunk_rest.call(null,s__38702__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38704),null);
}
} else {
var column = cljs.core.first.call(null,s__38702__$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__38621_$_iter__38685_$_iter__38701.call(null,cljs.core.rest.call(null,s__38702__$2)));
}
} else {
return null;
}
break;
}
});})(subitem,s__38686__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null,null));
});})(subitem,s__38686__$2,temp__5278__auto____$1,expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.drop.call(null,(1),columns_STAR___$1));
})()),weathergen$ui$grids$master_detail_$_iter__38621_$_iter__38685.call(null,cljs.core.rest.call(null,s__38686__$2)));
}
} else {
return null;
}
break;
}
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null,null));
});})(expanded_QMARK_,subitems,spacer_width,spacer_margin,spacing,spacer,item,s__38622__$2,temp__5278__auto__,data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return iter__24200__auto__.call(null,subitems);
})())], null);
})(),weathergen$ui$grids$master_detail_$_iter__38621.call(null,cljs.core.rest.call(null,s__38622__$2)));
}
} else {
return null;
}
break;
}
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
,null,null));
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
;
return iter__24200__auto__.call(null,data_STAR___$1);
});})(data_STAR_,columns_STAR_,options_STAR_,td_STAR_,map__38612,map__38612__$1,data,detail,columns,formatter,options,vec__38609,attrs,_))
).call(null,data_STAR_,columns_STAR_));
})());
};
var weathergen$ui$grids$master_detail = function (var_args){
var args__29776__auto__ = null;
if (arguments.length > 0) {
var G__38716__i = 0, G__38716__a = new Array(arguments.length -  0);
while (G__38716__i < G__38716__a.length) {G__38716__a[G__38716__i] = arguments[G__38716__i + 0]; ++G__38716__i;}
  args__29776__auto__ = new cljs.core.IndexedSeq(G__38716__a,0,null);
} 
return weathergen$ui$grids$master_detail__delegate.call(this,args__29776__auto__);};
weathergen$ui$grids$master_detail.cljs$lang$maxFixedArity = 0;
weathergen$ui$grids$master_detail.cljs$lang$applyTo = (function (arglist__38717){
var args__29776__auto__ = cljs.core.seq(arglist__38717);
return weathergen$ui$grids$master_detail__delegate(args__29776__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__29776__auto__){
var vec__38810 = hoplon.core.parse_args.call(null,args__29776__auto__);
var attrs = cljs.core.nth.call(null,vec__38810,(0),null);
var _ = cljs.core.nth.call(null,vec__38810,(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__38813 = attrs;
var map__38813__$1 = ((((!((map__38813 == null)))?((((map__38813.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__38813.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__38813):map__38813);
var movable_columns = cljs.core.get.call(null,map__38813__$1,new cljs.core.Keyword(null,"movable-columns","movable-columns",-1079893862));
var data = cljs.core.get.call(null,map__38813__$1,new cljs.core.Keyword(null,"data","data",-232669377));
var hidden_columns = cljs.core.get.call(null,map__38813__$1,new cljs.core.Keyword(null,"hidden-columns","hidden-columns",-1045524800));
var row_attrs = cljs.core.get.call(null,map__38813__$1,new cljs.core.Keyword(null,"row-attrs","row-attrs",2139633863));
var columns = cljs.core.get.call(null,map__38813__$1,new cljs.core.Keyword(null,"columns","columns",1998437288));
var when_empty = cljs.core.get.call(null,map__38813__$1,new cljs.core.Keyword(null,"when-empty","when-empty",-1825107890));
var fixed_columns = cljs.core.get.call(null,map__38813__$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__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (data__$1,sort_criteria__$1){
if(cljs.core.not.call(null,sort_criteria__$1)){
return data__$1;
} else {
var vec__38815 = sort_criteria__$1;
var sort_column = cljs.core.nth.call(null,vec__38815,(0),null);
var sort_direction = cljs.core.nth.call(null,vec__38815,(1),null);
var map__38818 = cljs.core.get.call(null,columns,sort_column);
var map__38818__$1 = ((((!((map__38818 == null)))?((((map__38818.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__38818.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__38818):map__38818);
var sort_key = cljs.core.get.call(null,map__38818__$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__38815,sort_column,sort_direction,map__38818,map__38818__$1,sort_key,sort_criteria,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (a,b){
return (- cljs.core.compare.call(null,a,b));
});})(vec__38815,sort_column,sort_direction,map__38818,map__38818__$1,sort_key,sort_criteria,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
),data__$1);
}
});})(sort_criteria,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (elem,class$){
return ((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function() { 
var G__38902__delegate = function (args){
return cljs.core.apply.call(null,elem,new cljs.core.Keyword(null,"class","class",-2030961996),class$,args);
};
var G__38902 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__38903__i = 0, G__38903__a = new Array(arguments.length -  0);
while (G__38903__i < G__38903__a.length) {G__38903__a[G__38903__i] = arguments[G__38903__i + 0]; ++G__38903__i;}
  args = new cljs.core.IndexedSeq(G__38903__a,0,null);
} 
return G__38902__delegate.call(this,args);};
G__38902.cljs$lang$maxFixedArity = 0;
G__38902.cljs$lang$applyTo = (function (arglist__38904){
var args = cljs.core.seq(arglist__38904);
return G__38902__delegate(args);
});
G__38902.cljs$core$IFn$_invoke$arity$variadic = G__38902__delegate;
return G__38902;
})()
;
;})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__24200__auto__ = ((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function weathergen$ui$grids$table_grid_$_iter__38820(s__38821){
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__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
var s__38821__$1 = s__38821;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__38821__$1);
if(temp__5278__auto__){
var s__38821__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38821__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38821__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38823 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38822 = (0);
while(true){
if((i__38822 < size__24199__auto__)){
var n = cljs.core._nth.call(null,c__24198__auto__,i__38822);
cljs.core.chunk_append.call(null,b__38823,(function (){var column_id = javelin.core.formula.call(null,((function (i__38822,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(i__38822,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (i__38822,column_id,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(i__38822,column_id,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,hidden_columns,column_id);
var disable_sort = javelin.core.formula.call(null,((function (i__38822,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_id);
return td.call(null,new cljs.core.Keyword(null,"class","class",-2030961996),javelin.core.formula.call(null,((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__23326__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23326__auto__){
return hidden_QMARK___$1;
} else {
return and__23326__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__38850){
var vec__38851 = p__38850;
var old_index = cljs.core.nth.call(null,vec__38851,(0),null);
var direction = cljs.core.nth.call(null,vec__38851,(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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
);

return true;
}
});})(i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,"<");
});})(i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return null;
});})(i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,javelin.core.formula.call(null,((function (i__38822,con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (G__38857,G__38856,G__38854,G__38855){
var and__23326__auto__ = (G__38854.call(null,G__38855) < G__38856);
if(cljs.core.truth_(and__23326__auto__)){
return G__38857;
} else {
return and__23326__auto__;
}
});})(i__38822,con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,editing_columns_QMARK_,n,cljs.core.count,fixed_columns));
})(),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return "\u2717";
});})(i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return "\u2713";
});})(i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,hidden_QMARK_);
})());
});})(i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return null;
});})(i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,editing_columns_QMARK_);
})(),javelin.core.formula.call(null,((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_id),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return cljs.core.PersistentVector.EMPTY;
});})(i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return weathergen.ui.grids.sorters.call(null,sort_criteria,column_id);
});})(i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,disable_sort);
})(),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,">");
});})(i__38822,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return null;
});})(i__38822,con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(i__38822,con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,javelin.core.formula.call(null,((function (i__38822,con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (G__38862,G__38861,G__38860,G__38858,G__38859){
var and__23326__auto__ = (G__38858.call(null,G__38859) <= G__38860);
if(cljs.core.truth_(and__23326__auto__)){
var and__23326__auto____$1 = (G__38860 < (G__38861 - (1)));
if(cljs.core.truth_(and__23326__auto____$1)){
return G__38862;
} else {
return and__23326__auto____$1;
}
} else {
return and__23326__auto__;
}
});})(i__38822,con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,column_id,hidden_QMARK_,disable_sort,n,c__24198__auto__,size__24199__auto__,b__38823,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,editing_columns_QMARK_,num_columns,n,cljs.core.count,fixed_columns));
})());
})());

var G__38905 = (i__38822 + (1));
i__38822 = G__38905;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38823),weathergen$ui$grids$table_grid_$_iter__38820.call(null,cljs.core.chunk_rest.call(null,s__38821__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38823),null);
}
} else {
var n = cljs.core.first.call(null,s__38821__$2);
return cljs.core.cons.call(null,(function (){var column_id = javelin.core.formula.call(null,((function (n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (column_id,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(column_id,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,hidden_columns,column_id);
var disable_sort = javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__23326__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23326__auto__){
return hidden_QMARK___$1;
} else {
return and__23326__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__38863){
var vec__38864 = p__38863;
var old_index = cljs.core.nth.call(null,vec__38864,(0),null);
var direction = cljs.core.nth.call(null,vec__38864,(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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
);

return true;
}
});})(column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,"<");
});})(column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return null;
});})(con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,javelin.core.formula.call(null,((function (con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (G__38870,G__38869,G__38867,G__38868){
var and__23326__auto__ = (G__38867.call(null,G__38868) < G__38869);
if(cljs.core.truth_(and__23326__auto__)){
return G__38870;
} else {
return and__23326__auto__;
}
});})(con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,editing_columns_QMARK_,n,cljs.core.count,fixed_columns));
})(),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,hidden_QMARK_),new cljs.core.Keyword(null,"click","click",1912301393),((function (column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return "\u2717";
});})(column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return "\u2713";
});})(con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,hidden_QMARK_);
})());
});})(column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return null;
});})(con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,editing_columns_QMARK_);
})(),javelin.core.formula.call(null,((function (column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_id),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return cljs.core.PersistentVector.EMPTY;
});})(column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return weathergen.ui.grids.sorters.call(null,sort_criteria,column_id);
});})(con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,disable_sort);
})(),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,">");
});})(column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return null;
});})(con__29830__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,javelin.core.formula.call(null,((function (con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (G__38875,G__38874,G__38873,G__38871,G__38872){
var and__23326__auto__ = (G__38871.call(null,G__38872) <= G__38873);
if(cljs.core.truth_(and__23326__auto__)){
var and__23326__auto____$1 = (G__38873 < (G__38874 - (1)));
if(cljs.core.truth_(and__23326__auto____$1)){
return G__38875;
} else {
return and__23326__auto____$1;
}
} else {
return and__23326__auto__;
}
});})(con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,column_id,hidden_QMARK_,disable_sort,n,s__38821__$2,temp__5278__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,editing_columns_QMARK_,num_columns,n,cljs.core.count,fixed_columns));
})());
})(),weathergen$ui$grids$table_grid_$_iter__38820.call(null,cljs.core.rest.call(null,s__38821__$2)));
}
} else {
return null;
}
break;
}
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null,null));
});})(sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.range.call(null,num_columns));
})())),(function (){var con__29830__auto__ = (new cljs.core.Delay(((function (sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var alt__29831__auto__ = (new cljs.core.Delay(((function (con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
return tbody.call(null,hoplon.core.loop_tpl_STAR_.call(null,javelin.core.formula.call(null,((function (con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (G__38876,G__38877,G__38878){
return G__38876.call(null,G__38877,G__38878);
});})(con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,cljs.core.map_indexed,cljs.core.vector,sorted_items),((function (con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (item__29820__auto__){
var vec__38879 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (indexed){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [indexed], null);
});})(con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,item__29820__auto__));
var indexed = cljs.core.nth.call(null,vec__38879,(0),null);
var vec__38888 = javelin.core.cell_map.call(null,cljs.core.identity,javelin.core.formula.call(null,((function (vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__38891){
var vec__38892 = p__38891;
var rownum = cljs.core.nth.call(null,vec__38892,(0),null);
var item = cljs.core.nth.call(null,vec__38892,(1),null);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [rownum,item], null);
});})(vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,indexed));
var rownum = cljs.core.nth.call(null,vec__38888,(0),null);
var item = cljs.core.nth.call(null,vec__38888,(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__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function() { 
var G__38906__delegate = function (formatteds){
return cljs.core.zipmap.call(null,cljs.core.map.call(null,cljs.core.key,columns),formatteds);
};
var G__38906 = function (var_args){
var formatteds = null;
if (arguments.length > 0) {
var G__38907__i = 0, G__38907__a = new Array(arguments.length -  0);
while (G__38907__i < G__38907__a.length) {G__38907__a[G__38907__i] = arguments[G__38907__i + 0]; ++G__38907__i;}
  formatteds = new cljs.core.IndexedSeq(G__38907__a,0,null);
} 
return G__38906__delegate.call(this,formatteds);};
G__38906.cljs$lang$maxFixedArity = 0;
G__38906.cljs$lang$applyTo = (function (arglist__38908){
var formatteds = cljs.core.seq(arglist__38908);
return G__38906__delegate(formatteds);
});
G__38906.cljs$core$IFn$_invoke$arity$variadic = G__38906__delegate;
return G__38906;
})()
;})(vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
),cljs.core.map.call(null,((function (vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (formatter){
return formatter.call(null,item);
});})(vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function() { 
var G__38909__delegate = function (csses){
return cljs.core.zipmap.call(null,cljs.core.map.call(null,cljs.core.key,columns),csses);
};
var G__38909 = function (var_args){
var csses = null;
if (arguments.length > 0) {
var G__38910__i = 0, G__38910__a = new Array(arguments.length -  0);
while (G__38910__i < G__38910__a.length) {G__38910__a[G__38910__i] = arguments[G__38910__i + 0]; ++G__38910__i;}
  csses = new cljs.core.IndexedSeq(G__38910__a,0,null);
} 
return G__38909__delegate.call(this,csses);};
G__38909.cljs$lang$maxFixedArity = 0;
G__38909.cljs$lang$applyTo = (function (arglist__38911){
var csses = cljs.core.seq(arglist__38911);
return G__38909__delegate(csses);
});
G__38909.cljs$core$IFn$_invoke$arity$variadic = G__38909__delegate;
return G__38909;
})()
;})(formatteds,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
),cljs.core.map.call(null,((function (formatteds,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (css){
if(cljs.core.truth_(css)){
return css.call(null,item,rownum);
} else {
return null;
}
});})(formatteds,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,cljs.core.map.call(null,new cljs.core.Keyword(null,"css","css",1135045163),cljs.core.vals.call(null,columns))));
var iter__24200__auto__ = ((function (formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function weathergen$ui$grids$table_grid_$_iter__38895(s__38896){
return (new cljs.core.LazySeq(null,((function (formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (){
var s__38896__$1 = s__38896;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__38896__$1);
if(temp__5278__auto__){
var s__38896__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__38896__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__38896__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__38898 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__38897 = (0);
while(true){
if((i__38897 < size__24199__auto__)){
var n = cljs.core._nth.call(null,c__24198__auto__,i__38897);
cljs.core.chunk_append.call(null,b__38898,(function (){var column_id = javelin.core.formula.call(null,((function (i__38897,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(i__38897,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (i__38897,column_id,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(i__38897,column_id,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38897,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__23326__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23326__auto__){
return hidden_QMARK___$1;
} else {
return and__23326__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(i__38897,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,editing_columns_QMARK_,hidden_QMARK_),new cljs.core.Keyword(null,"css","css",1135045163),javelin.core.formula.call(null,((function (i__38897,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (column_id__$1,csses__$1){
var or__23338__auto___38912 = cljs.core.get.call(null,csses__$1,column_id__$1);
if(cljs.core.truth_(or__23338__auto___38912)){
} else {
c.removeAttribute("style");

}

return cljs.core.get.call(null,csses__$1,column_id__$1);
});})(i__38897,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_id,csses),javelin.core.formula.call(null,((function (i__38897,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (column_id__$1,formatteds__$1){
return cljs.core.get.call(null,formatteds__$1,column_id__$1);
});})(i__38897,c,column_id,hidden_QMARK_,n,c__24198__auto__,size__24199__auto__,b__38898,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_id,formatteds));

return c;
})());

var G__38913 = (i__38897 + (1));
i__38897 = G__38913;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38898),weathergen$ui$grids$table_grid_$_iter__38895.call(null,cljs.core.chunk_rest.call(null,s__38896__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__38898),null);
}
} else {
var n = cljs.core.first.call(null,s__38896__$2);
return cljs.core.cons.call(null,(function (){var column_id = javelin.core.formula.call(null,((function (n,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (column_order__$1){
return cljs.core.nth.call(null,column_order__$1,n);
});})(n,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_order);
var hidden_QMARK_ = javelin.core.formula.call(null,((function (column_id,n,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (hidden_columns__$1,column_id__$1){
return hidden_columns__$1.call(null,column_id__$1);
});})(column_id,n,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__23326__auto__ = cljs.core.not.call(null,editing_columns_QMARK___$1);
if(and__23326__auto__){
return hidden_QMARK___$1;
} else {
return and__23326__auto__;
}
})(),new cljs.core.Keyword(null,"table-grid-cell","table-grid-cell",573917102),true], null);
});})(c,column_id,hidden_QMARK_,n,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (column_id__$1,csses__$1){
var or__23338__auto___38914 = cljs.core.get.call(null,csses__$1,column_id__$1);
if(cljs.core.truth_(or__23338__auto___38914)){
} else {
c.removeAttribute("style");

}

return cljs.core.get.call(null,csses__$1,column_id__$1);
});})(c,column_id,hidden_QMARK_,n,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_id,csses),javelin.core.formula.call(null,((function (c,column_id,hidden_QMARK_,n,s__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,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__38896__$2,temp__5278__auto__,formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,column_id,formatteds));

return c;
})(),weathergen$ui$grids$table_grid_$_iter__38895.call(null,cljs.core.rest.call(null,s__38896__$2)));
}
} else {
return null;
}
break;
}
});})(formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null,null));
});})(formatteds,csses,vec__38888,rownum,item,vec__38879,indexed,con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return iter__24200__auto__.call(null,cljs.core.range.call(null,num_columns));
})());
});})(con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
));
});})(con__29830__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
,null));
var tpl__29832__auto__ = ((function (con__29830__auto__,alt__29831__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (p__29833__auto__){
return cljs.core.deref.call(null,(function (){var or__23338__auto__ = (cljs.core.truth_(p__29833__auto__)?con__29830__auto__:alt__29831__auto__);
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return cljs.core.atom.call(null);
}
})());
});})(con__29830__auto__,alt__29831__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
;
return javelin.core.formula.call(null,tpl__29832__auto__).call(null,javelin.core.formula.call(null,((function (con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_){
return (function (G__38901,G__38900,G__38899){
var and__23326__auto__ = (G__38899.call(null,G__38900) === (0));
if(cljs.core.truth_(and__23326__auto__)){
return G__38901;
} else {
return and__23326__auto__;
}
});})(con__29830__auto__,alt__29831__auto__,tpl__29832__auto__,sort_criteria,sorted_items,num_columns,column_order,editing_columns_QMARK_,classify,table,thead,tbody,tr,td,map__38813,map__38813__$1,movable_columns,data,hidden_columns,row_attrs,columns,when_empty,fixed_columns,attrs__$1,vec__38810,attrs,_))
).call(null,when_empty,sorted_items,cljs.core.count));
})());
};
var weathergen$ui$grids$table_grid = function (var_args){
var args__29776__auto__ = null;
if (arguments.length > 0) {
var G__38915__i = 0, G__38915__a = new Array(arguments.length -  0);
while (G__38915__i < G__38915__a.length) {G__38915__a[G__38915__i] = arguments[G__38915__i + 0]; ++G__38915__i;}
  args__29776__auto__ = new cljs.core.IndexedSeq(G__38915__a,0,null);
} 
return weathergen$ui$grids$table_grid__delegate.call(this,args__29776__auto__);};
weathergen$ui$grids$table_grid.cljs$lang$maxFixedArity = 0;
weathergen$ui$grids$table_grid.cljs$lang$applyTo = (function (arglist__38916){
var args__29776__auto__ = cljs.core.seq(arglist__38916);
return weathergen$ui$grids$table_grid__delegate(args__29776__auto__);
});
weathergen$ui$grids$table_grid.cljs$core$IFn$_invoke$arity$variadic = weathergen$ui$grids$table_grid__delegate;
return weathergen$ui$grids$table_grid;
})()
;
