// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.search');
goog.require('cljs.core');
goog.require('crate.binding');
goog.require('lt.util.js');
goog.require('lt.objs.thread');
goog.require('lt.objs.files');
goog.require('lt.util.js');
goog.require('lt.util.dom');
goog.require('lt.objs.context');
goog.require('lt.objs.platform');
goog.require('lt.objs.tabs');
goog.require('crate.core');
goog.require('lt.objs.workspace');
goog.require('lt.objs.context');
goog.require('lt.objs.notifos');
goog.require('lt.objs.proc');
goog.require('lt.objs.notifos');
goog.require('lt.util.dom');
goog.require('lt.objs.editor.pool');
goog.require('clojure.string');
goog.require('lt.objs.command');
goog.require('lt.objs.platform');
goog.require('lt.objs.files');
goog.require('lt.objs.thread');
goog.require('lt.util.load');
goog.require('clojure.string');
goog.require('lt.objs.workspace');
goog.require('crate.binding');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.util.load');
goog.require('lt.objs.proc');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor');
goog.require('crate.core');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.command');
lt.objs.search.search_BANG_ = lt.objs.thread.thread_STAR_.call(null,(function tfun13193(){var orig__3398__auto__ = argsArray(arguments);var msg__3399__auto__ = orig__3398__auto__.shift();var args__3400__auto__ = orig__3398__auto__.map(cljs.reader.read_string);var raise = ((function (orig__3398__auto__,msg__3399__auto__,args__3400__auto__){
return (function (obj__3401__auto__,k__3402__auto__,v__3403__auto__){return _send(obj__3401__auto__,k__3402__auto__,cljs.core.pr_str.call(null,v__3403__auto__),"clj");
});})(orig__3398__auto__,msg__3399__auto__,args__3400__auto__))
;args__3400__auto__.unshift(msg__3399__auto__.obj);
return (function (obj_id,opts){var replacer = require([cljs.core.str(ltpath),cljs.core.str("/core/node_modules/replace")].join(''));var search = (function (){var temp__4090__auto__ = cljs.core.re_seq.call(null,/^\/(.+)\/$/,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(opts));if(cljs.core.truth_(temp__4090__auto__))
{var pattern = temp__4090__auto__;return (new RegExp(cljs.core.second.call(null,cljs.core.first.call(null,pattern))));
} else
{return new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(opts);
}
})();var final$ = replacer.call(null,cljs.core.clj__GT_js.call(null,new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null,"regex","regex",1122296761),search,new cljs.core.Keyword(null,"exclude","exclude",3987722572),(cljs.core.truth_(new cljs.core.Keyword(null,"exclude","exclude",3987722572).cljs$core$IFn$_invoke$arity$1(opts))?(new RegExp(new cljs.core.Keyword(null,"exclude","exclude",3987722572).cljs$core$IFn$_invoke$arity$1(opts))):null),new cljs.core.Keyword(null,"recursive","recursive",2179684260),true,new cljs.core.Keyword(null,"ignoreCase","ignoreCase",1893967764),!(cljs.core.boolean$.call(null,cljs.core.re_seq.call(null,/[A-Z]/,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(opts)))),new cljs.core.Keyword(null,"replacement","replacement",1444823428),new cljs.core.Keyword(null,"replacement","replacement",1444823428).cljs$core$IFn$_invoke$arity$1(opts),new cljs.core.Keyword(null,"paths","paths",1120343136),new cljs.core.Keyword(null,"paths","paths",1120343136).cljs$core$IFn$_invoke$arity$1(opts),new cljs.core.Keyword(null,"result","result",4374444943),((function (replacer,search){
return (function (r){return _send(obj_id,new cljs.core.Keyword(null,"result","result",4374444943),r);
});})(replacer,search))
], null)));return raise.call(null,obj_id,new cljs.core.Keyword(null,"done-searching","done-searching",1230467105),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"total","total",1124454070),final$.totalFiles,new cljs.core.Keyword(null,"time","time",1017464383),final$.time,new cljs.core.Keyword(null,"replace?","replace?",583571325),cljs.core.boolean$.call(null,new cljs.core.Keyword(null,"replacement","replacement",1444823428).cljs$core$IFn$_invoke$arity$1(opts))], null));
}).apply(null,args__3400__auto__);
}));
lt.objs.search.result_threshold = 500;
lt.objs.search.location = (function (){var method_table__4372__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var prefer_table__4373__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var method_cache__4374__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var cached_hierarchy__4375__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var hierarchy__4376__auto__ = cljs.core.get.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"hierarchy","hierarchy",3129050535),cljs.core.get_global_hierarchy.call(null));return (new cljs.core.MultiFn("location",cljs.core.identity,new cljs.core.Keyword(null,"default","default",2558708147),hierarchy__4376__auto__,method_table__4372__auto__,prefer_table__4373__auto__,method_cache__4374__auto__,cached_hierarchy__4375__auto__));
})();
cljs.core._add_method.call(null,lt.objs.search.location,"<workspace>",(function (_){return cljs.core.apply.call(null,cljs.core.concat,cljs.core.juxt.call(null,new cljs.core.Keyword(null,"folders","folders",4625622327),new cljs.core.Keyword(null,"files","files",1111338473)).call(null,lt.objs.workspace.serialize.call(null,cljs.core.deref.call(null,lt.objs.workspace.current_ws))));
}));
cljs.core._add_method.call(null,lt.objs.search.location,new cljs.core.Keyword(null,"default","default",2558708147),(function (loc){return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [loc], null);
}));
lt.objs.search.string__GT_loc = (function string__GT_loc(loc_str){return cljs.core.mapcat.call(null,cljs.core.comp.call(null,lt.objs.search.location,clojure.string.trim),cljs.core.remove.call(null,cljs.core.empty_QMARK_,clojure.string.split.call(null,loc_str,",")));
});
lt.objs.search.__GT_res = (function __GT_res(this$){return lt.util.dom.$.call(null,new cljs.core.Keyword(null,".res",".res",1015387428),lt.object.__GT_content.call(null,this$));
});
lt.objs.search.__GT_entry = (function __GT_entry(r,file){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"p.entry","p.entry",3043677414),crate.core.raw.call(null,[cljs.core.str("<span class='line'>"),cljs.core.str(r.line),cljs.core.str("</span><pre>"),cljs.core.str(r.text),cljs.core.str("</pre>")].join(''))], null));var seq__13200_13206 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),file);
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"goto-line","goto-line",2802035088),r.line);
})], null)));var chunk__13201_13207 = null;var count__13202_13208 = 0;var i__13203_13209 = 0;while(true){
if((i__13203_13209 < count__13202_13208))
{var vec__13204_13210 = cljs.core._nth.call(null,chunk__13201_13207,i__13203_13209);var ev__3326__auto___13211 = cljs.core.nth.call(null,vec__13204_13210,0,null);var func__3327__auto___13212 = cljs.core.nth.call(null,vec__13204_13210,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13211,func__3327__auto___13212);
{
var G__13213 = seq__13200_13206;
var G__13214 = chunk__13201_13207;
var G__13215 = count__13202_13208;
var G__13216 = (i__13203_13209 + 1);
seq__13200_13206 = G__13213;
chunk__13201_13207 = G__13214;
count__13202_13208 = G__13215;
i__13203_13209 = G__13216;
continue;
}
} else
{var temp__4092__auto___13217 = cljs.core.seq.call(null,seq__13200_13206);if(temp__4092__auto___13217)
{var seq__13200_13218__$1 = temp__4092__auto___13217;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13200_13218__$1))
{var c__4262__auto___13219 = cljs.core.chunk_first.call(null,seq__13200_13218__$1);{
var G__13220 = cljs.core.chunk_rest.call(null,seq__13200_13218__$1);
var G__13221 = c__4262__auto___13219;
var G__13222 = cljs.core.count.call(null,c__4262__auto___13219);
var G__13223 = 0;
seq__13200_13206 = G__13220;
chunk__13201_13207 = G__13221;
count__13202_13208 = G__13222;
i__13203_13209 = G__13223;
continue;
}
} else
{var vec__13205_13224 = cljs.core.first.call(null,seq__13200_13218__$1);var ev__3326__auto___13225 = cljs.core.nth.call(null,vec__13205_13224,0,null);var func__3327__auto___13226 = cljs.core.nth.call(null,vec__13205_13224,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13225,func__3327__auto___13226);
{
var G__13227 = cljs.core.next.call(null,seq__13200_13218__$1);
var G__13228 = null;
var G__13229 = 0;
var G__13230 = 0;
seq__13200_13206 = G__13227;
chunk__13201_13207 = G__13228;
count__13202_13208 = G__13229;
i__13203_13209 = G__13230;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.__GT_result_item = (function __GT_result_item(r){var e__3325__auto__ = crate.core.html.call(null,(function (){var file = r.file;return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"p.path","p.path",4266284629),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.file","span.file",4619643154),lt.objs.files.basename.call(null,file)], null),"(",lt.objs.files.parent.call(null,file),")"], null),(function (){var iter__4231__auto__ = ((function (file){
return (function iter__13241(s__13242){return (new cljs.core.LazySeq(null,((function (file){
return (function (){var s__13242__$1 = s__13242;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__13242__$1);if(temp__4092__auto__)
{var s__13242__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__13242__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__13242__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__13244 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__13243 = 0;while(true){
if((i__13243 < size__4230__auto__))
{var r__$1 = cljs.core._nth.call(null,c__4229__auto__,i__13243);cljs.core.chunk_append.call(null,b__13244,lt.objs.search.__GT_entry.call(null,r__$1,file));
{
var G__13251 = (i__13243 + 1);
i__13243 = G__13251;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13244),iter__13241.call(null,cljs.core.chunk_rest.call(null,s__13242__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13244),null);
}
} else
{var r__$1 = cljs.core.first.call(null,s__13242__$2);return cljs.core.cons.call(null,lt.objs.search.__GT_entry.call(null,r__$1,file),iter__13241.call(null,cljs.core.rest.call(null,s__13242__$2)));
}
} else
{return null;
}
break;
}
});})(file))
,null,null));
});})(file))
;return iter__4231__auto__.call(null,r.results);
})()], null);
})());var seq__13245_13252 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__13246_13253 = null;var count__13247_13254 = 0;var i__13248_13255 = 0;while(true){
if((i__13248_13255 < count__13247_13254))
{var vec__13249_13256 = cljs.core._nth.call(null,chunk__13246_13253,i__13248_13255);var ev__3326__auto___13257 = cljs.core.nth.call(null,vec__13249_13256,0,null);var func__3327__auto___13258 = cljs.core.nth.call(null,vec__13249_13256,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13257,func__3327__auto___13258);
{
var G__13259 = seq__13245_13252;
var G__13260 = chunk__13246_13253;
var G__13261 = count__13247_13254;
var G__13262 = (i__13248_13255 + 1);
seq__13245_13252 = G__13259;
chunk__13246_13253 = G__13260;
count__13247_13254 = G__13261;
i__13248_13255 = G__13262;
continue;
}
} else
{var temp__4092__auto___13263 = cljs.core.seq.call(null,seq__13245_13252);if(temp__4092__auto___13263)
{var seq__13245_13264__$1 = temp__4092__auto___13263;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13245_13264__$1))
{var c__4262__auto___13265 = cljs.core.chunk_first.call(null,seq__13245_13264__$1);{
var G__13266 = cljs.core.chunk_rest.call(null,seq__13245_13264__$1);
var G__13267 = c__4262__auto___13265;
var G__13268 = cljs.core.count.call(null,c__4262__auto___13265);
var G__13269 = 0;
seq__13245_13252 = G__13266;
chunk__13246_13253 = G__13267;
count__13247_13254 = G__13268;
i__13248_13255 = G__13269;
continue;
}
} else
{var vec__13250_13270 = cljs.core.first.call(null,seq__13245_13264__$1);var ev__3326__auto___13271 = cljs.core.nth.call(null,vec__13250_13270,0,null);var func__3327__auto___13272 = cljs.core.nth.call(null,vec__13250_13270,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13271,func__3327__auto___13272);
{
var G__13273 = cljs.core.next.call(null,seq__13245_13264__$1);
var G__13274 = null;
var G__13275 = 0;
var G__13276 = 0;
seq__13245_13252 = G__13273;
chunk__13246_13253 = G__13274;
count__13247_13254 = G__13275;
i__13248_13255 = G__13276;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.search_box = (function search_box(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input.search","input.search",1599745982),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"Search"], null)], null));var seq__13283_13289 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"searcher.search","searcher.search",1646738643),this$);
return lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input.search","input.search",1599745982),lt.object.__GT_content.call(null,this$)).select();
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"searcher.search","searcher.search",1646738643));
})], null)));var chunk__13284_13290 = null;var count__13285_13291 = 0;var i__13286_13292 = 0;while(true){
if((i__13286_13292 < count__13285_13291))
{var vec__13287_13293 = cljs.core._nth.call(null,chunk__13284_13290,i__13286_13292);var ev__3326__auto___13294 = cljs.core.nth.call(null,vec__13287_13293,0,null);var func__3327__auto___13295 = cljs.core.nth.call(null,vec__13287_13293,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13294,func__3327__auto___13295);
{
var G__13296 = seq__13283_13289;
var G__13297 = chunk__13284_13290;
var G__13298 = count__13285_13291;
var G__13299 = (i__13286_13292 + 1);
seq__13283_13289 = G__13296;
chunk__13284_13290 = G__13297;
count__13285_13291 = G__13298;
i__13286_13292 = G__13299;
continue;
}
} else
{var temp__4092__auto___13300 = cljs.core.seq.call(null,seq__13283_13289);if(temp__4092__auto___13300)
{var seq__13283_13301__$1 = temp__4092__auto___13300;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13283_13301__$1))
{var c__4262__auto___13302 = cljs.core.chunk_first.call(null,seq__13283_13301__$1);{
var G__13303 = cljs.core.chunk_rest.call(null,seq__13283_13301__$1);
var G__13304 = c__4262__auto___13302;
var G__13305 = cljs.core.count.call(null,c__4262__auto___13302);
var G__13306 = 0;
seq__13283_13289 = G__13303;
chunk__13284_13290 = G__13304;
count__13285_13291 = G__13305;
i__13286_13292 = G__13306;
continue;
}
} else
{var vec__13288_13307 = cljs.core.first.call(null,seq__13283_13301__$1);var ev__3326__auto___13308 = cljs.core.nth.call(null,vec__13288_13307,0,null);var func__3327__auto___13309 = cljs.core.nth.call(null,vec__13288_13307,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13308,func__3327__auto___13309);
{
var G__13310 = cljs.core.next.call(null,seq__13283_13301__$1);
var G__13311 = null;
var G__13312 = 0;
var G__13313 = 0;
seq__13283_13289 = G__13310;
chunk__13284_13290 = G__13311;
count__13285_13291 = G__13312;
i__13286_13292 = G__13313;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.replace_box = (function replace_box(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input.replace","input.replace",1121297410),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"Replace"], null)], null));var seq__13320_13326 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"searcher.replace","searcher.replace",2578069901),this$);
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"searcher.replace","searcher.replace",2578069901));
})], null)));var chunk__13321_13327 = null;var count__13322_13328 = 0;var i__13323_13329 = 0;while(true){
if((i__13323_13329 < count__13322_13328))
{var vec__13324_13330 = cljs.core._nth.call(null,chunk__13321_13327,i__13323_13329);var ev__3326__auto___13331 = cljs.core.nth.call(null,vec__13324_13330,0,null);var func__3327__auto___13332 = cljs.core.nth.call(null,vec__13324_13330,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13331,func__3327__auto___13332);
{
var G__13333 = seq__13320_13326;
var G__13334 = chunk__13321_13327;
var G__13335 = count__13322_13328;
var G__13336 = (i__13323_13329 + 1);
seq__13320_13326 = G__13333;
chunk__13321_13327 = G__13334;
count__13322_13328 = G__13335;
i__13323_13329 = G__13336;
continue;
}
} else
{var temp__4092__auto___13337 = cljs.core.seq.call(null,seq__13320_13326);if(temp__4092__auto___13337)
{var seq__13320_13338__$1 = temp__4092__auto___13337;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13320_13338__$1))
{var c__4262__auto___13339 = cljs.core.chunk_first.call(null,seq__13320_13338__$1);{
var G__13340 = cljs.core.chunk_rest.call(null,seq__13320_13338__$1);
var G__13341 = c__4262__auto___13339;
var G__13342 = cljs.core.count.call(null,c__4262__auto___13339);
var G__13343 = 0;
seq__13320_13326 = G__13340;
chunk__13321_13327 = G__13341;
count__13322_13328 = G__13342;
i__13323_13329 = G__13343;
continue;
}
} else
{var vec__13325_13344 = cljs.core.first.call(null,seq__13320_13338__$1);var ev__3326__auto___13345 = cljs.core.nth.call(null,vec__13325_13344,0,null);var func__3327__auto___13346 = cljs.core.nth.call(null,vec__13325_13344,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13345,func__3327__auto___13346);
{
var G__13347 = cljs.core.next.call(null,seq__13320_13338__$1);
var G__13348 = null;
var G__13349 = 0;
var G__13350 = 0;
seq__13320_13326 = G__13347;
chunk__13321_13327 = G__13348;
count__13322_13328 = G__13349;
i__13323_13329 = G__13350;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.replace_all_button = (function replace_all_button(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"button.replace","button.replace",910855018),"Replace All"], null));var seq__13357_13363 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"searcher.replace-all","searcher.replace-all",1613341281));
})], null)));var chunk__13358_13364 = null;var count__13359_13365 = 0;var i__13360_13366 = 0;while(true){
if((i__13360_13366 < count__13359_13365))
{var vec__13361_13367 = cljs.core._nth.call(null,chunk__13358_13364,i__13360_13366);var ev__3326__auto___13368 = cljs.core.nth.call(null,vec__13361_13367,0,null);var func__3327__auto___13369 = cljs.core.nth.call(null,vec__13361_13367,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13368,func__3327__auto___13369);
{
var G__13370 = seq__13357_13363;
var G__13371 = chunk__13358_13364;
var G__13372 = count__13359_13365;
var G__13373 = (i__13360_13366 + 1);
seq__13357_13363 = G__13370;
chunk__13358_13364 = G__13371;
count__13359_13365 = G__13372;
i__13360_13366 = G__13373;
continue;
}
} else
{var temp__4092__auto___13374 = cljs.core.seq.call(null,seq__13357_13363);if(temp__4092__auto___13374)
{var seq__13357_13375__$1 = temp__4092__auto___13374;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13357_13375__$1))
{var c__4262__auto___13376 = cljs.core.chunk_first.call(null,seq__13357_13375__$1);{
var G__13377 = cljs.core.chunk_rest.call(null,seq__13357_13375__$1);
var G__13378 = c__4262__auto___13376;
var G__13379 = cljs.core.count.call(null,c__4262__auto___13376);
var G__13380 = 0;
seq__13357_13363 = G__13377;
chunk__13358_13364 = G__13378;
count__13359_13365 = G__13379;
i__13360_13366 = G__13380;
continue;
}
} else
{var vec__13362_13381 = cljs.core.first.call(null,seq__13357_13375__$1);var ev__3326__auto___13382 = cljs.core.nth.call(null,vec__13362_13381,0,null);var func__3327__auto___13383 = cljs.core.nth.call(null,vec__13362_13381,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13382,func__3327__auto___13383);
{
var G__13384 = cljs.core.next.call(null,seq__13357_13375__$1);
var G__13385 = null;
var G__13386 = 0;
var G__13387 = 0;
seq__13357_13363 = G__13384;
chunk__13358_13364 = G__13385;
count__13359_13365 = G__13386;
i__13360_13366 = G__13387;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.location_box = (function location_box(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"input.loc","input.loc",2719736462),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"Locations",new cljs.core.Keyword(null,"value","value",1125876963),"<workspace>"], null)], null));var seq__13394_13400 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"searcher.location","searcher.location",4589776032),this$);
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"searcher.location","searcher.location",4589776032));
})], null)));var chunk__13395_13401 = null;var count__13396_13402 = 0;var i__13397_13403 = 0;while(true){
if((i__13397_13403 < count__13396_13402))
{var vec__13398_13404 = cljs.core._nth.call(null,chunk__13395_13401,i__13397_13403);var ev__3326__auto___13405 = cljs.core.nth.call(null,vec__13398_13404,0,null);var func__3327__auto___13406 = cljs.core.nth.call(null,vec__13398_13404,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13405,func__3327__auto___13406);
{
var G__13407 = seq__13394_13400;
var G__13408 = chunk__13395_13401;
var G__13409 = count__13396_13402;
var G__13410 = (i__13397_13403 + 1);
seq__13394_13400 = G__13407;
chunk__13395_13401 = G__13408;
count__13396_13402 = G__13409;
i__13397_13403 = G__13410;
continue;
}
} else
{var temp__4092__auto___13411 = cljs.core.seq.call(null,seq__13394_13400);if(temp__4092__auto___13411)
{var seq__13394_13412__$1 = temp__4092__auto___13411;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13394_13412__$1))
{var c__4262__auto___13413 = cljs.core.chunk_first.call(null,seq__13394_13412__$1);{
var G__13414 = cljs.core.chunk_rest.call(null,seq__13394_13412__$1);
var G__13415 = c__4262__auto___13413;
var G__13416 = cljs.core.count.call(null,c__4262__auto___13413);
var G__13417 = 0;
seq__13394_13400 = G__13414;
chunk__13395_13401 = G__13415;
count__13396_13402 = G__13416;
i__13397_13403 = G__13417;
continue;
}
} else
{var vec__13399_13418 = cljs.core.first.call(null,seq__13394_13412__$1);var ev__3326__auto___13419 = cljs.core.nth.call(null,vec__13399_13418,0,null);var func__3327__auto___13420 = cljs.core.nth.call(null,vec__13399_13418,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13419,func__3327__auto___13420);
{
var G__13421 = cljs.core.next.call(null,seq__13394_13412__$1);
var G__13422 = null;
var G__13423 = 0;
var G__13424 = 0;
seq__13394_13400 = G__13421;
chunk__13395_13401 = G__13422;
count__13396_13402 = G__13423;
i__13397_13403 = G__13424;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.search.__GT_search_info = (function __GT_search_info(this$){var search = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$));var replace = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".replace",".replace",673297976),lt.object.__GT_content.call(null,this$));var loc = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".loc",".loc",1015381956),lt.object.__GT_content.call(null,this$));return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"search","search",4402534682),lt.util.dom.val.call(null,search),new cljs.core.Keyword(null,"replace","replace",2108401190),lt.util.dom.val.call(null,replace),new cljs.core.Keyword(null,"loc","loc",1014011570),lt.util.dom.val.call(null,loc)], null);
});
lt.objs.search.__BEH__on_close = (function __BEH__on_close(this$){return lt.objs.tabs.rem_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","on-close","lt.objs.search/on-close",852635541),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__on_close,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"close","close",1108660586),null], null), null));
lt.objs.search.__BEH__clear_BANG_ = (function __BEH__clear_BANG_(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"timeout","timeout",3994960083),null,new cljs.core.Keyword(null,"results","results",2111450984),[],new cljs.core.Keyword(null,"result-count","result-count",4392277713),0,new cljs.core.Keyword("lt.objs.search","time","lt.objs.search/time",714622424),null,new cljs.core.Keyword("lt.objs.search","filesSearched","lt.objs.search/filesSearched",2511844033),null,new cljs.core.Keyword(null,"position","position",1761709211),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [0,-1], null)], null));
return lt.util.dom.empty.call(null,lt.objs.search.__GT_res.call(null,this$));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","clear!","lt.objs.search/clear!",4760733279),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__clear_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"clear!","clear!",3951036134),null], null), null));
lt.objs.search.__BEH__search_BANG_ = (function __BEH__search_BANG_(this$,search_info){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
var info = (function (){var or__3520__auto__ = search_info;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.objs.search.__GT_search_info.call(null,this$);
}
})();if(cljs.core.empty_QMARK_.call(null,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(info)))
{return null;
} else
{lt.object.merge_BANG_.call(null,this$,info);
lt.objs.notifos.working.call(null,"Searching workspace...");
return lt.objs.search.search_BANG_.call(null,this$,cljs.core.assoc.call(null,info,new cljs.core.Keyword(null,"exclude","exclude",3987722572),lt.objs.files.ignore_pattern.source,new cljs.core.Keyword(null,"paths","paths",1120343136),lt.objs.search.string__GT_loc.call(null,new cljs.core.Keyword(null,"loc","loc",1014011570).cljs$core$IFn$_invoke$arity$1(info))));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","search!","lt.objs.search/search!",3582214748),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__search_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"search!","search!",2982232811),null], null), null));
lt.objs.search.__BEH__replace_BANG_ = (function __BEH__replace_BANG_(this$){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
var info = lt.objs.search.__GT_search_info.call(null,this$);if(cljs.core.empty_QMARK_.call(null,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(info)))
{return null;
} else
{lt.object.merge_BANG_.call(null,this$,info);
lt.objs.notifos.working.call(null,"Replacing all in workspace...");
return lt.objs.search.search_BANG_.call(null,this$,cljs.core.assoc.call(null,info,new cljs.core.Keyword(null,"replacement","replacement",1444823428),new cljs.core.Keyword(null,"replace","replace",2108401190).cljs$core$IFn$_invoke$arity$1(info),new cljs.core.Keyword(null,"exclude","exclude",3987722572),lt.objs.files.ignore_pattern.source,new cljs.core.Keyword(null,"paths","paths",1120343136),lt.objs.search.string__GT_loc.call(null,new cljs.core.Keyword(null,"loc","loc",1014011570).cljs$core$IFn$_invoke$arity$1(info))));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","replace!","lt.objs.search/replace!",1148909304),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__replace_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"replace!","replace!",583571295),null], null), null));
lt.objs.search.__BEH__done_searching = (function __BEH__done_searching(this$,info){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("lt.objs.search","time","lt.objs.search/time",714622424),(new cljs.core.Keyword(null,"time","time",1017464383).cljs$core$IFn$_invoke$arity$1(info) / 1000),new cljs.core.Keyword("lt.objs.search","filesSearched","lt.objs.search/filesSearched",2511844033),new cljs.core.Keyword(null,"total","total",1124454070).cljs$core$IFn$_invoke$arity$1(info)], null));
if(cljs.core.truth_(new cljs.core.Keyword(null,"replace?","replace?",583571325).cljs$core$IFn$_invoke$arity$1(info)))
{lt.objs.notifos.done_working.call(null,[cljs.core.str("Replaced "),cljs.core.str(new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),cljs.core.str(" results in "),cljs.core.str((new cljs.core.Keyword(null,"time","time",1017464383).cljs$core$IFn$_invoke$arity$1(info) / 1000)),cljs.core.str("s.")].join(''));
return lt.util.dom.empty.call(null,lt.objs.search.__GT_res.call(null,this$));
} else
{return lt.objs.notifos.done_working.call(null,[cljs.core.str("Found "),cljs.core.str(new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),cljs.core.str(" results searching "),cljs.core.str(new cljs.core.Keyword(null,"total","total",1124454070).cljs$core$IFn$_invoke$arity$1(info)),cljs.core.str(" files in "),cljs.core.str((new cljs.core.Keyword(null,"time","time",1017464383).cljs$core$IFn$_invoke$arity$1(info) / 1000)),cljs.core.str("s.")].join(''));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","done-searching","lt.objs.search/done-searching",1038716850),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__done_searching,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"done-searching","done-searching",1230467105),null], null), null));
lt.objs.search.__BEH__next_BANG_ = (function __BEH__next_BANG_(this$){if((new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)).length > 0))
{var all = new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var vec__13427 = new cljs.core.Keyword(null,"position","position",1761709211).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var file = cljs.core.nth.call(null,vec__13427,0,null);var result = cljs.core.nth.call(null,vec__13427,1,null);var cur = (all[file]);var vec__13428 = ((((result + 1) >= cur.results.length))?((((file + 1) >= all.length))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [0,0], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(file + 1),0], null)):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [file,(result + 1)], null));var file__$1 = cljs.core.nth.call(null,vec__13428,0,null);var result__$1 = cljs.core.nth.call(null,vec__13428,1,null);var neue = (all[file__$1]);lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"position","position",1761709211),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [file__$1,result__$1], null)], null));
lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),neue.file);
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"goto-line","goto-line",2802035088),(neue.results[result__$1]).line);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","next!","lt.objs.search/next!",614385297),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__next_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"next!","next!",1118619392),null], null), null));
lt.objs.search.__BEH__prev_BANG_ = (function __BEH__prev_BANG_(this$){if((new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)).length > 0))
{var all = new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var vec__13431 = new cljs.core.Keyword(null,"position","position",1761709211).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var file = cljs.core.nth.call(null,vec__13431,0,null);var result = cljs.core.nth.call(null,vec__13431,1,null);var cur = (all[file]);var vec__13432 = ((((result - 1) < 0))?((((file - 1) < 0))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(all.length - 1),((all[(all.length - 1)]).results.length - 1)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(file - 1),((all[(file - 1)]).results.length - 1)], null)):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [file,(result - 1)], null));var file__$1 = cljs.core.nth.call(null,vec__13432,0,null);var result__$1 = cljs.core.nth.call(null,vec__13432,1,null);var neue = (new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))[file__$1]);lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"position","position",1761709211),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [file__$1,result__$1], null)], null));
lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"open-path","open-path",2513940794),neue.file);
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"goto-line","goto-line",2802035088),(neue.results[result__$1]).line);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","prev!","lt.objs.search/prev!",611383121),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__prev_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"prev!","prev!",1120835520),null], null), null));
lt.objs.search.__BEH__on_result = (function __BEH__on_result(this$,result){var total = cljs.core.count.call(null,result.results);var result__$1 = ((true)?(function (){var obj13436 = {"file":result.file,"results":result.results.slice(0,(lt.objs.search.result_threshold - new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))};return obj13436;
})():result);if((new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)) < lt.objs.search.result_threshold))
{lt.util.dom.append.call(null,lt.objs.search.__GT_res.call(null,this$),lt.objs.search.__GT_result_item.call(null,result__$1));
} else
{}
new cljs.core.Keyword(null,"results","results",2111450984).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)).push(result__$1);
return lt.object.update_BANG_.call(null,this$,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"result-count","result-count",4392277713)], null),cljs.core._PLUS_,total);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","on-result","lt.objs.search/on-result",564457174),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__on_result,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"result","result",4374444943),null], null), null));
lt.objs.search.__BEH__focus = (function __BEH__focus(this$){return lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$)).focus();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","focus","lt.objs.search/focus",620932027),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.search.__BEH__focus,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null,new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.search.result_count = (function result_count(this$){return cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core.List.EMPTY,(cljs.core.truth_(new cljs.core.Keyword("lt.objs.search","time","lt.objs.search/time",714622424).cljs$core$IFn$_invoke$arity$1(this$))?cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core.List.EMPTY,"s"),new cljs.core.Keyword("lt.objs.search","time","lt.objs.search/time",714622424).cljs$core$IFn$_invoke$arity$1(this$))," in "):null)),(((new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(this$) > lt.objs.search.result_threshold))?cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core._conj.call(null,cljs.core.List.EMPTY,")"),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span","span",1017440956),lt.objs.search.result_threshold], null))," (showing "):null)),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span","span",1017440956),new cljs.core.Keyword(null,"result-count","result-count",4392277713).cljs$core$IFn$_invoke$arity$1(this$)," results"], null)),"Found  ");
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.search","workspace-search","lt.objs.search/workspace-search",4343830723),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"searcher","searcher",1902549959),null], null), null),new cljs.core.Keyword(null,"results","results",2111450984),[],new cljs.core.Keyword(null,"name","name",1017277949),"Search results",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){lt.object.add_tags.call(null,this$,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [((lt.objs.platform.win_QMARK_.call(null))?new cljs.core.Keyword(null,"searcher.win","searcher.win",1645682229):new cljs.core.Keyword(null,"searcher.unix","searcher.unix",3419097843))], null));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.search-results","div.search-results",980356928),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul.res","ul.res",4464738363)], null),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.searcher","div.searcher",3267271812),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"p","p",1013904354),crate.binding.bound.call(null,this$,lt.objs.search.result_count)], null),lt.objs.search.search_box.call(null,this$),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),lt.objs.search.replace_box.call(null,this$),lt.objs.search.replace_all_button.call(null,this$)], null),lt.objs.search.location_box.call(null,this$)], null)], null);
}));
lt.objs.search.searcher = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.search","workspace-search","lt.objs.search/workspace-search",4343830723));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"searcher.search","searcher.search",1646738643),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Execute search",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (info){var info__$1 = (function (){var or__3520__auto__ = info;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.objs.search.__GT_search_info.call(null,lt.objs.search.searcher);
}
})();return lt.object.raise.call(null,lt.objs.search.searcher,new cljs.core.Keyword(null,"search!","search!",2982232811),info__$1);
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"searcher.show","searcher.show",3419032680),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Show",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto___13437 = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto___13437))
{var e_13438 = temp__4092__auto___13437;var temp__4092__auto___13439__$1 = lt.objs.editor.selection.call(null,e_13438);if(cljs.core.truth_(temp__4092__auto___13439__$1))
{var sel_13440 = temp__4092__auto___13439__$1;if(cljs.core.truth_(clojure.string.blank_QMARK_.call(null,sel_13440)))
{} else
{var search_13441 = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,lt.objs.search.searcher));lt.util.dom.val.call(null,search_13441,sel_13440);
}
} else
{}
} else
{}
return lt.objs.tabs.add_or_focus_BANG_.call(null,lt.objs.search.searcher);
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"searcher.next","searcher.next",3418881118),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Next result",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.search.searcher,new cljs.core.Keyword(null,"next!","next!",1118619392));
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"searcher.prev","searcher.prev",3418952606),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Prev result",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.search.searcher,new cljs.core.Keyword(null,"prev!","prev!",1120835520));
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"searcher.replace-all","searcher.replace-all",1613341281),new cljs.core.Keyword(null,"desc","desc",1016984067),"Searcher: Replace all",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.search.searcher,new cljs.core.Keyword(null,"replace!","replace!",583571295));
})], null));
