squint-cljs
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -1,41 +0,40 @@ | ||
import { $APP, shadow$provide, $jscomp } from "./cljs_core.js"; | ||
import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
import "./compiler.node.js"; | ||
import "./compiler.js"; | ||
const shadow_esm_import = function(x) { return import(x) }; | ||
import*as esm_import$fs from"fs";import*as esm_import$readline from"readline";import*as esm_import$squint_cljs$core from"squint-cljs/core.js";import*as esm_import$process from"process";import*as esm_import$url from"url";import*as esm_import$path from"path"; | ||
var y9=function(a,b){return $APP.Le(a)&&$APP.Le(b)?$APP.tp.l($APP.J.g([a,b],0)):$APP.De(a)&&($APP.Je(a)||$APP.Ee(a))&&$APP.De(b)&&($APP.Je(b)||$APP.Ee(b))?$APP.Dj.g(a,b):b},z9=function(a,b){return $APP.uf.j(function(c,d){return $APP.up.l(y9,$APP.J.g([c,d],0))},a,b)},B9=function(a){throw $APP.wq.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.p(null,1,[A9,a],null));},C9=function(a){var b=JSON.parse(a);return $APP.We(b)?b:B9(a)},D9=function(a){var b=JSON.parse(a);return $APP.bf(b)?b:B9(a)}, | ||
E9=function(a){var b=JSON.parse(a);return $APP.gf(b)?b:B9(a)},F9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:B9(a)},G9=function(a){return"string"===typeof a?$APP.A.j(a,0,null):null},H9=function(a){return $APP.ge.g(":",G9(a))?$APP.ul.h($APP.jl.g(a,1)):$APP.ul.h(a)},I9=function(a){return $APP.De(a)?$APP.x(a):a},J9=function(a){if("string"===typeof a)try{var b=G9(a);if($APP.ge.g("true",a)||$APP.ge.g("false",a))var c=C9(a);else{if($APP.ge.g("nil",a))var d=null;else{if($APP.bb(isNaN(a)))var e= | ||
F9(a);else{var f=$APP.ge.g(":",b);var k=f?$APP.fl(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?H9(a):a}d=e}c=d}return c}catch(l){return a}else return a},M9=function(a,b,c,d){throw $APP.wq.j(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Qp.l($APP.J.g([a],0))].join(""),c instanceof $APP.D?" to ":" with ",$APP.t.h(c instanceof $APP.D?$APP.Sk(c):c)].join(""),new $APP.p(null,2,[K9,a,L9,c],null),d);},N9=function(a,b,c){var d=function(){switch(b instanceof $APP.D?b.wa: | ||
null){case "boolean":case "bool":return C9;case "int":case "long":return D9;case "double":return E9;case "number":return F9;case "symbol":return $APP.Fl;case "keyword":return H9;case "string":return $APP.Bf;case "edn":return $APP.pN;case "auto":return J9;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=M9(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?M9(a,c,b,null):d},O9=function(a,b,c){a=$APP.hf.g(a,b);c=$APP.r(a)?a:$APP.De(c)?$APP.re(c):null;return $APP.r(c)? | ||
$APP.De(c)?$APP.Co.g($APP.Cg,c):c:null},P9=function(a,b,c,d){return $APP.Hk.g(b,c)?(c=$APP.nf(a,b),$APP.r(c)?($APP.A.j(c,0,null),c=$APP.A.j(c,1,null),$APP.Ik.j(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.Ik.j(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},Q9=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.De(d):d)?N9(e,d,f):J9(e);return $APP.r(c)?$APP.Wo.B(a,b,c,d):$APP.Ik.j(a,b,d)},V9=function(a){return $APP.uf.j(function(b,c){var d=$APP.A.j(c,0,null);c=$APP.A.j(c,1,null); | ||
var e=$APP.sh(c),f=$APP.hf.g(e,R9),k=$APP.hf.g(e,S9);c=$APP.hf.g(e,$APP.Et);var l=$APP.hf.g(e,$APP.rF);e=$APP.hf.g(e,T9);b=$APP.r(f)?$APP.Wo.G(b,R9,$APP.Ik,d,f):b;b=$APP.r(k)?$APP.Wo.j(b,S9,function(m){if($APP.kf(m,k))throw $APP.wq.g(["Conflicting alias ",$APP.t.h(k)," between ",$APP.t.h($APP.hf.g(m,k))," and ",$APP.t.h(d)].join(""),new $APP.p(null,1,[S9,k],null));return $APP.Ik.j(m,k,d)}):b;b=$APP.r(l)?$APP.Wo.j(b,$APP.rF,$APP.Co.g(function(m){return $APP.Cg.g(m,d)},$APP.Mk)):b;b=$APP.r(e)?$APP.Wo.G(b, | ||
T9,$APP.Ik,d,e):b;return $APP.r(c)?$APP.Wo.G(b,U9,$APP.Ik,d,c):b},$APP.rh,a)},Z9=function(a,b){b=$APP.sh(b);var c=$APP.hf.g(b,W9);b=$APP.cl(function(d){var e=$APP.r(c)?null:$APP.or(d,":");return!($APP.r(e)?e:$APP.or(d,"-"))},a);a=$APP.A.j(b,0,null);b=$APP.A.j(b,1,null);return new $APP.p(null,2,[X9,a,Y9,b],null)},a$=function(a,b){if($APP.r(b))if($APP.w(a)){var c=$APP.fe(a),d=$APP.gh(c,b);c=c<d?c:d;a=new $APP.F(null,2,5,$APP.G,[$APP.N.g($APP.Oo.g(b,a),$APP.hi.g(c,a)),$APP.hi.g(c,b)],null)}else a=new $APP.F(null, | ||
2,5,$APP.G,[a,b],null);else a=new $APP.F(null,2,5,$APP.G,[a,b],null);b=a;a=$APP.A.j(b,0,null);b=$APP.A.j(b,1,null);return new $APP.p(null,2,[Y9,a,$9,b],null)},j$=function(a,b,c,d,e){var f=G9(a),k="string"===typeof a?$APP.A.j(a,1,null):null,l;if(l=$APP.ge.g(f,"-")){try{var m=F9($APP.t.h(k))}catch(h){m=null}l=$APP.bb(m)}b=$APP.r(b)?b:l?b$:null;f=$APP.ge.g(":",f);c=$APP.Hk.g(b$,b)&&f&&($APP.ge.g(c$,d)||$APP.bb(c)||$APP.ge.g(e,c));d=$APP.r(b)?b:c?d$:null;a=l?$APP.r(k)?$APP.Hk.g("-",k)&&2<$APP.fe(a):k: | ||
null;return new $APP.p(null,5,[e$,d,f$,l,g$,a,h$,c,i$,f],null)},x$=function(a,b){function c(ib){ib=$APP.tp.l($APP.J.g([new $APP.p(null,2,[k$,d,$APP.is,l$],null),ib],0));return O.h?O.h(ib):O.call(null,ib)}var d=k$.h(b),e=$APP.r(d)?z9(b,$APP.J.g([V9(d)],0)):b,f=R9.h(e),k=function(){var ib=S9.h(e);return $APP.r(ib)?ib:$APP.yJ.h(e)}(),l=m$.h(e),m=$APP.rF.h(e),h=U9.h(e),q=W9.h(e),n=function(){var ib=n$.h(e);return $APP.r(ib)?ib:o$.h(e)}(),v=$APP.Qk($APP.N.l($APP.Dk($APP.Le(d)?d:$APP.Dj.g($APP.rh,d)),$APP.Fk(k), | ||
$APP.J.g([$APP.Dk(f)],0))),C=$APP.ge.g(!0,n)?v:null==n?null:$APP.Qk(n),H=T9.h(e),O=function(){var ib=p$.h(e);return $APP.r(ib)?ib:function(Ib){Ib=$APP.sh(Ib);var nc=$APP.hf.g(Ib,q$);throw $APP.wq.g(nc,Ib);}}(),P=Z9(a,null),V=$APP.sh(P),ca=$APP.hf.g(V,X9),da=$APP.hf.g(V,Y9),ja=function(){var ib=$9.h(e);ib=$APP.r(ib)?ib:r$.h(e);return $APP.r(ib)?a$(ca,ib):new $APP.p(null,2,[$9,null,Y9,da],null)}(),oa=$APP.sh(ja),ba=$APP.hf.g(oa,Y9),E=$APP.hf.g(oa,$9),z=$APP.Hk.g(ba,da)?new $APP.F(null,2,5,$APP.G,[null, | ||
$APP.N.g(ba,da)],null):new $APP.F(null,2,5,$APP.G,[ca,da],null),aa=$APP.A.j(z,0,null),I=$APP.A.j(z,1,null),K=function(){for(var ib=$APP.rh,Ib=null,nc=null,Yd=$APP.r(q)?b$:null,Kc=$APP.w(I),Hf=E;;){if($APP.bb(Kc))return new $APP.F(null,3,5,$APP.G,[ib,Ib,nc],null);var lf=$APP.x(Kc),sc=lf instanceof $APP.D;if(sc){Ib=P9(ib,Ib,nc,null);var Cd=lf;Kc=$APP.y(Kc);ib=Ib;Ib=Cd}else{var pk=!0===lf,Te=$APP.t.h(lf);Cd=O9(l,Ib,$APP.hf.g(f,Ib));var yh=$APP.hf.g(f,Ib),qk=j$(Te,Yd,Ib,yh,nc),Ng=$APP.sh(qk),rk=$APP.hf.g(Ng, | ||
f$),Og=$APP.hf.g(Ng,g$),sk=$APP.hf.g(Ng,h$),Ue=$APP.hf.g(Ng,e$),jj=$APP.hf.g(Ng,i$);if($APP.r(function(){var $d=rk;return $APP.r($d)?$d:sk}())){var xc=$APP.or(Te,"--"),kj=xc&&$APP.ge.g("--",Te);if(kj){var tk=$APP.y(Kc);return new $APP.F(null,3,5,$APP.G,[function(){var $d=ib;return tk?$APP.xo.B($d,$APP.Uo,new $APP.F(null,2,5,$APP.G,[l$,Y9],null),$APP.wf(tk)):$d}(),Ib,nc],null)}var lj=xc?$APP.jl.g(Te,2):$APP.Dr(Te,/^(:|-|)/,""),He=xc?$APP.Xw.g(lj,/=/):new $APP.F(null,1,5,$APP.G,[lj],null),kd=$APP.A.j(He, | ||
0,null),Rd=$APP.A.j(He,1,null),Eb=$APP.ul.h(kd),jc=$APP.hf.j(k,Eb,Eb);if($APP.r(Rd))nc=P9(ib,Ib,nc,Cd),Ib=jc,Yd=Ue,Kc=$APP.Fg(Rd,$APP.Dd(Kc)),ib=nc,nc=null;else{var lb=$APP.y(Kc),Zd=$APP.x(lb),ot=j$(Zd,Ue,Ib,yh,nc);if($APP.r(function(){var $d=f$.h(ot);return $APP.r($d)?$d:$APP.Ce(lb)}()))if($APP.r(Og)){var pt=$APP.Sk(jc);nc=$APP.ti.l(function(){return function($d){return new $APP.F(null,2,5,$APP.G,[["-",$APP.t.h($d)].join(""),!0],null)}}(ib,Ib,nc,Yd,Kc,Hf,pt,lb,Zd,ot,lj,He,kd,Rd,Eb,jc,xc,kj,pk,Te, | ||
Cd,yh,qk,Ng,rk,Og,sk,Ue,jj,lf,sc,d,e,f,k,l,m,h,q,n,v,C,H,O,c,P,V,ca,da,ja,oa,ba,E,z,aa,I),$APP.J.g([pt],0));Kc=$APP.N.g(nc,lb);Yd=Ue;nc=Ib=null}else Kc=$APP.kf(v,jc)?null:$APP.JG($APP.t.h(jc),":no-"),Yd=$APP.r(Kc)?$APP.ul.h($APP.Dr($APP.t.h(jc),":no-","")):jc,Kc=$APP.Fg($APP.bb(Kc),lb),Ib=P9(ib,Ib,nc,Cd),Cd=Yd,Yd=Ue,ib=Ib,Ib=Cd;else Ib=P9(ib,Ib,nc,Cd),Cd=jc,Yd=Ue,Kc=lb,ib=Ib,Ib=Cd}}else if(kj=$APP.ge.g(c$,yh)&&$APP.Hk.g(Te,"true")&&$APP.Hk.g(Te,"false")||$APP.ge.g(nc,Ib)&&$APP.bb(Cd))if(Hf=$APP.r(Kc)? | ||
$APP.r(Hf)?a$(Kc,Hf):new $APP.p(null,1,[Y9,Kc],null):new $APP.p(null,1,[Y9,Kc],null),Yd=$APP.sh(Hf),Hf=$APP.hf.g(Yd,Y9),Yd=$APP.hf.g(Yd,$9),$APP.Hk.g(Kc,Hf))Cd=Yd,Yd=Ue,Kc=Hf,Hf=Cd;else return new $APP.F(null,3,5,$APP.G,[$APP.xo.B(ib,$APP.Uo,new $APP.F(null,2,5,$APP.G,[l$,Y9],null),$APP.wf(Kc)),Ib,nc],null);else{try{var sd=Q9(ib,Ib,Cd,I9(yh),Te,pk)}catch($d){c(new $APP.p(null,4,[s$,R9,q$,$APP.Em($d),t$,Ib,u$,Te],null)),sd=ib}nc=$APP.r(function(){var $d=$APP.ge.g(d$,Ue);return $d?jj:$d}())?null:Ib; | ||
Cd=$APP.r(function(){var $d=$APP.ge.g(d$,Ue);return $d?jj:$d}())?null:Ib;Yd=Ue;Kc=$APP.y(Kc);ib=sd;Ib=nc;nc=Cd}}}}(),ea=$APP.A.j(K,0,null),ia=$APP.A.j(K,1,null),ha=$APP.A.j(K,2,null),pa=O9(l,ia,$APP.hf.g(f,ia)),ra=function(){var ib=P9(ea,ia,ha,pa);return $APP.w(aa)?$APP.xo.B(ib,$APP.Vo,new $APP.F(null,2,5,$APP.G,[l$,Y9],null),function(Ib){return $APP.Dj.g($APP.wf(aa),Ib)}):ib}(),ua=$APP.r(h)?$APP.ye($APP.tp.l($APP.J.g([h,ra],0)),$APP.ze(ra)):ra;if($APP.r(C)){a=$APP.w($APP.Dk(ua));b=null;for(var va= | ||
0,xa=0;;)if(xa<va){var Ca=b.T(null,xa);$APP.kf(C,Ca)||c(new $APP.p(null,4,[s$,n$,q$,["Unknown option: ",$APP.t.h(Ca)].join(""),n$,C,t$,Ca],null));xa+=1}else if(a=$APP.w(a))b=a,$APP.Oe(b)?(a=$APP.Wc(b),xa=$APP.Xc(b),b=a,va=$APP.fe(a),a=xa):(a=$APP.x(b),$APP.kf(C,a)||c(new $APP.p(null,4,[s$,n$,q$,["Unknown option: ",$APP.t.h(a)].join(""),n$,C,t$,a],null)),a=$APP.y(b),b=null,va=0),xa=0;else break}if($APP.r(m))for(a=$APP.w(m),b=null,xa=va=0;;)if(xa<va)Ca=b.T(null,xa),$APP.r($APP.nf(ua,Ca))||c(new $APP.p(null, | ||
4,[s$,$APP.rF,q$,["Required option: ",$APP.t.h(Ca)].join(""),$APP.rF,m,t$,Ca],null)),xa+=1;else if(a=$APP.w(a))b=a,$APP.Oe(b)?(a=$APP.Wc(b),xa=$APP.Xc(b),b=a,va=$APP.fe(a),a=xa):(a=$APP.x(b),$APP.r($APP.nf(ua,a))||c(new $APP.p(null,4,[s$,$APP.rF,q$,["Required option: ",$APP.t.h(a)].join(""),$APP.rF,m,t$,a],null)),a=$APP.y(b),b=null,va=0),xa=0;else break;if($APP.r(H))for(var ya=$APP.w(H),wa=null,Ka=0,Pa=0;;)if(Pa<Ka){var Wa=wa.T(null,Pa),hb=$APP.A.j(Wa,0,null),nb=$APP.A.j(Wa,1,null),Hb=function(){var ib= | ||
(ib=$APP.Le(nb))?v$.h(nb):ib;return $APP.r(ib)?ib:nb}(),Wb=$APP.nf(ua,hb);if($APP.r(Wb)){var Cc=Wb,Cb=$APP.A.j(Cc,0,null),se=$APP.A.j(Cc,1,null);if(!$APP.r(Hb.h?Hb.h(se):Hb.call(null,se))){var fj=function(){var ib=w$.h(nb);return $APP.r(ib)?ib:function(){return function(Ib){var nc=$APP.sh(Ib);Ib=$APP.hf.g(nc,t$);nc=$APP.hf.g(nc,u$);return["Invalid value for option ",$APP.t.h(Ib),": ",$APP.t.h(nc)].join("")}}(ya,wa,Ka,Pa,ib,Cc,Cb,se,Wb,Hb,Wa,hb,nb,d,e,f,k,l,m,h,q,n,v,C,H,O,c,P,V,ca,da,ja,oa,ba,E,z, | ||
aa,I,K,ea,ia,ha,pa,ra,ua)}();c(new $APP.p(null,5,[s$,T9,q$,function(){var ib=new $APP.p(null,2,[t$,hb,u$,se],null);return fj.h?fj.h(ib):fj.call(null,ib)}(),T9,H,t$,hb,u$,se],null))}}Pa+=1}else{var mk=$APP.w(ya);if(mk){var wh=mk;if($APP.Oe(wh))va=$APP.Wc(wh),a=$APP.Xc(wh),b=va,va=$APP.fe(va),ya=a,wa=b,Ka=va;else{var gj=$APP.x(wh),hj=$APP.A.j(gj,0,null),ni=$APP.A.j(gj,1,null),ij=function(){var ib=(ib=$APP.Le(ni))?v$.h(ni):ib;return $APP.r(ib)?ib:ni}(),nk=$APP.nf(ua,hj);if($APP.r(nk)){var mc=nk,oi=$APP.A.j(mc, | ||
0,null),xh=$APP.A.j(mc,1,null);if(!$APP.r(ij.h?ij.h(xh):ij.call(null,xh))){var ok=function(){var ib=w$.h(ni);return $APP.r(ib)?ib:function(){return function(Ib){var nc=$APP.sh(Ib);Ib=$APP.hf.g(nc,t$);nc=$APP.hf.g(nc,u$);return["Invalid value for option ",$APP.t.h(Ib),": ",$APP.t.h(nc)].join("")}}(ya,wa,Ka,Pa,ib,mc,oi,xh,nk,ij,gj,hj,ni,wh,mk,d,e,f,k,l,m,h,q,n,v,C,H,O,c,P,V,ca,da,ja,oa,ba,E,z,aa,I,K,ea,ia,ha,pa,ra,ua)}();c(new $APP.p(null,5,[s$,T9,q$,function(){var ib=new $APP.p(null,2,[t$,hj,u$,xh], | ||
null);return ok.h?ok.h(ib):ok.call(null,ib)}(),T9,H,t$,hj,u$,xh],null))}}ya=$APP.y(wh);wa=null;Ka=0}Pa=0}else break}return ua},y$=function(a,b){a=x$(a,b);b=l$.h($APP.ze(a));return $APP.Ik.j(b,$APP.MJ,$APP.On.g(a,l$))},z$=function(a,b){var c=$APP.pi($APP.fe(a),b);b=$APP.A.j(c,0,null);c=$APP.A.j(c,1,null);return $APP.ge.g(b,a)?c:null},D$=function(a,b){$APP.bi(A$,!1);a.setPrompt([$APP.t.h($APP.$y),"\x3d\x3e "].join(""));a.prompt();return $APP.QG($APP.dc(B$))?null:C$.g?C$.g(b,a):C$.call(null,b,a)},E$= | ||
function(a){var b=$APP.Tr(a);a=$APP.Ur(a);var c=$APP.PG($APP.dc(B$));b=$APP.hi.g(b-1,c);c=$APP.w(b);b=$APP.x(c);c=$APP.y(c);a=$APP.r(b)?$APP.jl.g(b,a):null;$APP.bi(B$,$APP.gw.g("\n",$APP.Fg(a,c)))},F$=function(a){var b=[".repl/",$APP.t.h($APP.aq.v()),".mjs"].join("");$APP.r(esm_import$fs.existsSync(".repl"))||esm_import$fs.mkdirSync(".repl");esm_import$fs.writeFileSync(b,a);return shadow_esm_import($APP.t.h(esm_import$url.pathToFileURL(esm_import$path.resolve(esm_import$process.cwd(),b)))).finally(function(){return esm_import$fs.unlinkSync(b)})}, | ||
H$=function(a,b,c){var d=function(){var f=$APP.$y;$APP.$y=$APP.dc(G$);try{return $APP.mz($APP.Qp.l($APP.J.g([a],0)),null)}finally{$APP.$y=f}}(),e=$APP.sh(d);d=$APP.hf.g(e,$APP.lz);e=$APP.hf.g(e,$APP.R);$APP.bi(G$,e);return F$(d).then(function(){esm_import$squint_cljs$core.println(globalThis._repl);return D$(b,c)}).catch(function(f){esm_import$squint_cljs$core.println(f);return D$(b,c)})},C$=function(a,b){if($APP.r(function(){var e=$APP.dc(A$);return $APP.r(e)?e:$APP.QG($APP.dc(B$))}()))return null; | ||
$APP.bi(A$,!0);var c=$APP.Wv($APP.dc(B$)),d=function(){try{return $APP.Yv(c,$APP.Vv($APP.rh))}catch(f){var e=f;if(-1!=$APP.Em(e).indexOf("EOF while reading"))return I$;E$(c);$APP.Xp.l($APP.J.g([$APP.t.h(e)],0));return J$}}();if($APP.ge.g(J$,d))return D$(b,a);if($APP.ge.g(I$,d))return $APP.bi(A$,!1);E$(c);return $APP.ge.g($APP.Xv,d)?$APP.bi(A$,!1):H$(d,b,a)},K$=function(a){a.on("line",function(b){$APP.$l.B(B$,$APP.t,b,"\n");return C$(null,a)})},M$=function(a,b){var c=$APP.hN.h(a);if($APP.r(c)&&"string"!== | ||
typeof c)throw Error("output-dir must be a string");return $APP.r(L$.h(a))?($APP.Vp.l($APP.J.g(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"],0)),$APP.Vp(),$APP.Vp.l($APP.J.g(["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"],0))):$APP.uf.j(function(d,e){return Promise.resolve(d).then(function(){$APP.Vp.l($APP.J.g(["[squint] Compiling CLJS file:",e],0));return $APP.iN($APP.Ik.j(a, | ||
$APP.dN,e))}).then(function(f){f=$APP.sh(f);f=$APP.hf.g(f,$APP.fN);$APP.Vp.l($APP.J.g(["[squint] Wrote JS file:",f],0));return f})},null,b)},h$=new $APP.D(null,"kwd-opt","kwd-opt",1313309243),b$=new $APP.D(null,"hyphens","hyphens",2113533609),k$=new $APP.D(null,"spec","spec",347520401),R9=new $APP.D(null,"coerce","coerce",1917884504),n$=new $APP.D(null,"restrict","restrict",-1071101511),d$=new $APP.D(null,"keywords","keywords",1526959054),e$=new $APP.D(null,"mode","mode",654403691),J$=new $APP.D("squint.repl.node", | ||
"continue","squint.repl.node/continue",1558138730),q$=new $APP.D(null,"msg","msg",-1386103444),N$=new $APP.D(null,"show","show",-576705889),c$=new $APP.D(null,"boolean","boolean",-1919418404),K9=new $APP.D(null,"input","input",556931961),O$=new $APP.D(null,"rest-cmds","rest-cmds",-423198324),l$=new $APP.D("org.babashka","cli","org.babashka/cli",1162430315),$9=new $APP.D(null,"args-\x3eopts","args-\x3eopts",964391046),S9=new $APP.D(null,"alias","alias",-2039751630),m$=new $APP.D(null,"collect","collect", | ||
-284321549),P$=new $APP.D(null,"no-run","no-run",-1534313596),T9=new $APP.D(null,"validate","validate",-201300827),g$=new $APP.D(null,"composite-opt","composite-opt",-2021292928),f$=new $APP.D(null,"hyphen-opt","hyphen-opt",1836909464),L$=new $APP.D(null,"help","help",-439233446),s$=new $APP.D(null,"cause","cause",231901252),i$=new $APP.D(null,"fst-colon","fst-colon",1618567071),L9=new $APP.D(null,"coerce-fn","coerce-fn",-821146515),Y9=new $APP.D(null,"args","args",1315556576),W9=new $APP.D(null, | ||
"no-keyword-opts","no-keyword-opts",761286018),u$=new $APP.D(null,"value","value",305978217),v$=new $APP.D(null,"pred","pred",1927423397),o$=new $APP.D(null,"closed","closed",-919675359),I$=new $APP.D("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),p$=new $APP.D(null,"error-fn","error-fn",-171437615),t$=new $APP.D(null,"option","option",65132272),U9=new $APP.D(null,"exec-args","exec-args",-1860766354),w$=new $APP.D(null,"ex-msg","ex-msg",-1111774387),A9=new $APP.D(null, | ||
"s","s",1705939918),r$=new $APP.D(null,"cmds-opts","cmds-opts",-390130362),Q$=new $APP.D(null,"h","h",1109658740),R$=new $APP.D(null,"e","e",1381269198),X9=new $APP.D(null,"cmds","cmds",-1841503952);var B$=$APP.Zl.h(""),A$=$APP.Zl.h(!1),S$,T$=process.stdout.isTTY;S$=$APP.r(T$)?process.stdin.setRawMode:T$;process.binding("contextify");var G$=$APP.Zl.h($APP.$y),U$=function U$(a){switch(arguments.length){case 0:return U$.v();case 1:return U$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};U$.v=function(){return U$.h(null)}; | ||
U$.h=function(){$APP.$y=$APP.YA;$APP.Hw=$APP.jw=!0;$APP.r(S$)&&process.stdin.setRawMode(!0);return F$("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});K$(b);b.setPrompt([$APP.t.h($APP.$y),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};U$.m=1;var V$=new $APP.F(null,4,5,$APP.G,[new $APP.p(null,3,[X9,new $APP.F(null,1,5,$APP.G,["run"],null),$APP.qv,function(a){a=$APP.sh(a);a=$APP.hf.g(a,$APP.MJ);var b=$APP.sh(a),c=$APP.hf.g(b,$APP.ls);b=$APP.hf.g(b,L$);if($APP.r(b))return null;$APP.Vp.l($APP.J.g(["[squint] Running",c],0));return $APP.iN($APP.Ik.j(a,$APP.dN,c)).then(function(d){d=$APP.sh(d);d=$APP.hf.g(d,$APP.fN);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},r$, | ||
new $APP.F(null,1,5,$APP.G,[$APP.ls],null)],null),new $APP.p(null,3,[X9,new $APP.F(null,1,5,$APP.G,["compile"],null),R9,new $APP.p(null,3,[$APP.Vy,c$,$APP.Wy,c$,$APP.hN,$APP.jt],null),$APP.qv,function(a){var b=$APP.sh(a);a=$APP.hf.g(b,O$);b=$APP.hf.g(b,$APP.MJ);return M$(b,a)}],null),new $APP.p(null,2,[X9,new $APP.F(null,1,5,$APP.G,["repl"],null),$APP.qv,U$],null),new $APP.p(null,2,[X9,$APP.yi,$APP.qv,function(a){a=$APP.sh(a);var b=$APP.hf.g(a,O$),c=$APP.hf.g(a,$APP.MJ);a=R$.h(c);if($APP.r(a)){if($APP.r(L$.h(c)))return $APP.Vp.l($APP.J.g(["Usage: squint -e \x3cexpr\x3e \x3copts\x3e\n\nOptions:\n\n--no-run: do not run compiled expression\n--show: print compiled expression"], | ||
0));a=$APP.IG.h(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(N$.h(c))&&$APP.Vp.l($APP.J.g([a],0));if($APP.r(P$.h(c)))return null;a=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return shadow_esm_import(a).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=L$.h(c);return $APP.r(f)?f:$APP.ge.g("help",$APP.x(b))||$APP.Ce(b)}())? | ||
$APP.Vp.l($APP.J.g(["Squint v0.0.0\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\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."],0)):M$(c,b)}],null)],null);(function(){var a=new $APP.p(null,1,[$APP.yJ,new $APP.p(null,1,[Q$,L$],null)],null),b=Z9(process.argv.slice(2),a),c=$APP.sh(b),d=$APP.hf.g(c,X9),e=$APP.hf.g(c,Y9);return $APP.uf.j(function(f,k){f=$APP.sh(k);var l=$APP.hf.g(f,X9),m=$APP.hf.g(f,$APP.qv),h=z$(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.w(h);return null==v?null:$APP.wf(v)}();k=$APP.N.g(k,e);f=y$(k,z9(a,$APP.J.g([f],0)));k=$APP.sh(f);var q=$APP.hf.g(k,$APP.MJ);f=$APP.hf.g(k,Y9);k=$APP.hf.g(k,X9);var n=$APP.N.g(k,f);return $APP.Qd(function(){var v= | ||
$APP.Ik.l(c,Y9,n,$APP.J.g([O$,n,$APP.MJ,q,$APP.Qv,l],0));return m.h?m.h(v):m.call(null,v)}())}return null},null,V$)})(); | ||
var I7=function(a,b){return $APP.Zd(a)&&$APP.Zd(b)?$APP.Ik.j($APP.B([a,b])):$APP.Td(a)&&($APP.Yd(a)||$APP.Xd(a))&&$APP.Td(b)&&($APP.Yd(b)||$APP.Xd(b))?$APP.Qg.g(a,b):b},J7=function(a,b){return $APP.re.l(function(c,d){return $APP.VK.j(I7,$APP.B([c,d]))},a,b)},L7=function(a){throw $APP.Wk.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.p(null,1,[K7,a],null));},M7=function(a){var b=JSON.parse(a);return $APP.de(b)?b:L7(a)},N7=function(a){var b=JSON.parse(a);return $APP.oC(b)?b:L7(a)},O7=function(a){var b= | ||
JSON.parse(a);return $APP.qC(b)?b:L7(a)},P7=function(a){var b=JSON.parse(a);return"number"===typeof b?b:L7(a)},Q7=function(a){return"string"===typeof a?$APP.A.l(a,0,null):null},R7=function(a){return $APP.yd.g(":",Q7(a))?$APP.ui.h($APP.ii.g(a,1)):$APP.ui.h(a)},S7=function(a){return $APP.Td(a)?$APP.x(a):a},T7=function(a){if("string"===typeof a)try{var b=Q7(a);if($APP.yd.g("true",a)||$APP.yd.g("false",a))var c=M7(a);else{if($APP.yd.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e=P7(a);else{var f= | ||
$APP.yd.g(":",b);var k=f?$APP.gi(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?R7(a):a}d=e}c=d}return c}catch(l){return a}else return a},W7=function(a,b,c,d){throw $APP.Wk.l(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Ir.j($APP.B([a]))].join(""),c instanceof $APP.F?" to ":" with ",$APP.t.h(c instanceof $APP.F?$APP.$h(c):c)].join(""),new $APP.p(null,2,[U7,a,V7,c],null),d);},X7=function(a,b,c){var d=function(){switch(b instanceof $APP.F?b.wa:null){case "boolean":case "bool":return M7; | ||
case "int":case "long":return N7;case "double":return O7;case "number":return P7;case "symbol":return $APP.Di;case "keyword":return R7;case "string":return $APP.ve;case "edn":return $APP.zL;case "auto":return T7;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=W7(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?W7(a,c,b,null):d},Y7=function(a,b,c){a=$APP.ie.g(a,b);c=$APP.r(a)?a:$APP.Td(c)?$APP.Id(c):null;return $APP.r(c)?$APP.Td(c)?$APP.Dp.g($APP.Ie, | ||
c):c:null},Z7=function(a,b,c,d){return $APP.yo.g(b,c)?(c=$APP.kD(a,b),$APP.r(c)?($APP.A.l(c,0,null),c=$APP.A.l(c,1,null),$APP.yi.l(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.yi.l(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},$7=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Td(d):d)?X7(e,d,f):T7(e);return $APP.r(c)?$APP.Dm.B(a,b,c,d):$APP.yi.l(a,b,d)},e8=function(a){return $APP.re.l(function(b,c){var d=$APP.A.l(c,0,null);c=$APP.A.l(c,1,null);var e=$APP.nf(c),f=$APP.ie.g(e, | ||
a8),k=$APP.ie.g(e,b8);c=$APP.ie.g(e,$APP.nm);var l=$APP.ie.g(e,$APP.uA);e=$APP.ie.g(e,c8);b=$APP.r(f)?$APP.Dm.G(b,a8,$APP.yi,d,f):b;b=$APP.r(k)?$APP.Dm.l(b,b8,function(m){if($APP.ke(m,k))throw $APP.Wk.g(["Conflicting alias ",$APP.t.h(k)," between ",$APP.t.h($APP.ie.g(m,k))," and ",$APP.t.h(d)].join(""),new $APP.p(null,1,[b8,k],null));return $APP.yi.l(m,k,d)}):b;b=$APP.r(l)?$APP.Dm.l(b,$APP.uA,$APP.Dp.g(function(m){return $APP.Ie.g(m,d)},$APP.Sh)):b;b=$APP.r(e)?$APP.Dm.G(b,c8,$APP.yi,d,e):b;return $APP.r(c)? | ||
$APP.Dm.G(b,d8,$APP.yi,d,c):b},$APP.mf,a)},i8=function(a,b){b=$APP.nf(b);var c=$APP.ie.g(b,f8);b=$APP.lD(function(d){var e=$APP.r(c)?null:$APP.sa(d,":");return!($APP.r(e)?e:$APP.sa(d,"-"))},a);a=$APP.A.l(b,0,null);b=$APP.A.l(b,1,null);return new $APP.p(null,2,[g8,a,h8,b],null)},k8=function(a,b){if($APP.r(b))if($APP.w(a)){var c=$APP.xd(a),d=$APP.cf(c,b);c=c<d?c:d;a=new $APP.G(null,2,5,$APP.J,[$APP.N.g($APP.aq.g(b,a),$APP.lq.g(c,a)),$APP.lq.g(c,b)],null)}else a=new $APP.G(null,2,5,$APP.J,[a,b],null); | ||
else a=new $APP.G(null,2,5,$APP.J,[a,b],null);b=a;a=$APP.A.l(b,0,null);b=$APP.A.l(b,1,null);return new $APP.p(null,2,[h8,a,j8,b],null)},t8=function(a,b,c,d,e){var f=Q7(a),k="string"===typeof a?$APP.A.l(a,1,null):null,l;if(l=$APP.yd.g(f,"-")){try{var m=P7($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?l8:null;f=$APP.yd.g(":",f);c=$APP.yo.g(l8,b)&&f&&($APP.yd.g(m8,d)||$APP.Za(c)||$APP.yd.g(e,c));d=$APP.r(b)?b:c?n8:null;a=l?$APP.r(k)?$APP.yo.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.p(null, | ||
5,[o8,d,p8,l,q8,a,r8,c,s8,f],null)},H8=function(a,b){function c(ib){ib=$APP.Ik.j($APP.B([new $APP.p(null,2,[u8,d,$APP.Qk,v8],null),ib]));return O.h?O.h(ib):O.call(null,ib)}var d=u8.h(b),e=$APP.r(d)?J7(b,$APP.B([e8(d)])):b,f=a8.h(e),k=function(){var ib=b8.h(e);return $APP.r(ib)?ib:$APP.CG.h(e)}(),l=w8.h(e),m=$APP.uA.h(e),h=d8.h(e),q=f8.h(e),n=function(){var ib=x8.h(e);return $APP.r(ib)?ib:y8.h(e)}(),v=$APP.Yh($APP.N.j($APP.Nh($APP.Zd(d)?d:$APP.Qg.g($APP.mf,d)),$APP.Ph(k),$APP.B([$APP.Nh(f)]))),C=$APP.yd.g(!0, | ||
n)?v:null==n?null:$APP.Yh(n),H=c8.h(e),O=function(){var ib=z8.h(e);return $APP.r(ib)?ib:function(Hb){Hb=$APP.nf(Hb);var lc=$APP.ie.g(Hb,A8);throw $APP.Wk.g(lc,Hb);}}(),P=i8(a,null),V=$APP.nf(P),ba=$APP.ie.g(V,g8),da=$APP.ie.g(V,h8),ja=function(){var ib=j8.h(e);ib=$APP.r(ib)?ib:B8.h(e);return $APP.r(ib)?k8(ba,ib):new $APP.p(null,2,[j8,null,h8,da],null)}(),oa=$APP.nf(ja),ca=$APP.ie.g(oa,h8),E=$APP.ie.g(oa,j8),z=$APP.yo.g(ca,da)?new $APP.G(null,2,5,$APP.J,[null,$APP.N.g(ca,da)],null):new $APP.G(null, | ||
2,5,$APP.J,[ba,da],null),aa=$APP.A.l(z,0,null),I=$APP.A.l(z,1,null),K=function(){for(var ib=$APP.mf,Hb=null,lc=null,Ud=$APP.r(q)?l8:null,Hc=$APP.w(I),xf=E;;){if($APP.Za(Hc))return new $APP.G(null,3,5,$APP.J,[ib,Hb,lc],null);var ef=$APP.x(Hc),rc=ef instanceof $APP.F;if(rc){Hb=Z7(ib,Hb,lc,null);var zd=ef;Hc=$APP.y(Hc);ib=Hb;Hb=zd}else{var Kj=!0===ef,Qe=$APP.t.h(ef);zd=Y7(l,Hb,$APP.ie.g(f,Hb));var ch=$APP.ie.g(f,Hb),Lj=t8(Qe,Ud,Hb,ch,lc),qg=$APP.nf(Lj),Mj=$APP.ie.g(qg,p8),rg=$APP.ie.g(qg,q8),Nj=$APP.ie.g(qg, | ||
r8),Re=$APP.ie.g(qg,o8),Ii=$APP.ie.g(qg,s8);if($APP.r(function(){var Wd=Mj;return $APP.r(Wd)?Wd:Nj}())){var tc=$APP.sa(Qe,"--"),Ji=tc&&$APP.yd.g("--",Qe);if(Ji){var Oj=$APP.y(Hc);return new $APP.G(null,3,5,$APP.J,[function(){var Wd=ib;return Oj?$APP.Tn.B(Wd,$APP.WE,new $APP.G(null,2,5,$APP.J,[v8,h8],null),$APP.lg(Oj)):Wd}(),Hb,lc],null)}var Ki=tc?$APP.ii.g(Qe,2):$APP.bk(Qe,/^(:|-|)/,""),Ee=tc?$APP.Yp.g(Ki,/=/):new $APP.G(null,1,5,$APP.J,[Ki],null),hd=$APP.A.l(Ee,0,null),Ld=$APP.A.l(Ee,1,null),Db= | ||
$APP.ui.h(hd),hc=$APP.ie.l(k,Db,Db);if($APP.r(Ld))lc=Z7(ib,Hb,lc,zd),Hb=hc,Ud=Re,Hc=$APP.Le(Ld,$APP.bd(Hc)),ib=lc,lc=null;else{var lb=$APP.y(Hc),Vd=$APP.x(lb),Qs=t8(Vd,Re,Hb,ch,lc);if($APP.r(function(){var Wd=p8.h(Qs);return $APP.r(Wd)?Wd:$APP.Sd(lb)}()))if($APP.r(rg)){var Rs=$APP.$h(hc);lc=$APP.ir.j(function(){return function(Wd){return new $APP.G(null,2,5,$APP.J,[["-",$APP.t.h(Wd)].join(""),!0],null)}}(ib,Hb,lc,Ud,Hc,xf,Rs,lb,Vd,Qs,Ki,Ee,hd,Ld,Db,hc,tc,Ji,Kj,Qe,zd,ch,Lj,qg,Mj,rg,Nj,Re,Ii,ef,rc, | ||
d,e,f,k,l,m,h,q,n,v,C,H,O,c,P,V,ba,da,ja,oa,ca,E,z,aa,I),$APP.B([Rs]));Hc=$APP.N.g(lc,lb);Ud=Re;lc=Hb=null}else Hc=$APP.ke(v,hc)?null:$APP.SB($APP.t.h(hc),":no-"),Ud=$APP.r(Hc)?$APP.ui.h($APP.bk($APP.t.h(hc),":no-","")):hc,Hc=$APP.Le($APP.Za(Hc),lb),Hb=Z7(ib,Hb,lc,zd),zd=Ud,Ud=Re,ib=Hb,Hb=zd;else Hb=Z7(ib,Hb,lc,zd),zd=hc,Ud=Re,Hc=lb,ib=Hb,Hb=zd}}else if(Ji=$APP.yd.g(m8,ch)&&$APP.yo.g(Qe,"true")&&$APP.yo.g(Qe,"false")||$APP.yd.g(lc,Hb)&&$APP.Za(zd))if(xf=$APP.r(Hc)?$APP.r(xf)?k8(Hc,xf):new $APP.p(null, | ||
1,[h8,Hc],null):new $APP.p(null,1,[h8,Hc],null),Ud=$APP.nf(xf),xf=$APP.ie.g(Ud,h8),Ud=$APP.ie.g(Ud,j8),$APP.yo.g(Hc,xf))zd=Ud,Ud=Re,Hc=xf,xf=zd;else return new $APP.G(null,3,5,$APP.J,[$APP.Tn.B(ib,$APP.WE,new $APP.G(null,2,5,$APP.J,[v8,h8],null),$APP.lg(Hc)),Hb,lc],null);else{try{var od=$7(ib,Hb,zd,S7(ch),Qe,Kj)}catch(Wd){c(new $APP.p(null,4,[C8,a8,A8,$APP.ID(Wd),D8,Hb,E8,Qe],null)),od=ib}lc=$APP.r(function(){var Wd=$APP.yd.g(n8,Re);return Wd?Ii:Wd}())?null:Hb;zd=$APP.r(function(){var Wd=$APP.yd.g(n8, | ||
Re);return Wd?Ii:Wd}())?null:Hb;Ud=Re;Hc=$APP.y(Hc);ib=od;Hb=lc;lc=zd}}}}(),ea=$APP.A.l(K,0,null),ia=$APP.A.l(K,1,null),ha=$APP.A.l(K,2,null),pa=Y7(l,ia,$APP.ie.g(f,ia)),ra=function(){var ib=Z7(ea,ia,ha,pa);return $APP.w(aa)?$APP.Tn.B(ib,$APP.Fk,new $APP.G(null,2,5,$APP.J,[v8,h8],null),function(Hb){return $APP.Qg.g($APP.lg(aa),Hb)}):ib}(),ua=$APP.r(h)?$APP.Od($APP.Ik.j($APP.B([h,ra])),$APP.Pd(ra)):ra;if($APP.r(C)){a=$APP.w($APP.Nh(ua));b=null;for(var va=0,xa=0;;)if(xa<va){var Ca=b.V(null,xa);$APP.ke(C, | ||
Ca)||c(new $APP.p(null,4,[C8,x8,A8,["Unknown option: ",$APP.t.h(Ca)].join(""),x8,C,D8,Ca],null));xa+=1}else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.xc(b),xa=$APP.yc(b),b=a,va=$APP.xd(a),a=xa):(a=$APP.x(b),$APP.ke(C,a)||c(new $APP.p(null,4,[C8,x8,A8,["Unknown option: ",$APP.t.h(a)].join(""),x8,C,D8,a],null)),a=$APP.y(b),b=null,va=0),xa=0;else break}if($APP.r(m))for(a=$APP.w(m),b=null,xa=va=0;;)if(xa<va)Ca=b.V(null,xa),$APP.r($APP.kD(ua,Ca))||c(new $APP.p(null,4,[C8,$APP.uA,A8,["Required option: ",$APP.t.h(Ca)].join(""), | ||
$APP.uA,m,D8,Ca],null)),xa+=1;else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.xc(b),xa=$APP.yc(b),b=a,va=$APP.xd(a),a=xa):(a=$APP.x(b),$APP.r($APP.kD(ua,a))||c(new $APP.p(null,4,[C8,$APP.uA,A8,["Required option: ",$APP.t.h(a)].join(""),$APP.uA,m,D8,a],null)),a=$APP.y(b),b=null,va=0),xa=0;else break;if($APP.r(H))for(var ya=$APP.w(H),wa=null,Ka=0,Pa=0;;)if(Pa<Ka){var Va=wa.V(null,Pa),fb=$APP.A.l(Va,0,null),mb=$APP.A.l(Va,1,null),Gb=function(){var ib=(ib=$APP.Zd(mb))?F8.h(mb):ib;return $APP.r(ib)?ib:mb}(), | ||
Wb=$APP.kD(ua,fb);if($APP.r(Wb)){var zc=Wb,Ab=$APP.A.l(zc,0,null),pe=$APP.A.l(zc,1,null);if(!$APP.r(Gb.h?Gb.h(pe):Gb.call(null,pe))){var Ei=function(){var ib=G8.h(mb);return $APP.r(ib)?ib:function(){return function(Hb){var lc=$APP.nf(Hb);Hb=$APP.ie.g(lc,D8);lc=$APP.ie.g(lc,E8);return["Invalid value for option ",$APP.t.h(Hb),": ",$APP.t.h(lc)].join("")}}(ya,wa,Ka,Pa,ib,zc,Ab,pe,Wb,Gb,Va,fb,mb,d,e,f,k,l,m,h,q,n,v,C,H,O,c,P,V,ba,da,ja,oa,ca,E,z,aa,I,K,ea,ia,ha,pa,ra,ua)}();c(new $APP.p(null,5,[C8,c8, | ||
A8,function(){var ib=new $APP.p(null,2,[D8,fb,E8,pe],null);return Ei.h?Ei.h(ib):Ei.call(null,ib)}(),c8,H,D8,fb,E8,pe],null))}}Pa+=1}else{var Hj=$APP.w(ya);if(Hj){var ah=Hj;if($APP.be(ah))va=$APP.xc(ah),a=$APP.yc(ah),b=va,va=$APP.xd(va),ya=a,wa=b,Ka=va;else{var Fi=$APP.x(ah),Gi=$APP.A.l(Fi,0,null),Vh=$APP.A.l(Fi,1,null),Hi=function(){var ib=(ib=$APP.Zd(Vh))?F8.h(Vh):ib;return $APP.r(ib)?ib:Vh}(),Ij=$APP.kD(ua,Gi);if($APP.r(Ij)){var kc=Ij,Wh=$APP.A.l(kc,0,null),bh=$APP.A.l(kc,1,null);if(!$APP.r(Hi.h? | ||
Hi.h(bh):Hi.call(null,bh))){var Jj=function(){var ib=G8.h(Vh);return $APP.r(ib)?ib:function(){return function(Hb){var lc=$APP.nf(Hb);Hb=$APP.ie.g(lc,D8);lc=$APP.ie.g(lc,E8);return["Invalid value for option ",$APP.t.h(Hb),": ",$APP.t.h(lc)].join("")}}(ya,wa,Ka,Pa,ib,kc,Wh,bh,Ij,Hi,Fi,Gi,Vh,ah,Hj,d,e,f,k,l,m,h,q,n,v,C,H,O,c,P,V,ba,da,ja,oa,ca,E,z,aa,I,K,ea,ia,ha,pa,ra,ua)}();c(new $APP.p(null,5,[C8,c8,A8,function(){var ib=new $APP.p(null,2,[D8,Gi,E8,bh],null);return Jj.h?Jj.h(ib):Jj.call(null,ib)}(), | ||
c8,H,D8,Gi,E8,bh],null))}}ya=$APP.y(ah);wa=null;Ka=0}Pa=0}else break}return ua},I8=function(a,b){a=H8(a,b);b=v8.h($APP.Pd(a));return $APP.yi.l(b,$APP.RG,$APP.Jk.g(a,v8))},J8=function(a,b){var c=$APP.mD($APP.xd(a),b);b=$APP.A.l(c,0,null);c=$APP.A.l(c,1,null);return $APP.yd.g(b,a)?c:null},N8=function(a,b){$APP.Of(K8,!1);a.setPrompt([$APP.t.h($APP.ns),"\x3d\x3e "].join(""));a.prompt();return $APP.RD($APP.Rb(L8))?null:M8.g?M8.g(b,a):M8.call(null,b,a)},O8=function(a){var b=$APP.tk(a);a=$APP.uk(a);var c= | ||
$APP.QD($APP.Rb(L8));b=$APP.lq.g(b-1,c);c=$APP.w(b);b=$APP.x(c);c=$APP.y(c);a=$APP.r(b)?$APP.ii.g(b,a):null;$APP.Of(L8,$APP.dp.g("\n",$APP.Le(a,c)))},P8=function(a){var b=[".repl/",$APP.t.h($APP.Um.v()),".mjs"].join("");$APP.r(esm_import$fs.existsSync(".repl"))||esm_import$fs.mkdirSync(".repl");esm_import$fs.writeFileSync(b,a);return shadow_esm_import($APP.t.h(esm_import$url.pathToFileURL(esm_import$path.resolve(esm_import$process.cwd(),b)))).finally(function(){return esm_import$fs.unlinkSync(b)})}, | ||
R8=function(a,b,c){var d=function(){var f=$APP.ns;$APP.ns=$APP.Rb(Q8);try{return $APP.Bs($APP.Ir.j($APP.B([a])),null)}finally{$APP.ns=f}}(),e=$APP.nf(d);d=$APP.ie.g(e,$APP.As);e=$APP.ie.g(e,$APP.S);$APP.Of(Q8,e);return P8(d).then(function(){esm_import$squint_cljs$core.println(globalThis._repl);return N8(b,c)}).catch(function(f){esm_import$squint_cljs$core.println(f);return N8(b,c)})},M8=function(a,b){if($APP.r(function(){var e=$APP.Rb(K8);return $APP.r(e)?e:$APP.RD($APP.Rb(L8))}()))return null;$APP.Of(K8, | ||
!0);var c=$APP.To($APP.Rb(L8)),d=function(){try{return $APP.Vo(c,$APP.So($APP.mf))}catch(f){var e=f;if(-1!=$APP.ID(e).indexOf("EOF while reading"))return S8;O8(c);$APP.vI.j($APP.B([$APP.t.h(e)]));return T8}}();if($APP.yd.g(T8,d))return N8(b,a);if($APP.yd.g(S8,d))return $APP.Of(K8,!1);O8(c);return $APP.yd.g($APP.Uo,d)?$APP.Of(K8,!1):R8(d,b,a)},U8=function(a){a.on("line",function(b){$APP.cj.B(L8,$APP.t,b,"\n");return M8(null,a)})},W8=function(a,b){var c=$APP.qK.h(a);if($APP.r(c)&&"string"!==typeof c)throw Error("output-dir must be a string"); | ||
return $APP.r(V8.h(a))?($APP.kL.j($APP.B(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])),$APP.kL(),$APP.kL.j($APP.B(["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.re.l(function(d,e){return Promise.resolve(d).then(function(){$APP.kL.j($APP.B(["[squint] Compiling CLJS file:",e]));return $APP.rK($APP.yi.l(a,$APP.mK,e))}).then(function(f){f=$APP.nf(f); | ||
f=$APP.ie.g(f,$APP.oK);$APP.kL.j($APP.B(["[squint] Wrote JS file:",f]));return f})},null,b)},r8=new $APP.F(null,"kwd-opt","kwd-opt",1313309243),l8=new $APP.F(null,"hyphens","hyphens",2113533609),u8=new $APP.F(null,"spec","spec",347520401),a8=new $APP.F(null,"coerce","coerce",1917884504),x8=new $APP.F(null,"restrict","restrict",-1071101511),n8=new $APP.F(null,"keywords","keywords",1526959054),o8=new $APP.F(null,"mode","mode",654403691),T8=new $APP.F("squint.repl.node","continue","squint.repl.node/continue", | ||
1558138730),A8=new $APP.F(null,"msg","msg",-1386103444),X8=new $APP.F(null,"show","show",-576705889),m8=new $APP.F(null,"boolean","boolean",-1919418404),U7=new $APP.F(null,"input","input",556931961),Y8=new $APP.F(null,"rest-cmds","rest-cmds",-423198324),v8=new $APP.F("org.babashka","cli","org.babashka/cli",1162430315),j8=new $APP.F(null,"args-\x3eopts","args-\x3eopts",964391046),b8=new $APP.F(null,"alias","alias",-2039751630),w8=new $APP.F(null,"collect","collect",-284321549),Z8=new $APP.F(null,"no-run", | ||
"no-run",-1534313596),c8=new $APP.F(null,"validate","validate",-201300827),q8=new $APP.F(null,"composite-opt","composite-opt",-2021292928),p8=new $APP.F(null,"hyphen-opt","hyphen-opt",1836909464),V8=new $APP.F(null,"help","help",-439233446),C8=new $APP.F(null,"cause","cause",231901252),s8=new $APP.F(null,"fst-colon","fst-colon",1618567071),V7=new $APP.F(null,"coerce-fn","coerce-fn",-821146515),h8=new $APP.F(null,"args","args",1315556576),f8=new $APP.F(null,"no-keyword-opts","no-keyword-opts",761286018), | ||
E8=new $APP.F(null,"value","value",305978217),F8=new $APP.F(null,"pred","pred",1927423397),y8=new $APP.F(null,"closed","closed",-919675359),S8=new $APP.F("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),z8=new $APP.F(null,"error-fn","error-fn",-171437615),D8=new $APP.F(null,"option","option",65132272),d8=new $APP.F(null,"exec-args","exec-args",-1860766354),G8=new $APP.F(null,"ex-msg","ex-msg",-1111774387),K7=new $APP.F(null,"s","s",1705939918),B8=new $APP.F(null, | ||
"cmds-opts","cmds-opts",-390130362),$8=new $APP.F(null,"h","h",1109658740),a9=new $APP.F(null,"e","e",1381269198),g8=new $APP.F(null,"cmds","cmds",-1841503952);var L8=$APP.Yi.h(""),K8=$APP.Yi.h(!1),b9,c9=process.stdout.isTTY;b9=$APP.r(c9)?process.stdin.setRawMode:c9;process.binding("contextify");var Q8=$APP.Yi.h($APP.ns),d9=function d9(a){switch(arguments.length){case 0:return d9.v();case 1:return d9.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};d9.v=function(){return d9.h(null)}; | ||
d9.h=function(){$APP.ns=$APP.tv;$APP.Hp=$APP.gp=!0;$APP.r(b9)&&process.stdin.setRawMode(!0);return P8("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});U8(b);b.setPrompt([$APP.t.h($APP.ns),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};d9.m=1;var e9=new $APP.G(null,4,5,$APP.J,[new $APP.p(null,3,[g8,new $APP.G(null,1,5,$APP.J,["run"],null),$APP.io,function(a){a=$APP.nf(a);a=$APP.ie.g(a,$APP.RG);var b=$APP.nf(a),c=$APP.ie.g(b,$APP.Tk);b=$APP.ie.g(b,V8);if($APP.r(b))return null;$APP.kL.j($APP.B(["[squint] Running",c]));return $APP.rK($APP.yi.l(a,$APP.mK,c)).then(function(d){d=$APP.nf(d);d=$APP.ie.g(d,$APP.oK);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},B8,new $APP.G(null, | ||
1,5,$APP.J,[$APP.Tk],null)],null),new $APP.p(null,3,[g8,new $APP.G(null,1,5,$APP.J,["compile"],null),a8,new $APP.p(null,3,[$APP.is,m8,$APP.js,m8,$APP.qK,$APP.gl],null),$APP.io,function(a){var b=$APP.nf(a);a=$APP.ie.g(b,Y8);b=$APP.ie.g(b,$APP.RG);return W8(b,a)}],null),new $APP.p(null,2,[g8,new $APP.G(null,1,5,$APP.J,["repl"],null),$APP.io,d9],null),new $APP.p(null,2,[g8,$APP.kg,$APP.io,function(a){a=$APP.nf(a);var b=$APP.ie.g(a,Y8),c=$APP.ie.g(a,$APP.RG);a=a9.h(c);if($APP.r(a)){if($APP.r(V8.h(c)))return $APP.kL.j($APP.B(["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.KB.h(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(X8.h(c))&&$APP.kL.j($APP.B([a]));if($APP.r(Z8.h(c)))return null;a=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return shadow_esm_import(a).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=V8.h(c);return $APP.r(f)?f:$APP.yd.g("help",$APP.x(b))||$APP.Sd(b)}())?$APP.kL.j($APP.B(["Squint v0.0.0\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\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."])): | ||
W8(c,b)}],null)],null);(function(){var a=new $APP.p(null,1,[$APP.CG,new $APP.p(null,1,[$8,V8],null)],null),b=i8(process.argv.slice(2),a),c=$APP.nf(b),d=$APP.ie.g(c,g8),e=$APP.ie.g(c,h8);return $APP.re.l(function(f,k){f=$APP.nf(k);var l=$APP.ie.g(f,g8),m=$APP.ie.g(f,$APP.io),h=J8(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.w(h);return null==v?null:$APP.lg(v)}();k=$APP.N.g(k,e);f=I8(k,J7(a,$APP.B([f])));k=$APP.nf(f);var q=$APP.ie.g(k,$APP.RG);f=$APP.ie.g(k,h8);k=$APP.ie.g(k,g8);var n=$APP.N.g(k,f);return $APP.kd(function(){var v= | ||
$APP.yi.j(c,h8,n,$APP.B([Y8,n,$APP.RG,q,$APP.Mo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,e9)})(); |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "core.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1112719
11
5757