// 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__10053 = lt.objs.langs.behaviors.idx__GT_item.call(null,idx,entries);var ix = cljs.core.nth.call(null,vec__10053,0,null);var entry = cljs.core.nth.call(null,vec__10053,1,null);var vec__10054 = 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__10054,0,null);var token = cljs.core.nth.call(null,vec__10054,1,null);var vec__10055 = (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__10055,0,null);var arg = cljs.core.nth.call(null,vec__10055,1,null);var vec__10056 = new cljs.core.Keyword(null,"tokens","tokens",4440684812).cljs$core$IFn$_invoke$arity$1(entry);var tag = cljs.core.nth.call(null,vec__10056,0,null);var key = cljs.core.nth.call(null,vec__10056,1,null);var first_command = cljs.core.nth.call(null,vec__10056,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__10060 = cljs.core._EQ_;var expr__10061 = pos;if(cljs.core.truth_(pred__10060.call(null,0,expr__10061)))
{return new cljs.core.Keyword(null,"tag","tag",1014018828);
} else
{if(cljs.core.truth_(pred__10060.call(null,1,expr__10061)))
{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__10064 = 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__10064__$1 = ((cljs.core.seq_QMARK_.call(null,map__10064))?cljs.core.apply.call(null,cljs.core.hash_map,map__10064):map__10064);var arg_pos = cljs.core.get.call(null,map__10064__$1,new cljs.core.Keyword(null,"arg-pos","arg-pos",4562713039));var command_at_pos = cljs.core.get.call(null,map__10064__$1,new cljs.core.Keyword(null,"command-at-pos","command-at-pos",2108663278));var pos = cljs.core.get.call(null,map__10064__$1,new cljs.core.Keyword(null,"pos","pos",1014015430));var key = cljs.core.get.call(null,map__10064__$1,new cljs.core.Keyword(null,"key","key",1014010321));var tag = cljs.core.get.call(null,map__10064__$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__10066 = 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__10066__$1 = ((cljs.core.seq_QMARK_.call(null,map__10066))?cljs.core.apply.call(null,cljs.core.hash_map,map__10066):map__10066);var first_command = cljs.core.get.call(null,map__10066__$1,new cljs.core.Keyword(null,"first-command","first-command",563271840));var arg_pos = cljs.core.get.call(null,map__10066__$1,new cljs.core.Keyword(null,"arg-pos","arg-pos",4562713039));var command_at_pos = cljs.core.get.call(null,map__10066__$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__10077(s__10078){return (new cljs.core.LazySeq(null,(function (){var s__10078__$1 = s__10078;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__10078__$1);if(temp__4092__auto__)
{var s__10078__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__10078__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__10078__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__10080 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__10079 = 0;while(true){
if((i__10079 < size__4230__auto__))
{var p = cljs.core._nth.call(null,c__4229__auto__,i__10079);cljs.core.chunk_append.call(null,b__10080,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__10087 = (i__10079 + 1);
i__10079 = G__10087;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__10080),iter__10077.call(null,cljs.core.chunk_rest.call(null,s__10078__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__10080),null);
}
} else
{var p = cljs.core.first.call(null,s__10078__$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__10077.call(null,cljs.core.rest.call(null,s__10078__$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__10081_10088 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__10082_10089 = null;var count__10083_10090 = 0;var i__10084_10091 = 0;while(true){
if((i__10084_10091 < count__10083_10090))
{var vec__10085_10092 = cljs.core._nth.call(null,chunk__10082_10089,i__10084_10091);var ev__3326__auto___10093 = cljs.core.nth.call(null,vec__10085_10092,0,null);var func__3327__auto___10094 = cljs.core.nth.call(null,vec__10085_10092,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___10093,func__3327__auto___10094);
{
var G__10095 = seq__10081_10088;
var G__10096 = chunk__10082_10089;
var G__10097 = count__10083_10090;
var G__10098 = (i__10084_10091 + 1);
seq__10081_10088 = G__10095;
chunk__10082_10089 = G__10096;
count__10083_10090 = G__10097;
i__10084_10091 = G__10098;
continue;
}
} else
{var temp__4092__auto___10099 = cljs.core.seq.call(null,seq__10081_10088);if(temp__4092__auto___10099)
{var seq__10081_10100__$1 = temp__4092__auto___10099;if(cljs.core.chunked_seq_QMARK_.call(null,seq__10081_10100__$1))
{var c__4262__auto___10101 = cljs.core.chunk_first.call(null,seq__10081_10100__$1);{
var G__10102 = cljs.core.chunk_rest.call(null,seq__10081_10100__$1);
var G__10103 = c__4262__auto___10101;
var G__10104 = cljs.core.count.call(null,c__4262__auto___10101);
var G__10105 = 0;
seq__10081_10088 = G__10102;
chunk__10082_10089 = G__10103;
count__10083_10090 = G__10104;
i__10084_10091 = G__10105;
continue;
}
} else
{var vec__10086_10106 = cljs.core.first.call(null,seq__10081_10100__$1);var ev__3326__auto___10107 = cljs.core.nth.call(null,vec__10086_10106,0,null);var func__3327__auto___10108 = cljs.core.nth.call(null,vec__10086_10106,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___10107,func__3327__auto___10108);
{
var G__10109 = cljs.core.next.call(null,seq__10081_10100__$1);
var G__10110 = null;
var G__10111 = 0;
var G__10112 = 0;
seq__10081_10088 = G__10109;
chunk__10082_10089 = G__10110;
count__10083_10090 = G__10111;
i__10084_10091 = G__10112;
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__10117_10121 = cljs.core.seq.call(null,lis);var chunk__10118_10122 = null;var count__10119_10123 = 0;var i__10120_10124 = 0;while(true){
if((i__10120_10124 < count__10119_10123))
{var li_10125 = cljs.core._nth.call(null,chunk__10118_10122,i__10120_10124);lt.util.dom.remove_class.call(null,li_10125,new cljs.core.Keyword(null,"active","active",3885920888));
{
var G__10126 = seq__10117_10121;
var G__10127 = chunk__10118_10122;
var G__10128 = count__10119_10123;
var G__10129 = (i__10120_10124 + 1);
seq__10117_10121 = G__10126;
chunk__10118_10122 = G__10127;
count__10119_10123 = G__10128;
i__10120_10124 = G__10129;
continue;
}
} else
{var temp__4092__auto___10130 = cljs.core.seq.call(null,seq__10117_10121);if(temp__4092__auto___10130)
{var seq__10117_10131__$1 = temp__4092__auto___10130;if(cljs.core.chunked_seq_QMARK_.call(null,seq__10117_10131__$1))
{var c__4262__auto___10132 = cljs.core.chunk_first.call(null,seq__10117_10131__$1);{
var G__10133 = cljs.core.chunk_rest.call(null,seq__10117_10131__$1);
var G__10134 = c__4262__auto___10132;
var G__10135 = cljs.core.count.call(null,c__4262__auto___10132);
var G__10136 = 0;
seq__10117_10121 = G__10133;
chunk__10118_10122 = G__10134;
count__10119_10123 = G__10135;
i__10120_10124 = G__10136;
continue;
}
} else
{var li_10137 = cljs.core.first.call(null,seq__10117_10131__$1);lt.util.dom.remove_class.call(null,li_10137,new cljs.core.Keyword(null,"active","active",3885920888));
{
var G__10138 = cljs.core.next.call(null,seq__10117_10131__$1);
var G__10139 = null;
var G__10140 = 0;
var G__10141 = 0;
seq__10117_10121 = G__10138;
chunk__10118_10122 = G__10139;
count__10119_10123 = G__10140;
i__10120_10124 = G__10141;
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));
