mini-program-cljs
Version:
11 lines • 4.25 kB
JavaScript
var window=global;var $CLJS=require("./cljs_env");require("./goog.base.js");require("./cljs.core.js");
var ct,et,dt,ht;$CLJS.$s=function(a){return null==a?null:Zs(a)};$CLJS.at=function(a,b){return $CLJS.Db($CLJS.Nc,a,b)};ct=function(a,b){for(a=$CLJS.at(a,b);;)if($CLJS.u($CLJS.bt.a?$CLJS.bt.a(a):$CLJS.bt.call(null,a)))a=$CLJS.Nc.b(a,0),b=$CLJS.te.b(b,0);else return b};
et=function(a,b){return new $CLJS.Vb(null,function(){var c=$CLJS.at(a,b);a:{var d=a;for(var f=b;;){if($CLJS.P.b($CLJS.N(f),1)){d=$CLJS.Ag(f)<(dt.a?dt.a(d):dt.call(null,d))-1?ct(d,new $CLJS.W(null,1,5,$CLJS.pc,[$CLJS.Ag(f)+1],null)):null;break a}var g=$CLJS.Ag(f);var h=$CLJS.at(d,$CLJS.$s(f));h=dt.a?dt.a(h):dt.call(null,h);if(g<h-1){d=ct(d,$CLJS.te.b($CLJS.$s(f),$CLJS.Ag(f)+1));break a}f=$CLJS.$s(f)}}return $CLJS.T(c,$CLJS.u(d)?et(a,d):null)},null,null)};
$CLJS.ft=function(a,b,c,d,f){this.Eb=a;this.te=b;this.Bd=c;this.h=d;this.Qd=f;this.le=null;this.f=31850958;this.s=0};$CLJS.gt=function(a){a=$CLJS.Yg(a);a:for(var b=1,c=$CLJS.E(a);;)if(null!=c)b=(0,$CLJS.Ka)(31,b)+$CLJS.Ta($CLJS.H(c))|0,c=$CLJS.K(c);else break a;return new $CLJS.ft(a,b,$CLJS.Ta(a),$CLJS.N(a),!1)};$CLJS.bt=function(a){return a instanceof $CLJS.ft};dt=function(a){return $CLJS.bt(a)?$CLJS.N(a.Eb):$CLJS.N(a)};
ht=function ht(a,b,c){var f=a.h-2>>>b&31;if(5<b){b-=5;var g=c.c[f];a=ht.g?ht.g(a,b,g):ht.call(null,a,b,g);if(null==a&&0===f)return null;c=$CLJS.Ug(c);c.c[f]=a;return c}if(0===f)return null;c=$CLJS.Ug(c);c.c[f]=null;return c};$CLJS.Rb.prototype.Mc=$CLJS.of(17,function(){return this.ba(null)});$CLJS.Sb.prototype.Mc=$CLJS.of(16,function(){throw Error("Can't pop empty list");});
$CLJS.W.prototype.Mc=$CLJS.of(15,function(){if(0===this.h)throw Error("Can't pop empty vector");if(1===this.h)return $CLJS.sb($CLJS.Yd,this.l);if(1<this.h-$CLJS.wc(this))return new $CLJS.W(this.l,this.h-1,this.shift,this.root,this.X.slice(0,-1),null);var a=$CLJS.yc(this,this.h-2),b=ht(this,this.shift,this.root);b=null==b?$CLJS.pc:b;var c=this.h-1;return 5<this.shift&&null==b.c[1]?new $CLJS.W(this.l,c,this.shift-5,b.c[0],a,null):new $CLJS.W(this.l,c,this.shift,b,a,null)});
$CLJS.Zg.prototype.Mc=$CLJS.of(14,function(){if(this.start===this.end)throw Error("Can't pop empty vector");var a=this.l,b=this.Eb,c=this.start,d=this.end-1;return $CLJS.$g.pa?$CLJS.$g.pa(a,b,c,d,null):$CLJS.$g.call(null,a,b,c,d,null)});$CLJS.ch.prototype.Mc=$CLJS.of(13,function(){if($CLJS.u(this.Qc)){var a=$CLJS.K(this.Qc);return a?new $CLJS.ch(this.l,this.count-1,a,this.Uc,null):new $CLJS.ch(this.l,this.count-1,$CLJS.E(this.Uc),$CLJS.Yd,null)}return this});
$CLJS.Sc.prototype.Mc=$CLJS.of(12,function(){return new $CLJS.W(null,1,5,$CLJS.pc,[this.key],null)});$CLJS.ih.prototype.Mc=$CLJS.of(11,function(){return new $CLJS.W(null,1,5,$CLJS.pc,[this.key],null)});$CLJS.jh.prototype.Mc=$CLJS.of(10,function(){return new $CLJS.W(null,1,5,$CLJS.pc,[this.key],null)});
var Zs=function Zs(a){if(null!=a&&null!=a.Mc)return a.Mc(a);var c=Zs[$CLJS.t(null==a?null:a)];if(null!=c)return c.a?c.a(a):c.call(null,a);c=Zs._;if(null!=c)return c.a?c.a(a):c.call(null,a);throw $CLJS.w("IStack.-pop",a);};$CLJS.e=$CLJS.ft.prototype;$CLJS.e.toString=function(){return $CLJS.Ja($CLJS.E(this))};$CLJS.e.ga=function(a,b){return this.Eb.ga(null,b)};$CLJS.e.B=function(a,b,c){return this.Eb.B(null,b,c)};$CLJS.e.I=function(){return $CLJS.vb(this.Eb)};$CLJS.e.T=function(){return $CLJS.K($CLJS.E(this))};$CLJS.e.O=function(){return this.h};$CLJS.e.H=function(){return this.Bd};
$CLJS.e.F=function(a,b){return $CLJS.P.b(this.Bd,$CLJS.Ta(b))&&$CLJS.P.b(this.h,$CLJS.N(b))&&($CLJS.P.b(this.h,0)||$CLJS.P.b($CLJS.E(this),b))};$CLJS.e.P=function(){return $CLJS.tb($CLJS.it,$CLJS.vb(this))};$CLJS.e.aa=function(){return $CLJS.H($CLJS.E(this))};$CLJS.e.ba=function(){return $CLJS.Ya($CLJS.E(this))};$CLJS.e.D=function(){if(!$CLJS.u(this.le)){if(this.Qd){var a=this.Eb;a=0<$CLJS.N(a)?et(a,ct(a,new $CLJS.W(null,1,5,$CLJS.pc,[0],null))):null}else a=$CLJS.E(this.Eb);this.le=a}return this.le};
$CLJS.e.K=function(a,b){return new $CLJS.ft($CLJS.tb(this.Eb,b),this.te,this.Bd,this.h,this.Qd)};$CLJS.e.N=function(a,b){return $CLJS.T(b,this)};$CLJS.e.Cd=$CLJS.De(31);$CLJS.e.$=$CLJS.C;$CLJS.e.J=function(a,b,c){return $CLJS.Ud($CLJS.E(this),b,c)};$CLJS.it=$CLJS.gt($CLJS.Yd);