squint-cljs
Advanced tools
Comparing version 0.4.79 to 0.4.80
@@ -6,47 +6,47 @@ import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
import*as esm_import$fs from"fs";import*as esm_import$net from"net";import*as esm_import$readline from"readline";import*as esm_import$squint_cljs$core from"squint-cljs/core.js";import*as esm_import$node_util from"node:util";import*as esm_import$path from"path"; | ||
var Pga=function(a,b){return $APP.Vd(a)&&$APP.Vd(b)?$APP.Mk.l($APP.F([a,b])):$APP.Sd(a)&&($APP.Ud(a)||$APP.Td(a))&&$APP.Sd(b)&&($APP.Ud(b)||$APP.Td(b))?$APP.Rg.g(a,b):b},X9=function(a,b){return $APP.oe.j(function(c,d){return $APP.Mu.l(Pga,$APP.F([c,d]))},a,b)},Y9=function(a){throw $APP.Zk.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.n(null,1,[Qga,a],null));},Z9=function(a){var b=JSON.parse(a);return $APP.ae(b)?b:Y9(a)},Rga=function(a){var b=JSON.parse(a);return $APP.XF(b)?b:Y9(a)},Sga= | ||
function(a){var b=JSON.parse(a);return $APP.YF(b)?b:Y9(a)},$9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:Y9(a)},a$=function(a){return"string"===typeof a?$APP.B.j(a,0,null):null},b$=function(a){return $APP.A.g(":",a$(a))?$APP.ri.h($APP.fi.g(a,1)):$APP.ri.h(a)},Tga=function(a){return $APP.Sd(a)?$APP.y(a):a},c$=function(a){if("string"===typeof a)try{var b=a$(a);if($APP.A.g("true",a)||$APP.A.g("false",a))var c=Z9(a);else{if($APP.A.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e= | ||
$9(a);else{var f=$APP.A.g(":",b);var k=f?$APP.di(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?b$(a):a}d=e}c=d}return c}catch(l){return a}else return a},d$=function(a,b,c,d){throw $APP.Zk.j(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Oi.l($APP.F([a]))].join(""),c instanceof $APP.H?" to ":" with ",$APP.t.h(c instanceof $APP.H?$APP.Xh(c):c)].join(""),new $APP.n(null,2,[Uga,a,Vga,c],null),d);},Wga=function(a,b,c){var d=function(){switch(b instanceof $APP.H?b.da:null){case "boolean":case "bool":return Z9; | ||
case "int":case "long":return Rga;case "double":return Sga;case "number":return $9;case "symbol":return $APP.Ei;case "keyword":return b$;case "string":return $APP.se;case "edn":return $APP.KG;case "auto":return c$;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=d$(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?d$(a,c,b,null):d},e$=function(a,b,c){a=$APP.fe.g(a,b);c=$APP.r(a)?a:$APP.Sd(c)?$APP.Hd(c):null;return $APP.r(c)?$APP.Sd(c)?$APP.gq.g($APP.Ee, | ||
c):c:null},f$=function(a,b,c,d){return $APP.Ko.g(b,c)?(c=$APP.cG(a,b),$APP.r(c)?($APP.B.j(c,0,null),c=$APP.B.j(c,1,null),$APP.zi.j(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.zi.j(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},Xga=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Sd(d):d)?Wga(e,d,f):c$(e);return $APP.r(c)?$APP.Pm.A(a,b,c,d):$APP.zi.j(a,b,d)},Yga=function(a){return $APP.oe.j(function(b,c){var d=$APP.B.j(c,0,null);c=$APP.B.j(c,1,null);var e=$APP.jf(c),f=$APP.fe.g(e, | ||
g$),k=$APP.fe.g(e,h$);c=$APP.fe.g(e,$APP.zm);var l=$APP.fe.g(e,$APP.gE);e=$APP.fe.g(e,i$);b=$APP.r(f)?$APP.Pm.J(b,g$,$APP.zi,d,f):b;b=$APP.r(k)?$APP.Pm.j(b,h$,function(m){if($APP.he(m,k))throw $APP.Zk.g(["Conflicting alias ",$APP.t.h(k)," between ",$APP.t.h($APP.fe.g(m,k))," and ",$APP.t.h(d)].join(""),new $APP.n(null,1,[h$,k],null));return $APP.zi.j(m,k,d)}):b;b=$APP.r(l)?$APP.Pm.j(b,$APP.gE,$APP.gq.g(function(m){return $APP.Ee.g(m,d)},$APP.Rh)):b;b=$APP.r(e)?$APP.Pm.J(b,i$,$APP.zi,d,e):b;return $APP.r(c)? | ||
$APP.Pm.J(b,j$,$APP.zi,d,c):b},$APP.hf,a)},n$=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,k$);b=$APP.dG(function(d){var e=$APP.r(c)?null:$APP.qa(d,":");return!($APP.r(e)?e:$APP.qa(d,"-"))},a);a=$APP.B.j(b,0,null);b=$APP.B.j(b,1,null);return new $APP.n(null,2,[l$,a,m$,b],null)},p$=function(a,b){if($APP.r(b))if($APP.x(a)){var c=$APP.xd(a),d=$APP.$e(c,b);c=c<d?c:d;a=new $APP.J(null,2,5,$APP.N,[$APP.R.g($APP.xu.g(b,a),$APP.Nf.g(c,a)),$APP.Nf.g(c,b)],null)}else a=new $APP.J(null,2,5,$APP.N,[a,b],null); | ||
var Uga=function(a,b){return $APP.Vd(a)&&$APP.Vd(b)?$APP.Mk.l($APP.F([a,b])):$APP.Sd(a)&&($APP.Ud(a)||$APP.Td(a))&&$APP.Sd(b)&&($APP.Ud(b)||$APP.Td(b))?$APP.Rg.g(a,b):b},X9=function(a,b){return $APP.oe.j(function(c,d){return $APP.Mu.l(Uga,$APP.F([c,d]))},a,b)},Y9=function(a){throw $APP.Zk.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.n(null,1,[Vga,a],null));},Z9=function(a){var b=JSON.parse(a);return $APP.ae(b)?b:Y9(a)},Wga=function(a){var b=JSON.parse(a);return $APP.dG(b)?b:Y9(a)},Xga= | ||
function(a){var b=JSON.parse(a);return $APP.eG(b)?b:Y9(a)},$9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:Y9(a)},a$=function(a){return"string"===typeof a?$APP.B.j(a,0,null):null},b$=function(a){return $APP.A.g(":",a$(a))?$APP.ri.h($APP.fi.g(a,1)):$APP.ri.h(a)},Yga=function(a){return $APP.Sd(a)?$APP.y(a):a},c$=function(a){if("string"===typeof a)try{var b=a$(a);if($APP.A.g("true",a)||$APP.A.g("false",a))var c=Z9(a);else{if($APP.A.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e= | ||
$9(a);else{var f=$APP.A.g(":",b);var k=f?$APP.di(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?b$(a):a}d=e}c=d}return c}catch(l){return a}else return a},d$=function(a,b,c,d){throw $APP.Zk.j(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Oi.l($APP.F([a]))].join(""),c instanceof $APP.H?" to ":" with ",$APP.t.h(c instanceof $APP.H?$APP.Xh(c):c)].join(""),new $APP.n(null,2,[Zga,a,$ga,c],null),d);},aha=function(a,b,c){var d=function(){switch(b instanceof $APP.H?b.da:null){case "boolean":case "bool":return Z9; | ||
case "int":case "long":return Wga;case "double":return Xga;case "number":return $9;case "symbol":return $APP.Ei;case "keyword":return b$;case "string":return $APP.se;case "edn":return $APP.QG;case "auto":return c$;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=d$(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?d$(a,c,b,null):d},e$=function(a,b,c){a=$APP.fe.g(a,b);c=$APP.r(a)?a:$APP.Sd(c)?$APP.Hd(c):null;return $APP.r(c)?$APP.Sd(c)?$APP.gq.g($APP.Ee, | ||
c):c:null},f$=function(a,b,c,d){return $APP.Ko.g(b,c)?(c=$APP.iG(a,b),$APP.r(c)?($APP.B.j(c,0,null),c=$APP.B.j(c,1,null),$APP.zi.j(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.zi.j(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},bha=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Sd(d):d)?aha(e,d,f):c$(e);return $APP.r(c)?$APP.Pm.A(a,b,c,d):$APP.zi.j(a,b,d)},cha=function(a){return $APP.oe.j(function(b,c){var d=$APP.B.j(c,0,null);c=$APP.B.j(c,1,null);var e=$APP.jf(c),f=$APP.fe.g(e, | ||
g$),k=$APP.fe.g(e,h$);c=$APP.fe.g(e,$APP.zm);var l=$APP.fe.g(e,$APP.kE);e=$APP.fe.g(e,i$);b=$APP.r(f)?$APP.Pm.J(b,g$,$APP.zi,d,f):b;b=$APP.r(k)?$APP.Pm.j(b,h$,function(m){if($APP.he(m,k))throw $APP.Zk.g(["Conflicting alias ",$APP.t.h(k)," between ",$APP.t.h($APP.fe.g(m,k))," and ",$APP.t.h(d)].join(""),new $APP.n(null,1,[h$,k],null));return $APP.zi.j(m,k,d)}):b;b=$APP.r(l)?$APP.Pm.j(b,$APP.kE,$APP.gq.g(function(m){return $APP.Ee.g(m,d)},$APP.Rh)):b;b=$APP.r(e)?$APP.Pm.J(b,i$,$APP.zi,d,e):b;return $APP.r(c)? | ||
$APP.Pm.J(b,j$,$APP.zi,d,c):b},$APP.hf,a)},n$=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,k$);b=$APP.jG(function(d){var e=$APP.r(c)?null:$APP.qa(d,":");return!($APP.r(e)?e:$APP.qa(d,"-"))},a);a=$APP.B.j(b,0,null);b=$APP.B.j(b,1,null);return new $APP.n(null,2,[l$,a,m$,b],null)},p$=function(a,b){if($APP.r(b))if($APP.x(a)){var c=$APP.xd(a),d=$APP.$e(c,b);c=c<d?c:d;a=new $APP.J(null,2,5,$APP.N,[$APP.R.g($APP.xu.g(b,a),$APP.Nf.g(c,a)),$APP.Nf.g(c,b)],null)}else a=new $APP.J(null,2,5,$APP.N,[a,b],null); | ||
else a=new $APP.J(null,2,5,$APP.N,[a,b],null);b=a;a=$APP.B.j(b,0,null);b=$APP.B.j(b,1,null);return new $APP.n(null,2,[m$,a,o$,b],null)},x$=function(a,b,c,d,e){var f=a$(a),k="string"===typeof a?$APP.B.j(a,1,null):null,l;if(l=$APP.A.g(f,"-")){try{var m=$9($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?q$:null;f=$APP.A.g(":",f);c=$APP.Ko.g(q$,b)&&f&&($APP.A.g(r$,d)||$APP.Za(c)||$APP.A.g(e,c));d=$APP.r(b)?b:c?s$:null;a=l?$APP.r(k)?$APP.Ko.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.n(null, | ||
5,[$APP.Cw,d,t$,l,u$,a,v$,c,w$,f],null)},bha=function(a,b){function c(vb){vb=$APP.Mk.l($APP.F([new $APP.n(null,2,[y$,d,$APP.Tk,z$],null),vb]));return O.h?O.h(vb):O.call(null,vb)}var d=y$.h(b),e=$APP.r(d)?X9(b,$APP.F([Yga(d)])):b,f=g$.h(e),k=function(){var vb=h$.h(e);return $APP.r(vb)?vb:$APP.Qq.h(e)}(),l=Zga.h(e),m=$APP.gE.h(e),h=j$.h(e),p=k$.h(e),q=function(){var vb=A$.h(e);return $APP.r(vb)?vb:$ga.h(e)}(),v=$APP.Vh($APP.R.l($APP.Mh($APP.Vd(d)?d:$APP.Rg.g($APP.hf,d)),$APP.Oh(k),$APP.F([$APP.Mh(f)]))), | ||
D=$APP.A.g(!0,q)?v:null==q?null:$APP.Vh(q),I=i$.h(e),O=function(){var vb=aha.h(e);return $APP.r(vb)?vb:function(Xb){Xb=$APP.jf(Xb);var Ic=$APP.fe.g(Xb,B$);throw $APP.Zk.g(Ic,Xb);}}(),P=n$(a,null),W=$APP.jf(P),ca=$APP.fe.g(W,l$),ja=$APP.fe.g(W,m$),na=function(){var vb=o$.h(e);vb=$APP.r(vb)?vb:C$.h(e);return $APP.r(vb)?p$(ca,vb):new $APP.n(null,2,[o$,null,m$,ja],null)}(),pa=$APP.jf(na),fa=$APP.fe.g(pa,m$),E=$APP.fe.g(pa,o$),C=$APP.Ko.g(fa,ja)?new $APP.J(null,2,5,$APP.N,[null,$APP.R.g(fa,ja)],null): | ||
5,[$APP.Cw,d,t$,l,u$,a,v$,c,w$,f],null)},gha=function(a,b){function c(vb){vb=$APP.Mk.l($APP.F([new $APP.n(null,2,[y$,d,$APP.Tk,z$],null),vb]));return O.h?O.h(vb):O.call(null,vb)}var d=y$.h(b),e=$APP.r(d)?X9(b,$APP.F([cha(d)])):b,f=g$.h(e),k=function(){var vb=h$.h(e);return $APP.r(vb)?vb:$APP.Qq.h(e)}(),l=dha.h(e),m=$APP.kE.h(e),h=j$.h(e),p=k$.h(e),q=function(){var vb=A$.h(e);return $APP.r(vb)?vb:eha.h(e)}(),v=$APP.Vh($APP.R.l($APP.Mh($APP.Vd(d)?d:$APP.Rg.g($APP.hf,d)),$APP.Oh(k),$APP.F([$APP.Mh(f)]))), | ||
D=$APP.A.g(!0,q)?v:null==q?null:$APP.Vh(q),I=i$.h(e),O=function(){var vb=fha.h(e);return $APP.r(vb)?vb:function(Xb){Xb=$APP.jf(Xb);var Ic=$APP.fe.g(Xb,B$);throw $APP.Zk.g(Ic,Xb);}}(),P=n$(a,null),W=$APP.jf(P),ca=$APP.fe.g(W,l$),ja=$APP.fe.g(W,m$),na=function(){var vb=o$.h(e);vb=$APP.r(vb)?vb:C$.h(e);return $APP.r(vb)?p$(ca,vb):new $APP.n(null,2,[o$,null,m$,ja],null)}(),pa=$APP.jf(na),fa=$APP.fe.g(pa,m$),E=$APP.fe.g(pa,o$),C=$APP.Ko.g(fa,ja)?new $APP.J(null,2,5,$APP.N,[null,$APP.R.g(fa,ja)],null): | ||
new $APP.J(null,2,5,$APP.N,[ca,ja],null),ea=$APP.B.j(C,0,null),K=$APP.B.j(C,1,null),M=function(){for(var vb=$APP.hf,Xb=null,Ic=null,Ke=$APP.r(p)?q$:null,hd=$APP.x(K),Eg=E;;){if($APP.Za(hd))return new $APP.J(null,3,5,$APP.N,[vb,Xb,Ic],null);var gg=$APP.y(hd),Tc=gg instanceof $APP.H;if(Tc){Xb=f$(vb,Xb,Ic,null);var ne=gg;hd=$APP.z(hd);vb=Xb;Xb=ne}else{var wl=!0===gg,Pf=$APP.t.h(gg);ne=e$(l,Xb,$APP.fe.g(f,Xb));var vi=$APP.fe.g(f,Xb),xl=x$(Pf,Ke,Xb,vi,Ic),Ih=$APP.jf(xl),yl=$APP.fe.g(Ih,t$),Jh=$APP.fe.g(Ih, | ||
u$),zl=$APP.fe.g(Ih,v$),Qf=$APP.fe.g(Ih,$APP.Cw),kk=$APP.fe.g(Ih,w$);if($APP.r(function(){var Me=yl;return $APP.r(Me)?Me:zl}())){var Yc=$APP.qa(Pf,"--"),lk=Yc&&$APP.A.g("--",Pf);if(lk){var Al=$APP.z(hd);return new $APP.J(null,3,5,$APP.N,[function(){var Me=vb;return Al?$APP.fo.A(Me,$APP.zu,new $APP.J(null,2,5,$APP.N,[z$,m$],null),$APP.mg(Al)):Me}(),Xb,Ic],null)}var mk=Yc?$APP.fi.g(Pf,2):$APP.Wj(Pf,/^(:|-|)/,""),yf=Yc?$APP.Nq.g(mk,/=/):new $APP.J(null,1,5,$APP.N,[mk],null),Rd=$APP.B.j(yf,0,null),Be= | ||
$APP.B.j(yf,1,null),Tb=$APP.ri.h(Rd),Dc=$APP.fe.j(k,Tb,Tb);if($APP.r(Be))Ic=f$(vb,Xb,Ic,ne),Xb=Dc,Ke=Qf,hd=$APP.He(Be,$APP.cd(hd)),vb=Ic,Ic=null;else{var Ab=$APP.z(hd),Le=$APP.y(Ab),fw=x$(Le,Qf,Xb,vi,Ic);if($APP.r(function(){var Me=t$.h(fw);return $APP.r(Me)?Me:$APP.Qd(Ab)}()))if($APP.r(Jh)){var gw=$APP.Xh(Dc);Ic=$APP.Cr.l(function(){return function(Me){return new $APP.J(null,2,5,$APP.N,[["-",$APP.t.h(Me)].join(""),!0],null)}}(vb,Xb,Ic,Ke,hd,Eg,gw,Ab,Le,fw,mk,yf,Rd,Be,Tb,Dc,Yc,lk,wl,Pf,ne,vi,xl,Ih, | ||
yl,Jh,zl,Qf,kk,gg,Tc,d,e,f,k,l,m,h,p,q,v,D,I,O,c,P,W,ca,ja,na,pa,fa,E,C,ea,K),$APP.F([gw]));hd=$APP.R.g(Ic,Ab);Ke=Qf;Ic=Xb=null}else hd=$APP.he(v,Dc)?null:$APP.SF($APP.t.h(Dc),":no-"),Ke=$APP.r(hd)?$APP.ri.h($APP.Wj($APP.t.h(Dc),":no-","")):Dc,hd=$APP.He($APP.Za(hd),Ab),Xb=f$(vb,Xb,Ic,ne),ne=Ke,Ke=Qf,vb=Xb,Xb=ne;else Xb=f$(vb,Xb,Ic,ne),ne=Dc,Ke=Qf,hd=Ab,vb=Xb,Xb=ne}}else if(lk=$APP.A.g(r$,vi)&&$APP.Ko.g(Pf,"true")&&$APP.Ko.g(Pf,"false")||$APP.A.g(Ic,Xb)&&$APP.Za(ne))if(Eg=$APP.r(hd)?$APP.r(Eg)?p$(hd, | ||
Eg):new $APP.n(null,1,[m$,hd],null):new $APP.n(null,1,[m$,hd],null),Ke=$APP.jf(Eg),Eg=$APP.fe.g(Ke,m$),Ke=$APP.fe.g(Ke,o$),$APP.Ko.g(hd,Eg))ne=Ke,Ke=Qf,hd=Eg,Eg=ne;else return new $APP.J(null,3,5,$APP.N,[$APP.fo.A(vb,$APP.zu,new $APP.J(null,2,5,$APP.N,[z$,m$],null),$APP.mg(hd)),Xb,Ic],null);else{try{var Zd=Xga(vb,Xb,ne,Tga(vi),Pf,wl)}catch(Me){c(new $APP.n(null,4,[D$,g$,B$,$APP.hG(Me),E$,Xb,F$,Pf],null)),Zd=vb}Ic=$APP.r(function(){var Me=$APP.A.g(s$,Qf);return Me?kk:Me}())?null:Xb;ne=$APP.r(function(){var Me= | ||
yl,Jh,zl,Qf,kk,gg,Tc,d,e,f,k,l,m,h,p,q,v,D,I,O,c,P,W,ca,ja,na,pa,fa,E,C,ea,K),$APP.F([gw]));hd=$APP.R.g(Ic,Ab);Ke=Qf;Ic=Xb=null}else hd=$APP.he(v,Dc)?null:$APP.YF($APP.t.h(Dc),":no-"),Ke=$APP.r(hd)?$APP.ri.h($APP.Wj($APP.t.h(Dc),":no-","")):Dc,hd=$APP.He($APP.Za(hd),Ab),Xb=f$(vb,Xb,Ic,ne),ne=Ke,Ke=Qf,vb=Xb,Xb=ne;else Xb=f$(vb,Xb,Ic,ne),ne=Dc,Ke=Qf,hd=Ab,vb=Xb,Xb=ne}}else if(lk=$APP.A.g(r$,vi)&&$APP.Ko.g(Pf,"true")&&$APP.Ko.g(Pf,"false")||$APP.A.g(Ic,Xb)&&$APP.Za(ne))if(Eg=$APP.r(hd)?$APP.r(Eg)?p$(hd, | ||
Eg):new $APP.n(null,1,[m$,hd],null):new $APP.n(null,1,[m$,hd],null),Ke=$APP.jf(Eg),Eg=$APP.fe.g(Ke,m$),Ke=$APP.fe.g(Ke,o$),$APP.Ko.g(hd,Eg))ne=Ke,Ke=Qf,hd=Eg,Eg=ne;else return new $APP.J(null,3,5,$APP.N,[$APP.fo.A(vb,$APP.zu,new $APP.J(null,2,5,$APP.N,[z$,m$],null),$APP.mg(hd)),Xb,Ic],null);else{try{var Zd=bha(vb,Xb,ne,Yga(vi),Pf,wl)}catch(Me){c(new $APP.n(null,4,[D$,g$,B$,$APP.nG(Me),E$,Xb,F$,Pf],null)),Zd=vb}Ic=$APP.r(function(){var Me=$APP.A.g(s$,Qf);return Me?kk:Me}())?null:Xb;ne=$APP.r(function(){var Me= | ||
$APP.A.g(s$,Qf);return Me?kk:Me}())?null:Xb;Ke=Qf;hd=$APP.z(hd);vb=Zd;Xb=Ic;Ic=ne}}}}(),da=$APP.B.j(M,0,null),ia=$APP.B.j(M,1,null),ha=$APP.B.j(M,2,null),ra=e$(l,ia,$APP.fe.g(f,ia)),ta=function(){var vb=f$(da,ia,ha,ra);return $APP.x(ea)?$APP.fo.A(vb,$APP.Jk,new $APP.J(null,2,5,$APP.N,[z$,m$],null),function(Xb){return $APP.Rg.g($APP.mg(ea),Xb)}):vb}(),xa=$APP.r(h)?$APP.Md($APP.Mk.l($APP.F([h,ta])),$APP.Nd(ta)):ta;if($APP.r(D)){a=$APP.x($APP.Mh(xa));b=null;for(var ya=0,Ca=0;;)if(Ca<ya){var Ha=b.ba(null, | ||
Ca);$APP.he(D,Ha)||c(new $APP.n(null,4,[D$,A$,B$,["Unknown option: ",$APP.t.h(Ha)].join(""),A$,D,E$,Ha],null));Ca+=1}else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ca=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ca):(a=$APP.y(b),$APP.he(D,a)||c(new $APP.n(null,4,[D$,A$,B$,["Unknown option: ",$APP.t.h(a)].join(""),A$,D,E$,a],null)),a=$APP.z(b),b=null,ya=0),Ca=0;else break}if($APP.r(m))for(a=$APP.x(m),b=null,Ca=ya=0;;)if(Ca<ya)Ha=b.ba(null,Ca),$APP.r($APP.cG(xa,Ha))||c(new $APP.n(null,4,[D$,$APP.gE,B$,["Required option: ", | ||
$APP.t.h(Ha)].join(""),$APP.gE,m,E$,Ha],null)),Ca+=1;else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ca=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ca):(a=$APP.y(b),$APP.r($APP.cG(xa,a))||c(new $APP.n(null,4,[D$,$APP.gE,B$,["Required option: ",$APP.t.h(a)].join(""),$APP.gE,m,E$,a],null)),a=$APP.z(b),b=null,ya=0),Ca=0;else break;if($APP.r(I))for(var Da=$APP.x(I),za=null,Na=0,Sa=0;;)if(Sa<Na){var db=za.ba(null,Sa),ub=$APP.B.j(db,0,null),Bb=$APP.B.j(db,1,null),Wb=function(){var vb=(vb=$APP.Vd(Bb))?G$.h(Bb):vb;return $APP.r(vb)? | ||
vb:Bb}(),pc=$APP.cG(xa,ub);if($APP.r(pc)){var $c=pc,Rb=$APP.B.j($c,0,null),lf=$APP.B.j($c,1,null);if(!$APP.r(Wb.h?Wb.h(lf):Wb.call(null,lf))){var gk=function(){var vb=H$.h(Bb);return $APP.r(vb)?vb:function(){return function(Xb){var Ic=$APP.jf(Xb);Xb=$APP.fe.g(Ic,E$);Ic=$APP.fe.g(Ic,F$);return["Invalid value for option ",$APP.t.h(Xb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Na,Sa,vb,$c,Rb,lf,pc,Wb,db,ub,Bb,d,e,f,k,l,m,h,p,q,v,D,I,O,c,P,W,ca,ja,na,pa,fa,E,C,ea,K,M,da,ia,ha,ra,ta,xa)}();c(new $APP.n(null, | ||
5,[D$,i$,B$,function(){var vb=new $APP.n(null,2,[E$,ub,F$,lf],null);return gk.h?gk.h(vb):gk.call(null,vb)}(),i$,I,E$,ub,F$,lf],null))}}Sa+=1}else{var tl=$APP.x(Da);if(tl){var ti=tl;if($APP.Yd(ti))ya=$APP.uc(ti),a=$APP.vc(ti),b=ya,ya=$APP.xd(ya),Da=a,za=b,Na=ya;else{var hk=$APP.y(ti),ik=$APP.B.j(hk,0,null),pj=$APP.B.j(hk,1,null),jk=function(){var vb=(vb=$APP.Vd(pj))?G$.h(pj):vb;return $APP.r(vb)?vb:pj}(),ul=$APP.cG(xa,ik);if($APP.r(ul)){var Hc=ul,qj=$APP.B.j(Hc,0,null),ui=$APP.B.j(Hc,1,null);if(!$APP.r(jk.h? | ||
Ca);$APP.he(D,Ha)||c(new $APP.n(null,4,[D$,A$,B$,["Unknown option: ",$APP.t.h(Ha)].join(""),A$,D,E$,Ha],null));Ca+=1}else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ca=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ca):(a=$APP.y(b),$APP.he(D,a)||c(new $APP.n(null,4,[D$,A$,B$,["Unknown option: ",$APP.t.h(a)].join(""),A$,D,E$,a],null)),a=$APP.z(b),b=null,ya=0),Ca=0;else break}if($APP.r(m))for(a=$APP.x(m),b=null,Ca=ya=0;;)if(Ca<ya)Ha=b.ba(null,Ca),$APP.r($APP.iG(xa,Ha))||c(new $APP.n(null,4,[D$,$APP.kE,B$,["Required option: ", | ||
$APP.t.h(Ha)].join(""),$APP.kE,m,E$,Ha],null)),Ca+=1;else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ca=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ca):(a=$APP.y(b),$APP.r($APP.iG(xa,a))||c(new $APP.n(null,4,[D$,$APP.kE,B$,["Required option: ",$APP.t.h(a)].join(""),$APP.kE,m,E$,a],null)),a=$APP.z(b),b=null,ya=0),Ca=0;else break;if($APP.r(I))for(var Da=$APP.x(I),za=null,Na=0,Sa=0;;)if(Sa<Na){var db=za.ba(null,Sa),ub=$APP.B.j(db,0,null),Bb=$APP.B.j(db,1,null),Wb=function(){var vb=(vb=$APP.Vd(Bb))?G$.h(Bb):vb;return $APP.r(vb)? | ||
vb:Bb}(),pc=$APP.iG(xa,ub);if($APP.r(pc)){var $c=pc,Rb=$APP.B.j($c,0,null),lf=$APP.B.j($c,1,null);if(!$APP.r(Wb.h?Wb.h(lf):Wb.call(null,lf))){var gk=function(){var vb=H$.h(Bb);return $APP.r(vb)?vb:function(){return function(Xb){var Ic=$APP.jf(Xb);Xb=$APP.fe.g(Ic,E$);Ic=$APP.fe.g(Ic,F$);return["Invalid value for option ",$APP.t.h(Xb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Na,Sa,vb,$c,Rb,lf,pc,Wb,db,ub,Bb,d,e,f,k,l,m,h,p,q,v,D,I,O,c,P,W,ca,ja,na,pa,fa,E,C,ea,K,M,da,ia,ha,ra,ta,xa)}();c(new $APP.n(null, | ||
5,[D$,i$,B$,function(){var vb=new $APP.n(null,2,[E$,ub,F$,lf],null);return gk.h?gk.h(vb):gk.call(null,vb)}(),i$,I,E$,ub,F$,lf],null))}}Sa+=1}else{var tl=$APP.x(Da);if(tl){var ti=tl;if($APP.Yd(ti))ya=$APP.uc(ti),a=$APP.vc(ti),b=ya,ya=$APP.xd(ya),Da=a,za=b,Na=ya;else{var hk=$APP.y(ti),ik=$APP.B.j(hk,0,null),pj=$APP.B.j(hk,1,null),jk=function(){var vb=(vb=$APP.Vd(pj))?G$.h(pj):vb;return $APP.r(vb)?vb:pj}(),ul=$APP.iG(xa,ik);if($APP.r(ul)){var Hc=ul,qj=$APP.B.j(Hc,0,null),ui=$APP.B.j(Hc,1,null);if(!$APP.r(jk.h? | ||
jk.h(ui):jk.call(null,ui))){var vl=function(){var vb=H$.h(pj);return $APP.r(vb)?vb:function(){return function(Xb){var Ic=$APP.jf(Xb);Xb=$APP.fe.g(Ic,E$);Ic=$APP.fe.g(Ic,F$);return["Invalid value for option ",$APP.t.h(Xb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Na,Sa,vb,Hc,qj,ui,ul,jk,hk,ik,pj,ti,tl,d,e,f,k,l,m,h,p,q,v,D,I,O,c,P,W,ca,ja,na,pa,fa,E,C,ea,K,M,da,ia,ha,ra,ta,xa)}();c(new $APP.n(null,5,[D$,i$,B$,function(){var vb=new $APP.n(null,2,[E$,ik,F$,ui],null);return vl.h?vl.h(vb):vl.call(null,vb)}(), | ||
i$,I,E$,ik,F$,ui],null))}}Da=$APP.z(ti);za=null;Na=0}Sa=0}else break}return xa},cha=function(a,b){a=bha(a,b);b=z$.h($APP.Nd(a));return $APP.zi.j(b,$APP.MG,$APP.Nk.g(a,z$))},dha=function(a,b){var c=$APP.Of($APP.xd(a),b);b=$APP.B.j(c,0,null);c=$APP.B.j(c,1,null);return $APP.A.g(b,a)?c:null},M$=function(a,b){$APP.Jf(I$,!1);a.setPrompt([$APP.t.h($APP.u(J$)),"\x3d\x3e "].join(""));a.prompt();return $APP.jG($APP.u(K$))?null:L$.g?L$.g(b,a):L$.call(null,b,a)},N$=function(a){var b=$APP.xk(a);a=$APP.yk(a); | ||
var c=$APP.iG($APP.u(K$));b=$APP.Nf.g(b-1,c);c=$APP.x(b);b=$APP.y(c);c=$APP.z(c);a=$APP.r(b)?$APP.fi.g(b,a):null;$APP.Jf(K$,$APP.wp.g("\n",$APP.He(a,c)))},fha=function(a,b,c){var d=function(){var f=$APP.vq;$APP.vq=$APP.u(J$);try{a:{var k=$APP.La;$APP.La=!0;try{var l=$APP.Oi.l($APP.F([a]));break a}finally{$APP.La=k}l=void 0}return $APP.Yt(l,new $APP.n(null,3,[$APP.np,$APP.mp,$APP.Oq,eha,$APP.Nt,!0],null),null)}finally{$APP.vq=f}}(),e=$APP.jf(d);d=$APP.fe.g(e,$APP.Xt);e=$APP.fe.g(e,$APP.S);d=$APP.Wj("(async function () {\n%s\n}) ()", | ||
"%s",d);$APP.Jf(J$,e);return Promise.resolve(eval(d)).then(function(f){$APP.r(c)?c.write(esm_import$node_util.inspect(f),"\n"):console.log(f);return L$.g?L$.g(c,b):L$.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return M$(b,c)})},L$=function(a,b){if($APP.r(function(){var e=$APP.u(I$);return $APP.r(e)?e:!$APP.jG($APP.u(K$))}())){$APP.Jf(I$,!0);var c=$APP.ep($APP.u(K$)),d=function(){try{return $APP.gp(c,$APP.Kt)}catch(f){var e=f;if(-1!=$APP.hG(e).indexOf("EOF while reading"))return O$; | ||
N$(c);$APP.IG.l($APP.F([$APP.t.h(e)]));return P$}}();if($APP.A.g(P$,d))return M$(b,a);if($APP.A.g(O$,d))return $APP.Jf(I$,!1);N$(c);return $APP.A.g($APP.fp,d)?M$(b,a):fha(d,b,a)}return null},Q$=function(a,b){a.on("line",function(c){$APP.Ti.A(K$,$APP.t,c,"\n");return L$(b,a)})},gha=function(a){var b=esm_import$readline.createInterface({input:a,output:a});Q$(b,a);a.setNoDelay(!0);return a.on("close",function(){return $APP.JG.l($APP.F(["Client closed connection."]))})},R$=function(a,b,c){var d=$APP.CG.h(a), | ||
e=$APP.mG.h(a);b=esm_import$path.resolve(d,$APP.xG(b,e));c=$APP.oG(c);d=null==c?null:esm_import$path.resolve(d,$APP.xG(c,e));d=null==d?null:null==d?null:esm_import$path.relative(esm_import$path.dirname($APP.t.h(b)),d);return $APP.r(d)?(a=$APP.BG.g(a,".mjs"),a=$APP.qa(a,".")?a:[".",$APP.t.h(a)].join(""),e=esm_import$path.extname(d),["./",$APP.Wj(d,$APP.gi([$APP.t.h(e),"$"].join("")),a)].join("")):null},S$=function(a,b,c){b=esm_import$path.resolve(b,$APP.xG(a,c));c=esm_import$path.dirname(b);$APP.r(esm_import$fs.existsSync(c))|| | ||
($APP.JG.l($APP.F(["[squint] Creating directory:",c])),esm_import$fs.mkdirSync(c,{recursive:!0}));$APP.JG.l($APP.F(["[squint] Copying resource",a,"to",c]));return esm_import$fs.copyFileSync(a,b)},V$=function(a,b){var c=$APP.u($APP.nG),d=$APP.Mk.l($APP.F([c,a])),e=$APP.mG.h(c),f=$APP.CG.g(c,".");a=$APP.Qd(b)?$APP.mg($APP.Cr.l(T$,$APP.F([e]))):b;b=$APP.CG.h(d);if($APP.r(b)&&"string"!==typeof b)throw Error("output-dir must be a string");return $APP.r(U$.h(d))?($APP.JG.l($APP.F(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])), | ||
$APP.JG(),$APP.JG.l($APP.F(["Options:\n\n--elide-imports: do not include imports\n--elide-exports: do not include exports\n--extension: default extension for JS files\n--output-dir: output directory for JS files"]))):$APP.oe.j(function(k,l){return Promise.resolve(k).then(function(){return $APP.he(new $APP.Qh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(l))?($APP.JG.l($APP.F(["[squint] Compiling CLJS file:",l])),$APP.DG($APP.zi.l(d,$APP.yG,l,$APP.F([$APP.Dq, | ||
function(m){return R$(d,l,m)}])))):S$(l,f,e)}).then(function(m){m=$APP.jf(m);m=$APP.fe.g(m,$APP.AG);$APP.r(m)&&$APP.JG.l($APP.F(["[squint] Wrote file:",m]));return m})},null,a)},v$=new $APP.H(null,"kwd-opt","kwd-opt",1313309243),q$=new $APP.H(null,"hyphens","hyphens",2113533609),y$=new $APP.H(null,"spec","spec",347520401),g$=new $APP.H(null,"coerce","coerce",1917884504),A$=new $APP.H(null,"restrict","restrict",-1071101511),s$=new $APP.H(null,"keywords","keywords",1526959054),P$=new $APP.H("squint.repl.node", | ||
"continue","squint.repl.node/continue",1558138730),B$=new $APP.H(null,"msg","msg",-1386103444),hha=new $APP.H(null,"show","show",-576705889),r$=new $APP.H(null,"boolean","boolean",-1919418404),Uga=new $APP.H(null,"input","input",556931961),W$=new $APP.H(null,"rest-cmds","rest-cmds",-423198324),z$=new $APP.H("org.babashka","cli","org.babashka/cli",1162430315),o$=new $APP.H(null,"args-\x3eopts","args-\x3eopts",964391046),h$=new $APP.H(null,"alias","alias",-2039751630),Zga=new $APP.H(null,"collect", | ||
"collect",-284321549),i$=new $APP.H(null,"validate","validate",-201300827),u$=new $APP.H(null,"composite-opt","composite-opt",-2021292928),iha=new $APP.H(null,"run","run",-1821166653),t$=new $APP.H(null,"hyphen-opt","hyphen-opt",1836909464),U$=new $APP.H(null,"help","help",-439233446),D$=new $APP.H(null,"cause","cause",231901252),w$=new $APP.H(null,"fst-colon","fst-colon",1618567071),Vga=new $APP.H(null,"coerce-fn","coerce-fn",-821146515),m$=new $APP.H(null,"args","args",1315556576),k$=new $APP.H(null, | ||
"no-keyword-opts","no-keyword-opts",761286018),F$=new $APP.H(null,"value","value",305978217),G$=new $APP.H(null,"pred","pred",1927423397),$ga=new $APP.H(null,"closed","closed",-919675359),O$=new $APP.H("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),aha=new $APP.H(null,"error-fn","error-fn",-171437615),E$=new $APP.H(null,"option","option",65132272),j$=new $APP.H(null,"exec-args","exec-args",-1860766354),H$=new $APP.H(null,"ex-msg","ex-msg",-1111774387),Qga=new $APP.H(null, | ||
"s","s",1705939918),C$=new $APP.H(null,"cmds-opts","cmds-opts",-390130362),jha=new $APP.H(null,"h","h",1109658740),l$=new $APP.H(null,"cmds","cmds",-1841503952);var K$=$APP.Si.h(""),I$=$APP.Si.h(!1),J$=$APP.Si.h($APP.vq),X$,Y$=process.stdout.isTTY;X$=$APP.r(Y$)?process.stdin.setRawMode:Y$;var eha=$APP.Si.h($APP.hf),Z$=function Z$(a){switch(arguments.length){case 0:return Z$.v();case 1:return Z$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};Z$.v=function(){return Z$.h(null)}; | ||
Z$.h=function(a){$APP.vq=$APP.Jx;$APP.kq=$APP.uq=!0;var b=function(){var d=$APP.LG.h(a);return $APP.r(d)?d:0}(),c=esm_import$net.createServer(gha);return c.listen(b,"127.0.0.1",function(){var d=c.address(),e=d.address;return $APP.JG.l($APP.F([["Socket REPL listening on port ",$APP.t.h(d.port)," on host ",$APP.t.h(e)].join("")]))})};Z$.m=1; | ||
i$,I,E$,ik,F$,ui],null))}}Da=$APP.z(ti);za=null;Na=0}Sa=0}else break}return xa},hha=function(a,b){a=gha(a,b);b=z$.h($APP.Nd(a));return $APP.zi.j(b,$APP.SG,$APP.Nk.g(a,z$))},iha=function(a,b){var c=$APP.Of($APP.xd(a),b);b=$APP.B.j(c,0,null);c=$APP.B.j(c,1,null);return $APP.A.g(b,a)?c:null},M$=function(a,b){$APP.Jf(I$,!1);a.setPrompt([$APP.t.h($APP.u(J$)),"\x3d\x3e "].join(""));a.prompt();return $APP.pG($APP.u(K$))?null:L$.g?L$.g(b,a):L$.call(null,b,a)},N$=function(a){var b=$APP.xk(a);a=$APP.yk(a); | ||
var c=$APP.oG($APP.u(K$));b=$APP.Nf.g(b-1,c);c=$APP.x(b);b=$APP.y(c);c=$APP.z(c);a=$APP.r(b)?$APP.fi.g(b,a):null;$APP.Jf(K$,$APP.wp.g("\n",$APP.He(a,c)))},kha=function(a,b,c){var d=function(){var f=$APP.vq;$APP.vq=$APP.u(J$);try{a:{var k=$APP.La;$APP.La=!0;try{var l=$APP.Oi.l($APP.F([a]));break a}finally{$APP.La=k}l=void 0}return $APP.Yt(l,new $APP.n(null,3,[$APP.np,$APP.mp,$APP.Oq,jha,$APP.Nt,!0],null),null)}finally{$APP.vq=f}}(),e=$APP.jf(d);d=$APP.fe.g(e,$APP.Xt);e=$APP.fe.g(e,$APP.S);d=$APP.Wj("(async function () {\n%s\n}) ()", | ||
"%s",d);$APP.Jf(J$,e);return Promise.resolve(eval(d)).then(function(f){$APP.r(c)?c.write(esm_import$node_util.inspect(f),"\n"):console.log(f);return L$.g?L$.g(c,b):L$.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return M$(b,c)})},L$=function(a,b){if($APP.r(function(){var e=$APP.u(I$);return $APP.r(e)?e:!$APP.pG($APP.u(K$))}())){$APP.Jf(I$,!0);var c=$APP.ep($APP.u(K$)),d=function(){try{return $APP.gp(c,$APP.Kt)}catch(f){var e=f;if(-1!=$APP.nG(e).indexOf("EOF while reading"))return O$; | ||
N$(c);$APP.OG.l($APP.F([$APP.t.h(e)]));return P$}}();if($APP.A.g(P$,d))return M$(b,a);if($APP.A.g(O$,d))return $APP.Jf(I$,!1);N$(c);return $APP.A.g($APP.fp,d)?M$(b,a):kha(d,b,a)}return null},Q$=function(a,b){a.on("line",function(c){$APP.Ti.A(K$,$APP.t,c,"\n");return L$(b,a)})},lha=function(a){var b=esm_import$readline.createInterface({input:a,output:a});Q$(b,a);a.setNoDelay(!0);return a.on("close",function(){return $APP.PG.l($APP.F(["Client closed connection."]))})},R$=function(a,b,c){var d=$APP.IG.h(a), | ||
e=$APP.sG.h(a);b=esm_import$path.resolve(d,$APP.DG(b,e));c=$APP.uG(c);d=null==c?null:esm_import$path.resolve(d,$APP.DG(c,e));d=null==d?null:null==d?null:esm_import$path.relative(esm_import$path.dirname($APP.t.h(b)),d);return $APP.r(d)?(a=$APP.HG.g(a,".mjs"),a=$APP.qa(a,".")?a:[".",$APP.t.h(a)].join(""),e=esm_import$path.extname(d),["./",$APP.Wj(d,$APP.gi([$APP.t.h(e),"$"].join("")),a)].join("")):null},S$=function(a,b,c){b=esm_import$path.resolve(b,$APP.DG(a,c));c=esm_import$path.dirname(b);$APP.r(esm_import$fs.existsSync(c))|| | ||
($APP.PG.l($APP.F(["[squint] Creating directory:",c])),esm_import$fs.mkdirSync(c,{recursive:!0}));$APP.PG.l($APP.F(["[squint] Copying resource",a,"to",c]));return esm_import$fs.copyFileSync(a,b)},V$=function(a,b){var c=$APP.u($APP.tG),d=$APP.Mk.l($APP.F([c,a])),e=$APP.sG.h(c),f=$APP.IG.g(c,".");a=$APP.Qd(b)?$APP.mg($APP.Cr.l(T$,$APP.F([e]))):b;b=$APP.IG.h(d);if($APP.r(b)&&"string"!==typeof b)throw Error("output-dir must be a string");return $APP.r(U$.h(d))?($APP.PG.l($APP.F(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])), | ||
$APP.PG(),$APP.PG.l($APP.F(["Options:\n\n--elide-imports: do not include imports\n--elide-exports: do not include exports\n--extension: default extension for JS files\n--output-dir: output directory for JS files"]))):$APP.oe.j(function(k,l){return Promise.resolve(k).then(function(){return $APP.he(new $APP.Qh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(l))?($APP.PG.l($APP.F(["[squint] Compiling CLJS file:",l])),$APP.JG($APP.zi.l(d,$APP.EG,l,$APP.F([$APP.Dq, | ||
function(m){return R$(d,l,m)}])))):S$(l,f,e)}).then(function(m){m=$APP.jf(m);m=$APP.fe.g(m,$APP.GG);$APP.r(m)&&$APP.PG.l($APP.F(["[squint] Wrote file:",m]));return m})},null,a)},v$=new $APP.H(null,"kwd-opt","kwd-opt",1313309243),q$=new $APP.H(null,"hyphens","hyphens",2113533609),y$=new $APP.H(null,"spec","spec",347520401),g$=new $APP.H(null,"coerce","coerce",1917884504),A$=new $APP.H(null,"restrict","restrict",-1071101511),s$=new $APP.H(null,"keywords","keywords",1526959054),P$=new $APP.H("squint.repl.node", | ||
"continue","squint.repl.node/continue",1558138730),B$=new $APP.H(null,"msg","msg",-1386103444),mha=new $APP.H(null,"show","show",-576705889),r$=new $APP.H(null,"boolean","boolean",-1919418404),Zga=new $APP.H(null,"input","input",556931961),W$=new $APP.H(null,"rest-cmds","rest-cmds",-423198324),z$=new $APP.H("org.babashka","cli","org.babashka/cli",1162430315),o$=new $APP.H(null,"args-\x3eopts","args-\x3eopts",964391046),h$=new $APP.H(null,"alias","alias",-2039751630),dha=new $APP.H(null,"collect", | ||
"collect",-284321549),i$=new $APP.H(null,"validate","validate",-201300827),u$=new $APP.H(null,"composite-opt","composite-opt",-2021292928),nha=new $APP.H(null,"run","run",-1821166653),t$=new $APP.H(null,"hyphen-opt","hyphen-opt",1836909464),U$=new $APP.H(null,"help","help",-439233446),D$=new $APP.H(null,"cause","cause",231901252),w$=new $APP.H(null,"fst-colon","fst-colon",1618567071),$ga=new $APP.H(null,"coerce-fn","coerce-fn",-821146515),m$=new $APP.H(null,"args","args",1315556576),k$=new $APP.H(null, | ||
"no-keyword-opts","no-keyword-opts",761286018),F$=new $APP.H(null,"value","value",305978217),G$=new $APP.H(null,"pred","pred",1927423397),eha=new $APP.H(null,"closed","closed",-919675359),O$=new $APP.H("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),fha=new $APP.H(null,"error-fn","error-fn",-171437615),E$=new $APP.H(null,"option","option",65132272),j$=new $APP.H(null,"exec-args","exec-args",-1860766354),H$=new $APP.H(null,"ex-msg","ex-msg",-1111774387),Vga=new $APP.H(null, | ||
"s","s",1705939918),C$=new $APP.H(null,"cmds-opts","cmds-opts",-390130362),oha=new $APP.H(null,"h","h",1109658740),l$=new $APP.H(null,"cmds","cmds",-1841503952);var K$=$APP.Si.h(""),I$=$APP.Si.h(!1),J$=$APP.Si.h($APP.vq),X$,Y$=process.stdout.isTTY;X$=$APP.r(Y$)?process.stdin.setRawMode:Y$;var jha=$APP.Si.h($APP.hf),Z$=function Z$(a){switch(arguments.length){case 0:return Z$.v();case 1:return Z$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};Z$.v=function(){return Z$.h(null)}; | ||
Z$.h=function(a){$APP.vq=$APP.Lx;$APP.kq=$APP.uq=!0;var b=function(){var d=$APP.RG.h(a);return $APP.r(d)?d:0}(),c=esm_import$net.createServer(lha);return c.listen(b,"127.0.0.1",function(){var d=c.address(),e=d.address;return $APP.PG.l($APP.F([["Socket REPL listening on port ",$APP.t.h(d.port)," on host ",$APP.t.h(e)].join("")]))})};Z$.m=1; | ||
var $$=function $$(a){switch(arguments.length){case 0:return $$.v();case 1:return $$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$$.v=function(){return $$.h(null)}; | ||
$$.h=function(){$APP.vq=$APP.Jx;$APP.kq=$APP.uq=!0;$APP.r(X$)&&process.stdin.setRawMode(!0);return Promise.resolve(eval("globalThis.user \x3d globalThis.user || {};")).then(function(){return new Promise(function(a){var b=$APP.r(null)?esm_import$readline.createInterface({input:null,output:null}):esm_import$readline.createInterface({input:process.stdin,output:process.stdout});Q$(b,null);b.setPrompt([$APP.t.h($APP.u(J$)),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};$$.m=1;var T$=function T$(a){var c=esm_import$fs.readdirSync(a);return $APP.mg($APP.Cr.l(function(d){d=esm_import$path.resolve(a,d);return $APP.r(esm_import$fs.lstatSync(d).isDirectory())?T$.h?T$.h(d):T$.call(null,d):new $APP.J(null,1,5,$APP.N,[d],null)},$APP.F([c])))},kha=new $APP.J(null,7,5,$APP.N,[new $APP.n(null,3,[l$,new $APP.J(null,1,5,$APP.N,["run"],null),$APP.uo,function(a){a=$APP.jf(a);a=$APP.fe.g(a,$APP.MG);var b=$APP.u($APP.nG),c=$APP.Mk.l($APP.F([b,a]));a=$APP.jf(c);var d=$APP.fe.g(a,$APP.Wk); | ||
a=$APP.fe.g(a,U$);if($APP.r(a))return null;$APP.JG.l($APP.F(["[squint] Running",d]));return $APP.DG($APP.zi.l(c,$APP.yG,d,$APP.F([$APP.Dq,function(e){return R$(c,d,e)}]))).then(function(e){e=$APP.jf(e);e=$APP.fe.g(e,$APP.AG);e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",$APP.t.h(e)].join("");return shadow_esm_import(e)})},C$,new $APP.J(null,1,5,$APP.N,[$APP.Wk],null)],null),new $APP.n(null,2,[l$,new $APP.J(null,1,5,$APP.N,["compile"],null),$APP.uo,function(a){var b=$APP.jf(a); | ||
a=$APP.fe.g(b,W$);b=$APP.fe.g(b,$APP.MG);return V$(b,a)}],null),new $APP.n(null,2,[l$,new $APP.J(null,1,5,$APP.N,["repl"],null),$APP.uo,$$],null),new $APP.n(null,2,[l$,new $APP.J(null,1,5,$APP.N,["socket-repl"],null),$APP.uo,Z$],null),new $APP.n(null,2,[l$,new $APP.J(null,1,5,$APP.N,["nrepl-server"],null),$APP.uo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.MG);return shadow_esm_import("./node.nrepl_server.js").then(function(c){c=c.startServer;return c.h?c.h(b):c.call(null,b)})}],null),new $APP.n(null, | ||
2,[l$,new $APP.J(null,1,5,$APP.N,["watch"],null),$APP.uo,function(a){var b=$APP.u($APP.nG),c=$APP.Mk.l($APP.F([b,a])),d=$APP.mG.h(b),e=$APP.CG.g(b,".");return shadow_esm_import("chokidar").catch(function(f){return console.error(f)}).then(function(f){f=f.watch;$APP.JG.l($APP.F(["[squint] Watching paths:",$APP.wp.g(", ",d)]));for(var k=$APP.x(d),l=null,m=0,h=0;;)if(h<m){var p=l.ba(null,h);(f.h?f.h(p):f.call(null,p)).on("all",function(D,I,O,P,W,ca,ja,na,pa,fa){return function(E,C){return $APP.r(esm_import$fs.lstatSync(C).isDirectory())? | ||
$$.h=function(){$APP.vq=$APP.Lx;$APP.kq=$APP.uq=!0;$APP.r(X$)&&process.stdin.setRawMode(!0);return Promise.resolve(eval("globalThis.user \x3d globalThis.user || {};")).then(function(){return new Promise(function(a){var b=$APP.r(null)?esm_import$readline.createInterface({input:null,output:null}):esm_import$readline.createInterface({input:process.stdin,output:process.stdout});Q$(b,null);b.setPrompt([$APP.t.h($APP.u(J$)),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};$$.m=1;var T$=function T$(a){var c=esm_import$fs.readdirSync(a);return $APP.mg($APP.Cr.l(function(d){d=esm_import$path.resolve(a,d);return $APP.r(esm_import$fs.lstatSync(d).isDirectory())?T$.h?T$.h(d):T$.call(null,d):new $APP.J(null,1,5,$APP.N,[d],null)},$APP.F([c])))},pha=new $APP.J(null,7,5,$APP.N,[new $APP.n(null,3,[l$,new $APP.J(null,1,5,$APP.N,["run"],null),$APP.uo,function(a){a=$APP.jf(a);a=$APP.fe.g(a,$APP.SG);var b=$APP.u($APP.tG),c=$APP.Mk.l($APP.F([b,a]));a=$APP.jf(c);var d=$APP.fe.g(a,$APP.Wk); | ||
a=$APP.fe.g(a,U$);if($APP.r(a))return null;$APP.PG.l($APP.F(["[squint] Running",d]));return $APP.JG($APP.zi.l(c,$APP.EG,d,$APP.F([$APP.Dq,function(e){return R$(c,d,e)}]))).then(function(e){e=$APP.jf(e);e=$APP.fe.g(e,$APP.GG);e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",$APP.t.h(e)].join("");return shadow_esm_import(e)})},C$,new $APP.J(null,1,5,$APP.N,[$APP.Wk],null)],null),new $APP.n(null,2,[l$,new $APP.J(null,1,5,$APP.N,["compile"],null),$APP.uo,function(a){var b=$APP.jf(a); | ||
a=$APP.fe.g(b,W$);b=$APP.fe.g(b,$APP.SG);return V$(b,a)}],null),new $APP.n(null,2,[l$,new $APP.J(null,1,5,$APP.N,["repl"],null),$APP.uo,$$],null),new $APP.n(null,2,[l$,new $APP.J(null,1,5,$APP.N,["socket-repl"],null),$APP.uo,Z$],null),new $APP.n(null,2,[l$,new $APP.J(null,1,5,$APP.N,["nrepl-server"],null),$APP.uo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.SG);return shadow_esm_import("./node.nrepl_server.js").then(function(c){c=c.startServer;return c.h?c.h(b):c.call(null,b)})}],null),new $APP.n(null, | ||
2,[l$,new $APP.J(null,1,5,$APP.N,["watch"],null),$APP.uo,function(a){var b=$APP.u($APP.tG),c=$APP.Mk.l($APP.F([b,a])),d=$APP.sG.h(b),e=$APP.IG.g(b,".");return shadow_esm_import("chokidar").catch(function(f){return console.error(f)}).then(function(f){f=f.watch;$APP.PG.l($APP.F(["[squint] Watching paths:",$APP.wp.g(", ",d)]));for(var k=$APP.x(d),l=null,m=0,h=0;;)if(h<m){var p=l.ba(null,h);(f.h?f.h(p):f.call(null,p)).on("all",function(D,I,O,P,W,ca,ja,na,pa,fa){return function(E,C){return $APP.r(esm_import$fs.lstatSync(C).isDirectory())? | ||
null:$APP.he(new $APP.Qh(null,new $APP.n(null,2,["add",null,"change",null],null),null),E)&&$APP.he(new $APP.Qh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(C))?V$(na,new $APP.J(null,1,5,$APP.N,[C],null)).catch(function(){return function(ea){return console.error(ea)}}(D,I,O,P,W,ca,ja,na,pa,fa)):S$(C,fa,pa)}}(k,l,m,h,p,f,b,c,d,e));h+=1}else{var q=$APP.x(k);if(q){var v=q;$APP.Yd(v)?(k=$APP.uc(v),m=$APP.vc(v),l=k,v=$APP.xd(k),k=m,m=v):(p=$APP.y(v),(f.h?f.h(p): | ||
f.call(null,p)).on("all",function(D,I,O,P,W,ca,ja,na,pa,fa,E,C){return function(ea,K){return $APP.r(esm_import$fs.lstatSync(K).isDirectory())?null:$APP.he(new $APP.Qh(null,new $APP.n(null,2,["add",null,"change",null],null),null),ea)&&$APP.he(new $APP.Qh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(K))?V$(fa,new $APP.J(null,1,5,$APP.N,[K],null)).catch(function(){return function(M){return console.error(M)}}(D,I,O,P,W,ca,ja,na,pa,fa,E,C)):S$(K,C,E)}}(k,l,m,h, | ||
p,v,q,f,b,c,d,e)),k=$APP.z(v),l=null,m=0);h=0}else return null}})}],null),new $APP.n(null,2,[l$,$APP.lg,$APP.uo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,W$),c=$APP.fe.g(a,$APP.MG);a=$APP.PD.h(c);if($APP.r(a)){if($APP.r(U$.h(c)))return $APP.JG.l($APP.F(["Usage: squint -e \x3cexpr\x3e \x3copts\x3e\n\nOptions:\n\n--no-run: do not run compiled expression\n--show: print compiled expression"]));a=$APP.r($APP.jt.h(c))?$APP.Wj("(do %s\n)","%s",a):a;a=$APP.RF.g(a,$APP.zi.l(c,$APP.jt,$APP.jt.h(c),$APP.F([$APP.Oq, | ||
$APP.Si.h(new $APP.n(null,1,[$APP.po,$APP.Jx],null)),$APP.np,$APP.r($APP.jt.h(c))?$APP.mp:$APP.mq,$APP.Nt,$APP.jt.h(c)])));a=$APP.r($APP.jt.h(c))?$APP.Wj("(async function() { %s })()","%s",a):a;var d=esm_import$fs.mkdtempSync(".tmp"),e=[$APP.t.h(d),"/squint.mjs"].join("");esm_import$fs.writeFileSync(e,a,"utf-8");$APP.r(hha.h(c))&&$APP.JG.l($APP.F([a]));if(!1===iha.h(c))return null;e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return($APP.r($APP.jt.h(c))?Promise.resolve(eval(a)): | ||
shadow_esm_import(e)).then(function(f){return $APP.r($APP.jt.h(c))?$APP.IG.l($APP.F([f])):null}).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=U$.h(c);return $APP.r(f)?f:$APP.A.g("help",$APP.y(b))||$APP.Qd(b)}())?$APP.JG.l($APP.F(["Squint v0.4.79\n\nUsage: squint \x3csubcommand\x3e \x3copts\x3e\n\nSubcommands:\n\n-e \x3cexpr\x3e Compile and run expression.\nrun \x3cfile.cljs\x3e Compile and run a file\nwatch Watch :paths in squint.edn\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."])): | ||
V$(c,b)}],null)],null);(function(){var a=new $APP.n(null,2,[$APP.Qq,new $APP.n(null,1,[jha,U$],null),g$,new $APP.n(null,4,[$APP.Nt,r$,$APP.Rq,r$,$APP.CG,$APP.jl,$APP.jt,r$],null)],null),b=n$(process.argv.slice(2),a),c=$APP.jf(b),d=$APP.fe.g(c,l$),e=$APP.fe.g(c,m$);return $APP.oe.j(function(f,k){f=$APP.jf(k);var l=$APP.fe.g(f,l$),m=$APP.fe.g(f,$APP.uo),h=dha(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.x(h);return null==v?null:$APP.mg(v)}();k=$APP.R.g(k,e);f=cha(k,X9(a,$APP.F([f])));k=$APP.jf(f);var p=$APP.fe.g(k, | ||
$APP.MG);f=$APP.fe.g(k,m$);k=$APP.fe.g(k,l$);var q=$APP.R.g(k,f);return $APP.ld(function(){var v=$APP.zi.l(c,m$,q,$APP.F([W$,q,$APP.MG,p,$APP.Yo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,kha)})(); | ||
p,v,q,f,b,c,d,e)),k=$APP.z(v),l=null,m=0);h=0}else return null}})}],null),new $APP.n(null,2,[l$,$APP.lg,$APP.uo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,W$),c=$APP.fe.g(a,$APP.SG);a=$APP.TD.h(c);if($APP.r(a)){if($APP.r(U$.h(c)))return $APP.PG.l($APP.F(["Usage: squint -e \x3cexpr\x3e \x3copts\x3e\n\nOptions:\n\n--no-run: do not run compiled expression\n--show: print compiled expression"]));a=$APP.r($APP.jt.h(c))?$APP.Wj("(do %s\n)","%s",a):a;a=$APP.XF.g(a,$APP.zi.l(c,$APP.jt,$APP.jt.h(c),$APP.F([$APP.Oq, | ||
$APP.Si.h(new $APP.n(null,1,[$APP.po,$APP.Lx],null)),$APP.np,$APP.r($APP.jt.h(c))?$APP.mp:$APP.mq,$APP.Nt,$APP.jt.h(c)])));a=$APP.r($APP.jt.h(c))?$APP.Wj("(async function() { %s })()","%s",a):a;var d=esm_import$fs.mkdtempSync(".tmp"),e=[$APP.t.h(d),"/squint.mjs"].join("");esm_import$fs.writeFileSync(e,a,"utf-8");$APP.r(mha.h(c))&&$APP.PG.l($APP.F([a]));if(!1===nha.h(c))return null;e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return($APP.r($APP.jt.h(c))?Promise.resolve(eval(a)): | ||
shadow_esm_import(e)).then(function(f){return $APP.r($APP.jt.h(c))?$APP.OG.l($APP.F([f])):null}).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=U$.h(c);return $APP.r(f)?f:$APP.A.g("help",$APP.y(b))||$APP.Qd(b)}())?$APP.PG.l($APP.F(["Squint v0.4.80\n\nUsage: squint \x3csubcommand\x3e \x3copts\x3e\n\nSubcommands:\n\n-e \x3cexpr\x3e Compile and run expression.\nrun \x3cfile.cljs\x3e Compile and run a file\nwatch Watch :paths in squint.edn\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."])): | ||
V$(c,b)}],null)],null);(function(){var a=new $APP.n(null,2,[$APP.Qq,new $APP.n(null,1,[oha,U$],null),g$,new $APP.n(null,4,[$APP.Nt,r$,$APP.Rq,r$,$APP.IG,$APP.jl,$APP.jt,r$],null)],null),b=n$(process.argv.slice(2),a),c=$APP.jf(b),d=$APP.fe.g(c,l$),e=$APP.fe.g(c,m$);return $APP.oe.j(function(f,k){f=$APP.jf(k);var l=$APP.fe.g(f,l$),m=$APP.fe.g(f,$APP.uo),h=iha(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.x(h);return null==v?null:$APP.mg(v)}();k=$APP.R.g(k,e);f=hha(k,X9(a,$APP.F([f])));k=$APP.jf(f);var p=$APP.fe.g(k, | ||
$APP.SG);f=$APP.fe.g(k,m$);k=$APP.fe.g(k,l$);var q=$APP.R.g(k,f);return $APP.ld(function(){var v=$APP.zi.l(c,m$,q,$APP.F([W$,q,$APP.SG,p,$APP.Yo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,pha)})(); |
import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
import "./node.js"; | ||
const shadow_esm_import = function(x) { return import(x) }; | ||
import*as esm_import$fs from"fs";import*as esm_import$path from"path";var TF,UF,VF,kG,lG,vG,wG,EG,FG,pG,uG,zG;$APP.SF=function(a,b){return $APP.qa(a,b)};TF=function(a,b){a.sort(b||$APP.Ba)};UF=function(a,b){const c=Array(a.length);for(let e=0;e<a.length;e++)c[e]={index:e,value:a[e]};const d=b||$APP.Ba;TF(c,function(e,f){return d(e.value,f.value)||e.index-f.index});for(b=0;b<a.length;b++)a[b]=c[b].value};VF=function(){}; | ||
$APP.WF=function(a){return null!=a?a.D&512||$APP.Oc===a.Ce?!0:a.D?!1:$APP.cb($APP.yb,a):$APP.cb($APP.yb,a)};$APP.XF=function(a){return $APP.ee(a)||!1};$APP.YF=function(a){return"number"===typeof a};$APP.$F=function(){this.C=[]};$APP.aG=function(a){return $APP.A.g(a,$APP.ie)?$APP.ie:function(b,c){var d=a.g?a.g(b,c):a.call(null,b,c);return"number"===typeof d?d:$APP.r(d)?-1:$APP.r(a.g?a.g(c,b):a.call(null,c,b))?1:0}};$APP.bG=function(a){$APP.li("\n");return $APP.fe.g(a,$APP.Ga),null}; | ||
$APP.cG=function(a,b){return(null!=a?$APP.Oc===a.Hc||(a.wd?0:$APP.cb(VF,a)):$APP.cb(VF,a))?$APP.Db(a,b):null!=a&&$APP.WF(a)&&$APP.he(a,b)?new $APP.Kg(b,$APP.fe.g(a,b),null):null};$APP.dG=function(a,b){return new $APP.J(null,2,5,$APP.N,[$APP.Jr.g(a,b),$APP.Kr.g(a,b)],null)};$APP.eG=function(a,b){this.f=a;this.value=b;this.D=2147516416;this.M=1};$APP.fG=function(a){return Math.floor(Math.random()*a)}; | ||
$APP.gG=function(){function a(){return $APP.fG(16).toString(16)}var b=(8|3&$APP.fG(16)).toString(16);return new $APP.kj([$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-4",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(b),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()), | ||
$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a())].join("").toLowerCase())};$APP.hG=function(a){return a instanceof Error?a.message:null};$APP.iG=function(a){return $APP.Nq.g(a,/\n|\r\n/)};$APP.jG=function(a){return $APP.ua(null==a?"":String(a))};kG=function(a,b){return $APP.r($APP.r(b)?$APP.Ko.g(b,""):b)?$APP.Am(a,$APP.Gk(b)):null}; | ||
lG=function(a,b){return $APP.Ef(function(c){c=esm_import$path.resolve(a,[$APP.t.h(b),".",$APP.t.h(c)].join(""));return $APP.r(esm_import$fs.existsSync(c))?c:null},new $APP.J(null,2,5,$APP.N,["cljc","cljs"],null))};$APP.oG=function(a){var b=$APP.Wj($APP.Wj($APP.t.h(a),"-","_"),".","/");return $APP.Ef(function(c){return lG(c,b)},$APP.mG.g($APP.u($APP.nG),new $APP.J(null,2,5,$APP.N,[".","src"],null)))}; | ||
vG=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,$APP.Oq);a=$APP.gp($APP.ep(a),$APP.Kt);if($APP.be(a)&&$APP.A.g($APP.Aj,$APP.y(a))){a=$APP.x(a);$APP.y(a);a=$APP.z(a);var d=$APP.y(a);a=$APP.z(a);a=$APP.Ef(function(k){var l=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);return $APP.be(l)&&$APP.A.g(pG,$APP.y(l))?new $APP.J(null,2,5,$APP.N,[$APP.cd(l),k],null):null},$APP.qG.j(2,1,a));var e=$APP.B.j(a,0,null),f=$APP.B.j(a,1,null);return $APP.r(e)?shadow_esm_import("./compiler.sci.js").then(function(){var k=$APP.rG.h($APP.u($APP.sG)); | ||
return $APP.oe.j(function(l,m){return l.then(function(){var h=$APP.x(m),p=$APP.y(h);h=$APP.z(h);h=$APP.jf(h);var q=$APP.fe.g(h,$APP.Jq),v=$APP.fe.g(h,$APP.Kq);return Promise.resolve(function(){var D=function(){var O=new $APP.G(null,$APP.kE,new $APP.G(null,new $APP.G(null,$APP.Jj,new $APP.G(null,p,null,1,null),2,null),null,1,null),2,null);return $APP.r(f)?$APP.R.g(O,new $APP.J(null,1,5,$APP.N,[$APP.tG],null)):O}();k.h?k.h(D):k.call(null,D);var I=function(){var O=$APP.X.h($APP.x($APP.R.g(new $APP.G(null, | ||
uG,null,1,null),new $APP.G(null,$APP.X.h($APP.x($APP.R.g(new $APP.G(null,$APP.Jj,null,1,null),new $APP.G(null,p,null,1,null)))),null,1,null))));return k.h?k.h(O):k.call(null,O)}();D=$APP.Mh(I);I=$APP.Oh(I);I=$APP.qi.g($APP.od,I);return $APP.Yh(D,I)}()).then(function(D){return $APP.Ti.g(c,function(I){I=$APP.zu(I,new $APP.J(null,2,5,$APP.N,[$APP.it,p],null),D);I=$APP.r(v)?$APP.zu(I,new $APP.J(null,3,5,$APP.N,[d,$APP.Qq,v],null),p):I;return $APP.r(q)?$APP.zu(I,new $APP.J(null,2,5,$APP.N,[d,$APP.Pq], | ||
null),$APP.Yh(q,$APP.vu.h(p))):I})})})},Promise.resolve(null),e)}):null}return null};wG=function(a,b){return Promise.resolve(vG(a,b)).then(function(){return $APP.Yt(a,b,null)})}; | ||
$APP.xG=function(a,b){return $APP.oe.j(function(c,d){a:{var e=esm_import$path.resolve(d).split(esm_import$path.sep);for(var f=esm_import$path.resolve(a).split(esm_import$path.sep);;){var k=$APP.Qd(e);if(k){e=k;break a}if(k=$APP.x(f))if(k=$APP.A.g($APP.y(e),$APP.y(f)))e=$APP.cd(e),f=$APP.cd(f);else{e=k;break a}else{e=k;break a}}}return e?$APP.ld(esm_import$path.relative(d,a)):c},a,b)}; | ||
$APP.DG=function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.yG),c=$APP.fe.g(a,zG),d=$APP.fe.g(a,$APP.AG),e=$APP.fe.g(a,$APP.BG),f=$APP.fe.j(a,$APP.CG,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return wG(c,$APP.zi.j(a,$APP.Oq,$APP.Si.h(new $APP.n(null,1,[$APP.po,$APP.Jx],null)))).then(function(k){k=$APP.jf(k);var l=$APP.fe.g(k,$APP.Xt),m=$APP.fe.g(k,$APP.Ip),h=$APP.mG.g($APP.u($APP.nG),new $APP.J(null,2,5,$APP.N,[".","src"],null)),p=esm_import$path,q=p.resolve;$APP.r(d)?h=d:(h=$APP.xG(b,h), | ||
$APP.r(m)?m=".jsx":(m=$APP.r(e)?[".",$APP.Wj(e,/^\./,"")].join(""):null,m=$APP.r(m)?m:".mjs"),h=$APP.Wj(h,/.clj(s|c)$/,m));p=q.call(p,f,h);q=esm_import$path.dirname(p);$APP.r(esm_import$fs.existsSync(q))||esm_import$fs.mkdirSync(q,{recursive:!0});if(!$APP.r(esm_import$fs.existsSync(q)))throw Error("File not found, make sure output-dir is a valid path: ",new $APP.n(null,2,[$APP.CG,f,$APP.AG,p],null));esm_import$fs.writeFileSync(p,l,"utf-8");return $APP.zi.j(k,$APP.AG,p)})}; | ||
EG=function(a){return $APP.Vu.l(a,$APP.F([$APP.Wu,!0]))};FG=function(a){return function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xc(f,0,null)}return c.call(this,e)}function c(d){d=$APP.yu.g(EG,d);d=$APP.Gf.g(a,d);return d instanceof Promise?d.then($APP.Tu):$APP.Tu(d)}b.m=0;b.o=function(d){d=$APP.x(d);return c(d)};b.l=c;return b}()};$APP.$F.prototype.add=function(a){return this.C.push(a)}; | ||
$APP.$F.prototype.size=function(){return this.C.length};$APP.$F.prototype.clear=function(){return this.C=[]};$APP.$F.prototype.fd=function(){return 0===this.C.length};$APP.GG=function GG(a){switch(arguments.length){case 1:return GG.h(arguments[0]);case 2:return GG.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.GG.h=function(a){return $APP.GG.g($APP.ie,a)}; | ||
$APP.GG.g=function(a,b){if($APP.x(b)){var c=$APP.Ze.h?$APP.Ze.h(b):$APP.Ze.call(null,b);UF(c,$APP.aG(a));return $APP.Md($APP.x(c),$APP.Nd(b))}return $APP.bd};$APP.GG.m=2;$APP.HG=function HG(a){switch(arguments.length){case 2:return HG.g(arguments[0],arguments[1]);case 3:return HG.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.HG.g=function(a,b){return $APP.HG.j(a,$APP.ie,b)}; | ||
$APP.HG.j=function(a,b,c){return $APP.GG.g(function(d,e){d=a.h?a.h(d):a.call(null,d);e=a.h?a.h(e):a.call(null,e);var f=$APP.aG(b);return f.g?f.g(d,e):f.call(null,d,e)},c)};$APP.HG.m=3;$APP.IG=function IG(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return IG.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.IG.l=function(a){$APP.Di(a,$APP.Ra());return $APP.r($APP.Ta)?$APP.bG($APP.Ra()):null};$APP.IG.m=0;$APP.IG.o=function(a){return this.l($APP.x(a))}; | ||
$APP.JG=function JG(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return JG.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.JG.l=function(a){$APP.Di(a,$APP.zi.j($APP.Ra(),$APP.Ia,!1));return $APP.r($APP.Ta)?$APP.bG($APP.Ra()):null};$APP.JG.m=0;$APP.JG.o=function(a){return this.l($APP.x(a))}; | ||
$APP.qG=function qG(a){switch(arguments.length){case 1:return qG.h(arguments[0]);case 2:return qG.g(arguments[0],arguments[1]);case 3:return qG.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.qG.h=function(a){return function(b){var c=new $APP.$F;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.mg(c.C),c.clear(),b.g?b.g(l,m):b.call(null,l,m)):l}function e(l){if(!$APP.r(c.fd())){var m=$APP.mg(c.C);c.clear();l=$APP.pd(b.g?b.g(l,m):b.call(null,l,m))}return b.h?b.h(l):b.call(null,l)}function f(){return b.v?b.v():b.call(null)}var k=null;k=function(l,m){switch(arguments.length){case 0:return f.call(this);case 1:return e.call(this,l);case 2:return d.call(this,l,m)}throw Error("Invalid arity: "+ | ||
arguments.length);};k.v=f;k.h=e;k.g=d;return k}()}};$APP.qG.g=function(a,b){return $APP.qG.j(a,a,b)};$APP.qG.j=function(a,b,c){return new $APP.Qe(null,function(){var d=$APP.x(c);return d?$APP.He($APP.Mf.g(a,d),$APP.qG.j(a,b,$APP.Nf.g(b,d))):null},null,null)};$APP.qG.m=3;$APP.eG.prototype.nb=function(){$APP.r(this.f)&&(this.value=this.f.v?this.f.v():this.f.call(null),this.f=null);return this.value};$APP.eG.prototype.$c=function(){return $APP.Za(this.f)}; | ||
$APP.eG.prototype.R=function(a,b,c){$APP.ic(b,"#object[cljs.core.Delay ");$APP.pi(new $APP.n(null,2,[$APP.KC,null==this.f?$APP.dw:$APP.yA,$APP.Ru,this.value],null),b,c);return $APP.ic(b,"]")};$APP.KG=function KG(a){switch(arguments.length){case 1:return KG.h(arguments[0]);case 2:return KG.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.KG.h=function(a){return kG(new $APP.n(null,3,[$APP.ym,$APP.u($APP.WE),$APP.zm,$APP.u($APP.VE),$APP.el,null],null),a)};$APP.KG.g=function(a,b){return kG($APP.Pm.j($APP.Mk.l($APP.F([new $APP.n(null,1,[$APP.zm,$APP.u($APP.VE)],null),a])),$APP.ym,function(c){return $APP.Mk.l($APP.F([$APP.u($APP.WE),c]))}),b)};$APP.KG.m=2;$APP.LG=new $APP.H(null,"port","port",1534937262);$APP.tG=new $APP.H(null,"reload","reload",863702807);$APP.MG=new $APP.H(null,"opts","opts",155075701); | ||
$APP.CG=new $APP.H(null,"output-dir","output-dir",-290956991);pG=new $APP.H(null,"require-macros","require-macros",707947416);$APP.NG=new $APP.H(null,"message","message",-406056002);$APP.yG=new $APP.H(null,"in-file","in-file",-1682176692);$APP.OG=new $APP.H(null,"id","id",-1388402092);uG=new $APP.w("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.mG=new $APP.H(null,"paths","paths",-1807389588);$APP.PG=new $APP.H(null,"eval","eval",-1103567905); | ||
$APP.rG=new $APP.H(null,"eval-form","eval-form",-1934118476);$APP.AG=new $APP.H(null,"out-file","out-file",-1187066405);zG=new $APP.H(null,"in-str","in-str",-1014658121);$APP.BG=new $APP.H(null,"extension","extension",1453374065);$APP.nG=new $APP.eG(function(){if($APP.r(esm_import$fs.existsSync("squint.edn"))){var a=esm_import$fs.readFileSync("squint.edn","utf-8");a=$APP.KG.h(a)}else a=null;return a},null);var QG;$APP.sG=$APP.Si.h(null);QG=FG(wG);export const compileFile=FG($APP.DG);export const compileString=QG; | ||
import*as esm_import$fs from"fs";import*as esm_import$path from"path";var ZF,aG,bG,qG,rG,BG,CG,KG,LG,vG,AG,FG;$APP.YF=function(a,b){return $APP.qa(a,b)};ZF=function(a,b){a.sort(b||$APP.Ba)};aG=function(a,b){const c=Array(a.length);for(let e=0;e<a.length;e++)c[e]={index:e,value:a[e]};const d=b||$APP.Ba;ZF(c,function(e,f){return d(e.value,f.value)||e.index-f.index});for(b=0;b<a.length;b++)a[b]=c[b].value};bG=function(){}; | ||
$APP.cG=function(a){return null!=a?a.D&512||$APP.Oc===a.Ce?!0:a.D?!1:$APP.cb($APP.yb,a):$APP.cb($APP.yb,a)};$APP.dG=function(a){return $APP.ee(a)||!1};$APP.eG=function(a){return"number"===typeof a};$APP.fG=function(){this.C=[]};$APP.gG=function(a){return $APP.A.g(a,$APP.ie)?$APP.ie:function(b,c){var d=a.g?a.g(b,c):a.call(null,b,c);return"number"===typeof d?d:$APP.r(d)?-1:$APP.r(a.g?a.g(c,b):a.call(null,c,b))?1:0}};$APP.hG=function(a){$APP.li("\n");return $APP.fe.g(a,$APP.Ga),null}; | ||
$APP.iG=function(a,b){return(null!=a?$APP.Oc===a.Hc||(a.wd?0:$APP.cb(bG,a)):$APP.cb(bG,a))?$APP.Db(a,b):null!=a&&$APP.cG(a)&&$APP.he(a,b)?new $APP.Kg(b,$APP.fe.g(a,b),null):null};$APP.jG=function(a,b){return new $APP.J(null,2,5,$APP.N,[$APP.Jr.g(a,b),$APP.Kr.g(a,b)],null)};$APP.kG=function(a,b){this.f=a;this.value=b;this.D=2147516416;this.M=1};$APP.lG=function(a){return Math.floor(Math.random()*a)}; | ||
$APP.mG=function(){function a(){return $APP.lG(16).toString(16)}var b=(8|3&$APP.lG(16)).toString(16);return new $APP.kj([$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-4",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(b),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()), | ||
$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a())].join("").toLowerCase())};$APP.nG=function(a){return a instanceof Error?a.message:null};$APP.oG=function(a){return $APP.Nq.g(a,/\n|\r\n/)};$APP.pG=function(a){return $APP.ua(null==a?"":String(a))};qG=function(a,b){return $APP.r($APP.r(b)?$APP.Ko.g(b,""):b)?$APP.Am(a,$APP.Gk(b)):null}; | ||
rG=function(a,b){return $APP.Ef(function(c){c=esm_import$path.resolve(a,[$APP.t.h(b),".",$APP.t.h(c)].join(""));return $APP.r(esm_import$fs.existsSync(c))?c:null},new $APP.J(null,2,5,$APP.N,["cljc","cljs"],null))};$APP.uG=function(a){var b=$APP.Wj($APP.Wj($APP.t.h(a),"-","_"),".","/");return $APP.Ef(function(c){return rG(c,b)},$APP.sG.g($APP.u($APP.tG),new $APP.J(null,2,5,$APP.N,[".","src"],null)))}; | ||
BG=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,$APP.Oq);a=$APP.gp($APP.ep(a),$APP.Kt);if($APP.be(a)&&$APP.A.g($APP.Aj,$APP.y(a))){a=$APP.x(a);$APP.y(a);a=$APP.z(a);var d=$APP.y(a);a=$APP.z(a);a=$APP.Ef(function(k){var l=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);return $APP.be(l)&&$APP.A.g(vG,$APP.y(l))?new $APP.J(null,2,5,$APP.N,[$APP.cd(l),k],null):null},$APP.wG.j(2,1,a));var e=$APP.B.j(a,0,null),f=$APP.B.j(a,1,null);return $APP.r(e)?shadow_esm_import("./compiler.sci.js").then(function(){var k=$APP.xG.h($APP.u($APP.yG)); | ||
return $APP.oe.j(function(l,m){return l.then(function(){var h=$APP.x(m),p=$APP.y(h);h=$APP.z(h);h=$APP.jf(h);var q=$APP.fe.g(h,$APP.Jq),v=$APP.fe.g(h,$APP.Kq);return Promise.resolve(function(){var D=function(){var O=new $APP.G(null,$APP.pE,new $APP.G(null,new $APP.G(null,$APP.Jj,new $APP.G(null,p,null,1,null),2,null),null,1,null),2,null);return $APP.r(f)?$APP.R.g(O,new $APP.J(null,1,5,$APP.N,[$APP.zG],null)):O}();k.h?k.h(D):k.call(null,D);var I=function(){var O=$APP.X.h($APP.x($APP.R.g(new $APP.G(null, | ||
AG,null,1,null),new $APP.G(null,$APP.X.h($APP.x($APP.R.g(new $APP.G(null,$APP.Jj,null,1,null),new $APP.G(null,p,null,1,null)))),null,1,null))));return k.h?k.h(O):k.call(null,O)}();D=$APP.Mh(I);I=$APP.Oh(I);I=$APP.qi.g($APP.od,I);return $APP.Yh(D,I)}()).then(function(D){return $APP.Ti.g(c,function(I){I=$APP.zu(I,new $APP.J(null,2,5,$APP.N,[$APP.it,p],null),D);I=$APP.r(v)?$APP.zu(I,new $APP.J(null,3,5,$APP.N,[d,$APP.Qq,v],null),p):I;return $APP.r(q)?$APP.zu(I,new $APP.J(null,2,5,$APP.N,[d,$APP.Pq], | ||
null),$APP.Yh(q,$APP.vu.h(p))):I})})})},Promise.resolve(null),e)}):null}return null};CG=function(a,b){return Promise.resolve(BG(a,b)).then(function(){return $APP.Yt(a,b,null)})}; | ||
$APP.DG=function(a,b){return $APP.oe.j(function(c,d){a:{var e=esm_import$path.resolve(d).split(esm_import$path.sep);for(var f=esm_import$path.resolve(a).split(esm_import$path.sep);;){var k=$APP.Qd(e);if(k){e=k;break a}if(k=$APP.x(f))if(k=$APP.A.g($APP.y(e),$APP.y(f)))e=$APP.cd(e),f=$APP.cd(f);else{e=k;break a}else{e=k;break a}}}return e?$APP.ld(esm_import$path.relative(d,a)):c},a,b)}; | ||
$APP.JG=function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.EG),c=$APP.fe.g(a,FG),d=$APP.fe.g(a,$APP.GG),e=$APP.fe.g(a,$APP.HG),f=$APP.fe.j(a,$APP.IG,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return CG(c,$APP.zi.j(a,$APP.Oq,$APP.Si.h(new $APP.n(null,1,[$APP.po,$APP.Lx],null)))).then(function(k){k=$APP.jf(k);var l=$APP.fe.g(k,$APP.Xt),m=$APP.fe.g(k,$APP.Ip),h=$APP.sG.g($APP.u($APP.tG),new $APP.J(null,2,5,$APP.N,[".","src"],null)),p=esm_import$path,q=p.resolve;$APP.r(d)?h=d:(h=$APP.DG(b,h), | ||
$APP.r(m)?m=".jsx":(m=$APP.r(e)?[".",$APP.Wj(e,/^\./,"")].join(""):null,m=$APP.r(m)?m:".mjs"),h=$APP.Wj(h,/.clj(s|c)$/,m));p=q.call(p,f,h);q=esm_import$path.dirname(p);$APP.r(esm_import$fs.existsSync(q))||esm_import$fs.mkdirSync(q,{recursive:!0});if(!$APP.r(esm_import$fs.existsSync(q)))throw Error("File not found, make sure output-dir is a valid path: ",new $APP.n(null,2,[$APP.IG,f,$APP.GG,p],null));esm_import$fs.writeFileSync(p,l,"utf-8");return $APP.zi.j(k,$APP.GG,p)})}; | ||
KG=function(a){return $APP.Vu.l(a,$APP.F([$APP.Wu,!0]))};LG=function(a){return function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xc(f,0,null)}return c.call(this,e)}function c(d){d=$APP.yu.g(KG,d);d=$APP.Gf.g(a,d);return d instanceof Promise?d.then($APP.Tu):$APP.Tu(d)}b.m=0;b.o=function(d){d=$APP.x(d);return c(d)};b.l=c;return b}()};$APP.fG.prototype.add=function(a){return this.C.push(a)}; | ||
$APP.fG.prototype.size=function(){return this.C.length};$APP.fG.prototype.clear=function(){return this.C=[]};$APP.fG.prototype.fd=function(){return 0===this.C.length};$APP.MG=function MG(a){switch(arguments.length){case 1:return MG.h(arguments[0]);case 2:return MG.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.MG.h=function(a){return $APP.MG.g($APP.ie,a)}; | ||
$APP.MG.g=function(a,b){if($APP.x(b)){var c=$APP.Ze.h?$APP.Ze.h(b):$APP.Ze.call(null,b);aG(c,$APP.gG(a));return $APP.Md($APP.x(c),$APP.Nd(b))}return $APP.bd};$APP.MG.m=2;$APP.NG=function NG(a){switch(arguments.length){case 2:return NG.g(arguments[0],arguments[1]);case 3:return NG.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.NG.g=function(a,b){return $APP.NG.j(a,$APP.ie,b)}; | ||
$APP.NG.j=function(a,b,c){return $APP.MG.g(function(d,e){d=a.h?a.h(d):a.call(null,d);e=a.h?a.h(e):a.call(null,e);var f=$APP.gG(b);return f.g?f.g(d,e):f.call(null,d,e)},c)};$APP.NG.m=3;$APP.OG=function OG(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return OG.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.OG.l=function(a){$APP.Di(a,$APP.Ra());return $APP.r($APP.Ta)?$APP.hG($APP.Ra()):null};$APP.OG.m=0;$APP.OG.o=function(a){return this.l($APP.x(a))}; | ||
$APP.PG=function PG(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return PG.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.PG.l=function(a){$APP.Di(a,$APP.zi.j($APP.Ra(),$APP.Ia,!1));return $APP.r($APP.Ta)?$APP.hG($APP.Ra()):null};$APP.PG.m=0;$APP.PG.o=function(a){return this.l($APP.x(a))}; | ||
$APP.wG=function wG(a){switch(arguments.length){case 1:return wG.h(arguments[0]);case 2:return wG.g(arguments[0],arguments[1]);case 3:return wG.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.wG.h=function(a){return function(b){var c=new $APP.fG;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.mg(c.C),c.clear(),b.g?b.g(l,m):b.call(null,l,m)):l}function e(l){if(!$APP.r(c.fd())){var m=$APP.mg(c.C);c.clear();l=$APP.pd(b.g?b.g(l,m):b.call(null,l,m))}return b.h?b.h(l):b.call(null,l)}function f(){return b.v?b.v():b.call(null)}var k=null;k=function(l,m){switch(arguments.length){case 0:return f.call(this);case 1:return e.call(this,l);case 2:return d.call(this,l,m)}throw Error("Invalid arity: "+ | ||
arguments.length);};k.v=f;k.h=e;k.g=d;return k}()}};$APP.wG.g=function(a,b){return $APP.wG.j(a,a,b)};$APP.wG.j=function(a,b,c){return new $APP.Qe(null,function(){var d=$APP.x(c);return d?$APP.He($APP.Mf.g(a,d),$APP.wG.j(a,b,$APP.Nf.g(b,d))):null},null,null)};$APP.wG.m=3;$APP.kG.prototype.nb=function(){$APP.r(this.f)&&(this.value=this.f.v?this.f.v():this.f.call(null),this.f=null);return this.value};$APP.kG.prototype.$c=function(){return $APP.Za(this.f)}; | ||
$APP.kG.prototype.R=function(a,b,c){$APP.ic(b,"#object[cljs.core.Delay ");$APP.pi(new $APP.n(null,2,[$APP.NC,null==this.f?$APP.dw:$APP.zA,$APP.Ru,this.value],null),b,c);return $APP.ic(b,"]")};$APP.QG=function QG(a){switch(arguments.length){case 1:return QG.h(arguments[0]);case 2:return QG.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.QG.h=function(a){return qG(new $APP.n(null,3,[$APP.ym,$APP.u($APP.bF),$APP.zm,$APP.u($APP.aF),$APP.el,null],null),a)};$APP.QG.g=function(a,b){return qG($APP.Pm.j($APP.Mk.l($APP.F([new $APP.n(null,1,[$APP.zm,$APP.u($APP.aF)],null),a])),$APP.ym,function(c){return $APP.Mk.l($APP.F([$APP.u($APP.bF),c]))}),b)};$APP.QG.m=2;$APP.RG=new $APP.H(null,"port","port",1534937262);$APP.zG=new $APP.H(null,"reload","reload",863702807);$APP.SG=new $APP.H(null,"opts","opts",155075701); | ||
$APP.IG=new $APP.H(null,"output-dir","output-dir",-290956991);vG=new $APP.H(null,"require-macros","require-macros",707947416);$APP.TG=new $APP.H(null,"message","message",-406056002);$APP.EG=new $APP.H(null,"in-file","in-file",-1682176692);$APP.UG=new $APP.H(null,"id","id",-1388402092);AG=new $APP.w("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.sG=new $APP.H(null,"paths","paths",-1807389588);$APP.VG=new $APP.H(null,"eval","eval",-1103567905); | ||
$APP.xG=new $APP.H(null,"eval-form","eval-form",-1934118476);$APP.GG=new $APP.H(null,"out-file","out-file",-1187066405);FG=new $APP.H(null,"in-str","in-str",-1014658121);$APP.HG=new $APP.H(null,"extension","extension",1453374065);$APP.tG=new $APP.kG(function(){if($APP.r(esm_import$fs.existsSync("squint.edn"))){var a=esm_import$fs.readFileSync("squint.edn","utf-8");a=$APP.QG.h(a)}else a=null;return a},null);var WG;$APP.yG=$APP.Si.h(null);WG=LG(CG);export const compileFile=LG($APP.JG);export const compileString=WG; |
@@ -7,18 +7,18 @@ import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
import*as esm_import$fs from"fs";import*as esm_import$net from"net"; | ||
var K9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},L9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},M9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},N9=function(a){return console.debug($APP.wp.g(" ",a))},nga=function(a){return function(b,c){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.OG),e=$APP.fe.g(b,mga);c=$APP.zi.j(c,"id",d);c=$APP.r(e)?$APP.zi.j(c,"session",e):c;return a.g?a.g(b,c):a.call(null,b,c)}},pga=function(){var a= | ||
oga;return function(b,c){b=$APP.Pm.j(b,O9,$APP.ri);return a.g?a.g(b,c):a.call(null,b,c)}},rga=function(){var a=qga();return function(b,c){N9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},sga=function(a){return function(b,c){N9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},qga=function(){var a=pga();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},P9=function(a){return $APP.zi.j($APP.Yh(new $APP.J(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.Vu.h(a.split("."))), | ||
"version-string",a)},tga=function(a,b,c){if($APP.r(a))if(a=Q9.h?Q9.h(a):Q9.call(null,a),$APP.r(a)){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.s9),e=$APP.fe.g(b,$APP.l9),f=$APP.fe.g(b,$APP.u9);b=$APP.Qa;var k=$APP.hi,l=$APP.T6;$APP.Qa=e;$APP.hi=f;$APP.T6=d;try{var m=new $APP.Fa;d=$APP.Ta;e=$APP.Ua;$APP.Ta=!0;$APP.Ua=function(h){return m.append(h)};try{a.h?a.h(c):a.call(null,c)}finally{$APP.Ua=e,$APP.Ta=d}return $APP.t.h(m)}finally{$APP.T6=l,$APP.hi=k,$APP.Qa=b}}else return N9($APP.F(["Pretty-Printing is only supported for cider.nrepl.pprint/pprint"])), | ||
$APP.Oi.l($APP.F([c]));else return $APP.Oi.l($APP.F([c]))},vga=function(a){a:{var b=$APP.vq;$APP.vq=$APP.u(R9);try{var c=$APP.Yt(a,new $APP.n(null,5,[$APP.np,$APP.mp,$APP.Oq,uga,$APP.Nt,!0,$APP.jt,!0,$APP.vs,!0],null),null);break a}finally{$APP.vq=b}c=void 0}c=$APP.jf(c);a=$APP.fe.g(c,$APP.Xt);c=$APP.fe.g(c,$APP.S);a=$APP.Wj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(R9,c);return a},Bga=function(a,b){var c=$APP.jf(a);$APP.fe.g(c,$APP.S);a=$APP.fe.g(c,wga);$APP.fe.g(c,$APP.Wk);$APP.fe.g(c,xga); | ||
$APP.fe.g(c,yga);return Promise.resolve(a).then(vga).then(function(d){$APP.JG.l($APP.F(["About to eval:"]));$APP.JG.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(R9)),"value",tga(zga.h(c),Aga.h(c),d)],null);return b.g?b.g(c,d):b.call(null,c,d)}).catch(function(d){console.error(d);var e=$APP.NG.h($APP.mj(d));e=$APP.r(e)?e:d.message;$APP.r(e)&&(e=new $APP.n(null,1,["err",[$APP.t.h(e),"\n"].join("")],null),b.g?b.g(c,e):b.call(null,c,e));d=new $APP.n(null, | ||
2,["ex",$APP.t.h(d),"ns",$APP.t.h($APP.vq)],null);return b.g?b.g(c,d):b.call(null,c,d)}).finally(function(){var d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(R9)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},S9=function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.S);return null},oga=function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,O9),d=$APP.fe.g(T9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.wp.g(" ",$APP.F(["Unhandled operation",c]))); | ||
c=new $APP.n(null,1,["status",new $APP.J(null,3,5,$APP.N,["error","unknown-op","done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},Cga=function(a){return function(b,c){return a.write(U9(c))}},Dga=function(a,b){N9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=rga(),d=nga(sga(Cga(b))),e=$APP.Si.h(null);b.on("data",function(f){var k=$APP.u(e);if($APP.r(k)){f=[$APP.t.h(k),$APP.t.h(f)].join("");$APP.Jf(e,null);var l=f}else l=f;a:for(f=$APP.F([$APP.Wu,!0]),k=$APP.lg;;){var m=$APP.Gf.j(V9, | ||
l,f);l=$APP.B.j(m,0,null);m=$APP.B.j(m,1,null);if(null==l){k=new $APP.J(null,2,5,$APP.N,[k,m],null);break a}k=$APP.Ee.g(k,l);l=m}f=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);$APP.jG(k)||$APP.Jf(e,k);f=$APP.x(f);k=null;for(var h=m=0;;)if(h<m)l=k.ba(null,h),c(l,d),h+=1;else if(f=$APP.x(f))k=f,$APP.Yd(k)?(f=$APP.uc(k),m=$APP.vc(k),k=f,l=$APP.xd(f),f=m,m=l):(l=$APP.y(k),c(l,d),f=$APP.z(k),k=null,m=0),h=0;else return null});return b.on("close",function(f){return $APP.r(f)?N9($APP.F(["Connection lost"])): | ||
N9($APP.F(["Connection closed"]))})},yga=new $APP.H(null,"_line","_line",232847719),Aga=new $APP.H("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),mga=new $APP.H(null,"session","session",1008279103),Ega=new $APP.H(null,"lookup","lookup",1225356838),Fga=new $APP.H(null,"load-file","load-file",-424586670),xga=new $APP.H(null,"_load-file?","_load-file?",-1198848711),O9=new $APP.H(null,"op","op",-1882987955),Gga=new $APP.H(null,"describe","describe",1369790582),wga=new $APP.H(null, | ||
"code","code",1586293142),Hga=new $APP.H(null,"eldoc","eldoc",-1321421900),Iga=new $APP.H(null,"log_level","log_level",-1756736313),zga=new $APP.H("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),Jga=new $APP.H(null,"clone","clone",711747572),Kga=new $APP.H(null,"close","close",1835149582),Lga=new $APP.H(null,"info","info",-317069002),Mga=new $APP.H(null,"host","host",-1558485167),Nga=new $APP.H(null,"complete","complete",-500388775);var W9=function W9(a,b){switch($APP.t.h(M9(a,1))){case "i":return a=L9(a,1),b=K9(a,"e"),new $APP.J(null,2,5,$APP.N,[parseInt(M9(a,b)),L9(a,b+1)],null);case "l":var d=a=L9(a,1);for(a=$APP.mc($APP.lg);;){if($APP.A.g($APP.t.h(M9(d,1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(a),L9(d,1)],null);var e=W9.g?W9.g(d,b):W9.call(null,d,b),f=$APP.B.j(e,0,null),k=$APP.B.j(e,1,null);e=k;a=$APP.fg.g(a,f);d=e}case "d":for(a=L9(a,1),f=$APP.jf(b),f=$APP.fe.g(f,$APP.Wu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(M9(d, | ||
var K9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},L9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},M9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},N9=function(a){return console.debug($APP.wp.g(" ",a))},sga=function(a){return function(b,c){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.UG),e=$APP.fe.g(b,rga);c=$APP.zi.j(c,"id",d);c=$APP.r(e)?$APP.zi.j(c,"session",e):c;return a.g?a.g(b,c):a.call(null,b,c)}},uga=function(){var a= | ||
tga;return function(b,c){b=$APP.Pm.j(b,O9,$APP.ri);return a.g?a.g(b,c):a.call(null,b,c)}},wga=function(){var a=vga();return function(b,c){N9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},xga=function(a){return function(b,c){N9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},vga=function(){var a=uga();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},P9=function(a){return $APP.zi.j($APP.Yh(new $APP.J(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.Vu.h(a.split("."))), | ||
"version-string",a)},yga=function(a,b,c){if($APP.r(a))if(a=Q9.h?Q9.h(a):Q9.call(null,a),$APP.r(a)){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.s9),e=$APP.fe.g(b,$APP.l9),f=$APP.fe.g(b,$APP.u9);b=$APP.Qa;var k=$APP.hi,l=$APP.T6;$APP.Qa=e;$APP.hi=f;$APP.T6=d;try{var m=new $APP.Fa;d=$APP.Ta;e=$APP.Ua;$APP.Ta=!0;$APP.Ua=function(h){return m.append(h)};try{a.h?a.h(c):a.call(null,c)}finally{$APP.Ua=e,$APP.Ta=d}return $APP.t.h(m)}finally{$APP.T6=l,$APP.hi=k,$APP.Qa=b}}else return N9($APP.F(["Pretty-Printing is only supported for cider.nrepl.pprint/pprint"])), | ||
$APP.Oi.l($APP.F([c]));else return $APP.Oi.l($APP.F([c]))},Aga=function(a){a:{var b=$APP.vq;$APP.vq=$APP.u(R9);try{var c=$APP.Yt(a,new $APP.n(null,5,[$APP.np,$APP.mp,$APP.Oq,zga,$APP.Nt,!0,$APP.jt,!0,$APP.vs,!0],null),null);break a}finally{$APP.vq=b}c=void 0}c=$APP.jf(c);a=$APP.fe.g(c,$APP.Xt);c=$APP.fe.g(c,$APP.S);a=$APP.Wj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(R9,c);return a},Gga=function(a,b){var c=$APP.jf(a);$APP.fe.g(c,$APP.S);a=$APP.fe.g(c,Bga);$APP.fe.g(c,$APP.Wk);$APP.fe.g(c,Cga); | ||
$APP.fe.g(c,Dga);return Promise.resolve(a).then(Aga).then(function(d){$APP.PG.l($APP.F(["About to eval:"]));$APP.PG.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(R9)),"value",yga(Ega.h(c),Fga.h(c),d)],null);return b.g?b.g(c,d):b.call(null,c,d)}).catch(function(d){console.error(d);var e=$APP.TG.h($APP.mj(d));e=$APP.r(e)?e:d.message;$APP.r(e)&&(e=new $APP.n(null,1,["err",[$APP.t.h(e),"\n"].join("")],null),b.g?b.g(c,e):b.call(null,c,e));d=new $APP.n(null, | ||
2,["ex",$APP.t.h(d),"ns",$APP.t.h($APP.vq)],null);return b.g?b.g(c,d):b.call(null,c,d)}).finally(function(){var d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(R9)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},S9=function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.S);return null},tga=function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,O9),d=$APP.fe.g(T9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.wp.g(" ",$APP.F(["Unhandled operation",c]))); | ||
c=new $APP.n(null,1,["status",new $APP.J(null,3,5,$APP.N,["error","unknown-op","done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},Hga=function(a){return function(b,c){return a.write(U9(c))}},Iga=function(a,b){N9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=wga(),d=sga(xga(Hga(b))),e=$APP.Si.h(null);b.on("data",function(f){var k=$APP.u(e);if($APP.r(k)){f=[$APP.t.h(k),$APP.t.h(f)].join("");$APP.Jf(e,null);var l=f}else l=f;a:for(f=$APP.F([$APP.Wu,!0]),k=$APP.lg;;){var m=$APP.Gf.j(V9, | ||
l,f);l=$APP.B.j(m,0,null);m=$APP.B.j(m,1,null);if(null==l){k=new $APP.J(null,2,5,$APP.N,[k,m],null);break a}k=$APP.Ee.g(k,l);l=m}f=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);$APP.pG(k)||$APP.Jf(e,k);f=$APP.x(f);k=null;for(var h=m=0;;)if(h<m)l=k.ba(null,h),c(l,d),h+=1;else if(f=$APP.x(f))k=f,$APP.Yd(k)?(f=$APP.uc(k),m=$APP.vc(k),k=f,l=$APP.xd(f),f=m,m=l):(l=$APP.y(k),c(l,d),f=$APP.z(k),k=null,m=0),h=0;else return null});return b.on("close",function(f){return $APP.r(f)?N9($APP.F(["Connection lost"])): | ||
N9($APP.F(["Connection closed"]))})},Dga=new $APP.H(null,"_line","_line",232847719),Fga=new $APP.H("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),rga=new $APP.H(null,"session","session",1008279103),Jga=new $APP.H(null,"lookup","lookup",1225356838),Kga=new $APP.H(null,"load-file","load-file",-424586670),Cga=new $APP.H(null,"_load-file?","_load-file?",-1198848711),O9=new $APP.H(null,"op","op",-1882987955),Lga=new $APP.H(null,"describe","describe",1369790582),Bga=new $APP.H(null, | ||
"code","code",1586293142),Mga=new $APP.H(null,"eldoc","eldoc",-1321421900),Nga=new $APP.H(null,"log_level","log_level",-1756736313),Ega=new $APP.H("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),Oga=new $APP.H(null,"clone","clone",711747572),Pga=new $APP.H(null,"close","close",1835149582),Qga=new $APP.H(null,"info","info",-317069002),Rga=new $APP.H(null,"host","host",-1558485167),Sga=new $APP.H(null,"complete","complete",-500388775);var W9=function W9(a,b){switch($APP.t.h(M9(a,1))){case "i":return a=L9(a,1),b=K9(a,"e"),new $APP.J(null,2,5,$APP.N,[parseInt(M9(a,b)),L9(a,b+1)],null);case "l":var d=a=L9(a,1);for(a=$APP.mc($APP.lg);;){if($APP.A.g($APP.t.h(M9(d,1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(a),L9(d,1)],null);var e=W9.g?W9.g(d,b):W9.call(null,d,b),f=$APP.B.j(e,0,null),k=$APP.B.j(e,1,null);e=k;a=$APP.fg.g(a,f);d=e}case "d":for(a=L9(a,1),f=$APP.jf(b),f=$APP.fe.g(f,$APP.Wu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(M9(d, | ||
1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(e),L9(d,1)],null);a=W9.g?W9.g(d,b):W9.call(null,d,b);d=$APP.B.j(a,0,null);k=$APP.B.j(a,1,null);k=W9.g?W9.g(k,b):W9.call(null,k,b);a=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);d=$APP.r(f)?$APP.ri.h(d):d;a=$APP.Ug.j(e,d,a);d=k;e=a}default:return b=K9(a,":"),f=parseInt(M9(a,b)),a=L9(a,b+1),new $APP.J(null,2,5,$APP.N,[$APP.t.h(M9(a,f)),L9(a,f)],null)}},V9=function V9(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return V9.l(arguments[0], | ||
1<c.length?new $APP.Xc(c.slice(1),0,null):null)};V9.l=function(a,b){try{return W9(a,b)}catch(c){if(c instanceof Error)return new $APP.J(null,2,5,$APP.N,[null,a],null);throw c;}};V9.m=1;V9.o=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)}; | ||
var U9=function U9(a){for(;;){if("string"===typeof a)return[$APP.t.h(Buffer.from(a).length),":",a].join("");if(a instanceof $APP.H||a instanceof $APP.w)a=[function(){var c=$APP.Oe(a);return $APP.r(c)?[c,"/"].join(""):null}(),$APP.Xh(a)].join("");else return"number"===typeof a?["i",$APP.t.h(a),"e"].join(""):$APP.Td(a)||$APP.Xd(a)||null==a?["l",$APP.t.h($APP.Gf.g($APP.t,$APP.qi.g(U9,a))),"e"].join(""):$APP.Vd(a)?["d",$APP.t.h($APP.Gf.g($APP.t,$APP.qi.g(function(){return function(c){var d=$APP.B.j(c, | ||
0,null);c=$APP.B.j(c,1,null);return[$APP.t.h(U9.h?U9.h(d):U9.call(null,d)),$APP.t.h(U9.h?U9.h(c):U9.call(null,c))].join("")}}(a),$APP.HG.g($APP.y,a)))),"e"].join(""):null}};var R9=$APP.Si.h($APP.vq),Q9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.B9],null);$APP.Si.h(!1); | ||
var uga=$APP.Si.h($APP.hf),T9=$APP.vh([Ega,Kga,Fga,Hga,Jga,Gga,Lga,Nga,$APP.PG],[S9,function(a,b){var c=new $APP.n(null,1,["status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.Wk);return null},S9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.gG()),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a,b){var c=new $APP.n(null,4,["versions",new $APP.n(null, | ||
2,["nbb-nrepl",P9("TODO"),"node",P9(process.version)],null),"aux",$APP.hf,"ops",$APP.Yh($APP.qi.g($APP.Xh,$APP.Mh(T9)),$APP.vu.h($APP.hf)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},S9,function(){return null},function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,$APP.S);$APP.IG.l($APP.F([$APP.S,c]));return Bga($APP.zi.j(a,$APP.S,$APP.u(R9)),b)}]),Oga=$APP.Si.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.LG.h(a);return $APP.r(e)?e:0}(),c=function(){var e=Mga.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:Iga.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Pk.g(Dga,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.JG.l($APP.F([["nREPL server started on port ",$APP.t.h(f)," on host ",$APP.t.h(e)," - nrepl://",$APP.t.h(e), | ||
":",$APP.t.h(f)].join("")]));try{return esm_import$fs.writeFileSync(".nrepl-port",$APP.t.h(f))}catch(k){return console.warn($APP.wp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf(Oga,d)})}; | ||
0,null);c=$APP.B.j(c,1,null);return[$APP.t.h(U9.h?U9.h(d):U9.call(null,d)),$APP.t.h(U9.h?U9.h(c):U9.call(null,c))].join("")}}(a),$APP.NG.g($APP.y,a)))),"e"].join(""):null}};var R9=$APP.Si.h($APP.vq),Q9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.B9],null);$APP.Si.h(!1); | ||
var zga=$APP.Si.h($APP.hf),T9=$APP.vh([Jga,Pga,Kga,Mga,Oga,Lga,Qga,Sga,$APP.VG],[S9,function(a,b){var c=new $APP.n(null,1,["status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.Wk);return null},S9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.mG()),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a,b){var c=new $APP.n(null,4,["versions",new $APP.n(null, | ||
2,["nbb-nrepl",P9("TODO"),"node",P9(process.version)],null),"aux",$APP.hf,"ops",$APP.Yh($APP.qi.g($APP.Xh,$APP.Mh(T9)),$APP.vu.h($APP.hf)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},S9,function(){return null},function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,$APP.S);$APP.OG.l($APP.F([$APP.S,c]));return Gga($APP.zi.j(a,$APP.S,$APP.u(R9)),b)}]),Tga=$APP.Si.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.RG.h(a);return $APP.r(e)?e:0}(),c=function(){var e=Rga.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:Nga.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Pk.g(Iga,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.PG.l($APP.F([["nREPL server started on port ",$APP.t.h(f)," on host ",$APP.t.h(e)," - nrepl://",$APP.t.h(e), | ||
":",$APP.t.h(f)].join("")]));try{return esm_import$fs.writeFileSync(".nrepl-port",$APP.t.h(f))}catch(k){return console.warn($APP.wp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf(Tga,d)})}; |
@@ -1,1 +0,1 @@ | ||
var squint;(squint||={}).core=(()=>{var Y=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var ne=Object.prototype.hasOwnProperty;var re=(t,e)=>{for(var n in e)Y(t,n,{get:e[n],enumerable:!0})},oe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ee(e))!ne.call(t,o)&&o!==n&&Y(t,o,{get:()=>e[o],enumerable:!(r=te(e,o))||r.enumerable});return t};var ue=t=>oe(Y({},"__esModule",{value:!0}),t);var kr={};re(kr,{Atom:()=>At,Cons:()=>yt,IIterable:()=>V,IIterable__iterator:()=>_t,LazySeq:()=>Qn,NaN_QMARK_:()=>ur,PROTOCOL_SENTINEL:()=>Oe,_:()=>pe,_GT_:()=>ie,_GT__EQ_:()=>ce,_LT_:()=>fe,_LT__EQ_:()=>se,_PLUS_:()=>ae,_STAR_:()=>le,_iterator:()=>O,aclone:()=>Fn,add_watch:()=>Vn,alength:()=>zn,apply:()=>We,array_QMARK_:()=>Qt,aset:()=>Pn,assoc:()=>M,assoc_BANG_:()=>A,assoc_in:()=>ot,assoc_in_BANG_:()=>he,atom:()=>Be,boolean$:()=>Gn,boolean_QMARK_:()=>yr,bounded_count:()=>mr,butlast:()=>Kn,coll_QMARK_:()=>fr,comp:()=>ye,compare:()=>P,complement:()=>U,concat:()=>Kt,conj:()=>ut,conj_BANG_:()=>N,cons:()=>mt,constantly:()=>De,contains_QMARK_:()=>ct,count:()=>K,counted_QMARK_:()=>Zt,cycle:()=>an,dec:()=>Ae,deref:()=>gt,disj:()=>me,disj_BANG_:()=>it,dissoc:()=>be,dissoc_BANG_:()=>we,distinct:()=>ln,doall:()=>Cn,dorun:()=>Yn,drop:()=>z,drop_last:()=>kn,drop_while:()=>Bt,empty:()=>jt,empty_QMARK_:()=>gn,es6_iterator:()=>G,even_QMARK_:()=>Rt,every_QMARK_:()=>qt,every_pred:()=>Xn,ex_cause:()=>pr,ex_data:()=>ar,ex_info:()=>_r,ex_message:()=>lr,false_QMARK_:()=>Nn,ffirst:()=>ve,filter:()=>L,filterv:()=>Ke,find:()=>wr,first:()=>R,flatten:()=>Kr,fn_QMARK_:()=>or,fnil:()=>H,frequencies:()=>Sn,get:()=>d,get_in:()=>$t,group_by:()=>Rn,identical_QMARK_:()=>cn,identity:()=>kt,inc:()=>ft,int_QMARK_:()=>Ut,integer_QMARK_:()=>xr,interleave:()=>It,interpose:()=>Ze,into:()=>Gt,into_array:()=>Ft,iterable:()=>c,iterate:()=>Hn,js_keys:()=>ir,js_obj:()=>qn,juxt:()=>tr,keep:()=>dn,keep_indexed:()=>Te,key:()=>Nt,keys:()=>Dt,last:()=>Me,lazy:()=>a,list:()=>St,list_QMARK_:()=>Ue,map:()=>E,map_QMARK_:()=>Un,map_indexed:()=>Ie,mapcat:()=>Xe,mapv:()=>Mt,max:()=>Ct,max_key:()=>gr,merge:()=>rn,merge_with:()=>on,meta:()=>dr,min:()=>Dn,min_key:()=>Ar,mod:()=>br,neg_QMARK_:()=>Bn,next:()=>er,nil_QMARK_:()=>Ne,not:()=>wt,not_any_QMARK_:()=>bn,not_empty:()=>Qr,not_every_QMARK_:()=>xn,nth:()=>at,number_QMARK_:()=>Jt,object_QMARK_:()=>xe,odd_QMARK_:()=>Je,parse_long:()=>Mr,partial:()=>sn,partition:()=>en,partition_all:()=>tn,partition_by:()=>nn,pos_QMARK_:()=>$n,pr_str:()=>bt,println:()=>st,prn:()=>Le,quot:()=>Rr,rand_int:()=>Yt,rand_nth:()=>vn,range:()=>qe,re_find:()=>Pe,re_matches:()=>ze,re_pattern:()=>Ye,re_seq:()=>Wt,reduce:()=>Q,reduce_kv:()=>Jn,reduced:()=>Ee,reduced_QMARK_:()=>xt,reductions:()=>Se,regexp_QMARK_:()=>sr,remove:()=>ke,remove_watch:()=>Wn,repeat:()=>Z,repeatedly:()=>En,replace:()=>An,reset_BANG_:()=>vt,rest:()=>W,reverse:()=>hn,satisfies_QMARK_:()=>_e,second:()=>ge,select_keys:()=>He,seq:()=>v,seq_QMARK_:()=>lt,seqable_QMARK_:()=>pt,sequential_QMARK_:()=>C,set:()=>Ve,shuffle:()=>wn,some:()=>Pt,some_QMARK_:()=>On,some_fn:()=>Zn,sort:()=>zt,sort_by:()=>mn,split_at:()=>In,split_with:()=>Tn,str:()=>je,string_QMARK_:()=>et,subs:()=>Vt,subvec:()=>Ce,swap_BANG_:()=>$e,system_time:()=>un,t:()=>rr,take:()=>q,take_nth:()=>fn,take_while:()=>Lt,to_array:()=>nr,transduce:()=>rt,tree_seq:()=>Ht,true_QMARK_:()=>jn,truth_:()=>h,update:()=>pn,update_BANG_:()=>tt,update_in:()=>_n,val:()=>Ot,vals:()=>cr,vec:()=>B,vector:()=>D,vector_QMARK_:()=>Fe,warn_on_lazy_reusage_BANG_:()=>Qe,with_meta:()=>hr,zero_QMARK_:()=>Ln,zipmap:()=>Sr});function s(t){if(t==null||t instanceof Function)return t;const e=typeof t;return e==="string"?(n,r)=>d(n,t,r):e==="object"?(n,r)=>d(t,n,r):t}function k(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function ie(...t){return k(t,(e,n)=>e>n)}function ce(...t){return k(t,(e,n)=>e>=n)}function fe(...t){return k(t,(e,n)=>e<n)}function se(...t){return k(t,(e,n)=>e<=n)}function ae(...t){return t.reduce((e,n)=>e+n,0)}function le(...t){return t.reduce((e,n)=>e*n,1)}function pe(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}function _e(t,e){return e[t]}function A(t,e,n,...r){if(r.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(t)){case _:t.set(e,n);for(let o=0;o<r.length;o+=2)t.set(r[o],r[o+1]);break;case x:case m:t[e]=n;for(let o=0;o<r.length;o+=2)t[r[o]]=r[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof t}.`)}return t}function I(t){switch(p(t)){case _:return new Map(t);case w:return new Set(t);case x:return[...t];case m:return{...t};default:throw new Error(`Don't know how to copy object of type ${typeof t}.`)}}function M(t,e,n,...r){t||(t={});const o=I(t);return A(o,e,n,...r),o}const _=1,x=2,m=3,g=4,w=5,T=6;function j(t){switch(t){case _:return new Map;case x:return[];case m:return{};case g:return new $;case w:return new Set;case T:return a(function*(){})}}function F(t){return t.constructor===Object}function xe(t){return t!=null&&F(t)}function p(t){if(t!=null){if(F(t))return m;if(t instanceof Map)return _;if(t instanceof Set)return w;if(t instanceof $)return g;if(Array.isArray(t))return x;if(t instanceof J)return T;if(t instanceof Object)return m}}function de(t,e,n,r,o){const u=p(n);if(u!==_&&u!==x&&u!==m)throw new Error(`Illegal argument: ${e} expects the first argument to be a Map, Array, or Object.`);const i=[n];let f=n;for(let l=0;l<r.length-1;l+=1){const b=r[l];let y;f instanceof Map?y=f.get(b):y=f[b],y||(y=j(u)),i.push(y),f=y}i.push(o);for(let l=i.length-2;l>=0;l-=1)i[l]=t(i[l],r[l],i[l+1]);return i[0]}function ot(t,e,n){return de(M,"assoc-in",t,e,n)}function he(t,e,n){var r=t;const o=p(t);for(const u of e.splice(0,e.length-1)){let i=d(r,u);i===void 0&&(i=j(o),A(r,u,i)),r=i}return A(r,e[e.length-1],n),t}function ye(...t){if(t=t.map(s),t.length===0)return kt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let o=e(...r);for(const u of n)o=u(o);return o}}function N(...t){if(t.length===0)return D();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case w:for(const o of n)r.add(o);break;case g:r.unshift(...n.reverse());break;case x:r.push(...n);break;case _:for(const o of n)Array.isArray(o)?r.set(o[0],o[1]):c(o).forEach(u=>{r.set(u[0],u[1])});break;case m:for(const o of n)Array.isArray(o)?r[o[0]]=o[1]:Object.assign(r,o);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function ut(...t){if(t.length===0)return D();const[e,...n]=t;let r=e;r==null&&(r=St());let o,u;switch(p(r)){case w:return new Set([...r,...n]);case g:return new $(...n.reverse(),...r);case x:return[...r,...n];case _:o=new Map(r);for(const i of n)Array.isArray(i)?o.set(i[0],i[1]):c(i).forEach(f=>{o.set(f[0],f[1])});return o;case T:return a(function*(){yield*n,yield*r});case m:u={...r};for(const i of n)Array.isArray(i)?u[i[0]]=i[1]:Object.assign(u,i);return u;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function it(t,...e){for(const n of e)t.delete(n);return t}function me(t,...e){const n=new Set([...t]);return it(n,...e)}function ct(t,e){switch(p(t)){case w:case _:return t.has(e);case void 0:return!1;default:return e in t}}function we(t,...e){for(const n of e)delete t[n];return t}function be(t,...e){const n=I(t);switch(p(t)){case _:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function ft(t){return t+1}function Ae(t){return t-1}function st(...t){console.log(...t)}function at(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const o=c(t);let u=0;for(const i of o)if(u++==e){r=i;break}}if(r!==void 0)return r}return n}function d(t,e,n=void 0){if(t==null)return n;let r;if(F(t))return r=t[e],r===void 0?n:r;let o;switch(p(t)){case w:t.has(e)&&(r=e);break;case _:r=t.get(e);break;case x:r=t[e];break;default:if(o=t.get,o instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function lt(t){return t!=null&&!!t[Symbol.iterator]}const C=lt;function pt(t){return t==null||!!t[Symbol.iterator]}function c(t){if(t==null)return[];if(pt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const V=Symbol("Iterable"),_t=Symbol.iterator;function O(t){return t[Symbol.iterator]()}const G=O;function v(t){if(t==null)return t;const e=c(t);return e.length===0||e.size===0||e[Symbol.iterator]().next().done?null:e}function R(t){const[e]=c(t);return e}function ge(t){const[e,n]=c(t);return n}function ve(t){return R(R(t))}function W(t){return a(function*(){let e=!0;for(const n of c(t))e?e=!1:yield n})}class S{value;constructor(e){this.value=e}_deref(){return this.value}}function Me(t){t=c(t);let e;switch(p(t)){case x:return t[t.length-1];default:for(const n of t)e=n;return e}}function Ee(t){return new S(t)}function xt(t){return t instanceof S}function Q(t,e,n){t=s(t);let r,o;if(n===void 0){const u=c(e)[Symbol.iterator](),i=u.next();i.done?o=t():o=i.value,r=u}else o=e,r=c(n);if(o instanceof S)return o.value;for(const u of r)if(o=t(o,u),o instanceof S){o=o.value;break}return o}function*Re(t,e){const n=e.next();n.done?yield t():yield*dt(t,n.value,e)}function*dt(t,e,n){let r=e,o=n;for(;;){if(xt(r)){yield r.value;return}else yield r;const u=o.next();if(u.done)break;r=t(r,u.value)}}function Se(t,e,n){return t=s(t),a(n===void 0?function*(){yield*Re(t,c(e)[Symbol.iterator]())}:function*(){yield*dt(t,e,c(n)[Symbol.iterator]())})}var ht=!1;function Qe(){ht=!0}class J{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&ht)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}J.prototype[V]=!0;function a(t){return new J(t)}class yt{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*c(this.coll)}}function mt(t,e){return new yt(t,e)}function E(t,...e){switch(t=s(t),e.length){case 0:return n=>(...r)=>{switch(r.length){case 0:return n();case 1:return n(r[0]);case 2:return n(r[0],t(r[1]));default:return n(r[0],t(...r.slice(1)))}};case 1:return a(function*(){for(const n of c(e[0]))yield t(n)});default:return a(function*(){const n=e.map(r=>G(c(r)));for(;;){const r=[];for(const o of n){const u=o.next();if(u.done)return;r.push(u.value)}yield t(...r)}})}}function L(t,e){return t=s(t),a(function*(){for(const n of c(e))h(t(n))&&(yield n)})}function Ke(t,e){return[...L(t,e)]}function ke(t,e){return L(U(t),e)}function Ie(t,e){t=s(t);const n=[];let r=0;for(const o of c(e))n.push(t(r,o)),r++;return n}function Te(t,e){t=s(t);const n=[];let r=0;for(const o of c(e)){const u=t(r,o);h(u)&&n.push(u),r++}return n}function je(...t){return t.join("")}function wt(t){return!h(t)}function Ne(t){return t==null}const Oe={};function Ge(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case w:case T:return[...n];case _:return Object.fromEntries(n);default:return n}})}function bt(...t){return t.map(Ge).join(" ")}function Le(...t){st(bt(...t))}function At(t){this.val=t,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=e=>{const n=this.val;if(this.val=e,this._hasWatches)for(const r of Object.entries(this._watches)){const o=r[0],u=r[1];u(o,this,n,e)}return e},this._add_watch=(e,n)=>{this._watches[e]=n,this._hasWatches=!0},this._remove_watch=e=>{delete this._watches[e]}}function Be(t){return new At(t)}function gt(t){return t._deref()}function vt(t,e){t._reset_BANG_(e)}function $e(t,e,...n){e=s(e);const r=e(gt(t),...n);return vt(t,r),r}function qe(t,e,n){return a(function*(){let r=t,o=e,u=n;e===void 0&&(r=0,o=t);let i=r||0;for(u=n||1;o===void 0||i<o;)yield i,i+=u})}function ze(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function Pe(t,e){if(et(e)){const n=t.exec(e);return n!=null?n.length===1?n[0]:[...n]:null}else throw new TypeError("re-find must match against a string.")}function Ye(t){if(t instanceof RegExp)return t;const e=t.match(/^\(\?([dgimsuvy]*)\)/);return e?new RegExp(t.slice(e[0].length),e[1]):new RegExp(t)}function Ce(t,e,n){return t.slice(e,n)}function D(...t){return t}function Fe(t){return p(t)===x}function Mt(...t){return[...E(...t)]}function B(t){return Qt(t)?t:[...c(t)]}function Ve(t){return new Set(c(t))}const Et=Symbol("IApply__apply");function We(t,...e){t=s(t);const n=e.slice(0,e.length-1),r=c(e[e.length-1]),o=t[Et];return o?o(...n,r):t(...n,...r)}function Rt(t){return t%2==0}function Je(t){return!Rt(t)}function U(t){return t=s(t),(...e)=>wt(t(...e))}function De(t){return(...e)=>t}class $ extends Array{constructor(...e){super(),this.push(...e)}}function Ue(t){return p(t)===g}function St(...t){return new $(...t)}function Qt(t){return Array.isArray(t)}function X(t){return a(function*(){for(const e of t)yield*c(e)})}function Kt(...t){return X(t)}Kt[Et]=t=>X(t);function Xe(t,...e){const n=E(t,...e);return X(n)}function kt(t){return t}function It(...t){return a(function*(){const e=t.map(n=>G(c(n)));for(;;){const n=[];for(const r of e){const o=r.next();if(o.done)return;n.push(o.value)}yield*n}})}function Ze(t,e){return z(1,It(Z(t),e))}function He(t,e){const n=p(t),r=j(n)||{};for(const o of e){const u=d(t,o);u!=null&&A(r,o,u)}return r}function tn(t,...e){let n=t,r=e[0];return e.length===2&&([n,r]=e),Tt(t,n,[],r,!0)}function en(t,...e){let n=t,r=[],o=e[0];return e.length===2?[n,o]=e:e.length>2&&([n,r,o]=e),Tt(t,n,r,o,!1)}function Tt(t,e,n,r,o){return a(function*(){let u=[],i=0;for(const f of c(r))i<t&&(u.push(f),u.length===t&&(yield u,u=e<t?u.slice(e):[])),i++,i===e&&(i=0);u.length>0&&(u.length===t||o?yield u:n.length&&(u.push(...n.slice(0,t-u.length)),yield u))})}function nn(t,e){return t=s(t),a(function*(){const n=G(e),r=n.next();r.done&&(yield*null);const o=r.value;let u=t(o),i=[o],f=[];for(;;){const l=n.next();if(l.done){yield i;break}const b=l.value,y=t(b);u==y?i.push(b):(yield i,f.push(b),i=f,u=y,f=[])}})}function jt(t){const e=p(t);if(e!=null)return j(e);throw new Error(`Can't create empty of ${typeof t}`)}function rn(...t){const e=t[0];let n;return e==null?n={}:n=Gt(jt(e),e),N(n,...t.slice(1))}function Nt(t){return t[0]}function Ot(t){return t[1]}function on(t,...e){t=s(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(u,i)=>{const f=Nt(i),l=Ot(i);return ct(u,f)?M(u,f,t(d(u,f),l)):M(u,f,l)};return Q((u,i)=>Q(r,u||{},v(i)),e)}else return null}function un(){return performance.now()}function Gt(...t){let e,n,r,o,u;switch(t.length){case 0:return[];case 1:return t[0];case 2:return ut(t[0]??[],...c(t[1]));case 3:return e=t[0],n=t[1],r=t[2],o=I(e),u=(i,f)=>f===void 0?i:N(i,f),rt(n,u,o,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function cn(t,e){return t===e}function Z(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[V]:!0,[_t]:t.length==1?function*(){const e=t[0];for(;;)yield e}:function*(){const[e,n]=t;for(var r=0;r<e;r++)yield n}}}function q(t,e){return a(function*(){let n=t-1;for(const r of c(e))if(n-->=0&&(yield r),n<0)return})}function Lt(t,e){return t=s(t),a(function*(){for(const n of c(e))if(h(t(n)))yield n;else return})}function fn(t,e){return t<=0?Z(R(e)):a(function*(){let n=0;for(const r of c(e))n%t===0&&(yield r),n++})}function sn(t,...e){return t=s(t),function(...n){return t(...e,...n)}}function an(t){return a(function*(){for(;;)yield*t})}function z(t,e){return a(function*(){const n=O(c(e));for(let r=0;r<t;r++)n.next();yield*n})}function Bt(t,e){return t=s(t),a(function*(){const n=O(c(e));for(;;){const r=n.next();if(r.done)break;const o=r.value;if(!h(t(o))){yield o;break}}yield*n})}function ln(t){return a(function*(){const e=new Set;for(const n of c(t))e.has(n)||(yield n),e.add(n)})}function pn(t,e,n,...r){return n=s(n),M(t,e,n(d(t,e),...r))}function $t(t,e,n){let r=t;for(const o of e)r=d(r,o);return r===void 0?n:r}function _n(t,e,n,...r){return n=s(n),ot(t,e,n($t(t,e),...r))}function H(t,e,...n){return t=s(t),function(r,...o){return r?t(r,...n,...o):t(e,...n,...o)}}function qt(t,e){t=s(t);for(const n of c(e))if(!t(n))return!1;return!0}function xn(t,e){return!qt(t,e)}function dn(t,e){return t=s(t),a(function*(){for(const n of c(e)){const r=t(n);h(r)&&(yield r)}})}function hn(t){return t=c(t),[...t].reverse()}function zt(t,e){return e===void 0&&(e=t,t=void 0),t=s(t),e=c(e),[...e].sort(t||P)}function yn(t){return t===P?t:(e,n)=>{const r=t(e,n);return Jt(r)?r:r?-1:t(n,e)?1:0}}function mn(t,e,n){return n===void 0&&(n=e,e=P),t=s(t),e=s(e),zt((r,o)=>{const u=yn(e),i=t(r),f=t(o);return u(i,f)},n)}function wn(t){return[...t].sort(function(e,n){return Math.random()-.5})}function Pt(t,e){t=s(t);for(const n of c(e)){const r=t(n);if(h(r))return r}}function bn(t,e){return t=s(t),!Pt(t,e)}function An(t,e){return(Array.isArray(e)?Mt:E)(r=>{const o=t[r];return o!==void 0?o:r},e)}function gn(t){return!v(t)}function Yt(t){return Math.floor(Math.random()*t)}function vn(t){const e=Yt(K(t));return at(t,e)}function Mn(t){return a(function*(){for(;;)yield t()})}function En(t,e){e===void 0&&(e=t,t=void 0);const n=Mn(e);return t?q(t,n):n}function tt(t,e,n,...r){const o=d(t,e);return A(t,e,n(o,...r))}function Rn(t,e){t=s(t);const n={};for(const r of c(e)){const o=t(r);tt(n,o,H(N,[]),r)}return n}function Sn(t){const e={},n=H(ft,0);for(const r of c(t))tt(e,r,n);return e}class Qn{constructor(e){this.f=e,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*c(this.res)}}function Kn(t){const e=[...c(t)];return e.pop(),e.length>0?e:null}function kn(...t){const[e,n]=t.length>1?t:[1,t[0]];return E((r,o)=>r,n,z(e,n))}function In(t,e){return[q(t,e),z(t,e)]}function Tn(t,e){return[Lt(t,e),Bt(t,e)]}function K(t){if(!t)return 0;const e=t.length||t.size;if(typeof e=="number")return e;let n=0;for(const r of c(t))n++;return n}function jn(t){return t===!0}function Nn(t){return t===!1}function On(t){return t!=null}function Gn(t){return!!t}function Ln(t){return t===0}function Bn(t){return t<0}function $n(t){return t>0}function qn(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function zn(t){return t.length}function Pn(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const o=[e,n,...r],u=o[o.length-1];let i=t,f=0;const l=o.length-2;for(;f<l;f++)i=i[o[f]];return i[o[f]]=u,n}}function Yn(t){for(const e of c(t));return null}function Cn(t){return B(t)}function Fn(t){return[...t]}function Vn(t,e,n){return t._add_watch(e,n)}function Wn(t,e){return t._remove_watch(e)}function Jn(t,e,n){if(!n)return e;var r=e;for(const o of c(n))r=t(r,o[0],o[1]);return r}function Ct(t,e,...n){return e==null?t:Math.max(t,e,...n)}function Dn(t,e,...n){return e==null?t:Math.min(t,e,...n)}function Un(t){return t instanceof Object}function Xn(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function Zn(...t){return(...e)=>{for(const n of t)for(const r of e){const o=n(r);if(o)return o}}}function Ft(t,e){return B(e||t)}function Hn(t,e){var n=e;return a(function*(){for(;;)yield n,n=t(n)})}function tr(...t){return t=t.map(s),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function er(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return v(W(t))}function P(t,e){if(t===e)return 0;{if(t==null)return-1;if(e==null)return 1;const n=typeof t,r=typeof e;if(n==="number"&&r==="number"||n==="string"&&r==="string")return t===e?0:t<e?-1:1;throw new Error(`comparing ${n} to ${r}`)}}function nr(t){return Ft(t)}function h(t){return t!=null&&t!==!1}const rr=h;function Vt(t,e,n){return t.substring(e,n)}function or(t){return typeof t=="function"}function*Wt(t,e){const n=t.exec(e);if(n){const r=n[0],o=n.length===1?r:B(n);yield*mt(o,a(function*(){const u=n.index+Ct(1,r.length);u<=e.length&&(yield*Wt(t,Vt(e,u)))}))}}function ur(t){return Number.isNaN(t)}function Jt(t){return typeof t=="number"}function Dt(t){return t?Object.keys(t):null}function ir(t){return Dt(t)}function cr(t){return t?Object.values(t):null}function et(t){return typeof t=="string"}function fr(t){return p(t)!=null}function sr(t){return t instanceof RegExp}class nt extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function ar(t){return t instanceof nt?t._data:null}function lr(t){return t instanceof Error?t.message:null}function pr(t){return t instanceof nt?t._cause:null}function _r(t,e,n){return new nt(t,e,n)}function Ut(t){return Number.isInteger(t)}const xr=Ut,Xt=Symbol("meta");function dr(t){return t instanceof Object?t[Xt]:null}function hr(t,e){const n=I(t);return n[Xt]=e,n}function yr(t){return t===!0||t===!1}function Zt(t){switch(p(t)){case x:case _:case m:case g:case w:return!0}return!1}function mr(t,e){return Zt(e)?K(e):K(q(t,e))}function wr(t,e){const n=d(t,e);if(n!==void 0)return[e,n]}function br(t,e){return(t%e+e)%e}function Ar(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i<=r&&(r=i,o=u)}),o}function gr(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i>=r&&(r=i,o=u)}),o}function vr(t){throw new Error(`Expected string, got: ${typeof t}`)}function Mr(t){if(et(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return vr(t)}function Er(t){return t>=0?Math.floor(t):Math.ceil(t)}function Rr(t,e){const n=t%e;return Er((t-n)/e)}function rt(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return rt(t,n,n(),r)}default:{let n=e[0];const r=e[1],o=e[2];n=t(n);const u=Q(n,r,o);return n(u)}}}function Sr(t,e){const n={},r=c(t)[Symbol.iterator](),o=c(e)[Symbol.iterator]();let u,i;for(;u=r.next(),!(u.done||(i=o.next(),i.done));)n[u.value]=i.value;return n}function Qr(t){return v(t)?t:null}function Ht(t,e,n){const r=function*(o){if(yield o,h(t(o)))for(const u of c(e(o)))yield*r(u)};return a(function*(){yield*r(n)})}function Kr(t){return L(U(C),W(Ht(C,v,t)))}return ue(kr);})(); | ||
var squint;(squint||={}).core=(()=>{var Y=Object.defineProperty;var ie=Object.getOwnPropertyDescriptor;var ce=Object.getOwnPropertyNames;var fe=Object.prototype.hasOwnProperty;var se=(t,e)=>{for(var n in e)Y(t,n,{get:e[n],enumerable:!0})},ae=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ce(e))!fe.call(t,o)&&o!==n&&Y(t,o,{get:()=>e[o],enumerable:!(r=ie(e,o))||r.enumerable});return t};var le=t=>ae(Y({},"__esModule",{value:!0}),t);var Pr={};se(Pr,{Atom:()=>Rt,Cons:()=>At,IIterable:()=>J,IIterable__iterator:()=>wt,LazySeq:()=>Tn,NaN_QMARK_:()=>lr,PROTOCOL_SENTINEL:()=>ze,_:()=>xe,_GT_:()=>ct,_GT__EQ_:()=>ft,_LT_:()=>pe,_LT__EQ_:()=>_e,_PLUS_:()=>he,_STAR_:()=>de,_iterator:()=>q,abs:()=>zr,aclone:()=>Xn,add_watch:()=>Zn,alength:()=>Wn,apply:()=>He,array_QMARK_:()=>Ot,aset:()=>Jn,assoc:()=>E,assoc_BANG_:()=>A,assoc_in:()=>st,assoc_in_BANG_:()=>be,atom:()=>Ye,boolean$:()=>Fn,boolean_QMARK_:()=>vr,bounded_count:()=>Mr,butlast:()=>jn,coll_QMARK_:()=>hr,comp:()=>ge,compare:()=>b,complement:()=>Z,concat:()=>Tt,conj:()=>at,conj_BANG_:()=>j,cons:()=>vt,constantly:()=>en,contains_QMARK_:()=>pt,count:()=>I,counted_QMARK_:()=>ee,cycle:()=>xn,dec:()=>Ee,deref:()=>St,disj:()=>Ae,disj_BANG_:()=>lt,dissoc:()=>Me,dissoc_BANG_:()=>ve,distinct:()=>yn,doall:()=>Un,dorun:()=>Dn,drop:()=>P,drop_last:()=>qn,drop_while:()=>Ft,empty:()=>Bt,empty_QMARK_:()=>Qn,es6_iterator:()=>G,even_QMARK_:()=>It,every_QMARK_:()=>Yt,every_pred:()=>rr,ex_cause:()=>wr,ex_data:()=>xr,ex_info:()=>mr,ex_message:()=>yr,false_QMARK_:()=>$n,ffirst:()=>Se,filter:()=>B,filterv:()=>Oe,find:()=>Er,first:()=>Q,flatten:()=>Tr,fn_QMARK_:()=>ar,fnil:()=>et,frequencies:()=>On,get:()=>x,get_in:()=>Pt,group_by:()=>Nn,identical_QMARK_:()=>_n,identity:()=>jt,inc:()=>_t,int_QMARK_:()=>Ht,integer_QMARK_:()=>br,interleave:()=>qt,interpose:()=>on,into:()=>zt,into_array:()=>Jt,iterable:()=>c,iterate:()=>ur,js_keys:()=>pr,js_obj:()=>Vn,juxt:()=>ir,keep:()=>gn,keep_indexed:()=>Be,key:()=>Lt,keys:()=>Zt,last:()=>Qe,lazy:()=>a,list:()=>Nt,list_QMARK_:()=>nn,long$:()=>Fr,map:()=>S,map_QMARK_:()=>nr,map_indexed:()=>je,mapcat:()=>rn,mapv:()=>Kt,max:()=>Wt,max_key:()=>Qr,merge:()=>an,merge_with:()=>ln,meta:()=>gr,min:()=>er,min_key:()=>Sr,mod:()=>Rr,neg_QMARK_:()=>Yn,next:()=>cr,nil_QMARK_:()=>$e,not:()=>Mt,not_any_QMARK_:()=>Rn,not_empty:()=>Or,not_every_QMARK_:()=>bn,nth:()=>dt,number_QMARK_:()=>Xt,object_QMARK_:()=>we,odd_QMARK_:()=>tn,parse_long:()=>kr,partial:()=>dn,partition:()=>fn,partition_all:()=>cn,partition_by:()=>sn,persistent_BANG_:()=>qr,pos_QMARK_:()=>Cn,pr_str:()=>Et,println:()=>ht,prn:()=>Pe,quot:()=>Ir,rand_int:()=>Vt,rand_nth:()=>Kn,range:()=>Ve,re_find:()=>Je,re_matches:()=>We,re_pattern:()=>De,re_seq:()=>Ut,reduce:()=>k,reduce_kv:()=>tr,reduced:()=>Ke,reduced_QMARK_:()=>mt,reductions:()=>Ie,regexp_QMARK_:()=>dr,remove:()=>Te,remove_watch:()=>Hn,repeat:()=>tt,repeatedly:()=>In,replace:()=>Sn,reset_BANG_:()=>Qt,rest:()=>D,reverse:()=>An,satisfies_QMARK_:()=>ye,second:()=>Re,select_keys:()=>un,seq:()=>M,seq_QMARK_:()=>xt,seqable_QMARK_:()=>yt,sequential_QMARK_:()=>C,set:()=>Ze,shuffle:()=>En,some:()=>Ct,some_QMARK_:()=>zn,some_fn:()=>or,sort:()=>nt,sort_by:()=>Mn,sorted_set:()=>Gr,split_at:()=>Gn,split_with:()=>Bn,str:()=>Le,string_QMARK_:()=>ot,subs:()=>Dt,subseq:()=>$r,subvec:()=>Ue,swap_BANG_:()=>Ce,system_time:()=>pn,t:()=>sr,take:()=>z,take_nth:()=>hn,take_while:()=>F,to_array:()=>fr,transduce:()=>it,transient$:()=>jr,tree_seq:()=>re,true_QMARK_:()=>Ln,truth_:()=>y,update:()=>wn,update_BANG_:()=>rt,update_in:()=>mn,val:()=>$t,vals:()=>_r,vec:()=>L,vector:()=>X,vector_QMARK_:()=>Xe,warn_on_lazy_reusage_BANG_:()=>Ne,with_meta:()=>Ar,zero_QMARK_:()=>Pn,zipmap:()=>Nr});function s(t){if(t==null||t instanceof Function)return t;const e=typeof t;return e==="string"?(n,r)=>x(n,t,r):e==="object"?(n,r)=>x(t,n,r):t}function N(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function ct(...t){return N(t,(e,n)=>e>n)}function ft(...t){return N(t,(e,n)=>e>=n)}function pe(...t){return N(t,(e,n)=>e<n)}function _e(...t){return N(t,(e,n)=>e<=n)}function he(...t){return t.reduce((e,n)=>e+n,0)}function de(...t){return t.reduce((e,n)=>e*n,1)}function xe(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}function ye(t,e){return e[t]}function A(t,e,n,...r){if(r.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(t)){case _:t.set(e,n);for(let o=0;o<r.length;o+=2)t.set(r[o],r[o+1]);break;case h:case m:t[e]=n;for(let o=0;o<r.length;o+=2)t[r[o]]=r[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof t}.`)}return t}function R(t){switch(p(t)){case _:return new Map(t);case d:return new t.constructor(t);case h:return[...t];case m:return{...t};default:throw new Error(`Don't know how to copy object of type ${typeof t}.`)}}function E(t,e,n,...r){t||(t={});const o=R(t);return A(o,e,n,...r),o}const _=1,h=2,m=3,v=4,d=5,O=6;function T(t){switch(t){case _:return new Map;case h:return[];case m:return{};case v:return new $;case d:return new Set;case O:return a(function*(){})}}function W(t){return t.constructor===Object}function we(t){return t!=null&&W(t)}function p(t){if(t!=null){if(W(t))return m;if(t instanceof Map)return _;if(t instanceof Set)return d;if(t instanceof $)return v;if(Array.isArray(t))return h;if(t instanceof U)return O;if(t instanceof oe)return d;if(t instanceof Object)return m}}function me(t,e,n,r,o){const u=p(n);if(u!==_&&u!==h&&u!==m)throw new Error(`Illegal argument: ${e} expects the first argument to be a Map, Array, or Object.`);const i=[n];let f=n;for(let l=0;l<r.length-1;l+=1){const g=r[l];let w;f instanceof Map?w=f.get(g):w=f[g],w||(w=T(u)),i.push(w),f=w}i.push(o);for(let l=i.length-2;l>=0;l-=1)i[l]=t(i[l],r[l],i[l+1]);return i[0]}function st(t,e,n){return me(E,"assoc-in",t,e,n)}function be(t,e,n){var r=t;const o=p(t);for(const u of e.splice(0,e.length-1)){let i=x(r,u);i===void 0&&(i=T(o),A(r,u,i)),r=i}return A(r,e[e.length-1],n),t}function ge(...t){if(t=t.map(s),t.length===0)return jt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let o=e(...r);for(const u of n)o=u(o);return o}}function j(...t){if(t.length===0)return X();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case d:for(const o of n)r.add(o);break;case v:r.unshift(...n.reverse());break;case h:r.push(...n);break;case _:for(const o of n)Array.isArray(o)?r.set(o[0],o[1]):c(o).forEach(u=>{r.set(u[0],u[1])});break;case m:for(const o of n)Array.isArray(o)?r[o[0]]=o[1]:Object.assign(r,o);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function at(...t){if(t.length===0)return X();const[e,...n]=t;let r=e;r==null&&(r=Nt());let o,u;switch(p(r)){case d:return new r.constructor([...r,...n]);case v:return new $(...n.reverse(),...r);case h:return[...r,...n];case _:o=new Map(r);for(const i of n)Array.isArray(i)?o.set(i[0],i[1]):c(i).forEach(f=>{o.set(f[0],f[1])});return o;case O:return a(function*(){yield*n,yield*r});case m:u={...r};for(const i of n)Array.isArray(i)?u[i[0]]=i[1]:Object.assign(u,i);return u;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function lt(t,...e){for(const n of e)t.delete(n);return t}function Ae(t,...e){const n=new t.constructor([...t]);return lt(n,...e)}function pt(t,e){switch(p(t)){case d:case _:return t.has(e);case void 0:return!1;default:return e in t}}function ve(t,...e){for(const n of e)delete t[n];return t}function Me(t,...e){if(e.length===0)return t;const n=R(t);switch(p(t)){case _:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function _t(t){return t+1}function Ee(t){return t-1}function ht(...t){console.log(...t)}function dt(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const o=c(t);let u=0;for(const i of o)if(u++==e){r=i;break}}if(r!==void 0)return r}return n}function x(t,e,n=void 0){if(t==null)return n;let r;if(W(t))return r=t[e],r===void 0?n:r;let o;switch(p(t)){case d:t.has(e)&&(r=e);break;case _:r=t.get(e);break;case h:r=t[e];break;default:if(o=t.get,o instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function xt(t){return t!=null&&!!t[Symbol.iterator]}const C=xt;function yt(t){return t==null||!!t[Symbol.iterator]}function c(t){if(t==null)return[];if(yt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const J=Symbol("Iterable"),wt=Symbol.iterator;function q(t){return t[Symbol.iterator]()}const G=q;function M(t){if(t==null)return t;const e=c(t);return e.length===0||e.size===0||e[Symbol.iterator]().next().done?null:e}function Q(t){const[e]=c(t);return e}function Re(t){const[e,n]=c(t);return n}function Se(t){return Q(Q(t))}function D(t){return a(function*(){let e=!0;for(const n of c(t))e?e=!1:yield n})}class K{value;constructor(e){this.value=e}_deref(){return this.value}}function Qe(t){t=c(t);let e;switch(p(t)){case h:return t[t.length-1];default:for(const n of t)e=n;return e}}function Ke(t){return new K(t)}function mt(t){return t instanceof K}function k(t,e,n){t=s(t);let r,o;if(n===void 0){const u=c(e)[Symbol.iterator](),i=u.next();i.done?o=t():o=i.value,r=u}else o=e,r=c(n);if(o instanceof K)return o.value;for(const u of r)if(o=t(o,u),o instanceof K){o=o.value;break}return o}function*ke(t,e){const n=e.next();n.done?yield t():yield*bt(t,n.value,e)}function*bt(t,e,n){let r=e,o=n;for(;;){if(mt(r)){yield r.value;return}else yield r;const u=o.next();if(u.done)break;r=t(r,u.value)}}function Ie(t,e,n){return t=s(t),a(n===void 0?function*(){yield*ke(t,c(e)[Symbol.iterator]())}:function*(){yield*bt(t,e,c(n)[Symbol.iterator]())})}var gt=!1;function Ne(){gt=!0}class U{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&>)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}U.prototype[J]=!0;function a(t){return new U(t)}class At{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*c(this.coll)}}function vt(t,e){return new At(t,e)}function S(t,...e){switch(t=s(t),e.length){case 0:return n=>(...r)=>{switch(r.length){case 0:return n();case 1:return n(r[0]);case 2:return n(r[0],t(r[1]));default:return n(r[0],t(...r.slice(1)))}};case 1:return a(function*(){for(const n of c(e[0]))yield t(n)});default:return a(function*(){const n=e.map(r=>G(c(r)));for(;;){const r=[];for(const o of n){const u=o.next();if(u.done)return;r.push(u.value)}yield t(...r)}})}}function B(t,e){return t=s(t),a(function*(){for(const n of c(e))y(t(n))&&(yield n)})}function Oe(t,e){return[...B(t,e)]}function Te(t,e){return B(Z(t),e)}function je(t,e){t=s(t);const n=[];let r=0;for(const o of c(e))n.push(t(r,o)),r++;return n}function qe(t,e){t=s(t);const n=[];let r=0;for(const o of c(e)){const u=t(r,o);y(u)&&n.push(u),r++}return n}function Ge(t){return e=>{let n=-1;return(r,o)=>{if(r===void 0)return e();if(o===void 0)return e(r);n++;const u=t(n,o);return u==null?r:e(r,u)}}}function Be(t,e){return e===void 0?Ge(t):qe(t,e)}function Le(...t){return t.join("")}function Mt(t){return!y(t)}function $e(t){return t==null}const ze={};function Fe(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case d:case O:return[...n];case _:return Object.fromEntries(n);default:return n}})}function Et(...t){return t.map(Fe).join(" ")}function Pe(...t){ht(Et(...t))}function Rt(t){this.val=t,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=e=>{const n=this.val;if(this.val=e,this._hasWatches)for(const r of Object.entries(this._watches)){const o=r[0],u=r[1];u(o,this,n,e)}return e},this._add_watch=(e,n)=>{this._watches[e]=n,this._hasWatches=!0},this._remove_watch=e=>{delete this._watches[e]}}function Ye(t){return new Rt(t)}function St(t){return t._deref()}function Qt(t,e){t._reset_BANG_(e)}function Ce(t,e,...n){e=s(e);const r=e(St(t),...n);return Qt(t,r),r}function Ve(t,e,n){return a(function*(){let r=t,o=e,u=n;e===void 0&&(r=0,o=t);let i=r||0;for(u=n||1;o===void 0||i<o;)yield i,i+=u})}function We(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function Je(t,e){if(ot(e)){const n=t.exec(e);return n!=null?n.length===1?n[0]:[...n]:null}else throw new TypeError("re-find must match against a string.")}function De(t){if(t instanceof RegExp)return t;const e=t.match(/^\(\?([dgimsuvy]*)\)/);return e?new RegExp(t.slice(e[0].length),e[1]):new RegExp(t)}function Ue(t,e,n){return t.slice(e,n)}function X(...t){return t}function Xe(t){return p(t)===h}function Kt(...t){return[...S(...t)]}function L(t){return Ot(t)?t:[...c(t)]}function Ze(t){return new Set(c(t))}const kt=Symbol("IApply__apply");function He(t,...e){t=s(t);const n=e.slice(0,e.length-1),r=c(e[e.length-1]),o=t[kt];return o?o(...n,r):t(...n,...r)}function It(t){return t%2==0}function tn(t){return!It(t)}function Z(t){return t=s(t),(...e)=>Mt(t(...e))}function en(t){return(...e)=>t}class $ extends Array{constructor(...e){super(),this.push(...e)}}function nn(t){return p(t)===v}function Nt(...t){return new $(...t)}function Ot(t){return Array.isArray(t)}function H(t){return a(function*(){for(const e of t)yield*c(e)})}function Tt(...t){return H(t)}Tt[kt]=t=>H(t);function rn(t,...e){const n=S(t,...e);return H(n)}function jt(t){return t}function qt(...t){return a(function*(){const e=t.map(n=>G(c(n)));for(;;){const n=[];for(const r of e){const o=r.next();if(o.done)return;n.push(o.value)}yield*n}})}function on(t,e){return P(1,qt(tt(t),e))}function un(t,e){const n=p(t),r=T(n)||{};for(const o of e){const u=x(t,o);u!=null&&A(r,o,u)}return r}function cn(t,...e){let n=t,r=e[0];return e.length===2&&([n,r]=e),Gt(t,n,[],r,!0)}function fn(t,...e){let n=t,r=[],o=e[0];return e.length===2?[n,o]=e:e.length>2&&([n,r,o]=e),Gt(t,n,r,o,!1)}function Gt(t,e,n,r,o){return a(function*(){let u=[],i=0;for(const f of c(r))i<t&&(u.push(f),u.length===t&&(yield u,u=e<t?u.slice(e):[])),i++,i===e&&(i=0);u.length>0&&(u.length===t||o?yield u:n.length&&(u.push(...n.slice(0,t-u.length)),yield u))})}function sn(t,e){return t=s(t),a(function*(){const n=G(e),r=n.next();r.done&&(yield*null);const o=r.value;let u=t(o),i=[o],f=[];for(;;){const l=n.next();if(l.done){yield i;break}const g=l.value,w=t(g);u==w?i.push(g):(yield i,f.push(g),i=f,u=w,f=[])}})}function Bt(t){const e=p(t);if(e!=null)return T(e);throw new Error(`Can't create empty of ${typeof t}`)}function an(...t){const e=t[0];let n;return e==null?n={}:n=zt(Bt(e),e),j(n,...t.slice(1))}function Lt(t){return t[0]}function $t(t){return t[1]}function ln(t,...e){t=s(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(u,i)=>{const f=Lt(i),l=$t(i);return pt(u,f)?E(u,f,t(x(u,f),l)):E(u,f,l)};return k((u,i)=>k(r,u||{},M(i)),e)}else return null}function pn(){return performance.now()}function zt(...t){let e,n,r,o,u;switch(t.length){case 0:return[];case 1:return t[0];case 2:return at(t[0]??[],...c(t[1]));case 3:return e=t[0],n=t[1],r=t[2],o=R(e),u=(i,f)=>f===void 0?i:j(i,f),it(n,u,o,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function _n(t,e){return t===e}function tt(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[J]:!0,[wt]:t.length==1?function*(){const e=t[0];for(;;)yield e}:function*(){const[e,n]=t;for(var r=0;r<e;r++)yield n}}}function z(t,e){return a(function*(){let n=t-1;for(const r of c(e))if(n-->=0&&(yield r),n<0)return})}function F(t,e){return t=s(t),a(function*(){for(const n of c(e))if(y(t(n)))yield n;else return})}function hn(t,e){return t<=0?tt(Q(e)):a(function*(){let n=0;for(const r of c(e))n%t===0&&(yield r),n++})}function dn(t,...e){return t=s(t),function(...n){return t(...e,...n)}}function xn(t){return a(function*(){for(;;)yield*t})}function P(t,e){return a(function*(){const n=q(c(e));for(let r=0;r<t;r++)n.next();yield*n})}function Ft(t,e){return t=s(t),a(function*(){const n=q(c(e));for(;;){const r=n.next();if(r.done)break;const o=r.value;if(!y(t(o))){yield o;break}}yield*n})}function yn(t){return a(function*(){const e=new Set;for(const n of c(t))e.has(n)||(yield n),e.add(n)})}function wn(t,e,n,...r){return n=s(n),E(t,e,n(x(t,e),...r))}function Pt(t,e,n){let r=t;for(const o of e)r=x(r,o);return r===void 0?n:r}function mn(t,e,n,...r){return n=s(n),st(t,e,n(Pt(t,e),...r))}function et(t,e,...n){return t=s(t),function(r,...o){return r?t(r,...n,...o):t(e,...n,...o)}}function Yt(t,e){t=s(t);for(const n of c(e))if(!t(n))return!1;return!0}function bn(t,e){return!Yt(t,e)}function gn(t,e){return t=s(t),a(function*(){for(const n of c(e)){const r=t(n);y(r)&&(yield r)}})}function An(t){return t=c(t),[...t].reverse()}function nt(t,e){return e===void 0&&(e=t,t=void 0),t=s(t),e=c(e),[...e].sort(t||b)}function vn(t){return t===b?t:(e,n)=>{const r=t(e,n);return Xt(r)?r:r?-1:t(n,e)?1:0}}function Mn(t,e,n){return n===void 0&&(n=e,e=b),t=s(t),e=s(e),nt((r,o)=>{const u=vn(e),i=t(r),f=t(o);return u(i,f)},n)}function En(t){return[...t].sort(function(e,n){return Math.random()-.5})}function Ct(t,e){t=s(t);for(const n of c(e)){const r=t(n);if(y(r))return r}}function Rn(t,e){return t=s(t),!Ct(t,e)}function Sn(t,e){return(Array.isArray(e)?Kt:S)(r=>{const o=t[r];return o!==void 0?o:r},e)}function Qn(t){return!M(t)}function Vt(t){return Math.floor(Math.random()*t)}function Kn(t){const e=Vt(I(t));return dt(t,e)}function kn(t){return a(function*(){for(;;)yield t()})}function In(t,e){e===void 0&&(e=t,t=void 0);const n=kn(e);return t?z(t,n):n}function rt(t,e,n,...r){const o=x(t,e);return A(t,e,n(o,...r))}function Nn(t,e){t=s(t);const n={};for(const r of c(e)){const o=t(r);rt(n,o,et(j,[]),r)}return n}function On(t){const e={},n=et(_t,0);for(const r of c(t))rt(e,r,n);return e}class Tn{constructor(e){this.f=e,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*c(this.res)}}function jn(t){const e=[...c(t)];return e.pop(),e.length>0?e:null}function qn(...t){const[e,n]=t.length>1?t:[1,t[0]];return S((r,o)=>r,n,P(e,n))}function Gn(t,e){return[z(t,e),P(t,e)]}function Bn(t,e){return[F(t,e),Ft(t,e)]}function I(t){if(!t)return 0;const e=t.length||t.size;if(typeof e=="number")return e;let n=0;for(const r of c(t))n++;return n}function Ln(t){return t===!0}function $n(t){return t===!1}function zn(t){return t!=null}function Fn(t){return!!t}function Pn(t){return t===0}function Yn(t){return t<0}function Cn(t){return t>0}function Vn(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function Wn(t){return t.length}function Jn(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const o=[e,n,...r],u=o[o.length-1];let i=t,f=0;const l=o.length-2;for(;f<l;f++)i=i[o[f]];return i[o[f]]=u,n}}function Dn(t){for(const e of c(t));return null}function Un(t){return L(t)}function Xn(t){return[...t]}function Zn(t,e,n){return t._add_watch(e,n)}function Hn(t,e){return t._remove_watch(e)}function tr(t,e,n){if(!n)return e;var r=e;for(const o of c(n))r=t(r,o[0],o[1]);return r}function Wt(t,e,...n){return e==null?t:Math.max(t,e,...n)}function er(t,e,...n){return e==null?t:Math.min(t,e,...n)}function nr(t){return t instanceof Object}function rr(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function or(...t){return(...e)=>{for(const n of t)for(const r of e){const o=n(r);if(o)return o}}}function Jt(t,e){return L(e||t)}function ur(t,e){var n=e;return a(function*(){for(;;)yield n,n=t(n)})}function ir(...t){return t=t.map(s),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function cr(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return M(D(t))}function b(t,e){if(t===e)return 0;{if(t==null)return-1;if(e==null)return 1;const n=typeof t,r=typeof e;if(n==="number"&&r==="number"||n==="string"&&r==="string")return t===e?0:t<e?-1:1;throw new Error(`comparing ${n} to ${r}`)}}function fr(t){return Jt(t)}function y(t){return t!=null&&t!==!1}const sr=y;function Dt(t,e,n){return t.substring(e,n)}function ar(t){return typeof t=="function"}function*Ut(t,e){const n=t.exec(e);if(n){const r=n[0],o=n.length===1?r:L(n);yield*vt(o,a(function*(){const u=n.index+Wt(1,r.length);u<=e.length&&(yield*Ut(t,Dt(e,u)))}))}}function lr(t){return Number.isNaN(t)}function Xt(t){return typeof t=="number"}function Zt(t){return t?Object.keys(t):null}function pr(t){return Zt(t)}function _r(t){return t?Object.values(t):null}function ot(t){return typeof t=="string"}function hr(t){return p(t)!=null}function dr(t){return t instanceof RegExp}class ut extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function xr(t){return t instanceof ut?t._data:null}function yr(t){return t instanceof Error?t.message:null}function wr(t){return t instanceof ut?t._cause:null}function mr(t,e,n){return new ut(t,e,n)}function Ht(t){return Number.isInteger(t)}const br=Ht,te=Symbol("meta");function gr(t){return t instanceof Object?t[te]:null}function Ar(t,e){const n=R(t);return n[te]=e,n}function vr(t){return t===!0||t===!1}function ee(t){switch(p(t)){case h:case _:case m:case v:case d:return!0}return!1}function Mr(t,e){return ee(e)?I(e):I(z(t,e))}function Er(t,e){const n=x(t,e);if(n!==void 0)return[e,n]}function Rr(t,e){return(t%e+e)%e}function Sr(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i<=r&&(r=i,o=u)}),o}function Qr(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i>=r&&(r=i,o=u)}),o}function Kr(t){throw new Error(`Expected string, got: ${typeof t}`)}function kr(t){if(ot(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return Kr(t)}function ne(t){return t>=0?Math.floor(t):Math.ceil(t)}function Ir(t,e){const n=t%e;return ne((t-n)/e)}function it(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return it(t,n,n(),r)}default:{let n=e[0];const r=e[1],o=e[2];n=t(n);const u=k(n,r,o);return n(u)}}}function Nr(t,e){const n={},r=c(t)[Symbol.iterator](),o=c(e)[Symbol.iterator]();let u,i;for(;u=r.next(),!(u.done||(i=o.next(),i.done));)n[u.value]=i.value;return n}function Or(t){return M(t)?t:null}function re(t,e,n){const r=function*(o){if(yield o,y(t(o)))for(const u of c(e(o)))yield*r(u)};return a(function*(){yield*r(n)})}function Tr(t){return B(Z(C),D(re(C,M,t)))}function jr(t){return R(t)}function qr(t){return Object.freeze(t)}class oe{constructor(e){e=nt(e),this._elts=e,this._set=new Set(e)}add(e){if(this._set.has(e))return this;const n=this._elts;let r=!1;for(let o=0;o<n.length;o++)if(b(e,n[o])<=0){n.splice(o,0,e),r=!0;break}return r||n.push(e),this._set=new Set(n),this.size=n.length,this}delete(e){if(!this._set.has(e))return this;const n=this._elts,r=n.indexOf(e);return n.splice(r,1),this._set=new Set(n),this.size=n.length,this}has(e){return this._set.has(e)}keys(){return this.values()}values(){return this._elts[Symbol.iterator]()}entries(){return this._set.entries()}forEach(...e){return this.set.forEach(...e)}clear(){this._elts=[],this._set=new Set(this._elts)}[Symbol.iterator](){return this.keys()}}function Gr(...t){return new oe(t)}function V(t,e,n){return r=>e(b(r,n),0)}function ue(t,e,n=!0){let r=0;for(;r<t.length&&b(e,t[r])>0;r++);return r}function Br([t,e,n]){const r=V(t,e,n);if(e===ct||e===ft){const o=[...t],u=ue(o,n,!0);return o.splice(0,u),r(o[0])||o.splice(0,1),o}else return[...F(r,t)]}function Lr([t,e,n,r,o]){const u=[...t],i=ue(u,n,!0);u.splice(0,i);const f=V(t,r,o);return V(t,e,n)(u[0])||u.splice(0,1),[...F(f,u)]}function $r(...t){if(t.length===3)return Br(t);if(t.length===5)return Lr(t)}function zr(t){return Math.abs(t)}function Fr(t){return ne(t)}return le(Pr);})(); |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "0.4.79", | ||
"version": "0.4.80", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "core.js", |
@@ -97,3 +97,3 @@ /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_"}]*/ | ||
case SET_TYPE: | ||
return new Set(o); | ||
return new o.constructor(o); | ||
case ARRAY_TYPE: | ||
@@ -165,3 +165,7 @@ return [...o]; | ||
if (obj instanceof LazyIterable) return LAZY_ITERABLE_TYPE; | ||
if (obj instanceof SortedSet) return SET_TYPE; | ||
// everything more specific than Object should go before this | ||
if (obj instanceof Object) return OBJECT_TYPE; | ||
return undefined; | ||
@@ -300,3 +304,3 @@ } | ||
case SET_TYPE: | ||
return new Set([...o, ...rest]); | ||
return new o.constructor([...o, ...rest]); | ||
case LIST_TYPE: | ||
@@ -346,3 +350,3 @@ return new List(...rest.reverse(), ...o); | ||
export function disj(s, ...xs) { | ||
const s1 = new Set([...s]); | ||
const s1 = new s.constructor([...s]); | ||
return disj_BANG_(s1, ...xs); | ||
@@ -372,2 +376,3 @@ } | ||
export function dissoc(m, ...ks) { | ||
if (ks.length === 0) return m; | ||
const m2 = copy(m); | ||
@@ -765,3 +770,3 @@ switch (typeConst(m)) { | ||
export function keep_indexed(f, coll) { | ||
function keep_indexed2(f, coll) { | ||
f = toFn(f); | ||
@@ -780,2 +785,30 @@ const ret = []; | ||
function keep_indexed1(f) { | ||
return (rf) => { | ||
let ia = -1; | ||
return (result, input) => { | ||
if (result === undefined) { | ||
return rf(); | ||
} | ||
if (input === undefined) { | ||
return rf(result); | ||
} | ||
ia++; | ||
const v = f(ia, input); | ||
if (v == null) { | ||
return result; | ||
} | ||
return rf(result, v); | ||
}; | ||
}; | ||
} | ||
export function keep_indexed(f, coll) { | ||
if (coll === undefined) { | ||
return keep_indexed1(f); | ||
} else { | ||
return keep_indexed2(f, coll); | ||
} | ||
} | ||
export function str(...xs) { | ||
@@ -2074,2 +2107,136 @@ return xs.join(''); | ||
rest(tree_seq(sequential_QMARK_, seq, x))); | ||
} | ||
export function transient$(x) { | ||
return copy(x); | ||
} | ||
export function persistent_BANG_(x) { | ||
return Object.freeze(x); | ||
} | ||
class SortedSet { | ||
constructor(xs) { | ||
xs = sort(xs); | ||
this._elts = xs; | ||
this._set = new Set(xs); | ||
} | ||
add(x) { | ||
if (this._set.has(x)) return this; | ||
const xs = this._elts; | ||
let added = false; | ||
for (let i = 0; i < xs.length; i++) { | ||
if (compare(x, xs[i]) <= 0) { | ||
xs.splice(i, 0, x); | ||
added = true; | ||
break; | ||
} | ||
} | ||
if (!added) { | ||
xs.push(x); | ||
} | ||
this._set = new Set(xs); | ||
this.size = xs.length; | ||
return this; | ||
} | ||
delete(x) { | ||
if (!this._set.has(x)) return this; | ||
const xs = this._elts; | ||
const idx = xs.indexOf(x); | ||
xs.splice(idx, 1); | ||
this._set = new Set(xs); | ||
this.size = xs.length; | ||
return this; | ||
} | ||
has(x) { | ||
return this._set.has(x); | ||
} | ||
keys() { | ||
return this.values(); | ||
} | ||
values() { | ||
return this._elts[Symbol.iterator](); | ||
} | ||
entries() { | ||
return this._set.entries(); | ||
} | ||
forEach(...xs) { | ||
return this.set.forEach(...xs); | ||
} | ||
clear() { | ||
this._elts = []; | ||
this._set = new Set(this._elts); | ||
} | ||
[Symbol.iterator]() { | ||
return this.keys(); | ||
} | ||
} | ||
export function sorted_set(...xs) { | ||
return new SortedSet(xs); | ||
} | ||
function mkBoundFn(_sc, test, key) { | ||
return (e) => { | ||
return test(compare(e, key), 0); | ||
}; | ||
} | ||
function indexFrom(sc, startKey, _asc=true) { | ||
let i = 0; | ||
for (; i < sc.length; i++) { | ||
if (!(compare(startKey, sc[i]) > 0)) { | ||
break; | ||
} | ||
} | ||
return i; | ||
} | ||
function subseq3([sc, test, key]) { | ||
const includeFn = mkBoundFn(sc, test, key); | ||
if (test === _GT_ || test === _GT__EQ_) { | ||
const seqFrom = [...sc]; | ||
const startIdx = indexFrom(seqFrom, key, true); | ||
// delete startIdx items from the start; | ||
seqFrom.splice(0, startIdx); | ||
if (includeFn(seqFrom[0])) { | ||
return seqFrom; | ||
} else { | ||
// delete 1 item from the start; | ||
seqFrom.splice(0,1); | ||
return seqFrom; | ||
} | ||
} else { | ||
return [...take_while(includeFn, sc)]; | ||
} | ||
} | ||
function subseq5([sc, startTest, startKey, endTest, endKey]) { | ||
const seqFrom = [...sc]; | ||
const startIdx = indexFrom(seqFrom, startKey, true); | ||
// delete startIdx items from the start | ||
seqFrom.splice(0, startIdx); | ||
const whileFn = mkBoundFn(sc, endTest, endKey); | ||
if (!mkBoundFn(sc, startTest, startKey)(seqFrom[0])) { | ||
// delete 1 item from the start | ||
seqFrom.splice(0, 1); | ||
} | ||
return [...take_while(whileFn, seqFrom)]; | ||
} | ||
export function subseq(...xs) { | ||
if (xs.length === 3) { | ||
return subseq3(xs); | ||
} | ||
if (xs.length === 5) { | ||
return subseq5(xs); | ||
} | ||
} | ||
export function abs(x) { | ||
return Math.abs(x); | ||
} | ||
export function long$(x) { | ||
return fix(x); | ||
} |
import * as core from './core.js'; | ||
function _bubble_max_key(k, coll) { | ||
const max = core.max_key(k, ...coll); | ||
return [max, ...coll.filter(x => x !== max)]; | ||
} | ||
function _intersection2(x, y) { | ||
@@ -22,4 +27,6 @@ if (x.size > y.size) { | ||
case 1: return xs[0]; | ||
case 2: return _intersection2(xs[0], xs[1]); | ||
default: return xs.reduce(_intersection2); | ||
case 2: return xs[0].length > xs[1].length ? | ||
_intersection2(xs[0], xs[1]) : | ||
_intersection2(xs[1], xs[0]); | ||
default: return _bubble_max_key((x) => 0 - x.size, xs).reduce(_intersection2); | ||
} | ||
@@ -59,4 +66,6 @@ } | ||
case 1: return xs[0]; | ||
case 2: return _union2(xs[0], xs[1]); | ||
default: return xs.reduce(_union2); | ||
case 2: return xs[0].length > xs[1].length ? | ||
_union2(xs[0], xs[1]) : | ||
_union2(xs[1], xs[0]); | ||
default: return _bubble_max_key((x) => x.size, xs).reduce(_union2); | ||
} | ||
@@ -124,9 +133,13 @@ } | ||
const ks = core.keys(kmap); | ||
let without = core.dissoc(map, ...ks); | ||
if (without === map) { | ||
without = {...map}; | ||
} | ||
return ks.reduce((m, k) => { | ||
const newKey = core.get(kmap, k); | ||
if (core.contains_QMARK_(map, k)) { | ||
return core.assoc(m, newKey, core.get(map, k)); | ||
return core.assoc_BANG_(m, newKey, core.get(map, k)); | ||
} | ||
return m; | ||
}, core.dissoc(map, ...ks)); | ||
}, without); | ||
} | ||
@@ -154,6 +167,7 @@ | ||
const [r, s] = core.count(xrel) <= core.count(yrel) ? [xrel, yrel] : [yrel, xrel]; | ||
const idx = core.group_by(core.juxt(...ks), r); | ||
const select = core.juxt(...ks); | ||
const idx = core.group_by(select, r); | ||
return core.reduce((ret, x) => { | ||
const found = core.get(idx, core.juxt(...ks)(x)); | ||
return found ? core.reduce((acc, y) => core.conj(acc, core.merge(y, x)), ret, found) : ret; | ||
const found = core.get(idx, select(x)); | ||
return found ? core.reduce((acc, y) => acc.add(core.merge(y, x)), ret, found) : ret; | ||
}, new Set(), s); | ||
@@ -166,7 +180,8 @@ } else { | ||
const idx = core.group_by(core.juxt(...core.vals(k)), r); | ||
const select = core.juxt(...core.keys(k)); | ||
return core.reduce((ret, x) => { | ||
const found = core.get(idx, core.juxt(...core.keys(k))(x)); | ||
return found ? core.reduce((acc, y) => core.conj(acc, core.merge(y, x)), ret, found) : ret; | ||
const found = core.get(idx, select(x)); | ||
return found ? core.reduce((acc, y) => acc.add(core.merge(y, x)), ret, found) : ret; | ||
}, new Set(), s); | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1344833
7748