text: goog.provide('reagent.core');
  var module$node_modules$react$index=shadow.js.require("module$node_modules$react$index", {});
  reagent.core.is_client = reagent.impl.util.is_client;
  /**
   * Create a native React element, by calling React.createElement directly.
   * 
   *   That means the second argument must be a javascript object (or nil), and
   *   that any Reagent hiccup forms must be processed with as-element. For example
   *   like this:
   * 
   *   ```cljs
   *   (r/create-element "div" #js{:className "foo"}
   *  "Hi " (r/as-element [:strong "world!"])
   *   ```
   * 
   *   which is equivalent to
   * 
   *   ```cljs
   *   [:div.foo "Hi" [:strong "world!"]]
   *   ```
   */
  reagent.core.create_element = (function reagent$core$create_element(var_args){
  var G__40347 = arguments.length;
  switch (G__40347) {
  case 1:
  return reagent.core.create_element.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
  
  break;
  case 2:
  return reagent.core.create_element.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
  
  break;
  case 3:
  return reagent.core.create_element.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
  
  break;
  default:
  var args_arr__4757__auto__ = [];
  var len__4736__auto___40434 = arguments.length;
  var i__4737__auto___40435 = (0);
  while(true){
  if((i__4737__auto___40435 < len__4736__auto___40434)){
  args_arr__4757__auto__.push((arguments[i__4737__auto___40435]));
  
  var G__40436 = (i__4737__auto___40435 + (1));
  i__4737__auto___40435 = G__40436;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4758__auto__ = (new cljs.core.IndexedSeq(args_arr__4757__auto__.slice((3)),(0),null));
  return reagent.core.create_element.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__4758__auto__);
  
  }
  });
  
  (reagent.core.create_element.cljs$core$IFn$_invoke$arity$1 = (function (type){
  return reagent.core.create_element.cljs$core$IFn$_invoke$arity$2(type,null);
  }));
  
  (reagent.core.create_element.cljs$core$IFn$_invoke$arity$2 = (function (type,props){
  if((!(cljs.core.map_QMARK_(props)))){
  } else {
  throw (new Error(["Assert failed: ",["Expected a JS object, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([props], 0))].join(''),"\n","(clojure.core/not (clojure.core/map? props))"].join('')));
  }
  
  return module$node_modules$react$index.createElement(type,props);
  }));
  
  (reagent.core.create_element.cljs$core$IFn$_invoke$arity$3 = (function (type,props,child){
  if((!(cljs.core.map_QMARK_(props)))){
  } else {
  throw (new Error(["Assert failed: ",["Expected a JS object, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([props], 0))].join(''),"\n","(clojure.core/not (clojure.core/map? props))"].join('')));
  }
  
  return module$node_modules$react$index.createElement(type,props,child);
  }));
  
  (reagent.core.create_element.cljs$core$IFn$_invoke$arity$variadic = (function (type,props,child,children){
  if((!(cljs.core.map_QMARK_(props)))){
  } else {
  throw (new Error(["Assert failed: ",["Expected a JS object, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([props], 0))].join(''),"\n","(clojure.core/not (clojure.core/map? props))"].join('')));
  }
  
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(module$node_modules$react$index.createElement,type,props,child,children);
  }));
  
  /** @this {Function} */
  (reagent.core.create_element.cljs$lang$applyTo = (function (seq40343){
  var G__40344 = cljs.core.first(seq40343);
  var seq40343__$1 = cljs.core.next(seq40343);
  var G__40345 = cljs.core.first(seq40343__$1);
  var seq40343__$2 = cljs.core.next(seq40343__$1);
  var G__40346 = cljs.core.first(seq40343__$2);
  var seq40343__$3 = cljs.core.next(seq40343__$2);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40344,G__40345,G__40346,seq40343__$3);
  }));
  
  (reagent.core.create_element.cljs$lang$maxFixedArity = (3));
  
  /**
   * Turns a vector of Hiccup syntax into a React element. Returns form
   *   unchanged if it is not a vector.
   */
  reagent.core.as_element = (function reagent$core$as_element(var_args){
  var G__40371 = arguments.length;
  switch (G__40371) {
  case 1:
  return reagent.core.as_element.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
  
  break;
  case 2:
  return reagent.core.as_element.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('')));
  
  }
  });
  
  (reagent.core.as_element.cljs$core$IFn$_invoke$arity$1 = (function (form){
  return reagent.impl.protocols.as_element(reagent.impl.template.default_compiler,form);
  }));
  
  (reagent.core.as_element.cljs$core$IFn$_invoke$arity$2 = (function (form,compiler){
  return reagent.impl.protocols.as_element(compiler,form);
  }));
  
  (reagent.core.as_element.cljs$lang$maxFixedArity = 2);
  
  /**
   * Returns an adapter for a native React class, that may be used
   *   just like a Reagent component function or class in Hiccup forms.
   */
  reagent.core.adapt_react_class = (function reagent$core$adapt_react_class(c){
  if(cljs.core.truth_(c)){
  } else {
  throw (new Error(["Assert failed: ",["Component"," must not be nil"].join(''),"\n","c"].join('')));
  }
  
  return reagent.impl.template.adapt_react_class(c);
  });
  /**
   * Returns an adapter for a Reagent component, that may be used from
   *   React, for example in JSX. A single argument, props, is passed to
   *   the component, converted to a map.
   */
  reagent.core.reactify_component = (function reagent$core$reactify_component(var_args){
  var G__40398 = arguments.length;
  switch (G__40398) {
  case 1:
  return reagent.core.reactify_component.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
  
  break;
  case 2:
  return reagent.core.reactify_component.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('')));
  
  }
  });
  
  (reagent.core.reactify_component.cljs$core$IFn$_invoke$arity$1 = (function (c){
  return reagent.core.reactify_component.cljs$core$IFn$_invoke$arity$2(c,reagent.impl.template.default_compiler);
  }));
  
  (reagent.core.reactify_component.cljs$core$IFn$_invoke$arity$2 = (function (c,compiler){
  if(cljs.core.truth_(c)){
  } else {
  throw (new Error(["Assert failed: ",["Component"," must not be nil"].join(''),"\n","c"].join('')));
  }
  
  return reagent.impl.component.reactify_component(c,compiler);
  }));
  
  (reagent.core.reactify_component.cljs$lang$maxFixedArity = 2);
  
  /**
   * Creates JS class based on provided Clojure map, for example:
   * 
   *   ```cljs
   *   {;; Constructor
   * :constructor (fn [this props])
   * :get-initial-state (fn [this])
   * ;; Static methods
   * :get-derived-state-from-props (fn [props state] partial-state)
   * :get-derived-state-from-error (fn [error] partial-state)
   * ;; Methods
   * :get-snapshot-before-update (fn [this old-argv new-argv] snapshot)
   * :should-component-update (fn [this old-argv new-argv])
   * :component-did-mount (fn [this])
   * :component-did-update (fn [this old-argv old-state snapshot])
   * :component-will-unmount (fn [this])
   * :component-did-catch (fn [this error info])
   * :reagent-render (fn [args....])
   * ;; Or alternatively:
   * :render (fn [this])
   * ;; Deprecated methods:
   * :UNSAFE_component-will-receive-props (fn [this new-argv])
   * :UNSAFE_component-will-update (fn [this new-argv new-state])
   * :UNSAFE_component-will-mount (fn [this])}
   *   ```
   * 
   *   Everything is optional, except either :reagent-render or :render.
   * 
   *   Map keys should use `React.Component` method names (https://reactjs.org/docs/react-component.html),
   *   and can be provided in snake-case or camelCase.
   * 
   *   State can be initialized using constructor, which matches React.Component class,
   *   or using getInitialState which matches old React createClass function and is
   *   now implemented by Reagent for compatibility.
   * 
   *   State can usually be anything, e.g. Cljs object. But if using getDerivedState
   *   methods, the state has to be plain JS object as React implementation uses
   *   Object.assign to merge partial state into the current state.
   * 
   *   React built-in static methods or properties are automatically defined as statics.
   */
  reagent.core.create_class = (function reagent$core$create_class(var_args){
  var G__40400 = arguments.length;
  switch (G__40400) {
  case 1:
  return reagent.core.create_class.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
  
  break;
  case 2:
  return reagent.core.create_class.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('')));
  
  }
  });
  
  (reagent.core.create_class.cljs$core$IFn$_invoke$arity$1 = (function (spec){
  return reagent.impl.component.create_class(spec,reagent.impl.template.default_compiler);
  }));
  
  (reagent.core.create_class.cljs$core$IFn$_invoke$arity$2 = (function (spec,compiler){
  return reagent.impl.component.create_class(spec,compiler);
  }));
  
  (reagent.core.create_class.cljs$lang$maxFixedArity = 2);
  
  /**
   * Returns the current React component (a.k.a `this`) in a component
   *   function.
   */
  reagent.core.current_component = (function reagent$core$current_component(){
  return reagent.impl.component._STAR_current_component_STAR_;
  });
  /**
   * Returns an atom containing a components state.
   */
  reagent.core.state_atom = (function reagent$core$state_atom(this$){
  if(reagent.impl.component.reagent_component_QMARK_(this$)){
  } else {
  throw (new Error(["Assert failed: ",["Expected a reagent component, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([this$], 0))].join(''),"\n","(comp/reagent-component? this)"].join('')));
  }
  
  return reagent.impl.component.state_atom(this$);
  });
  /**
   * Returns the state of a component, as set with replace-state or set-state.
   *   Equivalent to `(deref (r/state-atom this))`
   */
  reagent.core.state = (function reagent$core$state(this$){
  if(reagent.impl.component.reagent_component_QMARK_(this$)){
  } else {
  throw (new Error(["Assert failed: ",["Expected a reagent component, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([this$], 0))].join(''),"\n","(comp/reagent-component? this)"].join('')));
  }
  
  return cljs.core.deref(reagent.core.state_atom(this$));
  });
  /**
   * Set state of a component.
   *   Equivalent to `(reset! (state-atom this) new-state)`
   */
  reagent.core.replace_state = (function reagent$core$replace_state(this$,new_state){
  if(reagent.impl.component.reagent_component_QMARK_(this$)){
  } else {
  throw (new Error(["Assert failed: ",["Expected a reagent component, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([this$], 0))].join(''),"\n","(comp/reagent-component? this)"].join('')));
  }
  
  if((((new_state == null)) || (cljs.core.map_QMARK_(new_state)))){
  } else {
  throw (new Error(["Assert failed: ",["Expected a valid new state, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new_state], 0))].join(''),"\n","(clojure.core/or (clojure.core/nil? new-state) (clojure.core/map? new-state))"].join('')));
  }
  
  return cljs.core.reset_BANG_(reagent.core.state_atom(this$),new_state);
  });
  /**
   * Merge component state with new-state.
   *   Equivalent to `(swap! (state-atom this) merge new-state)`
   */
  reagent.core.set_state = (function reagent$core$set_state(this$,new_state){
  if(reagent.impl.component.reagent_component_QMARK_(this$)){
  } else {
  throw (new Error(["Assert failed: ",["Expected a reagent component, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([this$], 0))].join(''),"\n","(comp/reagent-component? this)"].join('')));
  }
  
  if((((new_state == null)) || (cljs.core.map_QMARK_(new_state)))){
  } else {
  throw (new Error(["Assert failed: ",["Expected a valid new state, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new_state], 0))].join(''),"\n","(clojure.core/or (clojure.core/nil? new-state) (clojure.core/map? new-state))"].join('')));
  }
  
  return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(reagent.core.state_atom(this$),cljs.core.merge,new_state);
  });
  /**
   * Force a component to re-render immediately.
   * 
   *   If the second argument is true, child components will also be
   *   re-rendered, even is their arguments have not changed.
   */
  reagent.core.force_update = (function reagent$core$force_update(var_args){
  var G__40402 = arguments.length;
  switch (G__40402) {
  case 1:
  return reagent.core.force_update.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
  
  break;
  case 2:
  return reagent.core.force_update.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('')));
  
  }
  });
  
  (reagent.core.force_update.cljs$core$IFn$_invoke$arity$1 = (function (this$){
  return reagent.core.force_update.cljs$core$IFn$_invoke$arity$2(this$,false);
  }));
  
  (reagent.core.force_update.cljs$core$IFn$_invoke$arity$2 = (function (this$,deep){
  reagent.ratom.flush_BANG_();
  
  reagent.impl.util.force_update(this$,deep);
  
  return reagent.impl.batching.flush_after_render();
  }));
  
  (reagent.core.force_update.cljs$lang$maxFixedArity = 2);
  
  /**
   * Returns the props passed to a component.
   */
  reagent.core.props = (function reagent$core$props(this$){
  if(reagent.impl.component.reagent_component_QMARK_(this$)){
  } else {
  throw (new Error(["Assert failed: ",["Expected a reagent component, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([this$], 0))].join(''),"\n","(comp/reagent-component? this)"].join('')));
  }
  
  return reagent.impl.component.get_props(this$);
  });
  /**
   * Returns the children passed to a component.
   */
  reagent.core.children = (function reagent$core$children(this$){
  if(reagent.impl.component.reagent_component_QMARK_(this$)){
  } else {
  throw (new Error(["Assert failed: ",["Expected a reagent component, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([this$], 0))].join(''),"\n","(comp/reagent-component? this)"].join('')));
  }
  
  return reagent.impl.component.get_children(this$);
  });
  /**
   * Returns the entire Hiccup form passed to the component.
   */
  reagent.core.argv = (function reagent$core$argv(this$){
  if(reagent.impl.component.reagent_component_QMARK_(this$)){
  } else {
  throw (new Error(["Assert failed: ",["Expected a reagent component, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([this$], 0))].join(''),"\n","(comp/reagent-component? this)"].join('')));
  }
  
  return reagent.impl.component.get_argv(this$);
  });
  /**
   * Function which normalizes and combines class values to a string
   * 
   *   Reagent allows classes to be defined as:
   *   - Strings
   *   - Named objects (Symbols or Keywords)
   *   - Collections of previous types
   */
  reagent.core.class_names = (function reagent$core$class_names(var_args){
  var G__40407 = arguments.length;
  switch (G__40407) {
  case 0:
  return reagent.core.class_names.cljs$core$IFn$_invoke$arity$0();
  
  break;
  case 1:
  return reagent.core.class_names.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
  
  break;
  case 2:
  return reagent.core.class_names.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
  
  break;
  default:
  var args_arr__4757__auto__ = [];
  var len__4736__auto___40442 = arguments.length;
  var i__4737__auto___40443 = (0);
  while(true){
  if((i__4737__auto___40443 < len__4736__auto___40442)){
  args_arr__4757__auto__.push((arguments[i__4737__auto___40443]));
  
  var G__40444 = (i__4737__auto___40443 + (1));
  i__4737__auto___40443 = G__40444;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4758__auto__ = (new cljs.core.IndexedSeq(args_arr__4757__auto__.slice((2)),(0),null));
  return reagent.core.class_names.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__4758__auto__);
  
  }
  });
  
  (reagent.core.class_names.cljs$core$IFn$_invoke$arity$0 = (function (){
  return null;
  }));
  
  (reagent.core.class_names.cljs$core$IFn$_invoke$arity$1 = (function (class$){
  return reagent.impl.util.class_names.cljs$core$IFn$_invoke$arity$1(class$);
  }));
  
  (reagent.core.class_names.cljs$core$IFn$_invoke$arity$2 = (function (class1,class2){
  return reagent.impl.util.class_names.cljs$core$IFn$_invoke$arity$2(class1,class2);
  }));
  
  (reagent.core.class_names.cljs$core$IFn$_invoke$arity$variadic = (function (class1,class2,others){
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$4(reagent.impl.util.class_names,class1,class2,others);
  }));
  
  /** @this {Function} */
  (reagent.core.class_names.cljs$lang$applyTo = (function (seq40404){
  var G__40405 = cljs.core.first(seq40404);
  var seq40404__$1 = cljs.core.next(seq40404);
  var G__40406 = cljs.core.first(seq40404__$1);
  var seq40404__$2 = cljs.core.next(seq40404__$1);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40405,G__40406,seq40404__$2);
  }));
  
  (reagent.core.class_names.cljs$lang$maxFixedArity = (2));
  
  /**
   * Utility function that merges some maps, handling `:class` and `:style`.
   * 
   *   The :class value is always normalized (using `class-names`) even if no
   *   merging is done.
   */
  reagent.core.merge_props = (function reagent$core$merge_props(var_args){
  var G__40412 = arguments.length;
  switch (G__40412) {
  case 0:
  return reagent.core.merge_props.cljs$core$IFn$_invoke$arity$0();
  
  break;
  case 1:
  return reagent.core.merge_props.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
  
  break;
  case 2:
  return reagent.core.merge_props.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
  
  break;
  default:
  var args_arr__4757__auto__ = [];
  var len__4736__auto___40446 = arguments.length;
  var i__4737__auto___40447 = (0);
  while(true){
  if((i__4737__auto___40447 < len__4736__auto___40446)){
  args_arr__4757__auto__.push((arguments[i__4737__auto___40447]));
  
  var G__40448 = (i__4737__auto___40447 + (1));
  i__4737__auto___40447 = G__40448;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4758__auto__ = (new cljs.core.IndexedSeq(args_arr__4757__auto__.slice((2)),(0),null));
  return reagent.core.merge_props.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__4758__auto__);
  
  }
  });
  
  (reagent.core.merge_props.cljs$core$IFn$_invoke$arity$0 = (function (){
  return reagent.impl.util.merge_props.cljs$core$IFn$_invoke$arity$0();
  }));
  
  (reagent.core.merge_props.cljs$core$IFn$_invoke$arity$1 = (function (defaults){
  return reagent.impl.util.merge_props.cljs$core$IFn$_invoke$arity$1(defaults);
  }));
  
  (reagent.core.merge_props.cljs$core$IFn$_invoke$arity$2 = (function (defaults,props){
  return reagent.impl.util.merge_props.cljs$core$IFn$_invoke$arity$2(defaults,props);
  }));
  
  (reagent.core.merge_props.cljs$core$IFn$_invoke$arity$variadic = (function (defaults,props,others){
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$4(reagent.impl.util.merge_props,defaults,props,others);
  }));
  
  /** @this {Function} */
  (reagent.core.merge_props.cljs$lang$applyTo = (function (seq40409){
  var G__40410 = cljs.core.first(seq40409);
  var seq40409__$1 = cljs.core.next(seq40409);
  var G__40411 = cljs.core.first(seq40409__$1);
  var seq40409__$2 = cljs.core.next(seq40409__$1);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40410,G__40411,seq40409__$2);
  }));
  
  (reagent.core.merge_props.cljs$lang$maxFixedArity = (2));
  
  /**
   * Render dirty components immediately.
   * 
   *   Note that this may not work in event handlers, since React.js does
   *   batching of updates there.
   */
  reagent.core.flush = (function reagent$core$flush(){
  return reagent.impl.batching.flush();
  });
  /**
   * Like clojure.core/atom, except that it keeps track of derefs.
   *   Reagent components that derefs one of these are automatically
   *   re-rendered.
   */
  reagent.core.atom = (function reagent$core$atom(var_args){
  var G__40416 = arguments.length;
  switch (G__40416) {
  case 1:
  return reagent.core.atom.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
  
  break;
  default:
  var args_arr__4757__auto__ = [];
  var len__4736__auto___40450 = arguments.length;
  var i__4737__auto___40451 = (0);
  while(true){
  if((i__4737__auto___40451 < len__4736__auto___40450)){
  args_arr__4757__auto__.push((arguments[i__4737__auto___40451]));
  
  var G__40452 = (i__4737__auto___40451 + (1));
  i__4737__auto___40451 = G__40452;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4758__auto__ = (new cljs.core.IndexedSeq(args_arr__4757__auto__.slice((1)),(0),null));
  return reagent.core.atom.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__4758__auto__);
  
  }
  });
  
  (reagent.core.atom.cljs$core$IFn$_invoke$arity$1 = (function (x){
  return reagent.ratom.atom.cljs$core$IFn$_invoke$arity$1(x);
  }));
  
  (reagent.core.atom.cljs$core$IFn$_invoke$arity$variadic = (function (x,rest){
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(reagent.ratom.atom,x,rest);
  }));
  
  /** @this {Function} */
  (reagent.core.atom.cljs$lang$applyTo = (function (seq40414){
  var G__40415 = cljs.core.first(seq40414);
  var seq40414__$1 = cljs.core.next(seq40414);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40415,seq40414__$1);
  }));
  
  (reagent.core.atom.cljs$lang$maxFixedArity = (1));
  
  /**
   * Takes a function and optional arguments, and returns a derefable
   *   containing the output of that function. If the function derefs
   *   Reagent atoms (or track, etc), the value will be updated whenever
   *   the atom changes.
   * 
   *   In other words, `@(track foo bar)` will produce the same result
   *   as `(foo bar)`, but foo will only be called again when the atoms it
   *   depends on changes, and will only trigger updates of components when
   *   its result changes.
   * 
   *   track is lazy, i.e the function is only evaluated on deref.
   */
  reagent.core.track = (function reagent$core$track(var_args){
  var args__4742__auto__ = [];
  var len__4736__auto___40453 = arguments.length;
  var i__4737__auto___40454 = (0);
  while(true){
  if((i__4737__auto___40454 < len__4736__auto___40453)){
  args__4742__auto__.push((arguments[i__4737__auto___40454]));
  
  var G__40455 = (i__4737__auto___40454 + (1));
  i__4737__auto___40454 = G__40455;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4743__auto__ = ((((1) < args__4742__auto__.length))?(new cljs.core.IndexedSeq(args__4742__auto__.slice((1)),(0),null)):null);
  return reagent.core.track.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__4743__auto__);
  });
  
  (reagent.core.track.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){
  if(cljs.core.ifn_QMARK_(f)){
  } else {
  throw (new Error("Assert failed: (ifn? f)"));
  }
  
  return reagent.ratom.make_track(f,args);
  }));
  
  (reagent.core.track.cljs$lang$maxFixedArity = (1));
  
  /** @this {Function} */
  (reagent.core.track.cljs$lang$applyTo = (function (seq40417){
  var G__40418 = cljs.core.first(seq40417);
  var seq40417__$1 = cljs.core.next(seq40417);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40418,seq40417__$1);
  }));
  
  /**
   * An eager version of track. The function passed is called
   *   immediately, and continues to be called when needed, until stopped
   *   with dispose!.
   */
  reagent.core.track_BANG_ = (function reagent$core$track_BANG_(var_args){
  var args__4742__auto__ = [];
  var len__4736__auto___40456 = arguments.length;
  var i__4737__auto___40457 = (0);
  while(true){
  if((i__4737__auto___40457 < len__4736__auto___40456)){
  args__4742__auto__.push((arguments[i__4737__auto___40457]));
  
  var G__40458 = (i__4737__auto___40457 + (1));
  i__4737__auto___40457 = G__40458;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4743__auto__ = ((((1) < args__4742__auto__.length))?(new cljs.core.IndexedSeq(args__4742__auto__.slice((1)),(0),null)):null);
  return reagent.core.track_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__4743__auto__);
  });
  
  (reagent.core.track_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){
  if(cljs.core.ifn_QMARK_(f)){
  } else {
  throw (new Error("Assert failed: (ifn? f)"));
  }
  
  return reagent.ratom.make_track_BANG_(f,args);
  }));
  
  (reagent.core.track_BANG_.cljs$lang$maxFixedArity = (1));
  
  /** @this {Function} */
  (reagent.core.track_BANG_.cljs$lang$applyTo = (function (seq40419){
  var G__40420 = cljs.core.first(seq40419);
  var seq40419__$1 = cljs.core.next(seq40419);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40420,seq40419__$1);
  }));
  
  /**
   * Stop the result of track! from updating.
   */
  reagent.core.dispose_BANG_ = (function reagent$core$dispose_BANG_(x){
  return reagent.ratom.dispose_BANG_(x);
  });
  /**
   * Provide a combination of value and callback, that looks like an atom.
   * 
   *   The first argument can be any value, that will be returned when the
   *   result is deref'ed.
   * 
   *   The second argument should be a function, that is called with the
   *   optional extra arguments provided to wrap, and the new value of the
   *   resulting 'atom'.
   * 
   *   Use for example like this:
   * 
   *   ```cljs
   *   (wrap (:foo @state)
   *      swap! state assoc :foo)
   *   ```
   * 
   *   Probably useful only for passing to child components.
   */
  reagent.core.wrap = (function reagent$core$wrap(var_args){
  var args__4742__auto__ = [];
  var len__4736__auto___40459 = arguments.length;
  var i__4737__auto___40460 = (0);
  while(true){
  if((i__4737__auto___40460 < len__4736__auto___40459)){
  args__4742__auto__.push((arguments[i__4737__auto___40460]));
  
  var G__40461 = (i__4737__auto___40460 + (1));
  i__4737__auto___40460 = G__40461;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4743__auto__ = ((((2) < args__4742__auto__.length))?(new cljs.core.IndexedSeq(args__4742__auto__.slice((2)),(0),null)):null);
  return reagent.core.wrap.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__4743__auto__);
  });
  
  (reagent.core.wrap.cljs$core$IFn$_invoke$arity$variadic = (function (value,reset_fn,args){
  if(cljs.core.ifn_QMARK_(reset_fn)){
  } else {
  throw (new Error(["Assert failed: ",["Expected something callable, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([reset_fn], 0))].join(''),"\n","(clojure.core/ifn? reset-fn)"].join('')));
  }
  
  return reagent.ratom.make_wrapper(value,reset_fn,args);
  }));
  
  (reagent.core.wrap.cljs$lang$maxFixedArity = (2));
  
  /** @this {Function} */
  (reagent.core.wrap.cljs$lang$applyTo = (function (seq40421){
  var G__40422 = cljs.core.first(seq40421);
  var seq40421__$1 = cljs.core.next(seq40421);
  var G__40423 = cljs.core.first(seq40421__$1);
  var seq40421__$2 = cljs.core.next(seq40421__$1);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40422,G__40423,seq40421__$2);
  }));
  
  /**
   * Provide a cursor into a Reagent atom.
   * 
   *   Behaves like a Reagent atom but focuses updates and derefs to
   *   the specified path within the wrapped Reagent atom. e.g.,
   * 
   *   ```cljs
   *   (let [c (cursor ra [:nested :content])]
   *  ... @c ;; equivalent to (get-in @ra [:nested :content])
   *  ... (reset! c 42) ;; equivalent to (swap! ra assoc-in [:nested :content] 42)
   *  ... (swap! c inc) ;; equivalence to (swap! ra update-in [:nested :content] inc)
   *  )
   *   ```
   * 
   *   The first parameter can also be a function, that should look
   *   something like this:
   * 
   *   ```cljs
   *   (defn set-get
   *  ([k] (get-in @state k))
   *  ([k v] (swap! state assoc-in k v)))
   *   ```
   * 
   *   The function will be called with one argument – the path passed to
   *   cursor – when the cursor is deref'ed, and two arguments (path and
   *   new value) when the cursor is modified.
   * 
   *   Given that set-get function, (and that state is a Reagent atom, or
   *   another cursor) these cursors are equivalent:
   *   `(cursor state [:foo])` and `(cursor set-get [:foo])`.
   * 
   *   Note that a cursor is lazy: its value will not change until it is
   *   used. This may be noticed with add-watch.
   */
  reagent.core.cursor = (function reagent$core$cursor(src,path){
  return reagent.ratom.cursor(src,path);
  });
  /**
   * Swaps the value of a to be `(apply f current-value-of-atom args)`.
   * 
   *   rswap! works like swap!, except that recursive calls to rswap! on
   *   the same atom are allowed – and it always returns nil.
   */
  reagent.core.rswap_BANG_ = (function reagent$core$rswap_BANG_(var_args){
  var args__4742__auto__ = [];
  var len__4736__auto___40462 = arguments.length;
  var i__4737__auto___40463 = (0);
  while(true){
  if((i__4737__auto___40463 < len__4736__auto___40462)){
  args__4742__auto__.push((arguments[i__4737__auto___40463]));
  
  var G__40464 = (i__4737__auto___40463 + (1));
  i__4737__auto___40463 = G__40464;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4743__auto__ = ((((2) < args__4742__auto__.length))?(new cljs.core.IndexedSeq(args__4742__auto__.slice((2)),(0),null)):null);
  return reagent.core.rswap_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__4743__auto__);
  });
  
  (reagent.core.rswap_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (a,f,args){
  if((((!((a == null))))?(((((a.cljs$lang$protocol_mask$partition1$ & (16384))) || ((cljs.core.PROTOCOL_SENTINEL === a.cljs$core$IAtom$))))?true:(((!a.cljs$lang$protocol_mask$partition1$))?cljs.core.native_satisfies_QMARK_(cljs.core.IAtom,a):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IAtom,a))){
  } else {
  throw (new Error("Assert failed: (satisfies? IAtom a)"));
  }
  
  if(cljs.core.ifn_QMARK_(f)){
  } else {
  throw (new Error("Assert failed: (ifn? f)"));
  }
  
  if(cljs.core.truth_(a.rswapping)){
  (function (){var or__4126__auto__ = a.rswapfs;
  if(cljs.core.truth_(or__4126__auto__)){
  return or__4126__auto__;
  } else {
  return (a.rswapfs = []);
  }
  })().push((function (p1__40424_SHARP_){
  return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f,p1__40424_SHARP_,args);
  }));
  } else {
  (a.rswapping = true);
  
  try{cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(a,(function (state){
  var s = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f,state,args);
  while(true){
  var temp__5737__auto__ = (function (){var G__40429 = a;
  var G__40429__$1 = (((G__40429 == null))?null:G__40429.rswapfs);
  if((G__40429__$1 == null)){
  return null;
  } else {
  return G__40429__$1.shift();
  }
  })();
  if((temp__5737__auto__ == null)){
  return s;
  } else {
  var sf = temp__5737__auto__;
  var G__40465 = (sf.cljs$core$IFn$_invoke$arity$1 ? sf.cljs$core$IFn$_invoke$arity$1(s) : sf.call(null,s));
  s = G__40465;
  continue;
  }
  break;
  }
  }));
  }finally {(a.rswapping = false);
  }}
  
  return null;
  }));
  
  (reagent.core.rswap_BANG_.cljs$lang$maxFixedArity = (2));
  
  /** @this {Function} */
  (reagent.core.rswap_BANG_.cljs$lang$applyTo = (function (seq40425){
  var G__40426 = cljs.core.first(seq40425);
  var seq40425__$1 = cljs.core.next(seq40425);
  var G__40427 = cljs.core.first(seq40425__$1);
  var seq40425__$2 = cljs.core.next(seq40425__$1);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40426,G__40427,seq40425__$2);
  }));
  
  /**
   * Run f using requestAnimationFrame or equivalent.
   * 
   *   f will be called just before components are rendered.
   */
  reagent.core.next_tick = (function reagent$core$next_tick(f){
  return reagent.impl.batching.do_before_flush(f);
  });
  /**
   * Run f using requestAnimationFrame or equivalent.
   * 
   *   f will be called just after any queued renders in the next animation
   *   frame (and even if no renders actually occur).
   */
  reagent.core.after_render = (function reagent$core$after_render(f){
  return reagent.impl.batching.do_after_render(f);
  });
  /**
   * Works just like clojure.core/partial, but the result can be compared with =
   */
  reagent.core.partial = (function reagent$core$partial(var_args){
  var args__4742__auto__ = [];
  var len__4736__auto___40466 = arguments.length;
  var i__4737__auto___40467 = (0);
  while(true){
  if((i__4737__auto___40467 < len__4736__auto___40466)){
  args__4742__auto__.push((arguments[i__4737__auto___40467]));
  
  var G__40468 = (i__4737__auto___40467 + (1));
  i__4737__auto___40467 = G__40468;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4743__auto__ = ((((1) < args__4742__auto__.length))?(new cljs.core.IndexedSeq(args__4742__auto__.slice((1)),(0),null)):null);
  return reagent.core.partial.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__4743__auto__);
  });
  
  (reagent.core.partial.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){
  return reagent.impl.util.make_partial_fn(f,args);
  }));
  
  (reagent.core.partial.cljs$lang$maxFixedArity = (1));
  
  /** @this {Function} */
  (reagent.core.partial.cljs$lang$applyTo = (function (seq40430){
  var G__40431 = cljs.core.first(seq40430);
  var seq40430__$1 = cljs.core.next(seq40430);
  var self__4723__auto__ = this;
  return self__4723__auto__.cljs$core$IFn$_invoke$arity$variadic(G__40431,seq40430__$1);
  }));
  
  /**
   * Creates Compiler object with given `opts`,
   *   this can be passed to `render`, `as-element` and other functions to control
   *   how they turn the Reagent-style Hiccup into React components and elements.
   */
  reagent.core.create_compiler = (function reagent$core$create_compiler(opts){
  return reagent.impl.template.create_compiler(opts);
  });
  /**
   * Globally sets the Compiler object used by `render`, `as-element` and other
   *   calls by default, when no `compiler` parameter is provided.
   * 
   *   Use `nil` value to restore the original default compiler.
   */
  reagent.core.set_default_compiler_BANG_ = (function reagent$core$set_default_compiler_BANG_(compiler){
  return reagent.impl.template.set_default_compiler_BANG_((((compiler == null))?reagent.impl.template.default_compiler_STAR_:compiler));
  });
  reagent.core.render = (function reagent$core$render(var_args){
  var args__4742__auto__ = [];
  var len__4736__auto___40469 = arguments.length;
  var i__4737__auto___40470 = (0);
  while(true){
  if((i__4737__auto___40470 < len__4736__auto___40469)){
  args__4742__auto__.push((arguments[i__4737__auto___40470]));
  
  var G__40471 = (i__4737__auto___40470 + (1));
  i__4737__auto___40470 = G__40471;
  continue;
  } else {
  }
  break;
  }
  
  var argseq__4743__auto__ = ((((0) < args__4742__auto__.length))?(new cljs.core.IndexedSeq(args__4742__auto__.slice((0)),(0),null)):null);
  return reagent.core.render.cljs$core$IFn$_invoke$arity$variadic(argseq__4743__auto__);
  });
  
  (reagent.core.render.cljs$core$IFn$_invoke$arity$variadic = (function (_){
  throw (new Error("Reagent.core/render function was moved to reagent.dom namespace in Reagent v1.0."));
  
  return null;
  }));
  
  (reagent.core.render.cljs$lang$maxFixedArity = (0));
  
  /** @this {Function} */
  (reagent.core.render.cljs$lang$applyTo = (function (seq40432){
  var self__4724__auto__ = this;
  return self__4724__auto__.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq40432));
  }));
  
  
  //# sourceMappingURL=reagent.core.js.map
  