// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.editor.pool');
goog.require('cljs.core');
goog.require('lt.util.cljs');
goog.require('lt.objs.app');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.files');
goog.require('lt.util.dom');
goog.require('lt.objs.popup');
goog.require('lt.objs.popup');
goog.require('lt.objs.notifos');
goog.require('lt.objs.notifos');
goog.require('lt.util.dom');
goog.require('clojure.string');
goog.require('lt.objs.canvas');
goog.require('lt.util.cljs');
goog.require('lt.objs.files');
goog.require('lt.objs.app');
goog.require('clojure.string');
goog.require('lt.objs.editor');
goog.require('lt.objs.canvas');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.editor');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.document');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.document');
lt.objs.editor.pool.get_all = (function get_all(){return lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679));
});
lt.objs.editor.pool.__BEH__theme_changed = (function __BEH__theme_changed(this$,theme){var seq__8045 = cljs.core.seq.call(null,lt.objs.editor.pool.get_all.call(null));var chunk__8047 = null;var count__8048 = 0;var i__8049 = 0;while(true){
if((i__8049 < count__8048))
{var ed = cljs.core._nth.call(null,chunk__8047,i__8049);var e_8051 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_8051,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"theme","theme",1124231483),theme], null));
{
var G__8052 = seq__8045;
var G__8053 = chunk__8047;
var G__8054 = count__8048;
var G__8055 = (i__8049 + 1);
seq__8045 = G__8052;
chunk__8047 = G__8053;
count__8048 = G__8054;
i__8049 = G__8055;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__8045);if(temp__4092__auto__)
{var seq__8045__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__8045__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__8045__$1);{
var G__8056 = cljs.core.chunk_rest.call(null,seq__8045__$1);
var G__8057 = c__4262__auto__;
var G__8058 = cljs.core.count.call(null,c__4262__auto__);
var G__8059 = 0;
seq__8045 = G__8056;
chunk__8047 = G__8057;
count__8048 = G__8058;
i__8049 = G__8059;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__8045__$1);var e_8060 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_8060,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"theme","theme",1124231483),theme], null));
{
var G__8061 = cljs.core.next.call(null,seq__8045__$1);
var G__8062 = null;
var G__8063 = 0;
var G__8064 = 0;
seq__8045 = G__8061;
chunk__8047 = G__8062;
count__8048 = G__8063;
i__8049 = G__8064;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","theme-changed","lt.objs.editor.pool/theme-changed",3228173365),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__theme_changed,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"theme-change","theme-change",2937690022),null], null), null));
lt.objs.editor.pool.__BEH__line_numbers_changed = (function __BEH__line_numbers_changed(this$,numbers_QMARK_){var seq__8071 = cljs.core.seq.call(null,lt.objs.editor.pool.get_all.call(null));var chunk__8073 = null;var count__8074 = 0;var i__8075 = 0;while(true){
if((i__8075 < count__8074))
{var ed = cljs.core._nth.call(null,chunk__8073,i__8075);var e_8077 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_8077,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"lineNumbers","lineNumbers",3695398696),numbers_QMARK_], null));
{
var G__8078 = seq__8071;
var G__8079 = chunk__8073;
var G__8080 = count__8074;
var G__8081 = (i__8075 + 1);
seq__8071 = G__8078;
chunk__8073 = G__8079;
count__8074 = G__8080;
i__8075 = G__8081;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__8071);if(temp__4092__auto__)
{var seq__8071__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__8071__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__8071__$1);{
var G__8082 = cljs.core.chunk_rest.call(null,seq__8071__$1);
var G__8083 = c__4262__auto__;
var G__8084 = cljs.core.count.call(null,c__4262__auto__);
var G__8085 = 0;
seq__8071 = G__8082;
chunk__8073 = G__8083;
count__8074 = G__8084;
i__8075 = G__8085;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__8071__$1);var e_8086 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_8086,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"lineNumbers","lineNumbers",3695398696),numbers_QMARK_], null));
{
var G__8087 = cljs.core.next.call(null,seq__8071__$1);
var G__8088 = null;
var G__8089 = 0;
var G__8090 = 0;
seq__8071 = G__8087;
chunk__8073 = G__8088;
count__8074 = G__8089;
i__8075 = G__8090;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","line-numbers-changed","lt.objs.editor.pool/line-numbers-changed",3386463165),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__line_numbers_changed,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"line-numbers-change","line-numbers-change",1971958526),null], null), null));
lt.objs.editor.pool.__BEH__options_changed = (function __BEH__options_changed(this$,opts){var seq__8097 = cljs.core.seq.call(null,lt.objs.editor.pool.get_all.call(null));var chunk__8099 = null;var count__8100 = 0;var i__8101 = 0;while(true){
if((i__8101 < count__8100))
{var ed = cljs.core._nth.call(null,chunk__8099,i__8101);var e_8103 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_8103,opts);
{
var G__8104 = seq__8097;
var G__8105 = chunk__8099;
var G__8106 = count__8100;
var G__8107 = (i__8101 + 1);
seq__8097 = G__8104;
chunk__8099 = G__8105;
count__8100 = G__8106;
i__8101 = G__8107;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__8097);if(temp__4092__auto__)
{var seq__8097__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__8097__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__8097__$1);{
var G__8108 = cljs.core.chunk_rest.call(null,seq__8097__$1);
var G__8109 = c__4262__auto__;
var G__8110 = cljs.core.count.call(null,c__4262__auto__);
var G__8111 = 0;
seq__8097 = G__8108;
chunk__8099 = G__8109;
count__8100 = G__8110;
i__8101 = G__8111;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__8097__$1);var e_8112 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));lt.objs.editor.set_options.call(null,e_8112,opts);
{
var G__8113 = cljs.core.next.call(null,seq__8097__$1);
var G__8114 = null;
var G__8115 = 0;
var G__8116 = 0;
seq__8097 = G__8113;
chunk__8099 = G__8114;
count__8100 = G__8115;
i__8101 = G__8116;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","options-changed","lt.objs.editor.pool/options-changed",4573736972),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__options_changed,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"options-changed","options-changed",3471589879),null], null), null));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","pool","lt.objs.editor.pool/pool",1675687809),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.pool","editor.pool",4270620527),null], null), null));
/**
* Return truthy if any editors are currently dirty/unsaved?
*/
lt.objs.editor.pool.unsaved_QMARK_ = (function unsaved_QMARK_(){return cljs.core.some.call(null,(function (p1__8117_SHARP_){return new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__8117_SHARP_));
}),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));
});
/**
* Return editor objects that edit given path
*/
lt.objs.editor.pool.by_path = (function by_path(path){if(cljs.core.truth_(path))
{var path__$1 = clojure.string.lower_case.call(null,path);return cljs.core.filter.call(null,(function (p1__8118_SHARP_){return cljs.core._EQ_.call(null,clojure.string.lower_case.call(null,(function (){var or__3520__auto__ = cljs.core.get.call(null,new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__8118_SHARP_)),new cljs.core.Keyword(null,"path","path",1017337751));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return "";
}
})()),path__$1);
}),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));
} else
{return null;
}
});
/**
* Return editor objects that edit paths containing given path string
*/
lt.objs.editor.pool.containing_path = (function containing_path(path){var path__$1 = clojure.string.lower_case.call(null,path);return cljs.core.filter.call(null,(function (p1__8119_SHARP_){return (clojure.string.lower_case.call(null,(function (){var or__3520__auto__ = new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__8119_SHARP_)));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return "";
}
})()).indexOf(path__$1) > -1);
}),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));
});
/**
* @param {...*} var_args
*/
lt.objs.editor.pool.button = (function() { 
var button__delegate = function (label,p__8120){var vec__8128 = p__8120;var cb = cljs.core.nth.call(null,vec__8128,0,null);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,"div.button.right","div.button.right",629503503),label], null));var seq__8129_8135 = 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 (){if(cljs.core.truth_(cb))
{return cb.call(null);
} else
{return null;
}
})], null)));var chunk__8130_8136 = null;var count__8131_8137 = 0;var i__8132_8138 = 0;while(true){
if((i__8132_8138 < count__8131_8137))
{var vec__8133_8139 = cljs.core._nth.call(null,chunk__8130_8136,i__8132_8138);var ev__3326__auto___8140 = cljs.core.nth.call(null,vec__8133_8139,0,null);var func__3327__auto___8141 = cljs.core.nth.call(null,vec__8133_8139,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___8140,func__3327__auto___8141);
{
var G__8142 = seq__8129_8135;
var G__8143 = chunk__8130_8136;
var G__8144 = count__8131_8137;
var G__8145 = (i__8132_8138 + 1);
seq__8129_8135 = G__8142;
chunk__8130_8136 = G__8143;
count__8131_8137 = G__8144;
i__8132_8138 = G__8145;
continue;
}
} else
{var temp__4092__auto___8146 = cljs.core.seq.call(null,seq__8129_8135);if(temp__4092__auto___8146)
{var seq__8129_8147__$1 = temp__4092__auto___8146;if(cljs.core.chunked_seq_QMARK_.call(null,seq__8129_8147__$1))
{var c__4262__auto___8148 = cljs.core.chunk_first.call(null,seq__8129_8147__$1);{
var G__8149 = cljs.core.chunk_rest.call(null,seq__8129_8147__$1);
var G__8150 = c__4262__auto___8148;
var G__8151 = cljs.core.count.call(null,c__4262__auto___8148);
var G__8152 = 0;
seq__8129_8135 = G__8149;
chunk__8130_8136 = G__8150;
count__8131_8137 = G__8151;
i__8132_8138 = G__8152;
continue;
}
} else
{var vec__8134_8153 = cljs.core.first.call(null,seq__8129_8147__$1);var ev__3326__auto___8154 = cljs.core.nth.call(null,vec__8134_8153,0,null);var func__3327__auto___8155 = cljs.core.nth.call(null,vec__8134_8153,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___8154,func__3327__auto___8155);
{
var G__8156 = cljs.core.next.call(null,seq__8129_8147__$1);
var G__8157 = null;
var G__8158 = 0;
var G__8159 = 0;
seq__8129_8135 = G__8156;
chunk__8130_8136 = G__8157;
count__8131_8137 = G__8158;
i__8132_8138 = G__8159;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
};
var button = function (label,var_args){
var p__8120 = null;if (arguments.length > 1) {
  p__8120 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);} 
return button__delegate.call(this,label,p__8120);};
button.cljs$lang$maxFixedArity = 1;
button.cljs$lang$applyTo = (function (arglist__8160){
var label = cljs.core.first(arglist__8160);
var p__8120 = cljs.core.rest(arglist__8160);
return button__delegate(label,p__8120);
});
button.cljs$core$IFn$_invoke$arity$variadic = button__delegate;
return button;
})()
;
lt.objs.editor.pool.unsaved_prompt = (function unsaved_prompt(on_yes){return lt.objs.popup.popup_BANG_.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"header","header",4087600639),"You will lose changes.",new cljs.core.Keyword(null,"body","body",1016933652),"If you close now, you'll lose any unsaved changes. Are you sure you want to do that?",new cljs.core.Keyword(null,"buttons","buttons",1255256819),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Discard changes",new cljs.core.Keyword(null,"action","action",3885920680),on_yes], null),lt.objs.popup.cancel_button], null)], null));
});
lt.objs.editor.pool.pool = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.editor.pool","pool","lt.objs.editor.pool/pool",1675687809));
/**
* Return current editor object (last active in pool)
*/
lt.objs.editor.pool.last_active = (function last_active(){var l = new cljs.core.Keyword(null,"last","last",1017218568).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.editor.pool.pool));if(cljs.core.truth_((function (){var and__3508__auto__ = l;if(cljs.core.truth_(and__3508__auto__))
{return cljs.core.deref.call(null,l);
} else
{return and__3508__auto__;
}
})()))
{return l;
} else
{return null;
}
});
lt.objs.editor.pool.focus_last = (function focus_last(){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var temp__4092__auto____$1 = new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));if(cljs.core.truth_(temp__4092__auto____$1))
{var ed__$1 = temp__4092__auto____$1;lt.util.dom.focus.call(null,document.body);
return lt.objs.editor.focus.call(null,ed__$1);
} else
{return null;
}
} else
{return null;
}
});
lt.objs.editor.pool.__BEH__track_active = (function __BEH__track_active(this$){return lt.object.merge_BANG_.call(null,lt.objs.editor.pool.pool,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"last","last",1017218568),this$], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","track-active","lt.objs.editor.pool/track-active",2411159885),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__track_active,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null), null));
lt.objs.editor.pool.__BEH__stop_close_dirty = (function __BEH__stop_close_dirty(this$){if(cljs.core.truth_(lt.objs.editor.pool.unsaved_QMARK_.call(null)))
{lt.objs.app.prevent_close.call(null);
return lt.objs.editor.pool.unsaved_prompt.call(null,cljs.core.partial.call(null,lt.objs.app.close,true));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","stop-close-dirty","lt.objs.editor.pool/stop-close-dirty",4242047991),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__stop_close_dirty,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.editor.pool.__BEH__stop_reload_dirty = (function __BEH__stop_reload_dirty(this$){if(cljs.core.truth_(lt.objs.editor.pool.unsaved_QMARK_.call(null)))
{lt.objs.app.prevent_close.call(null);
return lt.objs.editor.pool.unsaved_prompt.call(null,lt.objs.app.refresh);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","stop-reload-dirty","lt.objs.editor.pool/stop-reload-dirty",1623651344),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__stop_reload_dirty,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"reload","reload",4374230283),null], null), null));
lt.objs.editor.pool.__BEH__ed_close = (function __BEH__ed_close(this$){if(cljs.core.truth_(new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return lt.objs.editor.pool.unsaved_prompt.call(null,(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"close.force","close.force",4409585383));
}));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"close.force","close.force",4409585383));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","ed-close","lt.objs.editor.pool/ed-close",2078681807),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__ed_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.editor.pool.__BEH__focus_last_on_focus = (function __BEH__focus_last_on_focus(this$){return lt.objs.editor.pool.focus_last.call(null);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","focus-last-on-focus","lt.objs.editor.pool/focus-last-on-focus",3578091025),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__focus_last_on_focus,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"focus!","focus!",4039653819),null], null), null));
lt.objs.editor.pool.reload = (function reload(ed){lt.objs.editor.set_val_and_keep_cursor.call(null,ed,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))));
lt.objs.document.update_stats.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))));
return lt.object.merge_BANG_.call(null,ed,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"dirty","dirty",1109497668),false], null));
});
lt.objs.editor.pool.__BEH__watched__DOT__update = (function __BEH__watched__DOT__update(ws,f,stat){if(cljs.core.truth_(lt.objs.files.file_QMARK_.call(null,f)))
{var temp__4092__auto__ = cljs.core.first.call(null,lt.objs.editor.pool.by_path.call(null,f));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;if(lt.objs.document.check_mtime.call(null,lt.objs.document.__GT_stats.call(null,f),stat))
{return null;
} else
{if(cljs.core.truth_(new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))
{return null;
} else
{return lt.objs.editor.pool.reload.call(null,ed);
}
}
} else
{return null;
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","watched.update","lt.objs.editor.pool/watched.update",2487517840),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__watched__DOT__update,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"watched.update","watched.update",1262966907),null], null), null));
lt.objs.editor.pool.set_syntax = (function set_syntax(ed,new_syn){var prev_info = new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));if(cljs.core.truth_(prev_info))
{lt.object.remove_tags.call(null,ed,new cljs.core.Keyword(null,"tags","tags",1017456523).cljs$core$IFn$_invoke$arity$1(prev_info));
} else
{}
lt.object.update_BANG_.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280)], null),cljs.core.merge,cljs.core.dissoc.call(null,new_syn,new cljs.core.Keyword(null,"name","name",1017277949)));
lt.objs.editor.set_mode.call(null,ed,new cljs.core.Keyword(null,"mime","mime",1017255846).cljs$core$IFn$_invoke$arity$1(new_syn));
return lt.object.add_tags.call(null,ed,new cljs.core.Keyword(null,"tags","tags",1017456523).cljs$core$IFn$_invoke$arity$1(new_syn));
});
lt.objs.editor.pool.set_syntax_by_path = (function set_syntax_by_path(ed,path){return lt.objs.editor.pool.set_syntax.call(null,ed,lt.objs.files.path__GT_type.call(null,path));
});
lt.objs.editor.pool.__BEH__watched__DOT__delete = (function __BEH__watched__DOT__delete(ws,del){var editors = (function (){var or__3520__auto__ = cljs.core.seq.call(null,lt.objs.editor.pool.by_path.call(null,del));if(or__3520__auto__)
{return or__3520__auto__;
} else
{return cljs.core.filter.call(null,((function (or__3520__auto__){
return (function (p1__8161_SHARP_){var temp__4090__auto__ = new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__8161_SHARP_)));if(cljs.core.truth_(temp__4090__auto__))
{var path = temp__4090__auto__;return cljs.core._EQ_.call(null,0,path.indexOf([cljs.core.str(del),cljs.core.str(lt.objs.files.separator)].join('')));
} else
{return false;
}
});})(or__3520__auto__))
,lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));
}
})();var seq__8166 = cljs.core.seq.call(null,editors);var chunk__8167 = null;var count__8168 = 0;var i__8169 = 0;while(true){
if((i__8169 < count__8168))
{var ed = cljs.core._nth.call(null,chunk__8167,i__8169);if(cljs.core.truth_(new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))
{} else
{lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"close","close",1108660586));
}
{
var G__8170 = seq__8166;
var G__8171 = chunk__8167;
var G__8172 = count__8168;
var G__8173 = (i__8169 + 1);
seq__8166 = G__8170;
chunk__8167 = G__8171;
count__8168 = G__8172;
i__8169 = G__8173;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__8166);if(temp__4092__auto__)
{var seq__8166__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__8166__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__8166__$1);{
var G__8174 = cljs.core.chunk_rest.call(null,seq__8166__$1);
var G__8175 = c__4262__auto__;
var G__8176 = cljs.core.count.call(null,c__4262__auto__);
var G__8177 = 0;
seq__8166 = G__8174;
chunk__8167 = G__8175;
count__8168 = G__8176;
i__8169 = G__8177;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__8166__$1);if(cljs.core.truth_(new cljs.core.Keyword(null,"dirty","dirty",1109497668).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))))
{} else
{lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"close","close",1108660586));
}
{
var G__8178 = cljs.core.next.call(null,seq__8166__$1);
var G__8179 = null;
var G__8180 = 0;
var G__8181 = 0;
seq__8166 = G__8178;
chunk__8167 = G__8179;
count__8168 = G__8180;
i__8169 = G__8181;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","watched.delete","lt.objs.editor.pool/watched.delete",1927206258),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__watched__DOT__delete,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"watched.delete","watched.delete",766354781),null], null), null));
lt.objs.editor.pool.__BEH__watched__DOT__rename = (function __BEH__watched__DOT__rename(this$,old,neue){if(cljs.core.truth_(lt.objs.files.file_QMARK_.call(null,old)))
{var temp__4092__auto__ = cljs.core.first.call(null,lt.objs.editor.pool.by_path.call(null,old));if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;lt.object.update_BANG_.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280)], null),cljs.core.assoc,new cljs.core.Keyword(null,"path","path",1017337751),neue,new cljs.core.Keyword(null,"name","name",1017277949),lt.objs.files.basename.call(null,neue));
lt.objs.document.move_doc.call(null,old,neue);
lt.objs.editor.pool.set_syntax_by_path.call(null,ed,neue);
var temp__4092__auto____$1 = new cljs.core.Keyword("lt.objs.tabs","tabset","lt.objs.tabs/tabset",3378091779).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed));if(cljs.core.truth_(temp__4092__auto____$1))
{var ts = temp__4092__auto____$1;return lt.object.raise.call(null,ts,new cljs.core.Keyword(null,"tab.updated","tab.updated",2727558868));
} else
{return null;
}
} else
{return null;
}
} else
{var old_folder = [cljs.core.str(old),cljs.core.str(lt.objs.files.separator)].join('');var open = cljs.core.filter.call(null,((function (old_folder){
return (function (p1__8182_SHARP_){return cljs.core._EQ_.call(null,0,(function (){var or__3520__auto__ = cljs.core.get.call(null,new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__8182_SHARP_)),new cljs.core.Keyword(null,"path","path",1017337751));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return "";
}
})().indexOf(old_folder));
});})(old_folder))
,lt.object.by_tag.call(null,new cljs.core.Keyword(null,"editor","editor",4001043679)));var seq__8189 = cljs.core.seq.call(null,open);var chunk__8191 = null;var count__8192 = 0;var i__8193 = 0;while(true){
if((i__8193 < count__8192))
{var ed = cljs.core._nth.call(null,chunk__8191,i__8193);var neue_path_8195 = clojure.string.replace.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))),old,neue);lt.object.update_BANG_.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280)], null),cljs.core.assoc,new cljs.core.Keyword(null,"path","path",1017337751),neue_path_8195,new cljs.core.Keyword(null,"name","name",1017277949),lt.objs.files.basename.call(null,neue_path_8195));
lt.objs.document.move_doc.call(null,old,neue_path_8195);
{
var G__8196 = seq__8189;
var G__8197 = chunk__8191;
var G__8198 = count__8192;
var G__8199 = (i__8193 + 1);
seq__8189 = G__8196;
chunk__8191 = G__8197;
count__8192 = G__8198;
i__8193 = G__8199;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__8189);if(temp__4092__auto__)
{var seq__8189__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__8189__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__8189__$1);{
var G__8200 = cljs.core.chunk_rest.call(null,seq__8189__$1);
var G__8201 = c__4262__auto__;
var G__8202 = cljs.core.count.call(null,c__4262__auto__);
var G__8203 = 0;
seq__8189 = G__8200;
chunk__8191 = G__8201;
count__8192 = G__8202;
i__8193 = G__8203;
continue;
}
} else
{var ed = cljs.core.first.call(null,seq__8189__$1);var neue_path_8204 = clojure.string.replace.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"info","info",1017141280).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ed))),old,neue);lt.object.update_BANG_.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"info","info",1017141280)], null),cljs.core.assoc,new cljs.core.Keyword(null,"path","path",1017337751),neue_path_8204,new cljs.core.Keyword(null,"name","name",1017277949),lt.objs.files.basename.call(null,neue_path_8204));
lt.objs.document.move_doc.call(null,old,neue_path_8204);
{
var G__8205 = cljs.core.next.call(null,seq__8189__$1);
var G__8206 = null;
var G__8207 = 0;
var G__8208 = 0;
seq__8189 = G__8205;
chunk__8191 = G__8206;
count__8192 = G__8207;
i__8193 = G__8208;
continue;
}
}
} else
{return null;
}
}
break;
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","watched.rename","lt.objs.editor.pool/watched.rename",1794081507),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__watched__DOT__rename,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"rename","rename",4374276784),null,new cljs.core.Keyword(null,"watched.rename","watched.rename",1167218416),null], null), null));
/**
* Create a :lt.objs.editor/editor object with given info map and add it to current pool
*/
lt.objs.editor.pool.create = (function create(info){var ed = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.editor","editor","lt.objs.editor/editor",3793959614),info);lt.object.add_tags.call(null,ed,new cljs.core.Keyword(null,"tags","tags",1017456523).cljs$core$IFn$_invoke$arity$2(info,cljs.core.PersistentVector.EMPTY));
lt.object.merge_BANG_.call(null,ed,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"editor.generation","editor.generation",4482163627),lt.objs.editor.__GT_generation.call(null,ed)], null));
lt.object.raise.call(null,lt.objs.editor.pool.pool,new cljs.core.Keyword(null,"create","create",3956577390),ed,info);
lt.object.raise.call(null,ed,new cljs.core.Keyword(null,"create","create",3956577390));
return ed;
});
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"focus-last-editor","focus-last-editor",3007568513),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Focus last active editor",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.editor.pool.focus_last.call(null);
})], null));
lt.objs.editor.pool.syntax_selector = lt.objs.sidebar.command.filter_list.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"items","items",1114430258),(function (){return cljs.core.sort_by.call(null,new cljs.core.Keyword(null,"name","name",1017277949),cljs.core.vals.call(null,new cljs.core.Keyword(null,"types","types",1124748267).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.files.files_obj))));
}),new cljs.core.Keyword(null,"key","key",1014010321),new cljs.core.Keyword(null,"name","name",1017277949),new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"Syntax"], null));
lt.objs.editor.pool.__BEH__set_syntax = (function __BEH__set_syntax(this$,v){return lt.objs.sidebar.command.exec_active_BANG_.call(null,v);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","set-syntax","lt.objs.editor.pool/set-syntax",1300555571),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__set_syntax,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select","select",4402849902),null], null), null));
lt.objs.editor.pool.__BEH__init_syntax_selector = (function __BEH__init_syntax_selector(app){return lt.object.raise.call(null,lt.objs.editor.pool.syntax_selector,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","init-syntax-selector","lt.objs.editor.pool/init-syntax-selector",4625833809),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__init_syntax_selector,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"init","init",1017141378),null], null), null));
lt.object.add_behavior_BANG_.call(null,lt.objs.editor.pool.syntax_selector,new cljs.core.Keyword("lt.objs.editor.pool","set-syntax","lt.objs.editor.pool/set-syntax",1300555571));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"set-syntax","set-syntax",2718399264),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Set current editor syntax",new cljs.core.Keyword(null,"options","options",4059396624),lt.objs.editor.pool.syntax_selector,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (syn){var temp__4090__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4090__auto__))
{var last = temp__4090__auto__;return lt.objs.editor.pool.set_syntax.call(null,last,syn);
} else
{return lt.objs.notifos.set_msg_BANG_.call(null,"Set syntax requires an active editor");
}
})], null));
lt.objs.editor.pool.__BEH__line_comment_options = (function __BEH__line_comment_options(this$,options){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.editor.pool","comment-options","lt.objs.editor.pool/comment-options",1136977589),options], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.editor.pool","line-comment-options","lt.objs.editor.pool/line-comment-options",1061500094),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.editor.pool.__BEH__line_comment_options,new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Set options for line commenting",new cljs.core.Keyword(null,"params","params",4313443576),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"map",new cljs.core.Keyword(null,"example","example",3985900764),"{:indent true}"], null)], null),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),new cljs.core.Keyword(null,"type","type",1017479852),new cljs.core.Keyword(null,"user","user",1017503549));
lt.objs.editor.pool.do_commenting = (function do_commenting(commenting_fn){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;var from = lt.objs.editor.__GT_cursor.call(null,cur,"start");var to = (cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null,cur))?lt.objs.editor.__GT_cursor.call(null,cur,"end"):from);var options = new cljs.core.Keyword("lt.objs.editor.pool","comment-options","lt.objs.editor.pool/comment-options",1136977589).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,cur));return commenting_fn.call(null,cur,from,to,options);
} else
{return null;
}
});
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"comment-selection","comment-selection",4639099664),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Comment line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),cljs.core.partial.call(null,lt.objs.editor.pool.do_commenting,lt.objs.editor.line_comment)], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"block-comment-selection","block-comment-selection",3383649744),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Block Comment line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),cljs.core.partial.call(null,lt.objs.editor.pool.do_commenting,lt.objs.editor.block_comment)], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"uncomment-selection","uncomment-selection",2316362135),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Uncomment line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),cljs.core.partial.call(null,lt.objs.editor.pool.do_commenting,lt.objs.editor.uncomment)], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"toggle-comment-selection","toggle-comment-selection",4499822807),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Toggle comment line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),cljs.core.partial.call(null,lt.objs.editor.pool.do_commenting,lt.objs.editor.toggle_comment)], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"indent-selection","indent-selection",4336275741),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Indent line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;var line = new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(lt.objs.editor.__GT_cursor.call(null,cur,"start"));if(cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null,cur)))
{return lt.objs.editor.indent_selection.call(null,cur,"add");
} else
{return lt.objs.editor.indent_line.call(null,cur,line,"add");
}
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"unindent-selection","unindent-selection",2183138742),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Unindent line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;var line = new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(lt.objs.editor.__GT_cursor.call(null,cur,"start"));if(cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null,cur)))
{return lt.objs.editor.indent_selection.call(null,cur,"subtract");
} else
{return lt.objs.editor.indent_line.call(null,cur,line,"subtract");
}
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"smart-indent-selection","smart-indent-selection",1741810849),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Smart indent line(s)",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;return lt.objs.editor.indent_selection.call(null,cur,"smart");
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.selection.clear","editor.selection.clear",1854878812),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Clear selection",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;return lt.objs.editor.move_cursor.call(null,cur,lt.objs.editor.__GT_cursor.call(null,cur));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.select-all","editor.select-all",2519334883),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select all",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.selectAll(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.kill-line","editor.kill-line",891766068),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Kill line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.killLine(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-line","editor.delete-line",3395628871),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.deleteLine(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-line-left","editor.delete-line-left",4635399793),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete line left",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delLineLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.doc-start","editor.doc-start",1389615038),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to first line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goDocStart(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.doc-end","editor.doc-end",759533239),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to last line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goDocEnd(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-start","editor.line-start",2900917212),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to start of the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineStart(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-start-smart","editor.line-start-smart",944287256),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to first non-whitespace char in the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineStartSmart(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-end","editor.line-end",2110825045),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move to end of the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineEnd(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-right","editor.line-right",2899671446),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Goto the right of the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-left","editor.line-left",658910833),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Goto the left of the line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-up","editor.line-up",3404593925),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Previous line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineUp(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.line-down","editor.line-down",658682636),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Next line",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goLineDown(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.page-up","editor.page-up",2424143498),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Page up",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goPageUp(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.page-down","editor.page-down",3338627409),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Page down",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goPageDown(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.char-left","editor.char-left",4017821775),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move left one character",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goCharLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.char-right","editor.char-right",3946695544),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move right one character",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goCharRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.column-left","editor.column-left",3682706575),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move left one column",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goColumnLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.column-right","editor.column-right",2148058936),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move right one column",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goColumnRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.word-left","editor.word-left",3345093915),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move left one word",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goWordLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.word-right","editor.word-right",4566968364),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move right one word",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goWordRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.group-left","editor.group-left",1117568296),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move left one group",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goGroupLeft(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.group-right","editor.group-right",4233150911),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Move right one group",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.goGroupRight(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-char-left","editor.delete-char-left",3699343439),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete character to the left",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delCharBefore(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-char-right","editor.delete-char-right",2663801720),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete character to the right",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delCharAfter(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-word-left","editor.delete-word-left",3026615579),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete word to the left",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delWordBefore(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-word-right","editor.delete-word-right",3284074540),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete word to the right",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delWordAfter(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-group-left","editor.delete-group-left",4129641768),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete group to the left",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delGroupBefore(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.delete-group-right","editor.delete-group-right",3118148031),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Delete group to the right",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.delGroupAfter(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.transpose-chars","editor.transpose-chars",4274081082),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Transpose characters",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.transposeChars(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.new-line-indent","editor.new-line-indent",3360183529),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Newline and indent",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.newlineAndIndent(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.toggle-overwrite","editor.toggle-overwrite",663200293),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Toggle overwrite",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return CodeMirror.commands.toggleOverwrite(lt.objs.editor.__GT_cm_ed.call(null,ed));
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.cut","editor.cut",3751346611),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Cut",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.cut.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.copy","editor.copy",4270233288),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Copy",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.copy.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.paste","editor.paste",3187448388),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Paste",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.paste.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.select-all","editor.select-all",2519334883),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select all",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.select_all.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.select-line","editor.select-line",4732906134),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select line",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectLine");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.force.wrap","editor.force.wrap",4266087424),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Toggle line wrapping in current editor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;if(cljs.core.truth_(lt.objs.editor.option.call(null,ed,"lineWrapping")))
{lt.object.remove_tags.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.force.wrap","editor.force.wrap",4266087424)], null));
lt.object.add_tags.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.force.unwrap","editor.force.unwrap",3860426009)], null));
return lt.objs.notifos.set_msg_BANG_.call(null,"Wrapping off",new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"timeout","timeout",3994960083),2000], null));
} else
{lt.object.remove_tags.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.force.unwrap","editor.force.unwrap",3860426009)], null));
lt.object.add_tags.call(null,ed,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"editor.force.wrap","editor.force.wrap",4266087424)], null));
return lt.objs.notifos.set_msg_BANG_.call(null,"Wrapping on",new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"timeout","timeout",3994960083),2000], null));
}
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.undo","editor.undo",4270768183),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Undo",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.undo.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.redo","editor.redo",4270670161),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Redo",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.redo.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Execute a CodeMirror command",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function() { 
var G__8209__delegate = function (cmd,args){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;var temp__4092__auto____$1 = (CodeMirror.commands[cmd]);if(cljs.core.truth_(temp__4092__auto____$1))
{var command = temp__4092__auto____$1;if(cljs.core._EQ_.call(null,CodeMirror.Pass,cljs.core.apply.call(null,command,lt.objs.editor.__GT_cm_ed.call(null,ed),args)))
{return lt.objs.keyboard.passthrough.call(null);
} else
{return null;
}
} else
{return null;
}
} else
{return null;
}
};
var G__8209 = function (cmd,var_args){
var args = null;if (arguments.length > 1) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);} 
return G__8209__delegate.call(this,cmd,args);};
G__8209.cljs$lang$maxFixedArity = 1;
G__8209.cljs$lang$applyTo = (function (arglist__8210){
var cmd = cljs.core.first(arglist__8210);
var args = cljs.core.rest(arglist__8210);
return G__8209__delegate(cmd,args);
});
G__8209.cljs$core$IFn$_invoke$arity$variadic = G__8209__delegate;
return G__8209;
})()
], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.fold-code","editor.fold-code",2976735338),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Fold code at cursor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.fold_code.call(null,ed);
} else
{return null;
}
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.singleSelectionTop","editor.sublime.singleSelectionTop",3543136669),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Set selection to top most cursor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"singleSelectionTop");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.singleSelectionTop","editor.sublime.singleSelectionTop",3543136669),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Clear multiple cursors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"singleSelectionTop");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.insertLineAfter","editor.sublime.insertLineAfter",935888807),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Insert line after",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"insertLineAfter");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.insertLineBefore","editor.sublime.insertLineBefore",2917691320),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Insert line before",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"insertLineBefore");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectNextOccurrence","editor.sublime.selectNextOccurrence",2958133196),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select next occurrence of word",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectNextOccurrence");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectBetweenBrackets","editor.sublime.selectBetweenBrackets",2949510127),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select between brackets",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectBetweenBrackets");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectScope","editor.sublime.selectScope",4149085648),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select scope",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectScope");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.goToBracket","editor.sublime.goToBracket",3682815165),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Go to bracket",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"goToBracket");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.swapLineUp","editor.sublime.swapLineUp",3809639470),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Swap line up",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"swapLineUp");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.swapLineDown","editor.sublime.swapLineDown",3360394741),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Swap line down",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"swapLineDown");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.joinLines","editor.sublime.joinLines",2158627981),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Join lines",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"joinLines");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.duplicateLine","editor.sublime.duplicateLine",3547844919),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Duplicate line",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"duplicateLine");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.sortLines","editor.sublime.sortLines",2640780441),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Sort lines",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"sortLines");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.sortLinesInsensitive","editor.sublime.sortLinesInsensitive",948322012),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Sort lines insensitive",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"sortLinesInsensitive");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectLinesUpward","editor.sublime.selectLinesUpward",3377312626),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select lines upward with multiple cursors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectLinesUpward");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.selectLinesDownward","editor.sublime.selectLinesDownward",4068276153),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Select lines downward with multiple cursors",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"selectLinesDownward");
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"editor.sublime.splitSelectionByLine","editor.sublime.splitSelectionByLine",1824418217),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Split selection into cursors per line",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"editor.codemirror.command","editor.codemirror.command",3862266076),"splitSelectionByLine");
})], null));
