// Compiled by ClojureScript 1.7.170 {}
goog.provide('replumb.load');
goog.require('cljs.core');
goog.require('cljs.js');
goog.require('replumb.cache');
goog.require('clojure.string');
goog.require('replumb.common');
goog.require('cljs.reader');
/**
 * This load function just calls:
 *   (cb {:lang   :js
 *     :source ""})
 */
replumb.load.fake_load_fn_BANG_ = (function replumb$load$fake_load_fn_BANG_(_,cb){
return cb.call(null,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"lang","lang",-1819677104),new cljs.core.Keyword(null,"js","js",1768080579),new cljs.core.Keyword(null,"source","source",-433931539),""], null));
});
/**
 * Mimics "Resource not found" as it just calls: (cb nil)
 */
replumb.load.no_resource_load_fn_BANG_ = (function replumb$load$no_resource_load_fn_BANG_(_,cb){
return cb.call(null,null);
});
/**
 * Converts a filename to a lang keyword by inspecting the file
 *   extension.
 */
replumb.load.filename__GT_lang = (function replumb$load$filename__GT_lang(file_name){
if(clojure.string.ends_with_QMARK_.call(null,file_name,".js")){
return new cljs.core.Keyword(null,"js","js",1768080579);
} else {
return new cljs.core.Keyword(null,"clj","clj",-660495428);
}
});
/**
 * Read the cache source depending on whether is a edn or json file
 */
replumb.load.read_cache_source = (function replumb$load$read_cache_source(cache_path,cache_source){
if(clojure.string.ends_with_QMARK_.call(null,cache_path,".edn")){
return cljs.reader.read_string.call(null,cache_source);
} else {
return replumb.cache.transit_json__GT_cljs.call(null,cache_source);
}
});
/**
 * Returns the correct file extensions to try (no dot prefix), following
 *   the cljs.js/*load-fn* docstring.
 */
replumb.load.extensions = (function replumb$load$extensions(var_args){
var args13219 = [];
var len__5726__auto___13222 = arguments.length;
var i__5727__auto___13223 = (0);
while(true){
if((i__5727__auto___13223 < len__5726__auto___13222)){
args13219.push((arguments[i__5727__auto___13223]));

var G__13224 = (i__5727__auto___13223 + (1));
i__5727__auto___13223 = G__13224;
continue;
} else {
}
break;
}

var G__13221 = args13219.length;
switch (G__13221) {
case 0:
return replumb.load.extensions.cljs$core$IFn$_invoke$arity$0();

break;
case 1:
return replumb.load.extensions.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
default:
throw (new Error([cljs.core.str("Invalid arity: "),cljs.core.str(args13219.length)].join('')));

}
});

replumb.load.extensions.cljs$core$IFn$_invoke$arity$0 = (function (){
return replumb.load.extensions.call(null,false);
});

replumb.load.extensions.cljs$core$IFn$_invoke$arity$1 = (function (macros){
if(cljs.core.truth_(macros)){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["clj","cljc"], null);
} else {
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, ["cljs","cljc","js"], null);
}
});

replumb.load.extensions.cljs$lang$maxFixedArity = 1;
/**
 * Loop on the file-names using a supplied read-file-fn (fn [file-name
 *   src-cb] ...), calling back cb upon first successful read, otherwise
 *   calling back with nil.
 *   This function does not check whether parameters are nil, please do it
 *   in the caller.
 */
replumb.load.read_files_and_callback_BANG_ = (function replumb$load$read_files_and_callback_BANG_(verbose_QMARK_,file_names,read_file_fn_BANG_,load_fn_cb){
var temp__4423__auto__ = cljs.core.first.call(null,file_names);
if(cljs.core.truth_(temp__4423__auto__)){
var name = temp__4423__auto__;
if(cljs.core.truth_(verbose_QMARK_)){
replumb.common.debug_prn.call(null,"Reading",name,"...");
} else {
}

return read_file_fn_BANG_.call(null,name,((function (name,temp__4423__auto__){
return (function (source){
if(cljs.core.truth_(source)){
return load_fn_cb.call(null,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"lang","lang",-1819677104),replumb.load.filename__GT_lang.call(null,name),new cljs.core.Keyword(null,"source","source",-433931539),source], null));
} else {
if(cljs.core.truth_(verbose_QMARK_)){
replumb.common.debug_prn.call(null,"No source found...");
} else {
}

return replumb$load$read_files_and_callback_BANG_.call(null,verbose_QMARK_,cljs.core.rest.call(null,file_names),read_file_fn_BANG_,load_fn_cb);
}
});})(name,temp__4423__auto__))
);
} else {
return load_fn_cb.call(null,null);
}
});
/**
 * Loops over cached-file-names in order to retrieve them. It needs to find
 *   both the related .js file and .cache.json file, otherwise keeps looping.
 *   If it does not find the cached files calls read-files-and-callback! and
 *   tries to load the unevaluated ones.
 *   This function does not check whether parameters are nil, please do it in
 *   the caller.
 */
replumb.load.read_files_from_cache_and_callback_BANG_ = (function replumb$load$read_files_from_cache_and_callback_BANG_(verbose_QMARK_,file_names,read_file_fn_BANG_,load_fn_cb,cached_file_names){
var temp__4423__auto__ = cljs.core.first.call(null,cached_file_names);
if(cljs.core.truth_(temp__4423__auto__)){
var vec__13227 = temp__4423__auto__;
var js_path = cljs.core.nth.call(null,vec__13227,(0),null);
var cache_path = cljs.core.nth.call(null,vec__13227,(1),null);
var try_next_files_pair = ((function (vec__13227,js_path,cache_path,temp__4423__auto__){
return (function (){
return replumb$load$read_files_from_cache_and_callback_BANG_.call(null,verbose_QMARK_,file_names,read_file_fn_BANG_,load_fn_cb,cljs.core.rest.call(null,cached_file_names));
});})(vec__13227,js_path,cache_path,temp__4423__auto__))
;
if(cljs.core.truth_(verbose_QMARK_)){
replumb.common.debug_prn.call(null,"Reading",js_path,"...");
} else {
}

return read_file_fn_BANG_.call(null,js_path,((function (try_next_files_pair,vec__13227,js_path,cache_path,temp__4423__auto__){
return (function (js_source){
if(cljs.core.truth_((function (){var and__4656__auto__ = js_source;
if(cljs.core.truth_(and__4656__auto__)){
return replumb.cache.cached_js_valid_QMARK_.call(null,js_source);
} else {
return and__4656__auto__;
}
})())){
if(cljs.core.truth_(verbose_QMARK_)){
replumb.common.debug_prn.call(null,"Reading",cache_path,"...");
} else {
}

return read_file_fn_BANG_.call(null,cache_path,((function (try_next_files_pair,vec__13227,js_path,cache_path,temp__4423__auto__){
return (function (cache_source){
if(cljs.core.truth_(cache_source)){
if(cljs.core.truth_(verbose_QMARK_)){
replumb.common.debug_prn.call(null,[cljs.core.str("Retrieved from cache "),cljs.core.str(js_path),cljs.core.str(" and "),cljs.core.str(cache_path)].join(''));
} else {
}

return load_fn_cb.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"lang","lang",-1819677104),replumb.load.filename__GT_lang.call(null,js_path),new cljs.core.Keyword(null,"source","source",-433931539),js_source,new cljs.core.Keyword(null,"cache","cache",-1237023054),replumb.load.read_cache_source.call(null,cache_path,cache_source)], null));
} else {
return try_next_files_pair.call(null);
}
});})(try_next_files_pair,vec__13227,js_path,cache_path,temp__4423__auto__))
);
} else {
return try_next_files_pair.call(null);
}
});})(try_next_files_pair,vec__13227,js_path,cache_path,temp__4423__auto__))
);
} else {
if(cljs.core.truth_(verbose_QMARK_)){
replumb.common.debug_prn.call(null,"Cannot load cache files...");
} else {
}

return replumb.load.read_files_and_callback_BANG_.call(null,verbose_QMARK_,file_names,read_file_fn_BANG_,load_fn_cb);
}
});
/**
 * Produces a sequence of file paths based on src-paths and file-path (a
 *   path already including one or more "/" and an extension).
 */
replumb.load.file_paths = (function replumb$load$file_paths(src_paths,file_path){
var iter__5440__auto__ = (function replumb$load$file_paths_$_iter__13232(s__13233){
return (new cljs.core.LazySeq(null,(function (){
var s__13233__$1 = s__13233;
while(true){
var temp__4425__auto__ = cljs.core.seq.call(null,s__13233__$1);
if(temp__4425__auto__){
var s__13233__$2 = temp__4425__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__13233__$2)){
var c__5438__auto__ = cljs.core.chunk_first.call(null,s__13233__$2);
var size__5439__auto__ = cljs.core.count.call(null,c__5438__auto__);
var b__13235 = cljs.core.chunk_buffer.call(null,size__5439__auto__);
if((function (){var i__13234 = (0);
while(true){
if((i__13234 < size__5439__auto__)){
var src_path = cljs.core._nth.call(null,c__5438__auto__,i__13234);
cljs.core.chunk_append.call(null,b__13235,[cljs.core.str(replumb.common.normalize_path.call(null,src_path)),cljs.core.str(file_path)].join(''));

var G__13236 = (i__13234 + (1));
i__13234 = G__13236;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13235),replumb$load$file_paths_$_iter__13232.call(null,cljs.core.chunk_rest.call(null,s__13233__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13235),null);
}
} else {
var src_path = cljs.core.first.call(null,s__13233__$2);
return cljs.core.cons.call(null,[cljs.core.str(replumb.common.normalize_path.call(null,src_path)),cljs.core.str(file_path)].join(''),replumb$load$file_paths_$_iter__13232.call(null,cljs.core.rest.call(null,s__13233__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__5440__auto__.call(null,src_paths);
});
/**
 * Produces a sequence of file names to try reading from src-paths and
 *   file-path-without-ext (it should already include one or more
 *   "/"). The right order and extension is taken from cljs.js/*load-fn*
 *   docstring and takes into consideration the macros parameter.
 */
replumb.load.file_paths_for_load_fn = (function replumb$load$file_paths_for_load_fn(src_paths,macros,file_path_without_ext){
var iter__5440__auto__ = (function replumb$load$file_paths_for_load_fn_$_iter__13243(s__13244){
return (new cljs.core.LazySeq(null,(function (){
var s__13244__$1 = s__13244;
while(true){
var temp__4425__auto__ = cljs.core.seq.call(null,s__13244__$1);
if(temp__4425__auto__){
var xs__4977__auto__ = temp__4425__auto__;
var extension = cljs.core.first.call(null,xs__4977__auto__);
var iterys__5436__auto__ = ((function (s__13244__$1,extension,xs__4977__auto__,temp__4425__auto__){
return (function replumb$load$file_paths_for_load_fn_$_iter__13243_$_iter__13245(s__13246){
return (new cljs.core.LazySeq(null,((function (s__13244__$1,extension,xs__4977__auto__,temp__4425__auto__){
return (function (){
var s__13246__$1 = s__13246;
while(true){
var temp__4425__auto____$1 = cljs.core.seq.call(null,s__13246__$1);
if(temp__4425__auto____$1){
var s__13246__$2 = temp__4425__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__13246__$2)){
var c__5438__auto__ = cljs.core.chunk_first.call(null,s__13246__$2);
var size__5439__auto__ = cljs.core.count.call(null,c__5438__auto__);
var b__13248 = cljs.core.chunk_buffer.call(null,size__5439__auto__);
if((function (){var i__13247 = (0);
while(true){
if((i__13247 < size__5439__auto__)){
var src_path = cljs.core._nth.call(null,c__5438__auto__,i__13247);
cljs.core.chunk_append.call(null,b__13248,[cljs.core.str(src_path),cljs.core.str("."),cljs.core.str(extension)].join(''));

var G__13249 = (i__13247 + (1));
i__13247 = G__13249;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13248),replumb$load$file_paths_for_load_fn_$_iter__13243_$_iter__13245.call(null,cljs.core.chunk_rest.call(null,s__13246__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13248),null);
}
} else {
var src_path = cljs.core.first.call(null,s__13246__$2);
return cljs.core.cons.call(null,[cljs.core.str(src_path),cljs.core.str("."),cljs.core.str(extension)].join(''),replumb$load$file_paths_for_load_fn_$_iter__13243_$_iter__13245.call(null,cljs.core.rest.call(null,s__13246__$2)));
}
} else {
return null;
}
break;
}
});})(s__13244__$1,extension,xs__4977__auto__,temp__4425__auto__))
,null,null));
});})(s__13244__$1,extension,xs__4977__auto__,temp__4425__auto__))
;
var fs__5437__auto__ = cljs.core.seq.call(null,iterys__5436__auto__.call(null,replumb.load.file_paths.call(null,src_paths,file_path_without_ext)));
if(fs__5437__auto__){
return cljs.core.concat.call(null,fs__5437__auto__,replumb$load$file_paths_for_load_fn_$_iter__13243.call(null,cljs.core.rest.call(null,s__13244__$1)));
} else {
var G__13250 = cljs.core.rest.call(null,s__13244__$1);
s__13244__$1 = G__13250;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__5440__auto__.call(null,replumb.load.extensions.call(null,macros));
});
/**
 * Produces a sequence of pairs containing the file paths to try reading for
 *   evaluation caching.
 *   The first file is always a ".js" file while the second is the cache file
 *   and can be a ".json" or ".edn" file.
 */
replumb.load.cache_file_paths_for_load_fn = (function replumb$load$cache_file_paths_for_load_fn(cache_paths,macros,file_path_without_ext){
var iter__5440__auto__ = (function replumb$load$cache_file_paths_for_load_fn_$_iter__13260(s__13261){
return (new cljs.core.LazySeq(null,(function (){
var s__13261__$1 = s__13261;
while(true){
var temp__4425__auto__ = cljs.core.seq.call(null,s__13261__$1);
if(temp__4425__auto__){
var xs__4977__auto__ = temp__4425__auto__;
var extension = cljs.core.first.call(null,xs__4977__auto__);
var iterys__5436__auto__ = ((function (s__13261__$1,extension,xs__4977__auto__,temp__4425__auto__){
return (function replumb$load$cache_file_paths_for_load_fn_$_iter__13260_$_iter__13262(s__13263){
return (new cljs.core.LazySeq(null,((function (s__13261__$1,extension,xs__4977__auto__,temp__4425__auto__){
return (function (){
var s__13263__$1 = s__13263;
while(true){
var temp__4425__auto____$1 = cljs.core.seq.call(null,s__13263__$1);
if(temp__4425__auto____$1){
var xs__4977__auto____$1 = temp__4425__auto____$1;
var cache_extension = cljs.core.first.call(null,xs__4977__auto____$1);
var iterys__5436__auto__ = ((function (s__13263__$1,s__13261__$1,cache_extension,xs__4977__auto____$1,temp__4425__auto____$1,extension,xs__4977__auto__,temp__4425__auto__){
return (function replumb$load$cache_file_paths_for_load_fn_$_iter__13260_$_iter__13262_$_iter__13264(s__13265){
return (new cljs.core.LazySeq(null,((function (s__13263__$1,s__13261__$1,cache_extension,xs__4977__auto____$1,temp__4425__auto____$1,extension,xs__4977__auto__,temp__4425__auto__){
return (function (){
var s__13265__$1 = s__13265;
while(true){
var temp__4425__auto____$2 = cljs.core.seq.call(null,s__13265__$1);
if(temp__4425__auto____$2){
var s__13265__$2 = temp__4425__auto____$2;
if(cljs.core.chunked_seq_QMARK_.call(null,s__13265__$2)){
var c__5438__auto__ = cljs.core.chunk_first.call(null,s__13265__$2);
var size__5439__auto__ = cljs.core.count.call(null,c__5438__auto__);
var b__13267 = cljs.core.chunk_buffer.call(null,size__5439__auto__);
if((function (){var i__13266 = (0);
while(true){
if((i__13266 < size__5439__auto__)){
var src_path = cljs.core._nth.call(null,c__5438__auto__,i__13266);
cljs.core.chunk_append.call(null,b__13267,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [[cljs.core.str(src_path),cljs.core.str(".js")].join(''),[cljs.core.str(src_path),cljs.core.str(extension),cljs.core.str(cache_extension)].join('')], null));

var G__13268 = (i__13266 + (1));
i__13266 = G__13268;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13267),replumb$load$cache_file_paths_for_load_fn_$_iter__13260_$_iter__13262_$_iter__13264.call(null,cljs.core.chunk_rest.call(null,s__13265__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13267),null);
}
} else {
var src_path = cljs.core.first.call(null,s__13265__$2);
return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [[cljs.core.str(src_path),cljs.core.str(".js")].join(''),[cljs.core.str(src_path),cljs.core.str(extension),cljs.core.str(cache_extension)].join('')], null),replumb$load$cache_file_paths_for_load_fn_$_iter__13260_$_iter__13262_$_iter__13264.call(null,cljs.core.rest.call(null,s__13265__$2)));
}
} else {
return null;
}
break;
}
});})(s__13263__$1,s__13261__$1,cache_extension,xs__4977__auto____$1,temp__4425__auto____$1,extension,xs__4977__auto__,temp__4425__auto__))
,null,null));
});})(s__13263__$1,s__13261__$1,cache_extension,xs__4977__auto____$1,temp__4425__auto____$1,extension,xs__4977__auto__,temp__4425__auto__))
;
var fs__5437__auto__ = cljs.core.seq.call(null,iterys__5436__auto__.call(null,cljs.core.into.call(null,replumb.load.file_paths.call(null,cache_paths,file_path_without_ext),replumb.load.file_paths.call(null,cache_paths,replumb.cache.cache_prefix_for_path.call(null,file_path_without_ext,macros)))));
if(fs__5437__auto__){
return cljs.core.concat.call(null,fs__5437__auto__,replumb$load$cache_file_paths_for_load_fn_$_iter__13260_$_iter__13262.call(null,cljs.core.rest.call(null,s__13263__$1)));
} else {
var G__13269 = cljs.core.rest.call(null,s__13263__$1);
s__13263__$1 = G__13269;
continue;
}
} else {
return null;
}
break;
}
});})(s__13261__$1,extension,xs__4977__auto__,temp__4425__auto__))
,null,null));
});})(s__13261__$1,extension,xs__4977__auto__,temp__4425__auto__))
;
var fs__5437__auto__ = cljs.core.seq.call(null,iterys__5436__auto__.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [".cache.json",".cache.edn"], null)));
if(fs__5437__auto__){
return cljs.core.concat.call(null,fs__5437__auto__,replumb$load$cache_file_paths_for_load_fn_$_iter__13260.call(null,cljs.core.rest.call(null,s__13261__$1)));
} else {
var G__13270 = cljs.core.rest.call(null,s__13261__$1);
s__13261__$1 = G__13270;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__5440__auto__.call(null,cljs.core.cons.call(null,"",cljs.core.map.call(null,((function (iter__5440__auto__){
return (function (p1__13251_SHARP_){
return [cljs.core.str("."),cljs.core.str(p1__13251_SHARP_)].join('');
});})(iter__5440__auto__))
,replumb.load.extensions.call(null,macros))));
});
/**
 * Produces a sequence of filenames to try reading crafted for goog
 *   libraries, in the order they should be tried.
 */
replumb.load.file_paths_for_closure = (function replumb$load$file_paths_for_closure(src_paths,goog_path){
var iter__5440__auto__ = (function replumb$load$file_paths_for_closure_$_iter__13275(s__13276){
return (new cljs.core.LazySeq(null,(function (){
var s__13276__$1 = s__13276;
while(true){
var temp__4425__auto__ = cljs.core.seq.call(null,s__13276__$1);
if(temp__4425__auto__){
var s__13276__$2 = temp__4425__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__13276__$2)){
var c__5438__auto__ = cljs.core.chunk_first.call(null,s__13276__$2);
var size__5439__auto__ = cljs.core.count.call(null,c__5438__auto__);
var b__13278 = cljs.core.chunk_buffer.call(null,size__5439__auto__);
if((function (){var i__13277 = (0);
while(true){
if((i__13277 < size__5439__auto__)){
var src_path = cljs.core._nth.call(null,c__5438__auto__,i__13277);
cljs.core.chunk_append.call(null,b__13278,[cljs.core.str(replumb.common.normalize_path.call(null,src_path)),cljs.core.str(goog_path),cljs.core.str(".js")].join(''));

var G__13279 = (i__13277 + (1));
i__13277 = G__13279;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13278),replumb$load$file_paths_for_closure_$_iter__13275.call(null,cljs.core.chunk_rest.call(null,s__13276__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13278),null);
}
} else {
var src_path = cljs.core.first.call(null,s__13276__$2);
return cljs.core.cons.call(null,[cljs.core.str(replumb.common.normalize_path.call(null,src_path)),cljs.core.str(goog_path),cljs.core.str(".js")].join(''),replumb$load$file_paths_for_closure_$_iter__13275.call(null,cljs.core.rest.call(null,s__13276__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__5440__auto__.call(null,src_paths);
});
replumb.load.skip_load_QMARK_ = (function replumb$load$skip_load_QMARK_(p__13280){
var map__13283 = p__13280;
var map__13283__$1 = ((((!((map__13283 == null)))?((((map__13283.cljs$lang$protocol_mask$partition0$ & (64))) || (map__13283.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__13283):map__13283);
var name = cljs.core.get.call(null,map__13283__$1,new cljs.core.Keyword(null,"name","name",1843675177));
var macros = cljs.core.get.call(null,map__13283__$1,new cljs.core.Keyword(null,"macros","macros",811339431));
var or__4668__auto__ = cljs.core._EQ_.call(null,name,new cljs.core.Symbol(null,"cljs.core","cljs.core",770546058,null));
if(or__4668__auto__){
return or__4668__auto__;
} else {
var or__4668__auto____$1 = cljs.core._EQ_.call(null,name,new cljs.core.Symbol(null,"cljs.analyzer","cljs.analyzer",1897881911,null));
if(or__4668__auto____$1){
return or__4668__auto____$1;
} else {
var or__4668__auto____$2 = (function (){var and__4656__auto__ = cljs.core._EQ_.call(null,name,new cljs.core.Symbol(null,"cljs.pprint","cljs.pprint",-966900911,null));
if(and__4656__auto__){
return macros;
} else {
return and__4656__auto__;
}
})();
if(cljs.core.truth_(or__4668__auto____$2)){
return or__4668__auto____$2;
} else {
var or__4668__auto____$3 = (function (){var and__4656__auto__ = cljs.core._EQ_.call(null,name,new cljs.core.Symbol(null,"cljs.test","cljs.test",884805483,null));
if(and__4656__auto__){
return macros;
} else {
return and__4656__auto__;
}
})();
if(cljs.core.truth_(or__4668__auto____$3)){
return or__4668__auto____$3;
} else {
var and__4656__auto__ = cljs.core._EQ_.call(null,name,new cljs.core.Symbol(null,"clojure.template","clojure.template",-1162325089,null));
if(and__4656__auto__){
return macros;
} else {
return and__4656__auto__;
}
}
}
}
}
});
