// Compiled by ClojureScript 1.9.562 {}
goog.provide('sablono.core');
goog.require('cljs.core');
goog.require('clojure.string');
goog.require('goog.string');
goog.require('sablono.normalize');
goog.require('sablono.util');
goog.require('sablono.interpreter');
goog.require('goog.dom');
/**
 * Add an optional attribute argument to a function that returns a element vector.
 */
sablono.core.wrap_attrs = (function sablono$core$wrap_attrs(func){
return (function() { 
var G__37239__delegate = function (args){
if(cljs.core.map_QMARK_.call(null,cljs.core.first.call(null,args))){
var vec__37236 = cljs.core.apply.call(null,func,cljs.core.rest.call(null,args));
var seq__37237 = cljs.core.seq.call(null,vec__37236);
var first__37238 = cljs.core.first.call(null,seq__37237);
var seq__37237__$1 = cljs.core.next.call(null,seq__37237);
var tag = first__37238;
var body = seq__37237__$1;
if(cljs.core.map_QMARK_.call(null,cljs.core.first.call(null,body))){
return cljs.core.into.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag,cljs.core.merge.call(null,cljs.core.first.call(null,body),cljs.core.first.call(null,args))], null),cljs.core.rest.call(null,body));
} else {
return cljs.core.into.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tag,cljs.core.first.call(null,args)], null),body);
}
} else {
return cljs.core.apply.call(null,func,args);
}
};
var G__37239 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__37240__i = 0, G__37240__a = new Array(arguments.length -  0);
while (G__37240__i < G__37240__a.length) {G__37240__a[G__37240__i] = arguments[G__37240__i + 0]; ++G__37240__i;}
  args = new cljs.core.IndexedSeq(G__37240__a,0,null);
} 
return G__37239__delegate.call(this,args);};
G__37239.cljs$lang$maxFixedArity = 0;
G__37239.cljs$lang$applyTo = (function (arglist__37241){
var args = cljs.core.seq(arglist__37241);
return G__37239__delegate(args);
});
G__37239.cljs$core$IFn$_invoke$arity$variadic = G__37239__delegate;
return G__37239;
})()
;
});
sablono.core.update_arglists = (function sablono$core$update_arglists(arglists){
var iter__24200__auto__ = (function sablono$core$update_arglists_$_iter__37246(s__37247){
return (new cljs.core.LazySeq(null,(function (){
var s__37247__$1 = s__37247;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__37247__$1);
if(temp__5278__auto__){
var s__37247__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__37247__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__37247__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__37249 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__37248 = (0);
while(true){
if((i__37248 < size__24199__auto__)){
var args = cljs.core._nth.call(null,c__24198__auto__,i__37248);
cljs.core.chunk_append.call(null,b__37249,cljs.core.vec.call(null,cljs.core.cons.call(null,new cljs.core.Symbol(null,"attr-map?","attr-map?",116307443,null),args)));

var G__37250 = (i__37248 + (1));
i__37248 = G__37250;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37249),sablono$core$update_arglists_$_iter__37246.call(null,cljs.core.chunk_rest.call(null,s__37247__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37249),null);
}
} else {
var args = cljs.core.first.call(null,s__37247__$2);
return cljs.core.cons.call(null,cljs.core.vec.call(null,cljs.core.cons.call(null,new cljs.core.Symbol(null,"attr-map?","attr-map?",116307443,null),args)),sablono$core$update_arglists_$_iter__37246.call(null,cljs.core.rest.call(null,s__37247__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__24200__auto__.call(null,arglists);
});
/**
 * Include a list of external stylesheet files.
 */
sablono.core.include_css = (function sablono$core$include_css(var_args){
var args__24566__auto__ = [];
var len__24559__auto___37256 = arguments.length;
var i__24560__auto___37257 = (0);
while(true){
if((i__24560__auto___37257 < len__24559__auto___37256)){
args__24566__auto__.push((arguments[i__24560__auto___37257]));

var G__37258 = (i__24560__auto___37257 + (1));
i__24560__auto___37257 = G__37258;
continue;
} else {
}
break;
}

var argseq__24567__auto__ = ((((0) < args__24566__auto__.length))?(new cljs.core.IndexedSeq(args__24566__auto__.slice((0)),(0),null)):null);
return sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic(argseq__24567__auto__);
});

sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic = (function (styles){
var iter__24200__auto__ = (function sablono$core$iter__37252(s__37253){
return (new cljs.core.LazySeq(null,(function (){
var s__37253__$1 = s__37253;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__37253__$1);
if(temp__5278__auto__){
var s__37253__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__37253__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__37253__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__37255 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__37254 = (0);
while(true){
if((i__37254 < size__24199__auto__)){
var style = cljs.core._nth.call(null,c__24198__auto__,i__37254);
cljs.core.chunk_append.call(null,b__37255,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"link","link",-1769163468),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1174270348),"text/css",new cljs.core.Keyword(null,"href","href",-793805698),sablono.util.as_str.call(null,style),new cljs.core.Keyword(null,"rel","rel",1378823488),"stylesheet"], null)], null));

var G__37259 = (i__37254 + (1));
i__37254 = G__37259;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37255),sablono$core$iter__37252.call(null,cljs.core.chunk_rest.call(null,s__37253__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37255),null);
}
} else {
var style = cljs.core.first.call(null,s__37253__$2);
return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"link","link",-1769163468),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1174270348),"text/css",new cljs.core.Keyword(null,"href","href",-793805698),sablono.util.as_str.call(null,style),new cljs.core.Keyword(null,"rel","rel",1378823488),"stylesheet"], null)], null),sablono$core$iter__37252.call(null,cljs.core.rest.call(null,s__37253__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__24200__auto__.call(null,styles);
});

sablono.core.include_css.cljs$lang$maxFixedArity = (0);

sablono.core.include_css.cljs$lang$applyTo = (function (seq37251){
return sablono.core.include_css.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null,seq37251));
});

/**
 * Include the JavaScript library at `src`.
 */
sablono.core.include_js = (function sablono$core$include_js(src){
return goog.dom.appendChild(goog.dom.getDocument().body,goog.dom.createDom("script",({"src": src})));
});
/**
 * Include Facebook's React JavaScript library.
 */
sablono.core.include_react = (function sablono$core$include_react(){
return sablono.core.include_js.call(null,"http://fb.me/react-0.12.2.js");
});
/**
 * Wraps some content in a HTML hyperlink with the supplied URL.
 */
sablono.core.link_to37260 = (function sablono$core$link_to37260(var_args){
var args__24566__auto__ = [];
var len__24559__auto___37263 = arguments.length;
var i__24560__auto___37264 = (0);
while(true){
if((i__24560__auto___37264 < len__24559__auto___37263)){
args__24566__auto__.push((arguments[i__24560__auto___37264]));

var G__37265 = (i__24560__auto___37264 + (1));
i__24560__auto___37264 = G__37265;
continue;
} else {
}
break;
}

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

sablono.core.link_to37260.cljs$core$IFn$_invoke$arity$variadic = (function (url,content){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"a","a",-2123407586),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"href","href",-793805698),sablono.util.as_str.call(null,url)], null),content], null);
});

sablono.core.link_to37260.cljs$lang$maxFixedArity = (1);

sablono.core.link_to37260.cljs$lang$applyTo = (function (seq37261){
var G__37262 = cljs.core.first.call(null,seq37261);
var seq37261__$1 = cljs.core.next.call(null,seq37261);
return sablono.core.link_to37260.cljs$core$IFn$_invoke$arity$variadic(G__37262,seq37261__$1);
});


sablono.core.link_to = sablono.core.wrap_attrs.call(null,sablono.core.link_to37260);
/**
 * Wraps some content in a HTML hyperlink with the supplied e-mail
 *   address. If no content provided use the e-mail address as content.
 */
sablono.core.mail_to37266 = (function sablono$core$mail_to37266(var_args){
var args__24566__auto__ = [];
var len__24559__auto___37273 = arguments.length;
var i__24560__auto___37274 = (0);
while(true){
if((i__24560__auto___37274 < len__24559__auto___37273)){
args__24566__auto__.push((arguments[i__24560__auto___37274]));

var G__37275 = (i__24560__auto___37274 + (1));
i__24560__auto___37274 = G__37275;
continue;
} else {
}
break;
}

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

sablono.core.mail_to37266.cljs$core$IFn$_invoke$arity$variadic = (function (e_mail,p__37269){
var vec__37270 = p__37269;
var content = cljs.core.nth.call(null,vec__37270,(0),null);
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"a","a",-2123407586),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"href","href",-793805698),[cljs.core.str.cljs$core$IFn$_invoke$arity$1("mailto:"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(e_mail)].join('')], null),(function (){var or__23338__auto__ = content;
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return e_mail;
}
})()], null);
});

sablono.core.mail_to37266.cljs$lang$maxFixedArity = (1);

sablono.core.mail_to37266.cljs$lang$applyTo = (function (seq37267){
var G__37268 = cljs.core.first.call(null,seq37267);
var seq37267__$1 = cljs.core.next.call(null,seq37267);
return sablono.core.mail_to37266.cljs$core$IFn$_invoke$arity$variadic(G__37268,seq37267__$1);
});


sablono.core.mail_to = sablono.core.wrap_attrs.call(null,sablono.core.mail_to37266);
/**
 * Wrap a collection in an unordered list.
 */
sablono.core.unordered_list37276 = (function sablono$core$unordered_list37276(coll){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul","ul",-1349521403),(function (){var iter__24200__auto__ = (function sablono$core$unordered_list37276_$_iter__37281(s__37282){
return (new cljs.core.LazySeq(null,(function (){
var s__37282__$1 = s__37282;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__37282__$1);
if(temp__5278__auto__){
var s__37282__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__37282__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__37282__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__37284 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__37283 = (0);
while(true){
if((i__37283 < size__24199__auto__)){
var x = cljs.core._nth.call(null,c__24198__auto__,i__37283);
cljs.core.chunk_append.call(null,b__37284,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",723558921),x], null));

var G__37285 = (i__37283 + (1));
i__37283 = G__37285;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37284),sablono$core$unordered_list37276_$_iter__37281.call(null,cljs.core.chunk_rest.call(null,s__37282__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37284),null);
}
} else {
var x = cljs.core.first.call(null,s__37282__$2);
return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",723558921),x], null),sablono$core$unordered_list37276_$_iter__37281.call(null,cljs.core.rest.call(null,s__37282__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__24200__auto__.call(null,coll);
})()], null);
});

sablono.core.unordered_list = sablono.core.wrap_attrs.call(null,sablono.core.unordered_list37276);
/**
 * Wrap a collection in an ordered list.
 */
sablono.core.ordered_list37286 = (function sablono$core$ordered_list37286(coll){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ol","ol",932524051),(function (){var iter__24200__auto__ = (function sablono$core$ordered_list37286_$_iter__37291(s__37292){
return (new cljs.core.LazySeq(null,(function (){
var s__37292__$1 = s__37292;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__37292__$1);
if(temp__5278__auto__){
var s__37292__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__37292__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__37292__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__37294 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__37293 = (0);
while(true){
if((i__37293 < size__24199__auto__)){
var x = cljs.core._nth.call(null,c__24198__auto__,i__37293);
cljs.core.chunk_append.call(null,b__37294,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",723558921),x], null));

var G__37295 = (i__37293 + (1));
i__37293 = G__37295;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37294),sablono$core$ordered_list37286_$_iter__37291.call(null,cljs.core.chunk_rest.call(null,s__37292__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37294),null);
}
} else {
var x = cljs.core.first.call(null,s__37292__$2);
return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",723558921),x], null),sablono$core$ordered_list37286_$_iter__37291.call(null,cljs.core.rest.call(null,s__37292__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__24200__auto__.call(null,coll);
})()], null);
});

sablono.core.ordered_list = sablono.core.wrap_attrs.call(null,sablono.core.ordered_list37286);
/**
 * Create an image element.
 */
sablono.core.image37296 = (function sablono$core$image37296(var_args){
var args37297 = [];
var len__24559__auto___37300 = arguments.length;
var i__24560__auto___37301 = (0);
while(true){
if((i__24560__auto___37301 < len__24559__auto___37300)){
args37297.push((arguments[i__24560__auto___37301]));

var G__37302 = (i__24560__auto___37301 + (1));
i__24560__auto___37301 = G__37302;
continue;
} else {
}
break;
}

var G__37299 = args37297.length;
switch (G__37299) {
case 1:
return sablono.core.image37296.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.image37296.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.image37296.cljs$core$IFn$_invoke$arity$1 = (function (src){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"img","img",1442687358),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"src","src",-1651076051),sablono.util.as_str.call(null,src)], null)], null);
});

sablono.core.image37296.cljs$core$IFn$_invoke$arity$2 = (function (src,alt){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"img","img",1442687358),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"src","src",-1651076051),sablono.util.as_str.call(null,src),new cljs.core.Keyword(null,"alt","alt",-3214426),alt], null)], null);
});

sablono.core.image37296.cljs$lang$maxFixedArity = 2;


sablono.core.image = sablono.core.wrap_attrs.call(null,sablono.core.image37296);
sablono.core._STAR_group_STAR_ = cljs.core.PersistentVector.EMPTY;
/**
 * Create a field name from the supplied argument the current field group.
 */
sablono.core.make_name = (function sablono$core$make_name(name){
return cljs.core.reduce.call(null,(function (p1__37304_SHARP_,p2__37305_SHARP_){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(p1__37304_SHARP_),cljs.core.str.cljs$core$IFn$_invoke$arity$1("["),cljs.core.str.cljs$core$IFn$_invoke$arity$1(p2__37305_SHARP_),cljs.core.str.cljs$core$IFn$_invoke$arity$1("]")].join('');
}),cljs.core.conj.call(null,sablono.core._STAR_group_STAR_,sablono.util.as_str.call(null,name)));
});
/**
 * Create a field id from the supplied argument and current field group.
 */
sablono.core.make_id = (function sablono$core$make_id(name){
return cljs.core.reduce.call(null,(function (p1__37306_SHARP_,p2__37307_SHARP_){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(p1__37306_SHARP_),cljs.core.str.cljs$core$IFn$_invoke$arity$1("-"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(p2__37307_SHARP_)].join('');
}),cljs.core.conj.call(null,sablono.core._STAR_group_STAR_,sablono.util.as_str.call(null,name)));
});
/**
 * Creates a new <input> element.
 */
sablono.core.input_field_STAR_ = (function sablono$core$input_field_STAR_(type,name,value){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input","input",556931961),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"type","type",1174270348),type,new cljs.core.Keyword(null,"name","name",1843675177),sablono.core.make_name.call(null,name),new cljs.core.Keyword(null,"id","id",-1388402092),sablono.core.make_id.call(null,name),new cljs.core.Keyword(null,"value","value",305978217),(function (){var or__23338__auto__ = value;
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return undefined;
}
})()], null)], null);
});
/**
 * Creates a color input field.
 */
sablono.core.color_field37308 = (function sablono$core$color_field37308(var_args){
var args37309 = [];
var len__24559__auto___37376 = arguments.length;
var i__24560__auto___37377 = (0);
while(true){
if((i__24560__auto___37377 < len__24559__auto___37376)){
args37309.push((arguments[i__24560__auto___37377]));

var G__37378 = (i__24560__auto___37377 + (1));
i__24560__auto___37377 = G__37378;
continue;
} else {
}
break;
}

var G__37311 = args37309.length;
switch (G__37311) {
case 1:
return sablono.core.color_field37308.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.color_field37308.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.color_field37308.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.color_field37308.call(null,name__37223__auto__,null);
});

sablono.core.color_field37308.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"color","color",-1642760596,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.color_field37308.cljs$lang$maxFixedArity = 2;


sablono.core.color_field = sablono.core.wrap_attrs.call(null,sablono.core.color_field37308);

/**
 * Creates a date input field.
 */
sablono.core.date_field37312 = (function sablono$core$date_field37312(var_args){
var args37313 = [];
var len__24559__auto___37380 = arguments.length;
var i__24560__auto___37381 = (0);
while(true){
if((i__24560__auto___37381 < len__24559__auto___37380)){
args37313.push((arguments[i__24560__auto___37381]));

var G__37382 = (i__24560__auto___37381 + (1));
i__24560__auto___37381 = G__37382;
continue;
} else {
}
break;
}

var G__37315 = args37313.length;
switch (G__37315) {
case 1:
return sablono.core.date_field37312.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.date_field37312.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.date_field37312.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.date_field37312.call(null,name__37223__auto__,null);
});

sablono.core.date_field37312.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"date","date",177097065,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.date_field37312.cljs$lang$maxFixedArity = 2;


sablono.core.date_field = sablono.core.wrap_attrs.call(null,sablono.core.date_field37312);

/**
 * Creates a datetime input field.
 */
sablono.core.datetime_field37316 = (function sablono$core$datetime_field37316(var_args){
var args37317 = [];
var len__24559__auto___37384 = arguments.length;
var i__24560__auto___37385 = (0);
while(true){
if((i__24560__auto___37385 < len__24559__auto___37384)){
args37317.push((arguments[i__24560__auto___37385]));

var G__37386 = (i__24560__auto___37385 + (1));
i__24560__auto___37385 = G__37386;
continue;
} else {
}
break;
}

var G__37319 = args37317.length;
switch (G__37319) {
case 1:
return sablono.core.datetime_field37316.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.datetime_field37316.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.datetime_field37316.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.datetime_field37316.call(null,name__37223__auto__,null);
});

sablono.core.datetime_field37316.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"datetime","datetime",2135207229,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.datetime_field37316.cljs$lang$maxFixedArity = 2;


sablono.core.datetime_field = sablono.core.wrap_attrs.call(null,sablono.core.datetime_field37316);

/**
 * Creates a datetime-local input field.
 */
sablono.core.datetime_local_field37320 = (function sablono$core$datetime_local_field37320(var_args){
var args37321 = [];
var len__24559__auto___37388 = arguments.length;
var i__24560__auto___37389 = (0);
while(true){
if((i__24560__auto___37389 < len__24559__auto___37388)){
args37321.push((arguments[i__24560__auto___37389]));

var G__37390 = (i__24560__auto___37389 + (1));
i__24560__auto___37389 = G__37390;
continue;
} else {
}
break;
}

var G__37323 = args37321.length;
switch (G__37323) {
case 1:
return sablono.core.datetime_local_field37320.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.datetime_local_field37320.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.datetime_local_field37320.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.datetime_local_field37320.call(null,name__37223__auto__,null);
});

sablono.core.datetime_local_field37320.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"datetime-local","datetime-local",-507312697,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.datetime_local_field37320.cljs$lang$maxFixedArity = 2;


sablono.core.datetime_local_field = sablono.core.wrap_attrs.call(null,sablono.core.datetime_local_field37320);

/**
 * Creates a email input field.
 */
sablono.core.email_field37324 = (function sablono$core$email_field37324(var_args){
var args37325 = [];
var len__24559__auto___37392 = arguments.length;
var i__24560__auto___37393 = (0);
while(true){
if((i__24560__auto___37393 < len__24559__auto___37392)){
args37325.push((arguments[i__24560__auto___37393]));

var G__37394 = (i__24560__auto___37393 + (1));
i__24560__auto___37393 = G__37394;
continue;
} else {
}
break;
}

var G__37327 = args37325.length;
switch (G__37327) {
case 1:
return sablono.core.email_field37324.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.email_field37324.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.email_field37324.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.email_field37324.call(null,name__37223__auto__,null);
});

sablono.core.email_field37324.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"email","email",-1238619063,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.email_field37324.cljs$lang$maxFixedArity = 2;


sablono.core.email_field = sablono.core.wrap_attrs.call(null,sablono.core.email_field37324);

/**
 * Creates a file input field.
 */
sablono.core.file_field37328 = (function sablono$core$file_field37328(var_args){
var args37329 = [];
var len__24559__auto___37396 = arguments.length;
var i__24560__auto___37397 = (0);
while(true){
if((i__24560__auto___37397 < len__24559__auto___37396)){
args37329.push((arguments[i__24560__auto___37397]));

var G__37398 = (i__24560__auto___37397 + (1));
i__24560__auto___37397 = G__37398;
continue;
} else {
}
break;
}

var G__37331 = args37329.length;
switch (G__37331) {
case 1:
return sablono.core.file_field37328.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.file_field37328.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.file_field37328.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.file_field37328.call(null,name__37223__auto__,null);
});

sablono.core.file_field37328.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"file","file",370885649,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.file_field37328.cljs$lang$maxFixedArity = 2;


sablono.core.file_field = sablono.core.wrap_attrs.call(null,sablono.core.file_field37328);

/**
 * Creates a hidden input field.
 */
sablono.core.hidden_field37332 = (function sablono$core$hidden_field37332(var_args){
var args37333 = [];
var len__24559__auto___37400 = arguments.length;
var i__24560__auto___37401 = (0);
while(true){
if((i__24560__auto___37401 < len__24559__auto___37400)){
args37333.push((arguments[i__24560__auto___37401]));

var G__37402 = (i__24560__auto___37401 + (1));
i__24560__auto___37401 = G__37402;
continue;
} else {
}
break;
}

var G__37335 = args37333.length;
switch (G__37335) {
case 1:
return sablono.core.hidden_field37332.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.hidden_field37332.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.hidden_field37332.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.hidden_field37332.call(null,name__37223__auto__,null);
});

sablono.core.hidden_field37332.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"hidden","hidden",1328025435,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.hidden_field37332.cljs$lang$maxFixedArity = 2;


sablono.core.hidden_field = sablono.core.wrap_attrs.call(null,sablono.core.hidden_field37332);

/**
 * Creates a month input field.
 */
sablono.core.month_field37336 = (function sablono$core$month_field37336(var_args){
var args37337 = [];
var len__24559__auto___37404 = arguments.length;
var i__24560__auto___37405 = (0);
while(true){
if((i__24560__auto___37405 < len__24559__auto___37404)){
args37337.push((arguments[i__24560__auto___37405]));

var G__37406 = (i__24560__auto___37405 + (1));
i__24560__auto___37405 = G__37406;
continue;
} else {
}
break;
}

var G__37339 = args37337.length;
switch (G__37339) {
case 1:
return sablono.core.month_field37336.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.month_field37336.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.month_field37336.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.month_field37336.call(null,name__37223__auto__,null);
});

sablono.core.month_field37336.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"month","month",-319717006,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.month_field37336.cljs$lang$maxFixedArity = 2;


sablono.core.month_field = sablono.core.wrap_attrs.call(null,sablono.core.month_field37336);

/**
 * Creates a number input field.
 */
sablono.core.number_field37340 = (function sablono$core$number_field37340(var_args){
var args37341 = [];
var len__24559__auto___37408 = arguments.length;
var i__24560__auto___37409 = (0);
while(true){
if((i__24560__auto___37409 < len__24559__auto___37408)){
args37341.push((arguments[i__24560__auto___37409]));

var G__37410 = (i__24560__auto___37409 + (1));
i__24560__auto___37409 = G__37410;
continue;
} else {
}
break;
}

var G__37343 = args37341.length;
switch (G__37343) {
case 1:
return sablono.core.number_field37340.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.number_field37340.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.number_field37340.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.number_field37340.call(null,name__37223__auto__,null);
});

sablono.core.number_field37340.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"number","number",-1084057331,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.number_field37340.cljs$lang$maxFixedArity = 2;


sablono.core.number_field = sablono.core.wrap_attrs.call(null,sablono.core.number_field37340);

/**
 * Creates a password input field.
 */
sablono.core.password_field37344 = (function sablono$core$password_field37344(var_args){
var args37345 = [];
var len__24559__auto___37412 = arguments.length;
var i__24560__auto___37413 = (0);
while(true){
if((i__24560__auto___37413 < len__24559__auto___37412)){
args37345.push((arguments[i__24560__auto___37413]));

var G__37414 = (i__24560__auto___37413 + (1));
i__24560__auto___37413 = G__37414;
continue;
} else {
}
break;
}

var G__37347 = args37345.length;
switch (G__37347) {
case 1:
return sablono.core.password_field37344.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.password_field37344.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.password_field37344.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.password_field37344.call(null,name__37223__auto__,null);
});

sablono.core.password_field37344.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"password","password",2057553998,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.password_field37344.cljs$lang$maxFixedArity = 2;


sablono.core.password_field = sablono.core.wrap_attrs.call(null,sablono.core.password_field37344);

/**
 * Creates a range input field.
 */
sablono.core.range_field37348 = (function sablono$core$range_field37348(var_args){
var args37349 = [];
var len__24559__auto___37416 = arguments.length;
var i__24560__auto___37417 = (0);
while(true){
if((i__24560__auto___37417 < len__24559__auto___37416)){
args37349.push((arguments[i__24560__auto___37417]));

var G__37418 = (i__24560__auto___37417 + (1));
i__24560__auto___37417 = G__37418;
continue;
} else {
}
break;
}

var G__37351 = args37349.length;
switch (G__37351) {
case 1:
return sablono.core.range_field37348.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.range_field37348.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.range_field37348.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.range_field37348.call(null,name__37223__auto__,null);
});

sablono.core.range_field37348.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"range","range",-1014743483,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.range_field37348.cljs$lang$maxFixedArity = 2;


sablono.core.range_field = sablono.core.wrap_attrs.call(null,sablono.core.range_field37348);

/**
 * Creates a search input field.
 */
sablono.core.search_field37352 = (function sablono$core$search_field37352(var_args){
var args37353 = [];
var len__24559__auto___37420 = arguments.length;
var i__24560__auto___37421 = (0);
while(true){
if((i__24560__auto___37421 < len__24559__auto___37420)){
args37353.push((arguments[i__24560__auto___37421]));

var G__37422 = (i__24560__auto___37421 + (1));
i__24560__auto___37421 = G__37422;
continue;
} else {
}
break;
}

var G__37355 = args37353.length;
switch (G__37355) {
case 1:
return sablono.core.search_field37352.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.search_field37352.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.search_field37352.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.search_field37352.call(null,name__37223__auto__,null);
});

sablono.core.search_field37352.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"search","search",-1089495947,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.search_field37352.cljs$lang$maxFixedArity = 2;


sablono.core.search_field = sablono.core.wrap_attrs.call(null,sablono.core.search_field37352);

/**
 * Creates a tel input field.
 */
sablono.core.tel_field37356 = (function sablono$core$tel_field37356(var_args){
var args37357 = [];
var len__24559__auto___37424 = arguments.length;
var i__24560__auto___37425 = (0);
while(true){
if((i__24560__auto___37425 < len__24559__auto___37424)){
args37357.push((arguments[i__24560__auto___37425]));

var G__37426 = (i__24560__auto___37425 + (1));
i__24560__auto___37425 = G__37426;
continue;
} else {
}
break;
}

var G__37359 = args37357.length;
switch (G__37359) {
case 1:
return sablono.core.tel_field37356.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.tel_field37356.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.tel_field37356.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.tel_field37356.call(null,name__37223__auto__,null);
});

sablono.core.tel_field37356.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"tel","tel",1864669686,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.tel_field37356.cljs$lang$maxFixedArity = 2;


sablono.core.tel_field = sablono.core.wrap_attrs.call(null,sablono.core.tel_field37356);

/**
 * Creates a text input field.
 */
sablono.core.text_field37360 = (function sablono$core$text_field37360(var_args){
var args37361 = [];
var len__24559__auto___37428 = arguments.length;
var i__24560__auto___37429 = (0);
while(true){
if((i__24560__auto___37429 < len__24559__auto___37428)){
args37361.push((arguments[i__24560__auto___37429]));

var G__37430 = (i__24560__auto___37429 + (1));
i__24560__auto___37429 = G__37430;
continue;
} else {
}
break;
}

var G__37363 = args37361.length;
switch (G__37363) {
case 1:
return sablono.core.text_field37360.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.text_field37360.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.text_field37360.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.text_field37360.call(null,name__37223__auto__,null);
});

sablono.core.text_field37360.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"text","text",-150030170,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.text_field37360.cljs$lang$maxFixedArity = 2;


sablono.core.text_field = sablono.core.wrap_attrs.call(null,sablono.core.text_field37360);

/**
 * Creates a time input field.
 */
sablono.core.time_field37364 = (function sablono$core$time_field37364(var_args){
var args37365 = [];
var len__24559__auto___37432 = arguments.length;
var i__24560__auto___37433 = (0);
while(true){
if((i__24560__auto___37433 < len__24559__auto___37432)){
args37365.push((arguments[i__24560__auto___37433]));

var G__37434 = (i__24560__auto___37433 + (1));
i__24560__auto___37433 = G__37434;
continue;
} else {
}
break;
}

var G__37367 = args37365.length;
switch (G__37367) {
case 1:
return sablono.core.time_field37364.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.time_field37364.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.time_field37364.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.time_field37364.call(null,name__37223__auto__,null);
});

sablono.core.time_field37364.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"time","time",-1268547887,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.time_field37364.cljs$lang$maxFixedArity = 2;


sablono.core.time_field = sablono.core.wrap_attrs.call(null,sablono.core.time_field37364);

/**
 * Creates a url input field.
 */
sablono.core.url_field37368 = (function sablono$core$url_field37368(var_args){
var args37369 = [];
var len__24559__auto___37436 = arguments.length;
var i__24560__auto___37437 = (0);
while(true){
if((i__24560__auto___37437 < len__24559__auto___37436)){
args37369.push((arguments[i__24560__auto___37437]));

var G__37438 = (i__24560__auto___37437 + (1));
i__24560__auto___37437 = G__37438;
continue;
} else {
}
break;
}

var G__37371 = args37369.length;
switch (G__37371) {
case 1:
return sablono.core.url_field37368.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.url_field37368.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.url_field37368.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.url_field37368.call(null,name__37223__auto__,null);
});

sablono.core.url_field37368.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"url","url",1916828573,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.url_field37368.cljs$lang$maxFixedArity = 2;


sablono.core.url_field = sablono.core.wrap_attrs.call(null,sablono.core.url_field37368);

/**
 * Creates a week input field.
 */
sablono.core.week_field37372 = (function sablono$core$week_field37372(var_args){
var args37373 = [];
var len__24559__auto___37440 = arguments.length;
var i__24560__auto___37441 = (0);
while(true){
if((i__24560__auto___37441 < len__24559__auto___37440)){
args37373.push((arguments[i__24560__auto___37441]));

var G__37442 = (i__24560__auto___37441 + (1));
i__24560__auto___37441 = G__37442;
continue;
} else {
}
break;
}

var G__37375 = args37373.length;
switch (G__37375) {
case 1:
return sablono.core.week_field37372.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.week_field37372.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.week_field37372.cljs$core$IFn$_invoke$arity$1 = (function (name__37223__auto__){
return sablono.core.week_field37372.call(null,name__37223__auto__,null);
});

sablono.core.week_field37372.cljs$core$IFn$_invoke$arity$2 = (function (name__37223__auto__,value__37224__auto__){
return sablono.core.input_field_STAR_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Symbol(null,"week","week",314058249,null))].join(''),name__37223__auto__,value__37224__auto__);
});

sablono.core.week_field37372.cljs$lang$maxFixedArity = 2;


sablono.core.week_field = sablono.core.wrap_attrs.call(null,sablono.core.week_field37372);
sablono.core.file_upload = sablono.core.file_field;
/**
 * Creates a check box.
 */
sablono.core.check_box37444 = (function sablono$core$check_box37444(var_args){
var args37445 = [];
var len__24559__auto___37448 = arguments.length;
var i__24560__auto___37449 = (0);
while(true){
if((i__24560__auto___37449 < len__24559__auto___37448)){
args37445.push((arguments[i__24560__auto___37449]));

var G__37450 = (i__24560__auto___37449 + (1));
i__24560__auto___37449 = G__37450;
continue;
} else {
}
break;
}

var G__37447 = args37445.length;
switch (G__37447) {
case 1:
return sablono.core.check_box37444.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.check_box37444.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
case 3:
return sablono.core.check_box37444.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));

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

}
});

sablono.core.check_box37444.cljs$core$IFn$_invoke$arity$1 = (function (name){
return sablono.core.check_box37444.call(null,name,null);
});

sablono.core.check_box37444.cljs$core$IFn$_invoke$arity$2 = (function (name,checked_QMARK_){
return sablono.core.check_box37444.call(null,name,checked_QMARK_,"true");
});

sablono.core.check_box37444.cljs$core$IFn$_invoke$arity$3 = (function (name,checked_QMARK_,value){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input","input",556931961),new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"type","type",1174270348),"checkbox",new cljs.core.Keyword(null,"name","name",1843675177),sablono.core.make_name.call(null,name),new cljs.core.Keyword(null,"id","id",-1388402092),sablono.core.make_id.call(null,name),new cljs.core.Keyword(null,"value","value",305978217),(function (){var or__23338__auto__ = value;
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return undefined;
}
})(),new cljs.core.Keyword(null,"checked","checked",-50955819),checked_QMARK_], null)], null);
});

sablono.core.check_box37444.cljs$lang$maxFixedArity = 3;


sablono.core.check_box = sablono.core.wrap_attrs.call(null,sablono.core.check_box37444);
/**
 * Creates a radio button.
 */
sablono.core.radio_button37452 = (function sablono$core$radio_button37452(var_args){
var args37453 = [];
var len__24559__auto___37456 = arguments.length;
var i__24560__auto___37457 = (0);
while(true){
if((i__24560__auto___37457 < len__24559__auto___37456)){
args37453.push((arguments[i__24560__auto___37457]));

var G__37458 = (i__24560__auto___37457 + (1));
i__24560__auto___37457 = G__37458;
continue;
} else {
}
break;
}

var G__37455 = args37453.length;
switch (G__37455) {
case 1:
return sablono.core.radio_button37452.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.radio_button37452.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
case 3:
return sablono.core.radio_button37452.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));

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

}
});

sablono.core.radio_button37452.cljs$core$IFn$_invoke$arity$1 = (function (group){
return sablono.core.radio_button37452.call(null,group,null);
});

sablono.core.radio_button37452.cljs$core$IFn$_invoke$arity$2 = (function (group,checked_QMARK_){
return sablono.core.radio_button37452.call(null,group,checked_QMARK_,"true");
});

sablono.core.radio_button37452.cljs$core$IFn$_invoke$arity$3 = (function (group,checked_QMARK_,value){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input","input",556931961),new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"type","type",1174270348),"radio",new cljs.core.Keyword(null,"name","name",1843675177),sablono.core.make_name.call(null,group),new cljs.core.Keyword(null,"id","id",-1388402092),sablono.core.make_id.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(sablono.util.as_str.call(null,group)),cljs.core.str.cljs$core$IFn$_invoke$arity$1("-"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(sablono.util.as_str.call(null,value))].join('')),new cljs.core.Keyword(null,"value","value",305978217),(function (){var or__23338__auto__ = value;
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return undefined;
}
})(),new cljs.core.Keyword(null,"checked","checked",-50955819),checked_QMARK_], null)], null);
});

sablono.core.radio_button37452.cljs$lang$maxFixedArity = 3;


sablono.core.radio_button = sablono.core.wrap_attrs.call(null,sablono.core.radio_button37452);
sablono.core.hash_key = (function sablono$core$hash_key(x){
return goog.string.hashCode(cljs.core.pr_str.call(null,x));
});
/**
 * Creates a seq of option tags from a collection.
 */
sablono.core.select_options37460 = (function sablono$core$select_options37460(coll){
var iter__24200__auto__ = (function sablono$core$select_options37460_$_iter__37477(s__37478){
return (new cljs.core.LazySeq(null,(function (){
var s__37478__$1 = s__37478;
while(true){
var temp__5278__auto__ = cljs.core.seq.call(null,s__37478__$1);
if(temp__5278__auto__){
var s__37478__$2 = temp__5278__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__37478__$2)){
var c__24198__auto__ = cljs.core.chunk_first.call(null,s__37478__$2);
var size__24199__auto__ = cljs.core.count.call(null,c__24198__auto__);
var b__37480 = cljs.core.chunk_buffer.call(null,size__24199__auto__);
if((function (){var i__37479 = (0);
while(true){
if((i__37479 < size__24199__auto__)){
var x = cljs.core._nth.call(null,c__24198__auto__,i__37479);
cljs.core.chunk_append.call(null,b__37480,((cljs.core.sequential_QMARK_.call(null,x))?(function (){var vec__37487 = x;
var text = cljs.core.nth.call(null,vec__37487,(0),null);
var val = cljs.core.nth.call(null,vec__37487,(1),null);
var disabled_QMARK_ = cljs.core.nth.call(null,vec__37487,(2),null);
var disabled_QMARK___$1 = cljs.core.boolean$.call(null,disabled_QMARK_);
if(cljs.core.sequential_QMARK_.call(null,val)){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"optgroup","optgroup",1738282218),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"key","key",-1516042587),sablono.core.hash_key.call(null,text),new cljs.core.Keyword(null,"label","label",1718410804),text], null),sablono.core.select_options37460.call(null,val)], null);
} else {
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"option","option",65132272),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"disabled","disabled",-1529784218),disabled_QMARK___$1,new cljs.core.Keyword(null,"key","key",-1516042587),sablono.core.hash_key.call(null,val),new cljs.core.Keyword(null,"value","value",305978217),val], null),text], null);
}
})():new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"option","option",65132272),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"key","key",-1516042587),sablono.core.hash_key.call(null,x),new cljs.core.Keyword(null,"value","value",305978217),x], null),x], null)));

var G__37493 = (i__37479 + (1));
i__37479 = G__37493;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37480),sablono$core$select_options37460_$_iter__37477.call(null,cljs.core.chunk_rest.call(null,s__37478__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37480),null);
}
} else {
var x = cljs.core.first.call(null,s__37478__$2);
return cljs.core.cons.call(null,((cljs.core.sequential_QMARK_.call(null,x))?(function (){var vec__37490 = x;
var text = cljs.core.nth.call(null,vec__37490,(0),null);
var val = cljs.core.nth.call(null,vec__37490,(1),null);
var disabled_QMARK_ = cljs.core.nth.call(null,vec__37490,(2),null);
var disabled_QMARK___$1 = cljs.core.boolean$.call(null,disabled_QMARK_);
if(cljs.core.sequential_QMARK_.call(null,val)){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"optgroup","optgroup",1738282218),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"key","key",-1516042587),sablono.core.hash_key.call(null,text),new cljs.core.Keyword(null,"label","label",1718410804),text], null),sablono.core.select_options37460.call(null,val)], null);
} else {
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"option","option",65132272),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"disabled","disabled",-1529784218),disabled_QMARK___$1,new cljs.core.Keyword(null,"key","key",-1516042587),sablono.core.hash_key.call(null,val),new cljs.core.Keyword(null,"value","value",305978217),val], null),text], null);
}
})():new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"option","option",65132272),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"key","key",-1516042587),sablono.core.hash_key.call(null,x),new cljs.core.Keyword(null,"value","value",305978217),x], null),x], null)),sablono$core$select_options37460_$_iter__37477.call(null,cljs.core.rest.call(null,s__37478__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__24200__auto__.call(null,coll);
});

sablono.core.select_options = sablono.core.wrap_attrs.call(null,sablono.core.select_options37460);
/**
 * Creates a drop-down box using the <select> tag.
 */
sablono.core.drop_down37494 = (function sablono$core$drop_down37494(var_args){
var args37495 = [];
var len__24559__auto___37498 = arguments.length;
var i__24560__auto___37499 = (0);
while(true){
if((i__24560__auto___37499 < len__24559__auto___37498)){
args37495.push((arguments[i__24560__auto___37499]));

var G__37500 = (i__24560__auto___37499 + (1));
i__24560__auto___37499 = G__37500;
continue;
} else {
}
break;
}

var G__37497 = args37495.length;
switch (G__37497) {
case 2:
return sablono.core.drop_down37494.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
case 3:
return sablono.core.drop_down37494.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));

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

}
});

sablono.core.drop_down37494.cljs$core$IFn$_invoke$arity$2 = (function (name,options){
return sablono.core.drop_down37494.call(null,name,options,null);
});

sablono.core.drop_down37494.cljs$core$IFn$_invoke$arity$3 = (function (name,options,selected){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"select","select",1147833503),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"name","name",1843675177),sablono.core.make_name.call(null,name),new cljs.core.Keyword(null,"id","id",-1388402092),sablono.core.make_id.call(null,name)], null),sablono.core.select_options.call(null,options,selected)], null);
});

sablono.core.drop_down37494.cljs$lang$maxFixedArity = 3;


sablono.core.drop_down = sablono.core.wrap_attrs.call(null,sablono.core.drop_down37494);
/**
 * Creates a text area element.
 */
sablono.core.text_area37502 = (function sablono$core$text_area37502(var_args){
var args37503 = [];
var len__24559__auto___37506 = arguments.length;
var i__24560__auto___37507 = (0);
while(true){
if((i__24560__auto___37507 < len__24559__auto___37506)){
args37503.push((arguments[i__24560__auto___37507]));

var G__37508 = (i__24560__auto___37507 + (1));
i__24560__auto___37507 = G__37508;
continue;
} else {
}
break;
}

var G__37505 = args37503.length;
switch (G__37505) {
case 1:
return sablono.core.text_area37502.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return sablono.core.text_area37502.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

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

}
});

sablono.core.text_area37502.cljs$core$IFn$_invoke$arity$1 = (function (name){
return sablono.core.text_area37502.call(null,name,null);
});

sablono.core.text_area37502.cljs$core$IFn$_invoke$arity$2 = (function (name,value){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"textarea","textarea",-650375824),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),sablono.core.make_name.call(null,name),new cljs.core.Keyword(null,"id","id",-1388402092),sablono.core.make_id.call(null,name),new cljs.core.Keyword(null,"value","value",305978217),(function (){var or__23338__auto__ = value;
if(cljs.core.truth_(or__23338__auto__)){
return or__23338__auto__;
} else {
return undefined;
}
})()], null)], null);
});

sablono.core.text_area37502.cljs$lang$maxFixedArity = 2;


sablono.core.text_area = sablono.core.wrap_attrs.call(null,sablono.core.text_area37502);
/**
 * Creates a label for an input field with the supplied name.
 */
sablono.core.label37510 = (function sablono$core$label37510(name,text){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"label","label",1718410804),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"htmlFor","htmlFor",-1050291720),sablono.core.make_id.call(null,name)], null),text], null);
});

sablono.core.label = sablono.core.wrap_attrs.call(null,sablono.core.label37510);
/**
 * Creates a submit button.
 */
sablono.core.submit_button37511 = (function sablono$core$submit_button37511(text){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input","input",556931961),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),"submit",new cljs.core.Keyword(null,"value","value",305978217),text], null)], null);
});

sablono.core.submit_button = sablono.core.wrap_attrs.call(null,sablono.core.submit_button37511);
/**
 * Creates a form reset button.
 */
sablono.core.reset_button37512 = (function sablono$core$reset_button37512(text){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input","input",556931961),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),"reset",new cljs.core.Keyword(null,"value","value",305978217),text], null)], null);
});

sablono.core.reset_button = sablono.core.wrap_attrs.call(null,sablono.core.reset_button37512);
/**
 * Create a form that points to a particular method and route.
 *   e.g. (form-to [:put "/post"]
 *       ...)
 */
sablono.core.form_to37513 = (function sablono$core$form_to37513(var_args){
var args__24566__auto__ = [];
var len__24559__auto___37520 = arguments.length;
var i__24560__auto___37521 = (0);
while(true){
if((i__24560__auto___37521 < len__24559__auto___37520)){
args__24566__auto__.push((arguments[i__24560__auto___37521]));

var G__37522 = (i__24560__auto___37521 + (1));
i__24560__auto___37521 = G__37522;
continue;
} else {
}
break;
}

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

sablono.core.form_to37513.cljs$core$IFn$_invoke$arity$variadic = (function (p__37516,body){
var vec__37517 = p__37516;
var method = cljs.core.nth.call(null,vec__37517,(0),null);
var action = cljs.core.nth.call(null,vec__37517,(1),null);
var method_str = clojure.string.upper_case.call(null,cljs.core.name.call(null,method));
var action_uri = sablono.util.to_uri.call(null,action);
return cljs.core.vec.call(null,cljs.core.concat.call(null,((cljs.core.contains_QMARK_.call(null,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"get","get",1683182755),null,new cljs.core.Keyword(null,"post","post",269697687),null], null), null),method))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"form","form",-1624062471),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"method","method",55703592),method_str,new cljs.core.Keyword(null,"action","action",-811238024),action_uri], null)], null):new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"form","form",-1624062471),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"method","method",55703592),"POST",new cljs.core.Keyword(null,"action","action",-811238024),action_uri], null),sablono.core.hidden_field.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"key","key",-1516042587),(3735928559)], null),"_method",method_str)], null)),body));
});

sablono.core.form_to37513.cljs$lang$maxFixedArity = (1);

sablono.core.form_to37513.cljs$lang$applyTo = (function (seq37514){
var G__37515 = cljs.core.first.call(null,seq37514);
var seq37514__$1 = cljs.core.next.call(null,seq37514);
return sablono.core.form_to37513.cljs$core$IFn$_invoke$arity$variadic(G__37515,seq37514__$1);
});


sablono.core.form_to = sablono.core.wrap_attrs.call(null,sablono.core.form_to37513);
