Skip to content

Instantly share code, notes, and snippets.

@johntrimble
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johntrimble/9065485 to your computer and use it in GitHub Desktop.
Save johntrimble/9065485 to your computer and use it in GitHub Desktop.
ClojureScript Collections Performance
function sumXsAndYsJs(data) {
var x = 0;
var y = 0;
for (var i = 0; i < data.length; i++) {
x += data[i].x;
y += data[i].y;
}
return [x, y];
}
(ns cljs.benchmark-runner
(:refer-clojure :exclude [println]))
(def println print)
(set! *print-fn* js/print)
(defrecord XY [x y])
(def NUM 10000)
(def array-data (into-array
(for [i (range NUM)]
(let [o (js-obj)]
(set! (.-x o) (rand))
(set! (.-y o) (rand))
o))))
(def vec-data (mapv #(hash-map :x (.-x %) :y (.-y %)) array-data))
(def vec-data-array-map (mapv #(into cljs.core.PersistentArrayMap/EMPTY %) vec-data))
(def vec-data-records (mapv #(XY. (:x %) (:y %)) vec-data))
(def array-data-records (into-array vec-data-records))
(defn sumXsAndYsWithLoop [data]
(loop [x 0 y 0 data data]
(if (seq data)
(let [o (first data)]
(recur (+ x (:x o)) (+ y (:y o)) (rest data)))
[x y])))
(defn sumXsAndYsWithLoopAndNativeFieldAccess [data]
(loop [x 0 y 0 data data]
(if (seq data)
(let [o (first data)]
(recur (+ x (.-x o)) (+ y (.-y o)) (rest data)))
[x y])))
(defn sumsXsAndYsWithDotimesNativeFieldAccessAndMutableLocals [data]
(let [x (doto (make-array 1)
(aset 0 0))
y (doto (make-array 1)
(aset 0 0))]
(dotimes [i (count data)]
(let [o (data i)]
(aset x 0 (+ (aget x 0) (.-x o)))
(aset y 0 (+ (aget y 0) (.-y o)))))
[(aget x 0) (aget y 0)]))
(defn sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals [data]
(let [x (doto (make-array 1)
(aset 0 0))
y (doto (make-array 1)
(aset 0 0))]
(dotimes [i (alength data)]
(let [o (aget data i)]
(aset x 0 (+ (aget x 0) (.-x o)))
(aset y 0 (+ (aget y 0) (.-y o)))))
[(aget x 0) (aget y 0)]))
(defn sumXsAndYsWithReduce [data]
(reduce (fn [[x y] d]
[(+ x (:x d)) (+ y (:y d))])
[0 0]
data))
(defn sumXsAndYsWithLoopAndSubvec [data]
(loop [x 0 y 0 data data]
(if (seq data)
(let [o (first data)]
(recur (+ x (:x o)) (+ y (:y o)) (subvec data 1)))
[x y])))
(simple-benchmark [data array-data] (js/sumXsAndYsJs data) 1000)
(simple-benchmark [data array-data] (sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals data) 1000)
(simple-benchmark [data array-data-records] (sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals data) 1000)
(simple-benchmark [data vec-data-records] (sumsXsAndYsWithDotimesNativeFieldAccessAndMutableLocals data) 1000)
(simple-benchmark [data vec-data-records] (sumXsAndYsWithLoopAndNativeFieldAccess data) 1000)
(simple-benchmark [data vec-data-records] (sumXsAndYsWithLoop data) 1000)
(simple-benchmark [data vec-data-array-map] (sumXsAndYsWithLoop data) 1000)
(simple-benchmark [data vec-data] (sumXsAndYsWithLoop data) 1000)
(simple-benchmark [data vec-data] (sumXsAndYsWithReduce data) 1000)
(simple-benchmark [data vec-data] (sumXsAndYsWithLoopAndSubvec data) 1000)
function sumXsAndYsJs(data) {
var x = 0;
var y = 0;
for (var i = 0; i < data.length; i++) {
x += data[i].x;
y += data[i].y;
}
return [x, y];
}
;(function(){
var f;
function k(a) {
var b = typeof a;
if ("object" == b) {
if (a) {
if (a instanceof Array) {
return "array";
}
if (a instanceof Object) {
return b;
}
var c = Object.prototype.toString.call(a);
if ("[object Window]" == c) {
return "object";
}
if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) {
return "array";
}
if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) {
return "function";
}
} else {
return "null";
}
} else {
if ("function" == b && "undefined" == typeof a.call) {
return "object";
}
}
return b;
}
var aa = "closure_uid_" + (1E9 * Math.random() >>> 0), ba = 0;
function ca(a, b) {
for (var c in a) {
b.call(void 0, a[c], c, a);
}
}
;function da(a, b) {
null != a && this.append.apply(this, arguments);
}
da.prototype.ua = "";
da.prototype.append = function(a, b, c) {
this.ua += a;
if (null != b) {
for (var d = 1;d < arguments.length;d++) {
this.ua += arguments[d];
}
}
return this;
};
da.prototype.toString = function() {
return this.ua;
};
var fa;
function ga() {
throw Error("No *print-fn* fn set for evaluation environment");
}
var ha = null;
function ia() {
return new ja(null, 5, [ka, !0, ma, !0, na, !1, oa, !1, pa, null], null);
}
function n(a) {
return null != a && !1 !== a;
}
function qa(a) {
return n(a) ? !1 : !0;
}
function r(a, b) {
return a[k(null == b ? null : b)] ? !0 : a._ ? !0 : t ? !1 : null;
}
function ra(a) {
return null == a ? null : a.constructor;
}
function u(a, b) {
var c = ra(b), c = n(n(c) ? c.jb : c) ? c.ib : k(b);
return Error(["No protocol method ", a, " defined for type ", c, ": ", b].join(""));
}
function sa(a) {
var b = a.ib;
return n(b) ? b : "" + v(a);
}
function w(a) {
for (var b = a.length, c = Array(b), d = 0;;) {
if (d < b) {
c[d] = a[d], d += 1;
} else {
break;
}
}
return c;
}
var ua = function() {
function a(a, b) {
return ta.c ? ta.c(function(a, b) {
a.push(b);
return a;
}, [], b) : ta.call(null, function(a, b) {
a.push(b);
return a;
}, [], b);
}
function b(a) {
return c.a(null, a);
}
var c = null, c = function(d, c) {
switch(arguments.length) {
case 1:
return b.call(this, d);
case 2:
return a.call(this, 0, c);
}
throw Error("Invalid arity: " + arguments.length);
};
c.d = b;
c.a = a;
return c;
}(), va = {}, wa = {};
function y(a) {
if (a ? a.F : a) {
return a.F(a);
}
var b;
b = y[k(null == a ? null : a)];
if (!b && (b = y._, !b)) {
throw u("ICounted.-count", a);
}
return b.call(null, a);
}
function xa(a) {
if (a ? a.H : a) {
return a.H(a);
}
var b;
b = xa[k(null == a ? null : a)];
if (!b && (b = xa._, !b)) {
throw u("IEmptyableCollection.-empty", a);
}
return b.call(null, a);
}
function ya(a, b) {
if (a ? a.D : a) {
return a.D(a, b);
}
var c;
c = ya[k(null == a ? null : a)];
if (!c && (c = ya._, !c)) {
throw u("ICollection.-conj", a);
}
return c.call(null, a, b);
}
var za = {}, z = function() {
function a(a, b, c) {
if (a ? a.T : a) {
return a.T(a, b, c);
}
var h;
h = z[k(null == a ? null : a)];
if (!h && (h = z._, !h)) {
throw u("IIndexed.-nth", a);
}
return h.call(null, a, b, c);
}
function b(a, b) {
if (a ? a.Q : a) {
return a.Q(a, b);
}
var c;
c = z[k(null == a ? null : a)];
if (!c && (c = z._, !c)) {
throw u("IIndexed.-nth", a);
}
return c.call(null, a, b);
}
var c = null, c = function(d, c, g) {
switch(arguments.length) {
case 2:
return b.call(this, d, c);
case 3:
return a.call(this, d, c, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}(), Aa = {};
function A(a) {
if (a ? a.P : a) {
return a.P(a);
}
var b;
b = A[k(null == a ? null : a)];
if (!b && (b = A._, !b)) {
throw u("ISeq.-first", a);
}
return b.call(null, a);
}
function B(a) {
if (a ? a.R : a) {
return a.R(a);
}
var b;
b = B[k(null == a ? null : a)];
if (!b && (b = B._, !b)) {
throw u("ISeq.-rest", a);
}
return b.call(null, a);
}
var Ba = {}, Da = {}, C = function() {
function a(a, b, c) {
if (a ? a.A : a) {
return a.A(a, b, c);
}
var h;
h = C[k(null == a ? null : a)];
if (!h && (h = C._, !h)) {
throw u("ILookup.-lookup", a);
}
return h.call(null, a, b, c);
}
function b(a, b) {
if (a ? a.w : a) {
return a.w(a, b);
}
var c;
c = C[k(null == a ? null : a)];
if (!c && (c = C._, !c)) {
throw u("ILookup.-lookup", a);
}
return c.call(null, a, b);
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}();
function Ea(a, b) {
if (a ? a.Ha : a) {
return a.Ha(a, b);
}
var c;
c = Ea[k(null == a ? null : a)];
if (!c && (c = Ea._, !c)) {
throw u("IAssociative.-contains-key?", a);
}
return c.call(null, a, b);
}
function Fa(a, b, c) {
if (a ? a.oa : a) {
return a.oa(a, b, c);
}
var d;
d = Fa[k(null == a ? null : a)];
if (!d && (d = Fa._, !d)) {
throw u("IAssociative.-assoc", a);
}
return d.call(null, a, b, c);
}
var Ga = {};
function Ha(a, b) {
if (a ? a.Da : a) {
return a.Da(a, b);
}
var c;
c = Ha[k(null == a ? null : a)];
if (!c && (c = Ha._, !c)) {
throw u("IMap.-dissoc", a);
}
return c.call(null, a, b);
}
var Ia = {};
function Ja(a) {
if (a ? a.$a : a) {
return a.$a();
}
var b;
b = Ja[k(null == a ? null : a)];
if (!b && (b = Ja._, !b)) {
throw u("IMapEntry.-key", a);
}
return b.call(null, a);
}
function Ka(a) {
if (a ? a.eb : a) {
return a.eb();
}
var b;
b = Ka[k(null == a ? null : a)];
if (!b && (b = Ka._, !b)) {
throw u("IMapEntry.-val", a);
}
return b.call(null, a);
}
var La = {}, Ma = {};
function Na(a, b, c) {
if (a ? a.ab : a) {
return a.ab(a, b, c);
}
var d;
d = Na[k(null == a ? null : a)];
if (!d && (d = Na._, !d)) {
throw u("IVector.-assoc-n", a);
}
return d.call(null, a, b, c);
}
var Oa = {};
function Pa(a) {
if (a ? a.I : a) {
return a.I(a);
}
var b;
b = Pa[k(null == a ? null : a)];
if (!b && (b = Pa._, !b)) {
throw u("IMeta.-meta", a);
}
return b.call(null, a);
}
var Qa = {};
function Ra(a, b) {
if (a ? a.G : a) {
return a.G(a, b);
}
var c;
c = Ra[k(null == a ? null : a)];
if (!c && (c = Ra._, !c)) {
throw u("IWithMeta.-with-meta", a);
}
return c.call(null, a, b);
}
var Sa = {}, Ta = function() {
function a(a, b, c) {
if (a ? a.M : a) {
return a.M(a, b, c);
}
var h;
h = Ta[k(null == a ? null : a)];
if (!h && (h = Ta._, !h)) {
throw u("IReduce.-reduce", a);
}
return h.call(null, a, b, c);
}
function b(a, b) {
if (a ? a.L : a) {
return a.L(a, b);
}
var c;
c = Ta[k(null == a ? null : a)];
if (!c && (c = Ta._, !c)) {
throw u("IReduce.-reduce", a);
}
return c.call(null, a, b);
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}();
function Ua(a, b) {
if (a ? a.t : a) {
return a.t(a, b);
}
var c;
c = Ua[k(null == a ? null : a)];
if (!c && (c = Ua._, !c)) {
throw u("IEquiv.-equiv", a);
}
return c.call(null, a, b);
}
function Va(a) {
if (a ? a.v : a) {
return a.v(a);
}
var b;
b = Va[k(null == a ? null : a)];
if (!b && (b = Va._, !b)) {
throw u("IHash.-hash", a);
}
return b.call(null, a);
}
var Wa = {};
function Xa(a) {
if (a ? a.B : a) {
return a.B(a);
}
var b;
b = Xa[k(null == a ? null : a)];
if (!b && (b = Xa._, !b)) {
throw u("ISeqable.-seq", a);
}
return b.call(null, a);
}
var Ya = {};
function E(a, b) {
if (a ? a.hb : a) {
return a.hb(0, b);
}
var c;
c = E[k(null == a ? null : a)];
if (!c && (c = E._, !c)) {
throw u("IWriter.-write", a);
}
return c.call(null, a, b);
}
var Za = {};
function $a(a, b, c) {
if (a ? a.u : a) {
return a.u(a, b, c);
}
var d;
d = $a[k(null == a ? null : a)];
if (!d && (d = $a._, !d)) {
throw u("IPrintWithWriter.-pr-writer", a);
}
return d.call(null, a, b, c);
}
function ab(a) {
if (a ? a.va : a) {
return a.va(a);
}
var b;
b = ab[k(null == a ? null : a)];
if (!b && (b = ab._, !b)) {
throw u("IEditableCollection.-as-transient", a);
}
return b.call(null, a);
}
function bb(a, b) {
if (a ? a.xa : a) {
return a.xa(a, b);
}
var c;
c = bb[k(null == a ? null : a)];
if (!c && (c = bb._, !c)) {
throw u("ITransientCollection.-conj!", a);
}
return c.call(null, a, b);
}
function cb(a) {
if (a ? a.ya : a) {
return a.ya(a);
}
var b;
b = cb[k(null == a ? null : a)];
if (!b && (b = cb._, !b)) {
throw u("ITransientCollection.-persistent!", a);
}
return b.call(null, a);
}
function db(a, b, c) {
if (a ? a.wa : a) {
return a.wa(a, b, c);
}
var d;
d = db[k(null == a ? null : a)];
if (!d && (d = db._, !d)) {
throw u("ITransientAssociative.-assoc!", a);
}
return d.call(null, a, b, c);
}
function eb(a, b, c) {
if (a ? a.gb : a) {
return a.gb(0, b, c);
}
var d;
d = eb[k(null == a ? null : a)];
if (!d && (d = eb._, !d)) {
throw u("ITransientVector.-assoc-n!", a);
}
return d.call(null, a, b, c);
}
function fb(a) {
if (a ? a.bb : a) {
return a.bb();
}
var b;
b = fb[k(null == a ? null : a)];
if (!b && (b = fb._, !b)) {
throw u("IChunk.-drop-first", a);
}
return b.call(null, a);
}
function gb(a) {
if (a ? a.Ja : a) {
return a.Ja(a);
}
var b;
b = gb[k(null == a ? null : a)];
if (!b && (b = gb._, !b)) {
throw u("IChunkedSeq.-chunked-first", a);
}
return b.call(null, a);
}
function hb(a) {
if (a ? a.Ka : a) {
return a.Ka(a);
}
var b;
b = hb[k(null == a ? null : a)];
if (!b && (b = hb._, !b)) {
throw u("IChunkedSeq.-chunked-rest", a);
}
return b.call(null, a);
}
function ib(a) {
if (a ? a.Ia : a) {
return a.Ia(a);
}
var b;
b = ib[k(null == a ? null : a)];
if (!b && (b = ib._, !b)) {
throw u("IChunkedNext.-chunked-next", a);
}
return b.call(null, a);
}
function jb(a) {
this.ub = a;
this.n = 0;
this.f = 1073741824;
}
jb.prototype.hb = function(a, b) {
return this.ub.append(b);
};
function G(a) {
var b = new da;
a.u(null, new jb(b), ia());
return "" + v(b);
}
function kb(a, b) {
if (n(lb.a ? lb.a(a, b) : lb.call(null, a, b))) {
return 0;
}
var c = qa(a.ba);
if (n(c ? b.ba : c)) {
return-1;
}
if (n(a.ba)) {
if (qa(b.ba)) {
return 1;
}
c = mb.a ? mb.a(a.ba, b.ba) : mb.call(null, a.ba, b.ba);
return 0 === c ? mb.a ? mb.a(a.name, b.name) : mb.call(null, a.name, b.name) : c;
}
return nb ? mb.a ? mb.a(a.name, b.name) : mb.call(null, a.name, b.name) : null;
}
function H(a) {
if (null == a) {
return null;
}
if (a && (a.f & 8388608 || a.Ab)) {
return a.B(null);
}
if (a instanceof Array || "string" === typeof a) {
return 0 === a.length ? null : new ob(a, 0);
}
if (r(Wa, a)) {
return Xa(a);
}
if (t) {
throw Error([v(a), v("is not ISeqable")].join(""));
}
return null;
}
function I(a) {
if (null == a) {
return null;
}
if (a && (a.f & 64 || a.Ea)) {
return a.P(null);
}
a = H(a);
return null == a ? null : A(a);
}
function J(a) {
return null != a ? a && (a.f & 64 || a.Ea) ? a.R(null) : (a = H(a)) ? B(a) : K : K;
}
function L(a) {
return null == a ? null : a && (a.f & 128 || a.fb) ? a.U(null) : H(J(a));
}
var lb = function() {
function a(a, b) {
return null == a ? null == b : a === b || Ua(a, b);
}
var b = null, c = function() {
function a(b, d, l) {
var m = null;
2 < arguments.length && (m = M(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, b, d, m);
}
function c(a, d, e) {
for (;;) {
if (b.a(a, d)) {
if (L(e)) {
a = d, d = I(e), e = L(e);
} else {
return b.a(d, I(e));
}
} else {
return!1;
}
}
}
a.o = 2;
a.k = function(a) {
var b = I(a);
a = L(a);
var d = I(a);
a = J(a);
return c(b, d, a);
};
a.i = c;
return a;
}(), b = function(b, e, g) {
switch(arguments.length) {
case 1:
return!0;
case 2:
return a.call(this, b, e);
default:
return c.i(b, e, M(arguments, 2));
}
throw Error("Invalid arity: " + arguments.length);
};
b.o = 2;
b.k = c.k;
b.d = function() {
return!0;
};
b.a = a;
b.i = c.i;
return b;
}();
wa["null"] = !0;
y["null"] = function() {
return 0;
};
Date.prototype.t = function(a, b) {
return b instanceof Date && this.toString() === b.toString();
};
Ua.number = function(a, b) {
return a === b;
};
Oa["function"] = !0;
Pa["function"] = function() {
return null;
};
va["function"] = !0;
Va._ = function(a) {
return a[aa] || (a[aa] = ++ba);
};
var pb = function() {
function a(a, b, c, d) {
for (var m = y(a);;) {
if (d < m) {
c = b.a ? b.a(c, z.a(a, d)) : b.call(null, c, z.a(a, d)), d += 1;
} else {
return c;
}
}
}
function b(a, b, c) {
for (var d = y(a), m = 0;;) {
if (m < d) {
c = b.a ? b.a(c, z.a(a, m)) : b.call(null, c, z.a(a, m)), m += 1;
} else {
return c;
}
}
}
function c(a, b) {
var c = y(a);
if (0 === c) {
return b.s ? b.s() : b.call(null);
}
for (var d = z.a(a, 0), m = 1;;) {
if (m < c) {
d = b.a ? b.a(d, z.a(a, m)) : b.call(null, d, z.a(a, m)), m += 1;
} else {
return d;
}
}
}
var d = null, d = function(d, g, h, l) {
switch(arguments.length) {
case 2:
return c.call(this, d, g);
case 3:
return b.call(this, d, g, h);
case 4:
return a.call(this, d, g, h, l);
}
throw Error("Invalid arity: " + arguments.length);
};
d.a = c;
d.c = b;
d.l = a;
return d;
}(), qb = function() {
function a(a, b, c, d) {
for (var m = a.length;;) {
if (d < m) {
c = b.a ? b.a(c, a[d]) : b.call(null, c, a[d]), d += 1;
} else {
return c;
}
}
}
function b(a, b, c) {
for (var d = a.length, m = 0;;) {
if (m < d) {
c = b.a ? b.a(c, a[m]) : b.call(null, c, a[m]), m += 1;
} else {
return c;
}
}
}
function c(a, b) {
var c = a.length;
if (0 === a.length) {
return b.s ? b.s() : b.call(null);
}
for (var d = a[0], m = 1;;) {
if (m < c) {
d = b.a ? b.a(d, a[m]) : b.call(null, d, a[m]), m += 1;
} else {
return d;
}
}
}
var d = null, d = function(d, g, h, l) {
switch(arguments.length) {
case 2:
return c.call(this, d, g);
case 3:
return b.call(this, d, g, h);
case 4:
return a.call(this, d, g, h, l);
}
throw Error("Invalid arity: " + arguments.length);
};
d.a = c;
d.c = b;
d.l = a;
return d;
}();
function rb(a) {
return a ? a.f & 2 || a.mb ? !0 : a.f ? !1 : r(wa, a) : r(wa, a);
}
function sb(a) {
return a ? a.f & 16 || a.cb ? !0 : a.f ? !1 : r(za, a) : r(za, a);
}
function ob(a, b) {
this.b = a;
this.j = b;
this.n = 0;
this.f = 166199550;
}
f = ob.prototype;
f.v = function() {
return tb.d ? tb.d(this) : tb.call(null, this);
};
f.U = function() {
return this.j + 1 < this.b.length ? new ob(this.b, this.j + 1) : null;
};
f.D = function(a, b) {
return N.a ? N.a(b, this) : N.call(null, b, this);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return qb.l(this.b, b, this.b[this.j], this.j + 1);
};
f.M = function(a, b, c) {
return qb.l(this.b, b, c, this.j);
};
f.B = function() {
return this;
};
f.F = function() {
return this.b.length - this.j;
};
f.P = function() {
return this.b[this.j];
};
f.R = function() {
return this.j + 1 < this.b.length ? new ob(this.b, this.j + 1) : K;
};
f.t = function(a, b) {
return P.a ? P.a(this, b) : P.call(null, this, b);
};
f.Q = function(a, b) {
var c = b + this.j;
return c < this.b.length ? this.b[c] : null;
};
f.T = function(a, b, c) {
a = b + this.j;
return a < this.b.length ? this.b[a] : c;
};
f.H = function() {
return K;
};
var ub = function() {
function a(a, b) {
return b < a.length ? new ob(a, b) : null;
}
function b(a) {
return c.a(a, 0);
}
var c = null, c = function(c, e) {
switch(arguments.length) {
case 1:
return b.call(this, c);
case 2:
return a.call(this, c, e);
}
throw Error("Invalid arity: " + arguments.length);
};
c.d = b;
c.a = a;
return c;
}(), M = function() {
function a(a, b) {
return ub.a(a, b);
}
function b(a) {
return ub.a(a, 0);
}
var c = null, c = function(c, e) {
switch(arguments.length) {
case 1:
return b.call(this, c);
case 2:
return a.call(this, c, e);
}
throw Error("Invalid arity: " + arguments.length);
};
c.d = b;
c.a = a;
return c;
}();
Ua._ = function(a, b) {
return a === b;
};
var vb = function() {
function a(a, b) {
return null != a ? ya(a, b) : ya(K, b);
}
var b = null, c = function() {
function a(b, d, l) {
var m = null;
2 < arguments.length && (m = M(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, b, d, m);
}
function c(a, d, e) {
for (;;) {
if (n(e)) {
a = b.a(a, d), d = I(e), e = L(e);
} else {
return b.a(a, d);
}
}
}
a.o = 2;
a.k = function(a) {
var b = I(a);
a = L(a);
var d = I(a);
a = J(a);
return c(b, d, a);
};
a.i = c;
return a;
}(), b = function(b, e, g) {
switch(arguments.length) {
case 2:
return a.call(this, b, e);
default:
return c.i(b, e, M(arguments, 2));
}
throw Error("Invalid arity: " + arguments.length);
};
b.o = 2;
b.k = c.k;
b.a = a;
b.i = c.i;
return b;
}();
function Q(a) {
if (null != a) {
if (a && (a.f & 2 || a.mb)) {
a = a.F(null);
} else {
if (a instanceof Array) {
a = a.length;
} else {
if ("string" === typeof a) {
a = a.length;
} else {
if (r(wa, a)) {
a = y(a);
} else {
if (t) {
a: {
a = H(a);
for (var b = 0;;) {
if (rb(a)) {
a = b + y(a);
break a;
}
a = L(a);
b += 1;
}
a = void 0;
}
} else {
a = null;
}
}
}
}
}
} else {
a = 0;
}
return a;
}
var wb = function() {
function a(a, b, c) {
for (;;) {
if (null == a) {
return c;
}
if (0 === b) {
return H(a) ? I(a) : c;
}
if (sb(a)) {
return z.c(a, b, c);
}
if (H(a)) {
a = L(a), b -= 1;
} else {
return t ? c : null;
}
}
}
function b(a, b) {
for (;;) {
if (null == a) {
throw Error("Index out of bounds");
}
if (0 === b) {
if (H(a)) {
return I(a);
}
throw Error("Index out of bounds");
}
if (sb(a)) {
return z.a(a, b);
}
if (H(a)) {
var c = L(a), h = b - 1;
a = c;
b = h;
} else {
if (t) {
throw Error("Index out of bounds");
}
return null;
}
}
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}(), xb = function() {
function a(a, b, c) {
if (null != a) {
if (a && (a.f & 16 || a.cb)) {
return a.T(null, b, c);
}
if (a instanceof Array || "string" === typeof a) {
return b < a.length ? a[b] : c;
}
if (r(za, a)) {
return z.a(a, b);
}
if (t) {
if (a ? a.f & 64 || a.Ea || (a.f ? 0 : r(Aa, a)) : r(Aa, a)) {
return wb.c(a, b, c);
}
throw Error([v("nth not supported on this type "), v(sa(ra(a)))].join(""));
}
return null;
}
return c;
}
function b(a, b) {
if (null == a) {
return null;
}
if (a && (a.f & 16 || a.cb)) {
return a.Q(null, b);
}
if (a instanceof Array || "string" === typeof a) {
return b < a.length ? a[b] : null;
}
if (r(za, a)) {
return z.a(a, b);
}
if (t) {
if (a ? a.f & 64 || a.Ea || (a.f ? 0 : r(Aa, a)) : r(Aa, a)) {
return wb.a(a, b);
}
throw Error([v("nth not supported on this type "), v(sa(ra(a)))].join(""));
}
return null;
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}(), yb = function() {
function a(a, b, c) {
return null != a ? a && (a.f & 256 || a.nb) ? a.A(null, b, c) : a instanceof Array ? b < a.length ? a[b] : c : "string" === typeof a ? b < a.length ? a[b] : c : r(Da, a) ? C.c(a, b, c) : t ? c : null : c;
}
function b(a, b) {
return null == a ? null : a && (a.f & 256 || a.nb) ? a.w(null, b) : a instanceof Array ? b < a.length ? a[b] : null : "string" === typeof a ? b < a.length ? a[b] : null : r(Da, a) ? C.a(a, b) : null;
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}(), Ab = function() {
function a(a, b, c) {
return null != a ? Fa(a, b, c) : zb.a ? zb.a([b], [c]) : zb.call(null, [b], [c]);
}
var b = null, c = function() {
function a(b, d, l, m) {
var p = null;
3 < arguments.length && (p = M(Array.prototype.slice.call(arguments, 3), 0));
return c.call(this, b, d, l, p);
}
function c(a, d, e, m) {
for (;;) {
if (a = b.c(a, d, e), n(m)) {
d = I(m), e = I(L(m)), m = L(L(m));
} else {
return a;
}
}
}
a.o = 3;
a.k = function(a) {
var b = I(a);
a = L(a);
var d = I(a);
a = L(a);
var m = I(a);
a = J(a);
return c(b, d, m, a);
};
a.i = c;
return a;
}(), b = function(b, e, g, h) {
switch(arguments.length) {
case 3:
return a.call(this, b, e, g);
default:
return c.i(b, e, g, M(arguments, 3));
}
throw Error("Invalid arity: " + arguments.length);
};
b.o = 3;
b.k = c.k;
b.c = a;
b.i = c.i;
return b;
}(), Bb = function() {
function a(a, b) {
return null == a ? null : Ha(a, b);
}
var b = null, c = function() {
function a(b, d, l) {
var m = null;
2 < arguments.length && (m = M(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, b, d, m);
}
function c(a, d, e) {
for (;;) {
if (null == a) {
return null;
}
a = b.a(a, d);
if (n(e)) {
d = I(e), e = L(e);
} else {
return a;
}
}
}
a.o = 2;
a.k = function(a) {
var b = I(a);
a = L(a);
var d = I(a);
a = J(a);
return c(b, d, a);
};
a.i = c;
return a;
}(), b = function(b, e, g) {
switch(arguments.length) {
case 1:
return b;
case 2:
return a.call(this, b, e);
default:
return c.i(b, e, M(arguments, 2));
}
throw Error("Invalid arity: " + arguments.length);
};
b.o = 2;
b.k = c.k;
b.d = function(a) {
return a;
};
b.a = a;
b.i = c.i;
return b;
}();
function Cb(a) {
var b = "function" == k(a);
return b ? b : a ? n(n(null) ? null : a.lb) ? !0 : a.Fb ? !1 : r(va, a) : r(va, a);
}
var Fb = function Db(b, c) {
return Cb(b) && !(b ? b.f & 262144 || b.Eb || (b.f ? 0 : r(Qa, b)) : r(Qa, b)) ? Db(function() {
"undefined" === typeof fa && (fa = function(b, c, g, h) {
this.g = b;
this.Ca = c;
this.vb = g;
this.tb = h;
this.n = 0;
this.f = 393217;
}, fa.jb = !0, fa.ib = "cljs.core/t5002", fa.sb = function(b) {
return E(b, "cljs.core/t5002");
}, fa.prototype.call = function() {
function b(d, h) {
d = this;
var l = null;
1 < arguments.length && (l = M(Array.prototype.slice.call(arguments, 1), 0));
return c.call(this, d, l);
}
function c(b, d) {
return Eb.a ? Eb.a(b.Ca, d) : Eb.call(null, b.Ca, d);
}
b.o = 1;
b.k = function(b) {
var d = I(b);
b = J(b);
return c(d, b);
};
b.i = c;
return b;
}(), fa.prototype.apply = function(b, c) {
return this.call.apply(this, [this].concat(w(c)));
}, fa.prototype.a = function() {
function b(d) {
var h = null;
0 < arguments.length && (h = M(Array.prototype.slice.call(arguments, 0), 0));
return c.call(this, h);
}
function c(b) {
return Eb.a ? Eb.a(self__.Ca, b) : Eb.call(null, self__.Ca, b);
}
b.o = 0;
b.k = function(b) {
b = H(b);
return c(b);
};
b.i = c;
return b;
}(), fa.prototype.lb = !0, fa.prototype.I = function() {
return this.tb;
}, fa.prototype.G = function(b, c) {
return new fa(this.g, this.Ca, this.vb, c);
});
return new fa(c, b, Db, null);
}(), c) : null == b ? null : Ra(b, c);
};
function Hb(a) {
var b = null != a;
return(b ? a ? a.f & 131072 || a.pb || (a.f ? 0 : r(Oa, a)) : r(Oa, a) : b) ? Pa(a) : null;
}
var Ib = {}, Jb = 0;
function R(a) {
if (a && (a.f & 4194304 || a.yb)) {
a = a.v(null);
} else {
if ("number" === typeof a) {
a = Math.floor(a) % 2147483647;
} else {
if (!0 === a) {
a = 1;
} else {
if (!1 === a) {
a = 0;
} else {
if ("string" === typeof a) {
255 < Jb && (Ib = {}, Jb = 0);
var b = Ib[a];
if ("number" !== typeof b) {
for (var c = b = 0;c < a.length;++c) {
b = 31 * b + a.charCodeAt(c), b %= 4294967296;
}
Ib[a] = b;
Jb += 1;
}
a = b;
} else {
a = null == a ? 0 : t ? Va(a) : null;
}
}
}
}
}
return a;
}
function Kb(a) {
return a ? a.f & 16384 || a.Db ? !0 : a.f ? !1 : r(Ma, a) : r(Ma, a);
}
function Lb(a) {
return a ? a.n & 512 || a.wb ? !0 : !1 : !1;
}
function Mb(a) {
var b = [];
ca(a, function(a, d) {
return b.push(d);
});
return b;
}
function Nb(a, b, c, d, e) {
for (;0 !== e;) {
c[d] = a[b], d += 1, e -= 1, b += 1;
}
}
var S = {};
function Ob(a) {
return n(a) ? !0 : !1;
}
function mb(a, b) {
if (a === b) {
return 0;
}
if (null == a) {
return-1;
}
if (null == b) {
return 1;
}
if (ra(a) === ra(b)) {
return a && (a.n & 2048 || a.La) ? a.Ma(null, b) : a > b ? 1 : a < b ? -1 : 0;
}
if (t) {
throw Error("compare on non-nil objects of different types");
}
return null;
}
var Pb = function() {
function a(a, b, c, h) {
for (;;) {
var l = mb(xb.a(a, h), xb.a(b, h));
if (0 === l && h + 1 < c) {
h += 1;
} else {
return l;
}
}
}
function b(a, b) {
var g = Q(a), h = Q(b);
return g < h ? -1 : g > h ? 1 : t ? c.l(a, b, g, 0) : null;
}
var c = null, c = function(c, e, g, h) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 4:
return a.call(this, c, e, g, h);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.l = a;
return c;
}(), U = function() {
function a(a, b, c) {
for (c = H(c);;) {
if (c) {
b = a.a ? a.a(b, I(c)) : a.call(null, b, I(c)), c = L(c);
} else {
return b;
}
}
}
function b(a, b) {
var c = H(b);
return c ? ta.c ? ta.c(a, I(c), L(c)) : ta.call(null, a, I(c), L(c)) : a.s ? a.s() : a.call(null);
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}(), ta = function() {
function a(a, b, c) {
return c && (c.f & 524288 || c.rb) ? c.M(null, a, b) : c instanceof Array ? qb.c(c, a, b) : "string" === typeof c ? qb.c(c, a, b) : r(Sa, c) ? Ta.c(c, a, b) : t ? U.c(a, b, c) : null;
}
function b(a, b) {
return b && (b.f & 524288 || b.rb) ? b.L(null, a) : b instanceof Array ? qb.a(b, a) : "string" === typeof b ? qb.a(b, a) : r(Sa, b) ? Ta.a(b, a) : t ? U.a(a, b) : null;
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}();
function Qb(a) {
return 0 <= a ? Math.floor.d ? Math.floor.d(a) : Math.floor.call(null, a) : Math.ceil.d ? Math.ceil.d(a) : Math.ceil.call(null, a);
}
var Rb = function() {
function a(a) {
return a * c.s();
}
function b() {
return Math.random.s ? Math.random.s() : Math.random.call(null);
}
var c = null, c = function(c) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return a.call(this, c);
}
throw Error("Invalid arity: " + arguments.length);
};
c.s = b;
c.d = a;
return c;
}();
function Sb(a) {
a -= a >> 1 & 1431655765;
a = (a & 858993459) + (a >> 2 & 858993459);
return 16843009 * (a + (a >> 4) & 252645135) >> 24;
}
var v = function() {
function a(a) {
return null == a ? "" : a.toString();
}
var b = null, c = function() {
function a(b, d) {
var l = null;
1 < arguments.length && (l = M(Array.prototype.slice.call(arguments, 1), 0));
return c.call(this, b, l);
}
function c(a, d) {
for (var e = new da(b.d(a)), m = d;;) {
if (n(m)) {
e = e.append(b.d(I(m))), m = L(m);
} else {
return e.toString();
}
}
}
a.o = 1;
a.k = function(a) {
var b = I(a);
a = J(a);
return c(b, a);
};
a.i = c;
return a;
}(), b = function(b, e) {
switch(arguments.length) {
case 0:
return "";
case 1:
return a.call(this, b);
default:
return c.i(b, M(arguments, 1));
}
throw Error("Invalid arity: " + arguments.length);
};
b.o = 1;
b.k = c.k;
b.s = function() {
return "";
};
b.d = a;
b.i = c.i;
return b;
}();
function P(a, b) {
return Ob((b ? b.f & 16777216 || b.Bb || (b.f ? 0 : r(Ya, b)) : r(Ya, b)) ? function() {
for (var c = H(a), d = H(b);;) {
if (null == c) {
return null == d;
}
if (null == d) {
return!1;
}
if (lb.a(I(c), I(d))) {
c = L(c), d = L(d);
} else {
return t ? !1 : null;
}
}
}() : null);
}
function Tb(a, b) {
return a ^ b + 2654435769 + (a << 6) + (a >> 2);
}
function tb(a) {
if (H(a)) {
var b = R(I(a));
for (a = L(a);;) {
if (null == a) {
return b;
}
b = Tb(b, R(I(a)));
a = L(a);
}
} else {
return 0;
}
}
function Ub(a) {
var b = 0;
for (a = H(a);;) {
if (a) {
var c = I(a), b = (b + (R(Vb.d ? Vb.d(c) : Vb.call(null, c)) ^ R(Wb.d ? Wb.d(c) : Wb.call(null, c)))) % 4503599627370496;
a = L(a);
} else {
return b;
}
}
}
function Xb(a, b, c, d, e) {
this.g = a;
this.za = b;
this.ia = c;
this.count = d;
this.h = e;
this.n = 0;
this.f = 65937646;
}
f = Xb.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.U = function() {
return 1 === this.count ? null : this.ia;
};
f.D = function(a, b) {
return new Xb(this.g, b, this, this.count + 1, null);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return U.a(b, this);
};
f.M = function(a, b, c) {
return U.c(b, c, this);
};
f.B = function() {
return this;
};
f.F = function() {
return this.count;
};
f.P = function() {
return this.za;
};
f.R = function() {
return 1 === this.count ? K : this.ia;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new Xb(b, this.za, this.ia, this.count, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return K;
};
function Yb(a) {
this.g = a;
this.n = 0;
this.f = 65937614;
}
f = Yb.prototype;
f.v = function() {
return 0;
};
f.U = function() {
return null;
};
f.D = function(a, b) {
return new Xb(this.g, b, null, 1, null);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return U.a(b, this);
};
f.M = function(a, b, c) {
return U.c(b, c, this);
};
f.B = function() {
return null;
};
f.F = function() {
return 0;
};
f.P = function() {
return null;
};
f.R = function() {
return K;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new Yb(b);
};
f.I = function() {
return this.g;
};
f.H = function() {
return this;
};
var K = new Yb(null);
function Zb(a, b, c, d) {
this.g = a;
this.za = b;
this.ia = c;
this.h = d;
this.n = 0;
this.f = 65929452;
}
f = Zb.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.U = function() {
return null == this.ia ? null : H(this.ia);
};
f.D = function(a, b) {
return new Zb(null, b, this, this.h);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return U.a(b, this);
};
f.M = function(a, b, c) {
return U.c(b, c, this);
};
f.B = function() {
return this;
};
f.P = function() {
return this.za;
};
f.R = function() {
return null == this.ia ? K : this.ia;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new Zb(b, this.za, this.ia, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return Fb(K, this.g);
};
function N(a, b) {
var c = null == b;
return(c ? c : b && (b.f & 64 || b.Ea)) ? new Zb(null, a, b, null) : new Zb(null, a, H(b), null);
}
function V(a, b, c, d) {
this.ba = a;
this.name = b;
this.la = c;
this.Fa = d;
this.f = 2153775105;
this.n = 4096;
}
f = V.prototype;
f.u = function(a, b) {
return E(b, [v(":"), v(this.la)].join(""));
};
f.v = function() {
null == this.Fa && (this.Fa = Tb(R(this.ba), R(this.name)) + 2654435769);
return this.Fa;
};
f.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return yb.a(c, this);
case 3:
return yb.c(c, this, d);
}
throw Error("Invalid arity: " + arguments.length);
};
}();
f.apply = function(a, b) {
return this.call.apply(this, [this].concat(w(b)));
};
f.d = function(a) {
return yb.a(a, this);
};
f.a = function(a, b) {
return yb.c(a, this, b);
};
f.t = function(a, b) {
return b instanceof V ? this.la === b.la : !1;
};
f.toString = function() {
return[v(":"), v(this.la)].join("");
};
function $b(a, b) {
return a === b ? !0 : a instanceof V && b instanceof V ? a.la === b.la : !1;
}
var ac = function() {
function a(a, b) {
return new V(a, b, [v(n(a) ? [v(a), v("/")].join("") : null), v(b)].join(""), null);
}
function b(a) {
var b;
return a instanceof V ? a : "string" === typeof a ? (b = a.split("/"), 2 === b.length ? new V(b[0], b[1], a, null) : new V(null, b[0], a, null)) : null;
}
var c = null, c = function(c, e) {
switch(arguments.length) {
case 1:
return b.call(this, c);
case 2:
return a.call(this, c, e);
}
throw Error("Invalid arity: " + arguments.length);
};
c.d = b;
c.a = a;
return c;
}();
function bc(a, b, c, d) {
this.g = a;
this.sa = b;
this.q = c;
this.h = d;
this.n = 0;
this.f = 32374988;
}
f = bc.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.U = function() {
Xa(this);
return null == this.q ? null : L(this.q);
};
f.D = function(a, b) {
return N(b, this);
};
f.toString = function() {
return G(this);
};
function cc(a) {
null != a.sa && (a.q = a.sa.s ? a.sa.s() : a.sa.call(null), a.sa = null);
return a.q;
}
f.L = function(a, b) {
return U.a(b, this);
};
f.M = function(a, b, c) {
return U.c(b, c, this);
};
f.B = function() {
cc(this);
if (null == this.q) {
return null;
}
for (var a = this.q;;) {
if (a instanceof bc) {
a = cc(a);
} else {
return this.q = a, H(this.q);
}
}
};
f.P = function() {
Xa(this);
return null == this.q ? null : I(this.q);
};
f.R = function() {
Xa(this);
return null != this.q ? J(this.q) : K;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new bc(b, this.sa, this.q, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return Fb(K, this.g);
};
function dc(a, b) {
this.Ga = a;
this.end = b;
this.n = 0;
this.f = 2;
}
dc.prototype.F = function() {
return this.end;
};
dc.prototype.add = function(a) {
this.Ga[this.end] = a;
return this.end += 1;
};
dc.prototype.X = function() {
var a = new ec(this.Ga, 0, this.end);
this.Ga = null;
return a;
};
function ec(a, b, c) {
this.b = a;
this.r = b;
this.end = c;
this.n = 0;
this.f = 524306;
}
f = ec.prototype;
f.L = function(a, b) {
return qb.l(this.b, b, this.b[this.r], this.r + 1);
};
f.M = function(a, b, c) {
return qb.l(this.b, b, c, this.r);
};
f.bb = function() {
if (this.r === this.end) {
throw Error("-drop-first of empty chunk");
}
return new ec(this.b, this.r + 1, this.end);
};
f.Q = function(a, b) {
return this.b[this.r + b];
};
f.T = function(a, b, c) {
return 0 <= b && b < this.end - this.r ? this.b[this.r + b] : c;
};
f.F = function() {
return this.end - this.r;
};
var fc = function() {
function a(a, b, c) {
return new ec(a, b, c);
}
function b(a, b) {
return new ec(a, b, a.length);
}
function c(a) {
return new ec(a, 0, a.length);
}
var d = null, d = function(d, g, h) {
switch(arguments.length) {
case 1:
return c.call(this, d);
case 2:
return b.call(this, d, g);
case 3:
return a.call(this, d, g, h);
}
throw Error("Invalid arity: " + arguments.length);
};
d.d = c;
d.a = b;
d.c = a;
return d;
}();
function gc(a, b, c, d) {
this.X = a;
this.aa = b;
this.g = c;
this.h = d;
this.f = 31850732;
this.n = 1536;
}
f = gc.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.U = function() {
if (1 < y(this.X)) {
return new gc(fb(this.X), this.aa, this.g, null);
}
var a = Xa(this.aa);
return null == a ? null : a;
};
f.D = function(a, b) {
return N(b, this);
};
f.toString = function() {
return G(this);
};
f.B = function() {
return this;
};
f.P = function() {
return z.a(this.X, 0);
};
f.R = function() {
return 1 < y(this.X) ? new gc(fb(this.X), this.aa, this.g, null) : null == this.aa ? K : this.aa;
};
f.Ia = function() {
return null == this.aa ? null : this.aa;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new gc(this.X, this.aa, b, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return Fb(K, this.g);
};
f.Ja = function() {
return this.X;
};
f.Ka = function() {
return null == this.aa ? K : this.aa;
};
function hc(a, b) {
return 0 === y(a) ? b : new gc(a, b, null, null);
}
function ic(a) {
for (var b = [];;) {
if (H(a)) {
b.push(I(a)), a = L(a);
} else {
return b;
}
}
}
function jc(a, b) {
if (rb(a)) {
return Q(a);
}
for (var c = a, d = b, e = 0;;) {
if (0 < d && H(c)) {
c = L(c), d -= 1, e += 1;
} else {
return e;
}
}
}
var lc = function kc(b) {
return null == b ? null : null == L(b) ? H(I(b)) : t ? N(I(b), kc(L(b))) : null;
}, mc = function() {
function a(a, b) {
return new bc(null, function() {
var c = H(a);
return c ? Lb(c) ? hc(gb(c), d.a(hb(c), b)) : N(I(c), d.a(J(c), b)) : b;
}, null, null);
}
function b(a) {
return new bc(null, function() {
return a;
}, null, null);
}
function c() {
return new bc(null, function() {
return null;
}, null, null);
}
var d = null, e = function() {
function a(c, d, e) {
var g = null;
2 < arguments.length && (g = M(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, c, d, g);
}
function b(a, c, e) {
return function s(a, b) {
return new bc(null, function() {
var c = H(a);
return c ? Lb(c) ? hc(gb(c), s(hb(c), b)) : N(I(c), s(J(c), b)) : n(b) ? s(I(b), L(b)) : null;
}, null, null);
}(d.a(a, c), e);
}
a.o = 2;
a.k = function(a) {
var c = I(a);
a = L(a);
var d = I(a);
a = J(a);
return b(c, d, a);
};
a.i = b;
return a;
}(), d = function(d, h, l) {
switch(arguments.length) {
case 0:
return c.call(this);
case 1:
return b.call(this, d);
case 2:
return a.call(this, d, h);
default:
return e.i(d, h, M(arguments, 2));
}
throw Error("Invalid arity: " + arguments.length);
};
d.o = 2;
d.k = e.k;
d.s = c;
d.d = b;
d.a = a;
d.i = e.i;
return d;
}(), nc = function() {
function a(a, b, c, d) {
return N(a, N(b, N(c, d)));
}
function b(a, b, c) {
return N(a, N(b, c));
}
var c = null, d = function() {
function a(c, d, e, p, q) {
var s = null;
4 < arguments.length && (s = M(Array.prototype.slice.call(arguments, 4), 0));
return b.call(this, c, d, e, p, s);
}
function b(a, c, d, e, g) {
return N(a, N(c, N(d, N(e, lc(g)))));
}
a.o = 4;
a.k = function(a) {
var c = I(a);
a = L(a);
var d = I(a);
a = L(a);
var e = I(a);
a = L(a);
var q = I(a);
a = J(a);
return b(c, d, e, q, a);
};
a.i = b;
return a;
}(), c = function(c, g, h, l, m) {
switch(arguments.length) {
case 1:
return H(c);
case 2:
return N(c, g);
case 3:
return b.call(this, c, g, h);
case 4:
return a.call(this, c, g, h, l);
default:
return d.i(c, g, h, l, M(arguments, 4));
}
throw Error("Invalid arity: " + arguments.length);
};
c.o = 4;
c.k = d.k;
c.d = function(a) {
return H(a);
};
c.a = function(a, b) {
return N(a, b);
};
c.c = b;
c.l = a;
c.i = d.i;
return c;
}();
function oc(a) {
return cb(a);
}
function pc(a, b, c) {
var d = H(c);
if (0 === b) {
return a.s ? a.s() : a.call(null);
}
c = A(d);
var e = B(d);
if (1 === b) {
return a.d ? a.d(c) : a.d ? a.d(c) : a.call(null, c);
}
var d = A(e), g = B(e);
if (2 === b) {
return a.a ? a.a(c, d) : a.a ? a.a(c, d) : a.call(null, c, d);
}
var e = A(g), h = B(g);
if (3 === b) {
return a.c ? a.c(c, d, e) : a.c ? a.c(c, d, e) : a.call(null, c, d, e);
}
var g = A(h), l = B(h);
if (4 === b) {
return a.l ? a.l(c, d, e, g) : a.l ? a.l(c, d, e, g) : a.call(null, c, d, e, g);
}
h = A(l);
l = B(l);
if (5 === b) {
return a.O ? a.O(c, d, e, g, h) : a.O ? a.O(c, d, e, g, h) : a.call(null, c, d, e, g, h);
}
a = A(l);
var m = B(l);
if (6 === b) {
return a.fa ? a.fa(c, d, e, g, h, a) : a.fa ? a.fa(c, d, e, g, h, a) : a.call(null, c, d, e, g, h, a);
}
var l = A(m), p = B(m);
if (7 === b) {
return a.pa ? a.pa(c, d, e, g, h, a, l) : a.pa ? a.pa(c, d, e, g, h, a, l) : a.call(null, c, d, e, g, h, a, l);
}
var m = A(p), q = B(p);
if (8 === b) {
return a.Ya ? a.Ya(c, d, e, g, h, a, l, m) : a.Ya ? a.Ya(c, d, e, g, h, a, l, m) : a.call(null, c, d, e, g, h, a, l, m);
}
var p = A(q), s = B(q);
if (9 === b) {
return a.Za ? a.Za(c, d, e, g, h, a, l, m, p) : a.Za ? a.Za(c, d, e, g, h, a, l, m, p) : a.call(null, c, d, e, g, h, a, l, m, p);
}
var q = A(s), x = B(s);
if (10 === b) {
return a.Na ? a.Na(c, d, e, g, h, a, l, m, p, q) : a.Na ? a.Na(c, d, e, g, h, a, l, m, p, q) : a.call(null, c, d, e, g, h, a, l, m, p, q);
}
var s = A(x), D = B(x);
if (11 === b) {
return a.Oa ? a.Oa(c, d, e, g, h, a, l, m, p, q, s) : a.Oa ? a.Oa(c, d, e, g, h, a, l, m, p, q, s) : a.call(null, c, d, e, g, h, a, l, m, p, q, s);
}
var x = A(D), F = B(D);
if (12 === b) {
return a.Pa ? a.Pa(c, d, e, g, h, a, l, m, p, q, s, x) : a.Pa ? a.Pa(c, d, e, g, h, a, l, m, p, q, s, x) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x);
}
var D = A(F), O = B(F);
if (13 === b) {
return a.Qa ? a.Qa(c, d, e, g, h, a, l, m, p, q, s, x, D) : a.Qa ? a.Qa(c, d, e, g, h, a, l, m, p, q, s, x, D) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x, D);
}
var F = A(O), T = B(O);
if (14 === b) {
return a.Ra ? a.Ra(c, d, e, g, h, a, l, m, p, q, s, x, D, F) : a.Ra ? a.Ra(c, d, e, g, h, a, l, m, p, q, s, x, D, F) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x, D, F);
}
var O = A(T), ea = B(T);
if (15 === b) {
return a.Sa ? a.Sa(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O) : a.Sa ? a.Sa(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x, D, F, O);
}
var T = A(ea), la = B(ea);
if (16 === b) {
return a.Ta ? a.Ta(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T) : a.Ta ? a.Ta(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T);
}
var ea = A(la), Ca = B(la);
if (17 === b) {
return a.Ua ? a.Ua(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea) : a.Ua ? a.Ua(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea);
}
var la = A(Ca), Gb = B(Ca);
if (18 === b) {
return a.Va ? a.Va(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la) : a.Va ? a.Va(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la);
}
Ca = A(Gb);
Gb = B(Gb);
if (19 === b) {
return a.Wa ? a.Wa(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la, Ca) : a.Wa ? a.Wa(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la, Ca) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la, Ca);
}
var tc = A(Gb);
B(Gb);
if (20 === b) {
return a.Xa ? a.Xa(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la, Ca, tc) : a.Xa ? a.Xa(c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la, Ca, tc) : a.call(null, c, d, e, g, h, a, l, m, p, q, s, x, D, F, O, T, ea, la, Ca, tc);
}
throw Error("Only up to 20 arguments supported on functions");
}
var Eb = function() {
function a(a, b, c, d, e) {
b = nc.l(b, c, d, e);
c = a.o;
return a.k ? (d = jc(b, c + 1), d <= c ? pc(a, d, b) : a.k(b)) : a.apply(a, ic(b));
}
function b(a, b, c, d) {
b = nc.c(b, c, d);
c = a.o;
return a.k ? (d = jc(b, c + 1), d <= c ? pc(a, d, b) : a.k(b)) : a.apply(a, ic(b));
}
function c(a, b, c) {
b = nc.a(b, c);
c = a.o;
if (a.k) {
var d = jc(b, c + 1);
return d <= c ? pc(a, d, b) : a.k(b);
}
return a.apply(a, ic(b));
}
function d(a, b) {
var c = a.o;
if (a.k) {
var d = jc(b, c + 1);
return d <= c ? pc(a, d, b) : a.k(b);
}
return a.apply(a, ic(b));
}
var e = null, g = function() {
function a(c, d, e, g, h, D) {
var F = null;
5 < arguments.length && (F = M(Array.prototype.slice.call(arguments, 5), 0));
return b.call(this, c, d, e, g, h, F);
}
function b(a, c, d, e, g, h) {
c = N(c, N(d, N(e, N(g, lc(h)))));
d = a.o;
return a.k ? (e = jc(c, d + 1), e <= d ? pc(a, e, c) : a.k(c)) : a.apply(a, ic(c));
}
a.o = 5;
a.k = function(a) {
var c = I(a);
a = L(a);
var d = I(a);
a = L(a);
var e = I(a);
a = L(a);
var g = I(a);
a = L(a);
var h = I(a);
a = J(a);
return b(c, d, e, g, h, a);
};
a.i = b;
return a;
}(), e = function(e, l, m, p, q, s) {
switch(arguments.length) {
case 2:
return d.call(this, e, l);
case 3:
return c.call(this, e, l, m);
case 4:
return b.call(this, e, l, m, p);
case 5:
return a.call(this, e, l, m, p, q);
default:
return g.i(e, l, m, p, q, M(arguments, 5));
}
throw Error("Invalid arity: " + arguments.length);
};
e.o = 5;
e.k = g.k;
e.a = d;
e.c = c;
e.l = b;
e.O = a;
e.i = g.i;
return e;
}();
function qc(a, b) {
for (;;) {
if (null == H(b)) {
return!0;
}
if (n(a.d ? a.d(I(b)) : a.call(null, I(b)))) {
var c = a, d = L(b);
a = c;
b = d;
} else {
return t ? !1 : null;
}
}
}
function rc(a) {
return a;
}
var sc = function() {
function a(a, b, c, e) {
return new bc(null, function() {
var p = H(b), q = H(c), s = H(e);
return p && q && s ? N(a.c ? a.c(I(p), I(q), I(s)) : a.call(null, I(p), I(q), I(s)), d.l(a, J(p), J(q), J(s))) : null;
}, null, null);
}
function b(a, b, c) {
return new bc(null, function() {
var e = H(b), p = H(c);
return e && p ? N(a.a ? a.a(I(e), I(p)) : a.call(null, I(e), I(p)), d.c(a, J(e), J(p))) : null;
}, null, null);
}
function c(a, b) {
return new bc(null, function() {
var c = H(b);
if (c) {
if (Lb(c)) {
for (var e = gb(c), p = Q(e), q = new dc(Array(p), 0), s = 0;;) {
if (s < p) {
var x = a.d ? a.d(z.a(e, s)) : a.call(null, z.a(e, s));
q.add(x);
s += 1;
} else {
break;
}
}
return hc(q.X(), d.a(a, hb(c)));
}
return N(a.d ? a.d(I(c)) : a.call(null, I(c)), d.a(a, J(c)));
}
return null;
}, null, null);
}
var d = null, e = function() {
function a(c, d, e, g, s) {
var x = null;
4 < arguments.length && (x = M(Array.prototype.slice.call(arguments, 4), 0));
return b.call(this, c, d, e, g, x);
}
function b(a, c, e, g, h) {
return d.a(function(b) {
return Eb.a(a, b);
}, function D(a) {
return new bc(null, function() {
var b = d.a(H, a);
return qc(rc, b) ? N(d.a(I, b), D(d.a(J, b))) : null;
}, null, null);
}(vb.i(h, g, M([e, c], 0))));
}
a.o = 4;
a.k = function(a) {
var c = I(a);
a = L(a);
var d = I(a);
a = L(a);
var e = I(a);
a = L(a);
var g = I(a);
a = J(a);
return b(c, d, e, g, a);
};
a.i = b;
return a;
}(), d = function(d, h, l, m, p) {
switch(arguments.length) {
case 2:
return c.call(this, d, h);
case 3:
return b.call(this, d, h, l);
case 4:
return a.call(this, d, h, l, m);
default:
return e.i(d, h, l, m, M(arguments, 4));
}
throw Error("Invalid arity: " + arguments.length);
};
d.o = 4;
d.k = e.k;
d.a = c;
d.c = b;
d.l = a;
d.i = e.i;
return d;
}();
function uc(a, b) {
return null != a ? a && (a.n & 4 || a.xb) ? oc(ta.c(bb, ab(a), b)) : ta.c(ya, a, b) : ta.c(vb, K, b);
}
var wc = function() {
function a(a, b, c, d) {
return uc(vc, sc.l(a, b, c, d));
}
function b(a, b, c) {
return uc(vc, sc.c(a, b, c));
}
function c(a, b) {
return oc(ta.c(function(b, c) {
var d = a.d ? a.d(c) : a.call(null, c);
return bb(b, d);
}, ab(vc), b));
}
var d = null, e = function() {
function a(c, d, e, g, s) {
var x = null;
4 < arguments.length && (x = M(Array.prototype.slice.call(arguments, 4), 0));
return b.call(this, c, d, e, g, x);
}
function b(a, c, d, e, g) {
return uc(vc, Eb.i(sc, a, c, d, e, M([g], 0)));
}
a.o = 4;
a.k = function(a) {
var c = I(a);
a = L(a);
var d = I(a);
a = L(a);
var e = I(a);
a = L(a);
var g = I(a);
a = J(a);
return b(c, d, e, g, a);
};
a.i = b;
return a;
}(), d = function(d, h, l, m, p) {
switch(arguments.length) {
case 2:
return c.call(this, d, h);
case 3:
return b.call(this, d, h, l);
case 4:
return a.call(this, d, h, l, m);
default:
return e.i(d, h, l, m, M(arguments, 4));
}
throw Error("Invalid arity: " + arguments.length);
};
d.o = 4;
d.k = e.k;
d.a = c;
d.c = b;
d.l = a;
d.i = e.i;
return d;
}();
function xc(a, b) {
this.m = a;
this.b = b;
}
function yc(a) {
return new xc(a, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]);
}
function zc(a) {
a = a.e;
return 32 > a ? 0 : a - 1 >>> 5 << 5;
}
function Ac(a, b, c) {
for (;;) {
if (0 === b) {
return c;
}
var d = yc(a);
d.b[0] = c;
c = d;
b -= 5;
}
}
var Cc = function Bc(b, c, d, e) {
var g = new xc(d.m, w(d.b)), h = b.e - 1 >>> c & 31;
5 === c ? g.b[h] = e : (d = d.b[h], b = null != d ? Bc(b, c - 5, d, e) : Ac(null, c - 5, e), g.b[h] = b);
return g;
};
function Dc(a, b) {
throw Error([v("No item "), v(a), v(" in vector of length "), v(b)].join(""));
}
function Ec(a, b) {
if (0 <= b && b < a.e) {
if (b >= zc(a)) {
return a.K;
}
for (var c = a.root, d = a.shift;;) {
if (0 < d) {
var e = d - 5, c = c.b[b >>> d & 31], d = e
} else {
return c.b;
}
}
} else {
return Dc(b, a.e);
}
}
var Gc = function Fc(b, c, d, e, g) {
var h = new xc(d.m, w(d.b));
if (0 === c) {
h.b[e & 31] = g;
} else {
var l = e >>> c & 31;
b = Fc(b, c - 5, d.b[l], e, g);
h.b[l] = b;
}
return h;
};
function W(a, b, c, d, e, g) {
this.g = a;
this.e = b;
this.shift = c;
this.root = d;
this.K = e;
this.h = g;
this.n = 4;
this.f = 167668511;
}
f = W.prototype;
f.va = function() {
return new Hc(this.e, this.shift, Ic.d ? Ic.d(this.root) : Ic.call(null, this.root), Jc.d ? Jc.d(this.K) : Jc.call(null, this.K));
};
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.w = function(a, b) {
return z.c(this, b, null);
};
f.A = function(a, b, c) {
return z.c(this, b, c);
};
f.oa = function(a, b, c) {
if (0 <= b && b < this.e) {
return zc(this) <= b ? (a = w(this.K), a[b & 31] = c, new W(this.g, this.e, this.shift, this.root, a, null)) : new W(this.g, this.e, this.shift, Gc(this, this.shift, this.root, b, c), this.K, null);
}
if (b === this.e) {
return ya(this, c);
}
if (t) {
throw Error([v("Index "), v(b), v(" out of bounds [0,"), v(this.e), v("]")].join(""));
}
return null;
};
f.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.Q(null, c);
case 3:
return this.T(null, c, d);
}
throw Error("Invalid arity: " + arguments.length);
};
}();
f.apply = function(a, b) {
return this.call.apply(this, [this].concat(w(b)));
};
f.d = function(a) {
return this.Q(null, a);
};
f.a = function(a, b) {
return this.T(null, a, b);
};
f.D = function(a, b) {
if (32 > this.e - zc(this)) {
for (var c = this.K.length, d = Array(c + 1), e = 0;;) {
if (e < c) {
d[e] = this.K[e], e += 1;
} else {
break;
}
}
d[c] = b;
return new W(this.g, this.e + 1, this.shift, this.root, d, null);
}
c = (d = this.e >>> 5 > 1 << this.shift) ? this.shift + 5 : this.shift;
d ? (d = yc(null), d.b[0] = this.root, e = Ac(null, this.shift, new xc(null, this.K)), d.b[1] = e) : d = Cc(this, this.shift, this.root, new xc(null, this.K));
return new W(this.g, this.e + 1, c, d, [b], null);
};
f.$a = function() {
return z.a(this, 0);
};
f.eb = function() {
return z.a(this, 1);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return pb.a(this, b);
};
f.M = function(a, b, c) {
return pb.c(this, b, c);
};
f.B = function() {
return 0 === this.e ? null : 32 > this.e ? M.d(this.K) : t ? X.c ? X.c(this, 0, 0) : X.call(null, this, 0, 0) : null;
};
f.F = function() {
return this.e;
};
f.ab = function(a, b, c) {
return Fa(this, b, c);
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new W(b, this.e, this.shift, this.root, this.K, this.h);
};
f.I = function() {
return this.g;
};
f.Q = function(a, b) {
return Ec(this, b)[b & 31];
};
f.T = function(a, b, c) {
return 0 <= b && b < this.e ? z.a(this, b) : c;
};
f.H = function() {
return Fb(vc, this.g);
};
var Kc = new xc(null, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]), vc = new W(null, 0, 5, Kc, [], 0);
function Lc(a, b, c, d, e, g) {
this.C = a;
this.V = b;
this.j = c;
this.r = d;
this.g = e;
this.h = g;
this.f = 32243948;
this.n = 1536;
}
f = Lc.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.U = function() {
if (this.r + 1 < this.V.length) {
var a = X.l ? X.l(this.C, this.V, this.j, this.r + 1) : X.call(null, this.C, this.V, this.j, this.r + 1);
return null == a ? null : a;
}
return ib(this);
};
f.D = function(a, b) {
return N(b, this);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return pb.a(Mc.c ? Mc.c(this.C, this.j + this.r, Q(this.C)) : Mc.call(null, this.C, this.j + this.r, Q(this.C)), b);
};
f.M = function(a, b, c) {
return pb.c(Mc.c ? Mc.c(this.C, this.j + this.r, Q(this.C)) : Mc.call(null, this.C, this.j + this.r, Q(this.C)), b, c);
};
f.B = function() {
return this;
};
f.P = function() {
return this.V[this.r];
};
f.R = function() {
if (this.r + 1 < this.V.length) {
var a = X.l ? X.l(this.C, this.V, this.j, this.r + 1) : X.call(null, this.C, this.V, this.j, this.r + 1);
return null == a ? K : a;
}
return hb(this);
};
f.Ia = function() {
var a = this.V.length, a = this.j + a < y(this.C) ? X.c ? X.c(this.C, this.j + a, 0) : X.call(null, this.C, this.j + a, 0) : null;
return null == a ? null : a;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return X.O ? X.O(this.C, this.V, this.j, this.r, b) : X.call(null, this.C, this.V, this.j, this.r, b);
};
f.H = function() {
return Fb(vc, this.g);
};
f.Ja = function() {
return fc.a(this.V, this.r);
};
f.Ka = function() {
var a = this.V.length, a = this.j + a < y(this.C) ? X.c ? X.c(this.C, this.j + a, 0) : X.call(null, this.C, this.j + a, 0) : null;
return null == a ? K : a;
};
var X = function() {
function a(a, b, c, d, m) {
return new Lc(a, b, c, d, m, null);
}
function b(a, b, c, d) {
return new Lc(a, b, c, d, null, null);
}
function c(a, b, c) {
return new Lc(a, Ec(a, b), b, c, null, null);
}
var d = null, d = function(d, g, h, l, m) {
switch(arguments.length) {
case 3:
return c.call(this, d, g, h);
case 4:
return b.call(this, d, g, h, l);
case 5:
return a.call(this, d, g, h, l, m);
}
throw Error("Invalid arity: " + arguments.length);
};
d.c = c;
d.l = b;
d.O = a;
return d;
}();
function Nc(a, b, c, d, e) {
this.g = a;
this.ca = b;
this.start = c;
this.end = d;
this.h = e;
this.n = 0;
this.f = 32400159;
}
f = Nc.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.w = function(a, b) {
return z.c(this, b, null);
};
f.A = function(a, b, c) {
return z.c(this, b, c);
};
f.oa = function(a, b, c) {
var d = this, e = d.start + b;
return Oc.O ? Oc.O(d.g, Ab.c(d.ca, e, c), d.start, function() {
var a = d.end, b = e + 1;
return a > b ? a : b;
}(), null) : Oc.call(null, d.g, Ab.c(d.ca, e, c), d.start, function() {
var a = d.end, b = e + 1;
return a > b ? a : b;
}(), null);
};
f.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.Q(null, c);
case 3:
return this.T(null, c, d);
}
throw Error("Invalid arity: " + arguments.length);
};
}();
f.apply = function(a, b) {
return this.call.apply(this, [this].concat(w(b)));
};
f.d = function(a) {
return this.Q(null, a);
};
f.a = function(a, b) {
return this.T(null, a, b);
};
f.D = function(a, b) {
return Oc.O ? Oc.O(this.g, Na(this.ca, this.end, b), this.start, this.end + 1, null) : Oc.call(null, this.g, Na(this.ca, this.end, b), this.start, this.end + 1, null);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return pb.a(this, b);
};
f.M = function(a, b, c) {
return pb.c(this, b, c);
};
f.B = function() {
var a = this;
return function c(d) {
return d === a.end ? null : N(z.a(a.ca, d), new bc(null, function() {
return c(d + 1);
}, null, null));
}(a.start);
};
f.F = function() {
return this.end - this.start;
};
f.ab = function(a, b, c) {
return Fa(this, b, c);
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return Oc.O ? Oc.O(b, this.ca, this.start, this.end, this.h) : Oc.call(null, b, this.ca, this.start, this.end, this.h);
};
f.I = function() {
return this.g;
};
f.Q = function(a, b) {
return 0 > b || this.end <= this.start + b ? Dc(b, this.end - this.start) : z.a(this.ca, this.start + b);
};
f.T = function(a, b, c) {
return 0 > b || this.end <= this.start + b ? c : z.c(this.ca, this.start + b, c);
};
f.H = function() {
return Fb(vc, this.g);
};
function Oc(a, b, c, d, e) {
for (;;) {
if (b instanceof Nc) {
c = b.start + c, d = b.start + d, b = b.ca;
} else {
var g = Q(b);
if (0 > c || 0 > d || c > g || d > g) {
throw Error("Index out of bounds");
}
return new Nc(a, b, c, d, e);
}
}
}
var Mc = function() {
function a(a, b, c) {
return Oc(null, a, b, c, null);
}
function b(a, b) {
return c.c(a, b, Q(a));
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 2:
return b.call(this, c, e);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.a = b;
c.c = a;
return c;
}();
function Ic(a) {
return new xc({}, w(a.b));
}
function Jc(a) {
var b = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
Nb(a, 0, b, 0, a.length);
return b;
}
var Qc = function Pc(b, c, d, e) {
d = b.root.m === d.m ? d : new xc(b.root.m, w(d.b));
var g = b.e - 1 >>> c & 31;
if (5 === c) {
b = e;
} else {
var h = d.b[g];
b = null != h ? Pc(b, c - 5, h, e) : Ac(b.root.m, c - 5, e);
}
d.b[g] = b;
return d;
};
function Hc(a, b, c, d) {
this.e = a;
this.shift = b;
this.root = c;
this.K = d;
this.f = 275;
this.n = 88;
}
f = Hc.prototype;
f.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.w(null, c);
case 3:
return this.A(null, c, d);
}
throw Error("Invalid arity: " + arguments.length);
};
}();
f.apply = function(a, b) {
return this.call.apply(this, [this].concat(w(b)));
};
f.d = function(a) {
return this.w(null, a);
};
f.a = function(a, b) {
return this.A(null, a, b);
};
f.w = function(a, b) {
return z.c(this, b, null);
};
f.A = function(a, b, c) {
return z.c(this, b, c);
};
f.Q = function(a, b) {
if (this.root.m) {
return Ec(this, b)[b & 31];
}
throw Error("nth after persistent!");
};
f.T = function(a, b, c) {
return 0 <= b && b < this.e ? z.a(this, b) : c;
};
f.F = function() {
if (this.root.m) {
return this.e;
}
throw Error("count after persistent!");
};
f.gb = function(a, b, c) {
var d = this;
if (d.root.m) {
if (0 <= b && b < d.e) {
return zc(this) <= b ? d.K[b & 31] = c : (a = function g(a, l) {
var m = d.root.m === l.m ? l : new xc(d.root.m, w(l.b));
if (0 === a) {
m.b[b & 31] = c;
} else {
var p = b >>> a & 31, q = g(a - 5, m.b[p]);
m.b[p] = q;
}
return m;
}.call(null, d.shift, d.root), d.root = a), this;
}
if (b === d.e) {
return bb(this, c);
}
if (t) {
throw Error([v("Index "), v(b), v(" out of bounds for TransientVector of length"), v(d.e)].join(""));
}
return null;
}
throw Error("assoc! after persistent!");
};
f.wa = function(a, b, c) {
return eb(this, b, c);
};
f.xa = function(a, b) {
if (this.root.m) {
if (32 > this.e - zc(this)) {
this.K[this.e & 31] = b;
} else {
var c = new xc(this.root.m, this.K), d = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
d[0] = b;
this.K = d;
if (this.e >>> 5 > 1 << this.shift) {
var d = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], e = this.shift + 5;
d[0] = this.root;
d[1] = Ac(this.root.m, this.shift, c);
this.root = new xc(this.root.m, d);
this.shift = e;
} else {
this.root = Qc(this, this.shift, this.root, c);
}
}
this.e += 1;
return this;
}
throw Error("conj! after persistent!");
};
f.ya = function() {
if (this.root.m) {
this.root.m = null;
var a = this.e - zc(this), b = Array(a);
Nb(this.K, 0, b, 0, a);
return new W(null, this.e, this.shift, this.root, b, null);
}
throw Error("persistent! called twice");
};
function Rc() {
this.n = 0;
this.f = 2097152;
}
Rc.prototype.t = function() {
return!1;
};
var Sc = new Rc;
function Tc(a, b) {
return Ob((null == b ? 0 : b ? b.f & 1024 || b.zb || (b.f ? 0 : r(Ga, b)) : r(Ga, b)) ? Q(a) === Q(b) ? qc(rc, sc.a(function(a) {
return lb.a(yb.c(b, I(a), Sc), I(L(a)));
}, a)) : null : null);
}
function Uc(a, b) {
var c = a.b;
if (b instanceof V) {
a: {
for (var d = c.length, e = b.la, g = 0;;) {
if (d <= g) {
c = -1;
break a;
}
var h = c[g];
if (h instanceof V && e === h.la) {
c = g;
break a;
}
if (t) {
g += 2;
} else {
c = null;
break a;
}
}
c = void 0;
}
} else {
if ("string" == typeof b || "number" === typeof b) {
a: {
d = c.length;
for (e = 0;;) {
if (d <= e) {
c = -1;
break a;
}
if (b === c[e]) {
c = e;
break a;
}
if (t) {
e += 2;
} else {
c = null;
break a;
}
}
c = void 0;
}
} else {
if (null == b) {
a: {
d = c.length;
for (e = 0;;) {
if (d <= e) {
c = -1;
break a;
}
if (null == c[e]) {
c = e;
break a;
}
if (t) {
e += 2;
} else {
c = null;
break a;
}
}
c = void 0;
}
} else {
if (t) {
a: {
d = c.length;
for (e = 0;;) {
if (d <= e) {
c = -1;
break a;
}
if (lb.a(b, c[e])) {
c = e;
break a;
}
if (t) {
e += 2;
} else {
c = null;
break a;
}
}
c = void 0;
}
} else {
c = null;
}
}
}
}
return c;
}
function Vc(a, b, c) {
this.b = a;
this.j = b;
this.ea = c;
this.n = 0;
this.f = 32374990;
}
f = Vc.prototype;
f.v = function() {
return tb(this);
};
f.U = function() {
return this.j < this.b.length - 2 ? new Vc(this.b, this.j + 2, this.ea) : null;
};
f.D = function(a, b) {
return N(b, this);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return U.a(b, this);
};
f.M = function(a, b, c) {
return U.c(b, c, this);
};
f.B = function() {
return this;
};
f.F = function() {
return(this.b.length - this.j) / 2;
};
f.P = function() {
return new W(null, 2, 5, Kc, [this.b[this.j], this.b[this.j + 1]], null);
};
f.R = function() {
return this.j < this.b.length - 2 ? new Vc(this.b, this.j + 2, this.ea) : K;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new Vc(this.b, this.j, b);
};
f.I = function() {
return this.ea;
};
f.H = function() {
return Fb(K, this.ea);
};
function ja(a, b, c, d) {
this.g = a;
this.e = b;
this.b = c;
this.h = d;
this.n = 4;
this.f = 16123663;
}
f = ja.prototype;
f.va = function() {
return new Wc({}, this.b.length, w(this.b));
};
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = Ub(this);
};
f.w = function(a, b) {
return C.c(this, b, null);
};
f.A = function(a, b, c) {
a = Uc(this, b);
return-1 === a ? c : this.b[a + 1];
};
f.oa = function(a, b, c) {
a = Uc(this, b);
if (-1 === a) {
if (this.e < Xc) {
a = this.b;
for (var d = a.length, e = Array(d + 2), g = 0;;) {
if (g < d) {
e[g] = a[g], g += 1;
} else {
break;
}
}
e[d] = b;
e[d + 1] = c;
return new ja(this.g, this.e + 1, e, null);
}
return Ra(Fa(uc(Yc, this), b, c), this.g);
}
return c === this.b[a + 1] ? this : t ? (b = w(this.b), b[a + 1] = c, new ja(this.g, this.e, b, null)) : null;
};
f.Ha = function(a, b) {
return-1 !== Uc(this, b);
};
f.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.w(null, c);
case 3:
return this.A(null, c, d);
}
throw Error("Invalid arity: " + arguments.length);
};
}();
f.apply = function(a, b) {
return this.call.apply(this, [this].concat(w(b)));
};
f.d = function(a) {
return this.w(null, a);
};
f.a = function(a, b) {
return this.A(null, a, b);
};
f.D = function(a, b) {
return Kb(b) ? Fa(this, z.a(b, 0), z.a(b, 1)) : ta.c(ya, this, b);
};
f.toString = function() {
return G(this);
};
f.B = function() {
return 0 <= this.b.length - 2 ? new Vc(this.b, 0, null) : null;
};
f.F = function() {
return this.e;
};
f.t = function(a, b) {
return Tc(this, b);
};
f.G = function(a, b) {
return new ja(b, this.e, this.b, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return Ra(Zc, this.g);
};
f.Da = function(a, b) {
if (0 <= Uc(this, b)) {
var c = this.b.length, d = c - 2;
if (0 === d) {
return xa(this);
}
for (var d = Array(d), e = 0, g = 0;;) {
if (e >= c) {
return new ja(this.g, this.e - 1, d, null);
}
if (lb.a(b, this.b[e])) {
e += 2;
} else {
if (t) {
d[g] = this.b[e], d[g + 1] = this.b[e + 1], g += 2, e += 2;
} else {
return null;
}
}
}
} else {
return this;
}
};
var Zc = new ja(null, 0, [], null), Xc = 8;
function Wc(a, b, c) {
this.qa = a;
this.ha = b;
this.b = c;
this.n = 56;
this.f = 258;
}
f = Wc.prototype;
f.wa = function(a, b, c) {
if (n(this.qa)) {
a = Uc(this, b);
if (-1 === a) {
if (this.ha + 2 <= 2 * Xc) {
return this.ha += 2, this.b.push(b), this.b.push(c), this;
}
a = $c.a ? $c.a(this.ha, this.b) : $c.call(null, this.ha, this.b);
return db(a, b, c);
}
c !== this.b[a + 1] && (this.b[a + 1] = c);
return this;
}
throw Error("assoc! after persistent!");
};
f.xa = function(a, b) {
if (n(this.qa)) {
if (b ? b.f & 2048 || b.ob || (b.f ? 0 : r(Ia, b)) : r(Ia, b)) {
return db(this, Vb.d ? Vb.d(b) : Vb.call(null, b), Wb.d ? Wb.d(b) : Wb.call(null, b));
}
for (var c = H(b), d = this;;) {
var e = I(c);
if (n(e)) {
c = L(c), d = db(d, Vb.d ? Vb.d(e) : Vb.call(null, e), Wb.d ? Wb.d(e) : Wb.call(null, e));
} else {
return d;
}
}
} else {
throw Error("conj! after persistent!");
}
};
f.ya = function() {
if (n(this.qa)) {
return this.qa = !1, new ja(null, Qb((this.ha - this.ha % 2) / 2), this.b, null);
}
throw Error("persistent! called twice");
};
f.w = function(a, b) {
return C.c(this, b, null);
};
f.A = function(a, b, c) {
if (n(this.qa)) {
return a = Uc(this, b), -1 === a ? c : this.b[a + 1];
}
throw Error("lookup after persistent!");
};
f.F = function() {
if (n(this.qa)) {
return Qb((this.ha - this.ha % 2) / 2);
}
throw Error("count after persistent!");
};
function $c(a, b) {
for (var c = ab(Yc), d = 0;;) {
if (d < a) {
c = db(c, b[d], b[d + 1]), d += 2;
} else {
return c;
}
}
}
function ad() {
this.da = !1;
}
function bd(a, b) {
return a === b ? !0 : $b(a, b) ? !0 : t ? lb.a(a, b) : null;
}
var cd = function() {
function a(a, b, c, h, l) {
a = w(a);
a[b] = c;
a[h] = l;
return a;
}
function b(a, b, c) {
a = w(a);
a[b] = c;
return a;
}
var c = null, c = function(c, e, g, h, l) {
switch(arguments.length) {
case 3:
return b.call(this, c, e, g);
case 5:
return a.call(this, c, e, g, h, l);
}
throw Error("Invalid arity: " + arguments.length);
};
c.c = b;
c.O = a;
return c;
}();
function dd(a, b) {
var c = Array(a.length - 2);
Nb(a, 0, c, 0, 2 * b);
Nb(a, 2 * (b + 1), c, 2 * b, c.length - 2 * b);
return c;
}
var ed = function() {
function a(a, b, c, h, l, m) {
a = a.ra(b);
a.b[c] = h;
a.b[l] = m;
return a;
}
function b(a, b, c, h) {
a = a.ra(b);
a.b[c] = h;
return a;
}
var c = null, c = function(c, e, g, h, l, m) {
switch(arguments.length) {
case 4:
return b.call(this, c, e, g, h);
case 6:
return a.call(this, c, e, g, h, l, m);
}
throw Error("Invalid arity: " + arguments.length);
};
c.l = b;
c.fa = a;
return c;
}();
function fd(a, b, c) {
this.m = a;
this.p = b;
this.b = c;
}
f = fd.prototype;
f.Z = function(a, b, c, d, e, g) {
var h = 1 << (c >>> b & 31), l = Sb(this.p & h - 1);
if (0 === (this.p & h)) {
var m = Sb(this.p);
if (2 * m < this.b.length) {
a = this.ra(a);
b = a.b;
g.da = !0;
a: {
for (c = 2 * (m - l), g = 2 * l + (c - 1), m = 2 * (l + 1) + (c - 1);;) {
if (0 === c) {
break a;
}
b[m] = b[g];
m -= 1;
c -= 1;
g -= 1;
}
}
b[2 * l] = d;
b[2 * l + 1] = e;
a.p |= h;
return a;
}
if (16 <= m) {
l = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
l[c >>> b & 31] = gd.Z(a, b + 5, c, d, e, g);
for (e = d = 0;;) {
if (32 > d) {
0 !== (this.p >>> d & 1) && (l[d] = null != this.b[e] ? gd.Z(a, b + 5, R(this.b[e]), this.b[e], this.b[e + 1], g) : this.b[e + 1], e += 2), d += 1;
} else {
break;
}
}
return new hd(a, m + 1, l);
}
return t ? (b = Array(2 * (m + 4)), Nb(this.b, 0, b, 0, 2 * l), b[2 * l] = d, b[2 * l + 1] = e, Nb(this.b, 2 * l, b, 2 * (l + 1), 2 * (m - l)), g.da = !0, a = this.ra(a), a.b = b, a.p |= h, a) : null;
}
m = this.b[2 * l];
h = this.b[2 * l + 1];
return null == m ? (m = h.Z(a, b + 5, c, d, e, g), m === h ? this : ed.l(this, a, 2 * l + 1, m)) : bd(d, m) ? e === h ? this : ed.l(this, a, 2 * l + 1, e) : t ? (g.da = !0, ed.fa(this, a, 2 * l, null, 2 * l + 1, id.pa ? id.pa(a, b + 5, m, h, c, d, e) : id.call(null, a, b + 5, m, h, c, d, e))) : null;
};
f.Aa = function() {
return jd.d ? jd.d(this.b) : jd.call(null, this.b);
};
f.ra = function(a) {
if (a === this.m) {
return this;
}
var b = Sb(this.p), c = Array(0 > b ? 4 : 2 * (b + 1));
Nb(this.b, 0, c, 0, 2 * b);
return new fd(a, this.p, c);
};
f.Ba = function(a, b, c) {
var d = 1 << (b >>> a & 31);
if (0 === (this.p & d)) {
return this;
}
var e = Sb(this.p & d - 1), g = this.b[2 * e], h = this.b[2 * e + 1];
return null == g ? (a = h.Ba(a + 5, b, c), a === h ? this : null != a ? new fd(null, this.p, cd.c(this.b, 2 * e + 1, a)) : this.p === d ? null : t ? new fd(null, this.p ^ d, dd(this.b, e)) : null) : bd(c, g) ? new fd(null, this.p ^ d, dd(this.b, e)) : t ? this : null;
};
f.Y = function(a, b, c, d, e) {
var g = 1 << (b >>> a & 31), h = Sb(this.p & g - 1);
if (0 === (this.p & g)) {
var l = Sb(this.p);
if (16 <= l) {
h = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
h[b >>> a & 31] = gd.Y(a + 5, b, c, d, e);
for (d = c = 0;;) {
if (32 > c) {
0 !== (this.p >>> c & 1) && (h[c] = null != this.b[d] ? gd.Y(a + 5, R(this.b[d]), this.b[d], this.b[d + 1], e) : this.b[d + 1], d += 2), c += 1;
} else {
break;
}
}
return new hd(null, l + 1, h);
}
a = Array(2 * (l + 1));
Nb(this.b, 0, a, 0, 2 * h);
a[2 * h] = c;
a[2 * h + 1] = d;
Nb(this.b, 2 * h, a, 2 * (h + 1), 2 * (l - h));
e.da = !0;
return new fd(null, this.p | g, a);
}
l = this.b[2 * h];
g = this.b[2 * h + 1];
return null == l ? (l = g.Y(a + 5, b, c, d, e), l === g ? this : new fd(null, this.p, cd.c(this.b, 2 * h + 1, l))) : bd(c, l) ? d === g ? this : new fd(null, this.p, cd.c(this.b, 2 * h + 1, d)) : t ? (e.da = !0, new fd(null, this.p, cd.O(this.b, 2 * h, null, 2 * h + 1, id.fa ? id.fa(a + 5, l, g, b, c, d) : id.call(null, a + 5, l, g, b, c, d)))) : null;
};
f.ma = function(a, b, c, d) {
var e = 1 << (b >>> a & 31);
if (0 === (this.p & e)) {
return d;
}
var g = Sb(this.p & e - 1), e = this.b[2 * g], g = this.b[2 * g + 1];
return null == e ? g.ma(a + 5, b, c, d) : bd(c, e) ? g : t ? d : null;
};
var gd = new fd(null, 0, []);
function hd(a, b, c) {
this.m = a;
this.e = b;
this.b = c;
}
f = hd.prototype;
f.Z = function(a, b, c, d, e, g) {
var h = c >>> b & 31, l = this.b[h];
if (null == l) {
return a = ed.l(this, a, h, gd.Z(a, b + 5, c, d, e, g)), a.e += 1, a;
}
b = l.Z(a, b + 5, c, d, e, g);
return b === l ? this : ed.l(this, a, h, b);
};
f.Aa = function() {
return kd.d ? kd.d(this.b) : kd.call(null, this.b);
};
f.ra = function(a) {
return a === this.m ? this : new hd(a, this.e, w(this.b));
};
f.Ba = function(a, b, c) {
var d = b >>> a & 31, e = this.b[d];
if (null != e) {
a = e.Ba(a + 5, b, c);
if (a === e) {
d = this;
} else {
if (null == a) {
if (8 >= this.e) {
a: {
e = this.b;
a = 2 * (this.e - 1);
b = Array(a);
c = 0;
for (var g = 1, h = 0;;) {
if (c < a) {
c !== d && null != e[c] && (b[g] = e[c], g += 2, h |= 1 << c), c += 1;
} else {
d = new fd(null, h, b);
break a;
}
}
d = void 0;
}
} else {
d = new hd(null, this.e - 1, cd.c(this.b, d, a));
}
} else {
d = t ? new hd(null, this.e, cd.c(this.b, d, a)) : null;
}
}
return d;
}
return this;
};
f.Y = function(a, b, c, d, e) {
var g = b >>> a & 31, h = this.b[g];
if (null == h) {
return new hd(null, this.e + 1, cd.c(this.b, g, gd.Y(a + 5, b, c, d, e)));
}
a = h.Y(a + 5, b, c, d, e);
return a === h ? this : new hd(null, this.e, cd.c(this.b, g, a));
};
f.ma = function(a, b, c, d) {
var e = this.b[b >>> a & 31];
return null != e ? e.ma(a + 5, b, c, d) : d;
};
function ld(a, b, c) {
b *= 2;
for (var d = 0;;) {
if (d < b) {
if (bd(c, a[d])) {
return d;
}
d += 2;
} else {
return-1;
}
}
}
function md(a, b, c, d) {
this.m = a;
this.ga = b;
this.e = c;
this.b = d;
}
f = md.prototype;
f.Z = function(a, b, c, d, e, g) {
if (c === this.ga) {
b = ld(this.b, this.e, d);
if (-1 === b) {
if (this.b.length > 2 * this.e) {
return a = ed.fa(this, a, 2 * this.e, d, 2 * this.e + 1, e), g.da = !0, a.e += 1, a;
}
c = this.b.length;
b = Array(c + 2);
Nb(this.b, 0, b, 0, c);
b[c] = d;
b[c + 1] = e;
g.da = !0;
g = this.e + 1;
a === this.m ? (this.b = b, this.e = g, a = this) : a = new md(this.m, this.ga, g, b);
return a;
}
return this.b[b + 1] === e ? this : ed.l(this, a, b + 1, e);
}
return(new fd(a, 1 << (this.ga >>> b & 31), [null, this, null, null])).Z(a, b, c, d, e, g);
};
f.Aa = function() {
return jd.d ? jd.d(this.b) : jd.call(null, this.b);
};
f.ra = function(a) {
if (a === this.m) {
return this;
}
var b = Array(2 * (this.e + 1));
Nb(this.b, 0, b, 0, 2 * this.e);
return new md(a, this.ga, this.e, b);
};
f.Ba = function(a, b, c) {
a = ld(this.b, this.e, c);
return-1 === a ? this : 1 === this.e ? null : t ? new md(null, this.ga, this.e - 1, dd(this.b, Qb((a - a % 2) / 2))) : null;
};
f.Y = function(a, b, c, d, e) {
return b === this.ga ? (a = ld(this.b, this.e, c), -1 === a ? (a = 2 * this.e, b = Array(a + 2), Nb(this.b, 0, b, 0, a), b[a] = c, b[a + 1] = d, e.da = !0, new md(null, this.ga, this.e + 1, b)) : lb.a(this.b[a], d) ? this : new md(null, this.ga, this.e, cd.c(this.b, a + 1, d))) : (new fd(null, 1 << (this.ga >>> a & 31), [null, this])).Y(a, b, c, d, e);
};
f.ma = function(a, b, c, d) {
a = ld(this.b, this.e, c);
return 0 > a ? d : bd(c, this.b[a]) ? this.b[a + 1] : t ? d : null;
};
var id = function() {
function a(a, b, c, h, l, m, p) {
var q = R(c);
if (q === l) {
return new md(null, q, 2, [c, h, m, p]);
}
var s = new ad;
return gd.Z(a, b, q, c, h, s).Z(a, b, l, m, p, s);
}
function b(a, b, c, h, l, m) {
var p = R(b);
if (p === h) {
return new md(null, p, 2, [b, c, l, m]);
}
var q = new ad;
return gd.Y(a, p, b, c, q).Y(a, h, l, m, q);
}
var c = null, c = function(c, e, g, h, l, m, p) {
switch(arguments.length) {
case 6:
return b.call(this, c, e, g, h, l, m);
case 7:
return a.call(this, c, e, g, h, l, m, p);
}
throw Error("Invalid arity: " + arguments.length);
};
c.fa = b;
c.pa = a;
return c;
}();
function nd(a, b, c, d, e) {
this.g = a;
this.$ = b;
this.j = c;
this.q = d;
this.h = e;
this.n = 0;
this.f = 32374860;
}
f = nd.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.D = function(a, b) {
return N(b, this);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return U.a(b, this);
};
f.M = function(a, b, c) {
return U.c(b, c, this);
};
f.B = function() {
return this;
};
f.P = function() {
return null == this.q ? new W(null, 2, 5, Kc, [this.$[this.j], this.$[this.j + 1]], null) : I(this.q);
};
f.R = function() {
return null == this.q ? jd.c ? jd.c(this.$, this.j + 2, null) : jd.call(null, this.$, this.j + 2, null) : jd.c ? jd.c(this.$, this.j, L(this.q)) : jd.call(null, this.$, this.j, L(this.q));
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new nd(b, this.$, this.j, this.q, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return Fb(K, this.g);
};
var jd = function() {
function a(a, b, c) {
if (null == c) {
for (c = a.length;;) {
if (b < c) {
if (null != a[b]) {
return new nd(null, a, b, null, null);
}
var h = a[b + 1];
if (n(h) && (h = h.Aa(), n(h))) {
return new nd(null, a, b + 2, h, null);
}
b += 2;
} else {
return null;
}
}
} else {
return new nd(null, a, b, c, null);
}
}
function b(a) {
return c.c(a, 0, null);
}
var c = null, c = function(c, e, g) {
switch(arguments.length) {
case 1:
return b.call(this, c);
case 3:
return a.call(this, c, e, g);
}
throw Error("Invalid arity: " + arguments.length);
};
c.d = b;
c.c = a;
return c;
}();
function od(a, b, c, d, e) {
this.g = a;
this.$ = b;
this.j = c;
this.q = d;
this.h = e;
this.n = 0;
this.f = 32374860;
}
f = od.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.D = function(a, b) {
return N(b, this);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return U.a(b, this);
};
f.M = function(a, b, c) {
return U.c(b, c, this);
};
f.B = function() {
return this;
};
f.P = function() {
return I(this.q);
};
f.R = function() {
return kd.l ? kd.l(null, this.$, this.j, L(this.q)) : kd.call(null, null, this.$, this.j, L(this.q));
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new od(b, this.$, this.j, this.q, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return Fb(K, this.g);
};
var kd = function() {
function a(a, b, c, h) {
if (null == h) {
for (h = b.length;;) {
if (c < h) {
var l = b[c];
if (n(l) && (l = l.Aa(), n(l))) {
return new od(a, b, c + 1, l, null);
}
c += 1;
} else {
return null;
}
}
} else {
return new od(a, b, c, h, null);
}
}
function b(a) {
return c.l(null, a, 0, null);
}
var c = null, c = function(c, e, g, h) {
switch(arguments.length) {
case 1:
return b.call(this, c);
case 4:
return a.call(this, c, e, g, h);
}
throw Error("Invalid arity: " + arguments.length);
};
c.d = b;
c.l = a;
return c;
}();
function pd(a, b, c, d, e, g) {
this.g = a;
this.e = b;
this.root = c;
this.N = d;
this.S = e;
this.h = g;
this.n = 4;
this.f = 16123663;
}
f = pd.prototype;
f.va = function() {
return new qd({}, this.root, this.e, this.N, this.S);
};
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = Ub(this);
};
f.w = function(a, b) {
return C.c(this, b, null);
};
f.A = function(a, b, c) {
return null == b ? this.N ? this.S : c : null == this.root ? c : t ? this.root.ma(0, R(b), b, c) : null;
};
f.oa = function(a, b, c) {
if (null == b) {
return this.N && c === this.S ? this : new pd(this.g, this.N ? this.e : this.e + 1, this.root, !0, c, null);
}
a = new ad;
b = (null == this.root ? gd : this.root).Y(0, R(b), b, c, a);
return b === this.root ? this : new pd(this.g, a.da ? this.e + 1 : this.e, b, this.N, this.S, null);
};
f.Ha = function(a, b) {
return null == b ? this.N : null == this.root ? !1 : t ? this.root.ma(0, R(b), b, S) !== S : null;
};
f.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.w(null, c);
case 3:
return this.A(null, c, d);
}
throw Error("Invalid arity: " + arguments.length);
};
}();
f.apply = function(a, b) {
return this.call.apply(this, [this].concat(w(b)));
};
f.d = function(a) {
return this.w(null, a);
};
f.a = function(a, b) {
return this.A(null, a, b);
};
f.D = function(a, b) {
return Kb(b) ? Fa(this, z.a(b, 0), z.a(b, 1)) : ta.c(ya, this, b);
};
f.toString = function() {
return G(this);
};
f.B = function() {
if (0 < this.e) {
var a = null != this.root ? this.root.Aa() : null;
return this.N ? N(new W(null, 2, 5, Kc, [null, this.S], null), a) : a;
}
return null;
};
f.F = function() {
return this.e;
};
f.t = function(a, b) {
return Tc(this, b);
};
f.G = function(a, b) {
return new pd(b, this.e, this.root, this.N, this.S, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return Ra(Yc, this.g);
};
f.Da = function(a, b) {
if (null == b) {
return this.N ? new pd(this.g, this.e - 1, this.root, !1, null, null) : this;
}
if (null == this.root) {
return this;
}
if (t) {
var c = this.root.Ba(0, R(b), b);
return c === this.root ? this : new pd(this.g, this.e - 1, c, this.N, this.S, null);
}
return null;
};
var Yc = new pd(null, 0, null, !1, null, 0);
function zb(a, b) {
for (var c = a.length, d = 0, e = ab(Yc);;) {
if (d < c) {
var g = d + 1, e = e.wa(null, a[d], b[d]), d = g
} else {
return cb(e);
}
}
}
function qd(a, b, c, d, e) {
this.m = a;
this.root = b;
this.count = c;
this.N = d;
this.S = e;
this.n = 56;
this.f = 258;
}
f = qd.prototype;
f.wa = function(a, b, c) {
return rd(this, b, c);
};
f.xa = function(a, b) {
var c;
a: {
if (this.m) {
if (b ? b.f & 2048 || b.ob || (b.f ? 0 : r(Ia, b)) : r(Ia, b)) {
c = rd(this, Vb.d ? Vb.d(b) : Vb.call(null, b), Wb.d ? Wb.d(b) : Wb.call(null, b));
break a;
}
c = H(b);
for (var d = this;;) {
var e = I(c);
if (n(e)) {
c = L(c), d = rd(d, Vb.d ? Vb.d(e) : Vb.call(null, e), Wb.d ? Wb.d(e) : Wb.call(null, e));
} else {
c = d;
break a;
}
}
} else {
throw Error("conj! after persistent");
}
c = void 0;
}
return c;
};
f.ya = function() {
var a;
if (this.m) {
this.m = null, a = new pd(null, this.count, this.root, this.N, this.S, null);
} else {
throw Error("persistent! called twice");
}
return a;
};
f.w = function(a, b) {
return null == b ? this.N ? this.S : null : null == this.root ? null : this.root.ma(0, R(b), b);
};
f.A = function(a, b, c) {
return null == b ? this.N ? this.S : c : null == this.root ? c : this.root.ma(0, R(b), b, c);
};
f.F = function() {
if (this.m) {
return this.count;
}
throw Error("count after persistent!");
};
function rd(a, b, c) {
if (a.m) {
if (null == b) {
a.S !== c && (a.S = c), a.N || (a.count += 1, a.N = !0);
} else {
var d = new ad;
b = (null == a.root ? gd : a.root).Z(a.m, 0, R(b), b, c, d);
b !== a.root && (a.root = b);
d.da && (a.count += 1);
}
return a;
}
throw Error("assoc! after persistent!");
}
function sd(a, b) {
this.na = a;
this.ea = b;
this.n = 0;
this.f = 32374988;
}
f = sd.prototype;
f.v = function() {
return tb(this);
};
f.U = function() {
var a = this.na, a = (a ? a.f & 128 || a.fb || (a.f ? 0 : r(Ba, a)) : r(Ba, a)) ? this.na.U(null) : L(this.na);
return null == a ? null : new sd(a, this.ea);
};
f.D = function(a, b) {
return N(b, this);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return U.a(b, this);
};
f.M = function(a, b, c) {
return U.c(b, c, this);
};
f.B = function() {
return this;
};
f.P = function() {
return this.na.P(null).$a();
};
f.R = function() {
var a = this.na, a = (a ? a.f & 128 || a.fb || (a.f ? 0 : r(Ba, a)) : r(Ba, a)) ? this.na.U(null) : L(this.na);
return null != a ? new sd(a, this.ea) : K;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new sd(this.na, b);
};
f.I = function() {
return this.ea;
};
f.H = function() {
return Fb(K, this.ea);
};
function Vb(a) {
return Ja(a);
}
function Wb(a) {
return Ka(a);
}
function td(a, b, c) {
this.g = a;
this.ta = b;
this.h = c;
this.n = 4;
this.f = 15077647;
}
f = td.prototype;
f.va = function() {
return new ud(ab(this.ta));
};
f.v = function() {
var a = this.h;
if (null != a) {
return a;
}
a: {
for (var a = 0, b = H(this);;) {
if (b) {
var c = I(b), a = (a + R(c)) % 4503599627370496, b = L(b)
} else {
break a;
}
}
a = void 0;
}
return this.h = a;
};
f.w = function(a, b) {
return C.c(this, b, null);
};
f.A = function(a, b, c) {
return Ea(this.ta, b) ? b : c;
};
f.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.w(null, c);
case 3:
return this.A(null, c, d);
}
throw Error("Invalid arity: " + arguments.length);
};
}();
f.apply = function(a, b) {
return this.call.apply(this, [this].concat(w(b)));
};
f.d = function(a) {
return this.w(null, a);
};
f.a = function(a, b) {
return this.A(null, a, b);
};
f.D = function(a, b) {
return new td(this.g, Ab.c(this.ta, b, null), null);
};
f.toString = function() {
return G(this);
};
f.B = function() {
var a = H(this.ta);
return a ? new sd(a, null) : null;
};
f.F = function() {
return y(this.ta);
};
f.t = function(a, b) {
var c = this;
return(null == b ? !1 : b ? b.f & 4096 || b.Cb ? !0 : b.f ? !1 : r(La, b) : r(La, b)) && Q(c) === Q(b) && qc(function(a) {
return yb.c(c, a, S) === S ? !1 : !0;
}, b);
};
f.G = function(a, b) {
return new td(b, this.ta, this.h);
};
f.I = function() {
return this.g;
};
f.H = function() {
return Fb(vd, this.g);
};
var vd = new td(null, Zc, 0);
function ud(a) {
this.ja = a;
this.f = 259;
this.n = 136;
}
f = ud.prototype;
f.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return C.c(this.ja, c, S) === S ? null : c;
case 3:
return C.c(this.ja, c, S) === S ? d : c;
}
throw Error("Invalid arity: " + arguments.length);
};
}();
f.apply = function(a, b) {
return this.call.apply(this, [this].concat(w(b)));
};
f.d = function(a) {
return C.c(this.ja, a, S) === S ? null : a;
};
f.a = function(a, b) {
return C.c(this.ja, a, S) === S ? b : a;
};
f.w = function(a, b) {
return C.c(this, b, null);
};
f.A = function(a, b, c) {
return C.c(this.ja, b, S) === S ? c : b;
};
f.F = function() {
return Q(this.ja);
};
f.xa = function(a, b) {
this.ja = db(this.ja, b, null);
return this;
};
f.ya = function() {
return new td(null, cb(this.ja), null);
};
function wd(a) {
if (a && (a.n & 4096 || a.qb)) {
return a.name;
}
if ("string" === typeof a) {
return a;
}
throw Error([v("Doesn't support name: "), v(a)].join(""));
}
function xd(a, b, c, d, e) {
this.g = a;
this.start = b;
this.end = c;
this.step = d;
this.h = e;
this.n = 0;
this.f = 32375006;
}
f = xd.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = tb(this);
};
f.U = function() {
return 0 < this.step ? this.start + this.step < this.end ? new xd(this.g, this.start + this.step, this.end, this.step, null) : null : this.start + this.step > this.end ? new xd(this.g, this.start + this.step, this.end, this.step, null) : null;
};
f.D = function(a, b) {
return N(b, this);
};
f.toString = function() {
return G(this);
};
f.L = function(a, b) {
return pb.a(this, b);
};
f.M = function(a, b, c) {
return pb.c(this, b, c);
};
f.B = function() {
return 0 < this.step ? this.start < this.end ? this : null : this.start > this.end ? this : null;
};
f.F = function() {
return qa(Xa(this)) ? 0 : Math.ceil((this.end - this.start) / this.step);
};
f.P = function() {
return null == Xa(this) ? null : this.start;
};
f.R = function() {
return null != Xa(this) ? new xd(this.g, this.start + this.step, this.end, this.step, null) : K;
};
f.t = function(a, b) {
return P(this, b);
};
f.G = function(a, b) {
return new xd(b, this.start, this.end, this.step, this.h);
};
f.I = function() {
return this.g;
};
f.Q = function(a, b) {
if (b < y(this)) {
return this.start + b * this.step;
}
if (this.start > this.end && 0 === this.step) {
return this.start;
}
throw Error("Index out of bounds");
};
f.T = function(a, b, c) {
return b < y(this) ? this.start + b * this.step : this.start > this.end && 0 === this.step ? this.start : c;
};
f.H = function() {
return Fb(K, this.g);
};
var yd = function() {
function a(a, b, c) {
return new xd(null, a, b, c, null);
}
function b(a, b) {
return e.c(a, b, 1);
}
function c(a) {
return e.c(0, a, 1);
}
function d() {
return e.c(0, Number.MAX_VALUE, 1);
}
var e = null, e = function(e, h, l) {
switch(arguments.length) {
case 0:
return d.call(this);
case 1:
return c.call(this, e);
case 2:
return b.call(this, e, h);
case 3:
return a.call(this, e, h, l);
}
throw Error("Invalid arity: " + arguments.length);
};
e.s = d;
e.d = c;
e.a = b;
e.c = a;
return e;
}();
function Y(a, b, c, d, e, g, h) {
var l = ha;
try {
ha = null == ha ? null : ha - 1;
if (null != ha && 0 > ha) {
return E(a, "#");
}
E(a, c);
H(h) && (b.c ? b.c(I(h), a, g) : b.call(null, I(h), a, g));
for (var m = L(h), p = pa.d(g);m && (null == p || 0 !== p);) {
E(a, d);
b.c ? b.c(I(m), a, g) : b.call(null, I(m), a, g);
var q = L(m);
c = p - 1;
m = q;
p = c;
}
n(pa.d(g)) && (E(a, d), b.c ? b.c("...", a, g) : b.call(null, "...", a, g));
return E(a, e);
} finally {
ha = l;
}
}
var zd = function() {
function a(a, d) {
var e = null;
1 < arguments.length && (e = M(Array.prototype.slice.call(arguments, 1), 0));
return b.call(this, a, e);
}
function b(a, b) {
for (var e = H(b), g = null, h = 0, l = 0;;) {
if (l < h) {
var m = g.Q(null, l);
E(a, m);
l += 1;
} else {
if (e = H(e)) {
g = e, Lb(g) ? (e = gb(g), h = hb(g), g = e, m = Q(e), e = h, h = m) : (m = I(g), E(a, m), e = L(g), g = null, h = 0), l = 0;
} else {
return null;
}
}
}
}
a.o = 1;
a.k = function(a) {
var d = I(a);
a = J(a);
return b(d, a);
};
a.i = b;
return a;
}(), Ad = {'"':'\\"', "\\":"\\\\", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t"};
function Bd(a) {
return[v('"'), v(a.replace(RegExp('[\\\\"\b\f\n\r\t]', "g"), function(a) {
return Ad[a];
})), v('"')].join("");
}
var Z = function Cd(b, c, d) {
if (null == b) {
return E(c, "nil");
}
if (void 0 === b) {
return E(c, "#\x3cundefined\x3e");
}
if (t) {
n(function() {
var c = yb.a(d, na);
return n(c) ? (c = b ? b.f & 131072 || b.pb ? !0 : b.f ? !1 : r(Oa, b) : r(Oa, b)) ? Hb(b) : c : c;
}()) && (E(c, "^"), Cd(Hb(b), c, d), E(c, " "));
if (null == b) {
return E(c, "nil");
}
if (b.jb) {
return b.sb(c);
}
if (b && (b.f & 2147483648 || b.J)) {
return b.u(null, c, d);
}
if (ra(b) === Boolean || "number" === typeof b) {
return E(c, "" + v(b));
}
if (null != b && b.constructor === Object) {
return E(c, "#js "), Dd.l ? Dd.l(sc.a(function(c) {
return new W(null, 2, 5, Kc, [ac.d(c), b[c]], null);
}, Mb(b)), Cd, c, d) : Dd.call(null, sc.a(function(c) {
return new W(null, 2, 5, Kc, [ac.d(c), b[c]], null);
}, Mb(b)), Cd, c, d);
}
if (b instanceof Array) {
return Y(c, Cd, "#js [", " ", "]", d, b);
}
if ("string" == typeof b) {
return n(ma.d(d)) ? E(c, Bd(b)) : E(c, b);
}
if (Cb(b)) {
return zd.i(c, M(["#\x3c", "" + v(b), "\x3e"], 0));
}
if (b instanceof Date) {
var e = function(b, c) {
for (var d = "" + v(b);;) {
if (Q(d) < c) {
d = [v("0"), v(d)].join("");
} else {
return d;
}
}
};
return zd.i(c, M(['#inst "', "" + v(b.getUTCFullYear()), "-", e(b.getUTCMonth() + 1, 2), "-", e(b.getUTCDate(), 2), "T", e(b.getUTCHours(), 2), ":", e(b.getUTCMinutes(), 2), ":", e(b.getUTCSeconds(), 2), ".", e(b.getUTCMilliseconds(), 3), "-", '00:00"'], 0));
}
return b instanceof RegExp ? zd.i(c, M(['#"', b.source, '"'], 0)) : (b ? b.f & 2147483648 || b.J || (b.f ? 0 : r(Za, b)) : r(Za, b)) ? $a(b, c, d) : t ? zd.i(c, M(["#\x3c", "" + v(b), "\x3e"], 0)) : null;
}
return null;
}, $ = function() {
function a(a) {
var d = null;
0 < arguments.length && (d = M(Array.prototype.slice.call(arguments, 0), 0));
return b.call(this, d);
}
function b(a) {
var b = Ab.c(ia(), ma, !1);
if (null == a || qa(H(a))) {
b = "";
} else {
var e = v, g = new da;
a: {
var h = new jb(g);
Z(I(a), h, b);
a = H(L(a));
for (var l = null, m = 0, p = 0;;) {
if (p < m) {
var q = l.Q(null, p);
E(h, " ");
Z(q, h, b);
p += 1;
} else {
if (a = H(a)) {
l = a, Lb(l) ? (a = gb(l), m = hb(l), l = a, q = Q(a), a = m, m = q) : (q = I(l), E(h, " "), Z(q, h, b), a = L(l), l = null, m = 0), p = 0;
} else {
break a;
}
}
}
}
b = "" + e(g);
}
ga.d ? ga.d(b) : ga.call(null, b);
return null;
}
a.o = 0;
a.k = function(a) {
a = H(a);
return b(a);
};
a.i = b;
return a;
}();
function Dd(a, b, c, d) {
return Y(c, function(a, c, d) {
b.c ? b.c(Ja(a), c, d) : b.call(null, Ja(a), c, d);
E(c, " ");
return b.c ? b.c(Ka(a), c, d) : b.call(null, Ka(a), c, d);
}, "{", ", ", "}", d, H(a));
}
sd.prototype.J = !0;
sd.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
ob.prototype.J = !0;
ob.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
Nc.prototype.J = !0;
Nc.prototype.u = function(a, b, c) {
return Y(b, Z, "[", " ", "]", c, this);
};
gc.prototype.J = !0;
gc.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
ja.prototype.J = !0;
ja.prototype.u = function(a, b, c) {
return Dd(this, Z, b, c);
};
bc.prototype.J = !0;
bc.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
nd.prototype.J = !0;
nd.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
Lc.prototype.J = !0;
Lc.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
pd.prototype.J = !0;
pd.prototype.u = function(a, b, c) {
return Dd(this, Z, b, c);
};
td.prototype.J = !0;
td.prototype.u = function(a, b, c) {
return Y(b, Z, "#{", " ", "}", c, this);
};
W.prototype.J = !0;
W.prototype.u = function(a, b, c) {
return Y(b, Z, "[", " ", "]", c, this);
};
Xb.prototype.J = !0;
Xb.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
Vc.prototype.J = !0;
Vc.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
Yb.prototype.J = !0;
Yb.prototype.u = function(a, b) {
return E(b, "()");
};
Zb.prototype.J = !0;
Zb.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
xd.prototype.J = !0;
xd.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
od.prototype.J = !0;
od.prototype.u = function(a, b, c) {
return Y(b, Z, "(", " ", ")", c, this);
};
W.prototype.La = !0;
W.prototype.Ma = function(a, b) {
return Pb.a(this, b);
};
Nc.prototype.La = !0;
Nc.prototype.Ma = function(a, b) {
return Pb.a(this, b);
};
V.prototype.La = !0;
V.prototype.Ma = function(a, b) {
return kb(this, b);
};
Rb = function() {
function a(a) {
return(Math.random.s ? Math.random.s() : Math.random.call(null)) * a;
}
function b() {
return c.d(1);
}
var c = null, c = function(c) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return a.call(this, c);
}
throw Error("Invalid arity: " + arguments.length);
};
c.s = b;
c.d = a;
return c;
}();
var oa = new V(null, "dup", "dup"), nb = new V(null, "default", "default"), Ed = new V(null, "y", "y"), Fd = new V(null, "x", "x"), ka = new V(null, "flush-on-newline", "flush-on-newline"), pa = new V(null, "print-length", "print-length"), t = new V(null, "else", "else"), ma = new V(null, "readably", "readably"), na = new V(null, "meta", "meta");
ga = print;
function Gd(a, b, c, d) {
this.x = a;
this.y = b;
this.ka = c;
this.W = d;
this.n = 0;
this.f = 2229667594;
2 < arguments.length ? (this.ka = c, this.W = d) : this.W = this.ka = null;
}
f = Gd.prototype;
f.v = function() {
var a = this.h;
return null != a ? a : this.h = a = Ub(this);
};
f.w = function(a, b) {
return C.c(this, b, null);
};
f.A = function(a, b, c) {
return $b(b, Fd) ? this.x : $b(b, Ed) ? this.y : t ? yb.c(this.W, b, c) : null;
};
f.oa = function(a, b, c) {
return n($b.a ? $b.a(Fd, b) : $b.call(null, Fd, b)) ? new Gd(c, this.y, this.ka, this.W, null) : n($b.a ? $b.a(Ed, b) : $b.call(null, Ed, b)) ? new Gd(this.x, c, this.ka, this.W, null) : new Gd(this.x, this.y, this.ka, Ab.c(this.W, b, c), null);
};
f.u = function(a, b, c) {
return Y(b, function(a) {
return Y(b, Z, "", " ", "", c, a);
}, "#cljs.benchmark-runner.XY{", ", ", "}", c, mc.a(new W(null, 2, 5, Kc, [new W(null, 2, 5, Kc, [Fd, this.x], null), new W(null, 2, 5, Kc, [Ed, this.y], null)], null), this.W));
};
f.D = function(a, b) {
return Kb(b) ? Fa(this, z.a(b, 0), z.a(b, 1)) : ta.c(ya, this, b);
};
f.B = function() {
return H(mc.a(new W(null, 2, 5, Kc, [new W(null, 2, 5, Kc, [Fd, this.x], null), new W(null, 2, 5, Kc, [Ed, this.y], null)], null), this.W));
};
f.F = function() {
return 2 + Q(this.W);
};
f.t = function(a, b) {
return n(n(b) ? this.constructor === b.constructor && Tc(this, b) : b) ? !0 : !1;
};
f.G = function(a, b) {
return new Gd(this.x, this.y, b, this.W, this.h);
};
f.I = function() {
return this.ka;
};
f.Da = function(a, b) {
var c;
if (yb.c(new td(null, new ja(null, 2, [Ed, null, Fd, null], null), null), b, S) !== S) {
c = Bb.a(Fb(uc(Zc, this), this.ka), b);
} else {
c = this.x;
var d = this.y, e = this.ka, g;
g = Bb.a(this.W, b);
g = H(g) ? g : null;
c = new Gd(c, d, e, g, null);
}
return c;
};
var Id = ua.d(function Hd(b) {
return new bc(null, function() {
for (;;) {
var c = H(b);
if (c) {
if (Lb(c)) {
var d = gb(c), e = Q(d), g = new dc(Array(e), 0);
return function() {
for (var b = 0;;) {
if (b < e) {
z.a(d, b);
var c = g, m = {};
m.x = Rb.s();
m.y = Rb.s();
c.add(m);
b += 1;
} else {
return!0;
}
}
}() ? hc(g.X(), Hd(hb(c))) : hc(g.X(), null);
}
I(c);
return N(function() {
var b = {};
b.x = Rb.s();
b.y = Rb.s();
return b;
}(), Hd(J(c)));
}
return null;
}
}, null, null);
}(yd.d(1E4))), Jd = wc.a(function(a) {
return zb.a ? zb.a([Fd, Ed], [a.x, a.y]) : zb.call(null, [Fd, Ed], [a.x, a.y]);
}, Id), Kd = wc.a(function(a) {
return uc(Zc, a);
}, Jd), Ld = wc.a(function(a) {
return new Gd(Fd.d(a), Ed.d(a));
}, Jd), Md = ua.d(Ld);
function Nd(a) {
for (var b = 0, c = 0;;) {
if (H(a)) {
var d = I(a), b = b + Fd.d(d), c = c + Ed.d(d);
a = J(a);
} else {
break;
}
}
}
function Od() {
for (var a = function() {
var a = [null];
a[0] = 0;
return a;
}(), b = function() {
var a = [null];
a[0] = 0;
return a;
}(), c = Q(Ld), d = 0;;) {
if (d < c) {
var e = Ld.d ? Ld.d(d) : Ld.call(null, d);
a[0] += e.x;
b[0] += e.y;
d += 1;
} else {
break;
}
}
}
function Pd(a) {
for (var b = function() {
var a = [null];
a[0] = 0;
return a;
}(), c = function() {
var a = [null];
a[0] = 0;
return a;
}(), d = a.length, e = 0;;) {
if (e < d) {
var g = a[e];
b[0] += g.x;
c[0] += g.y;
e += 1;
} else {
break;
}
}
}
function Qd() {
ta.c(function(a, b) {
var c = xb.c(a, 0, null), d = xb.c(a, 1, null);
return new W(null, 2, 5, Kc, [c + Fd.d(b), d + Ed.d(b)], null);
}, new W(null, 2, 5, Kc, [0, 0], null), Jd);
}
var Rd = (new Date).getTime();
a: {
for (var Sd = 0;;) {
if (1E3 > Sd) {
sumXsAndYsJs(Id), Sd += 1;
} else {
break a;
}
}
}
var Td = (new Date).getTime() - Rd;
$.d ? $.d([v("[data array-data]"), v(", "), v("(js/sumXsAndYsJs data)"), v(", "), v(1E3), v(" runs, "), v(Td), v(" msecs")].join("")) : $.call(null, [v("[data array-data]"), v(", "), v("(js/sumXsAndYsJs data)"), v(", "), v(1E3), v(" runs, "), v(Td), v(" msecs")].join(""));
var Ud = (new Date).getTime();
a: {
for (var Vd = 0;;) {
if (1E3 > Vd) {
Pd(Id), Vd += 1;
} else {
break a;
}
}
}
var Wd = (new Date).getTime() - Ud;
$.d ? $.d([v("[data array-data]"), v(", "), v("(sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals data)"), v(", "), v(1E3), v(" runs, "), v(Wd), v(" msecs")].join("")) : $.call(null, [v("[data array-data]"), v(", "), v("(sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals data)"), v(", "), v(1E3), v(" runs, "), v(Wd), v(" msecs")].join(""));
var Xd = (new Date).getTime();
a: {
for (var Yd = 0;;) {
if (1E3 > Yd) {
Pd(Md), Yd += 1;
} else {
break a;
}
}
}
var Zd = (new Date).getTime() - Xd;
$.d ? $.d([v("[data array-data-records]"), v(", "), v("(sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals data)"), v(", "), v(1E3), v(" runs, "), v(Zd), v(" msecs")].join("")) : $.call(null, [v("[data array-data-records]"), v(", "), v("(sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals data)"), v(", "), v(1E3), v(" runs, "), v(Zd), v(" msecs")].join(""));
var $d = (new Date).getTime();
a: {
for (var ae = 0;;) {
if (1E3 > ae) {
Od(), ae += 1;
} else {
break a;
}
}
}
var be = (new Date).getTime() - $d;
$.d ? $.d([v("[data vec-data-records]"), v(", "), v("(sumsXsAndYsWithDotimesNativeFieldAccessAndMutableLocals data)"), v(", "), v(1E3), v(" runs, "), v(be), v(" msecs")].join("")) : $.call(null, [v("[data vec-data-records]"), v(", "), v("(sumsXsAndYsWithDotimesNativeFieldAccessAndMutableLocals data)"), v(", "), v(1E3), v(" runs, "), v(be), v(" msecs")].join(""));
var ce = (new Date).getTime();
a: {
for (var de = 0;;) {
if (1E3 > de) {
b: {
for (var ee = Ld;;) {
if (H(ee)) {
I(ee), ee = J(ee);
} else {
break b;
}
}
}
de += 1;
} else {
break a;
}
}
}
var fe = (new Date).getTime() - ce;
$.d ? $.d([v("[data vec-data-records]"), v(", "), v("(sumXsAndYsWithLoopAndNativeFieldAccess data)"), v(", "), v(1E3), v(" runs, "), v(fe), v(" msecs")].join("")) : $.call(null, [v("[data vec-data-records]"), v(", "), v("(sumXsAndYsWithLoopAndNativeFieldAccess data)"), v(", "), v(1E3), v(" runs, "), v(fe), v(" msecs")].join(""));
var ge = (new Date).getTime();
a: {
for (var he = 0;;) {
if (1E3 > he) {
Nd(Ld), he += 1;
} else {
break a;
}
}
}
var ie = (new Date).getTime() - ge;
$.d ? $.d([v("[data vec-data-records]"), v(", "), v("(sumXsAndYsWithLoop data)"), v(", "), v(1E3), v(" runs, "), v(ie), v(" msecs")].join("")) : $.call(null, [v("[data vec-data-records]"), v(", "), v("(sumXsAndYsWithLoop data)"), v(", "), v(1E3), v(" runs, "), v(ie), v(" msecs")].join(""));
var je = (new Date).getTime();
a: {
for (var ke = 0;;) {
if (1E3 > ke) {
Nd(Kd), ke += 1;
} else {
break a;
}
}
}
var le = (new Date).getTime() - je;
$.d ? $.d([v("[data vec-data-array-map]"), v(", "), v("(sumXsAndYsWithLoop data)"), v(", "), v(1E3), v(" runs, "), v(le), v(" msecs")].join("")) : $.call(null, [v("[data vec-data-array-map]"), v(", "), v("(sumXsAndYsWithLoop data)"), v(", "), v(1E3), v(" runs, "), v(le), v(" msecs")].join(""));
var me = (new Date).getTime();
a: {
for (var ne = 0;;) {
if (1E3 > ne) {
Nd(Jd), ne += 1;
} else {
break a;
}
}
}
var oe = (new Date).getTime() - me;
$.d ? $.d([v("[data vec-data]"), v(", "), v("(sumXsAndYsWithLoop data)"), v(", "), v(1E3), v(" runs, "), v(oe), v(" msecs")].join("")) : $.call(null, [v("[data vec-data]"), v(", "), v("(sumXsAndYsWithLoop data)"), v(", "), v(1E3), v(" runs, "), v(oe), v(" msecs")].join(""));
var pe = (new Date).getTime();
a: {
for (var qe = 0;;) {
if (1E3 > qe) {
Qd(), qe += 1;
} else {
break a;
}
}
}
var re = (new Date).getTime() - pe;
$.d ? $.d([v("[data vec-data]"), v(", "), v("(sumXsAndYsWithReduce data)"), v(", "), v(1E3), v(" runs, "), v(re), v(" msecs")].join("")) : $.call(null, [v("[data vec-data]"), v(", "), v("(sumXsAndYsWithReduce data)"), v(", "), v(1E3), v(" runs, "), v(re), v(" msecs")].join(""));
var se = (new Date).getTime();
a: {
for (var te = 0;;) {
if (1E3 > te) {
b: {
for (var ue = Jd;;) {
if (H(ue)) {
var ve = I(ue);
Fd.d(ve);
Ed.d(ve);
var we = Mc.a(ue, 1), ue = we;
} else {
break b;
}
}
}
te += 1;
} else {
break a;
}
}
}
var xe = (new Date).getTime() - se;
$.d ? $.d([v("[data vec-data]"), v(", "), v("(sumXsAndYsWithLoopAndSubvec data)"), v(", "), v(1E3), v(" runs, "), v(xe), v(" msecs")].join("")) : $.call(null, [v("[data vec-data]"), v(", "), v("(sumXsAndYsWithLoopAndSubvec data)"), v(", "), v(1E3), v(" runs, "), v(xe), v(" msecs")].join(""));
})();

Using V8, I got the following results when compiling performance.cljs with advanced mode:

[data array-data], (js/sumXsAndYsJs data), 1000 runs, 41 msecs
[data array-data], (sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals data), 1000 runs, 114 msecs
[data array-data-records], (sumsXsAndYsWithDotimesOnArrayNativeFieldAccessAndMutableLocals data), 1000 runs, 124 msecs
[data vec-data-records], (sumsXsAndYsWithDotimesNativeFieldAccessAndMutableLocals data), 1000 runs, 362 msecs
[data vec-data-records], (sumXsAndYsWithLoopAndNativeFieldAccess data), 1000 runs, 1115 msecs
[data vec-data-records], (sumXsAndYsWithLoop data), 1000 runs, 2065 msecs
[data vec-data-array-map], (sumXsAndYsWithLoop data), 1000 runs, 2530 msecs
[data vec-data], (sumXsAndYsWithLoop data), 1000 runs, 2548 msecs
[data vec-data], (sumXsAndYsWithReduce data), 1000 runs, 3235 msecs
[data vec-data], (sumXsAndYsWithLoopAndSubvec data), 1000 runs, 8228 msecs

Use the performance.js file to run these benchmarks on your own system using the JavaScript engine of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment