squint-cljs
Advanced tools
Comparing version 0.7.96 to 0.7.97
@@ -6,47 +6,48 @@ 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 yha=function(a,b){return $APP.Vd(a)&&$APP.Vd(b)?$APP.Qk.l($APP.F([a,b])):$APP.Rd(a)&&($APP.Ud(a)||$APP.Td(a))&&$APP.Rd(b)&&($APP.Ud(b)||$APP.Td(b))?$APP.Rg.g(a,b):b},W9=function(a,b){return $APP.oe.j(function(c,d){return $APP.av.l(yha,$APP.F([c,d]))},a,b)},X9=function(a){throw $APP.cl.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.n(null,1,[zha,a],null));},Y9=function(a){var b=JSON.parse(a);return $APP.ae(b)?b:X9(a)},Aha=function(a){var b=JSON.parse(a);return $APP.RG(b)?b:X9(a)},Bha= | ||
function(a){var b=JSON.parse(a);return $APP.SG(b)?b:X9(a)},Z9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:X9(a)},$9=function(a){return"string"===typeof a?$APP.B.j(a,0,null):null},a$=function(a){return $APP.A.g(":",$9(a))?$APP.zi.h($APP.ji.g(a,1)):$APP.zi.h(a)},Cha=function(a){return $APP.Rd(a)?$APP.y(a):a},b$=function(a){if("string"===typeof a)try{var b=$9(a);if($APP.A.g("true",a)||$APP.A.g("false",a))var c=Y9(a);else{if($APP.A.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e= | ||
Z9(a);else{var f=$APP.A.g(":",b);var k=f?$APP.hi(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?a$(a):a}d=e}c=d}return c}catch(l){return a}else return a},c$=function(a,b,c,d){throw $APP.cl.j(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Ri.l($APP.F([a]))].join(""),c instanceof $APP.H?" to ":" with ",$APP.t.h(c instanceof $APP.H?$APP.ai(c):c)].join(""),new $APP.n(null,2,[Dha,a,Eha,c],null),d);},Fha=function(a,b,c){var d=function(){switch(b instanceof $APP.H?b.da:null){case "boolean":case "bool":return Y9; | ||
case "int":case "long":return Aha;case "double":return Bha;case "number":return Z9;case "symbol":return $APP.Hi;case "keyword":return a$;case "string":return $APP.se;case "edn":return $APP.CH;case "auto":return b$;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=c$(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?c$(a,c,b,null):d},d$=function(a,b,c){a=$APP.fe.g(a,b);c=$APP.r(a)?a:$APP.Rd(c)?$APP.Hd(c):null;return $APP.r(c)?$APP.Rd(c)?$APP.Wq.g($APP.Ee, | ||
c):c:null},e$=function(a,b,c,d){return $APP.Qh.g(b,c)?(c=$APP.WG(a,b),$APP.r(c)?($APP.B.j(c,0,null),c=$APP.B.j(c,1,null),$APP.Rh.j(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.Rh.j(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},Gha=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Rd(d):d)?Fha(e,d,f):b$(e);return $APP.r(c)?$APP.Tm.A(a,b,c,d):$APP.Rh.j(a,b,d)},Hha=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, | ||
f$),k=$APP.fe.g(e,g$);c=$APP.fe.g(e,$APP.Dm);var l=$APP.fe.g(e,$APP.WE);e=$APP.fe.g(e,h$);b=$APP.r(f)?$APP.Tm.J(b,f$,$APP.Rh,d,f):b;b=$APP.r(k)?$APP.Tm.j(b,g$,function(m){if($APP.he(m,k))throw $APP.cl.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,[g$,k],null));return $APP.Rh.j(m,k,d)}):b;b=$APP.r(l)?$APP.Tm.j(b,$APP.WE,$APP.Wq.g(function(m){return $APP.Ee.g(m,d)},$APP.Vh)):b;b=$APP.r(e)?$APP.Tm.J(b,h$,$APP.Rh,d,e):b;return $APP.r(c)? | ||
$APP.Tm.J(b,i$,$APP.Rh,d,c):b},$APP.hf,a)},m$=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,j$);b=$APP.XG(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,[k$,a,l$,b],null)},o$=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.Mu.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,[l$,a,n$,b],null)},w$=function(a,b,c,d,e){var f=$9(a),k="string"===typeof a?$APP.B.j(a,1,null):null,l;if(l=$APP.A.g(f,"-")){try{var m=Z9($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?p$:null;f=$APP.A.g(":",f);c=$APP.Qh.g(p$,b)&&f&&($APP.A.g(q$,d)||$APP.Za(c)||$APP.A.g(e,c));d=$APP.r(b)?b:c?r$:null;a=l?$APP.r(k)?$APP.Qh.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.n(null, | ||
5,[$APP.Xw,d,s$,l,t$,a,u$,c,v$,f],null)},Lha=function(a,b){function c(vb){vb=$APP.Qk.l($APP.F([new $APP.n(null,2,[x$,d,$APP.Xk,y$],null),vb]));return O.h?O.h(vb):O.call(null,vb)}var d=x$.h(b),e=$APP.r(d)?W9(b,$APP.F([Hha(d)])):b,f=f$.h(e),k=function(){var vb=g$.h(e);return $APP.r(vb)?vb:$APP.Hr.h(e)}(),l=Iha.h(e),m=$APP.WE.h(e),h=i$.h(e),q=j$.h(e),p=function(){var vb=z$.h(e);return $APP.r(vb)?vb:Jha.h(e)}(),v=$APP.Zh($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,p)?v:null==p?null:$APP.Zh(p),I=h$.h(e),O=function(){var vb=Kha.h(e);return $APP.r(vb)?vb:function(Yb){Yb=$APP.jf(Yb);var Ic=$APP.fe.g(Yb,A$);throw $APP.cl.g(Ic,Yb);}}(),P=m$(a,null),W=$APP.jf(P),ca=$APP.fe.g(W,k$),ha=$APP.fe.g(W,l$),na=function(){var vb=n$.h(e);vb=$APP.r(vb)?vb:B$.h(e);return $APP.r(vb)?o$(ca,vb):new $APP.n(null,2,[n$,null,l$,ha],null)}(),pa=$APP.jf(na),fa=$APP.fe.g(pa,l$),E=$APP.fe.g(pa,n$),C=$APP.Qh.g(fa,ha)?new $APP.J(null,2,5,$APP.N,[null,$APP.R.g(fa,ha)],null): | ||
new $APP.J(null,2,5,$APP.N,[ca,ha],null),da=$APP.B.j(C,0,null),K=$APP.B.j(C,1,null),M=function(){for(var vb=$APP.hf,Yb=null,Ic=null,Me=$APP.r(q)?p$:null,hd=$APP.x(K),Jg=E;;){if($APP.Za(hd))return new $APP.J(null,3,5,$APP.N,[vb,Yb,Ic],null);var lg=$APP.y(hd),Tc=lg instanceof $APP.H;if(Tc){Yb=e$(vb,Yb,Ic,null);var me=lg;hd=$APP.z(hd);vb=Yb;Yb=me}else{var Al=!0===lg,Rf=$APP.t.h(lg);me=d$(l,Yb,$APP.fe.g(f,Yb));var xi=$APP.fe.g(f,Yb),Bl=w$(Rf,Me,Yb,xi,Ic),Kh=$APP.jf(Bl),Cl=$APP.fe.g(Kh,s$),Lh=$APP.fe.g(Kh, | ||
t$),Dl=$APP.fe.g(Kh,u$),Sf=$APP.fe.g(Kh,$APP.Xw),mk=$APP.fe.g(Kh,v$);if($APP.r(function(){var Oe=Cl;return $APP.r(Oe)?Oe:Dl}())){var Yc=$APP.qa(Rf,"--"),nk=Yc&&$APP.A.g("--",Rf);if(nk){var El=$APP.z(hd);return new $APP.J(null,3,5,$APP.N,[function(){var Oe=vb;return El?$APP.jo.A(Oe,$APP.Ou,new $APP.J(null,2,5,$APP.N,[y$,l$],null),$APP.mg(El)):Oe}(),Yb,Ic],null)}var ok=Yc?$APP.ji.g(Rf,2):$APP.Zj(Rf,/^(:|-|)/,""),zf=Yc?$APP.Dr.g(ok,/=/):new $APP.J(null,1,5,$APP.N,[ok],null),Sd=$APP.B.j(zf,0,null),Ce= | ||
$APP.B.j(zf,1,null),Tb=$APP.zi.h(Sd),Ec=$APP.fe.j(k,Tb,Tb);if($APP.r(Ce))Ic=e$(vb,Yb,Ic,me),Yb=Ec,Me=Sf,hd=$APP.He(Ce,$APP.cd(hd)),vb=Ic,Ic=null;else{var Ab=$APP.z(hd),Ne=$APP.y(Ab),mw=w$(Ne,Sf,Yb,xi,Ic);if($APP.r(function(){var Oe=s$.h(mw);return $APP.r(Oe)?Oe:$APP.Qd(Ab)}()))if($APP.r(Lh)){var nw=$APP.ai(Ec);Ic=$APP.aq.l(function(){return function(Oe){return new $APP.J(null,2,5,$APP.N,[["-",$APP.t.h(Oe)].join(""),!0],null)}}(vb,Yb,Ic,Me,hd,Jg,nw,Ab,Ne,mw,ok,zf,Sd,Ce,Tb,Ec,Yc,nk,Al,Rf,me,xi,Bl,Kh, | ||
Cl,Lh,Dl,Sf,mk,lg,Tc,d,e,f,k,l,m,h,q,p,v,D,I,O,c,P,W,ca,ha,na,pa,fa,E,C,da,K),$APP.F([nw]));hd=$APP.R.g(Ic,Ab);Me=Sf;Ic=Yb=null}else hd=$APP.he(v,Ec)?null:$APP.MG($APP.t.h(Ec),":no-"),Me=$APP.r(hd)?$APP.zi.h($APP.Zj($APP.t.h(Ec),":no-","")):Ec,hd=$APP.He($APP.Za(hd),Ab),Yb=e$(vb,Yb,Ic,me),me=Me,Me=Sf,vb=Yb,Yb=me;else Yb=e$(vb,Yb,Ic,me),me=Ec,Me=Sf,hd=Ab,vb=Yb,Yb=me}}else if(nk=$APP.A.g(q$,xi)&&$APP.Qh.g(Rf,"true")&&$APP.Qh.g(Rf,"false")||$APP.A.g(Ic,Yb)&&$APP.Za(me))if(Jg=$APP.r(hd)?$APP.r(Jg)?o$(hd, | ||
Jg):new $APP.n(null,1,[l$,hd],null):new $APP.n(null,1,[l$,hd],null),Me=$APP.jf(Jg),Jg=$APP.fe.g(Me,l$),Me=$APP.fe.g(Me,n$),$APP.Qh.g(hd,Jg))me=Me,Me=Sf,hd=Jg,Jg=me;else return new $APP.J(null,3,5,$APP.N,[$APP.jo.A(vb,$APP.Ou,new $APP.J(null,2,5,$APP.N,[y$,l$],null),$APP.mg(hd)),Yb,Ic],null);else{try{var Zd=Gha(vb,Yb,me,Cha(xi),Rf,Al)}catch(Oe){c(new $APP.n(null,4,[C$,f$,A$,$APP.aH(Oe),D$,Yb,E$,Rf],null)),Zd=vb}Ic=$APP.r(function(){var Oe=$APP.A.g(r$,Sf);return Oe?mk:Oe}())?null:Yb;me=$APP.r(function(){var Oe= | ||
$APP.A.g(r$,Sf);return Oe?mk:Oe}())?null:Yb;Me=Sf;hd=$APP.z(hd);vb=Zd;Yb=Ic;Ic=me}}}}(),ea=$APP.B.j(M,0,null),ia=$APP.B.j(M,1,null),ja=$APP.B.j(M,2,null),sa=d$(l,ia,$APP.fe.g(f,ia)),ta=function(){var vb=e$(ea,ia,ja,sa);return $APP.x(da)?$APP.jo.A(vb,$APP.Nk,new $APP.J(null,2,5,$APP.N,[y$,l$],null),function(Yb){return $APP.Rg.g($APP.mg(da),Yb)}):vb}(),wa=$APP.r(h)?$APP.Md($APP.Qk.l($APP.F([h,ta])),$APP.Nd(ta)):ta;if($APP.r(D)){a=$APP.x($APP.Mh(wa));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,[C$,z$,A$,["Unknown option: ",$APP.t.h(Ha)].join(""),z$,D,D$,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,[C$,z$,A$,["Unknown option: ",$APP.t.h(a)].join(""),z$,D,D$,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.WG(wa,Ha))||c(new $APP.n(null,4,[C$,$APP.WE,A$,["Required option: ", | ||
$APP.t.h(Ha)].join(""),$APP.WE,m,D$,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.WG(wa,a))||c(new $APP.n(null,4,[C$,$APP.WE,A$,["Required option: ",$APP.t.h(a)].join(""),$APP.WE,m,D$,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,Oa=0,Sa=0;;)if(Sa<Oa){var db=za.ba(null,Sa),ub=$APP.B.j(db,0,null),Bb=$APP.B.j(db,1,null),Xb=function(){var vb=(vb=$APP.Vd(Bb))?F$.h(Bb):vb;return $APP.r(vb)? | ||
vb:Bb}(),qc=$APP.WG(wa,ub);if($APP.r(qc)){var $c=qc,Rb=$APP.B.j($c,0,null),mf=$APP.B.j($c,1,null);if(!$APP.r(Xb.h?Xb.h(mf):Xb.call(null,mf))){var ik=function(){var vb=G$.h(Bb);return $APP.r(vb)?vb:function(){return function(Yb){var Ic=$APP.jf(Yb);Yb=$APP.fe.g(Ic,D$);Ic=$APP.fe.g(Ic,E$);return["Invalid value for option ",$APP.t.h(Yb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Oa,Sa,vb,$c,Rb,mf,qc,Xb,db,ub,Bb,d,e,f,k,l,m,h,q,p,v,D,I,O,c,P,W,ca,ha,na,pa,fa,E,C,da,K,M,ea,ia,ja,sa,ta,wa)}();c(new $APP.n(null, | ||
5,[C$,h$,A$,function(){var vb=new $APP.n(null,2,[D$,ub,E$,mf],null);return ik.h?ik.h(vb):ik.call(null,vb)}(),h$,I,D$,ub,E$,mf],null))}}Sa+=1}else{var xl=$APP.x(Da);if(xl){var vi=xl;if($APP.Yd(vi))ya=$APP.uc(vi),a=$APP.vc(vi),b=ya,ya=$APP.xd(ya),Da=a,za=b,Oa=ya;else{var jk=$APP.y(vi),kk=$APP.B.j(jk,0,null),rj=$APP.B.j(jk,1,null),lk=function(){var vb=(vb=$APP.Vd(rj))?F$.h(rj):vb;return $APP.r(vb)?vb:rj}(),yl=$APP.WG(wa,kk);if($APP.r(yl)){var Hc=yl,sj=$APP.B.j(Hc,0,null),wi=$APP.B.j(Hc,1,null);if(!$APP.r(lk.h? | ||
lk.h(wi):lk.call(null,wi))){var zl=function(){var vb=G$.h(rj);return $APP.r(vb)?vb:function(){return function(Yb){var Ic=$APP.jf(Yb);Yb=$APP.fe.g(Ic,D$);Ic=$APP.fe.g(Ic,E$);return["Invalid value for option ",$APP.t.h(Yb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Oa,Sa,vb,Hc,sj,wi,yl,lk,jk,kk,rj,vi,xl,d,e,f,k,l,m,h,q,p,v,D,I,O,c,P,W,ca,ha,na,pa,fa,E,C,da,K,M,ea,ia,ja,sa,ta,wa)}();c(new $APP.n(null,5,[C$,h$,A$,function(){var vb=new $APP.n(null,2,[D$,kk,E$,wi],null);return zl.h?zl.h(vb):zl.call(null,vb)}(), | ||
h$,I,D$,kk,E$,wi],null))}}Da=$APP.z(vi);za=null;Oa=0}Sa=0}else break}return wa},Mha=function(a,b){a=Lha(a,b);b=y$.h($APP.Nd(a));return $APP.Rh.j(b,$APP.EH,$APP.Rk.g(a,y$))},Nha=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},L$=function(a,b){$APP.Jf(H$,!1);a.setPrompt([$APP.t.h($APP.u(I$)),"\x3d\x3e "].join(""));a.prompt();return $APP.gk($APP.u(J$))?null:K$.g?K$.g(b,a):K$.call(null,b,a)},M$=function(a){var b=$APP.Bk(a);a=$APP.Ck(a); | ||
var c=$APP.bH($APP.u(J$));b=$APP.Nf.g(b-1,c);c=$APP.x(b);b=$APP.y(c);c=$APP.z(c);a=$APP.r(b)?$APP.ji.g(b,a):null;$APP.Jf(J$,$APP.Mp.g("\n",$APP.He(a,c)))},Pha=function(a,b,c){var d=function(){var f=$APP.lr;$APP.lr=$APP.u(I$);try{a:{var k=$APP.La;$APP.La=!0;try{var l=$APP.Ri.l($APP.F([a]));break a}finally{$APP.La=k}l=void 0}return $APP.lu(l,new $APP.n(null,3,[$APP.Op,$APP.Rp,$APP.Er,Oha,$APP.au,!0],null),null)}finally{$APP.lr=f}}(),e=$APP.jf(d);d=$APP.fe.g(e,$APP.ku);e=$APP.fe.g(e,$APP.T);d=$APP.Zj("(async function () {\n%s\n}) ()", | ||
"%s",d);$APP.Jf(I$,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 K$.g?K$.g(c,b):K$.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return L$(b,c)})},K$=function(a,b){if($APP.r(function(){var e=$APP.u(H$);return $APP.r(e)?e:!$APP.gk($APP.u(J$))}())){$APP.Jf(H$,!0);var c=$APP.hp($APP.u(J$)),d=function(){try{return $APP.jp(c,$APP.Yt)}catch(f){var e=f;if(-1!=$APP.aH(e).indexOf("EOF while reading"))return N$; | ||
M$(c);$APP.AH.l($APP.F([$APP.t.h(e)]));return O$}}();if($APP.A.g(O$,d))return L$(b,a);if($APP.A.g(N$,d))return $APP.Jf(H$,!1);M$(c);return $APP.A.g($APP.ip,d)?L$(b,a):Pha(d,b,a)}return null},P$=function(a,b){a.on("line",function(c){$APP.Wi.A(J$,$APP.t,c,"\n");return K$(b,a)})},Qha=function(a){var b=esm_import$readline.createInterface({input:a,output:a});P$(b,a);a.setNoDelay(!0);return a.on("close",function(){return $APP.BH.l($APP.F(["Client closed connection."]))})},Q$=function(a,b,c){return $APP.r(c)? | ||
esm_import$path.resolve(c,$APP.pH(a,b)):a},R$=function(a,b,c){var d=$APP.uH.h(a),e=$APP.eH.h(a);b=Q$(b,e,d);c=$APP.gH(c);d=null==c?null:Q$(c,e,d);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.tH.g(a,".mjs"),a=$APP.qa(a,".")?a:[".",$APP.t.h(a)].join(""),e=esm_import$path.extname(d),["./",$APP.Zj(d,$APP.ki([$APP.t.h(e),"$"].join("")),a)].join("")):null},S$=function(a,b,c){b=esm_import$path.resolve(b,$APP.pH(a,c));c=esm_import$path.dirname(b); | ||
$APP.r(esm_import$fs.existsSync(c))||($APP.BH.l($APP.F(["[squint] Creating directory:",c])),esm_import$fs.mkdirSync(c,{recursive:!0}));$APP.BH.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.fH),d=$APP.Qk.l($APP.F([c,a])),e=$APP.eH.h(c),f=$APP.uH.g(c,".");a=$APP.Qd(b)?$APP.mg($APP.aq.l(T$,$APP.F([e]))):b;b=$APP.uH.h(d);if($APP.r(b)&&"string"!==typeof b)throw Error("output-dir must be a string");return $APP.r(U$.h(d))?($APP.BH.l($APP.F(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])), | ||
$APP.BH(),$APP.BH.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.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(l))?($APP.BH.l($APP.F(["[squint] Compiling CLJS file:",l])),$APP.vH($APP.Rh.l(d,$APP.qH,l,$APP.F([$APP.tr, | ||
function(m){return R$(d,l,m)}])))):S$(l,f,e)}).then(function(m){m=$APP.jf(m);m=$APP.fe.g(m,$APP.sH);$APP.r(m)&&$APP.BH.l($APP.F(["[squint] Wrote file:",m]));return m})},null,a)},u$=new $APP.H(null,"kwd-opt","kwd-opt",1313309243),p$=new $APP.H(null,"hyphens","hyphens",2113533609),x$=new $APP.H(null,"spec","spec",347520401),f$=new $APP.H(null,"coerce","coerce",1917884504),z$=new $APP.H(null,"restrict","restrict",-1071101511),r$=new $APP.H(null,"keywords","keywords",1526959054),O$=new $APP.H("squint.repl.node", | ||
"continue","squint.repl.node/continue",1558138730),A$=new $APP.H(null,"msg","msg",-1386103444),Rha=new $APP.H(null,"show","show",-576705889),q$=new $APP.H(null,"boolean","boolean",-1919418404),Dha=new $APP.H(null,"input","input",556931961),W$=new $APP.H(null,"rest-cmds","rest-cmds",-423198324),y$=new $APP.H("org.babashka","cli","org.babashka/cli",1162430315),n$=new $APP.H(null,"args-\x3eopts","args-\x3eopts",964391046),g$=new $APP.H(null,"alias","alias",-2039751630),Iha=new $APP.H(null,"collect", | ||
"collect",-284321549),h$=new $APP.H(null,"validate","validate",-201300827),t$=new $APP.H(null,"composite-opt","composite-opt",-2021292928),Sha=new $APP.H(null,"run","run",-1821166653),s$=new $APP.H(null,"hyphen-opt","hyphen-opt",1836909464),U$=new $APP.H(null,"help","help",-439233446),C$=new $APP.H(null,"cause","cause",231901252),v$=new $APP.H(null,"fst-colon","fst-colon",1618567071),Eha=new $APP.H(null,"coerce-fn","coerce-fn",-821146515),l$=new $APP.H(null,"args","args",1315556576),j$=new $APP.H(null, | ||
"no-keyword-opts","no-keyword-opts",761286018),E$=new $APP.H(null,"value","value",305978217),F$=new $APP.H(null,"pred","pred",1927423397),Jha=new $APP.H(null,"closed","closed",-919675359),N$=new $APP.H("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),Kha=new $APP.H(null,"error-fn","error-fn",-171437615),D$=new $APP.H(null,"option","option",65132272),i$=new $APP.H(null,"exec-args","exec-args",-1860766354),G$=new $APP.H(null,"ex-msg","ex-msg",-1111774387),zha=new $APP.H(null, | ||
"s","s",1705939918),B$=new $APP.H(null,"cmds-opts","cmds-opts",-390130362),Tha=new $APP.H(null,"h","h",1109658740),k$=new $APP.H(null,"cmds","cmds",-1841503952);var J$=$APP.Vi.h(""),H$=$APP.Vi.h(!1),I$=$APP.Vi.h($APP.lr),X$,Y$=process.stdout.isTTY;X$=$APP.r(Y$)?process.stdin.setRawMode:Y$;var Oha=$APP.Vi.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.lr=$APP.iy;$APP.$q=$APP.kr=!0;var b=function(){var d=$APP.DH.h(a);return $APP.r(d)?d:0}(),c=esm_import$net.createServer(Qha);return c.listen(b,"127.0.0.1",function(){var d=c.address(),e=d.address;return $APP.BH.l($APP.F([["Socket REPL listening on port ",$APP.t.h(d.port)," on host ",$APP.t.h(e)].join("")]))})};Z$.m=1; | ||
var zha=function(a,b){return $APP.Vd(a)&&$APP.Vd(b)?$APP.Qk.l($APP.F([a,b])):$APP.Rd(a)&&($APP.Ud(a)||$APP.Td(a))&&$APP.Rd(b)&&($APP.Ud(b)||$APP.Td(b))?$APP.Rg.g(a,b):b},V9=function(a,b){return $APP.oe.j(function(c,d){return $APP.av.l(zha,$APP.F([c,d]))},a,b)},W9=function(a){throw $APP.cl.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.n(null,1,[Aha,a],null));},X9=function(a){var b=JSON.parse(a);return $APP.ae(b)?b:W9(a)},Bha=function(a){var b=JSON.parse(a);return $APP.RG(b)?b:W9(a)},Cha= | ||
function(a){var b=JSON.parse(a);return $APP.SG(b)?b:W9(a)},Y9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:W9(a)},Z9=function(a){return"string"===typeof a?$APP.B.j(a,0,null):null},$9=function(a){return $APP.A.g(":",Z9(a))?$APP.zi.h($APP.ji.g(a,1)):$APP.zi.h(a)},Dha=function(a){return $APP.Rd(a)?$APP.y(a):a},a$=function(a){if("string"===typeof a)try{var b=Z9(a);if($APP.A.g("true",a)||$APP.A.g("false",a))var c=X9(a);else{if($APP.A.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e= | ||
Y9(a);else{var f=$APP.A.g(":",b);var k=f?$APP.hi(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?$9(a):a}d=e}c=d}return c}catch(l){return a}else return a},b$=function(a,b,c,d){throw $APP.cl.j(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Ri.l($APP.F([a]))].join(""),c instanceof $APP.H?" to ":" with ",$APP.t.h(c instanceof $APP.H?$APP.ai(c):c)].join(""),new $APP.n(null,2,[Eha,a,Fha,c],null),d);},Gha=function(a,b,c){var d=function(){switch(b instanceof $APP.H?b.da:null){case "boolean":case "bool":return X9; | ||
case "int":case "long":return Bha;case "double":return Cha;case "number":return Y9;case "symbol":return $APP.Hi;case "keyword":return $9;case "string":return $APP.se;case "edn":return $APP.CH;case "auto":return a$;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=b$(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?b$(a,c,b,null):d},c$=function(a,b,c){a=$APP.fe.g(a,b);c=$APP.r(a)?a:$APP.Rd(c)?$APP.Hd(c):null;return $APP.r(c)?$APP.Rd(c)?$APP.Wq.g($APP.Ee, | ||
c):c:null},d$=function(a,b,c,d){return $APP.Qh.g(b,c)?(c=$APP.WG(a,b),$APP.r(c)?($APP.B.j(c,0,null),c=$APP.B.j(c,1,null),$APP.Rh.j(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.Rh.j(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},Hha=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Rd(d):d)?Gha(e,d,f):a$(e);return $APP.r(c)?$APP.Tm.A(a,b,c,d):$APP.Rh.j(a,b,d)},Iha=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, | ||
e$),k=$APP.fe.g(e,f$);c=$APP.fe.g(e,$APP.Dm);var l=$APP.fe.g(e,$APP.WE);e=$APP.fe.g(e,g$);b=$APP.r(f)?$APP.Tm.J(b,e$,$APP.Rh,d,f):b;b=$APP.r(k)?$APP.Tm.j(b,f$,function(m){if($APP.he(m,k))throw $APP.cl.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,[f$,k],null));return $APP.Rh.j(m,k,d)}):b;b=$APP.r(l)?$APP.Tm.j(b,$APP.WE,$APP.Wq.g(function(m){return $APP.Ee.g(m,d)},$APP.Vh)):b;b=$APP.r(e)?$APP.Tm.J(b,g$,$APP.Rh,d,e):b;return $APP.r(c)? | ||
$APP.Tm.J(b,h$,$APP.Rh,d,c):b},$APP.hf,a)},l$=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,i$);b=$APP.XG(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,[j$,a,k$,b],null)},n$=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.Mu.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,[k$,a,m$,b],null)},v$=function(a,b,c,d,e){var f=Z9(a),k="string"===typeof a?$APP.B.j(a,1,null):null,l;if(l=$APP.A.g(f,"-")){try{var m=Y9($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?o$:null;f=$APP.A.g(":",f);c=$APP.Qh.g(o$,b)&&f&&($APP.A.g(p$,d)||$APP.Za(c)||$APP.A.g(e,c));d=$APP.r(b)?b:c?q$:null;a=l?$APP.r(k)?$APP.Qh.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.n(null, | ||
5,[$APP.Xw,d,r$,l,s$,a,t$,c,u$,f],null)},Mha=function(a,b){function c(vb){vb=$APP.Qk.l($APP.F([new $APP.n(null,2,[w$,d,$APP.Xk,x$],null),vb]));return O.h?O.h(vb):O.call(null,vb)}var d=w$.h(b),e=$APP.r(d)?V9(b,$APP.F([Iha(d)])):b,f=e$.h(e),k=function(){var vb=f$.h(e);return $APP.r(vb)?vb:$APP.Hr.h(e)}(),l=Jha.h(e),m=$APP.WE.h(e),h=h$.h(e),q=i$.h(e),p=function(){var vb=y$.h(e);return $APP.r(vb)?vb:Kha.h(e)}(),v=$APP.Zh($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,p)?v:null==p?null:$APP.Zh(p),I=g$.h(e),O=function(){var vb=Lha.h(e);return $APP.r(vb)?vb:function(Yb){Yb=$APP.jf(Yb);var Ic=$APP.fe.g(Yb,z$);throw $APP.cl.g(Ic,Yb);}}(),P=l$(a,null),W=$APP.jf(P),ca=$APP.fe.g(W,j$),ha=$APP.fe.g(W,k$),na=function(){var vb=m$.h(e);vb=$APP.r(vb)?vb:A$.h(e);return $APP.r(vb)?n$(ca,vb):new $APP.n(null,2,[m$,null,k$,ha],null)}(),pa=$APP.jf(na),fa=$APP.fe.g(pa,k$),E=$APP.fe.g(pa,m$),C=$APP.Qh.g(fa,ha)?new $APP.J(null,2,5,$APP.N,[null,$APP.R.g(fa,ha)],null): | ||
new $APP.J(null,2,5,$APP.N,[ca,ha],null),ea=$APP.B.j(C,0,null),K=$APP.B.j(C,1,null),M=function(){for(var vb=$APP.hf,Yb=null,Ic=null,Me=$APP.r(q)?o$:null,hd=$APP.x(K),Jg=E;;){if($APP.Za(hd))return new $APP.J(null,3,5,$APP.N,[vb,Yb,Ic],null);var mg=$APP.y(hd),Tc=mg instanceof $APP.H;if(Tc){Yb=d$(vb,Yb,Ic,null);var me=mg;hd=$APP.z(hd);vb=Yb;Yb=me}else{var Al=!0===mg,Sf=$APP.t.h(mg);me=c$(l,Yb,$APP.fe.g(f,Yb));var xi=$APP.fe.g(f,Yb),Bl=v$(Sf,Me,Yb,xi,Ic),Kh=$APP.jf(Bl),Cl=$APP.fe.g(Kh,r$),Lh=$APP.fe.g(Kh, | ||
s$),Dl=$APP.fe.g(Kh,t$),Tf=$APP.fe.g(Kh,$APP.Xw),mk=$APP.fe.g(Kh,u$);if($APP.r(function(){var Oe=Cl;return $APP.r(Oe)?Oe:Dl}())){var Yc=$APP.qa(Sf,"--"),nk=Yc&&$APP.A.g("--",Sf);if(nk){var El=$APP.z(hd);return new $APP.J(null,3,5,$APP.N,[function(){var Oe=vb;return El?$APP.jo.A(Oe,$APP.Ou,new $APP.J(null,2,5,$APP.N,[x$,k$],null),$APP.lg(El)):Oe}(),Yb,Ic],null)}var ok=Yc?$APP.ji.g(Sf,2):$APP.Zj(Sf,/^(:|-|)/,""),zf=Yc?$APP.Dr.g(ok,/=/):new $APP.J(null,1,5,$APP.N,[ok],null),Sd=$APP.B.j(zf,0,null),Ce= | ||
$APP.B.j(zf,1,null),Tb=$APP.zi.h(Sd),Ec=$APP.fe.j(k,Tb,Tb);if($APP.r(Ce))Ic=d$(vb,Yb,Ic,me),Yb=Ec,Me=Tf,hd=$APP.He(Ce,$APP.cd(hd)),vb=Ic,Ic=null;else{var Ab=$APP.z(hd),Ne=$APP.y(Ab),nw=v$(Ne,Tf,Yb,xi,Ic);if($APP.r(function(){var Oe=r$.h(nw);return $APP.r(Oe)?Oe:$APP.Qd(Ab)}()))if($APP.r(Lh)){var ow=$APP.ai(Ec);Ic=$APP.aq.l(function(){return function(Oe){return new $APP.J(null,2,5,$APP.N,[["-",$APP.t.h(Oe)].join(""),!0],null)}}(vb,Yb,Ic,Me,hd,Jg,ow,Ab,Ne,nw,ok,zf,Sd,Ce,Tb,Ec,Yc,nk,Al,Sf,me,xi,Bl,Kh, | ||
Cl,Lh,Dl,Tf,mk,mg,Tc,d,e,f,k,l,m,h,q,p,v,D,I,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K),$APP.F([ow]));hd=$APP.R.g(Ic,Ab);Me=Tf;Ic=Yb=null}else hd=$APP.he(v,Ec)?null:$APP.MG($APP.t.h(Ec),":no-"),Me=$APP.r(hd)?$APP.zi.h($APP.Zj($APP.t.h(Ec),":no-","")):Ec,hd=$APP.He($APP.Za(hd),Ab),Yb=d$(vb,Yb,Ic,me),me=Me,Me=Tf,vb=Yb,Yb=me;else Yb=d$(vb,Yb,Ic,me),me=Ec,Me=Tf,hd=Ab,vb=Yb,Yb=me}}else if(nk=$APP.A.g(p$,xi)&&$APP.Qh.g(Sf,"true")&&$APP.Qh.g(Sf,"false")||$APP.A.g(Ic,Yb)&&$APP.Za(me))if(Jg=$APP.r(hd)?$APP.r(Jg)?n$(hd, | ||
Jg):new $APP.n(null,1,[k$,hd],null):new $APP.n(null,1,[k$,hd],null),Me=$APP.jf(Jg),Jg=$APP.fe.g(Me,k$),Me=$APP.fe.g(Me,m$),$APP.Qh.g(hd,Jg))me=Me,Me=Tf,hd=Jg,Jg=me;else return new $APP.J(null,3,5,$APP.N,[$APP.jo.A(vb,$APP.Ou,new $APP.J(null,2,5,$APP.N,[x$,k$],null),$APP.lg(hd)),Yb,Ic],null);else{try{var Zd=Hha(vb,Yb,me,Dha(xi),Sf,Al)}catch(Oe){c(new $APP.n(null,4,[B$,e$,z$,$APP.aH(Oe),C$,Yb,D$,Sf],null)),Zd=vb}Ic=$APP.r(function(){var Oe=$APP.A.g(q$,Tf);return Oe?mk:Oe}())?null:Yb;me=$APP.r(function(){var Oe= | ||
$APP.A.g(q$,Tf);return Oe?mk:Oe}())?null:Yb;Me=Tf;hd=$APP.z(hd);vb=Zd;Yb=Ic;Ic=me}}}}(),da=$APP.B.j(M,0,null),ia=$APP.B.j(M,1,null),ja=$APP.B.j(M,2,null),sa=c$(l,ia,$APP.fe.g(f,ia)),ta=function(){var vb=d$(da,ia,ja,sa);return $APP.x(ea)?$APP.jo.A(vb,$APP.Nk,new $APP.J(null,2,5,$APP.N,[x$,k$],null),function(Yb){return $APP.Rg.g($APP.lg(ea),Yb)}):vb}(),wa=$APP.r(h)?$APP.Md($APP.Qk.l($APP.F([h,ta])),$APP.Nd(ta)):ta;if($APP.r(D)){a=$APP.x($APP.Mh(wa));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,[B$,y$,z$,["Unknown option: ",$APP.t.h(Ha)].join(""),y$,D,C$,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,[B$,y$,z$,["Unknown option: ",$APP.t.h(a)].join(""),y$,D,C$,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.WG(wa,Ha))||c(new $APP.n(null,4,[B$,$APP.WE,z$,["Required option: ", | ||
$APP.t.h(Ha)].join(""),$APP.WE,m,C$,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.WG(wa,a))||c(new $APP.n(null,4,[B$,$APP.WE,z$,["Required option: ",$APP.t.h(a)].join(""),$APP.WE,m,C$,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,Oa=0,Sa=0;;)if(Sa<Oa){var db=za.ba(null,Sa),ub=$APP.B.j(db,0,null),Bb=$APP.B.j(db,1,null),Xb=function(){var vb=(vb=$APP.Vd(Bb))?E$.h(Bb):vb;return $APP.r(vb)? | ||
vb:Bb}(),qc=$APP.WG(wa,ub);if($APP.r(qc)){var $c=qc,Rb=$APP.B.j($c,0,null),mf=$APP.B.j($c,1,null);if(!$APP.r(Xb.h?Xb.h(mf):Xb.call(null,mf))){var ik=function(){var vb=F$.h(Bb);return $APP.r(vb)?vb:function(){return function(Yb){var Ic=$APP.jf(Yb);Yb=$APP.fe.g(Ic,C$);Ic=$APP.fe.g(Ic,D$);return["Invalid value for option ",$APP.t.h(Yb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Oa,Sa,vb,$c,Rb,mf,qc,Xb,db,ub,Bb,d,e,f,k,l,m,h,q,p,v,D,I,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K,M,da,ia,ja,sa,ta,wa)}();c(new $APP.n(null, | ||
5,[B$,g$,z$,function(){var vb=new $APP.n(null,2,[C$,ub,D$,mf],null);return ik.h?ik.h(vb):ik.call(null,vb)}(),g$,I,C$,ub,D$,mf],null))}}Sa+=1}else{var xl=$APP.x(Da);if(xl){var vi=xl;if($APP.Yd(vi))ya=$APP.uc(vi),a=$APP.vc(vi),b=ya,ya=$APP.xd(ya),Da=a,za=b,Oa=ya;else{var jk=$APP.y(vi),kk=$APP.B.j(jk,0,null),rj=$APP.B.j(jk,1,null),lk=function(){var vb=(vb=$APP.Vd(rj))?E$.h(rj):vb;return $APP.r(vb)?vb:rj}(),yl=$APP.WG(wa,kk);if($APP.r(yl)){var Hc=yl,sj=$APP.B.j(Hc,0,null),wi=$APP.B.j(Hc,1,null);if(!$APP.r(lk.h? | ||
lk.h(wi):lk.call(null,wi))){var zl=function(){var vb=F$.h(rj);return $APP.r(vb)?vb:function(){return function(Yb){var Ic=$APP.jf(Yb);Yb=$APP.fe.g(Ic,C$);Ic=$APP.fe.g(Ic,D$);return["Invalid value for option ",$APP.t.h(Yb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Oa,Sa,vb,Hc,sj,wi,yl,lk,jk,kk,rj,vi,xl,d,e,f,k,l,m,h,q,p,v,D,I,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K,M,da,ia,ja,sa,ta,wa)}();c(new $APP.n(null,5,[B$,g$,z$,function(){var vb=new $APP.n(null,2,[C$,kk,D$,wi],null);return zl.h?zl.h(vb):zl.call(null,vb)}(), | ||
g$,I,C$,kk,D$,wi],null))}}Da=$APP.z(vi);za=null;Oa=0}Sa=0}else break}return wa},Nha=function(a,b){a=Mha(a,b);b=x$.h($APP.Nd(a));return $APP.Rh.j(b,$APP.EH,$APP.Rk.g(a,x$))},Oha=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},K$=function(a,b){$APP.Jf(G$,!1);a.setPrompt([$APP.t.h($APP.u(H$)),"\x3d\x3e "].join(""));a.prompt();return $APP.gk($APP.u(I$))?null:J$.g?J$.g(b,a):J$.call(null,b,a)},L$=function(a){var b=$APP.Bk(a);a=$APP.Ck(a); | ||
var c=$APP.bH($APP.u(I$));b=$APP.Nf.g(b-1,c);c=$APP.x(b);b=$APP.y(c);c=$APP.z(c);a=$APP.r(b)?$APP.ji.g(b,a):null;$APP.Jf(I$,$APP.Mp.g("\n",$APP.He(a,c)))},Qha=function(a,b,c){var d=function(){var f=$APP.lr;$APP.lr=$APP.u(H$);try{a:{var k=$APP.La;$APP.La=!0;try{var l=$APP.Ri.l($APP.F([a]));break a}finally{$APP.La=k}l=void 0}return $APP.lu(l,new $APP.n(null,3,[$APP.Op,$APP.Rp,$APP.Er,Pha,$APP.au,!0],null),null)}finally{$APP.lr=f}}(),e=$APP.jf(d);d=$APP.fe.g(e,$APP.ku);e=$APP.fe.g(e,$APP.T);d=$APP.Zj("(async function () {\n%s\n}) ()", | ||
"%s",d);$APP.Jf(H$,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 J$.g?J$.g(c,b):J$.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return K$(b,c)})},J$=function(a,b){if($APP.r(function(){var e=$APP.u(G$);return $APP.r(e)?e:!$APP.gk($APP.u(I$))}())){$APP.Jf(G$,!0);var c=$APP.hp($APP.u(I$)),d=function(){try{return $APP.jp(c,$APP.Yt)}catch(f){var e=f;if(-1!=$APP.aH(e).indexOf("EOF while reading"))return M$; | ||
L$(c);$APP.AH.l($APP.F([$APP.t.h(e)]));return N$}}();if($APP.A.g(N$,d))return K$(b,a);if($APP.A.g(M$,d))return $APP.Jf(G$,!1);L$(c);return $APP.A.g($APP.ip,d)?K$(b,a):Qha(d,b,a)}return null},O$=function(a,b){a.on("line",function(c){$APP.Wi.A(I$,$APP.t,c,"\n");return J$(b,a)})},Rha=function(a){var b=esm_import$readline.createInterface({input:a,output:a});O$(b,a);a.setNoDelay(!0);return a.on("close",function(){return $APP.BH.l($APP.F(["Client closed connection."]))})},P$=function(a,b,c){return $APP.r(c)? | ||
esm_import$path.resolve(c,$APP.pH(a,b)):a},Q$=function(a,b,c){var d=$APP.uH.h(a),e=$APP.eH.h(a);b=P$(b,e,d);c=$APP.gH(c);d=null==c?null:P$(c,e,d);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.tH.g(a,".mjs"),a=$APP.qa(a,".")?a:[".",$APP.t.h(a)].join(""),e=esm_import$path.extname(d),["./",$APP.Zj(d,$APP.ki([$APP.t.h(e),"$"].join("")),a)].join("")):null},R$=function(a,b,c,d){if($APP.r(a)){var e=esm_import$path.resolve(c,$APP.pH(b, | ||
d));c=esm_import$path.dirname(e);if($APP.r($APP.Ef(function(f){return f instanceof $APP.H?$APP.ii($APP.ki(["\\.",$APP.ai(f),"$"].join("")),e):"string"===typeof f?$APP.ii($APP.ki(f),e):null},a)))return $APP.r(esm_import$fs.existsSync(c))||($APP.BH.l($APP.F(["[squint] Creating directory:",c])),esm_import$fs.mkdirSync(c,{recursive:!0})),$APP.BH.l($APP.F(["[squint] zCopying resource",b,"to",c])),esm_import$fs.copyFileSync(b,e)}return null},V$=function(a,b){var c=$APP.u($APP.fH),d=$APP.Qk.l($APP.F([c, | ||
a])),e=$APP.eH.h(c),f=S$.h(c),k=$APP.uH.g(c,".");a=$APP.Qd(b)?$APP.lg($APP.aq.l(T$,$APP.F([e]))):b;b=$APP.uH.h(d);if($APP.r(b)&&"string"!==typeof b)throw Error("output-dir must be a string");return $APP.r(U$.h(d))?($APP.BH.l($APP.F(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])),$APP.BH(),$APP.BH.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(l,m){return Promise.resolve(l).then(function(){return $APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(m))?($APP.BH.l($APP.F(["[squint] Compiling CLJS file:",m])),$APP.vH($APP.Rh.l(d,$APP.qH,m,$APP.F([$APP.tr,function(h){return Q$(d,m,h)}])))):R$(f,m,k,e)}).then(function(h){h=$APP.jf(h);h=$APP.fe.g(h,$APP.sH);$APP.r(h)&&$APP.BH.l($APP.F(["[squint] Wrote file:",h]));return h})},null,a)},t$=new $APP.H(null,"kwd-opt","kwd-opt", | ||
1313309243),o$=new $APP.H(null,"hyphens","hyphens",2113533609),w$=new $APP.H(null,"spec","spec",347520401),e$=new $APP.H(null,"coerce","coerce",1917884504),y$=new $APP.H(null,"restrict","restrict",-1071101511),q$=new $APP.H(null,"keywords","keywords",1526959054),N$=new $APP.H("squint.repl.node","continue","squint.repl.node/continue",1558138730),z$=new $APP.H(null,"msg","msg",-1386103444),Sha=new $APP.H(null,"show","show",-576705889),p$=new $APP.H(null,"boolean","boolean",-1919418404),Eha=new $APP.H(null, | ||
"input","input",556931961),W$=new $APP.H(null,"rest-cmds","rest-cmds",-423198324),x$=new $APP.H("org.babashka","cli","org.babashka/cli",1162430315),m$=new $APP.H(null,"args-\x3eopts","args-\x3eopts",964391046),f$=new $APP.H(null,"alias","alias",-2039751630),Jha=new $APP.H(null,"collect","collect",-284321549),g$=new $APP.H(null,"validate","validate",-201300827),s$=new $APP.H(null,"composite-opt","composite-opt",-2021292928),Tha=new $APP.H(null,"run","run",-1821166653),r$=new $APP.H(null,"hyphen-opt", | ||
"hyphen-opt",1836909464),U$=new $APP.H(null,"help","help",-439233446),B$=new $APP.H(null,"cause","cause",231901252),u$=new $APP.H(null,"fst-colon","fst-colon",1618567071),Fha=new $APP.H(null,"coerce-fn","coerce-fn",-821146515),k$=new $APP.H(null,"args","args",1315556576),i$=new $APP.H(null,"no-keyword-opts","no-keyword-opts",761286018),D$=new $APP.H(null,"value","value",305978217),S$=new $APP.H(null,"copy-resources","copy-resources",-1367155536),E$=new $APP.H(null,"pred","pred",1927423397),Kha=new $APP.H(null, | ||
"closed","closed",-919675359),M$=new $APP.H("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),Lha=new $APP.H(null,"error-fn","error-fn",-171437615),C$=new $APP.H(null,"option","option",65132272),h$=new $APP.H(null,"exec-args","exec-args",-1860766354),F$=new $APP.H(null,"ex-msg","ex-msg",-1111774387),Aha=new $APP.H(null,"s","s",1705939918),A$=new $APP.H(null,"cmds-opts","cmds-opts",-390130362),Uha=new $APP.H(null,"h","h",1109658740),j$=new $APP.H(null,"cmds","cmds", | ||
-1841503952);var I$=$APP.Vi.h(""),G$=$APP.Vi.h(!1),H$=$APP.Vi.h($APP.lr),X$,Y$=process.stdout.isTTY;X$=$APP.r(Y$)?process.stdin.setRawMode:Y$;var Pha=$APP.Vi.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.lr=$APP.dy;$APP.$q=$APP.kr=!0;var b=function(){var d=$APP.DH.h(a);return $APP.r(d)?d:0}(),c=esm_import$net.createServer(Rha);return c.listen(b,"127.0.0.1",function(){var d=c.address(),e=d.address;return $APP.BH.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.lr=$APP.iy;$APP.$q=$APP.kr=!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});P$(b,null);b.setPrompt([$APP.t.h($APP.u(I$)),"\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.aq.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])))},Uha=new $APP.J(null,7,5,$APP.N,[new $APP.n(null,3,[k$,new $APP.J(null,1,5,$APP.N,["run"],null),$APP.yo,function(a){a=$APP.jf(a);a=$APP.fe.g(a,$APP.EH);var b=$APP.u($APP.fH),c=$APP.Qk.l($APP.F([b,a]));a=$APP.jf(c);var d=$APP.fe.g(a,$APP.$k); | ||
a=$APP.fe.g(a,U$);if($APP.r(a))return null;$APP.BH.l($APP.F(["[squint] Running",d]));return $APP.vH($APP.Rh.l(c,$APP.qH,d,$APP.F([$APP.tr,function(e){return R$(c,d,e)}]))).then(function(e){e=$APP.jf(e);e=$APP.fe.g(e,$APP.sH);e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",$APP.t.h(e)].join("");return shadow_esm_import(e)})},B$,new $APP.J(null,1,5,$APP.N,[$APP.$k],null)],null),new $APP.n(null,2,[k$,new $APP.J(null,1,5,$APP.N,["compile"],null),$APP.yo,function(a){var b=$APP.jf(a); | ||
a=$APP.fe.g(b,W$);b=$APP.fe.g(b,$APP.EH);return V$(b,a)}],null),new $APP.n(null,2,[k$,new $APP.J(null,1,5,$APP.N,["repl"],null),$APP.yo,$$],null),new $APP.n(null,2,[k$,new $APP.J(null,1,5,$APP.N,["socket-repl"],null),$APP.yo,Z$],null),new $APP.n(null,2,[k$,new $APP.J(null,1,5,$APP.N,["nrepl-server"],null),$APP.yo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.EH);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,[k$,new $APP.J(null,1,5,$APP.N,["watch"],null),$APP.yo,function(a){var b=$APP.u($APP.fH),c=$APP.Qk.l($APP.F([b,a])),d=$APP.eH.h(b),e=$APP.uH.g(b,".");return shadow_esm_import("chokidar").catch(function(f){return console.error(f)}).then(function(f){f=f.watch;$APP.BH.l($APP.F(["[squint] Watching paths:",$APP.Mp.g(", ",d)]));for(var k=$APP.x(d),l=null,m=0,h=0;;)if(h<m){var q=l.ba(null,h);(f.h?f.h(q):f.call(null,q)).on("all",function(D,I,O,P,W,ca,ha,na,pa,fa){return function(E,C){return $APP.r(esm_import$fs.existsSync(C))? | ||
$APP.r(esm_import$fs.lstatSync(C).isDirectory())?null:$APP.he(new $APP.Uh(null,new $APP.n(null,2,["add",null,"change",null],null),null),E)&&$APP.he(new $APP.Uh(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(da){return console.error(da)}}(D,I,O,P,W,ca,ha,na,pa,fa)):S$(C,fa,pa):null}}(k,l,m,h,q,f,b,c,d,e));h+=1}else{var p=$APP.x(k);if(p){var v=p;$APP.Yd(v)?(k=$APP.uc(v),m=$APP.vc(v), | ||
l=k,v=$APP.xd(k),k=m,m=v):(q=$APP.y(v),(f.h?f.h(q):f.call(null,q)).on("all",function(D,I,O,P,W,ca,ha,na,pa,fa,E,C){return function(da,K){return $APP.r(esm_import$fs.existsSync(K))?$APP.r(esm_import$fs.lstatSync(K).isDirectory())?null:$APP.he(new $APP.Uh(null,new $APP.n(null,2,["add",null,"change",null],null),null),da)&&$APP.he(new $APP.Uh(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,ha,na,pa,fa,E,C)):S$(K,C,E):null}}(k,l,m,h,q,v,p,f,b,c,d,e)),k=$APP.z(v),l=null,m=0);h=0}else return null}})}],null),new $APP.n(null,2,[k$,$APP.kg,$APP.yo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,W$),c=$APP.fe.g(a,$APP.EH);a=$APP.CE.h(c);if($APP.r(a)){if($APP.r(U$.h(c)))return $APP.BH.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.vt.h(c))?$APP.Zj("(do %s\n)","%s",a): | ||
a;a=$APP.LG.g(a,$APP.Rh.l(c,$APP.vt,$APP.vt.h(c),$APP.F([$APP.Er,$APP.Vi.h(new $APP.n(null,1,[$APP.to,$APP.iy],null)),$APP.Op,$APP.r($APP.vt.h(c))?$APP.Rp:$APP.Sp,$APP.au,function(){var f=$APP.vt.h(c);return $APP.r(f)?!1!==$APP.au.h(c):f}()])));a=$APP.r($APP.vt.h(c))?$APP.Zj("(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(Rha.h(c))&&$APP.BH.l($APP.F([a]));if(!1===Sha.h(c))return null; | ||
e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return($APP.r($APP.vt.h(c))?Promise.resolve(eval(a)):shadow_esm_import(e)).then(function(f){return $APP.r($APP.vt.h(c))?$APP.AH.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.BH.l($APP.F(["Squint v0.7.96\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.Hr,new $APP.n(null,1,[Tha,U$],null),f$,new $APP.n(null,4,[$APP.au,q$,$APP.Ir,q$,$APP.uH,$APP.nl,$APP.vt,q$],null)],null),b=m$(process.argv.slice(2),a),c=$APP.jf(b),d=$APP.fe.g(c,k$),e=$APP.fe.g(c,l$);return $APP.oe.j(function(f,k){f=$APP.jf(k);var l=$APP.fe.g(f,k$),m=$APP.fe.g(f,$APP.yo),h=Nha(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=Mha(k,W9(a,$APP.F([f])));k=$APP.jf(f);var q=$APP.fe.g(k, | ||
$APP.EH);f=$APP.fe.g(k,l$);k=$APP.fe.g(k,k$);var p=$APP.R.g(k,f);return $APP.ld(function(){var v=$APP.Rh.l(c,l$,p,$APP.F([W$,p,$APP.EH,q,$APP.ap,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,Uha)})(); | ||
$$.h=function(){$APP.lr=$APP.dy;$APP.$q=$APP.kr=!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});O$(b,null);b.setPrompt([$APP.t.h($APP.u(H$)),"\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.lg($APP.aq.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])))},Vha=new $APP.J(null,7,5,$APP.N,[new $APP.n(null,3,[j$,new $APP.J(null,1,5,$APP.N,["run"],null),$APP.yo,function(a){a=$APP.jf(a);a=$APP.fe.g(a,$APP.EH);var b=$APP.u($APP.fH),c=$APP.Qk.l($APP.F([b,a]));a=$APP.jf(c);var d=$APP.fe.g(a,$APP.$k); | ||
a=$APP.fe.g(a,U$);if($APP.r(a))return null;$APP.BH.l($APP.F(["[squint] Running",d]));return $APP.vH($APP.Rh.l(c,$APP.qH,d,$APP.F([$APP.tr,function(e){return Q$(c,d,e)}]))).then(function(e){e=$APP.jf(e);e=$APP.fe.g(e,$APP.sH);e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",$APP.t.h(e)].join("");return shadow_esm_import(e)})},A$,new $APP.J(null,1,5,$APP.N,[$APP.$k],null)],null),new $APP.n(null,2,[j$,new $APP.J(null,1,5,$APP.N,["compile"],null),$APP.yo,function(a){var b=$APP.jf(a); | ||
a=$APP.fe.g(b,W$);b=$APP.fe.g(b,$APP.EH);return V$(b,a)}],null),new $APP.n(null,2,[j$,new $APP.J(null,1,5,$APP.N,["repl"],null),$APP.yo,$$],null),new $APP.n(null,2,[j$,new $APP.J(null,1,5,$APP.N,["socket-repl"],null),$APP.yo,Z$],null),new $APP.n(null,2,[j$,new $APP.J(null,1,5,$APP.N,["nrepl-server"],null),$APP.yo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.EH);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,[j$,new $APP.J(null,1,5,$APP.N,["watch"],null),$APP.yo,function(a){var b=$APP.u($APP.fH),c=$APP.Qk.l($APP.F([b,a])),d=$APP.eH.h(b),e=$APP.uH.g(b,"."),f=S$.h(b);return shadow_esm_import("chokidar").catch(function(k){return console.error(k)}).then(function(k){k=k.watch;$APP.BH.l($APP.F(["[squint] Watching paths:",$APP.Mp.g(", ",d)]));for(var l=$APP.x(d),m=null,h=0,q=0;;)if(q<h){var p=m.ba(null,q);(k.h?k.h(p):k.call(null,p)).on("all",function(I,O,P,W,ca,ha,na,pa,fa,E,C){return function(ea,K){return $APP.r(esm_import$fs.existsSync(K))? | ||
$APP.r(esm_import$fs.lstatSync(K).isDirectory())?null:$APP.he(new $APP.Uh(null,new $APP.n(null,2,["add",null,"change",null],null),null),ea)&&$APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(K))?V$(pa,new $APP.J(null,1,5,$APP.N,[K],null)).catch(function(){return function(M){return console.error(M)}}(I,O,P,W,ca,ha,na,pa,fa,E,C)):R$(C,K,E,fa):null}}(l,m,h,q,p,k,b,c,d,e,f));q+=1}else{var v=$APP.x(l);if(v){var D=v;$APP.Yd(D)?(l=$APP.uc(D),h=$APP.vc(D), | ||
m=l,D=$APP.xd(l),l=h,h=D):(p=$APP.y(D),(k.h?k.h(p):k.call(null,p)).on("all",function(I,O,P,W,ca,ha,na,pa,fa,E,C,ea,K){return function(M,da){return $APP.r(esm_import$fs.existsSync(da))?$APP.r(esm_import$fs.lstatSync(da).isDirectory())?null:$APP.he(new $APP.Uh(null,new $APP.n(null,2,["add",null,"change",null],null),null),M)&&$APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(da))?V$(E,new $APP.J(null,1,5,$APP.N,[da],null)).catch(function(){return function(ia){return console.error(ia)}}(I, | ||
O,P,W,ca,ha,na,pa,fa,E,C,ea,K)):R$(K,da,ea,C):null}}(l,m,h,q,p,D,v,k,b,c,d,e,f)),l=$APP.z(D),m=null,h=0);q=0}else return null}})}],null),new $APP.n(null,2,[j$,$APP.kg,$APP.yo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,W$),c=$APP.fe.g(a,$APP.EH);a=$APP.EE.h(c);if($APP.r(a)){if($APP.r(U$.h(c)))return $APP.BH.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.vt.h(c))?$APP.Zj("(do %s\n)", | ||
"%s",a):a;a=$APP.LG.g(a,$APP.Rh.l(c,$APP.vt,$APP.vt.h(c),$APP.F([$APP.Er,$APP.Vi.h(new $APP.n(null,1,[$APP.to,$APP.dy],null)),$APP.Op,$APP.r($APP.vt.h(c))?$APP.Rp:$APP.Sp,$APP.au,function(){var f=$APP.vt.h(c);return $APP.r(f)?!1!==$APP.au.h(c):f}()])));a=$APP.r($APP.vt.h(c))?$APP.Zj("(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(Sha.h(c))&&$APP.BH.l($APP.F([a]));if(!1===Tha.h(c))return null; | ||
e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return($APP.r($APP.vt.h(c))?Promise.resolve(eval(a)):shadow_esm_import(e)).then(function(f){return $APP.r($APP.vt.h(c))?$APP.AH.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.BH.l($APP.F(["Squint v0.7.97\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.Hr,new $APP.n(null,1,[Uha,U$],null),e$,new $APP.n(null,4,[$APP.au,p$,$APP.Ir,p$,$APP.uH,$APP.nl,$APP.vt,p$],null)],null),b=l$(process.argv.slice(2),a),c=$APP.jf(b),d=$APP.fe.g(c,j$),e=$APP.fe.g(c,k$);return $APP.oe.j(function(f,k){f=$APP.jf(k);var l=$APP.fe.g(f,j$),m=$APP.fe.g(f,$APP.yo),h=Oha(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.x(h);return null==v?null:$APP.lg(v)}();k=$APP.R.g(k,e);f=Nha(k,V9(a,$APP.F([f])));k=$APP.jf(f);var q=$APP.fe.g(k, | ||
$APP.EH);f=$APP.fe.g(k,k$);k=$APP.fe.g(k,j$);var p=$APP.R.g(k,f);return $APP.ld(function(){var v=$APP.Rh.l(c,k$,p,$APP.F([W$,p,$APP.EH,q,$APP.ap,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,Vha)})(); |
@@ -15,3 +15,3 @@ import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
$APP.pH=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.vH=function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.qH),c=$APP.fe.g(a,rH),d=$APP.fe.g(a,$APP.sH),e=$APP.fe.g(a,$APP.tH),f=$APP.fe.j(a,$APP.uH,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return oH(c,$APP.Rh.j(a,$APP.Er,$APP.Vi.h(new $APP.n(null,1,[$APP.to,$APP.iy],null)))).then(function(k){k=$APP.jf(k);var l=$APP.fe.g(k,$APP.ku),m=$APP.fe.g(k,$APP.wq),h=$APP.eH.g($APP.u($APP.fH),new $APP.J(null,2,5,$APP.N,[".","src"],null)),q=esm_import$path,p=q.resolve;$APP.r(d)?h=d:(h=$APP.pH(b,h), | ||
$APP.vH=function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.qH),c=$APP.fe.g(a,rH),d=$APP.fe.g(a,$APP.sH),e=$APP.fe.g(a,$APP.tH),f=$APP.fe.j(a,$APP.uH,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return oH(c,$APP.Rh.j(a,$APP.Er,$APP.Vi.h(new $APP.n(null,1,[$APP.to,$APP.dy],null)))).then(function(k){k=$APP.jf(k);var l=$APP.fe.g(k,$APP.ku),m=$APP.fe.g(k,$APP.wq),h=$APP.eH.g($APP.u($APP.fH),new $APP.J(null,2,5,$APP.N,[".","src"],null)),q=esm_import$path,p=q.resolve;$APP.r(d)?h=d:(h=$APP.pH(b,h), | ||
$APP.r(m)?m=".jsx":(m=$APP.r(e)?[".",$APP.Zj(e,/^\./,"")].join(""):null,m=$APP.r(m)?m:".mjs"),h=$APP.Zj(h,/.clj(s|c)$/,m));q=p.call(q,f,h);p=esm_import$path.dirname(q);$APP.r(esm_import$fs.existsSync(p))||esm_import$fs.mkdirSync(p,{recursive:!0});if(!$APP.r(esm_import$fs.existsSync(p)))throw Error("File not found, make sure output-dir is a valid path: ",new $APP.n(null,2,[$APP.uH,f,$APP.sH,q],null));esm_import$fs.writeFileSync(q,l,"utf-8");return $APP.Rh.j(k,$APP.sH,q)})}; | ||
@@ -24,7 +24,7 @@ wH=function(a){return $APP.mu.l(a,$APP.F([$APP.nu,!0]))};xH=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.Nu.g(wH,d);d=$APP.Gf.g(a,d);return d instanceof Promise?d.then($APP.hv):$APP.hv(d)}b.m=0;b.o=function(d){d=$APP.x(d);return c(d)};b.l=c;return b}()};$APP.TG.prototype.add=function(a){return this.C.push(a)}; | ||
$APP.iH=function iH(a){switch(arguments.length){case 1:return iH.h(arguments[0]);case 2:return iH.g(arguments[0],arguments[1]);case 3:return iH.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.iH.h=function(a){return function(b){var c=new $APP.TG;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: "+ | ||
$APP.iH.h=function(a){return function(b){var c=new $APP.TG;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.lg(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.lg(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.iH.g=function(a,b){return $APP.iH.j(a,a,b)};$APP.iH.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.iH.j(a,b,$APP.Nf.g(b,d))):null},null,null)};$APP.iH.m=3;$APP.YG.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.YG.prototype.$c=function(){return $APP.Za(this.f)}; | ||
$APP.YG.prototype.R=function(a,b,c){$APP.ic(b,"#object[cljs.core.Delay ");$APP.ti(new $APP.n(null,2,[$APP.sD,null==this.f?$APP.xw:$APP.fB,$APP.fv,this.value],null),b,c);return $APP.ic(b,"]")};$APP.CH=function CH(a){switch(arguments.length){case 1:return CH.h(arguments[0]);case 2:return CH.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.YG.prototype.R=function(a,b,c){$APP.ic(b,"#object[cljs.core.Delay ");$APP.ti(new $APP.n(null,2,[$APP.tD,null==this.f?$APP.yw:$APP.dB,$APP.fv,this.value],null),b,c);return $APP.ic(b,"]")};$APP.CH=function CH(a){switch(arguments.length){case 1:return CH.h(arguments[0]);case 2:return CH.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.CH.h=function(a){return cH(new $APP.n(null,3,[$APP.Cm,$APP.u($APP.NF),$APP.Dm,$APP.u($APP.MF),$APP.il,null],null),a)};$APP.CH.g=function(a,b){return cH($APP.Tm.j($APP.Qk.l($APP.F([new $APP.n(null,1,[$APP.Dm,$APP.u($APP.MF)],null),a])),$APP.Cm,function(c){return $APP.Qk.l($APP.F([$APP.u($APP.NF),c]))}),b)};$APP.CH.m=2;$APP.DH=new $APP.H(null,"port","port",1534937262);$APP.lH=new $APP.H(null,"reload","reload",863702807);$APP.EH=new $APP.H(null,"opts","opts",155075701); | ||
$APP.uH=new $APP.H(null,"output-dir","output-dir",-290956991);hH=new $APP.H(null,"require-macros","require-macros",707947416);$APP.FH=new $APP.H(null,"message","message",-406056002);$APP.qH=new $APP.H(null,"in-file","in-file",-1682176692);$APP.GH=new $APP.H(null,"id","id",-1388402092);mH=new $APP.w("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.eH=new $APP.H(null,"paths","paths",-1807389588);$APP.HH=new $APP.H(null,"eval","eval",-1103567905); | ||
$APP.jH=new $APP.H(null,"eval-form","eval-form",-1934118476);$APP.sH=new $APP.H(null,"out-file","out-file",-1187066405);rH=new $APP.H(null,"in-str","in-str",-1014658121);$APP.tH=new $APP.H(null,"extension","extension",1453374065);$APP.fH=new $APP.YG(function(){if($APP.r(esm_import$fs.existsSync("squint.edn"))){var a=esm_import$fs.readFileSync("squint.edn","utf-8");a=$APP.CH.h(a)}else a=null;return a},null);var IH;$APP.kH=$APP.Vi.h(null);IH=xH(oH);export const compileFile=xH($APP.vH);export const compileString=IH; |
@@ -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 J9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},K9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},L9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},M9=function(a){return console.debug($APP.Mp.g(" ",a))},Xga=function(a){return function(b,c){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.GH),e=$APP.fe.g(b,Wga);c=$APP.Rh.j(c,"id",d);c=$APP.r(e)?$APP.Rh.j(c,"session",e):c;return a.g?a.g(b,c):a.call(null,b,c)}},Zga=function(){var a= | ||
Yga;return function(b,c){b=$APP.Tm.j(b,N9,$APP.zi);return a.g?a.g(b,c):a.call(null,b,c)}},aha=function(){var a=$ga();return function(b,c){M9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},bha=function(a){return function(b,c){M9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},$ga=function(){var a=Zga();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},O9=function(a){return $APP.Rh.j($APP.bi(new $APP.J(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.mu.h(a.split("."))), | ||
"version-string",a)},cha=function(a,b,c){if($APP.r(a))if(a=P9.h?P9.h(a):P9.call(null,a),$APP.r(a)){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.r9),e=$APP.fe.g(b,$APP.j9),f=$APP.fe.g(b,$APP.t9);b=$APP.Qa;var k=$APP.li,l=$APP.S6;$APP.Qa=e;$APP.li=f;$APP.S6=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.S6=l,$APP.li=k,$APP.Qa=b}}else return M9($APP.F(["Pretty-Printing is only supported for cider.nrepl.pprint/pprint"])), | ||
$APP.Ri.l($APP.F([c]));else return $APP.Ri.l($APP.F([c]))},eha=function(a){a:{var b=$APP.lr;$APP.lr=$APP.u(Q9);try{var c=$APP.lu(a,new $APP.n(null,5,[$APP.Op,$APP.Rp,$APP.Er,dha,$APP.au,!0,$APP.vt,!0,$APP.Up,!0],null),null);break a}finally{$APP.lr=b}c=void 0}c=$APP.jf(c);a=$APP.fe.g(c,$APP.ku);c=$APP.fe.g(c,$APP.T);a=$APP.Zj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(Q9,c);return a},kha=function(a,b){var c=$APP.jf(a);$APP.fe.g(c,$APP.T);a=$APP.fe.g(c,fha);$APP.fe.g(c,$APP.$k);$APP.fe.g(c,gha); | ||
$APP.fe.g(c,hha);return Promise.resolve(a).then(eha).then(function(d){$APP.BH.l($APP.F(["About to eval:"]));$APP.BH.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(Q9)),"value",cha(iha.h(c),jha.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.FH.h($APP.pj(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.lr)],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(Q9)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},R9=function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.T);return null},Yga=function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,N9),d=$APP.fe.g(S9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.Mp.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)},lha=function(a){return function(b,c){return a.write(T9(c))}},mha=function(a,b){M9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=aha(),d=Xga(bha(lha(b))),e=$APP.Vi.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.nu,!0]),k=$APP.kg;;){var m=$APP.Gf.j(U9, | ||
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.gk(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)?M9($APP.F(["Connection lost"])): | ||
M9($APP.F(["Connection closed"]))})},hha=new $APP.H(null,"_line","_line",232847719),jha=new $APP.H("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),Wga=new $APP.H(null,"session","session",1008279103),nha=new $APP.H(null,"lookup","lookup",1225356838),oha=new $APP.H(null,"load-file","load-file",-424586670),gha=new $APP.H(null,"_load-file?","_load-file?",-1198848711),N9=new $APP.H(null,"op","op",-1882987955),pha=new $APP.H(null,"describe","describe",1369790582),fha=new $APP.H(null, | ||
"code","code",1586293142),qha=new $APP.H(null,"eldoc","eldoc",-1321421900),rha=new $APP.H(null,"log_level","log_level",-1756736313),iha=new $APP.H("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),sha=new $APP.H(null,"clone","clone",711747572),tha=new $APP.H(null,"close","close",1835149582),uha=new $APP.H(null,"info","info",-317069002),vha=new $APP.H(null,"host","host",-1558485167),wha=new $APP.H(null,"complete","complete",-500388775);var V9=function V9(a,b){switch($APP.t.h(L9(a,1))){case "i":return a=K9(a,1),b=J9(a,"e"),new $APP.J(null,2,5,$APP.N,[parseInt(L9(a,b)),K9(a,b+1)],null);case "l":var d=a=K9(a,1);for(a=$APP.mc($APP.kg);;){if($APP.A.g($APP.t.h(L9(d,1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(a),K9(d,1)],null);var e=V9.g?V9.g(d,b):V9.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=K9(a,1),f=$APP.jf(b),f=$APP.fe.g(f,$APP.nu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(L9(d, | ||
1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(e),K9(d,1)],null);a=V9.g?V9.g(d,b):V9.call(null,d,b);d=$APP.B.j(a,0,null);k=$APP.B.j(a,1,null);k=V9.g?V9.g(k,b):V9.call(null,k,b);a=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);d=$APP.r(f)?$APP.zi.h(d):d;a=$APP.Ug.j(e,d,a);d=k;e=a}default:return b=J9(a,":"),f=parseInt(L9(a,b)),a=K9(a,b+1),new $APP.J(null,2,5,$APP.N,[$APP.t.h(L9(a,f)),K9(a,f)],null)}},U9=function U9(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return U9.l(arguments[0], | ||
1<c.length?new $APP.Xc(c.slice(1),0,null):null)};U9.l=function(a,b){try{return V9(a,b)}catch(c){if(c instanceof Error)return new $APP.J(null,2,5,$APP.N,[null,a],null);throw c;}};U9.m=1;U9.o=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)}; | ||
var T9=function T9(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.Le(a);return $APP.r(c)?[c,"/"].join(""):null}(),$APP.ai(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.ui.g(T9,a))),"e"].join(""):$APP.Vd(a)?["d",$APP.t.h($APP.Gf.g($APP.t,$APP.ui.g(function(){return function(c){var d=$APP.B.j(c, | ||
0,null);c=$APP.B.j(c,1,null);return[$APP.t.h(T9.h?T9.h(d):T9.call(null,d)),$APP.t.h(T9.h?T9.h(c):T9.call(null,c))].join("")}}(a),$APP.zH.g($APP.y,a)))),"e"].join(""):null}};var Q9=$APP.Vi.h($APP.lr),P9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.A9],null);$APP.Vi.h(!1); | ||
var dha=$APP.Vi.h($APP.hf),S9=$APP.vh([nha,tha,oha,qha,sha,pha,uha,wha,$APP.HH],[R9,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.$k);return null},R9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.$G()),"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",O9("TODO"),"node",O9(process.version)],null),"aux",$APP.hf,"ops",$APP.bi($APP.ui.g($APP.ai,$APP.Mh(S9)),$APP.Gr.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)},R9,function(){return null},function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,$APP.T);$APP.AH.l($APP.F([$APP.T,c]));return kha($APP.Rh.j(a,$APP.T,$APP.u(Q9)),b)}]),xha=$APP.Vi.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.DH.h(a);return $APP.r(e)?e:0}(),c=function(){var e=vha.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:rha.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Tk.g(mha,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.BH.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.Mp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf(xha,d)})}; | ||
var I9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},J9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},K9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},L9=function(a){return console.debug($APP.Mp.g(" ",a))},Yga=function(a){return function(b,c){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.GH),e=$APP.fe.g(b,Xga);c=$APP.Rh.j(c,"id",d);c=$APP.r(e)?$APP.Rh.j(c,"session",e):c;return a.g?a.g(b,c):a.call(null,b,c)}},$ga=function(){var a= | ||
Zga;return function(b,c){b=$APP.Tm.j(b,M9,$APP.zi);return a.g?a.g(b,c):a.call(null,b,c)}},bha=function(){var a=aha();return function(b,c){L9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},cha=function(a){return function(b,c){L9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},aha=function(){var a=$ga();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},N9=function(a){return $APP.Rh.j($APP.bi(new $APP.J(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.mu.h(a.split("."))), | ||
"version-string",a)},dha=function(a,b,c){if($APP.r(a))if(a=O9.h?O9.h(a):O9.call(null,a),$APP.r(a)){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.q9),e=$APP.fe.g(b,$APP.i9),f=$APP.fe.g(b,$APP.s9);b=$APP.Qa;var k=$APP.li,l=$APP.R6;$APP.Qa=e;$APP.li=f;$APP.R6=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.R6=l,$APP.li=k,$APP.Qa=b}}else return L9($APP.F(["Pretty-Printing is only supported for cider.nrepl.pprint/pprint"])), | ||
$APP.Ri.l($APP.F([c]));else return $APP.Ri.l($APP.F([c]))},fha=function(a){a:{var b=$APP.lr;$APP.lr=$APP.u(P9);try{var c=$APP.lu(a,new $APP.n(null,5,[$APP.Op,$APP.Rp,$APP.Er,eha,$APP.au,!0,$APP.vt,!0,$APP.Up,!0],null),null);break a}finally{$APP.lr=b}c=void 0}c=$APP.jf(c);a=$APP.fe.g(c,$APP.ku);c=$APP.fe.g(c,$APP.T);a=$APP.Zj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(P9,c);return a},lha=function(a,b){var c=$APP.jf(a);$APP.fe.g(c,$APP.T);a=$APP.fe.g(c,gha);$APP.fe.g(c,$APP.$k);$APP.fe.g(c,hha); | ||
$APP.fe.g(c,iha);return Promise.resolve(a).then(fha).then(function(d){$APP.BH.l($APP.F(["About to eval:"]));$APP.BH.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(P9)),"value",dha(jha.h(c),kha.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.FH.h($APP.pj(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.lr)],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(P9)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},Q9=function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.T);return null},Zga=function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,M9),d=$APP.fe.g(R9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.Mp.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)},mha=function(a){return function(b,c){return a.write(S9(c))}},nha=function(a,b){L9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=bha(),d=Yga(cha(mha(b))),e=$APP.Vi.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.nu,!0]),k=$APP.kg;;){var m=$APP.Gf.j(T9, | ||
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.gk(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)?L9($APP.F(["Connection lost"])): | ||
L9($APP.F(["Connection closed"]))})},iha=new $APP.H(null,"_line","_line",232847719),kha=new $APP.H("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),Xga=new $APP.H(null,"session","session",1008279103),oha=new $APP.H(null,"lookup","lookup",1225356838),pha=new $APP.H(null,"load-file","load-file",-424586670),hha=new $APP.H(null,"_load-file?","_load-file?",-1198848711),M9=new $APP.H(null,"op","op",-1882987955),qha=new $APP.H(null,"describe","describe",1369790582),gha=new $APP.H(null, | ||
"code","code",1586293142),rha=new $APP.H(null,"eldoc","eldoc",-1321421900),sha=new $APP.H(null,"log_level","log_level",-1756736313),jha=new $APP.H("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),tha=new $APP.H(null,"clone","clone",711747572),uha=new $APP.H(null,"close","close",1835149582),vha=new $APP.H(null,"info","info",-317069002),wha=new $APP.H(null,"host","host",-1558485167),xha=new $APP.H(null,"complete","complete",-500388775);var U9=function U9(a,b){switch($APP.t.h(K9(a,1))){case "i":return a=J9(a,1),b=I9(a,"e"),new $APP.J(null,2,5,$APP.N,[parseInt(K9(a,b)),J9(a,b+1)],null);case "l":var d=a=J9(a,1);for(a=$APP.mc($APP.kg);;){if($APP.A.g($APP.t.h(K9(d,1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(a),J9(d,1)],null);var e=U9.g?U9.g(d,b):U9.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=J9(a,1),f=$APP.jf(b),f=$APP.fe.g(f,$APP.nu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(K9(d, | ||
1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(e),J9(d,1)],null);a=U9.g?U9.g(d,b):U9.call(null,d,b);d=$APP.B.j(a,0,null);k=$APP.B.j(a,1,null);k=U9.g?U9.g(k,b):U9.call(null,k,b);a=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);d=$APP.r(f)?$APP.zi.h(d):d;a=$APP.Ug.j(e,d,a);d=k;e=a}default:return b=I9(a,":"),f=parseInt(K9(a,b)),a=J9(a,b+1),new $APP.J(null,2,5,$APP.N,[$APP.t.h(K9(a,f)),J9(a,f)],null)}},T9=function T9(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return T9.l(arguments[0], | ||
1<c.length?new $APP.Xc(c.slice(1),0,null):null)};T9.l=function(a,b){try{return U9(a,b)}catch(c){if(c instanceof Error)return new $APP.J(null,2,5,$APP.N,[null,a],null);throw c;}};T9.m=1;T9.o=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)}; | ||
var S9=function S9(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.Le(a);return $APP.r(c)?[c,"/"].join(""):null}(),$APP.ai(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.ui.g(S9,a))),"e"].join(""):$APP.Vd(a)?["d",$APP.t.h($APP.Gf.g($APP.t,$APP.ui.g(function(){return function(c){var d=$APP.B.j(c, | ||
0,null);c=$APP.B.j(c,1,null);return[$APP.t.h(S9.h?S9.h(d):S9.call(null,d)),$APP.t.h(S9.h?S9.h(c):S9.call(null,c))].join("")}}(a),$APP.zH.g($APP.y,a)))),"e"].join(""):null}};var P9=$APP.Vi.h($APP.lr),O9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.z9],null);$APP.Vi.h(!1); | ||
var eha=$APP.Vi.h($APP.hf),R9=$APP.vh([oha,uha,pha,rha,tha,qha,vha,xha,$APP.HH],[Q9,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.$k);return null},Q9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.$G()),"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",N9("TODO"),"node",N9(process.version)],null),"aux",$APP.hf,"ops",$APP.bi($APP.ui.g($APP.ai,$APP.Mh(R9)),$APP.Gr.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)},Q9,function(){return null},function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,$APP.T);$APP.AH.l($APP.F([$APP.T,c]));return lha($APP.Rh.j(a,$APP.T,$APP.u(P9)),b)}]),yha=$APP.Vi.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.DH.h(a);return $APP.r(e)?e:0}(),c=function(){var e=wha.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:sha.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Tk.g(nha,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.BH.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.Mp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf(yha,d)})}; |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "0.7.96", | ||
"version": "0.7.97", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "core.js", |
@@ -332,2 +332,6 @@ ## Squint | ||
- `:extension`: the preferred extension to output, which defaults to `.mjs`, but can be set to `.jsx` for React(-like) projects. | ||
- `:copy-resources`: a set of keywords that represent file extensions of files | ||
that should be copied over from source paths. E.g. `:css`, `:json`. Strings | ||
may also be used which represent regexes which are processed through | ||
`re-find`. | ||
@@ -334,0 +338,0 @@ See [examples/vite-react](examples/vite-react) for an example project which uses a `squint.edn`. |
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
1380089
8274
426