// Compiled by ClojureScript 1.10.520 {}
goog.provide('rum.core');
goog.require('cljs.core');
goog.require('goog.object');
goog.require('sablono.core');
goog.require('rum.cursor');
goog.require('rum.util');
goog.require('rum.derived_atom');
/**
 * Given React component, returns Rum state associated with it.
 */
rum.core.state = (function rum$core$state(comp){
return goog.object.get(comp.state,":rum/state");
});
rum.core.extend_BANG_ = (function rum$core$extend_BANG_(obj,props){
var seq__34560 = cljs.core.seq.call(null,props);
var chunk__34562 = null;
var count__34563 = (0);
var i__34564 = (0);
while(true){
if((i__34564 < count__34563)){
var vec__34572 = cljs.core._nth.call(null,chunk__34562,i__34564);
var k = cljs.core.nth.call(null,vec__34572,(0),null);
var v = cljs.core.nth.call(null,vec__34572,(1),null);
if((!((v == null)))){
goog.object.set(obj,cljs.core.name.call(null,k),cljs.core.clj__GT_js.call(null,v));


var G__34578 = seq__34560;
var G__34579 = chunk__34562;
var G__34580 = count__34563;
var G__34581 = (i__34564 + (1));
seq__34560 = G__34578;
chunk__34562 = G__34579;
count__34563 = G__34580;
i__34564 = G__34581;
continue;
} else {
var G__34582 = seq__34560;
var G__34583 = chunk__34562;
var G__34584 = count__34563;
var G__34585 = (i__34564 + (1));
seq__34560 = G__34582;
chunk__34562 = G__34583;
count__34563 = G__34584;
i__34564 = G__34585;
continue;
}
} else {
var temp__5720__auto__ = cljs.core.seq.call(null,seq__34560);
if(temp__5720__auto__){
var seq__34560__$1 = temp__5720__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__34560__$1)){
var c__4550__auto__ = cljs.core.chunk_first.call(null,seq__34560__$1);
var G__34586 = cljs.core.chunk_rest.call(null,seq__34560__$1);
var G__34587 = c__4550__auto__;
var G__34588 = cljs.core.count.call(null,c__4550__auto__);
var G__34589 = (0);
seq__34560 = G__34586;
chunk__34562 = G__34587;
count__34563 = G__34588;
i__34564 = G__34589;
continue;
} else {
var vec__34575 = cljs.core.first.call(null,seq__34560__$1);
var k = cljs.core.nth.call(null,vec__34575,(0),null);
var v = cljs.core.nth.call(null,vec__34575,(1),null);
if((!((v == null)))){
goog.object.set(obj,cljs.core.name.call(null,k),cljs.core.clj__GT_js.call(null,v));


var G__34590 = cljs.core.next.call(null,seq__34560__$1);
var G__34591 = null;
var G__34592 = (0);
var G__34593 = (0);
seq__34560 = G__34590;
chunk__34562 = G__34591;
count__34563 = G__34592;
i__34564 = G__34593;
continue;
} else {
var G__34594 = cljs.core.next.call(null,seq__34560__$1);
var G__34595 = null;
var G__34596 = (0);
var G__34597 = (0);
seq__34560 = G__34594;
chunk__34562 = G__34595;
count__34563 = G__34596;
i__34564 = G__34597;
continue;
}
}
} else {
return null;
}
}
break;
}
});
rum.core.build_class = (function rum$core$build_class(render,mixins,display_name){
var init = rum.util.collect.call(null,new cljs.core.Keyword(null,"init","init",-1875481434),mixins);
var will_mount = rum.util.collect_STAR_.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"will-mount","will-mount",-434633071),new cljs.core.Keyword(null,"before-render","before-render",71256781)], null),mixins);
var render__$1 = render;
var wrap_render = rum.util.collect.call(null,new cljs.core.Keyword(null,"wrap-render","wrap-render",1782000986),mixins);
var wrapped_render = cljs.core.reduce.call(null,((function (init,will_mount,render__$1,wrap_render){
return (function (p1__34599_SHARP_,p2__34598_SHARP_){
return p2__34598_SHARP_.call(null,p1__34599_SHARP_);
});})(init,will_mount,render__$1,wrap_render))
,render__$1,wrap_render);
var did_mount = rum.util.collect_STAR_.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"did-mount","did-mount",918232960),new cljs.core.Keyword(null,"after-render","after-render",1997533433)], null),mixins);
var did_remount = rum.util.collect.call(null,new cljs.core.Keyword(null,"did-remount","did-remount",1362550500),mixins);
var should_update = rum.util.collect.call(null,new cljs.core.Keyword(null,"should-update","should-update",-1292781795),mixins);
var will_update = rum.util.collect_STAR_.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"will-update","will-update",328062998),new cljs.core.Keyword(null,"before-render","before-render",71256781)], null),mixins);
var did_update = rum.util.collect_STAR_.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"did-update","did-update",-2143702256),new cljs.core.Keyword(null,"after-render","after-render",1997533433)], null),mixins);
var did_catch = rum.util.collect.call(null,new cljs.core.Keyword(null,"did-catch","did-catch",2139522313),mixins);
var will_unmount = rum.util.collect.call(null,new cljs.core.Keyword(null,"will-unmount","will-unmount",-808051550),mixins);
var child_context = rum.util.collect.call(null,new cljs.core.Keyword(null,"child-context","child-context",-1375270295),mixins);
var class_props = cljs.core.reduce.call(null,cljs.core.merge,rum.util.collect.call(null,new cljs.core.Keyword(null,"class-properties","class-properties",1351279702),mixins));
var static_props = cljs.core.reduce.call(null,cljs.core.merge,rum.util.collect.call(null,new cljs.core.Keyword(null,"static-properties","static-properties",-577838503),mixins));
var ctor = ((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props){
return (function (props){
var this$ = this;
goog.object.set(this$,"state",({":rum/state": cljs.core.volatile_BANG_.call(null,rum.util.call_all.call(null,cljs.core.assoc.call(null,goog.object.get(props,":rum/initial-state"),new cljs.core.Keyword("rum","react-component","rum/react-component",-1879897248),this$),init,props))}));

return React.Component.call(this$,props);
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props))
;
var _ = goog.inherits(ctor,React.Component);
var prototype = goog.object.get(ctor,"prototype");
if(cljs.core.empty_QMARK_.call(null,will_mount)){
} else {
goog.object.set(prototype,"componentWillMount",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (){
var this$ = this;
return cljs.core._vreset_BANG_.call(null,rum.core.state.call(null,this$),rum.util.call_all.call(null,cljs.core._deref.call(null,rum.core.state.call(null,this$)),will_mount));
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);
}

if(cljs.core.empty_QMARK_.call(null,did_mount)){
} else {
goog.object.set(prototype,"componentDidMount",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (){
var this$ = this;
return cljs.core._vreset_BANG_.call(null,rum.core.state.call(null,this$),rum.util.call_all.call(null,cljs.core._deref.call(null,rum.core.state.call(null,this$)),did_mount));
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);
}

goog.object.set(prototype,"componentWillReceiveProps",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (next_props){
var this$ = this;
var old_state = cljs.core.deref.call(null,rum.core.state.call(null,this$));
var state = cljs.core.merge.call(null,old_state,goog.object.get(next_props,":rum/initial-state"));
var next_state = cljs.core.reduce.call(null,((function (old_state,state,this$,init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (p1__34601_SHARP_,p2__34600_SHARP_){
return p2__34600_SHARP_.call(null,old_state,p1__34601_SHARP_);
});})(old_state,state,this$,init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
,state,did_remount);
return this$.setState(({":rum/state": cljs.core.volatile_BANG_.call(null,next_state)}));
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);

if(cljs.core.empty_QMARK_.call(null,should_update)){
} else {
goog.object.set(prototype,"shouldComponentUpdate",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (next_props,next_state){
var this$ = this;
var old_state = cljs.core.deref.call(null,rum.core.state.call(null,this$));
var new_state = cljs.core.deref.call(null,goog.object.get(next_state,":rum/state"));
var or__4131__auto__ = cljs.core.some.call(null,((function (old_state,new_state,this$,init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (p1__34602_SHARP_){
return p1__34602_SHARP_.call(null,old_state,new_state);
});})(old_state,new_state,this$,init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
,should_update);
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return false;
}
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);
}

if(cljs.core.empty_QMARK_.call(null,will_update)){
} else {
goog.object.set(prototype,"componentWillUpdate",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (___$1,next_state){
var this$ = this;
var new_state = goog.object.get(next_state,":rum/state");
return cljs.core._vreset_BANG_.call(null,new_state,rum.util.call_all.call(null,cljs.core._deref.call(null,new_state),will_update));
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);
}

goog.object.set(prototype,"render",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (){
var this$ = this;
var state = rum.core.state.call(null,this$);
var vec__34604 = wrapped_render.call(null,cljs.core.deref.call(null,state));
var dom = cljs.core.nth.call(null,vec__34604,(0),null);
var next_state = cljs.core.nth.call(null,vec__34604,(1),null);
cljs.core.vreset_BANG_.call(null,state,next_state);

return dom;
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);

if(cljs.core.empty_QMARK_.call(null,did_update)){
} else {
goog.object.set(prototype,"componentDidUpdate",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (___$1,___$2){
var this$ = this;
return cljs.core._vreset_BANG_.call(null,rum.core.state.call(null,this$),rum.util.call_all.call(null,cljs.core._deref.call(null,rum.core.state.call(null,this$)),did_update));
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);
}

if(cljs.core.empty_QMARK_.call(null,did_catch)){
} else {
goog.object.set(prototype,"componentDidCatch",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (error,info){
var this$ = this;
cljs.core._vreset_BANG_.call(null,rum.core.state.call(null,this$),rum.util.call_all.call(null,cljs.core._deref.call(null,rum.core.state.call(null,this$)),did_catch,error,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("rum","component-stack","rum/component-stack",2037541138),goog.object.get(info,"componentStack")], null)));

return this$.forceUpdate();
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);
}

goog.object.set(prototype,"componentWillUnmount",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (){
var this$ = this;
if(cljs.core.empty_QMARK_.call(null,will_unmount)){
} else {
cljs.core._vreset_BANG_.call(null,rum.core.state.call(null,this$),rum.util.call_all.call(null,cljs.core._deref.call(null,rum.core.state.call(null,this$)),will_unmount));
}

return goog.object.set(this$,":rum/unmounted?",true);
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);

if(cljs.core.empty_QMARK_.call(null,child_context)){
} else {
goog.object.set(prototype,"getChildContext",((function (init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (){
var this$ = this;
var state = cljs.core.deref.call(null,rum.core.state.call(null,this$));
return cljs.core.clj__GT_js.call(null,cljs.core.transduce.call(null,cljs.core.map.call(null,((function (state,this$,init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype){
return (function (p1__34603_SHARP_){
return p1__34603_SHARP_.call(null,state);
});})(state,this$,init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
),cljs.core.merge,cljs.core.PersistentArrayMap.EMPTY,child_context));
});})(init,will_mount,render__$1,wrap_render,wrapped_render,did_mount,did_remount,should_update,will_update,did_update,did_catch,will_unmount,child_context,class_props,static_props,ctor,_,prototype))
);
}

rum.core.extend_BANG_.call(null,prototype,class_props);

goog.object.set(ctor,"displayName",display_name);

rum.core.extend_BANG_.call(null,ctor,static_props);

return ctor;
});
rum.core.build_ctor = (function rum$core$build_ctor(render,mixins,display_name){
var class$ = rum.core.build_class.call(null,render,mixins,display_name);
var key_fn = cljs.core.first.call(null,rum.util.collect.call(null,new cljs.core.Keyword(null,"key-fn","key-fn",-636154479),mixins));
var ctor = (((!((key_fn == null))))?((function (class$,key_fn){
return (function() { 
var G__34607__delegate = function (args){
var props = ({":rum/initial-state": new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("rum","args","rum/args",1315791754),args], null), "key": cljs.core.apply.call(null,key_fn,args)});
return React.createElement(class$,props);
};
var G__34607 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__34608__i = 0, G__34608__a = new Array(arguments.length -  0);
while (G__34608__i < G__34608__a.length) {G__34608__a[G__34608__i] = arguments[G__34608__i + 0]; ++G__34608__i;}
  args = new cljs.core.IndexedSeq(G__34608__a,0,null);
} 
return G__34607__delegate.call(this,args);};
G__34607.cljs$lang$maxFixedArity = 0;
G__34607.cljs$lang$applyTo = (function (arglist__34609){
var args = cljs.core.seq(arglist__34609);
return G__34607__delegate(args);
});
G__34607.cljs$core$IFn$_invoke$arity$variadic = G__34607__delegate;
return G__34607;
})()
;})(class$,key_fn))
:((function (class$,key_fn){
return (function() { 
var G__34610__delegate = function (args){
var props = ({":rum/initial-state": new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("rum","args","rum/args",1315791754),args], null)});
return React.createElement(class$,props);
};
var G__34610 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__34611__i = 0, G__34611__a = new Array(arguments.length -  0);
while (G__34611__i < G__34611__a.length) {G__34611__a[G__34611__i] = arguments[G__34611__i + 0]; ++G__34611__i;}
  args = new cljs.core.IndexedSeq(G__34611__a,0,null);
} 
return G__34610__delegate.call(this,args);};
G__34610.cljs$lang$maxFixedArity = 0;
G__34610.cljs$lang$applyTo = (function (arglist__34612){
var args = cljs.core.seq(arglist__34612);
return G__34610__delegate(args);
});
G__34610.cljs$core$IFn$_invoke$arity$variadic = G__34610__delegate;
return G__34610;
})()
;})(class$,key_fn))
);
return cljs.core.with_meta.call(null,ctor,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("rum","class","rum/class",-2030775258),class$], null));
});
rum.core.build_defc = (function rum$core$build_defc(render_body,mixins,display_name){
if(cljs.core.empty_QMARK_.call(null,mixins)){
var class$ = (function (props){
return cljs.core.apply.call(null,render_body,(props[":rum/args"]));
});
var _ = (class$["displayName"] = display_name);
var ctor = ((function (class$,_){
return (function() { 
var G__34613__delegate = function (args){
return React.createElement(class$,({":rum/args": args}));
};
var G__34613 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__34614__i = 0, G__34614__a = new Array(arguments.length -  0);
while (G__34614__i < G__34614__a.length) {G__34614__a[G__34614__i] = arguments[G__34614__i + 0]; ++G__34614__i;}
  args = new cljs.core.IndexedSeq(G__34614__a,0,null);
} 
return G__34613__delegate.call(this,args);};
G__34613.cljs$lang$maxFixedArity = 0;
G__34613.cljs$lang$applyTo = (function (arglist__34615){
var args = cljs.core.seq(arglist__34615);
return G__34613__delegate(args);
});
G__34613.cljs$core$IFn$_invoke$arity$variadic = G__34613__delegate;
return G__34613;
})()
;})(class$,_))
;
return cljs.core.with_meta.call(null,ctor,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("rum","class","rum/class",-2030775258),class$], null));
} else {
var render = (function (state){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null,render_body,new cljs.core.Keyword("rum","args","rum/args",1315791754).cljs$core$IFn$_invoke$arity$1(state)),state], null);
});
return rum.core.build_ctor.call(null,render,mixins,display_name);
}
});
rum.core.build_defcs = (function rum$core$build_defcs(render_body,mixins,display_name){
var render = (function (state){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null,render_body,state,new cljs.core.Keyword("rum","args","rum/args",1315791754).cljs$core$IFn$_invoke$arity$1(state)),state], null);
});
return rum.core.build_ctor.call(null,render,mixins,display_name);
});
rum.core.build_defcc = (function rum$core$build_defcc(render_body,mixins,display_name){
var render = (function (state){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null,render_body,new cljs.core.Keyword("rum","react-component","rum/react-component",-1879897248).cljs$core$IFn$_invoke$arity$1(state),new cljs.core.Keyword("rum","args","rum/args",1315791754).cljs$core$IFn$_invoke$arity$1(state)),state], null);
});
return rum.core.build_ctor.call(null,render,mixins,display_name);
});
rum.core.schedule = (function (){var or__4131__auto__ = (function (){var and__4120__auto__ = (typeof window !== 'undefined');
if(and__4120__auto__){
var or__4131__auto__ = window.requestAnimationFrame;
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
var or__4131__auto____$1 = window.webkitRequestAnimationFrame;
if(cljs.core.truth_(or__4131__auto____$1)){
return or__4131__auto____$1;
} else {
var or__4131__auto____$2 = window.mozRequestAnimationFrame;
if(cljs.core.truth_(or__4131__auto____$2)){
return or__4131__auto____$2;
} else {
return window.msRequestAnimationFrame;
}
}
}
} else {
return and__4120__auto__;
}
})();
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
return ((function (or__4131__auto__){
return (function (p1__34616_SHARP_){
return setTimeout(p1__34616_SHARP_,(16));
});
;})(or__4131__auto__))
}
})();
rum.core.batch = (function (){var or__4131__auto__ = (((typeof ReactNative !== 'undefined'))?ReactNative.unstable_batchedUpdates:null);
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
var or__4131__auto____$1 = (((typeof ReactDOM !== 'undefined'))?ReactDOM.unstable_batchedUpdates:null);
if(cljs.core.truth_(or__4131__auto____$1)){
return or__4131__auto____$1;
} else {
return ((function (or__4131__auto____$1,or__4131__auto__){
return (function (f,a){
return f.call(null,a);
});
;})(or__4131__auto____$1,or__4131__auto__))
}
}
})();
rum.core.empty_queue = cljs.core.PersistentVector.EMPTY;
rum.core.render_queue = cljs.core.volatile_BANG_.call(null,rum.core.empty_queue);
rum.core.render_all = (function rum$core$render_all(queue){
var seq__34617 = cljs.core.seq.call(null,queue);
var chunk__34619 = null;
var count__34620 = (0);
var i__34621 = (0);
while(true){
if((i__34621 < count__34620)){
var comp = cljs.core._nth.call(null,chunk__34619,i__34621);
if(cljs.core.not.call(null,goog.object.get(comp,":rum/unmounted?"))){
comp.forceUpdate();


var G__34623 = seq__34617;
var G__34624 = chunk__34619;
var G__34625 = count__34620;
var G__34626 = (i__34621 + (1));
seq__34617 = G__34623;
chunk__34619 = G__34624;
count__34620 = G__34625;
i__34621 = G__34626;
continue;
} else {
var G__34627 = seq__34617;
var G__34628 = chunk__34619;
var G__34629 = count__34620;
var G__34630 = (i__34621 + (1));
seq__34617 = G__34627;
chunk__34619 = G__34628;
count__34620 = G__34629;
i__34621 = G__34630;
continue;
}
} else {
var temp__5720__auto__ = cljs.core.seq.call(null,seq__34617);
if(temp__5720__auto__){
var seq__34617__$1 = temp__5720__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__34617__$1)){
var c__4550__auto__ = cljs.core.chunk_first.call(null,seq__34617__$1);
var G__34631 = cljs.core.chunk_rest.call(null,seq__34617__$1);
var G__34632 = c__4550__auto__;
var G__34633 = cljs.core.count.call(null,c__4550__auto__);
var G__34634 = (0);
seq__34617 = G__34631;
chunk__34619 = G__34632;
count__34620 = G__34633;
i__34621 = G__34634;
continue;
} else {
var comp = cljs.core.first.call(null,seq__34617__$1);
if(cljs.core.not.call(null,goog.object.get(comp,":rum/unmounted?"))){
comp.forceUpdate();


var G__34635 = cljs.core.next.call(null,seq__34617__$1);
var G__34636 = null;
var G__34637 = (0);
var G__34638 = (0);
seq__34617 = G__34635;
chunk__34619 = G__34636;
count__34620 = G__34637;
i__34621 = G__34638;
continue;
} else {
var G__34639 = cljs.core.next.call(null,seq__34617__$1);
var G__34640 = null;
var G__34641 = (0);
var G__34642 = (0);
seq__34617 = G__34639;
chunk__34619 = G__34640;
count__34620 = G__34641;
i__34621 = G__34642;
continue;
}
}
} else {
return null;
}
}
break;
}
});
rum.core.render = (function rum$core$render(){
var queue = cljs.core.deref.call(null,rum.core.render_queue);
cljs.core.vreset_BANG_.call(null,rum.core.render_queue,rum.core.empty_queue);

return rum.core.batch.call(null,rum.core.render_all,queue);
});
/**
 * Schedules react component to be rendered on next animation frame.
 */
rum.core.request_render = (function rum$core$request_render(component){
if(cljs.core.empty_QMARK_.call(null,cljs.core.deref.call(null,rum.core.render_queue))){
rum.core.schedule.call(null,rum.core.render);
} else {
}

return cljs.core._vreset_BANG_.call(null,rum.core.render_queue,cljs.core.conj.call(null,cljs.core._deref.call(null,rum.core.render_queue),component));
});
/**
 * Add element to the DOM tree. Idempotent. Subsequent mounts will just update element.
 */
rum.core.mount = (function rum$core$mount(element,node){
ReactDOM.render(element,node);

return null;
});
/**
 * Removes component from the DOM tree.
 */
rum.core.unmount = (function rum$core$unmount(node){
return ReactDOM.unmountComponentAtNode(node);
});
/**
 * Same as [[mount]] but must be called on DOM tree already rendered by a server via [[render-html]].
 */
rum.core.hydrate = (function rum$core$hydrate(element,node){
return ReactDOM.hydrate(element,node);
});
/**
 * Render `element` in a DOM `node` that is ouside of current DOM hierarchy.
 */
rum.core.portal = (function rum$core$portal(element,node){
return ReactDOM.createPortal(element,node);
});
/**
 * Adds React key to element.
 * 
 * ```
 * (rum/defc label [text] [:div text])
 * 
 * (-> (label)
 *     (rum/with-key "abc")
 *     (rum/mount js/document.body))
 * ```
 */
rum.core.with_key = (function rum$core$with_key(element,key){
return React.cloneElement(element,({"key": key}),null);
});
/**
 * Adds React ref (string or callback) to element.
 * 
 * ```
 * (rum/defc label [text] [:div text])
 * 
 * (-> (label)
 *     (rum/with-ref "abc")
 *     (rum/mount js/document.body))
 * ```
 */
rum.core.with_ref = (function rum$core$with_ref(element,ref){
return React.cloneElement(element,({"ref": ref}),null);
});
/**
 * Given state, returns top-level DOM node of component. Call it during lifecycle callbacks. Can’t be called during render.
 */
rum.core.dom_node = (function rum$core$dom_node(state){
return ReactDOM.findDOMNode(new cljs.core.Keyword("rum","react-component","rum/react-component",-1879897248).cljs$core$IFn$_invoke$arity$1(state));
});
/**
 * Given state and ref handle, returns React component.
 */
rum.core.ref = (function rum$core$ref(state,key){
return ((new cljs.core.Keyword("rum","react-component","rum/react-component",-1879897248).cljs$core$IFn$_invoke$arity$1(state)["refs"])[cljs.core.name.call(null,key)]);
});
/**
 * Given state and ref handle, returns DOM node associated with ref.
 */
rum.core.ref_node = (function rum$core$ref_node(state,key){
return ReactDOM.findDOMNode(rum.core.ref.call(null,state,cljs.core.name.call(null,key)));
});
/**
 * Mixin. Will avoid re-render if none of component’s arguments have changed. Does equality check (`=`) on all arguments.
 *   
 * ```
 * (rum/defc label < rum/static
 *   [text]
 *   [:div text])
 *   
 * (rum/mount (label "abc") js/document.body)
 * 
 * ;; def != abc, will re-render
 * (rum/mount (label "def") js/document.body)
 * 
 * ;; def == def, won’t re-render
 * (rum/mount (label "def") js/document.body)
 * ```
 */
rum.core.static$ = new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"should-update","should-update",-1292781795),(function (old_state,new_state){
return cljs.core.not_EQ_.call(null,new cljs.core.Keyword("rum","args","rum/args",1315791754).cljs$core$IFn$_invoke$arity$1(old_state),new cljs.core.Keyword("rum","args","rum/args",1315791754).cljs$core$IFn$_invoke$arity$1(new_state));
})], null);
/**
 * Mixin constructor. Adds an atom to component’s state that can be used to keep stuff during component’s lifecycle. Component will be re-rendered if atom’s value changes. Atom is stored under user-provided key or under `:rum/local` by default.
 *   
 * ```
 * (rum/defcs counter < (rum/local 0 :cnt)
 *   [state label]
 *   (let [*cnt (:cnt state)]
 *     [:div {:on-click (fn [_] (swap! *cnt inc))}
 *       label @*cnt]))
 * 
 * (rum/mount (counter "Click count: "))
 * ```
 */
rum.core.local = (function rum$core$local(var_args){
var G__34644 = arguments.length;
switch (G__34644) {
case 1:
return rum.core.local.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return rum.core.local.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));

}
});

rum.core.local.cljs$core$IFn$_invoke$arity$1 = (function (initial){
return rum.core.local.call(null,initial,new cljs.core.Keyword("rum","local","rum/local",-1497916586));
});

rum.core.local.cljs$core$IFn$_invoke$arity$2 = (function (initial,key){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"will-mount","will-mount",-434633071),(function (state){
var local_state = cljs.core.atom.call(null,initial);
var component = new cljs.core.Keyword("rum","react-component","rum/react-component",-1879897248).cljs$core$IFn$_invoke$arity$1(state);
cljs.core.add_watch.call(null,local_state,key,((function (local_state,component){
return (function (_,___$1,___$2,___$3){
return rum.core.request_render.call(null,component);
});})(local_state,component))
);

return cljs.core.assoc.call(null,state,key,local_state);
})], null);
});

rum.core.local.cljs$lang$maxFixedArity = 2;

/**
 * Mixin. Works in conjunction with [[react]].
 *   
 * ```
 * (rum/defc comp < rum/reactive
 *   [*counter]
 *   [:div (rum/react counter)])
 * 
 * (def *counter (atom 0))
 * (rum/mount (comp *counter) js/document.body)
 * (swap! *counter inc) ;; will force comp to re-render
 * ```
 */
rum.core.reactive = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"init","init",-1875481434),(function (state,props){
return cljs.core.assoc.call(null,state,new cljs.core.Keyword("rum.reactive","key","rum.reactive/key",-803425142),cljs.core.random_uuid.call(null));
}),new cljs.core.Keyword(null,"wrap-render","wrap-render",1782000986),(function (render_fn){
return (function (state){
var _STAR_reactions_STAR__orig_val__34646 = rum.core._STAR_reactions_STAR_;
var _STAR_reactions_STAR__temp_val__34647 = cljs.core.volatile_BANG_.call(null,cljs.core.PersistentHashSet.EMPTY);
rum.core._STAR_reactions_STAR_ = _STAR_reactions_STAR__temp_val__34647;

try{var comp = new cljs.core.Keyword("rum","react-component","rum/react-component",-1879897248).cljs$core$IFn$_invoke$arity$1(state);
var old_reactions = new cljs.core.Keyword("rum.reactive","refs","rum.reactive/refs",-814076325).cljs$core$IFn$_invoke$arity$2(state,cljs.core.PersistentHashSet.EMPTY);
var vec__34648 = render_fn.call(null,state);
var dom = cljs.core.nth.call(null,vec__34648,(0),null);
var next_state = cljs.core.nth.call(null,vec__34648,(1),null);
var new_reactions = cljs.core.deref.call(null,rum.core._STAR_reactions_STAR_);
var key = new cljs.core.Keyword("rum.reactive","key","rum.reactive/key",-803425142).cljs$core$IFn$_invoke$arity$1(state);
var seq__34651_34663 = cljs.core.seq.call(null,old_reactions);
var chunk__34652_34664 = null;
var count__34653_34665 = (0);
var i__34654_34666 = (0);
while(true){
if((i__34654_34666 < count__34653_34665)){
var ref_34667 = cljs.core._nth.call(null,chunk__34652_34664,i__34654_34666);
if(cljs.core.contains_QMARK_.call(null,new_reactions,ref_34667)){
} else {
cljs.core.remove_watch.call(null,ref_34667,key);
}


var G__34668 = seq__34651_34663;
var G__34669 = chunk__34652_34664;
var G__34670 = count__34653_34665;
var G__34671 = (i__34654_34666 + (1));
seq__34651_34663 = G__34668;
chunk__34652_34664 = G__34669;
count__34653_34665 = G__34670;
i__34654_34666 = G__34671;
continue;
} else {
var temp__5720__auto___34672 = cljs.core.seq.call(null,seq__34651_34663);
if(temp__5720__auto___34672){
var seq__34651_34673__$1 = temp__5720__auto___34672;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__34651_34673__$1)){
var c__4550__auto___34674 = cljs.core.chunk_first.call(null,seq__34651_34673__$1);
var G__34675 = cljs.core.chunk_rest.call(null,seq__34651_34673__$1);
var G__34676 = c__4550__auto___34674;
var G__34677 = cljs.core.count.call(null,c__4550__auto___34674);
var G__34678 = (0);
seq__34651_34663 = G__34675;
chunk__34652_34664 = G__34676;
count__34653_34665 = G__34677;
i__34654_34666 = G__34678;
continue;
} else {
var ref_34679 = cljs.core.first.call(null,seq__34651_34673__$1);
if(cljs.core.contains_QMARK_.call(null,new_reactions,ref_34679)){
} else {
cljs.core.remove_watch.call(null,ref_34679,key);
}


var G__34680 = cljs.core.next.call(null,seq__34651_34673__$1);
var G__34681 = null;
var G__34682 = (0);
var G__34683 = (0);
seq__34651_34663 = G__34680;
chunk__34652_34664 = G__34681;
count__34653_34665 = G__34682;
i__34654_34666 = G__34683;
continue;
}
} else {
}
}
break;
}

var seq__34655_34684 = cljs.core.seq.call(null,new_reactions);
var chunk__34656_34685 = null;
var count__34657_34686 = (0);
var i__34658_34687 = (0);
while(true){
if((i__34658_34687 < count__34657_34686)){
var ref_34688 = cljs.core._nth.call(null,chunk__34656_34685,i__34658_34687);
if(cljs.core.contains_QMARK_.call(null,old_reactions,ref_34688)){
} else {
cljs.core.add_watch.call(null,ref_34688,key,((function (seq__34655_34684,chunk__34656_34685,count__34657_34686,i__34658_34687,ref_34688,comp,old_reactions,vec__34648,dom,next_state,new_reactions,key,_STAR_reactions_STAR__orig_val__34646,_STAR_reactions_STAR__temp_val__34647){
return (function (_,___$1,___$2,___$3){
return rum.core.request_render.call(null,comp);
});})(seq__34655_34684,chunk__34656_34685,count__34657_34686,i__34658_34687,ref_34688,comp,old_reactions,vec__34648,dom,next_state,new_reactions,key,_STAR_reactions_STAR__orig_val__34646,_STAR_reactions_STAR__temp_val__34647))
);
}


var G__34689 = seq__34655_34684;
var G__34690 = chunk__34656_34685;
var G__34691 = count__34657_34686;
var G__34692 = (i__34658_34687 + (1));
seq__34655_34684 = G__34689;
chunk__34656_34685 = G__34690;
count__34657_34686 = G__34691;
i__34658_34687 = G__34692;
continue;
} else {
var temp__5720__auto___34693 = cljs.core.seq.call(null,seq__34655_34684);
if(temp__5720__auto___34693){
var seq__34655_34694__$1 = temp__5720__auto___34693;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__34655_34694__$1)){
var c__4550__auto___34695 = cljs.core.chunk_first.call(null,seq__34655_34694__$1);
var G__34696 = cljs.core.chunk_rest.call(null,seq__34655_34694__$1);
var G__34697 = c__4550__auto___34695;
var G__34698 = cljs.core.count.call(null,c__4550__auto___34695);
var G__34699 = (0);
seq__34655_34684 = G__34696;
chunk__34656_34685 = G__34697;
count__34657_34686 = G__34698;
i__34658_34687 = G__34699;
continue;
} else {
var ref_34700 = cljs.core.first.call(null,seq__34655_34694__$1);
if(cljs.core.contains_QMARK_.call(null,old_reactions,ref_34700)){
} else {
cljs.core.add_watch.call(null,ref_34700,key,((function (seq__34655_34684,chunk__34656_34685,count__34657_34686,i__34658_34687,ref_34700,seq__34655_34694__$1,temp__5720__auto___34693,comp,old_reactions,vec__34648,dom,next_state,new_reactions,key,_STAR_reactions_STAR__orig_val__34646,_STAR_reactions_STAR__temp_val__34647){
return (function (_,___$1,___$2,___$3){
return rum.core.request_render.call(null,comp);
});})(seq__34655_34684,chunk__34656_34685,count__34657_34686,i__34658_34687,ref_34700,seq__34655_34694__$1,temp__5720__auto___34693,comp,old_reactions,vec__34648,dom,next_state,new_reactions,key,_STAR_reactions_STAR__orig_val__34646,_STAR_reactions_STAR__temp_val__34647))
);
}


var G__34701 = cljs.core.next.call(null,seq__34655_34694__$1);
var G__34702 = null;
var G__34703 = (0);
var G__34704 = (0);
seq__34655_34684 = G__34701;
chunk__34656_34685 = G__34702;
count__34657_34686 = G__34703;
i__34658_34687 = G__34704;
continue;
}
} else {
}
}
break;
}

return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [dom,cljs.core.assoc.call(null,next_state,new cljs.core.Keyword("rum.reactive","refs","rum.reactive/refs",-814076325),new_reactions)], null);
}finally {rum.core._STAR_reactions_STAR_ = _STAR_reactions_STAR__orig_val__34646;
}});
}),new cljs.core.Keyword(null,"will-unmount","will-unmount",-808051550),(function (state){
var key_34705 = new cljs.core.Keyword("rum.reactive","key","rum.reactive/key",-803425142).cljs$core$IFn$_invoke$arity$1(state);
var seq__34659_34706 = cljs.core.seq.call(null,new cljs.core.Keyword("rum.reactive","refs","rum.reactive/refs",-814076325).cljs$core$IFn$_invoke$arity$1(state));
var chunk__34660_34707 = null;
var count__34661_34708 = (0);
var i__34662_34709 = (0);
while(true){
if((i__34662_34709 < count__34661_34708)){
var ref_34710 = cljs.core._nth.call(null,chunk__34660_34707,i__34662_34709);
cljs.core.remove_watch.call(null,ref_34710,key_34705);


var G__34711 = seq__34659_34706;
var G__34712 = chunk__34660_34707;
var G__34713 = count__34661_34708;
var G__34714 = (i__34662_34709 + (1));
seq__34659_34706 = G__34711;
chunk__34660_34707 = G__34712;
count__34661_34708 = G__34713;
i__34662_34709 = G__34714;
continue;
} else {
var temp__5720__auto___34715 = cljs.core.seq.call(null,seq__34659_34706);
if(temp__5720__auto___34715){
var seq__34659_34716__$1 = temp__5720__auto___34715;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__34659_34716__$1)){
var c__4550__auto___34717 = cljs.core.chunk_first.call(null,seq__34659_34716__$1);
var G__34718 = cljs.core.chunk_rest.call(null,seq__34659_34716__$1);
var G__34719 = c__4550__auto___34717;
var G__34720 = cljs.core.count.call(null,c__4550__auto___34717);
var G__34721 = (0);
seq__34659_34706 = G__34718;
chunk__34660_34707 = G__34719;
count__34661_34708 = G__34720;
i__34662_34709 = G__34721;
continue;
} else {
var ref_34722 = cljs.core.first.call(null,seq__34659_34716__$1);
cljs.core.remove_watch.call(null,ref_34722,key_34705);


var G__34723 = cljs.core.next.call(null,seq__34659_34716__$1);
var G__34724 = null;
var G__34725 = (0);
var G__34726 = (0);
seq__34659_34706 = G__34723;
chunk__34660_34707 = G__34724;
count__34661_34708 = G__34725;
i__34662_34709 = G__34726;
continue;
}
} else {
}
}
break;
}

return cljs.core.dissoc.call(null,state,new cljs.core.Keyword("rum.reactive","refs","rum.reactive/refs",-814076325),new cljs.core.Keyword("rum.reactive","key","rum.reactive/key",-803425142));
})], null);
/**
 * Works in conjunction with [[reactive]] mixin. Use this function instead of `deref` inside render, and your component will subscribe to changes happening to the derefed atom.
 */
rum.core.react = (function rum$core$react(ref){
if(cljs.core.truth_(rum.core._STAR_reactions_STAR_)){
} else {
throw (new Error(["Assert failed: ","rum.core/react is only supported in conjunction with rum.core/reactive","\n","*reactions*"].join('')));
}

cljs.core._vreset_BANG_.call(null,rum.core._STAR_reactions_STAR_,cljs.core.conj.call(null,cljs.core._deref.call(null,rum.core._STAR_reactions_STAR_),ref));

return cljs.core.deref.call(null,ref);
});
/**
 * Use this to create “chains” and acyclic graphs of dependent atoms.
 * 
 *           [[derived-atom]] will:
 *        
 *           - Take N “source” refs.
 *           - Set up a watch on each of them.
 *           - Create “sink” atom.
 *           - When any of source refs changes:
 *              - re-run function `f`, passing N dereferenced values of source refs.
 *              - `reset!` result of `f` to the sink atom.
 *           - Return sink atom.
 * 
 *           Example:
 * 
 *           ```
 *           (def *a (atom 0))
 *           (def *b (atom 1))
 *           (def *x (derived-atom [*a *b] ::key
 *                     (fn [a b]
 *                       (str a ":" b))))
 *           
 *           (type *x) ;; => clojure.lang.Atom
 *           (deref *x) ;; => "0:1"
 *           
 *           (swap! *a inc)
 *           (deref *x) ;; => "1:1"
 *           
 *           (reset! *b 7)
 *           (deref *x) ;; => "1:7"
 *           ```
 * 
 *           Arguments:
 *        
 *           - `refs` - sequence of source refs,
 *           - `key`  - unique key to register watcher, same as in `clojure.core/add-watch`,
 *           - `f`    - function that must accept N arguments (same as number of source refs) and return a value to be written to the sink ref. Note: `f` will be called with already dereferenced values,
 *           - `opts` - optional. Map of:
 *             - `:ref` - use this as sink ref. By default creates new atom,
 *             - `:check-equals?` - Defaults to `true`. If equality check should be run on each source update: `(= @sink (f new-vals))`. When result of recalculating `f` equals to the old value, `reset!` won’t be called. Set to `false` if checking for equality can be expensive.
 */
rum.core.derived_atom = rum.derived_atom.derived_atom;
/**
 * Given atom with deep nested value and path inside it, creates an atom-like structure
 * that can be used separately from main atom, but will sync changes both ways:
 *   
 * ```
 * (def db (atom { :users { "Ivan" { :age 30 }}}))
 * 
 * (def ivan (rum/cursor db [:users "Ivan"]))
 * (deref ivan) ;; => { :age 30 }
 * 
 * (swap! ivan update :age inc) ;; => { :age 31 }
 * (deref db) ;; => { :users { "Ivan" { :age 31 }}}
 * 
 * (swap! db update-in [:users "Ivan" :age] inc)
 * ;; => { :users { "Ivan" { :age 32 }}}
 * 
 * (deref ivan) ;; => { :age 32 }
 * ```
 *   
 * Returned value supports `deref`, `swap!`, `reset!`, watches and metadata.
 *   
 * The only supported option is `:meta`
 */
rum.core.cursor_in = (function rum$core$cursor_in(var_args){
var args__4736__auto__ = [];
var len__4730__auto___34733 = arguments.length;
var i__4731__auto___34734 = (0);
while(true){
if((i__4731__auto___34734 < len__4730__auto___34733)){
args__4736__auto__.push((arguments[i__4731__auto___34734]));

var G__34735 = (i__4731__auto___34734 + (1));
i__4731__auto___34734 = G__34735;
continue;
} else {
}
break;
}

var argseq__4737__auto__ = ((((2) < args__4736__auto__.length))?(new cljs.core.IndexedSeq(args__4736__auto__.slice((2)),(0),null)):null);
return rum.core.cursor_in.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__4737__auto__);
});

rum.core.cursor_in.cljs$core$IFn$_invoke$arity$variadic = (function (ref,path,p__34730){
var map__34731 = p__34730;
var map__34731__$1 = (((((!((map__34731 == null))))?(((((map__34731.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__34731.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__34731):map__34731);
var options = map__34731__$1;
if((ref instanceof rum.cursor.Cursor)){
return (new rum.cursor.Cursor(ref.ref,cljs.core.into.call(null,ref.path,path),new cljs.core.Keyword(null,"meta","meta",1499536964).cljs$core$IFn$_invoke$arity$1(options)));
} else {
return (new rum.cursor.Cursor(ref,path,new cljs.core.Keyword(null,"meta","meta",1499536964).cljs$core$IFn$_invoke$arity$1(options)));
}
});

rum.core.cursor_in.cljs$lang$maxFixedArity = (2);

/** @this {Function} */
rum.core.cursor_in.cljs$lang$applyTo = (function (seq34727){
var G__34728 = cljs.core.first.call(null,seq34727);
var seq34727__$1 = cljs.core.next.call(null,seq34727);
var G__34729 = cljs.core.first.call(null,seq34727__$1);
var seq34727__$2 = cljs.core.next.call(null,seq34727__$1);
var self__4717__auto__ = this;
return self__4717__auto__.cljs$core$IFn$_invoke$arity$variadic(G__34728,G__34729,seq34727__$2);
});

/**
 * Same as [[cursor-in]] but accepts single key instead of path vector.
 */
rum.core.cursor = (function rum$core$cursor(var_args){
var args__4736__auto__ = [];
var len__4730__auto___34739 = arguments.length;
var i__4731__auto___34740 = (0);
while(true){
if((i__4731__auto___34740 < len__4730__auto___34739)){
args__4736__auto__.push((arguments[i__4731__auto___34740]));

var G__34741 = (i__4731__auto___34740 + (1));
i__4731__auto___34740 = G__34741;
continue;
} else {
}
break;
}

var argseq__4737__auto__ = ((((2) < args__4736__auto__.length))?(new cljs.core.IndexedSeq(args__4736__auto__.slice((2)),(0),null)):null);
return rum.core.cursor.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__4737__auto__);
});

rum.core.cursor.cljs$core$IFn$_invoke$arity$variadic = (function (ref,key,options){
return cljs.core.apply.call(null,rum.core.cursor_in,ref,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [key], null),options);
});

rum.core.cursor.cljs$lang$maxFixedArity = (2);

/** @this {Function} */
rum.core.cursor.cljs$lang$applyTo = (function (seq34736){
var G__34737 = cljs.core.first.call(null,seq34736);
var seq34736__$1 = cljs.core.next.call(null,seq34736);
var G__34738 = cljs.core.first.call(null,seq34736__$1);
var seq34736__$2 = cljs.core.next.call(null,seq34736__$1);
var self__4717__auto__ = this;
return self__4717__auto__.cljs$core$IFn$_invoke$arity$variadic(G__34737,G__34738,seq34736__$2);
});

