// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.clients.devtools');
goog.require('cljs.core');
goog.require('crate.binding');
goog.require('lt.util.js');
goog.require('lt.objs.app');
goog.require('lt.objs.files');
goog.require('lt.util.js');
goog.require('lt.util.dom');
goog.require('cljs.reader');
goog.require('crate.core');
goog.require('lt.util.dom');
goog.require('clojure.string');
goog.require('lt.objs.files');
goog.require('lt.objs.app');
goog.require('lt.objs.clients');
goog.require('clojure.string');
goog.require('crate.binding');
goog.require('lt.object');
goog.require('cljs.reader');
goog.require('lt.object');
goog.require('lt.objs.console');
goog.require('lt.util.ipc');
goog.require('lt.objs.console');
goog.require('crate.core');
goog.require('lt.objs.clients');
goog.require('lt.util.ipc');
goog.require('fetch.core');
goog.require('fetch.core');
lt.objs.clients.devtools.cbs = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
lt.objs.clients.devtools.id = cljs.core.atom.call(null,0);
lt.objs.clients.devtools.devtools_url = "http://localhost:8315/json";
lt.objs.clients.devtools.next_id = (function next_id(){return cljs.core.swap_BANG_.call(null,lt.objs.clients.devtools.id,cljs.core.inc);
});
lt.objs.clients.devtools.find_debugger_info = (function find_debugger_info(info,url){return cljs.core.first.call(null,cljs.core.filter.call(null,(function (cur){var and__3508__auto__ = cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(cur),url);if(and__3508__auto__)
{return new cljs.core.Keyword(null,"webSocketDebuggerUrl","webSocketDebuggerUrl",667502233).cljs$core$IFn$_invoke$arity$1(cur);
} else
{return and__3508__auto__;
}
}),info));
});
lt.objs.clients.devtools.socket = (function socket(this$,url){var sock = (new WebSocket(url));sock.onopen = (function (){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"connected","connected",4729661051),true], null));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"connect","connect",1965255772));
});
sock.onmessage = (function (p1__7306_SHARP_){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"message","message",1968829305),cljs.core.js__GT_clj.call(null,JSON.parse(p1__7306_SHARP_.data),new cljs.core.Keyword(null,"keywordize-keys","keywordize-keys",4191781672),true));
});
return sock;
});
lt.objs.clients.devtools.send_STAR_ = (function send_STAR_(client,m,cb){new cljs.core.Keyword(null,"socket","socket",4411822821).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,client)).send(JSON.stringify(cljs.core.clj__GT_js.call(null,m)));
if(cljs.core.truth_(cb))
{return cljs.core.swap_BANG_.call(null,lt.objs.clients.devtools.cbs,cljs.core.assoc,new cljs.core.Keyword(null,"id","id",1013907597).cljs$core$IFn$_invoke$arity$1(m),cb);
} else
{return null;
}
});
/**
* @param {...*} var_args
*/
lt.objs.clients.devtools.send = (function() { 
var send__delegate = function (client,m,p__7307){var vec__7309 = p__7307;var cb = cljs.core.nth.call(null,vec__7309,0,null);if(cljs.core.truth_(new cljs.core.Keyword(null,"connected","connected",4729661051).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,client))))
{return lt.objs.clients.devtools.send_STAR_.call(null,client,m,cb);
} else
{return lt.object.update_BANG_.call(null,client,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"queue","queue",1121848451)], null),cljs.core.conj,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [client,m,cb], null));
}
};
var send = function (client,m,var_args){
var p__7307 = null;if (arguments.length > 2) {
  p__7307 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2),0);} 
return send__delegate.call(this,client,m,p__7307);};
send.cljs$lang$maxFixedArity = 2;
send.cljs$lang$applyTo = (function (arglist__7310){
var client = cljs.core.first(arglist__7310);
arglist__7310 = cljs.core.next(arglist__7310);
var m = cljs.core.first(arglist__7310);
var p__7307 = cljs.core.rest(arglist__7310);
return send__delegate(client,m,p__7307);
});
send.cljs$core$IFn$_invoke$arity$variadic = send__delegate;
return send;
})()
;
lt.objs.clients.devtools.close = (function close(client){new cljs.core.Keyword(null,"socket","socket",4411822821).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,client)).close();
return lt.object.merge_BANG_.call(null,client,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"socket","socket",4411822821),null,new cljs.core.Keyword(null,"connected","connected",4729661051),null], null));
});
lt.objs.clients.devtools.format_value = (function format_value(v){var val = new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(v);if(cljs.core._EQ_.call(null,val,"undefined"))
{return "undefined";
} else
{if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1017479852).cljs$core$IFn$_invoke$arity$1(v),"string"))
{return cljs.core.pr_str.call(null,val);
} else
{if((val === true) || (val === false))
{return cljs.core.pr_str.call(null,val);
} else
{if(((val == null)) || (cljs.core.empty_QMARK_.call(null,val)))
{return "null";
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(v);
} else
{return null;
}
}
}
}
}
});
lt.objs.clients.devtools.msg__GT_log = (function msg__GT_log(this$,m){var params = new cljs.core.Keyword(null,"parameters","parameters",1472640348).cljs$core$IFn$_invoke$arity$1(m);var iter__4231__auto__ = (function iter__7315(s__7316){return (new cljs.core.LazySeq(null,(function (){var s__7316__$1 = s__7316;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__7316__$1);if(temp__4092__auto__)
{var s__7316__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__7316__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__7316__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__7318 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__7317 = 0;while(true){
if((i__7317 < size__4230__auto__))
{var p = cljs.core._nth.call(null,c__4229__auto__,i__7317);cljs.core.chunk_append.call(null,b__7318,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.log-val","span.log-val",3645418982),(cljs.core.truth_((function (){var and__3508__auto__ = cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1017479852).cljs$core$IFn$_invoke$arity$1(p),"object");if(and__3508__auto__)
{var and__3508__auto____$1 = new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(p);if(cljs.core.truth_(and__3508__auto____$1))
{return cljs.core.not.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(p)));
} else
{return and__3508__auto____$1;
}
} else
{return and__3508__auto__;
}
})())?"null":((cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1017479852).cljs$core$IFn$_invoke$arity$1(p),"object"))?lt.object.__GT_content.call(null,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","inspector-object","lt.objs.clients.devtools/inspector-object",4768596045),this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"value","value",1125876963),p], null))):((new cljs.core.Keyword(null,"else","else",1017020587))?new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$2(p,new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(p)):null)))], null));
{
var G__7319 = (i__7317 + 1);
i__7317 = G__7319;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__7318),iter__7315.call(null,cljs.core.chunk_rest.call(null,s__7316__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__7318),null);
}
} else
{var p = cljs.core.first.call(null,s__7316__$2);return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.log-val","span.log-val",3645418982),(cljs.core.truth_((function (){var and__3508__auto__ = cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1017479852).cljs$core$IFn$_invoke$arity$1(p),"object");if(and__3508__auto__)
{var and__3508__auto____$1 = new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(p);if(cljs.core.truth_(and__3508__auto____$1))
{return cljs.core.not.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(p)));
} else
{return and__3508__auto____$1;
}
} else
{return and__3508__auto__;
}
})())?"null":((cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1017479852).cljs$core$IFn$_invoke$arity$1(p),"object"))?lt.object.__GT_content.call(null,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","inspector-object","lt.objs.clients.devtools/inspector-object",4768596045),this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"value","value",1125876963),p], null))):((new cljs.core.Keyword(null,"else","else",1017020587))?new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$2(p,new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(p)):null)))], null),iter__7315.call(null,cljs.core.rest.call(null,s__7316__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,params);
});
lt.objs.clients.devtools.msg__GT_string = (function msg__GT_string(m){var params = new cljs.core.Keyword(null,"parameters","parameters",1472640348).cljs$core$IFn$_invoke$arity$1(m);return cljs.core.reduce.call(null,(function (res,p){return [cljs.core.str(res),cljs.core.str(" "),cljs.core.str(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(p))].join('');
}),"",params);
});
lt.objs.clients.devtools.error__GT_string = (function error__GT_string(e){return [cljs.core.str("ERROR: "),cljs.core.str(new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(e)),cljs.core.str(": "),cljs.core.str(new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(e)),cljs.core.str("\n"),cljs.core.str(cljs.core.reduce.call(null,(function (res,f){return [cljs.core.str(res),cljs.core.str("       "),cljs.core.str(lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(f))),cljs.core.str(" ["),cljs.core.str(new cljs.core.Keyword(null,"lineNumber","lineNumber",684762063).cljs$core$IFn$_invoke$arity$1(f)),cljs.core.str("]: "),cljs.core.str(((cljs.core.empty_QMARK_.call(null,new cljs.core.Keyword(null,"functionName","functionName",802531829).cljs$core$IFn$_invoke$arity$1(f)))?"anonymous":new cljs.core.Keyword(null,"functionName","functionName",802531829).cljs$core$IFn$_invoke$arity$1(f))),cljs.core.str("\n")].join('');
}),"",new cljs.core.Keyword(null,"stackTrace","stackTrace",3040184079).cljs$core$IFn$_invoke$arity$1(e)))].join('');
});
lt.objs.clients.devtools.frame = (function frame(f){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,"tr","tr",1013907952),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td.url","td.url",4428724323),lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(f))," [",new cljs.core.Keyword(null,"lineNumber","lineNumber",684762063).cljs$core$IFn$_invoke$arity$1(f),"]"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"td","td",1013907938),((cljs.core.empty_QMARK_.call(null,new cljs.core.Keyword(null,"functionName","functionName",802531829).cljs$core$IFn$_invoke$arity$1(f)))?"anonymous":new cljs.core.Keyword(null,"functionName","functionName",802531829).cljs$core$IFn$_invoke$arity$1(f))], null)], null));var seq__7326_7332 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__7327_7333 = null;var count__7328_7334 = 0;var i__7329_7335 = 0;while(true){
if((i__7329_7335 < count__7328_7334))
{var vec__7330_7336 = cljs.core._nth.call(null,chunk__7327_7333,i__7329_7335);var ev__3326__auto___7337 = cljs.core.nth.call(null,vec__7330_7336,0,null);var func__3327__auto___7338 = cljs.core.nth.call(null,vec__7330_7336,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7337,func__3327__auto___7338);
{
var G__7339 = seq__7326_7332;
var G__7340 = chunk__7327_7333;
var G__7341 = count__7328_7334;
var G__7342 = (i__7329_7335 + 1);
seq__7326_7332 = G__7339;
chunk__7327_7333 = G__7340;
count__7328_7334 = G__7341;
i__7329_7335 = G__7342;
continue;
}
} else
{var temp__4092__auto___7343 = cljs.core.seq.call(null,seq__7326_7332);if(temp__4092__auto___7343)
{var seq__7326_7344__$1 = temp__4092__auto___7343;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7326_7344__$1))
{var c__4262__auto___7345 = cljs.core.chunk_first.call(null,seq__7326_7344__$1);{
var G__7346 = cljs.core.chunk_rest.call(null,seq__7326_7344__$1);
var G__7347 = c__4262__auto___7345;
var G__7348 = cljs.core.count.call(null,c__4262__auto___7345);
var G__7349 = 0;
seq__7326_7332 = G__7346;
chunk__7327_7333 = G__7347;
count__7328_7334 = G__7348;
i__7329_7335 = G__7349;
continue;
}
} else
{var vec__7331_7350 = cljs.core.first.call(null,seq__7326_7344__$1);var ev__3326__auto___7351 = cljs.core.nth.call(null,vec__7331_7350,0,null);var func__3327__auto___7352 = cljs.core.nth.call(null,vec__7331_7350,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7351,func__3327__auto___7352);
{
var G__7353 = cljs.core.next.call(null,seq__7326_7344__$1);
var G__7354 = null;
var G__7355 = 0;
var G__7356 = 0;
seq__7326_7332 = G__7353;
chunk__7327_7333 = G__7354;
count__7328_7334 = G__7355;
i__7329_7335 = G__7356;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.clients.devtools.handle_log_msg = (function (){var method_table__4372__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var prefer_table__4373__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var method_cache__4374__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var cached_hierarchy__4375__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);var hierarchy__4376__auto__ = cljs.core.get.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"hierarchy","hierarchy",3129050535),cljs.core.get_global_hierarchy.call(null));return (new cljs.core.MultiFn("handle-log-msg",(function (p1__7358_SHARP_,p2__7357_SHARP_){return new cljs.core.Keyword(null,"level","level",1116770038).cljs$core$IFn$_invoke$arity$1(p2__7357_SHARP_);
}),new cljs.core.Keyword(null,"default","default",2558708147),hierarchy__4376__auto__,method_table__4372__auto__,prefer_table__4373__auto__,method_cache__4374__auto__,cached_hierarchy__4375__auto__));
})();
lt.objs.clients.devtools.valid_error_QMARK_ = (function valid_error_QMARK_(text){var text__$1 = text.toLowerCase();return cljs.core.every_QMARK_.call(null,(function (p1__7359_SHARP_){return cljs.core._EQ_.call(null,-1,text__$1.indexOf(p1__7359_SHARP_));
}),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["failed to load resource: http://app.kodowa.com"], null));
});
cljs.core._add_method.call(null,lt.objs.clients.devtools.handle_log_msg,"error",(function (this$,msg){if(lt.objs.clients.devtools.valid_error_QMARK_.call(null,[cljs.core.str(new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(msg)),cljs.core.str(": "),cljs.core.str(new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(msg))].join('')))
{var top = cljs.core.first.call(null,new cljs.core.Keyword(null,"stackTrace","stackTrace",3040184079).cljs$core$IFn$_invoke$arity$1(msg));return lt.objs.console.verbatim.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, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h3","h3",1013907517),new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(msg),(cljs.core.truth_(new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(top))?null:[cljs.core.str(": "),cljs.core.str(new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(msg))].join(''))], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"table","table",1124020032),(function (){var iter__4231__auto__ = (function iter__7360(s__7361){return (new cljs.core.LazySeq(null,(function (){var s__7361__$1 = s__7361;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__7361__$1);if(temp__4092__auto__)
{var s__7361__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__7361__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__7361__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__7363 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__7362 = 0;while(true){
if((i__7362 < size__4230__auto__))
{var f = cljs.core._nth.call(null,c__4229__auto__,i__7362);cljs.core.chunk_append.call(null,b__7363,lt.objs.clients.devtools.frame.call(null,f));
{
var G__7364 = (i__7362 + 1);
i__7362 = G__7364;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__7363),iter__7360.call(null,cljs.core.chunk_rest.call(null,s__7361__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__7363),null);
}
} else
{var f = cljs.core.first.call(null,s__7361__$2);return cljs.core.cons.call(null,lt.objs.clients.devtools.frame.call(null,f),iter__7360.call(null,cljs.core.rest.call(null,s__7361__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,new cljs.core.Keyword(null,"stackTrace","stackTrace",3040184079).cljs$core$IFn$_invoke$arity$1(msg));
})()], null)], null),"error",lt.objs.clients.devtools.error__GT_string.call(null,msg));
} else
{return null;
}
}));
cljs.core._add_method.call(null,lt.objs.clients.devtools.handle_log_msg,"log",(function (this$,msg){var stack = cljs.core.first.call(null,cljs.core.filter.call(null,(function (p1__7365_SHARP_){return cljs.core.not_EQ_.call(null,lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(p1__7365_SHARP_)),"bootstrap.js");
}),new cljs.core.Keyword(null,"stackTrace","stackTrace",3040184079).cljs$core$IFn$_invoke$arity$1(msg)));var stack__$1 = ((cljs.core.not.call(null,stack))?cljs.core.first.call(null,new cljs.core.Keyword(null,"stackTrace","stackTrace",3040184079).cljs$core$IFn$_invoke$arity$1(msg)):stack);return lt.objs.console.loc_log.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",1017047278),lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(stack__$1)),new cljs.core.Keyword(null,"line","line",1017226086),new cljs.core.Keyword(null,"lineNumber","lineNumber",684762063).cljs$core$IFn$_invoke$arity$1(stack__$1),new cljs.core.Keyword(null,"content","content",1965434859),lt.objs.clients.devtools.msg__GT_log.call(null,this$,msg),new cljs.core.Keyword(null,"str-content","str-content",1379403855),lt.objs.clients.devtools.msg__GT_string.call(null,msg)], null));
}));
cljs.core._add_method.call(null,lt.objs.clients.devtools.handle_log_msg,"warning",(function (this$,msg){return lt.objs.console.loc_log.call(null,new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"file","file",1017047278),lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(msg)),new cljs.core.Keyword(null,"line","line",1017226086),new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"class","class",1108647146),"warning",new cljs.core.Keyword(null,"content","content",1965434859),new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"str-content","str-content",1379403855),new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(msg)], null));
}));
cljs.core._add_method.call(null,lt.objs.clients.devtools.handle_log_msg,new cljs.core.Keyword(null,"default","default",2558708147),(function (this$,msg){return lt.objs.console.loc_log.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",1017047278),lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(msg)),new cljs.core.Keyword(null,"line","line",1017226086),new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"content","content",1965434859),new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(msg),new cljs.core.Keyword(null,"str-content","str-content",1379403855),new cljs.core.Keyword(null,"text","text",1017460895).cljs$core$IFn$_invoke$arity$1(msg)], null));
}));
lt.objs.clients.devtools.extra_escape = (function extra_escape(code){return clojure.string.replace.call(null,clojure.string.replace.call(null,clojure.string.replace.call(null,code,"\\","\\\\"),"\n","\\n"),"'","\\'");
});
lt.objs.clients.devtools.eval_in_webview_client = (function eval_in_webview_client(webview_client,msg,cb){return lt.objs.clients.devtools.send.call(null,webview_client,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.clients.devtools.next_id.call(null),new cljs.core.Keyword(null,"method","method",4231316563),"Runtime.evaluate",new cljs.core.Keyword(null,"params","params",4313443576),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"expression","expression",3513419274),new cljs.core.Keyword(null,"code","code",1016963423).cljs$core$IFn$_invoke$arity$1(msg)], null)], null),cb);
});
lt.objs.clients.devtools.clear_scripts_BANG_ = (function clear_scripts_BANG_(this$){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"scripts","scripts",2940419194),cljs.core.PersistentArrayMap.EMPTY], null));
});
lt.objs.clients.devtools.find_script = (function find_script(client,path){var found_QMARK_ = cljs.core.get.call(null,cljs.core.deref.call(null,client).call(null,new cljs.core.Keyword(null,"scripts","scripts",2940419194)),lt.objs.files.basename.call(null,path));return found_QMARK_;
});
lt.objs.clients.devtools.script_exists_QMARK_ = (function script_exists_QMARK_(this$,id,cb){return lt.objs.clients.devtools.send.call(null,this$,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.clients.devtools.next_id.call(null),new cljs.core.Keyword(null,"method","method",4231316563),"Debugger.canSetScriptSource",new cljs.core.Keyword(null,"params","params",4313443576),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"scriptId","scriptId",606324408),id], null)], null),(function (res){return cb.call(null,new cljs.core.Keyword(null,"result","result",4374444943).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"result","result",4374444943).cljs$core$IFn$_invoke$arity$1(res)));
}));
});
lt.objs.clients.devtools.remove_script_BANG_ = (function remove_script_BANG_(client,path,id){var vec__7368 = cljs.core.first.call(null,cljs.core.filter.call(null,(function (p1__7366_SHARP_){return cljs.core._EQ_.call(null,id,new cljs.core.Keyword(null,"scriptId","scriptId",606324408).cljs$core$IFn$_invoke$arity$1(cljs.core.second.call(null,p1__7366_SHARP_)));
}),lt.objs.clients.devtools.find_script.call(null,client,path)));var k = cljs.core.nth.call(null,vec__7368,0,null);var v = cljs.core.nth.call(null,vec__7368,1,null);return lt.object.update_BANG_.call(null,client,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"scripts","scripts",2940419194),lt.objs.files.basename.call(null,path)], null),cljs.core.dissoc,k);
});
lt.objs.clients.devtools.changelive_BANG_ = (function changelive_BANG_(obj,path,code,cb,else$){var temp__4090__auto__ = lt.objs.clients.devtools.find_script.call(null,obj,path);if(cljs.core.truth_(temp__4090__auto__))
{var s = temp__4090__auto__;var id = new cljs.core.Keyword(null,"scriptId","scriptId",606324408).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null,cljs.core.vals.call(null,s)));return lt.objs.clients.devtools.script_exists_QMARK_.call(null,obj,id,(function (exists_QMARK_){if(cljs.core.not.call(null,exists_QMARK_))
{lt.objs.clients.devtools.remove_script_BANG_.call(null,obj,path,id);
return changelive_BANG_.call(null,obj,path,code,cb);
} else
{lt.object.merge_BANG_.call(null,obj,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"script-id","script-id",1263804623),id], null));
return lt.objs.clients.devtools.send.call(null,obj,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.clients.devtools.next_id.call(null),new cljs.core.Keyword(null,"method","method",4231316563),"Debugger.setScriptSource",new cljs.core.Keyword(null,"params","params",4313443576),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"scriptId","scriptId",606324408),id,new cljs.core.Keyword(null,"scriptSource","scriptSource",3711898680),code], null)], null),cb);
}
}));
} else
{return else$.call(null);
}
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","devtools-client","lt.objs.clients.devtools/devtools-client",2732459658),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"clients.devtools","clients.devtools",2282697598),null], null), null),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,url){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"url","url",1014020321),url], null));
return null;
}));
lt.objs.clients.devtools.local = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","devtools-client","lt.objs.clients.devtools/devtools-client",2732459658),lt.objs.app.app_url.call(null));
lt.util.ipc.on.call(null,"devtools",(function (p1__7369_SHARP_){return lt.object.raise.call(null,lt.objs.clients.devtools.local,cljs.core.keyword.call(null,p1__7369_SHARP_));
}));
lt.objs.clients.devtools.__BEH__connect_BANG_ = (function __BEH__connect_BANG_(this$,url){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"socket","socket",4411822821),lt.objs.clients.devtools.socket.call(null,this$,url)], null));
lt.objs.clients.devtools.send.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.clients.devtools.next_id.call(null),new cljs.core.Keyword(null,"method","method",4231316563),"Console.enable"], null));
lt.objs.clients.devtools.send.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.clients.devtools.next_id.call(null),new cljs.core.Keyword(null,"method","method",4231316563),"Debugger.enable"], null));
return lt.objs.clients.devtools.send.call(null,this$,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.clients.devtools.next_id.call(null),new cljs.core.Keyword(null,"method","method",4231316563),"Network.setCacheDisabled",new cljs.core.Keyword(null,"params","params",4313443576),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"cacheDisabled","cacheDisabled",3367083920),true], null)], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","connect!","lt.objs.clients.devtools/connect!",4727522991),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__connect_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"connect!","connect!",4735997929),null], null), null));
lt.objs.clients.devtools.__BEH__clear_queue_on_connect = (function __BEH__clear_queue_on_connect(this$){var seq__7374 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"queue","queue",1121848451).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var chunk__7375 = null;var count__7376 = 0;var i__7377 = 0;while(true){
if((i__7377 < count__7376))
{var msg = cljs.core._nth.call(null,chunk__7375,i__7377);cljs.core.apply.call(null,lt.objs.clients.devtools.send,msg);
{
var G__7378 = seq__7374;
var G__7379 = chunk__7375;
var G__7380 = count__7376;
var G__7381 = (i__7377 + 1);
seq__7374 = G__7378;
chunk__7375 = G__7379;
count__7376 = G__7380;
i__7377 = G__7381;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__7374);if(temp__4092__auto__)
{var seq__7374__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7374__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__7374__$1);{
var G__7382 = cljs.core.chunk_rest.call(null,seq__7374__$1);
var G__7383 = c__4262__auto__;
var G__7384 = cljs.core.count.call(null,c__4262__auto__);
var G__7385 = 0;
seq__7374 = G__7382;
chunk__7375 = G__7383;
count__7376 = G__7384;
i__7377 = G__7385;
continue;
}
} else
{var msg = cljs.core.first.call(null,seq__7374__$1);cljs.core.apply.call(null,lt.objs.clients.devtools.send,msg);
{
var G__7386 = cljs.core.next.call(null,seq__7374__$1);
var G__7387 = null;
var G__7388 = 0;
var G__7389 = 0;
seq__7374 = G__7386;
chunk__7375 = G__7387;
count__7376 = G__7388;
i__7377 = G__7389;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","clear-queue-on-connect","lt.objs.clients.devtools/clear-queue-on-connect",2202730096),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__clear_queue_on_connect,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"connect","connect",1965255772),null], null), null));
lt.objs.clients.devtools.__BEH__print_messages = (function __BEH__print_messages(this$,m){return null;
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","print-messages","lt.objs.clients.devtools/print-messages",675571380),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__print_messages,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"message","message",1968829305),null], null), null));
lt.objs.clients.devtools.__BEH__handle_message = (function __BEH__handle_message(this$,m){var temp__4090__auto__ = cljs.core.deref.call(null,lt.objs.clients.devtools.cbs).call(null,new cljs.core.Keyword(null,"id","id",1013907597).cljs$core$IFn$_invoke$arity$1(m));if(cljs.core.truth_(temp__4090__auto__))
{var cb = temp__4090__auto__;cb.call(null,m);
return cljs.core.swap_BANG_.call(null,lt.objs.clients.devtools.cbs,cljs.core.dissoc,new cljs.core.Keyword(null,"id","id",1013907597).cljs$core$IFn$_invoke$arity$1(m));
} else
{if(cljs.core.truth_(new cljs.core.Keyword(null,"method","method",4231316563).cljs$core$IFn$_invoke$arity$1(m)))
{return lt.object.raise.call(null,this$,cljs.core.keyword.call(null,new cljs.core.Keyword(null,"method","method",4231316563).cljs$core$IFn$_invoke$arity$1(m)),m);
} else
{return null;
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","handle-message","lt.objs.clients.devtools/handle-message",1428636858),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__handle_message,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"message","message",1968829305),null], null), null));
lt.objs.clients.devtools.__BEH__script_parsed = (function __BEH__script_parsed(this$,s){var url = new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"params","params",4313443576).cljs$core$IFn$_invoke$arity$1(s));return lt.object.update_BANG_.call(null,this$,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"scripts","scripts",2940419194)], null),cljs.core.assoc_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.files.basename.call(null,url),url], null),new cljs.core.Keyword(null,"params","params",4313443576).cljs$core$IFn$_invoke$arity$1(s));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","script-parsed","lt.objs.clients.devtools/script-parsed",1407217355),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__script_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,"Debugger.scriptParsed","Debugger.scriptParsed",1050864827),null], null), null));
lt.objs.clients.devtools.__BEH__console_log = (function __BEH__console_log(this$,m){var msg = new cljs.core.Keyword(null,"message","message",1968829305).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"params","params",4313443576).cljs$core$IFn$_invoke$arity$1(m));return lt.objs.clients.devtools.handle_log_msg.call(null,this$,msg);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","console-log","lt.objs.clients.devtools/console-log",1720612182),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__console_log,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"Console.messageAdded","Console.messageAdded",4767739906),null], null), null));
lt.objs.clients.devtools.__BEH__clear_console = (function __BEH__clear_console(this$){return lt.objs.clients.devtools.send.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.clients.devtools.next_id.call(null),new cljs.core.Keyword(null,"method","method",4231316563),"Console.clearMessages"], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","clear-console","lt.objs.clients.devtools/clear-console",2897345871),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__clear_console,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"clear!","clear!",3951036134),null], null), null));
lt.objs.clients.devtools.__BEH__disconnect = (function __BEH__disconnect(this$){if(cljs.core.truth_(new cljs.core.Keyword(null,"socket","socket",4411822821).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return lt.objs.clients.devtools.close.call(null,this$);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","disconnect","lt.objs.clients.devtools/disconnect",3633156740),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__disconnect,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"disconnect","disconnect",1544309774),null], null), null));
lt.objs.clients.devtools.__BEH__reconnect = (function __BEH__reconnect(this$){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"disconnect","disconnect",1544309774));
return fetch.core.xhr.call(null,lt.objs.clients.devtools.devtools_url,cljs.core.PersistentArrayMap.EMPTY,(function (d){var temp__4090__auto__ = new cljs.core.Keyword(null,"webSocketDebuggerUrl","webSocketDebuggerUrl",667502233).cljs$core$IFn$_invoke$arity$1(lt.objs.clients.devtools.find_debugger_info.call(null,cljs.core.js__GT_clj.call(null,JSON.parse(d),new cljs.core.Keyword(null,"keywordize-keys","keywordize-keys",4191781672),true),new cljs.core.Keyword(null,"url","url",1014020321).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))));if(cljs.core.truth_(temp__4090__auto__))
{var url = temp__4090__auto__;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"connect!","connect!",4735997929),url);
} else
{return lt.util.js.wait.call(null,1000,(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"reconnect!","reconnect!",1644020508));
}));
}
}));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","reconnect","lt.objs.clients.devtools/reconnect",3171303119),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__reconnect,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"reconnect!","reconnect!",1644020508),null], null), null));
lt.objs.clients.devtools.__BEH__connect_on_init = (function __BEH__connect_on_init(app){return lt.object.raise.call(null,lt.objs.clients.devtools.local,new cljs.core.Keyword(null,"reconnect!","reconnect!",1644020508));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","connect-on-init","lt.objs.clients.devtools/connect-on-init",605011907),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__connect_on_init,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.objs.clients.devtools.i_compare = (function i_compare(a,b){var ia = a.indexOf("__");var ib = b.indexOf("__");if((cljs.core._EQ_.call(null,ia,-1)) && (cljs.core._EQ_.call(null,ib,-1)))
{return cljs.core.compare.call(null,a,b);
} else
{if(((ia > -1)) && ((ib > -1)))
{return cljs.core.compare.call(null,a,b);
} else
{if((ia > -1))
{return 1;
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return -1;
} else
{return null;
}
}
}
}
});
lt.objs.clients.devtools.__GT_name = (function __GT_name(obj){var n = (function (){var or__3520__auto__ = new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(obj);if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{var or__3520__auto____$1 = new cljs.core.Keyword(null,"description","description",3584325486).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(obj));if(cljs.core.truth_(or__3520__auto____$1))
{return or__3520__auto____$1;
} else
{var or__3520__auto____$2 = new cljs.core.Keyword(null,"description","description",3584325486).cljs$core$IFn$_invoke$arity$1(obj);if(cljs.core.truth_(or__3520__auto____$2))
{return or__3520__auto____$2;
} else
{return "UnknownObject";
}
}
}
})();if((n.indexOf("e.fn.e.init") > -1))
{return [cljs.core.str("jQuery"),cljs.core.str(cljs.core.subs.call(null,n,11))].join('');
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return n;
} else
{return null;
}
}
});
lt.objs.clients.devtools.desc = (function desc(this$,obj){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,"h2","h2",1013907516),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"em","em",1013907482),lt.objs.clients.devtools.__GT_name.call(null,obj)], null),(cljs.core.truth_(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(obj))?[cljs.core.str(": "),cljs.core.str(new cljs.core.Keyword(null,"description","description",3584325486).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(obj)))].join(''):null)], null));var seq__7396_7402 = 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_(new cljs.core.Keyword(null,"open","open",1017321916).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open","open",1017321916),false], null));
} else
{lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open","open",1017321916),true], null));
if(cljs.core.seq.call(null,new cljs.core.Keyword(null,"children","children",2673430897).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return null;
} else
{return lt.objs.clients.devtools.send.call(null,new cljs.core.Keyword(null,"client","client",3951159101).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",1013907597),1,new cljs.core.Keyword(null,"method","method",4231316563),"Runtime.getProperties",new cljs.core.Keyword(null,"params","params",4313443576),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"objectId","objectId",1104399404),(function (){var or__3520__auto__ = new cljs.core.Keyword(null,"objectId","objectId",1104399404).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(obj));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return new cljs.core.Keyword(null,"objectId","objectId",1104399404).cljs$core$IFn$_invoke$arity$1(obj);
}
})(),new cljs.core.Keyword(null,"ownProperties","ownProperties",1958141131),true], null)], null),(function (d){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"children","children",2673430897),new cljs.core.Keyword(null,"result","result",4374444943).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"result","result",4374444943).cljs$core$IFn$_invoke$arity$1(d))], null));
}));
}
}
})], null)));var chunk__7397_7403 = null;var count__7398_7404 = 0;var i__7399_7405 = 0;while(true){
if((i__7399_7405 < count__7398_7404))
{var vec__7400_7406 = cljs.core._nth.call(null,chunk__7397_7403,i__7399_7405);var ev__3326__auto___7407 = cljs.core.nth.call(null,vec__7400_7406,0,null);var func__3327__auto___7408 = cljs.core.nth.call(null,vec__7400_7406,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7407,func__3327__auto___7408);
{
var G__7409 = seq__7396_7402;
var G__7410 = chunk__7397_7403;
var G__7411 = count__7398_7404;
var G__7412 = (i__7399_7405 + 1);
seq__7396_7402 = G__7409;
chunk__7397_7403 = G__7410;
count__7398_7404 = G__7411;
i__7399_7405 = G__7412;
continue;
}
} else
{var temp__4092__auto___7413 = cljs.core.seq.call(null,seq__7396_7402);if(temp__4092__auto___7413)
{var seq__7396_7414__$1 = temp__4092__auto___7413;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7396_7414__$1))
{var c__4262__auto___7415 = cljs.core.chunk_first.call(null,seq__7396_7414__$1);{
var G__7416 = cljs.core.chunk_rest.call(null,seq__7396_7414__$1);
var G__7417 = c__4262__auto___7415;
var G__7418 = cljs.core.count.call(null,c__4262__auto___7415);
var G__7419 = 0;
seq__7396_7402 = G__7416;
chunk__7397_7403 = G__7417;
count__7398_7404 = G__7418;
i__7399_7405 = G__7419;
continue;
}
} else
{var vec__7401_7420 = cljs.core.first.call(null,seq__7396_7414__$1);var ev__3326__auto___7421 = cljs.core.nth.call(null,vec__7401_7420,0,null);var func__3327__auto___7422 = cljs.core.nth.call(null,vec__7401_7420,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7421,func__3327__auto___7422);
{
var G__7423 = cljs.core.next.call(null,seq__7396_7414__$1);
var G__7424 = null;
var G__7425 = 0;
var G__7426 = 0;
seq__7396_7402 = G__7423;
chunk__7397_7403 = G__7424;
count__7398_7404 = G__7425;
i__7399_7405 = G__7426;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.clients.devtools.props = (function props(this$,children){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,"ul","ul",1013907977),(function (){var iter__4231__auto__ = (function iter__7437(s__7438){return (new cljs.core.LazySeq(null,(function (){var s__7438__$1 = s__7438;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__7438__$1);if(temp__4092__auto__)
{var s__7438__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__7438__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__7438__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__7440 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__7439 = 0;while(true){
if((i__7439 < size__4230__auto__))
{var c = cljs.core._nth.call(null,c__4229__auto__,i__7439);cljs.core.chunk_append.call(null,b__7440,(cljs.core.truth_((function (){var and__3508__auto__ = cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1017479852).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(c)),"object");if(and__3508__auto__)
{return new cljs.core.Keyword(null,"objectId","objectId",1104399404).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(c));
} else
{return and__3508__auto__;
}
})())?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),lt.object.__GT_content.call(null,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","inspector-object","lt.objs.clients.devtools/inspector-object",4768596045),new cljs.core.Keyword(null,"client","client",3951159101).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),c))], null):new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"em","em",1013907482),new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(c)], null),": ",(function (){var or__3520__auto__ = new cljs.core.Keyword(null,"description","description",3584325486).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(c));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return [cljs.core.str(lt.objs.clients.devtools.format_value.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(c)))].join('');
}
})()], null)));
{
var G__7447 = (i__7439 + 1);
i__7439 = G__7447;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__7440),iter__7437.call(null,cljs.core.chunk_rest.call(null,s__7438__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__7440),null);
}
} else
{var c = cljs.core.first.call(null,s__7438__$2);return cljs.core.cons.call(null,(cljs.core.truth_((function (){var and__3508__auto__ = cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1017479852).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(c)),"object");if(and__3508__auto__)
{return new cljs.core.Keyword(null,"objectId","objectId",1104399404).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(c));
} else
{return and__3508__auto__;
}
})())?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),lt.object.__GT_content.call(null,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","inspector-object","lt.objs.clients.devtools/inspector-object",4768596045),new cljs.core.Keyword(null,"client","client",3951159101).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),c))], null):new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"em","em",1013907482),new cljs.core.Keyword(null,"name","name",1017277949).cljs$core$IFn$_invoke$arity$1(c)], null),": ",(function (){var or__3520__auto__ = new cljs.core.Keyword(null,"description","description",3584325486).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(c));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return [cljs.core.str(lt.objs.clients.devtools.format_value.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(c)))].join('');
}
})()], null)),iter__7437.call(null,cljs.core.rest.call(null,s__7438__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,cljs.core.sort_by.call(null,new cljs.core.Keyword(null,"name","name",1017277949),lt.objs.clients.devtools.i_compare,children));
})()], null));var seq__7441_7448 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__7442_7449 = null;var count__7443_7450 = 0;var i__7444_7451 = 0;while(true){
if((i__7444_7451 < count__7443_7450))
{var vec__7445_7452 = cljs.core._nth.call(null,chunk__7442_7449,i__7444_7451);var ev__3326__auto___7453 = cljs.core.nth.call(null,vec__7445_7452,0,null);var func__3327__auto___7454 = cljs.core.nth.call(null,vec__7445_7452,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7453,func__3327__auto___7454);
{
var G__7455 = seq__7441_7448;
var G__7456 = chunk__7442_7449;
var G__7457 = count__7443_7450;
var G__7458 = (i__7444_7451 + 1);
seq__7441_7448 = G__7455;
chunk__7442_7449 = G__7456;
count__7443_7450 = G__7457;
i__7444_7451 = G__7458;
continue;
}
} else
{var temp__4092__auto___7459 = cljs.core.seq.call(null,seq__7441_7448);if(temp__4092__auto___7459)
{var seq__7441_7460__$1 = temp__4092__auto___7459;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7441_7460__$1))
{var c__4262__auto___7461 = cljs.core.chunk_first.call(null,seq__7441_7460__$1);{
var G__7462 = cljs.core.chunk_rest.call(null,seq__7441_7460__$1);
var G__7463 = c__4262__auto___7461;
var G__7464 = cljs.core.count.call(null,c__4262__auto___7461);
var G__7465 = 0;
seq__7441_7448 = G__7462;
chunk__7442_7449 = G__7463;
count__7443_7450 = G__7464;
i__7444_7451 = G__7465;
continue;
}
} else
{var vec__7446_7466 = cljs.core.first.call(null,seq__7441_7460__$1);var ev__3326__auto___7467 = cljs.core.nth.call(null,vec__7446_7466,0,null);var func__3327__auto___7468 = cljs.core.nth.call(null,vec__7446_7466,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7467,func__3327__auto___7468);
{
var G__7469 = cljs.core.next.call(null,seq__7441_7460__$1);
var G__7470 = null;
var G__7471 = 0;
var G__7472 = 0;
seq__7441_7448 = G__7469;
chunk__7442_7449 = G__7470;
count__7443_7450 = G__7471;
i__7444_7451 = G__7472;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.clients.devtools.__GT_open = (function __GT_open(this$){if(cljs.core.truth_(new cljs.core.Keyword(null,"open","open",1017321916).cljs$core$IFn$_invoke$arity$1(this$)))
{return "inspector-object open";
} else
{return "inspector-object";
}
});
lt.objs.clients.devtools.inspector__GT_result = (function inspector__GT_result(this$,o){var res = new cljs.core.Keyword(null,"result","result",4374444943).cljs$core$IFn$_invoke$arity$1(o);var data = new cljs.core.Keyword(null,"result","result",4374444943).cljs$core$IFn$_invoke$arity$1(res);if(cljs.core.truth_(new cljs.core.Keyword(null,"wasThrown","wasThrown",3712175619).cljs$core$IFn$_invoke$arity$1(res)))
{return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"ex","ex",1013907493),new cljs.core.Keyword(null,"description","description",3584325486).cljs$core$IFn$_invoke$arity$1(data)], null);
} else
{return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"result","result",4374444943),(function (){var pred__7476 = cljs.core._EQ_;var expr__7477 = new cljs.core.Keyword(null,"type","type",1017479852).cljs$core$IFn$_invoke$arity$1(data);if(cljs.core.truth_(pred__7476.call(null,"object",expr__7477)))
{return lt.object.__GT_content.call(null,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","inspector-object","lt.objs.clients.devtools/inspector-object",4768596045),this$,data));
} else
{var or__3520__auto__ = new cljs.core.Keyword(null,"description","description",3584325486).cljs$core$IFn$_invoke$arity$1(data);if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return cljs.core.pr_str.call(null,new cljs.core.Keyword(null,"value","value",1125876963).cljs$core$IFn$_invoke$arity$1(data));
}
}
})()], null);
}
});
lt.objs.clients.devtools.clear_unused_inspectors = (function clear_unused_inspectors(){var seq__7485 = cljs.core.seq.call(null,lt.object.by_tag.call(null,new cljs.core.Keyword(null,"inspector.object","inspector.object",1285492104)));var chunk__7487 = null;var count__7488 = 0;var i__7489 = 0;while(true){
if((i__7489 < count__7488))
{var obj = cljs.core._nth.call(null,chunk__7487,i__7489);if((cljs.core.not.call(null,lt.object.__GT_content.call(null,obj))) || (cljs.core.not.call(null,lt.util.dom.parents.call(null,lt.object.__GT_content.call(null,obj),new cljs.core.Keyword(null,"body","body",1016933652)))))
{lt.object.destroy_BANG_.call(null,obj);
{
var G__7491 = seq__7485;
var G__7492 = chunk__7487;
var G__7493 = count__7488;
var G__7494 = (i__7489 + 1);
seq__7485 = G__7491;
chunk__7487 = G__7492;
count__7488 = G__7493;
i__7489 = G__7494;
continue;
}
} else
{{
var G__7495 = seq__7485;
var G__7496 = chunk__7487;
var G__7497 = count__7488;
var G__7498 = (i__7489 + 1);
seq__7485 = G__7495;
chunk__7487 = G__7496;
count__7488 = G__7497;
i__7489 = G__7498;
continue;
}
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__7485);if(temp__4092__auto__)
{var seq__7485__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7485__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__7485__$1);{
var G__7499 = cljs.core.chunk_rest.call(null,seq__7485__$1);
var G__7500 = c__4262__auto__;
var G__7501 = cljs.core.count.call(null,c__4262__auto__);
var G__7502 = 0;
seq__7485 = G__7499;
chunk__7487 = G__7500;
count__7488 = G__7501;
i__7489 = G__7502;
continue;
}
} else
{var obj = cljs.core.first.call(null,seq__7485__$1);if((cljs.core.not.call(null,lt.object.__GT_content.call(null,obj))) || (cljs.core.not.call(null,lt.util.dom.parents.call(null,lt.object.__GT_content.call(null,obj),new cljs.core.Keyword(null,"body","body",1016933652)))))
{lt.object.destroy_BANG_.call(null,obj);
{
var G__7503 = cljs.core.next.call(null,seq__7485__$1);
var G__7504 = null;
var G__7505 = 0;
var G__7506 = 0;
seq__7485 = G__7503;
chunk__7487 = G__7504;
count__7488 = G__7505;
i__7489 = G__7506;
continue;
}
} else
{{
var G__7507 = cljs.core.next.call(null,seq__7485__$1);
var G__7508 = null;
var G__7509 = 0;
var G__7510 = 0;
seq__7485 = G__7507;
chunk__7487 = G__7508;
count__7488 = G__7509;
i__7489 = G__7510;
continue;
}
}
}
} else
{return null;
}
}
break;
}
});
lt.objs.clients.devtools.__BEH__clean_inspectors_timer = (function __BEH__clean_inspectors_timer(this$){return lt.util.js.every.call(null,60000,lt.objs.clients.devtools.clear_unused_inspectors);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","clean-inspectors-timer","lt.objs.clients.devtools/clean-inspectors-timer",3384727952),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__clean_inspectors_timer,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.objs.clients.devtools.__BEH__clear_inspector_object = (function __BEH__clear_inspector_object(this$){var temp__4092__auto__ = (function (){var or__3520__auto__ = new cljs.core.Keyword(null,"objectId","objectId",1104399404).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"value","value",1125876963).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,this$))));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return new cljs.core.Keyword(null,"objectId","objectId",1104399404).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,this$)));
}
})();if(cljs.core.truth_(temp__4092__auto__))
{var id = temp__4092__auto__;return lt.objs.clients.devtools.send.call(null,new cljs.core.Keyword(null,"client","client",3951159101).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"id","id",1013907597),lt.objs.clients.devtools.next_id.call(null),new cljs.core.Keyword(null,"method","method",4231316563),"Runtime.releaseObject",new cljs.core.Keyword(null,"params","params",4313443576),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"objectId","objectId",1104399404),id], null)], null));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","clear-inspector-object","lt.objs.clients.devtools/clear-inspector-object",3133205453),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.clients.devtools.__BEH__clear_inspector_object,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"destroy","destroy",2571277164),null], null), null));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.clients.devtools","inspector-object","lt.objs.clients.devtools/inspector-object",4768596045),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"inspector.object","inspector.object",1285492104),null], null), null),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,client,m){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"client","client",3951159101),client,new cljs.core.Keyword(null,"info","info",1017141280),m], null));
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,lt.objs.clients.devtools.__GT_open)], null),lt.objs.clients.devtools.desc.call(null,this$,m),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),crate.binding.bound.call(null,crate.binding.subatom.call(null,this$,new cljs.core.Keyword(null,"children","children",2673430897)),cljs.core.partial.call(null,lt.objs.clients.devtools.props,this$))], null)], null);
}));
