Compare commits

...

No commits in common. "master" and "gh-pages" have entirely different histories.

9 changed files with 346 additions and 749 deletions

1
.gitignore vendored
View File

@ -7,6 +7,5 @@ pom.xml.asc
*.class
/.lein-*
/.nrepl-port
/resources/public/js
/out
/repl

View File

@ -1,86 +0,0 @@
# Gravity Pong
Gravity Pong is the famous [Pong][pong] game with a twist, written in [ClojureScript][cljs] using the
[core.async][coreasync] library. It can be played [here][demo] (only works on Google Chrome for now).
Along with the usual Pong ball and the paddles on both sides of the screen, there is also a mass at
the center of the screen which exerts a gravitational force on the ball causing it to change its path
from a usual straight line to a curve. And the user can control the gravitational force using the
keyboard to shape the ball's path as they want.
## Details for Programmers
It is written in the [Flow-based Programming][fbprog] paradigm where calculations of ball's position,
velocity etc are done by separate modular components running in their own threads of computation
(in this case, core.async go processes). These components are connected using signals (implemented
using core.async channels) to form a network - like an electronic circuit - to build the complete game.
The signals have values which change over time. [`window.requestAnimationFrame`][raf] is used as a
clock to generate the time ticks to run the game.
The very [loose coupling][coupling] (data coupling) caused by the modular design allows one to add
new components in the network without changing other parts of it. In fact, this was first developed
as a usual Pong game and gravitation was added only as an afterthought, with very minimal changes
to the existing code.
Here is how the network of components interconnected with signals looks like:
<pre>
+-d-----------+--------------------------+
v | |
keyboard +-e-> sampler +---k---> paddle-postnr +-d-+ +-> gravitation +--+ |
^ | p a |
t | | | |
| | | | |
+-------+ +-p----------+-|---+ | d
| | +-a-------|-|------+---------------+ |
| v v | | | v
browser +-b--> ticker +-+--t--> ball-postnr +-p-+-|------|------------p-> renderer
^ | ^ | | | ^ ^
| | +-----|---------+ | | | |
s | | l +--d--+ | s t
| | | +-+-----|-------+ | | |
| | p l +-a-|-------|----+ | |
| | v v v v +-l--+ | |
| +---t-> collision-detr | |
| | ^ +-s--+-----------------------+ |
| | s | |
+-----|-------------+-------------+ |
| |
+------------------------------------------------------+
</pre>
Signals
- *b*: ticks from browser
- *t*: game ticks
- *e*: keyboard events
- *k*: keydowns
- *p*: ball position
- *l*: ball velocity
- *a*: ball acceleration
- *d*: paddle positions
- *s*: game state
Components
- *keyboard*: keyboard for user input
- *browser*: browser as the primary source of ticks
- *ticker*: generates game ticks from browser ticks
- *sampler*: samples input signal based on a sampling signal
- *paddle-postnr*: paddle positioner, calculates the position of paddles
- *ball-postnr*: ball positioner, calculates the position of the ball
- *collision-detr*: collision detector, detects collision of the ball with the paddles and the
walls, also calculates the velocity of the ball
- *gravitation*: calculates the acceleration of the ball due to gravitation
- *renderer*: renders the game on screen
This project has been written as an experiment to play with the core.async library and can serve as
a medium sized example project for the same. The main source can be found [here][src].
[pong]: https://en.wikipedia.org/wiki/Pong
[cljs]: https://github.com/clojure/clojurescript
[coreasync]: https://github.com/clojure/core.async
[demo]: http://abhinavsarkar.net/frpong
[fbprog]: https://en.wikipedia.org/wiki/Flow-based_programming
[coupling]: https://en.wikipedia.org/wiki/Coupling_(computer_programming)
[src]: https://github.com/abhin4v/frpong/blob/master/src/cljs/frpong/core.cljs
[raf]: https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame

346
js/frpong.js Normal file
View File

@ -0,0 +1,346 @@
function e(a){throw a;}var h=void 0,m=!0,n=null,r=!1;function aa(){return function(a){return a}}function s(a){return function(){return this[a]}}function ba(a){return function(){return a}}var v,ca=this;function da(a,b){var c=a.split("."),d=ca;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var f;c.length&&(f=c.shift());)!c.length&&b!==h?d[f]=b:d=d[f]?d[f]:d[f]={}}function ea(a){for(var a=a.split("."),b=ca,c;c=a.shift();)if(b[c]!=n)b=b[c];else return n;return b}function fa(){}
function w(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}function ga(a){return"array"==w(a)}function ha(a){var b=w(a);return"array"==b||"object"==b&&"number"==typeof a.length}function y(a){return"string"==typeof a}function ja(a){return"function"==w(a)}function ka(a){var b=typeof a;return"object"==b&&a!=n||"function"==b}function la(a){return a[ma]||(a[ma]=++na)}var ma="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),na=0;
function oa(a,b,c){return a.call.apply(a.bind,arguments)}function pa(a,b,c){a||e(Error());if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function qa(a,b,c){qa=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?oa:pa;return qa.apply(n,arguments)}
function ra(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var sa=Date.now||function(){return+new Date};function ta(a,b){function c(){}c.prototype=b.prototype;a.na=b.prototype;a.prototype=new c;a.prototype.constructor=a};function ua(a){Error.captureStackTrace?Error.captureStackTrace(this,ua):this.stack=Error().stack||"";a&&(this.message=String(a))}ta(ua,Error);ua.prototype.name="CustomError";function wa(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}function xa(a){if(!za.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Aa,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ba,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Ca,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Da,"&quot;"));return a}var Aa=/&/g,Ba=/</g,Ca=/>/g,Da=/\"/g,za=/[&<>\"]/;
function Ea(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b};function Ga(a,b){b.unshift(a);ua.call(this,wa.apply(n,b));b.shift();this.Ag=a}ta(Ga,ua);Ga.prototype.name="AssertionError";function Ha(a,b){e(new Ga("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1)))};var Ia=Array.prototype,Ja=Ia.indexOf?function(a,b,c){return Ia.indexOf.call(a,b,c)}:function(a,b,c){c=c==n?0:0>c?Math.max(0,a.length+c):c;if(y(a))return!y(b)||1!=b.length?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ka=Ia.forEach?function(a,b,c){Ia.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=y(a)?a.split(""):a,g=0;g<d;g++)g in f&&b.call(c,f[g],g,a)},La=Ia.filter?function(a,b,c){return Ia.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=[],g=0,
i=y(a)?a.split(""):a,k=0;k<d;k++)if(k in i){var l=i[k];b.call(c,l,k,a)&&(f[g++]=l)}return f},Ma=Ia.some?function(a,b,c){return Ia.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=y(a)?a.split(""):a,g=0;g<d;g++)if(g in f&&b.call(c,f[g],g,a))return m;return r};function Na(a,b){var c=Ja(a,b);0<=c&&Ia.splice.call(a,c,1)}function Oa(a){return Ia.concat.apply(Ia,arguments)}function Pa(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]};function Qa(a,b){for(var c in a)b.call(h,a[c],c,a)}function Ra(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Sa(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}var Ta="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ua(a,b){for(var c,d,f=1;f<arguments.length;f++){d=arguments[f];for(c in d)a[c]=d[c];for(var g=0;g<Ta.length;g++)c=Ta[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function Va(a,b){var c=Array.prototype.slice.call(arguments),d=c.shift();"undefined"==typeof d&&e(Error("[goog.string.format] Template required"));return d.replace(/%([0\-\ \+]*)(\d+)?(\.(\d+))?([%sfdiu])/g,function(a,b,d,k,l,q,p,u){if("%"==q)return"%";var t=c.shift();"undefined"==typeof t&&e(Error("[goog.string.format] Not enough arguments"));arguments[0]=t;return Va.Ja[q].apply(n,arguments)})}Va.Ja={};
Va.Ja.s=function(a,b,c){return isNaN(c)||""==c||a.length>=c?a:a=-1<b.indexOf("-",0)?a+Array(c-a.length+1).join(" "):Array(c-a.length+1).join(" ")+a};
Va.Ja.f=function(a,b,c,d,f){d=a.toString();isNaN(f)||""==f||(d=a.toFixed(f));var g;g=0>a?"-":0<=b.indexOf("+")?"+":0<=b.indexOf(" ")?" ":"";0<=a&&(d=g+d);if(isNaN(c)||d.length>=c)return d;d=isNaN(f)?Math.abs(a).toString():Math.abs(a).toFixed(f);a=c-d.length-g.length;return d=0<=b.indexOf("-",0)?g+d+Array(a+1).join(" "):g+Array(a+1).join(0<=b.indexOf("0",0)?"0":" ")+d};Va.Ja.d=function(a,b,c,d,f,g,i,k){return Va.Ja.f(parseInt(a,10),b,c,d,0,g,i,k)};Va.Ja.i=Va.Ja.d;Va.Ja.u=Va.Ja.d;function Wa(a,b){a!=n&&this.append.apply(this,arguments)}Wa.prototype.qb="";Wa.prototype.set=function(a){this.qb=""+a};Wa.prototype.append=function(a,b,c){this.qb+=a;if(b!=n)for(var d=1;d<arguments.length;d++)this.qb+=arguments[d];return this};Wa.prototype.toString=s("qb");var Xa;da("cljs.core.set_print_fn_BANG_",aa());function Ya(){return Za(["\ufdd0:flush-on-newline",m,"\ufdd0:readably",m,"\ufdd0:meta",r,"\ufdd0:dup",r],m)}function z(a){return a!=n&&a!==r}function ab(a){return z(a)?r:m}function bb(a){var b=y(a);return b?"\ufdd0"!==a.charAt(0):b}function A(a,b){return a[w(b==n?n:b)]?m:a._?m:r}function B(a,b){var c=b==n?n:b.constructor,c=z(z(c)?c.za:c)?c.Ga:w(b);return Error(["No protocol method ",a," defined for type ",c,": ",b].join(""))}
function cb(a){return Array.prototype.slice.call(arguments)}var db={},eb={};function fb(a){if(a?a.K:a)return a.K(a);var b;var c=fb[w(a==n?n:a)];c?b=c:(c=fb._)?b=c:e(B("ICounted.-count",a));return b.call(n,a)}function gb(a){if(a?a.W:a)return a.W(a);var b;var c=gb[w(a==n?n:a)];c?b=c:(c=gb._)?b=c:e(B("IEmptyableCollection.-empty",a));return b.call(n,a)}var hb={};
function ib(a,b){if(a?a.S:a)return a.S(a,b);var c;var d=ib[w(a==n?n:a)];d?c=d:(d=ib._)?c=d:e(B("ICollection.-conj",a));return c.call(n,a,b)}var jb={},C,kb=n;function lb(a,b){if(a?a.A:a)return a.A(a,b);var c;var d=C[w(a==n?n:a)];d?c=d:(d=C._)?c=d:e(B("IIndexed.-nth",a));return c.call(n,a,b)}function mb(a,b,c){if(a?a.X:a)return a.X(a,b,c);var d;var f=C[w(a==n?n:a)];f?d=f:(f=C._)?d=f:e(B("IIndexed.-nth",a));return d.call(n,a,b,c)}
kb=function(a,b,c){switch(arguments.length){case 2:return lb.call(this,a,b);case 3:return mb.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};kb.b=lb;kb.c=mb;C=kb;var nb={};function ob(a){if(a?a.$:a)return a.$(a);var b;var c=ob[w(a==n?n:a)];c?b=c:(c=ob._)?b=c:e(B("ISeq.-first",a));return b.call(n,a)}function pb(a){if(a?a.ca:a)return a.ca(a);var b;var c=pb[w(a==n?n:a)];c?b=c:(c=pb._)?b=c:e(B("ISeq.-rest",a));return b.call(n,a)}var qb={},rb={},sb,tb=n;
function ub(a,b){if(a?a.V:a)return a.V(a,b);var c;var d=sb[w(a==n?n:a)];d?c=d:(d=sb._)?c=d:e(B("ILookup.-lookup",a));return c.call(n,a,b)}function vb(a,b,c){if(a?a.L:a)return a.L(a,b,c);var d;var f=sb[w(a==n?n:a)];f?d=f:(f=sb._)?d=f:e(B("ILookup.-lookup",a));return d.call(n,a,b,c)}tb=function(a,b,c){switch(arguments.length){case 2:return ub.call(this,a,b);case 3:return vb.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};tb.b=ub;tb.c=vb;sb=tb;
function wb(a,b){if(a?a.Tc:a)return a.Tc(a,b);var c;var d=wb[w(a==n?n:a)];d?c=d:(d=wb._)?c=d:e(B("IAssociative.-contains-key?",a));return c.call(n,a,b)}function xb(a,b,c){if(a?a.Ea:a)return a.Ea(a,b,c);var d;var f=xb[w(a==n?n:a)];f?d=f:(f=xb._)?d=f:e(B("IAssociative.-assoc",a));return d.call(n,a,b,c)}var yb={};function zb(a,b){if(a?a.jd:a)return a.jd(a,b);var c;var d=zb[w(a==n?n:a)];d?c=d:(d=zb._)?c=d:e(B("IMap.-dissoc",a));return c.call(n,a,b)}var Ab={};
function Bb(a){if(a?a.kd:a)return a.kd(a);var b;var c=Bb[w(a==n?n:a)];c?b=c:(c=Bb._)?b=c:e(B("IMapEntry.-key",a));return b.call(n,a)}function Cb(a){if(a?a.de:a)return a.de(a);var b;var c=Cb[w(a==n?n:a)];c?b=c:(c=Cb._)?b=c:e(B("IMapEntry.-val",a));return b.call(n,a)}var Db={};function Eb(a,b){if(a?a.fe:a)return a.fe(0,b);var c;var d=Eb[w(a==n?n:a)];d?c=d:(d=Eb._)?c=d:e(B("ISet.-disjoin",a));return c.call(n,a,b)}var Fb={};
function Gb(a,b,c){if(a?a.md:a)return a.md(a,b,c);var d;var f=Gb[w(a==n?n:a)];f?d=f:(f=Gb._)?d=f:e(B("IVector.-assoc-n",a));return d.call(n,a,b,c)}function Hb(a){if(a?a.Vc:a)return a.Vc(a);var b;var c=Hb[w(a==n?n:a)];c?b=c:(c=Hb._)?b=c:e(B("IDeref.-deref",a));return b.call(n,a)}var Ib={};function Jb(a){if(a?a.F:a)return a.F(a);var b;var c=Jb[w(a==n?n:a)];c?b=c:(c=Jb._)?b=c:e(B("IMeta.-meta",a));return b.call(n,a)}var Kb={};
function Lb(a,b){if(a?a.G:a)return a.G(a,b);var c;var d=Lb[w(a==n?n:a)];d?c=d:(d=Lb._)?c=d:e(B("IWithMeta.-with-meta",a));return c.call(n,a,b)}var Mb={},Nb,Ob=n;function Pb(a,b){if(a?a.Va:a)return a.Va(a,b);var c;var d=Nb[w(a==n?n:a)];d?c=d:(d=Nb._)?c=d:e(B("IReduce.-reduce",a));return c.call(n,a,b)}function Qb(a,b,c){if(a?a.Wa:a)return a.Wa(a,b,c);var d;var f=Nb[w(a==n?n:a)];f?d=f:(f=Nb._)?d=f:e(B("IReduce.-reduce",a));return d.call(n,a,b,c)}
Ob=function(a,b,c){switch(arguments.length){case 2:return Pb.call(this,a,b);case 3:return Qb.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};Ob.b=Pb;Ob.c=Qb;Nb=Ob;function Rb(a,b){if(a?a.P:a)return a.P(a,b);var c;var d=Rb[w(a==n?n:a)];d?c=d:(d=Rb._)?c=d:e(B("IEquiv.-equiv",a));return c.call(n,a,b)}function Sb(a){if(a?a.U:a)return a.U(a);var b;var c=Sb[w(a==n?n:a)];c?b=c:(c=Sb._)?b=c:e(B("IHash.-hash",a));return b.call(n,a)}var Ub={};
function Vb(a){if(a?a.N:a)return a.N(a);var b;var c=Vb[w(a==n?n:a)];c?b=c:(c=Vb._)?b=c:e(B("ISeqable.-seq",a));return b.call(n,a)}var Wb={};function D(a,b){if(a?a.he:a)return a.he(0,b);var c;var d=D[w(a==n?n:a)];d?c=d:(d=D._)?c=d:e(B("IWriter.-write",a));return c.call(n,a,b)}function Xb(a){if(a?a.sf:a)return n;var b;var c=Xb[w(a==n?n:a)];c?b=c:(c=Xb._)?b=c:e(B("IWriter.-flush",a));return b.call(n,a)}var Yb={};
function Zb(a,b,c){if(a?a.M:a)return a.M(a,b,c);var d;var f=Zb[w(a==n?n:a)];f?d=f:(f=Zb._)?d=f:e(B("IPrintWithWriter.-pr-writer",a));return d.call(n,a,b,c)}function $b(a,b,c){if(a?a.ge:a)return a.ge(a,b,c);var d;var f=$b[w(a==n?n:a)];f?d=f:(f=$b._)?d=f:e(B("IWatchable.-notify-watches",a));return d.call(n,a,b,c)}function ac(a){if(a?a.Kb:a)return a.Kb(a);var b;var c=ac[w(a==n?n:a)];c?b=c:(c=ac._)?b=c:e(B("IEditableCollection.-as-transient",a));return b.call(n,a)}
function bc(a,b){if(a?a.gb:a)return a.gb(a,b);var c;var d=bc[w(a==n?n:a)];d?c=d:(d=bc._)?c=d:e(B("ITransientCollection.-conj!",a));return c.call(n,a,b)}function cc(a){if(a?a.tb:a)return a.tb(a);var b;var c=cc[w(a==n?n:a)];c?b=c:(c=cc._)?b=c:e(B("ITransientCollection.-persistent!",a));return b.call(n,a)}function dc(a,b,c){if(a?a.sb:a)return a.sb(a,b,c);var d;var f=dc[w(a==n?n:a)];f?d=f:(f=dc._)?d=f:e(B("ITransientAssociative.-assoc!",a));return d.call(n,a,b,c)}
function ec(a){if(a?a.$d:a)return a.$d();var b;var c=ec[w(a==n?n:a)];c?b=c:(c=ec._)?b=c:e(B("IChunk.-drop-first",a));return b.call(n,a)}function fc(a){if(a?a.Uc:a)return a.Uc(a);var b;var c=fc[w(a==n?n:a)];c?b=c:(c=fc._)?b=c:e(B("IChunkedSeq.-chunked-first",a));return b.call(n,a)}function gc(a){if(a?a.lc:a)return a.lc(a);var b;var c=gc[w(a==n?n:a)];c?b=c:(c=gc._)?b=c:e(B("IChunkedSeq.-chunked-rest",a));return b.call(n,a)}function hc(a){this.Zf=a;this.t=0;this.j=1073741824}
hc.prototype.he=function(a,b){return this.Zf.append(b)};hc.prototype.sf=ba(n);function ic(a){var b=new Wa,c=new hc(b);a.M(a,c,Ya());Xb(c);return""+E(b)}function F(a,b,c,d,f){this.Db=a;this.name=b;this.nb=c;this.hc=d;this.oa=f;this.j=2154168321;this.t=4096}F.prototype.M=function(a,b){return D(b,this.nb)};
F.prototype.U=function(){-1===this.hc&&(this.hc=jc.b?jc.b(G.a?G.a(this.Db):G.call(n,this.Db),G.a?G.a(this.name):G.call(n,this.name)):jc.call(n,G.a?G.a(this.Db):G.call(n,this.Db),G.a?G.a(this.name):G.call(n,this.name)));return this.hc};F.prototype.G=function(a,b){return new F(this.Db,this.name,this.nb,this.hc,b)};F.prototype.F=s("oa");var kc=n,kc=function(a,b,c){switch(arguments.length){case 2:return sb.c(b,this,n);case 3:return sb.c(b,this,c)}e(Error("Invalid arity: "+arguments.length))};
F.prototype.call=kc;F.prototype.apply=function(a,b){a=this;return a.call.apply(a,[a].concat(b.slice()))};F.prototype.P=function(a,b){return b instanceof F?this.nb===b.nb:r};F.prototype.toString=s("nb");function I(a){if(a==n)return n;var b;if(b=a)b=(b=a.j&8388608)?b:a.nc;if(b)return a.N(a);if(a instanceof Array||bb(a))return 0===a.length?n:new lc(a,0);if(A(rb,a))return Vb(a);e(Error([E(a),E("is not ISeqable")].join("")))}
function J(a){if(a==n)return n;var b;if(b=a)b=(b=a.j&64)?b:a.ld;if(b)return a.$(a);a=I(a);return a==n?n:ob(a)}function K(a){if(a!=n){var b;if(b=a)b=(b=a.j&64)?b:a.ld;if(b)return a.ca(a);a=I(a);return a!=n?pb(a):mc}return mc}function L(a){if(a==n)a=n;else{var b;if(b=a)b=(b=a.j&128)?b:a.ee;a=b?a.ha(a):I(K(a))}return a}var M,nc=n;function oc(a,b){var c=a===b;return c?c:Rb(a,b)}function pc(a,b,c){for(;;)if(z(nc.b(a,b)))if(L(c))a=b,b=J(c),c=L(c);else return nc.b(b,J(c));else return r}
function qc(a,b,c){var d=n;2<arguments.length&&(d=N(Array.prototype.slice.call(arguments,2),0));return pc.call(this,a,b,d)}qc.r=2;qc.l=function(a){var b=J(a),a=L(a),c=J(a),a=K(a);return pc(b,c,a)};qc.g=pc;nc=function(a,b,c){switch(arguments.length){case 1:return m;case 2:return oc.call(this,a,b);default:return qc.g(a,b,N(arguments,2))}e(Error("Invalid arity: "+arguments.length))};nc.r=2;nc.l=qc.l;nc.a=ba(m);nc.b=oc;nc.g=qc.g;M=nc;Sb["null"]=ba(0);qb["null"]=m;Db["null"]=m;Eb["null"]=ba(n);
eb["null"]=m;fb["null"]=ba(0);Rb["null"]=function(a,b){return b==n};Kb["null"]=m;Lb["null"]=ba(n);Ib["null"]=m;Jb["null"]=ba(n);gb["null"]=ba(n);yb["null"]=m;zb["null"]=ba(n);Date.prototype.P=function(a,b){var c=b instanceof Date;return c?a.toString()===b.toString():c};Sb.number=function(a){return Math.floor(a)%2147483647};Rb.number=function(a,b){return a===b};Sb["boolean"]=function(a){return a===m?1:0};Ib["function"]=m;Jb["function"]=ba(n);db["function"]=m;Sb._=function(a){return la(a)};
var rc,sc=n;function tc(a,b){var c=fb(a);if(0===c)return b.h?b.h():b.call(n);for(var d=C.b(a,0),f=1;;)if(f<c)d=b.b?b.b(d,C.b(a,f)):b.call(n,d,C.b(a,f)),f+=1;else return d}function uc(a,b,c){for(var d=fb(a),f=0;;)if(f<d)c=b.b?b.b(c,C.b(a,f)):b.call(n,c,C.b(a,f)),f+=1;else return c}function vc(a,b,c,d){for(var f=fb(a);;)if(d<f)c=b.b?b.b(c,C.b(a,d)):b.call(n,c,C.b(a,d)),d+=1;else return c}
sc=function(a,b,c,d){switch(arguments.length){case 2:return tc.call(this,a,b);case 3:return uc.call(this,a,b,c);case 4:return vc.call(this,a,b,c,d)}e(Error("Invalid arity: "+arguments.length))};sc.b=tc;sc.c=uc;sc.n=vc;rc=sc;var wc,xc=n;function yc(a,b){var c=a.length;if(0===a.length)return b.h?b.h():b.call(n);for(var d=a[0],f=1;;)if(f<c)d=b.b?b.b(d,a[f]):b.call(n,d,a[f]),f+=1;else return d}function zc(a,b,c){for(var d=a.length,f=0;;)if(f<d)c=b.b?b.b(c,a[f]):b.call(n,c,a[f]),f+=1;else return c}
function Ac(a,b,c,d){for(var f=a.length;;)if(d<f)c=b.b?b.b(c,a[d]):b.call(n,c,a[d]),d+=1;else return c}xc=function(a,b,c,d){switch(arguments.length){case 2:return yc.call(this,a,b);case 3:return zc.call(this,a,b,c);case 4:return Ac.call(this,a,b,c,d)}e(Error("Invalid arity: "+arguments.length))};xc.b=yc;xc.c=zc;xc.n=Ac;wc=xc;function Bc(a){if(a)var b=a.j&2,a=(b?b:a.mc)?m:a.j?r:A(eb,a);else a=A(eb,a);return a}function Cc(a){if(a)var b=a.j&16,a=(b?b:a.Mb)?m:a.j?r:A(jb,a);else a=A(jb,a);return a}
function lc(a,b){this.e=a;this.p=b;this.t=0;this.j=166199550}v=lc.prototype;v.U=function(a){return Dc.a?Dc.a(a):Dc.call(n,a)};v.ha=function(){return this.p+1<this.e.length?new lc(this.e,this.p+1):n};v.S=function(a,b){return O.b?O.b(b,a):O.call(n,b,a)};v.toString=function(){return ic(this)};v.Va=function(a,b){return wc.n(this.e,b,this.e[this.p],this.p+1)};v.Wa=function(a,b,c){return wc.n(this.e,b,c,this.p)};v.N=aa();v.K=function(){return this.e.length-this.p};v.$=function(){return this.e[this.p]};
v.ca=function(){return this.p+1<this.e.length?new lc(this.e,this.p+1):Ec.h?Ec.h():Ec.call(n)};v.P=function(a,b){return Fc.b?Fc.b(a,b):Fc.call(n,a,b)};v.A=function(a,b){var c=b+this.p;return c<this.e.length?this.e[c]:n};v.X=function(a,b,c){a=b+this.p;return a<this.e.length?this.e[a]:c};v.W=function(){return mc};var Gc,Hc=n;function Ic(a){return Hc.b(a,0)}function Jc(a,b){return b<a.length?new lc(a,b):n}
Hc=function(a,b){switch(arguments.length){case 1:return Ic.call(this,a);case 2:return Jc.call(this,a,b)}e(Error("Invalid arity: "+arguments.length))};Hc.a=Ic;Hc.b=Jc;Gc=Hc;var N,Kc=n;function Lc(a){return Gc.b(a,0)}function Mc(a,b){return Gc.b(a,b)}Kc=function(a,b){switch(arguments.length){case 1:return Lc.call(this,a);case 2:return Mc.call(this,a,b)}e(Error("Invalid arity: "+arguments.length))};Kc.a=Lc;Kc.b=Mc;N=Kc;Mb.array=m;Nb.array=function(a,b){return wc.b(a,b)};
Nb.array=function(a,b,c){return wc.c(a,b,c)};function Nc(a){return J(L(a))}Rb._=function(a,b){return a===b};var Oc,Pc=n;function Qc(a,b){return a!=n?ib(a,b):Ec.a?Ec.a(b):Ec.call(n,b)}function Rc(a,b,c){for(;;)if(z(c))a=Pc.b(a,b),b=J(c),c=L(c);else return Pc.b(a,b)}function Sc(a,b,c){var d=n;2<arguments.length&&(d=N(Array.prototype.slice.call(arguments,2),0));return Rc.call(this,a,b,d)}Sc.r=2;Sc.l=function(a){var b=J(a),a=L(a),c=J(a),a=K(a);return Rc(b,c,a)};Sc.g=Rc;
Pc=function(a,b,c){switch(arguments.length){case 2:return Qc.call(this,a,b);default:return Sc.g(a,b,N(arguments,2))}e(Error("Invalid arity: "+arguments.length))};Pc.r=2;Pc.l=Sc.l;Pc.b=Qc;Pc.g=Sc.g;Oc=Pc;function P(a){if(a!=n){var b;if(b=a)b=(b=a.j&2)?b:a.mc;if(b)a=a.K(a);else if(a instanceof Array)a=a.length;else if(bb(a))a=a.length;else if(A(eb,a))a=fb(a);else a:{a=I(a);for(b=0;;){if(Bc(a)){a=b+fb(a);break a}a=L(a);b+=1}a=h}}else a=0;return a}var Vc,Wc=n;
function Xc(a,b){for(;;){a==n&&e(Error("Index out of bounds"));if(0===b){if(I(a))return J(a);e(Error("Index out of bounds"))}if(Cc(a))return C.b(a,b);if(I(a))var c=L(a),d=b-1,a=c,b=d;else e(Error("Index out of bounds"))}}function Yc(a,b,c){for(;;){if(a==n)return c;if(0===b)return I(a)?J(a):c;if(Cc(a))return C.c(a,b,c);if(I(a))a=L(a),b-=1;else return c}}Wc=function(a,b,c){switch(arguments.length){case 2:return Xc.call(this,a,b);case 3:return Yc.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};
Wc.b=Xc;Wc.c=Yc;Vc=Wc;var R,Zc=n;function $c(a,b){var c;if(a==n)c=n;else{if(c=a)c=(c=a.j&16)?c:a.Mb;c=c?a.A(a,Math.floor(b)):a instanceof Array?b<a.length?a[b]:n:bb(a)?b<a.length?a[b]:n:A(jb,a)?C.b(a,b):Vc.b(a,Math.floor(b))}return c}function ad(a,b,c){if(a!=n){var d;if(d=a)d=(d=a.j&16)?d:a.Mb;a=d?a.X(a,Math.floor(b),c):a instanceof Array?b<a.length?a[b]:c:bb(a)?b<a.length?a[b]:c:A(jb,a)?C.b(a,b):Vc.c(a,Math.floor(b),c)}else a=c;return a}
Zc=function(a,b,c){switch(arguments.length){case 2:return $c.call(this,a,b);case 3:return ad.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};Zc.b=$c;Zc.c=ad;R=Zc;var bd,cd=n;function dd(a,b){var c;if(a==n)c=n;else{if(c=a)c=(c=a.j&256)?c:a.hd;c=c?a.V(a,b):a instanceof Array?b<a.length?a[b]:n:bb(a)?b<a.length?a[b]:n:A(rb,a)?sb.b(a,b):n}return c}
function ed(a,b,c){if(a!=n){var d;if(d=a)d=(d=a.j&256)?d:a.hd;a=d?a.L(a,b,c):a instanceof Array?b<a.length?a[b]:c:bb(a)?b<a.length?a[b]:c:A(rb,a)?sb.c(a,b,c):c}else a=c;return a}cd=function(a,b,c){switch(arguments.length){case 2:return dd.call(this,a,b);case 3:return ed.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};cd.b=dd;cd.c=ed;bd=cd;var fd,gd=n;function hd(a,b,c){return a!=n?xb(a,b,c):id.b?id.b(b,c):id.call(n,b,c)}
function jd(a,b,c,d){for(;;)if(a=gd.c(a,b,c),z(d))b=J(d),c=Nc(d),d=L(L(d));else return a}function kd(a,b,c,d){var f=n;3<arguments.length&&(f=N(Array.prototype.slice.call(arguments,3),0));return jd.call(this,a,b,c,f)}kd.r=3;kd.l=function(a){var b=J(a),a=L(a),c=J(a),a=L(a),d=J(a),a=K(a);return jd(b,c,d,a)};kd.g=jd;gd=function(a,b,c,d){switch(arguments.length){case 3:return hd.call(this,a,b,c);default:return kd.g(a,b,c,N(arguments,3))}e(Error("Invalid arity: "+arguments.length))};gd.r=3;gd.l=kd.l;
gd.c=hd;gd.g=kd.g;fd=gd;function ld(a){var b=ja(a);return b?b:a?z(z(n)?n:a.mf)?m:a.tf?r:A(db,a):A(db,a)}
var od=function md(b,c){var d;if(d=ld(b))d=b?((d=b.j&262144)?d:b.wg)||(b.j?0:A(Kb,b)):A(Kb,b),d=!d;if(d){if(h===Xa){Xa={};Xa=function(b,c,d,f){this.m=b;this.Bd=c;this.fg=d;this.Lf=f;this.t=0;this.j=393217};Xa.za=m;Xa.Ga="cljs.core/t8080";Xa.Fa=function(b,c){return D(c,"cljs.core/t8080")};var f=function(b,c){return nd.b?nd.b(b.Bd,c):nd.call(n,b.Bd,c)};d=function(b,c){var b=this,d=n;1<arguments.length&&(d=N(Array.prototype.slice.call(arguments,1),0));return f.call(this,b,d)};d.r=1;d.l=function(b){var c=
J(b),b=K(b);return f(c,b)};d.g=f;Xa.prototype.call=d;Xa.prototype.apply=function(b,c){b=this;return b.call.apply(b,[b].concat(c.slice()))};Xa.prototype.mf=m;Xa.prototype.F=s("Lf");Xa.prototype.G=function(b,c){return new Xa(this.m,this.Bd,this.fg,c)}}d=new Xa(c,b,md,n);d=md(d,c)}else d=Lb(b,c);return d};function pd(a){var b;b=a?((b=a.j&131072)?b:a.pf)||(a.j?0:A(Ib,a)):A(Ib,a);return b?Jb(a):n}var qd,rd=n;function sd(a,b,c){for(;;)if(a=rd.b(a,b),z(c))b=J(c),c=L(c);else return a}
function td(a,b,c){var d=n;2<arguments.length&&(d=N(Array.prototype.slice.call(arguments,2),0));return sd.call(this,a,b,d)}td.r=2;td.l=function(a){var b=J(a),a=L(a),c=J(a),a=K(a);return sd(b,c,a)};td.g=sd;rd=function(a,b,c){switch(arguments.length){case 1:return a;case 2:return Eb(a,b);default:return td.g(a,b,N(arguments,2))}e(Error("Invalid arity: "+arguments.length))};rd.r=2;rd.l=td.l;rd.a=aa();rd.b=function(a,b){return Eb(a,b)};rd.g=td.g;qd=rd;var ud={},vd=0,G,wd=n;
function xd(a){return wd.b(a,m)}function yd(a,b){var c;((c=y(a))?b:c)?(255<vd&&(ud={},vd=0),c=ud[a],"number"!==typeof c&&(c=Ea(a),ud[a]=c,vd+=1)):c=Sb(a);return c}wd=function(a,b){switch(arguments.length){case 1:return xd.call(this,a);case 2:return yd.call(this,a,b)}e(Error("Invalid arity: "+arguments.length))};wd.a=xd;wd.b=yd;G=wd;function zd(a){if(a)var b=a.j&16384,a=(b?b:a.vg)?m:a.j?r:A(Fb,a);else a=A(Fb,a);return a}function Ad(a){if(a)var b=a.t&512,a=(b?b:a.pg)?m:r;else a=r;return a}
function Bd(a,b,c,d,f){for(;0!==f;)c[d]=a[b],d+=1,f-=1,b+=1}var Cd={};function Dd(a){if(a==n)a=r;else if(a)var b=a.j&64,a=(b?b:a.ld)?m:a.j?r:A(nb,a);else a=A(nb,a);return a}function Ed(a){var b=y(a);return b?"\ufdd0"===a.charAt(0):b}function Fd(a,b){return bd.c(a,b,Cd)===Cd?r:m}
function Gd(a,b){if(a===b)return 0;if(a==n)return-1;if(b==n)return 1;if((a==n?n:a.constructor)===(b==n?n:b.constructor)){var c;if(c=a)c=(c=a.t&2048)?c:a.be;return c?a.ce(a,b):a>b?1:a<b?-1:0}e(Error("compare on non-nil objects of different types"))}var Hd,Id=n;function Jd(a,b){var c=P(a),d=P(b);return c<d?-1:c>d?1:Id.n(a,b,c,0)}function Kd(a,b,c,d){for(;;){var f=Gd(R.b(a,d),R.b(b,d)),g=0===f;if(g?d+1<c:g)d+=1;else return f}}
Id=function(a,b,c,d){switch(arguments.length){case 2:return Jd.call(this,a,b);case 4:return Kd.call(this,a,b,c,d)}e(Error("Invalid arity: "+arguments.length))};Id.b=Jd;Id.n=Kd;Hd=Id;var Ld,Md=n;function Nd(a,b){var c=I(b);return c?Od.c?Od.c(a,J(c),L(c)):Od.call(n,a,J(c),L(c)):a.h?a.h():a.call(n)}function Pd(a,b,c){for(c=I(c);;)if(c)b=a.b?a.b(b,J(c)):a.call(n,b,J(c)),c=L(c);else return b}
Md=function(a,b,c){switch(arguments.length){case 2:return Nd.call(this,a,b);case 3:return Pd.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};Md.b=Nd;Md.c=Pd;Ld=Md;var Od,Qd=n;function Rd(a,b){var c;if(c=b)c=(c=b.j&524288)?c:b.rf;return c?b.Va(b,a):b instanceof Array?wc.b(b,a):bb(b)?wc.b(b,a):A(Mb,b)?Nb.b(b,a):Ld.b(a,b)}function Sd(a,b,c){var d;if(d=c)d=(d=c.j&524288)?d:c.rf;return d?c.Wa(c,a,b):c instanceof Array?wc.c(c,a,b):bb(c)?wc.c(c,a,b):A(Mb,c)?Nb.c(c,a,b):Ld.c(a,b,c)}
Qd=function(a,b,c){switch(arguments.length){case 2:return Rd.call(this,a,b);case 3:return Sd.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};Qd.b=Rd;Qd.c=Sd;Od=Qd;function Td(a){return a-1}function Ud(a){return 0<=a?Math.floor.a?Math.floor.a(a):Math.floor.call(n,a):Math.ceil.a?Math.ceil.a(a):Math.ceil.call(n,a)}function Vd(a){return Ud((a-a%2)/2)}var Wd,Xd=n;function Yd(){return Math.random.h?Math.random.h():Math.random.call(n)}function Zd(a){return a*Xd.h()}
Xd=function(a){switch(arguments.length){case 0:return Yd.call(this);case 1:return Zd.call(this,a)}e(Error("Invalid arity: "+arguments.length))};Xd.h=Yd;Xd.a=Zd;Wd=Xd;function $d(a){return Ud(Wd.a(a))}function ae(a){a-=a>>1&1431655765;a=(a&858993459)+(a>>2&858993459);return 16843009*(a+(a>>4)&252645135)>>24}var be,ce=n;function de(a){return a==n?"":a.toString()}
function ee(a,b){return function(a,b){for(;;)if(z(b))var f=a.append(ce.a(J(b))),g=L(b),a=f,b=g;else return ce.a(a)}.call(n,new Wa(ce.a(a)),b)}function fe(a,b){var c=n;1<arguments.length&&(c=N(Array.prototype.slice.call(arguments,1),0));return ee.call(this,a,c)}fe.r=1;fe.l=function(a){var b=J(a),a=K(a);return ee(b,a)};fe.g=ee;ce=function(a,b){switch(arguments.length){case 0:return"";case 1:return de.call(this,a);default:return fe.g(a,N(arguments,1))}e(Error("Invalid arity: "+arguments.length))};
ce.r=1;ce.l=fe.l;ce.h=ba("");ce.a=de;ce.g=fe.g;be=ce;var E,ge=n;function he(a){return Ed(a)?be.g(":",N([a.substring(2,a.length)],0)):a==n?"":a.toString()}function ie(a,b){return function(a,b){for(;;)if(z(b))var f=a.append(ge.a(J(b))),g=L(b),a=f,b=g;else return be.a(a)}.call(n,new Wa(ge.a(a)),b)}function je(a,b){var c=n;1<arguments.length&&(c=N(Array.prototype.slice.call(arguments,1),0));return ie.call(this,a,c)}je.r=1;je.l=function(a){var b=J(a),a=K(a);return ie(b,a)};je.g=ie;
ge=function(a,b){switch(arguments.length){case 0:return"";case 1:return he.call(this,a);default:return je.g(a,N(arguments,1))}e(Error("Invalid arity: "+arguments.length))};ge.r=1;ge.l=je.l;ge.h=ba("");ge.a=he;ge.g=je.g;E=ge;var ke,le=n,le=function(a,b,c){switch(arguments.length){case 2:return a.substring(b);case 3:return a.substring(b,c)}e(Error("Invalid arity: "+arguments.length))};le.b=function(a,b){return a.substring(b)};le.c=function(a,b,c){return a.substring(b,c)};ke=le;var me,ne=n;
function oe(a){return Ed(a)?a:a instanceof F?be.g("\ufdd0",N([":",pe.a?pe.a(a):pe.call(n,a)],0)):be.g("\ufdd0",N([":",a],0))}function qe(a,b){return ne.a(be.g(a,N(["/",b],0)))}ne=function(a,b){switch(arguments.length){case 1:return oe.call(this,a);case 2:return qe.call(this,a,b)}e(Error("Invalid arity: "+arguments.length))};ne.a=oe;ne.b=qe;me=ne;
function Fc(a,b){var c;c=b?((c=b.j&16777216)?c:b.tg)||(b.j?0:A(Wb,b)):A(Wb,b);if(c)a:{c=I(a);for(var d=I(b);;){if(c==n){c=d==n;break a}if(d!=n&&M.b(J(c),J(d)))c=L(c),d=L(d);else{c=r;break a}}c=h}else c=n;return z(c)?m:r}function jc(a,b){return a^b+2654435769+(a<<6)+(a>>2)}function Dc(a){return Od.c(function(a,c){return jc(a,G.b(c,r))},G.b(J(a),r),L(a))}
function re(a){for(var b=0,a=I(a);;)if(a)var c=J(a),b=(b+(G.a(se.a?se.a(c):se.call(n,c))^G.a(te.a?te.a(c):te.call(n,c))))%4503599627370496,a=L(a);else return b}function ue(a,b,c,d,f){this.m=a;this.Qb=b;this.Sa=c;this.count=d;this.q=f;this.t=0;this.j=65937646}v=ue.prototype;v.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a)};v.ha=function(){return 1===this.count?n:this.Sa};v.S=function(a,b){return new ue(this.m,b,a,this.count+1,n)};v.toString=function(){return ic(this)};
v.Va=function(a,b){return Ld.b(b,a)};v.Wa=function(a,b,c){return Ld.c(b,c,a)};v.N=aa();v.K=s("count");v.$=s("Qb");v.ca=function(){return 1===this.count?mc:this.Sa};v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return new ue(b,this.Qb,this.Sa,this.count,this.q)};v.F=s("m");v.W=function(){return mc};function ve(a){this.m=a;this.t=0;this.j=65413326}v=ve.prototype;v.U=ba(0);v.ha=ba(n);v.S=function(a,b){return new ue(this.m,b,n,1,n)};v.toString=function(){return ic(this)};v.N=ba(n);v.K=ba(0);
v.$=ba(n);v.ca=function(){return mc};v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return new ve(b)};v.F=s("m");v.W=aa();var mc=new ve(n),Ec;function we(a){var b;if(a instanceof lc)b=a.e;else a:{for(b=[];;)if(a!=n)b.push(a.$(a)),a=a.ha(a);else break a;b=h}for(var a=b.length,c=mc;;)if(0<a)var d=a-1,c=c.S(c,b[a-1]),a=d;else return c}function xe(a){var b=n;0<arguments.length&&(b=N(Array.prototype.slice.call(arguments,0),0));return we.call(this,b)}xe.r=0;xe.l=function(a){a=I(a);return we(a)};
xe.g=we;Ec=xe;function ye(a,b,c,d){this.m=a;this.Qb=b;this.Sa=c;this.q=d;this.t=0;this.j=65405164}v=ye.prototype;v.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a)};v.ha=function(){return this.Sa==n?n:Vb(this.Sa)};v.S=function(a,b){return new ye(n,b,a,this.q)};v.toString=function(){return ic(this)};v.N=aa();v.$=s("Qb");v.ca=function(){return this.Sa==n?mc:this.Sa};v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return new ye(b,this.Qb,this.Sa,this.q)};v.F=s("m");
v.W=function(){return od(mc,this.m)};function O(a,b){var c=b==n;if(!c&&(c=b))c=(c=b.j&64)?c:b.ld;return c?new ye(n,a,b,n):new ye(n,a,I(b),n)}Sb.string=function(a){return Ea(a)};function ze(a){this.Ie=a;this.t=0;this.j=1}
var Ae=n,Ae=function(a,b,c){switch(arguments.length){case 2:var d=a,d=this;if(b==n)d=n;else{var f;f=b?((f=b.j&256)?f:b.hd)||(b.j?0:A(rb,b)):A(rb,b);d=f?sb.c(b,d.Ie,n):n}return d;case 3:return d=a,d=this,b==n?d=c:(f=b?((f=b.j&256)?f:b.hd)||(b.j?0:A(rb,b)):A(rb,b),d=f?sb.c(b,d.Ie,c):n),d}e(Error("Invalid arity: "+arguments.length))};ze.prototype.call=Ae;ze.prototype.apply=function(a,b){a=this;return a.call.apply(a,[a].concat(b.slice()))};
var Be=n,Be=function(a,b,c){switch(arguments.length){case 2:return bd.b(b,this.toString());case 3:return bd.c(b,this.toString(),c)}e(Error("Invalid arity: "+arguments.length))};String.prototype.call=Be;String.prototype.apply=function(a,b){return a.call.apply(a,[a].concat(b.slice()))};String.prototype.apply=function(a,b){return 2>b.length?bd.b(b[0],a):bd.c(b[0],a,b[1])};function Ce(a){var b=a.x;if(a.Gd)return b;a.x=b.h?b.h():b.call(n);a.Gd=m;return a.x}
function De(a,b,c,d){this.m=a;this.Gd=b;this.x=c;this.q=d;this.t=0;this.j=31850700}v=De.prototype;v.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a)};v.ha=function(a){return Vb(a.ca(a))};v.S=function(a,b){return O(b,a)};v.toString=function(){return ic(this)};v.N=function(a){return I(Ce(a))};v.$=function(a){return J(Ce(a))};v.ca=function(a){return K(Ce(a))};v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return new De(b,this.Gd,this.x,this.q)};v.F=s("m");v.W=function(){return od(mc,this.m)};
function Ee(a,b){this.J=a;this.end=b;this.t=0;this.j=2}Ee.prototype.K=s("end");Ee.prototype.add=function(a){this.J[this.end]=a;return this.end+=1};Ee.prototype.pa=function(){var a=new Fe(this.J,0,this.end);this.J=n;return a};function Fe(a,b,c){this.e=a;this.I=b;this.end=c;this.t=0;this.j=524306}v=Fe.prototype;v.Va=function(a,b){return wc.n(this.e,b,this.e[this.I],this.I+1)};v.Wa=function(a,b,c){return wc.n(this.e,b,c,this.I)};
v.$d=function(){this.I===this.end&&e(Error("-drop-first of empty chunk"));return new Fe(this.e,this.I+1,this.end)};v.A=function(a,b){return this.e[this.I+b]};v.X=function(a,b,c){return((a=0<=b)?b<this.end-this.I:a)?this.e[this.I+b]:c};v.K=function(){return this.end-this.I};var Ge,He=n;function Ie(a){return new Fe(a,0,a.length)}function Je(a,b){return new Fe(a,b,a.length)}function Ke(a,b,c){return new Fe(a,b,c)}
He=function(a,b,c){switch(arguments.length){case 1:return Ie.call(this,a);case 2:return Je.call(this,a,b);case 3:return Ke.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};He.a=Ie;He.b=Je;He.c=Ke;Ge=He;function Le(a,b,c,d){this.pa=a;this.$a=b;this.m=c;this.q=d;this.j=31850604;this.t=1536}v=Le.prototype;v.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a)};v.S=function(a,b){return O(b,a)};v.toString=function(){return ic(this)};v.N=aa();v.$=function(){return C.b(this.pa,0)};
v.ca=function(){return 1<fb(this.pa)?new Le(ec(this.pa),this.$a,this.m,n):this.$a==n?mc:this.$a};v.ae=function(){return this.$a==n?n:this.$a};v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return new Le(this.pa,this.$a,b,this.q)};v.F=s("m");v.W=function(){return od(mc,this.m)};v.Uc=s("pa");v.lc=function(){return this.$a==n?mc:this.$a};function Me(a,b){return 0===fb(a)?b:new Le(a,b,n,n)}function Ne(a){for(var b=[];;)if(I(a))b.push(J(a)),a=L(a);else return b}
function Oe(a,b){if(Bc(a))return P(a);for(var c=a,d=b,f=0;;){var g;g=(g=0<d)?I(c):g;if(z(g))c=L(c),d-=1,f+=1;else return f}}var Qe=function Pe(b){return b==n?n:L(b)==n?I(J(b)):O(J(b),Pe(L(b)))},Re,Se=n;function Te(a,b,c){return O(a,O(b,c))}function Ue(a,b,c,d){return O(a,O(b,O(c,d)))}function Ve(a,b,c,d,f){return O(a,O(b,O(c,O(d,Qe(f)))))}function We(a,b,c,d,f){var g=n;4<arguments.length&&(g=N(Array.prototype.slice.call(arguments,4),0));return Ve.call(this,a,b,c,d,g)}We.r=4;
We.l=function(a){var b=J(a),a=L(a),c=J(a),a=L(a),d=J(a),a=L(a),f=J(a),a=K(a);return Ve(b,c,d,f,a)};We.g=Ve;Se=function(a,b,c,d,f){switch(arguments.length){case 1:return I(a);case 2:return O(a,b);case 3:return Te.call(this,a,b,c);case 4:return Ue.call(this,a,b,c,d);default:return We.g(a,b,c,d,N(arguments,4))}e(Error("Invalid arity: "+arguments.length))};Se.r=4;Se.l=We.l;Se.a=function(a){return I(a)};Se.b=function(a,b){return O(a,b)};Se.c=Te;Se.n=Ue;Se.g=We.g;Re=Se;
function Xe(a,b,c){var d=I(c);if(0===b)return a.h?a.h():a.call(n);var c=ob(d),f=pb(d);if(1===b)return a.a?a.a(c):a.a?a.a(c):a.call(n,c);var d=ob(f),g=pb(f);if(2===b)return a.b?a.b(c,d):a.b?a.b(c,d):a.call(n,c,d);var f=ob(g),i=pb(g);if(3===b)return a.c?a.c(c,d,f):a.c?a.c(c,d,f):a.call(n,c,d,f);var g=ob(i),k=pb(i);if(4===b)return a.n?a.n(c,d,f,g):a.n?a.n(c,d,f,g):a.call(n,c,d,f,g);i=ob(k);k=pb(k);if(5===b)return a.T?a.T(c,d,f,g,i):a.T?a.T(c,d,f,g,i):a.call(n,c,d,f,g,i);var a=ob(k),l=pb(k);if(6===b)return a.ga?
a.ga(c,d,f,g,i,a):a.ga?a.ga(c,d,f,g,i,a):a.call(n,c,d,f,g,i,a);var k=ob(l),q=pb(l);if(7===b)return a.rb?a.rb(c,d,f,g,i,a,k):a.rb?a.rb(c,d,f,g,i,a,k):a.call(n,c,d,f,g,i,a,k);var l=ob(q),p=pb(q);if(8===b)return a.Lb?a.Lb(c,d,f,g,i,a,k,l):a.Lb?a.Lb(c,d,f,g,i,a,k,l):a.call(n,c,d,f,g,i,a,k,l);var q=ob(p),u=pb(p);if(9===b)return a.gd?a.gd(c,d,f,g,i,a,k,l,q):a.gd?a.gd(c,d,f,g,i,a,k,l,q):a.call(n,c,d,f,g,i,a,k,l,q);var p=ob(u),t=pb(u);if(10===b)return a.Wc?a.Wc(c,d,f,g,i,a,k,l,q,p):a.Wc?a.Wc(c,d,f,g,i,a,
k,l,q,p):a.call(n,c,d,f,g,i,a,k,l,q,p);var u=ob(t),x=pb(t);if(11===b)return a.Xc?a.Xc(c,d,f,g,i,a,k,l,q,p,u):a.Xc?a.Xc(c,d,f,g,i,a,k,l,q,p,u):a.call(n,c,d,f,g,i,a,k,l,q,p,u);var t=ob(x),j=pb(x);if(12===b)return a.Yc?a.Yc(c,d,f,g,i,a,k,l,q,p,u,t):a.Yc?a.Yc(c,d,f,g,i,a,k,l,q,p,u,t):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t);var x=ob(j),H=pb(j);if(13===b)return a.Zc?a.Zc(c,d,f,g,i,a,k,l,q,p,u,t,x):a.Zc?a.Zc(c,d,f,g,i,a,k,l,q,p,u,t,x):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t,x);var j=ob(H),U=pb(H);if(14===b)return a.$c?
a.$c(c,d,f,g,i,a,k,l,q,p,u,t,x,j):a.$c?a.$c(c,d,f,g,i,a,k,l,q,p,u,t,x,j):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t,x,j);var H=ob(U),Q=pb(U);if(15===b)return a.ad?a.ad(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H):a.ad?a.ad(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t,x,j,H);var U=ob(Q),va=pb(Q);if(16===b)return a.bd?a.bd(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U):a.bd?a.bd(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U);var Q=ob(va),Fa=pb(va);if(17===b)return a.cd?a.cd(c,d,f,g,i,a,k,l,
q,p,u,t,x,j,H,U,Q):a.cd?a.cd(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q);var va=ob(Fa),Tb=pb(Fa);if(18===b)return a.dd?a.dd(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va):a.dd?a.dd(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va);Fa=ob(Tb);Tb=pb(Tb);if(19===b)return a.ed?a.ed(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va,Fa):a.ed?a.ed(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va,Fa):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va,Fa);var $a=ob(Tb);pb(Tb);
if(20===b)return a.fd?a.fd(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va,Fa,$a):a.fd?a.fd(c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va,Fa,$a):a.call(n,c,d,f,g,i,a,k,l,q,p,u,t,x,j,H,U,Q,va,Fa,$a);e(Error("Only up to 20 arguments supported on functions"))}var nd,Ye=n;function Ze(a,b){var c=a.r;if(a.l){var d=Oe(b,c+1);return d<=c?Xe(a,d,b):a.l(b)}return a.apply(a,Ne(b))}function $e(a,b,c){b=Re.b(b,c);c=a.r;if(a.l){var d=Oe(b,c+1);return d<=c?Xe(a,d,b):a.l(b)}return a.apply(a,Ne(b))}
function af(a,b,c,d){b=Re.c(b,c,d);c=a.r;return a.l?(d=Oe(b,c+1),d<=c?Xe(a,d,b):a.l(b)):a.apply(a,Ne(b))}function bf(a,b,c,d,f){b=Re.n(b,c,d,f);c=a.r;return a.l?(d=Oe(b,c+1),d<=c?Xe(a,d,b):a.l(b)):a.apply(a,Ne(b))}function cf(a,b,c,d,f,g){b=O(b,O(c,O(d,O(f,Qe(g)))));c=a.r;return a.l?(d=Oe(b,c+1),d<=c?Xe(a,d,b):a.l(b)):a.apply(a,Ne(b))}function df(a,b,c,d,f,g){var i=n;5<arguments.length&&(i=N(Array.prototype.slice.call(arguments,5),0));return cf.call(this,a,b,c,d,f,i)}df.r=5;
df.l=function(a){var b=J(a),a=L(a),c=J(a),a=L(a),d=J(a),a=L(a),f=J(a),a=L(a),g=J(a),a=K(a);return cf(b,c,d,f,g,a)};df.g=cf;Ye=function(a,b,c,d,f,g){switch(arguments.length){case 2:return Ze.call(this,a,b);case 3:return $e.call(this,a,b,c);case 4:return af.call(this,a,b,c,d);case 5:return bf.call(this,a,b,c,d,f);default:return df.g(a,b,c,d,f,N(arguments,5))}e(Error("Invalid arity: "+arguments.length))};Ye.r=5;Ye.l=df.l;Ye.b=Ze;Ye.c=$e;Ye.n=af;Ye.T=bf;Ye.g=df.g;nd=Ye;var ef,ff=n;
function gf(a,b){return!M.b(a,b)}function hf(a,b,c){return ab(nd.n(M,a,b,c))}function jf(a,b,c){var d=n;2<arguments.length&&(d=N(Array.prototype.slice.call(arguments,2),0));return hf.call(this,a,b,d)}jf.r=2;jf.l=function(a){var b=J(a),a=L(a),c=J(a),a=K(a);return hf(b,c,a)};jf.g=hf;ff=function(a,b,c){switch(arguments.length){case 1:return r;case 2:return gf.call(this,a,b);default:return jf.g(a,b,N(arguments,2))}e(Error("Invalid arity: "+arguments.length))};ff.r=2;ff.l=jf.l;ff.a=ba(r);ff.b=gf;
ff.g=jf.g;ef=ff;function kf(a,b){for(;;){if(I(b)==n)return m;if(z(a.a?a.a(J(b)):a.call(n,J(b))))var c=a,d=L(b),a=c,b=d;else return r}}function lf(a){return a}function mf(a){function b(b){0<arguments.length&&N(Array.prototype.slice.call(arguments,0),0);return a}b.r=0;b.l=function(b){I(b);return a};b.g=function(){return a};return b}var nf,of=n;
function pf(a,b){return new De(n,r,function(){var c=I(b);if(c){if(Ad(c)){for(var d=fc(c),f=P(d),g=new Ee(Array(f),0),i=0;;)if(i<f){var k=a.a?a.a(C.b(d,i)):a.call(n,C.b(d,i));g.add(k);i+=1}else break;return Me(g.pa(),of.b(a,gc(c)))}return O(a.a?a.a(J(c)):a.call(n,J(c)),of.b(a,K(c)))}return n},n)}function qf(a,b,c){return new De(n,r,function(){var d=I(b),f=I(c);return(d?f:d)?O(a.b?a.b(J(d),J(f)):a.call(n,J(d),J(f)),of.c(a,K(d),K(f))):n},n)}
function rf(a,b,c,d){return new De(n,r,function(){var f=I(b),g=I(c),i=I(d);return(f?g?i:g:f)?O(a.c?a.c(J(f),J(g),J(i)):a.call(n,J(f),J(g),J(i)),of.n(a,K(f),K(g),K(i))):n},n)}function sf(a,b,c,d,f){return of.b(function(b){return nd.b(a,b)},function i(a){return new De(n,r,function(){var b=of.b(I,a);return kf(lf,b)?O(of.b(J,b),i(of.b(K,b))):n},n)}(Oc.g(f,d,N([c,b],0))))}
function tf(a,b,c,d,f){var g=n;4<arguments.length&&(g=N(Array.prototype.slice.call(arguments,4),0));return sf.call(this,a,b,c,d,g)}tf.r=4;tf.l=function(a){var b=J(a),a=L(a),c=J(a),a=L(a),d=J(a),a=L(a),f=J(a),a=K(a);return sf(b,c,d,f,a)};tf.g=sf;of=function(a,b,c,d,f){switch(arguments.length){case 2:return pf.call(this,a,b);case 3:return qf.call(this,a,b,c);case 4:return rf.call(this,a,b,c,d);default:return tf.g(a,b,c,d,N(arguments,4))}e(Error("Invalid arity: "+arguments.length))};of.r=4;of.l=tf.l;
of.b=pf;of.c=qf;of.n=rf;of.g=tf.g;nf=of;var vf=function uf(b,c){return new De(n,r,function(){if(0<b){var d=I(c);return d?O(J(d),uf(b-1,K(d))):n}return n},n)},wf,xf=n;function yf(a){return new De(n,r,function(){return O(a.h?a.h():a.call(n),xf.a(a))},n)}function zf(a,b){return vf(a,xf.a(b))}xf=function(a,b){switch(arguments.length){case 1:return yf.call(this,a);case 2:return zf.call(this,a,b)}e(Error("Invalid arity: "+arguments.length))};xf.a=yf;xf.b=zf;wf=xf;
function Af(a,b){var c;if(a!=n){if(c=a)c=(c=a.t&4)?c:a.rg;c?(c=Od.c(bc,ac(a),b),c=cc(c)):c=Od.c(ib,a,b)}else c=Od.c(Oc,mc,b);return c}function Bf(a,b){this.w=a;this.e=b}function Cf(a){a=a.k;return 32>a?0:a-1>>>5<<5}function Df(a,b,c){for(;;){if(0===b)return c;var d=new Bf(a,Array(32));d.e[0]=c;c=d;b-=5}}var Ff=function Ef(b,c,d,f){var g=new Bf(d.w,d.e.slice()),i=b.k-1>>>c&31;5===c?g.e[i]=f:(d=d.e[i],b=d!=n?Ef(b,c-5,d,f):Df(n,c-5,f),g.e[i]=b);return g};
function Gf(a,b){e(Error([E("No item "),E(a),E(" in vector of length "),E(b)].join("")))}function Hf(a,b){var c=0<=b;if(c?b<a.k:c){if(b>=Cf(a))return a.z;for(var c=a.root,d=a.shift;;)if(0<d)var f=d-5,c=c.e[b>>>d&31],d=f;else return c.e}else return Gf(b,a.k)}var Jf=function If(b,c,d,f,g){var i=new Bf(d.w,d.e.slice());if(0===c)i.e[f&31]=g;else{var k=f>>>c&31,b=If(b,c-5,d.e[k],f,g);i.e[k]=b}return i};
function Kf(a,b,c,d,f,g){this.m=a;this.k=b;this.shift=c;this.root=d;this.z=f;this.q=g;this.t=4;this.j=167668511}v=Kf.prototype;v.Kb=function(){return new Lf(this.k,this.shift,Mf.a?Mf.a(this.root):Mf.call(n,this.root),Nf.a?Nf.a(this.z):Nf.call(n,this.z))};v.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a)};v.V=function(a,b){return a.X(a,b,n)};v.L=function(a,b,c){return a.X(a,b,c)};
v.Ea=function(a,b,c){var d=0<=b;if(d?b<this.k:d)return Cf(a)<=b?(a=this.z.slice(),a[b&31]=c,new Kf(this.m,this.k,this.shift,this.root,a,n)):new Kf(this.m,this.k,this.shift,Jf(a,this.shift,this.root,b,c),this.z,n);if(b===this.k)return a.S(a,c);e(Error([E("Index "),E(b),E(" out of bounds [0,"),E(this.k),E("]")].join("")))};var Of=n,Of=function(a,b,c){switch(arguments.length){case 2:return this.A(this,b);case 3:return this.X(this,b,c)}e(Error("Invalid arity: "+arguments.length))};v=Kf.prototype;
v.call=Of;v.apply=function(a,b){a=this;return a.call.apply(a,[a].concat(b.slice()))};v.S=function(a,b){if(32>this.k-Cf(a)){var c=this.z.slice();c.push(b);return new Kf(this.m,this.k+1,this.shift,this.root,c,n)}var d=this.k>>>5>1<<this.shift,c=d?this.shift+5:this.shift;if(d){d=new Bf(n,Array(32));d.e[0]=this.root;var f=Df(n,this.shift,new Bf(n,this.z));d.e[1]=f}else d=Ff(a,this.shift,this.root,new Bf(n,this.z));return new Kf(this.m,this.k+1,c,d,[b],n)};v.kd=function(a){return a.A(a,0)};
v.de=function(a){return a.A(a,1)};v.toString=function(){return ic(this)};v.Va=function(a,b){return rc.b(a,b)};v.Wa=function(a,b,c){return rc.c(a,b,c)};v.N=function(a){return 0===this.k?n:32>this.k?N.a(this.z):Pf.c?Pf.c(a,0,0):Pf.call(n,a,0,0)};v.K=s("k");v.md=function(a,b,c){return a.Ea(a,b,c)};v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return new Kf(b,this.k,this.shift,this.root,this.z,this.q)};v.F=s("m");v.A=function(a,b){return Hf(a,b)[b&31]};
v.X=function(a,b,c){var d=0<=b;return(d?b<this.k:d)?a.A(a,b):c};v.W=function(){return od(Qf,this.m)};var Rf=new Bf(n,Array(32)),Qf=new Kf(n,0,5,Rf,[],0);function S(a){var b=a.length;if(32>b)return new Kf(n,b,5,Rf,a,n);for(var c=a.slice(0,32),d=32,f=ac(new Kf(n,32,5,Rf,c,n));;)if(d<b)c=d+1,f=bc(f,a[d]),d=c;else return cc(f)}function Sf(a){return cc(Od.c(bc,ac(Qf),a))}function Tf(a){var b=n;0<arguments.length&&(b=N(Array.prototype.slice.call(arguments,0),0));return Sf(b)}Tf.r=0;
Tf.l=function(a){a=I(a);return Sf(a)};Tf.g=function(a){return Sf(a)};function Uf(a,b,c,d,f,g){this.R=a;this.la=b;this.p=c;this.I=d;this.m=f;this.q=g;this.j=32243948;this.t=1536}v=Uf.prototype;v.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a)};v.ha=function(a){return this.I+1<this.la.length?(a=Pf.n?Pf.n(this.R,this.la,this.p,this.I+1):Pf.call(n,this.R,this.la,this.p,this.I+1),a==n?n:a):a.ae(a)};v.S=function(a,b){return O(b,a)};v.toString=function(){return ic(this)};
v.Va=function(a,b){return rc.b(Vf.c?Vf.c(this.R,this.p+this.I,P(this.R)):Vf.call(n,this.R,this.p+this.I,P(this.R)),b)};v.Wa=function(a,b,c){return rc.c(Vf.c?Vf.c(this.R,this.p+this.I,P(this.R)):Vf.call(n,this.R,this.p+this.I,P(this.R)),b,c)};v.N=aa();v.$=function(){return this.la[this.I]};v.ca=function(a){return this.I+1<this.la.length?(a=Pf.n?Pf.n(this.R,this.la,this.p,this.I+1):Pf.call(n,this.R,this.la,this.p,this.I+1),a==n?mc:a):a.lc(a)};
v.ae=function(){var a=this.la.length,a=this.p+a<fb(this.R)?Pf.c?Pf.c(this.R,this.p+a,0):Pf.call(n,this.R,this.p+a,0):n;return a==n?n:a};v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return Pf.T?Pf.T(this.R,this.la,this.p,this.I,b):Pf.call(n,this.R,this.la,this.p,this.I,b)};v.W=function(){return od(Qf,this.m)};v.Uc=function(){return Ge.b(this.la,this.I)};v.lc=function(){var a=this.la.length,a=this.p+a<fb(this.R)?Pf.c?Pf.c(this.R,this.p+a,0):Pf.call(n,this.R,this.p+a,0):n;return a==n?mc:a};
var Pf,Wf=n;function Xf(a,b,c){return new Uf(a,Hf(a,b),b,c,n,n)}function Yf(a,b,c,d){return new Uf(a,b,c,d,n,n)}function Zf(a,b,c,d,f){return new Uf(a,b,c,d,f,n)}Wf=function(a,b,c,d,f){switch(arguments.length){case 3:return Xf.call(this,a,b,c);case 4:return Yf.call(this,a,b,c,d);case 5:return Zf.call(this,a,b,c,d,f)}e(Error("Invalid arity: "+arguments.length))};Wf.c=Xf;Wf.n=Yf;Wf.T=Zf;Pf=Wf;function $f(a,b,c,d,f){this.m=a;this.Da=b;this.start=c;this.end=d;this.q=f;this.t=0;this.j=32400159}
$f.prototype.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a)};$f.prototype.V=function(a,b){return a.X(a,b,n)};$f.prototype.L=function(a,b,c){return a.X(a,b,c)};$f.prototype.Ea=function(a,b,c){var d=this,f=d.start+b;return ag.T?ag.T(d.m,fd.c(d.Da,f,c),d.start,function(){var a=d.end,b=f+1;return a>b?a:b}(),n):ag.call(n,d.m,fd.c(d.Da,f,c),d.start,function(){var a=d.end,b=f+1;return a>b?a:b}(),n)};
var bg=n,bg=function(a,b,c){switch(arguments.length){case 2:return this.A(this,b);case 3:return this.X(this,b,c)}e(Error("Invalid arity: "+arguments.length))};v=$f.prototype;v.call=bg;v.apply=function(a,b){a=this;return a.call.apply(a,[a].concat(b.slice()))};v.S=function(a,b){return ag.T?ag.T(this.m,Gb(this.Da,this.end,b),this.start,this.end+1,n):ag.call(n,this.m,Gb(this.Da,this.end,b),this.start,this.end+1,n)};v.toString=function(){return ic(this)};v.Va=function(a,b){return rc.b(a,b)};
v.Wa=function(a,b,c){return rc.c(a,b,c)};v.N=function(){var a=this;return function c(d){return d===a.end?n:O(C.b(a.Da,d),new De(n,r,function(){return c(d+1)},n))}(a.start)};v.K=function(){return this.end-this.start};v.md=function(a,b,c){return a.Ea(a,b,c)};v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return ag.T?ag.T(b,this.Da,this.start,this.end,this.q):ag.call(n,b,this.Da,this.start,this.end,this.q)};v.F=s("m");
v.A=function(a,b){var c=0>b;return(c?c:this.end<=this.start+b)?Gf(b,this.end-this.start):C.b(this.Da,this.start+b)};v.X=function(a,b,c){return((a=0>b)?a:this.end<=this.start+b)?c:C.c(this.Da,this.start+b,c)};v.W=function(){return od(Qf,this.m)};function ag(a,b,c,d,f){for(;;)if(b instanceof $f)var g=b.start+c,i=b.start+d,b=b.Da,c=g,d=i;else{var k=P(b);(function(){var a=0>c;return a||(a=0>d)?a:(a=c>k)?a:d>k})()&&e(Error("Index out of bounds"));return new $f(a,b,c,d,f)}}var Vf,cg=n;
function dg(a,b){return cg.c(a,b,P(a))}function eg(a,b,c){return ag(n,a,b,c,n)}cg=function(a,b,c){switch(arguments.length){case 2:return dg.call(this,a,b);case 3:return eg.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};cg.b=dg;cg.c=eg;Vf=cg;function Mf(a){return new Bf({},a.e.slice())}function Nf(a){var b=Array(32);Bd(a,0,b,0,a.length);return b}
var gg=function fg(b,c,d,f){var d=b.root.w===d.w?d:new Bf(b.root.w,d.e.slice()),g=b.k-1>>>c&31;if(5===c)b=f;else var i=d.e[g],b=i!=n?fg(b,c-5,i,f):Df(b.root.w,c-5,f);d.e[g]=b;return d};function Lf(a,b,c,d){this.k=a;this.shift=b;this.root=c;this.z=d;this.j=275;this.t=88}var hg=n,hg=function(a,b,c){switch(arguments.length){case 2:return this.V(this,b);case 3:return this.L(this,b,c)}e(Error("Invalid arity: "+arguments.length))};v=Lf.prototype;v.call=hg;
v.apply=function(a,b){a=this;return a.call.apply(a,[a].concat(b.slice()))};v.V=function(a,b){return a.X(a,b,n)};v.L=function(a,b,c){return a.X(a,b,c)};v.A=function(a,b){if(this.root.w)return Hf(a,b)[b&31];e(Error("nth after persistent!"))};v.X=function(a,b,c){var d=0<=b;return(d?b<this.k:d)?a.A(a,b):c};v.K=function(){if(this.root.w)return this.k;e(Error("count after persistent!"))};
v.sb=function(a,b,c){var d;a:{if(a.root.w){var f=0<=b;if(f?b<a.k:f){Cf(a)<=b?a.z[b&31]=c:(d=function i(d,f){var q=a.root.w===f.w?f:new Bf(a.root.w,f.e.slice());if(0===d)q.e[b&31]=c;else{var p=b>>>d&31,u=i(d-5,q.e[p]);q.e[p]=u}return q}.call(n,a.shift,a.root),a.root=d);d=a;break a}if(b===a.k){d=a.gb(a,c);break a}e(Error([E("Index "),E(b),E(" out of bounds for TransientVector of length"),E(a.k)].join("")))}e(Error("assoc! after persistent!"))}return d};
v.gb=function(a,b){if(this.root.w){if(32>this.k-Cf(a))this.z[this.k&31]=b;else{var c=new Bf(this.root.w,this.z),d=Array(32);d[0]=b;this.z=d;if(this.k>>>5>1<<this.shift){var d=Array(32),f=this.shift+5;d[0]=this.root;d[1]=Df(this.root.w,this.shift,c);this.root=new Bf(this.root.w,d);this.shift=f}else this.root=gg(a,this.shift,this.root,c)}this.k+=1;return a}e(Error("conj! after persistent!"))};
v.tb=function(a){if(this.root.w){this.root.w=n;var a=this.k-Cf(a),b=Array(a);Bd(this.z,0,b,0,a);return new Kf(n,this.k,this.shift,this.root,b,n)}e(Error("persistent! called twice"))};function ig(){this.t=0;this.j=2097152}ig.prototype.P=ba(r);var jg=new ig;function kg(a,b){var c;c=b==n?0:b?((c=b.j&1024)?c:b.sg)||(b.j?0:A(yb,b)):A(yb,b);c=c?P(a)===P(b)?kf(lf,nf.b(function(a){return M.b(bd.c(b,J(a),jg),Nc(a))},a)):n:n;return z(c)?m:r}
function lg(a,b){var c=a.e,d=y(b);if(d?d:"number"===typeof b)a:{for(var d=c.length,f=0;;){if(d<=f){c=-1;break a}if(b===c[f]){c=f;break a}f+=2}c=h}else if(b instanceof F)a:{for(var d=c.length,f=b.nb,g=0;;){if(d<=g){c=-1;break a}var i=c[g],k=i instanceof F;if(k?f===i.nb:k){c=g;break a}g+=2}c=h}else if(b==n)a:{d=c.length;for(f=0;;){if(d<=f){c=-1;break a}if(c[f]==n){c=f;break a}f+=2}c=h}else a:{d=c.length;for(f=0;;){if(d<=f){c=-1;break a}if(M.b(b,c[f])){c=f;break a}f+=2}c=h}return c}
function mg(a,b,c){this.e=a;this.p=b;this.oa=c;this.t=0;this.j=31850702}v=mg.prototype;v.U=function(a){return Dc(a)};v.ha=function(){return this.p<this.e.length-2?new mg(this.e,this.p+2,this.oa):n};v.S=function(a,b){return O(b,a)};v.toString=function(){return ic(this)};v.N=aa();v.K=function(){return(this.e.length-this.p)/2};v.$=function(){return S([this.e[this.p],this.e[this.p+1]])};v.ca=function(){return this.p<this.e.length-2?new mg(this.e,this.p+2,this.oa):mc};v.P=function(a,b){return Fc(a,b)};
v.G=function(a,b){return new mg(this.e,this.p,b)};v.F=s("oa");v.W=function(){return od(mc,this.oa)};function ng(a,b,c,d){this.m=a;this.k=b;this.e=c;this.q=d;this.t=4;this.j=16123663}v=ng.prototype;v.Kb=function(){return new og({},this.e.length,this.e.slice())};v.U=function(a){var b=this.q;return b!=n?b:this.q=a=re(a)};v.V=function(a,b){return a.L(a,b,n)};v.L=function(a,b,c){a=lg(a,b);return-1===a?c:this.e[a+1]};
v.Ea=function(a,b,c){var d=lg(a,b);if(-1===d){if(this.k<pg){for(var d=a.e,a=d.length,f=Array(a+2),g=0;;)if(g<a)f[g]=d[g],g+=1;else break;f[a]=b;f[a+1]=c;return new ng(this.m,this.k+1,f,n)}return Lb(xb(Af(qg,a),b,c),this.m)}if(c===this.e[d+1])return a;b=this.e.slice();b[d+1]=c;return new ng(this.m,this.k,b,n)};v.Tc=function(a,b){return-1!==lg(a,b)};var rg=n,rg=function(a,b,c){switch(arguments.length){case 2:return this.V(this,b);case 3:return this.L(this,b,c)}e(Error("Invalid arity: "+arguments.length))};
v=ng.prototype;v.call=rg;v.apply=function(a,b){a=this;return a.call.apply(a,[a].concat(b.slice()))};v.S=function(a,b){return zd(b)?a.Ea(a,C.b(b,0),C.b(b,1)):Od.c(ib,a,b)};v.toString=function(){return ic(this)};v.N=function(){return 0<=this.e.length-2?new mg(this.e,0,n):n};v.K=s("k");v.P=function(a,b){return kg(a,b)};v.G=function(a,b){return new ng(b,this.k,this.e,this.q)};v.F=s("m");v.W=function(){return Lb(sg,this.m)};
v.jd=function(a,b){if(0<=lg(a,b)){var c=this.e.length,d=c-2;if(0===d)return a.W(a);for(var d=Array(d),f=0,g=0;;){if(f>=c)return new ng(this.m,this.k-1,d,n);M.b(b,this.e[f])||(d[g]=this.e[f],d[g+1]=this.e[f+1],g+=2);f+=2}}else return a};var sg=new ng(n,0,[],n),pg=8;function Za(a,b){var c=b?a:a.slice();return new ng(n,c.length/2,c,n)}function og(a,b,c){this.vb=a;this.lb=b;this.e=c;this.t=56;this.j=258}v=og.prototype;
v.sb=function(a,b,c){if(z(this.vb)){var d=lg(a,b);if(-1===d){if(this.lb+2<=2*pg)return this.lb+=2,this.e.push(b),this.e.push(c),a;a=tg.b?tg.b(this.lb,this.e):tg.call(n,this.lb,this.e);return dc(a,b,c)}c!==this.e[d+1]&&(this.e[d+1]=c);return a}e(Error("assoc! after persistent!"))};
v.gb=function(a,b){if(z(this.vb)){var c;c=b?((c=b.j&2048)?c:b.of)||(b.j?0:A(Ab,b)):A(Ab,b);if(c)return a.sb(a,se.a?se.a(b):se.call(n,b),te.a?te.a(b):te.call(n,b));c=I(b);for(var d=a;;){var f=J(c);if(z(f))c=L(c),d=d.sb(d,se.a?se.a(f):se.call(n,f),te.a?te.a(f):te.call(n,f));else return d}}else e(Error("conj! after persistent!"))};v.tb=function(){if(z(this.vb))return this.vb=r,new ng(n,Vd(this.lb),this.e,n);e(Error("persistent! called twice"))};v.V=function(a,b){return a.L(a,b,n)};
v.L=function(a,b,c){if(z(this.vb))return a=lg(a,b),-1===a?c:this.e[a+1];e(Error("lookup after persistent!"))};v.K=function(){if(z(this.vb))return Vd(this.lb);e(Error("count after persistent!"))};function tg(a,b){for(var c=ac(qg),d=0;;)if(d<a)c=dc(c,b[d],b[d+1]),d+=2;else return c}function ug(){this.Z=r}function vg(a,b){return y(a)?a===b:M.b(a,b)}var wg,xg=n;function yg(a,b,c){a=a.slice();a[b]=c;return a}function zg(a,b,c,d,f){a=a.slice();a[b]=c;a[d]=f;return a}
xg=function(a,b,c,d,f){switch(arguments.length){case 3:return yg.call(this,a,b,c);case 5:return zg.call(this,a,b,c,d,f)}e(Error("Invalid arity: "+arguments.length))};xg.c=yg;xg.T=zg;wg=xg;function Ag(a,b){var c=Array(a.length-2);Bd(a,0,c,0,2*b);Bd(a,2*(b+1),c,2*b,c.length-2*b);return c}var Bg,Cg=n;function Dg(a,b,c,d){a=a.wb(b);a.e[c]=d;return a}function Eg(a,b,c,d,f,g){a=a.wb(b);a.e[c]=d;a.e[f]=g;return a}
Cg=function(a,b,c,d,f,g){switch(arguments.length){case 4:return Dg.call(this,a,b,c,d);case 6:return Eg.call(this,a,b,c,d,f,g)}e(Error("Invalid arity: "+arguments.length))};Cg.n=Dg;Cg.ga=Eg;Bg=Cg;function Fg(a,b,c){this.w=a;this.D=b;this.e=c}v=Fg.prototype;
v.sa=function(a,b,c,d,f,g){var i=1<<(c>>>b&31),k=ae(this.D&i-1);if(0===(this.D&i)){var l=ae(this.D);if(2*l<this.e.length){a=this.wb(a);b=a.e;g.Z=m;a:{c=2*(l-k);g=2*k+(c-1);for(l=2*(k+1)+(c-1);;){if(0===c)break a;b[l]=b[g];l-=1;c-=1;g-=1}}b[2*k]=d;b[2*k+1]=f;a.D|=i;return a}if(16<=l){k=Array(32);k[c>>>b&31]=Gg.sa(a,b+5,c,d,f,g);for(f=d=0;;)if(32>d)0!==(this.D>>>d&1)&&(k[d]=this.e[f]!=n?Gg.sa(a,b+5,G.a(this.e[f]),this.e[f],this.e[f+1],g):this.e[f+1],f+=2),d+=1;else break;return new Hg(a,l+1,k)}b=Array(2*
(l+4));Bd(this.e,0,b,0,2*k);b[2*k]=d;b[2*k+1]=f;Bd(this.e,2*k,b,2*(k+1),2*(l-k));g.Z=m;a=this.wb(a);a.e=b;a.D|=i;return a}l=this.e[2*k];i=this.e[2*k+1];if(l==n)return l=i.sa(a,b+5,c,d,f,g),l===i?this:Bg.n(this,a,2*k+1,l);if(vg(d,l))return f===i?this:Bg.n(this,a,2*k+1,f);g.Z=m;return Bg.ga(this,a,2*k,n,2*k+1,Ig.rb?Ig.rb(a,b+5,l,i,c,d,f):Ig.call(n,a,b+5,l,i,c,d,f))};v.Ub=function(){return Jg.a?Jg.a(this.e):Jg.call(n,this.e)};
v.wb=function(a){if(a===this.w)return this;var b=ae(this.D),c=Array(0>b?4:2*(b+1));Bd(this.e,0,c,0,2*b);return new Fg(a,this.D,c)};v.Vb=function(a,b,c){var d=1<<(b>>>a&31);if(0===(this.D&d))return this;var f=ae(this.D&d-1),g=this.e[2*f],i=this.e[2*f+1];return g==n?(a=i.Vb(a+5,b,c),a===i?this:a!=n?new Fg(n,this.D,wg.c(this.e,2*f+1,a)):this.D===d?n:new Fg(n,this.D^d,Ag(this.e,f))):vg(c,g)?new Fg(n,this.D^d,Ag(this.e,f)):this};
v.ra=function(a,b,c,d,f){var g=1<<(b>>>a&31),i=ae(this.D&g-1);if(0===(this.D&g)){var k=ae(this.D);if(16<=k){i=Array(32);i[b>>>a&31]=Gg.ra(a+5,b,c,d,f);for(d=c=0;;)if(32>c)0!==(this.D>>>c&1)&&(i[c]=this.e[d]!=n?Gg.ra(a+5,G.a(this.e[d]),this.e[d],this.e[d+1],f):this.e[d+1],d+=2),c+=1;else break;return new Hg(n,k+1,i)}a=Array(2*(k+1));Bd(this.e,0,a,0,2*i);a[2*i]=c;a[2*i+1]=d;Bd(this.e,2*i,a,2*(i+1),2*(k-i));f.Z=m;return new Fg(n,this.D|g,a)}k=this.e[2*i];g=this.e[2*i+1];if(k==n)return k=g.ra(a+5,b,c,
d,f),k===g?this:new Fg(n,this.D,wg.c(this.e,2*i+1,k));if(vg(c,k))return d===g?this:new Fg(n,this.D,wg.c(this.e,2*i+1,d));f.Z=m;return new Fg(n,this.D,wg.T(this.e,2*i,n,2*i+1,Ig.ga?Ig.ga(a+5,k,g,b,c,d):Ig.call(n,a+5,k,g,b,c,d)))};v.Za=function(a,b,c,d){var f=1<<(b>>>a&31);if(0===(this.D&f))return d;var g=ae(this.D&f-1),f=this.e[2*g],g=this.e[2*g+1];return f==n?g.Za(a+5,b,c,d):vg(c,f)?g:d};var Gg=new Fg(n,0,[]);function Hg(a,b,c){this.w=a;this.k=b;this.e=c}v=Hg.prototype;
v.sa=function(a,b,c,d,f,g){var i=c>>>b&31,k=this.e[i];if(k==n)return a=Bg.n(this,a,i,Gg.sa(a,b+5,c,d,f,g)),a.k+=1,a;b=k.sa(a,b+5,c,d,f,g);return b===k?this:Bg.n(this,a,i,b)};v.Ub=function(){return Kg.a?Kg.a(this.e):Kg.call(n,this.e)};v.wb=function(a){return a===this.w?this:new Hg(a,this.k,this.e.slice())};
v.Vb=function(a,b,c){var d=b>>>a&31,f=this.e[d];if(f!=n){a=f.Vb(a+5,b,c);if(a===f)d=this;else if(a==n)if(8>=this.k)a:{for(var f=this.e,a=2*(this.k-1),b=Array(a),c=0,g=1,i=0;;)if(c<a){var k=c!==d;if(k?f[c]!=n:k)b[g]=f[c],g+=2,i|=1<<c;c+=1}else{d=new Fg(n,i,b);break a}d=h}else d=new Hg(n,this.k-1,wg.c(this.e,d,a));else d=new Hg(n,this.k,wg.c(this.e,d,a));return d}return this};
v.ra=function(a,b,c,d,f){var g=b>>>a&31,i=this.e[g];if(i==n)return new Hg(n,this.k+1,wg.c(this.e,g,Gg.ra(a+5,b,c,d,f)));a=i.ra(a+5,b,c,d,f);return a===i?this:new Hg(n,this.k,wg.c(this.e,g,a))};v.Za=function(a,b,c,d){var f=this.e[b>>>a&31];return f!=n?f.Za(a+5,b,c,d):d};function Lg(a,b,c){for(var b=2*b,d=0;;)if(d<b){if(vg(c,a[d]))return d;d+=2}else return-1}function Mg(a,b,c,d){this.w=a;this.Ha=b;this.k=c;this.e=d}v=Mg.prototype;
v.sa=function(a,b,c,d,f,g){if(c===this.Ha){b=Lg(this.e,this.k,d);if(-1===b){if(this.e.length>2*this.k)return a=Bg.ga(this,a,2*this.k,d,2*this.k+1,f),g.Z=m,a.k+=1,a;c=this.e.length;b=Array(c+2);Bd(this.e,0,b,0,c);b[c]=d;b[c+1]=f;g.Z=m;g=this.k+1;a===this.w?(this.e=b,this.k=g,a=this):a=new Mg(this.w,this.Ha,g,b);return a}return this.e[b+1]===f?this:Bg.n(this,a,b+1,f)}return(new Fg(a,1<<(this.Ha>>>b&31),[n,this,n,n])).sa(a,b,c,d,f,g)};v.Ub=function(){return Jg.a?Jg.a(this.e):Jg.call(n,this.e)};
v.wb=function(a){if(a===this.w)return this;var b=Array(2*(this.k+1));Bd(this.e,0,b,0,2*this.k);return new Mg(a,this.Ha,this.k,b)};v.Vb=function(a,b,c){a=Lg(this.e,this.k,c);return-1===a?this:1===this.k?n:new Mg(n,this.Ha,this.k-1,Ag(this.e,Vd(a)))};
v.ra=function(a,b,c,d,f){return b===this.Ha?(a=Lg(this.e,this.k,c),-1===a?(a=this.e.length,b=Array(a+2),Bd(this.e,0,b,0,a),b[a]=c,b[a+1]=d,f.Z=m,new Mg(n,this.Ha,this.k+1,b)):M.b(this.e[a],d)?this:new Mg(n,this.Ha,this.k,wg.c(this.e,a+1,d))):(new Fg(n,1<<(this.Ha>>>a&31),[n,this])).ra(a,b,c,d,f)};v.Za=function(a,b,c,d){a=Lg(this.e,this.k,c);return 0>a?d:vg(c,this.e[a])?this.e[a+1]:d};var Ig,Ng=n;
function Og(a,b,c,d,f,g){var i=G.a(b);if(i===d)return new Mg(n,i,2,[b,c,f,g]);var k=new ug;return Gg.ra(a,i,b,c,k).ra(a,d,f,g,k)}function Pg(a,b,c,d,f,g,i){var k=G.a(c);if(k===f)return new Mg(n,k,2,[c,d,g,i]);var l=new ug;return Gg.sa(a,b,k,c,d,l).sa(a,b,f,g,i,l)}Ng=function(a,b,c,d,f,g,i){switch(arguments.length){case 6:return Og.call(this,a,b,c,d,f,g);case 7:return Pg.call(this,a,b,c,d,f,g,i)}e(Error("Invalid arity: "+arguments.length))};Ng.ga=Og;Ng.rb=Pg;Ig=Ng;
function Qg(a,b,c,d,f){this.m=a;this.ua=b;this.p=c;this.wa=d;this.q=f;this.t=0;this.j=31850572}v=Qg.prototype;v.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a)};v.S=function(a,b){return O(b,a)};v.toString=function(){return ic(this)};v.N=aa();v.$=function(){return this.wa==n?S([this.ua[this.p],this.ua[this.p+1]]):J(this.wa)};v.ca=function(){return this.wa==n?Jg.c?Jg.c(this.ua,this.p+2,n):Jg.call(n,this.ua,this.p+2,n):Jg.c?Jg.c(this.ua,this.p,L(this.wa)):Jg.call(n,this.ua,this.p,L(this.wa))};
v.P=function(a,b){return Fc(a,b)};v.G=function(a,b){return new Qg(b,this.ua,this.p,this.wa,this.q)};v.F=s("m");v.W=function(){return od(mc,this.m)};var Jg,Rg=n;function Sg(a){return Rg.c(a,0,n)}function Tg(a,b,c){if(c==n)for(c=a.length;;)if(b<c){if(a[b]!=n)return new Qg(n,a,b,n,n);var d=a[b+1];if(z(d)&&(d=d.Ub(),z(d)))return new Qg(n,a,b+2,d,n);b+=2}else return n;else return new Qg(n,a,b,c,n)}
Rg=function(a,b,c){switch(arguments.length){case 1:return Sg.call(this,a);case 3:return Tg.call(this,a,b,c)}e(Error("Invalid arity: "+arguments.length))};Rg.a=Sg;Rg.c=Tg;Jg=Rg;function Ug(a,b,c,d,f){this.m=a;this.ua=b;this.p=c;this.wa=d;this.q=f;this.t=0;this.j=31850572}v=Ug.prototype;v.U=function(a){var b=this.q;return b!=n?b:this.q=a=Dc(a