// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.langs.keymap');
goog.require('cljs.core');
goog.require('lt.util.dom');
goog.require('lt.objs.context');
goog.require('lt.objs.context');
goog.require('lt.util.dom');
goog.require('clojure.string');
goog.require('lt.objs.command');
goog.require('lt.objs.langs.behaviors');
goog.require('clojure.string');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.editor');
goog.require('lt.objs.command');
goog.require('lt.objs.langs.behaviors');
lt.objs.langs.keymap.completions = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"tag","tag",1014018828),new cljs.core.Keyword(null,"tag","tag",1014018828).cljs$core$IFn$_invoke$arity$1(lt.objs.langs.behaviors.completions),new cljs.core.Keyword(null,"command","command",1964298941),lt.objs.command.completions], null);
lt.objs.langs.keymap.idx__GT_entry_info = (function idx__GT_entry_info(idx,entries){var vec__12640 = lt.objs.langs.behaviors.idx__GT_item.call(null,idx,entries);var ix = cljs.core.nth.call(null,vec__12640,0,null);var entry = cljs.core.nth.call(null,vec__12640,1,null);var vec__12641 = lt.objs.langs.behaviors.idx__GT_item.call(null,idx,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(entry));var tokenIx = cljs.core.nth.call(null,vec__12641,0,null);var token = cljs.core.nth.call(null,vec__12641,1,null);var vec__12642 = (cljs.core.truth_(new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(token))?lt.objs.langs.behaviors.idx__GT_item.call(null,idx,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(token)):null);var argIx = cljs.core.nth.call(null,vec__12642,0,null);var arg = cljs.core.nth.call(null,vec__12642,1,null);var vec__12643 = new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(entry);var tag = cljs.core.nth.call(null,vec__12643,0,null);var key = cljs.core.nth.call(null,vec__12643,1,null);var first_command = cljs.core.nth.call(null,vec__12643,2,null);var tag__$1 = (cljs.core.truth_(tag)?lt.objs.langs.behaviors.str__GT_ns_keyword.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(tag)):null);var past_last_token = (idx > (new cljs.core.Keyword(null,"end","end",1014004813).cljs$core$IFn$_invoke$arity$1(cljs.core.last.call(null,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(entry))) + 1));var pos = (((cljs.core.not.call(null,tokenIx)) && (past_last_token))?cljs.core.count.call(null,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(entry)):((cljs.core.not.call(null,tokenIx))?(cljs.core.count.call(null,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(entry)) - 1):((new cljs.core.Keyword(null,"else","else",1017020587))?tokenIx:null)));var past_last_arg = (idx > (new cljs.core.Keyword(null,"end","end",1014004813).cljs$core$IFn$_invoke$arity$1(cljs.core.last.call(null,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(token))) + 1));var arg_pos = (cljs.core.truth_(new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(token))?(((cljs.core.not.call(null,argIx)) && (past_last_arg))?cljs.core.count.call(null,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(token)):((cljs.core.not.call(null,argIx))?(cljs.core.count.call(null,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(token)) - 1):((new cljs.core.Keyword(null,"else","else",1017020587))?argIx:null))):null);var command = (cljs.core.truth_((function (){var and__3508__auto__ = tokenIx;if(cljs.core.truth_(and__3508__auto__))
{return (tokenIx > 1);
} else
{return and__3508__auto__;
}
})())?(cljs.core.truth_(arg_pos)?lt.objs.langs.behaviors.str__GT_ns_keyword.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(token)))):((new cljs.core.Keyword(null,"else","else",1017020587))?lt.objs.langs.behaviors.str__GT_ns_keyword.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(token)):null)):null);var first_command__$1 = (cljs.core.truth_(first_command)?(cljs.core.truth_(new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(first_command))?lt.objs.langs.behaviors.str__GT_ns_keyword.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(first_command)))):((new cljs.core.Keyword(null,"else","else",1017020587))?lt.objs.langs.behaviors.str__GT_ns_keyword.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(first_command)):null)):null);return new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"tag","tag",1014018828),tag__$1,new cljs.core.Keyword(null,"key","key",1014010321),key,new cljs.core.Keyword(null,"first-command","first-command",563271840),first_command__$1,new cljs.core.Keyword(null,"command-at-pos","command-at-pos",2108663278),command,new cljs.core.Keyword(null,"arg-pos","arg-pos",4562713039),arg_pos,new cljs.core.Keyword(null,"pos","pos",1014015430),pos], null);
});
lt.objs.langs.keymap.pos__GT_token_type = (function pos__GT_token_type(pos){var pred__12647 = cljs.core._EQ_;var expr__12648 = pos;if(cljs.core.truth_(pred__12647.call(null,0,expr__12648)))
{return new cljs.core.Keyword(null,"tag","tag",1014018828);
} else
{if(cljs.core.truth_(pred__12647.call(null,1,expr__12648)))
{return new cljs.core.Keyword(null,"key","key",1014010321);
} else
{return new cljs.core.Keyword(null,"command","command",1964298941);
}
}
});
lt.objs.langs.keymap.__BEH__keymap_hints = (function __BEH__keymap_hints(this$,hints,token){var idx = lt.objs.langs.behaviors.__GT_index.call(null,this$);var map__12651 = lt.objs.langs.keymap.idx__GT_entry_info.call(null,idx,new cljs.core.Keyword(null,"entries","entries",3717298178).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var map__12651__$1 = ((cljs.core.seq_QMARK_.call(null,map__12651))?cljs.core.apply.call(null,cljs.core.hash_map,map__12651):map__12651);var arg_pos = cljs.core.get.call(null,map__12651__$1,new cljs.core.Keyword(null,"arg-pos","arg-pos",4562713039));var command_at_pos = cljs.core.get.call(null,map__12651__$1,new cljs.core.Keyword(null,"command-at-pos","command-at-pos",2108663278));var pos = cljs.core.get.call(null,map__12651__$1,new cljs.core.Keyword(null,"pos","pos",1014015430));var key = cljs.core.get.call(null,map__12651__$1,new cljs.core.Keyword(null,"key","key",1014010321));var tag = cljs.core.get.call(null,map__12651__$1,new cljs.core.Keyword(null,"tag","tag",1014018828));var comps = (((cljs.core.not.call(null,arg_pos)) || ((arg_pos < 1)))?lt.objs.langs.keymap.completions.call(null,lt.objs.langs.keymap.pos__GT_token_type.call(null,pos)):null);if(cljs.core.not.call(null,comps))
{return hints;
} else
{return comps.call(null,token);
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.langs.keymap","keymap-hints","lt.objs.langs.keymap/keymap-hints",592920276),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.langs.keymap.__BEH__keymap_hints,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"hints+","hints+",4091697745),null], null), null),new cljs.core.Keyword(null,"exclusive","exclusive",2700522000),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.plugins.auto-complete","textual-hints","lt.plugins.auto-complete/textual-hints",1172342809)], null));
lt.objs.langs.keymap.__BEH__show_info_on_move = (function __BEH__show_info_on_move(this$){var idx = lt.objs.langs.behaviors.__GT_index.call(null,this$);var map__12653 = lt.objs.langs.keymap.idx__GT_entry_info.call(null,idx,new cljs.core.Keyword(null,"entries","entries",3717298178).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var map__12653__$1 = ((cljs.core.seq_QMARK_.call(null,map__12653))?cljs.core.apply.call(null,cljs.core.hash_map,map__12653):map__12653);var first_command = cljs.core.get.call(null,map__12653__$1,new cljs.core.Keyword(null,"first-command","first-command",563271840));var arg_pos = cljs.core.get.call(null,map__12653__$1,new cljs.core.Keyword(null,"arg-pos","arg-pos",4562713039));var command_at_pos = cljs.core.get.call(null,map__12653__$1,new cljs.core.Keyword(null,"command-at-pos","command-at-pos",2108663278));var command = cljs.core.get.call(null,new cljs.core.Keyword(null,"commands","commands",4706336250).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.command.manager)),(function (){var or__3520__auto__ = command_at_pos;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return first_command;
}
})());if(cljs.core.truth_(command))
{return lt.object.raise.call(null,lt.objs.langs.keymap.helper,new cljs.core.Keyword(null,"show!","show!",1123317814),this$,command,arg_pos);
} else
{return lt.object.raise.call(null,lt.objs.langs.keymap.helper,new cljs.core.Keyword(null,"clear!","clear!",3951036134),this$);
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.langs.keymap","show-info-on-move","lt.objs.langs.keymap/show-info-on-move",836516040),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.langs.keymap.__BEH__show_info_on_move,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"move","move",1017261891),null], null), null),new cljs.core.Keyword(null,"debounce","debounce",1556599227),200);
lt.objs.langs.keymap.__BEH__keymap_hint_pattern = (function __BEH__keymap_hint_pattern(this$){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"hint-pattern","hint-pattern",2825267644),/[\w\-\>\:\*\$\?\<\!\+\.\"\\/]/], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.langs.keymap","keymap-hint-pattern","lt.objs.langs.keymap/keymap-hint-pattern",2903988014),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.langs.keymap.__BEH__keymap_hint_pattern,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"object.instant","object.instant",773332388),null], null), null));
lt.objs.langs.keymap.__BEH__on_changed = (function __BEH__on_changed(this$){return lt.objs.langs.behaviors.flat_parser.call(null,this$,lt.objs.editor.__GT_val.call(null,this$));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.langs.keymap","on-changed","lt.objs.langs.keymap/on-changed",3532361178),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.langs.keymap.__BEH__on_changed,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"change","change",3947235106),null,new cljs.core.Keyword(null,"create","create",3956577390),null], null), null),new cljs.core.Keyword(null,"debounce","debounce",1556599227),50);
lt.objs.langs.keymap.__BEH__parsed = (function __BEH__parsed(this$,results){lt.object.merge_BANG_.call(null,this$,cljs.core.js__GT_clj.call(null,results,new cljs.core.Keyword(null,"keywordize-keys","keywordize-keys",4191781672),true));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"move","move",1017261891));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.langs.keymap","parsed","lt.objs.langs.keymap/parsed",4292388517),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.langs.keymap.__BEH__parsed,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"parsed","parsed",4313460611),null], null), null));
lt.objs.langs.keymap.inline = (function inline(this$,ed,opts){return lt.object.create.call(null,new cljs.core.Keyword("lt.objs.eval","inline-result","lt.objs.eval/inline-result",1807255869),new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null,"ed","ed",1013907473),ed,new cljs.core.Keyword(null,"class","class",1108647146),"behavior-helper",new cljs.core.Keyword(null,"opts","opts",1017322386),opts,new cljs.core.Keyword(null,"result","result",4374444943),lt.object.__GT_content.call(null,this$),new cljs.core.Keyword(null,"above","above",1106515727),cljs.core.boolean$.call(null,(new cljs.core.Keyword(null,"prev-line","prev-line",4421028544).cljs$core$IFn$_invoke$arity$1(opts) < new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(opts))),new cljs.core.Keyword(null,"loc","loc",1014011570),opts,new cljs.core.Keyword(null,"line","line",1017226086),lt.objs.editor.line_handle.call(null,ed,new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(opts))], null));
});
lt.objs.langs.keymap.__GT_helper = (function __GT_helper(keym){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h2","h2",1013907516),new cljs.core.Keyword(null,"desc","desc",1016984067).cljs$core$IFn$_invoke$arity$2(keym,new cljs.core.Keyword(null,"command","command",1964298941).cljs$core$IFn$_invoke$arity$1(keym))], null),(cljs.core.truth_(new cljs.core.Keyword(null,"params","params",4313443576).cljs$core$IFn$_invoke$arity$1(keym))?(function (){var iter__4231__auto__ = (function iter__12664(s__12665){return (new cljs.core.LazySeq(null,(function (){var s__12665__$1 = s__12665;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__12665__$1);if(temp__4092__auto__)
{var s__12665__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__12665__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__12665__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__12667 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__12666 = 0;while(true){
if((i__12666 < size__4230__auto__))
{var p = cljs.core._nth.call(null,c__4229__auto__,i__12666);cljs.core.chunk_append.call(null,b__12667,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,"label","label",1116631654).cljs$core$IFn$_invoke$arity$1(p),(cljs.core.truth_(new cljs.core.Keyword(null,"example","example",3985900764).cljs$core$IFn$_invoke$arity$1(p))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pre.example","pre.example",4358698129),new cljs.core.Keyword(null,"example","example",3985900764).cljs$core$IFn$_invoke$arity$1(p)], null):null)], null));
{
var G__12674 = (i__12666 + 1);
i__12666 = G__12674;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__12667),iter__12664.call(null,cljs.core.chunk_rest.call(null,s__12665__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__12667),null);
}
} else
{var p = cljs.core.first.call(null,s__12665__$2);return cljs.core.cons.call(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,"label","label",1116631654).cljs$core$IFn$_invoke$arity$1(p),(cljs.core.truth_(new cljs.core.Keyword(null,"example","example",3985900764).cljs$core$IFn$_invoke$arity$1(p))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pre.example","pre.example",4358698129),new cljs.core.Keyword(null,"example","example",3985900764).cljs$core$IFn$_invoke$arity$1(p)], null):null)], null),iter__12664.call(null,cljs.core.rest.call(null,s__12665__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,new cljs.core.Keyword(null,"params","params",4313443576).cljs$core$IFn$_invoke$arity$1(keym));
})():null)], null));var seq__12668_12675 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__12669_12676 = null;var count__12670_12677 = 0;var i__12671_12678 = 0;while(true){
if((i__12671_12678 < count__12670_12677))
{var vec__12672_12679 = cljs.core._nth.call(null,chunk__12669_12676,i__12671_12678);var ev__3326__auto___12680 = cljs.core.nth.call(null,vec__12672_12679,0,null);var func__3327__auto___12681 = cljs.core.nth.call(null,vec__12672_12679,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12680,func__3327__auto___12681);
{
var G__12682 = seq__12668_12675;
var G__12683 = chunk__12669_12676;
var G__12684 = count__12670_12677;
var G__12685 = (i__12671_12678 + 1);
seq__12668_12675 = G__12682;
chunk__12669_12676 = G__12683;
count__12670_12677 = G__12684;
i__12671_12678 = G__12685;
continue;
}
} else
{var temp__4092__auto___12686 = cljs.core.seq.call(null,seq__12668_12675);if(temp__4092__auto___12686)
{var seq__12668_12687__$1 = temp__4092__auto___12686;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12668_12687__$1))
{var c__4262__auto___12688 = cljs.core.chunk_first.call(null,seq__12668_12687__$1);{
var G__12689 = cljs.core.chunk_rest.call(null,seq__12668_12687__$1);
var G__12690 = c__4262__auto___12688;
var G__12691 = cljs.core.count.call(null,c__4262__auto___12688);
var G__12692 = 0;
seq__12668_12675 = G__12689;
chunk__12669_12676 = G__12690;
count__12670_12677 = G__12691;
i__12671_12678 = G__12692;
continue;
}
} else
{var vec__12673_12693 = cljs.core.first.call(null,seq__12668_12687__$1);var ev__3326__auto___12694 = cljs.core.nth.call(null,vec__12673_12693,0,null);var func__3327__auto___12695 = cljs.core.nth.call(null,vec__12673_12693,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12694,func__3327__auto___12695);
{
var G__12696 = cljs.core.next.call(null,seq__12668_12687__$1);
var G__12697 = null;
var G__12698 = 0;
var G__12699 = 0;
seq__12668_12675 = G__12696;
chunk__12669_12676 = G__12697;
count__12670_12677 = G__12698;
i__12671_12678 = G__12699;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.langs.keymap.set_param = (function set_param(this$,idx){var lis = lt.util.dom.$$.call(null,"span",lt.object.__GT_content.call(null,this$));var seq__12704_12708 = cljs.core.seq.call(null,lis);var chunk__12705_12709 = null;var count__12706_12710 = 0;var i__12707_12711 = 0;while(true){
if((i__12707_12711 < count__12706_12710))
{var li_12712 = cljs.core._nth.call(null,chunk__12705_12709,i__12707_12711);lt.util.dom.remove_class.call(null,li_12712,new cljs.core.Keyword(null,"active","active",3885920888));
{
var G__12713 = seq__12704_12708;
var G__12714 = chunk__12705_12709;
var G__12715 = count__12706_12710;
var G__12716 = (i__12707_12711 + 1);
seq__12704_12708 = G__12713;
chunk__12705_12709 = G__12714;
count__12706_12710 = G__12715;
i__12707_12711 = G__12716;
continue;
}
} else
{var temp__4092__auto___12717 = cljs.core.seq.call(null,seq__12704_12708);if(temp__4092__auto___12717)
{var seq__12704_12718__$1 = temp__4092__auto___12717;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12704_12718__$1))
{var c__4262__auto___12719 = cljs.core.chunk_first.call(null,seq__12704_12718__$1);{
var G__12720 = cljs.core.chunk_rest.call(null,seq__12704_12718__$1);
var G__12721 = c__4262__auto___12719;
var G__12722 = cljs.core.count.call(null,c__4262__auto___12719);
var G__12723 = 0;
seq__12704_12708 = G__12720;
chunk__12705_12709 = G__12721;
count__12706_12710 = G__12722;
i__12707_12711 = G__12723;
continue;
}
} else
{var li_12724 = cljs.core.first.call(null,seq__12704_12718__$1);lt.util.dom.remove_class.call(null,li_12724,new cljs.core.Keyword(null,"active","active",3885920888));
{
var G__12725 = cljs.core.next.call(null,seq__12704_12718__$1);
var G__12726 = null;
var G__12727 = 0;
var G__12728 = 0;
seq__12704_12708 = G__12725;
chunk__12705_12709 = G__12726;
count__12706_12710 = G__12727;
i__12707_12711 = G__12728;
continue;
}
}
} else
{}
}
break;
}
if(cljs.core.truth_(idx))
{return lt.util.dom.add_class.call(null,(lis[idx]),new cljs.core.Keyword(null,"active","active",3885920888));
} else
{return null;
}
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.langs.keymap","helper","lt.objs.langs.keymap/helper",4251548354),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.keymap.helper","editor.keymap.helper",2159399120),null], null), null));
lt.objs.langs.keymap.__BEH__helper__DOT__show_BANG_ = (function __BEH__helper__DOT__show_BANG_(this$,ed,keym,param_idx){var loc = lt.objs.editor.__GT_cursor.call(null,ed);if((cljs.core.not_EQ_.call(null,keym,new cljs.core.Keyword(null,"key","key",1014010321).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))) || (cljs.core.not_EQ_.call(null,ed,new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))))
{if(cljs.core.truth_(new cljs.core.Keyword(null,"mark","mark",1017248319).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{lt.objs.editor._line_class.call(null,ed,new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"text","text",1017460895),"behavior-helper-line");
lt.object.raise.call(null,new cljs.core.Keyword(null,"mark","mark",1017248319).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"clear!","clear!",3951036134));
} else
{}
lt.objs.editor._PLUS_line_class.call(null,ed,new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(loc),new cljs.core.Keyword(null,"text","text",1017460895),"behavior-helper-line");
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"content","content",1965434859),lt.objs.langs.keymap.__GT_helper.call(null,keym)], null));
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"mark","mark",1017248319),lt.objs.langs.keymap.inline.call(null,this$,ed,cljs.core.assoc.call(null,loc,new cljs.core.Keyword(null,"prev-line","prev-line",4421028544),new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))),new cljs.core.Keyword(null,"key","key",1014010321),keym,new cljs.core.Keyword(null,"line","line",1017226086),new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(loc),new cljs.core.Keyword(null,"ed","ed",1013907473),ed], null));
} else
{}
return lt.objs.langs.keymap.set_param.call(null,this$,param_idx);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.langs.keymap","helper.show!","lt.objs.langs.keymap/helper.show!",3924890652),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.langs.keymap.__BEH__helper__DOT__show_BANG_,new cljs.core.Keyword(null,"desc","desc",1016984067),"Keymap.helper: show",new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"show!","show!",1123317814),null], null), null));
lt.objs.langs.keymap.helper = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.langs.keymap","helper","lt.objs.langs.keymap/helper",4251548354));
