squint-cljs 0.8.150 → 0.8.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +46 -46
- package/lib/cljs.pprint.js +218 -218
- package/lib/compiler.js +751 -751
- package/lib/compiler.node.js +24 -24
- package/lib/compiler.sci.js +1087 -1087
- package/lib/node.nrepl_server.js +17 -17
- package/lib/squint.core.umd.js +1 -1
- package/package.json +1 -1
- package/src/squint/core.js +9 -0
package/lib/node.nrepl_server.js
CHANGED
|
@@ -4,20 +4,20 @@ import "./node.js";
|
|
|
4
4
|
import "./compiler.node.js";
|
|
5
5
|
const shadow_esm_import = function(x) { return import(x) };
|
|
6
6
|
import*as esm_import$fs from"fs";import*as esm_import$net from"net";
|
|
7
|
-
var H9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},I9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},J9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},K9=function(a){return console.debug($APP.lq.g(" ",a))},
|
|
8
|
-
|
|
9
|
-
"version-string",a)},
|
|
10
|
-
$APP.Si.l($APP.F([c]));else return $APP.Si.l($APP.F([c]))},
|
|
11
|
-
$APP.
|
|
12
|
-
new $APP.n(null,2,["ns",$APP.t.h($APP.
|
|
13
|
-
c):b.call(null,a,c)},
|
|
14
|
-
l);l=m}f=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);$APP.hk(k)||$APP.Kf(e,k);f=$APP.x(f);k=null;for(var h=m=0;;)if(h<m)l=k.ca(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)?K9($APP.F(["Connection lost"])):K9($APP.F(["Connection closed"]))})},
|
|
15
|
-
"options","nrepl.middleware.print/options",868480159)
|
|
16
|
-
-1756736313),
|
|
17
|
-
1)),"e"))return new $APP.
|
|
18
|
-
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.
|
|
19
|
-
var S9=function S9(a){for(;;){if("string"===typeof a)return[$APP.t.h(Buffer.from(a).length),":",a].join("");if(a instanceof $APP.
|
|
20
|
-
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.
|
|
21
|
-
var O9=$APP.Wi.h(null),R9=$APP.wh([
|
|
22
|
-
2,["nbb-nrepl",M9("TODO"),"node",M9(process.version)],null),"aux",$APP.jf,"ops",$APP.ci($APP.vi.g($APP.bi,$APP.Lh(R9)),$APP.Fn.h($APP.jf)),"status",new $APP.
|
|
23
|
-
":",$APP.t.h(f)].join("")]));try{return esm_import$fs.writeFileSync(".nrepl-port",$APP.t.h(f))}catch(k){return console.warn($APP.lq.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Kf(
|
|
7
|
+
var H9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},I9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},J9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},K9=function(a){return console.debug($APP.lq.g(" ",a))},aia=function(a){return function(b,c){b=$APP.kf(b);var d=$APP.fe.g(b,$APP.Ls),e=$APP.fe.g(b,$ha);c=$APP.Qh.j(c,"id",d);c=$APP.r(e)?$APP.Qh.j(c,"session",e):c;return a.g?a.g(b,c):a.call(null,b,c)}},cia=function(){var a=
|
|
8
|
+
bia;return function(b,c){b=$APP.Xm.j(b,L9,$APP.wi);return a.g?a.g(b,c):a.call(null,b,c)}},eia=function(){var a=dia();return function(b,c){K9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},fia=function(a){return function(b,c){K9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},dia=function(){var a=cia();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},M9=function(a){return $APP.Qh.j($APP.ci(new $APP.J(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.nv.h(a.split("."))),
|
|
9
|
+
"version-string",a)},gia=function(a,b,c){if($APP.r(a))if(a=N9.h?N9.h(a):N9.call(null,a),$APP.r(a)){b=$APP.kf(b);var d=$APP.fe.g(b,$APP.p9),e=$APP.fe.g(b,$APP.i9),f=$APP.fe.g(b,$APP.r9);b=$APP.Qa;var k=$APP.mi,l=$APP.R6;$APP.Qa=e;$APP.mi=f;$APP.R6=d;try{var m=new $APP.Fa;d=$APP.Sa;e=$APP.Ta;$APP.Sa=!0;$APP.Ta=function(h){return m.append(h)};try{a.h?a.h(c):a.call(null,c)}finally{$APP.Ta=e,$APP.Sa=d}return $APP.t.h(m)}finally{$APP.R6=l,$APP.mi=k,$APP.Qa=b}}else return K9($APP.F(["Pretty-Printing is only supported for cider.nrepl.pprint/pprint"])),
|
|
10
|
+
$APP.Si.l($APP.F([c]));else return $APP.Si.l($APP.F([c]))},hia=function(a){a=$APP.mv(a,new $APP.n(null,4,[$APP.mq,$APP.rq,$APP.cv,!0,$APP.Fu,!0,$APP.uq,!0],null),$APP.u(O9));var b=$APP.kf(a),c=$APP.fe.g(b,$APP.lv);a=$APP.fe.g(b,$APP.U);$APP.Kf(O9,b);b=$APP.ak("(async function () {\n%s\n}) ()","%s",c);$APP.Kf(P9,a);return b},nia=function(a,b){var c=$APP.kf(a);$APP.fe.g(c,$APP.U);a=$APP.fe.g(c,iia);$APP.fe.g(c,$APP.cl);$APP.fe.g(c,jia);$APP.fe.g(c,kia);return Promise.resolve(a).then(hia).then(function(d){$APP.OI.l($APP.F(["About to eval:"]));
|
|
11
|
+
$APP.OI.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(P9)),"value",gia(lia.h(c),mia.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.RI.h($APP.qj(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.Pr)],null);return b.g?b.g(c,d):b.call(null,c,d)}).finally(function(){var d=
|
|
12
|
+
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.kf(a);$APP.fe.g(a,$APP.U);return null},bia=function(a,b){a=$APP.kf(a);var c=$APP.fe.g(a,L9),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.lq.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,
|
|
13
|
+
c):b.call(null,a,c)},oia=function(a){return function(b,c){return a.write(S9(c))}},pia=function(a,b){K9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=eia(),d=aia(fia(oia(b))),e=$APP.Wi.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.Kf(e,null);var l=f}else l=f;a:for(f=$APP.F([$APP.ov,!0]),k=$APP.lg;;){var m=$APP.Hf.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.De.g(k,
|
|
14
|
+
l);l=m}f=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);$APP.hk(k)||$APP.Kf(e,k);f=$APP.x(f);k=null;for(var h=m=0;;)if(h<m)l=k.ca(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)?K9($APP.F(["Connection lost"])):K9($APP.F(["Connection closed"]))})},kia=new $APP.I(null,"_line","_line",232847719),mia=new $APP.I("nrepl.middleware.print",
|
|
15
|
+
"options","nrepl.middleware.print/options",868480159),$ha=new $APP.I(null,"session","session",1008279103),qia=new $APP.I(null,"lookup","lookup",1225356838),ria=new $APP.I(null,"load-file","load-file",-424586670),jia=new $APP.I(null,"_load-file?","_load-file?",-1198848711),L9=new $APP.I(null,"op","op",-1882987955),sia=new $APP.I(null,"describe","describe",1369790582),iia=new $APP.I(null,"code","code",1586293142),tia=new $APP.I(null,"eldoc","eldoc",-1321421900),uia=new $APP.I(null,"log_level","log_level",
|
|
16
|
+
-1756736313),lia=new $APP.I("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),via=new $APP.I(null,"clone","clone",711747572),wia=new $APP.I(null,"close","close",1835149582),xia=new $APP.I(null,"info","info",-317069002),yia=new $APP.I(null,"host","host",-1558485167),zia=new $APP.I(null,"complete","complete",-500388775);var U9=function U9(a,b){switch($APP.t.h(J9(a,1))){case "i":return a=I9(a,1),b=H9(a,"e"),new $APP.J(null,2,5,$APP.N,[parseInt(J9(a,b)),I9(a,b+1)],null);case "l":var d=a=I9(a,1);for(a=$APP.nc($APP.lg);;){if($APP.A.g($APP.t.h(J9(d,1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.pc(a),I9(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.gg.g(a,f);d=e}case "d":for(a=I9(a,1),f=$APP.kf(b),f=$APP.fe.g(f,$APP.ov),d=a,e=$APP.nc($APP.jf);;){if($APP.A.g($APP.t.h(J9(d,
|
|
17
|
+
1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.pc(e),I9(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.wi.h(d):d;a=$APP.Vg.j(e,d,a);d=k;e=a}default:return b=H9(a,":"),f=parseInt(J9(a,b)),a=I9(a,b+1),new $APP.J(null,2,5,$APP.N,[$APP.t.h(J9(a,f)),I9(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],
|
|
18
|
+
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)};
|
|
19
|
+
var S9=function S9(a){for(;;){if("string"===typeof a)return[$APP.t.h(Buffer.from(a).length),":",a].join("");if(a instanceof $APP.I||a instanceof $APP.w)a=[function(){var c=$APP.Le(a);return $APP.r(c)?[c,"/"].join(""):null}(),$APP.bi(a)].join("");else return"number"===typeof a?["i",$APP.t.h(a),"e"].join(""):$APP.Sd(a)||$APP.Xd(a)||null==a?["l",$APP.t.h($APP.Hf.g($APP.t,$APP.vi.g(S9,a))),"e"].join(""):$APP.Ud(a)?["d",$APP.t.h($APP.Hf.g($APP.t,$APP.vi.g(function(){return function(c){var d=$APP.B.j(c,
|
|
20
|
+
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.MI.g($APP.y,a)))),"e"].join(""):null}};var P9=$APP.Wi.h($APP.Pr),N9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.y9],null);$APP.Wi.h(!1);
|
|
21
|
+
var O9=$APP.Wi.h(null),R9=$APP.wh([qia,wia,ria,tia,via,sia,xia,zia,$APP.SI],[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.kf(a);$APP.fe.g(a,$APP.cl);return null},Q9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.gI()),"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,
|
|
22
|
+
2,["nbb-nrepl",M9("TODO"),"node",M9(process.version)],null),"aux",$APP.jf,"ops",$APP.ci($APP.vi.g($APP.bi,$APP.Lh(R9)),$APP.Fn.h($APP.jf)),"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.kf(a);var c=$APP.fe.g(a,$APP.U);$APP.NI.l($APP.F([$APP.U,c]));return nia($APP.Qh.j(a,$APP.U,$APP.u(P9)),b)}]),Aia=$APP.Wi.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.PI.h(a);return $APP.r(e)?e:0}(),c=function(){var e=yia.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.cg:uia.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Wk.g(pia,$APP.jf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.OI.l($APP.F([["nREPL server started on port ",$APP.t.h(f)," on host ",$APP.t.h(e)," - nrepl://",$APP.t.h(e),
|
|
23
|
+
":",$APP.t.h(f)].join("")]));try{return esm_import$fs.writeFileSync(".nrepl-port",$APP.t.h(f))}catch(k){return console.warn($APP.lq.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Kf(Aia,d)})};
|
package/lib/squint.core.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var squint;(squint||={}).core=(()=>{var Z=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var Qe=Object.prototype.hasOwnProperty;var Ke=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})},Ie=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ke(e))!Qe.call(t,o)&&o!==n&&Z(t,o,{get:()=>e[o],enumerable:!(r=Se(e,o))||r.enumerable});return t};var je=t=>Ie(Z({},"__esModule",{value:!0}),t);var jo={};Ke(jo,{Atom:()=>Ft,Cons:()=>Bt,Delay:()=>Qo,IIterable:()=>rt,IIterable__iterator:()=>Ot,LazySeq:()=>dr,NaN_QMARK_:()=>Yr,PROTOCOL_SENTINEL:()=>pn,_:()=>Be,_EQ_:()=>Ne,_GT_:()=>gt,_GT__EQ_:()=>At,_LT_:()=>Te,_LT__EQ_:()=>Oe,_PLUS_:()=>Ge,_STAR_:()=>qe,__protocol_satisfies:()=>ze,_iterator:()=>$,abs:()=>go,aclone:()=>jr,add_watch:()=>Nr,alength:()=>kr,apply:()=>Ct,array_QMARK_:()=>V,aset:()=>Qr,assoc:()=>Q,assoc_BANG_:()=>A,assoc_in:()=>vt,assoc_in_BANG_:()=>Mt,atom:()=>dn,boolean$:()=>vr,boolean_QMARK_:()=>no,bounded_count:()=>ro,butlast:()=>xr,cat:()=>ve,clj__GT_js:()=>Ko,coll_QMARK_:()=>Vr,comp:()=>Et,compare:()=>b,complement:()=>O,concat:()=>Ut,conj:()=>St,conj_BANG_:()=>L,cons:()=>en,constantly:()=>Rn,contains_QMARK_:()=>Qt,count:()=>G,counted_QMARK_:()=>ye,cycle:()=>Vn,dec:()=>Ue,deref:()=>ut,disj:()=>Ce,disj_BANG_:()=>kt,dissoc:()=>Ve,dissoc_BANG_:()=>De,distinct:()=>Xn,doall:()=>Ir,dorun:()=>Kr,drop:()=>X,drop_last:()=>yr,drop_while:()=>oe,empty:()=>U,empty_QMARK_:()=>fr,ensure_reduced:()=>re,es6_iterator:()=>F,even_QMARK_:()=>Dt,every_QMARK_:()=>ue,every_pred:()=>Gr,ex_cause:()=>Xr,ex_data:()=>Wr,ex_info:()=>Zr,ex_message:()=>Jr,false_QMARK_:()=>Ar,ffirst:()=>Je,filter:()=>C,filterv:()=>nn,find:()=>oo,first:()=>K,flatten:()=>po,fn_QMARK_:()=>pe,fnil:()=>pt,frequencies:()=>_r,get:()=>w,get_in:()=>at,group_by:()=>hr,identical_QMARK_:()=>Ln,identity:()=>Wt,inc:()=>Kt,int_QMARK_:()=>de,integer_QMARK_:()=>Hr,interleave:()=>Jt,interpose:()=>Kn,into:()=>ne,into_array:()=>le,iterable:()=>s,iterate:()=>Br,js_keys:()=>Cr,js_obj:()=>Sr,juxt:()=>zr,keep:()=>nr,keep_indexed:()=>fn,key:()=>te,keys:()=>_e,last:()=>Xe,lazy:()=>a,list:()=>Vt,list_QMARK_:()=>Sn,long$:()=>Ao,map:()=>R,map_QMARK_:()=>fe,map_indexed:()=>un,mapcat:()=>kn,mapv:()=>ct,max:()=>se,max_key:()=>co,memoize:()=>Mo,merge:()=>qn,merge_with:()=>Bn,meta:()=>to,min:()=>Or,min_key:()=>io,mod:()=>uo,neg_QMARK_:()=>Er,next:()=>tt,nil_QMARK_:()=>an,nnext:()=>Lr,not:()=>Lt,not_any_QMARK_:()=>cr,not_empty:()=>ao,not_every_QMARK_:()=>tr,nth:()=>jt,number_QMARK_:()=>he,object_QMARK_:()=>Pe,odd_QMARK_:()=>En,parse_long:()=>fo,partial:()=>Dn,partition:()=>Zt,partition_all:()=>Xt,partition_by:()=>Gn,partitionv:()=>Nn,partitionv_all:()=>Tn,peek:()=>Eo,persistent_BANG_:()=>_o,pop:()=>Ro,pos_QMARK_:()=>Rr,pr_str:()=>$t,println:()=>It,prn:()=>_n,quot:()=>we,rand_int:()=>ce,rand_nth:()=>lr,random_uuid:()=>ko,range:()=>yn,re_find:()=>wn,re_matches:()=>mn,re_pattern:()=>gn,re_seq:()=>Pr,reduce:()=>E,reduce_kv:()=>dt,reduced:()=>Y,reduced_QMARK_:()=>M,reductions:()=>He,regexp_QMARK_:()=>Ur,rem:()=>Me,remove:()=>rn,remove_watch:()=>Tr,repeat:()=>lt,repeatedly:()=>pr,replace:()=>sr,reset_BANG_:()=>Pt,rest:()=>P,reverse:()=>rr,run_BANG_:()=>Io,satisfies_QMARK_:()=>Le,second:()=>We,select_keys:()=>In,seq:()=>v,seq_QMARK_:()=>Nt,seqable_QMARK_:()=>Tt,sequential_QMARK_:()=>H,set:()=>vn,set_QMARK_:()=>Mn,shuffle:()=>ir,some:()=>ie,some_QMARK_:()=>br,some_fn:()=>qr,sort:()=>ht,sort_by:()=>ur,sorted_set:()=>xo,split_at:()=>mr,split_with:()=>wr,str:()=>ln,string_QMARK_:()=>xt,subs:()=>ae,subseq:()=>wo,subvec:()=>An,swap_BANG_:()=>xn,system_time:()=>zn,t:()=>Fr,take:()=>W,take_last:()=>Fn,take_nth:()=>Cn,take_while:()=>J,to_array:()=>$r,trampoline:()=>ge,transduce:()=>mt,transient$:()=>ho,tree_seq:()=>Ae,true_QMARK_:()=>gr,truth_:()=>h,type:()=>bo,unreduced:()=>ft,update:()=>Zn,update_BANG_:()=>_t,update_in:()=>Hn,update_keys:()=>So,update_vals:()=>Ee,val:()=>ee,vals:()=>Dr,vec:()=>k,vector:()=>it,vector_QMARK_:()=>bn,warn_on_lazy_reusage_BANG_:()=>tn,with_meta:()=>eo,zero_QMARK_:()=>Mr,zipmap:()=>lo});function f(t){if(t==null||t instanceof Function)return t;const e=typeof t;return e==="string"?(n,r)=>w(n,t,r):e==="object"?(n,r)=>w(t,n,r):t}function I(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function Ne(...t){return I(t,(e,n)=>e===n)}function gt(...t){return I(t,(e,n)=>e>n)}function At(...t){return I(t,(e,n)=>e>=n)}function Te(...t){return I(t,(e,n)=>e<n)}function Oe(...t){return I(t,(e,n)=>e<=n)}function Ge(...t){return t.reduce((e,n)=>e+n,0)}function qe(...t){return t.reduce((e,n)=>e*n,1)}function Be(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}const ze={};function Le(t,e){return e==null?t[null]:typeof t=="symbol"?e[t]:e[t.__sym]}function $e(t,e,n){return t.set(e,n),t}function Fe(t,e,n){return t[e]=n,t}function bt(t){switch(p(t)){case _:return $e;case x:case y:return Fe}}function A(t,e,n,...r){if(r.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(t)){case _:t.set(e,n);for(let o=0;o<r.length;o+=2)t.set(r[o],r[o+1]);break;case x:case y:t[e]=n;for(let o=0;o<r.length;o+=2)t[r[o]]=r[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof t}.`)}return t}function j(t){switch(p(t)){case _:return new Map(t);case m:return new t.constructor(t);case x:return[...t];case y:return{...t};default:throw new Error(`Don't know how to copy object of type ${typeof t}.`)}}function Q(t,e,n,...r){t||(t={});const o=j(t);return A(o,e,n,...r),o}const _=1,x=2,y=3,S=4,m=5,q=6;function B(t){switch(t){case _:return new Map;case x:return[];case y:return{};case S:return new D;case m:return new Set;case q:return a(function*(){})}}function z(t){return t.constructor===Object}function Pe(t){return t!=null&&z(t)}function p(t){if(t!=null){if(z(t))return y;if(t instanceof Map)return _;if(t instanceof Set)return m;if(t instanceof D)return S;if(Array.isArray(t))return x;if(t instanceof ot)return q;if(t instanceof N)return m;if(t instanceof Object)return y}}function Ye(t,e,n,r,o){r=k(r);const u=p(n);if(u!==_&&u!==x&&u!==y)throw new Error(`Illegal argument: ${e} expects the first argument to be a Map, Array, or Object.`);const i=[n];let c=n;for(let l=0;l<r.length-1;l+=1){const g=r[l];let d;c instanceof Map?d=c.get(g):d=c[g],d||(d=B(u)),i.push(d),c=d}i.push(o);for(let l=i.length-2;l>=0;l-=1)i[l]=t(i[l],r[l],i[l+1]);return i[0]}function vt(t,e,n){return Ye(Q,"assoc-in",t,e,n)}function Mt(t,e,n){e=k(e);var r=t;const o=p(t);for(const u of e.splice(0,e.length-1)){let i=w(r,u);i===void 0&&(i=B(o),A(r,u,i)),r=i}return A(r,e[e.length-1],n),t}function Et(...t){if(t=t.map(f),t.length===0)return Wt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let o=e(...r);for(const u of n)o=u(o);return o}}function Rt(t,e){for(const n of e)t.add(n);return t}function L(...t){if(t.length===0)return it();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case m:Rt(r,n);break;case S:r.unshift(...n.reverse());break;case x:r.push(...n);break;case _:for(const o of n)Array.isArray(o)?r.set(o[0],o[1]):s(o).forEach(u=>{r.set(u[0],u[1])});break;case y:for(const o of n)Array.isArray(o)?r[o[0]]=o[1]:Object.assign(r,o);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function St(...t){if(t.length===0)return it();const[e,...n]=t;let r=e;r==null&&(r=Vt());let o,u;switch(p(r)){case m:return r instanceof N?Rt(new r.constructor(r),n):new r.constructor([...r,...n]);case S:return new D(...n.reverse(),...r);case x:return[...r,...n];case _:o=new Map(r);for(const i of n)Array.isArray(i)?o.set(i[0],i[1]):s(i).forEach(c=>{o.set(c[0],c[1])});return o;case q:return a(function*(){yield*n,yield*r});case y:u={...r};for(const i of n)Array.isArray(i)?u[i[0]]=i[1]:Object.assign(u,i);return u;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function kt(t,...e){for(const n of e)t.delete(n);return t}function Ce(t,...e){const n=new t.constructor([...t]);return kt(n,...e)}function Qt(t,e){switch(p(t)){case m:case _:return t.has(e);case void 0:return!1;default:return e in t}}function De(t,...e){for(const n of e)delete t[n];return t}function Ve(t,...e){if(e.length===0)return t;const n=j(t);switch(p(t)){case _:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function Kt(t){return t+1}function Ue(t){return t-1}function It(...t){console.log(...t)}function jt(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const o=s(t);let u=0;for(const i of o)if(u++==e){r=i;break}}if(r!==void 0)return r}return n}function w(t,e,n=void 0){if(t==null)return n;let r;if(z(t))return r=t[e],r===void 0?n:r;let o;switch(p(t)){case m:t.has(e)&&(r=e);break;case _:r=t.get(e);break;case x:r=t[e];break;default:if(o=t.get,o instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function Nt(t){return t!=null&&!!t[Symbol.iterator]}const H=Nt;function Tt(t){return t==null||!!t[Symbol.iterator]}function s(t){if(t==null)return[];if(Tt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const rt=Symbol("Iterable"),Ot=Symbol.iterator;function $(t){return t[Symbol.iterator]()}const F=$;function v(t){if(t==null)return t;const e=s(t);return e.length===0||e.size===0||e[Symbol.iterator]().next().done?null:e}function K(t){const[e]=s(t);return e}function We(t){const[e,n]=s(t);return n}function Je(t){return K(K(t))}function P(t){return a(function*(){let e=!0;for(const n of s(t))e?e=!1:yield n})}class T{value;constructor(e){this.value=e}_deref(){return this.value}}function Xe(t){t=s(t);let e;switch(p(t)){case x:return t[t.length-1];default:for(const n of t)e=n;return e}}function Y(t){return new T(t)}function M(t){return t instanceof T}function E(t,e,n){t=f(t);let r,o;if(arguments.length===2){const u=s(e)[Symbol.iterator](),i=u.next();i.done?o=t():o=i.value,r=u}else o=e,r=s(n);if(o instanceof T)return o.value;for(const u of r)if(o=t(o,u),o instanceof T){o=o.value;break}return o}function*Ze(t,e){const n=e.next();n.done?yield t():yield*Gt(t,n.value,e)}function*Gt(t,e,n){let r=e,o=n;for(;;){if(M(r)){yield r.value;return}else yield r;const u=o.next();if(u.done)break;r=t(r,u.value)}}function He(t,e,n){return t=f(t),arguments.length===2?a(function*(){yield*Ze(t,s(e)[Symbol.iterator]())}):a(function*(){yield*Gt(t,e,s(n)[Symbol.iterator]())})}var qt=!1;function tn(){qt=!0}class ot{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&qt)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}ot.prototype[rt]=!0;function a(t){return new ot(t)}class Bt{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*s(this.coll)}}function en(t,e){return new Bt(t,e)}function R(t,...e){switch(t=f(t),e.length){case 0:return n=>(...r)=>{switch(r.length){case 0:return n();case 1:return n(r[0]);case 2:return n(r[0],t(r[1]));default:return n(r[0],t(...r.slice(1)))}};case 1:return a(function*(){for(const n of s(e[0]))yield t(n)});default:return a(function*(){const n=e.map(r=>F(s(r)));for(;;){const r=[];for(const o of n){const u=o.next();if(u.done)return;r.push(u.value)}yield t(...r)}})}}function zt(t){return e=>(...n)=>{switch(n.length){case 0:return e();case 1:return e(n[0]);case 2:{const r=n[0],o=n[1];return h(t(o))?e(r,o):r}}}}function C(t,e){return arguments.length===1?zt(t):(t=f(t),a(function*(){for(const n of s(e))h(t(n))&&(yield n)}))}function nn(t,e){return[...C(t,e)]}function rn(t,e){return arguments.length===1?zt(O(t)):C(O(t),e)}function on(t){return e=>{let n=-1;return(...r)=>{switch(r.length){case 0:return e();case 1:return e(r[0]);case 2:return e(r[0],t((n=n+1,n),r[1]))}}}}function un(t,e){if(t=f(t),arguments.length===1)return on(t);const n=[];let r=0;for(const o of s(e))n.push(t(r,o)),r++;return n}function cn(t,e){t=f(t);const n=[];let r=0;for(const o of s(e)){const u=t(r,o);h(u)&&n.push(u),r++}return n}function sn(t){return e=>{let n=-1;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1];n++;const c=t(n,i);return c==null?u:e(u,c)}}}}function fn(t,e){return arguments.length===1?sn(t):cn(t,e)}function ln(...t){return t.join("")}function Lt(t){return!h(t)}function an(t){return t==null}const pn={};function hn(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case m:case q:return[...n];case _:return Object.fromEntries(n);default:return n}})}function $t(...t){return t.map(hn).join(" ")}function _n(...t){It($t(...t))}class Ft{constructor(e){this.val=e,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=n=>{const r=this.val;if(this.val=n,this._hasWatches)for(const o of Object.entries(this._watches)){const u=o[0],i=o[1];i(u,this,r,n)}return n},this._add_watch=(n,r)=>{this._watches[n]=r,this._hasWatches=!0},this._remove_watch=n=>{delete this._watches[n]}}}function dn(t){return new Ft(t)}function ut(t){return t._deref()}function Pt(t,e){t._reset_BANG_(e)}function xn(t,e,...n){e=f(e);const r=e(ut(t),...n);return Pt(t,r),r}function yn(t,e,n){return a(function*(){let r=t,o=e,u=n;e===void 0&&(r=0,o=t);let i=r||0;u=n??1;const c=u>=0;for(;o===void 0||c&&i<o||!c&&o<i;)yield i,i+=u})}function mn(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function wn(t,e){if(xt(e)){const n=t.exec(e);return n!=null?n.length===1?n[0]:[...n]:null}else throw new TypeError("re-find must match against a string.")}function gn(t){if(t instanceof RegExp)return t;const e=t.match(/^\(\?([dgimsuvy]*)\)/);return e?new RegExp(t.slice(e[0].length),e[1]):new RegExp(t)}function An(t,e,n){return t.slice(e,n)}function it(...t){return t}function bn(t){return p(t)===x}function ct(...t){if(t.length===2){const[r,o]=t,u=s(o);if(Array.isArray(u)){const i=new Array(u.length);for(var e=0;e<u.length;e++)i[e]=r(u[e]);return i}else{var n=[];for(const i of u)n.push(r(i));return n}}return[...R(...t)]}function k(t){return V(t)?t:[...s(t)]}function vn(t){return new Set(s(t))}function Mn(t){return p(t)===m}const Yt=Symbol("IApply__apply");function Ct(t,...e){t=f(t);const n=e.slice(0,e.length-1),r=s(e[e.length-1]),o=t[Yt];return o?o(...n,r):t(...n,...r)}function Dt(t){return t%2==0}function En(t){return!Dt(t)}function O(t){return t=f(t),(...e)=>Lt(t(...e))}function Rn(t){return(...e)=>t}class D extends Array{constructor(...e){super(),this.push(...e)}}function Sn(t){return p(t)===S}function Vt(...t){return new D(...t)}function V(t){return Array.isArray(t)}function st(t){return a(function*(){for(const e of t)yield*s(e)})}function Ut(...t){return st(t)}Ut[Yt]=t=>st(t);function kn(t,...e){if(e.length===0)return Et(R(t),ve);{const n=R(t,...e);return st(n)}}function Wt(t){return t}function Jt(...t){return a(function*(){const e=t.map(n=>F(s(n)));for(;;){const n=[];for(const r of e){const o=r.next();if(o.done)return;n.push(o.value)}yield*n}})}function Qn(t){return e=>{let n=!1;return(...r)=>{switch(r.length){case 0:return e();case 1:return e(r[0]);case 2:if(n){const o=e(r[0],t);return M(o)?o:e(o,r[1])}else return n=!0,e(r[0],r[1])}}}}function Kn(t,e){return arguments.length===1?Qn(t):X(1,Jt(lt(t),e))}function In(t,e){const n=p(t),r=B(n)||{};for(const o of e){const u=w(t,o);u!=null&&A(r,o,u)}return r}function ft(t){return M(t)?ut(t):t}function jn(t){return e=>{let n=[];return(...r)=>{let o,u;switch(r.length){case 0:return e();case 1:return o=r[0],n.length!==0&&(u=[...n],n=[],o=ft(e(o,u))),e(o);case 2:return o=r[0],n.push(r[1]),t===n.length?(u=[...n],n=[],e(o,u)):o}}}}function Xt(t,...e){if(arguments.length===1)return jn(t);let n=t,r=e[0];return e.length===2&&([n,r]=e),Ht(t,n,[],r,!0)}function Zt(t,...e){let n=t,r=[],o=e[0];return e.length===2?[n,o]=e:e.length>2&&([n,r,o]=e),Ht(t,n,r,o,!1)}const Nn=Zt,Tn=Xt;function Ht(t,e,n,r,o){return a(function*(){let u=[],i=0;for(const c of s(r))i<t&&(u.push(c),u.length===t&&(yield u,u=e<t?u.slice(e):[])),i++,i===e&&(i=0);u.length>0&&(u.length===t||o?yield u:n.length&&(u.push(...n.slice(0,t-u.length)),yield u))})}function On(t){return e=>{let n=[];const r={};let o=r;return(...u)=>{const i=u.length;if(i===0)return e();if(i===1){let c=u[0];if(n.length!==0){const l=[...n];n=[],c=ft(e(c,l))}return e(c)}if(i===2){const c=u[0],l=u[1],g=o,d=t(l);if(o=d,g===r||d===g)return n.push(l),c;{const Re=[...n];n=[];const wt=e(c,Re);return M(wt)||n.push(l),wt}}}}}function Gn(t,e){return t=f(t),arguments.length===1?On(t):a(function*(){const n=F(e),r=n.next();r.done&&(yield*null);const o=r.value;let u=t(o),i=[o],c=[];for(;;){const l=n.next();if(l.done){yield i;break}const g=l.value,d=t(g);u==d?i.push(g):(yield i,c.push(g),i=c,u=d,c=[])}})}function U(t){const e=p(t);if(e!=null)return B(e);throw new Error(`Can't create empty of ${typeof t}`)}function qn(...t){const e=t[0];let n;return e==null?n={}:n=ne(U(e),e),L(n,...t.slice(1))}function te(t){return t[0]}function ee(t){return t[1]}function Bn(t,...e){t=f(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(u,i)=>{const c=te(i),l=ee(i);return Qt(u,c)?Q(u,c,t(w(u,c),l)):Q(u,c,l)};return E((u,i)=>E(r,u||{},v(i)),e)}else return null}function zn(){return performance.now()}function ne(...t){let e,n,r,o,u;switch(t.length){case 0:return[];case 1:return t[0];case 2:return St(t[0]??[],...s(t[1]));case 3:return e=t[0],n=t[1],r=t[2],o=j(e),u=(i,c)=>c===void 0?i:L(i,c),mt(n,u,o,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function Ln(t,e){return t===e}function lt(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[rt]:!0,[Ot]:t.length==1?function*(){const e=t[0];for(;;)yield e}:function*(){const[e,n]=t;for(var r=0;r<e;r++)yield n}}}function re(t){return M(t)?t:Y(t)}function $n(t){return e=>{let n=t;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1){const u=r[0];return e(u)}if(o===2){let u=r[0];const i=r[1],c=n,l=(n=n-1,n);return c>0&&(u=e(u,i)),l>0?u:re(u)}}}}function W(t,e){return arguments.length===1?$n(t):a(function*(){let n=t-1;for(const r of s(e))if(n-->=0&&(yield r),n<0)return})}function Fn(t,e){if(t==0)return null;if(Array.isArray(e))return v(e.slice(-Math.abs(t)));{let n=new Array(t),r=0;for(const o of s(e))n[r%t]=o,r++;return r%t!==0&&r>=t?n.slice(r%t).concat(n.slice(0,r%t)):(n.length=Math.min(r,t),n)}}function Pn(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const o=n[0],u=n[1];return h(t(u))?e(o,u):Y(o)}}}function J(t,e){return t=f(t),arguments.length===1?Pn(t):a(function*(){for(const n of s(e))if(h(t(n)))yield n;else return})}function Yn(t){return e=>{let n=-1;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1];return n++,Me(n,t)===0?e(u,i):u}}}}function Cn(t,e){return arguments.length===1?Yn(t):t<=0?lt(K(e)):a(function*(){let n=0;for(const r of s(e))n%t===0&&(yield r),n++})}function Dn(t,...e){return t=f(t),function(...n){return t(...e,...n)}}function Vn(t){return a(function*(){for(;;)yield*t})}function Un(t){return e=>{let n=t;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1],c=n;return n--,c>0?u:e(u,i)}}}}function X(t,e){return arguments.length===1?Un(t):a(function*(){const n=$(s(e));for(let r=0;r<t;r++)n.next();yield*n})}function Wn(t){return e=>{let n=!0;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=n,i=r[0],c=r[1];return u&&h(t(c))?i:(n=null,e(i,c))}}}}function oe(t,e){return t=f(t),arguments.length===1?Wn(t):a(function*(){const n=$(s(e));for(;;){const r=n.next();if(r.done)break;const o=r.value;if(!h(t(o))){yield o;break}}yield*n})}function Jn(){return t=>{const e=new Set;return(...n)=>{const r=n.length;if(r===0)return t();if(r===1)return t(n[0]);if(r===2){const o=n[0],u=n[1];return e.has(u)?o:(e.add(u),t(o,u))}}}}function Xn(t){return arguments.length===0?Jn():a(function*(){const e=new Set;for(const n of s(t))e.has(n)||(yield n),e.add(n)})}function Zn(t,e,n,...r){return n=f(n),Q(t,e,n(w(t,e),...r))}function at(t,e,n){let r=t;for(const o of e)r=w(r,o);return r===void 0?n:r}function Hn(t,e,n,...r){return n=f(n),vt(t,e,n(at(t,e),...r))}function pt(t,e,...n){return t=f(t),function(r,...o){return r?t(r,...n,...o):t(e,...n,...o)}}function ue(t,e){t=f(t);for(const n of s(e))if(!t(n))return!1;return!0}function tr(t,e){return!ue(t,e)}function er(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const o=n[0],u=n[1],i=t(u);return i==null?o:e(o,i)}}}function nr(t,e){return t=f(t),arguments.length===1?er(t):a(function*(){for(const n of s(e)){const r=t(n);h(r)&&(yield r)}})}function rr(t){return t=s(t),[...t].reverse()}function ht(t,e){return arguments.length===1&&(e=t,t=void 0),t=f(t),e=s(e),[...e].sort(t||b)}function or(t){return t===b?t:(e,n)=>{const r=t(e,n);return he(r)?r:r?-1:t(n,e)?1:0}}function ur(t,e,n){return arguments.length===2&&(n=e,e=b),t=f(t),e=f(e),ht((r,o)=>{const u=or(e),i=t(r),c=t(o);return u(i,c)},n)}function ir(t){const e=[...t];let n=t.length;for(;n;){const r=Math.floor(Math.random()*n--),o=e[n];e[n]=e[r],e[r]=o}return e}function ie(t,e){t=f(t);for(const n of s(e)){const r=t(n);if(h(r))return r}}function cr(t,e){return t=f(t),!ie(t,e)}function sr(t,e){return(Array.isArray(e)?ct:R)(r=>{const o=t[r];return o!==void 0?o:r},e)}function fr(t){return!v(t)}function ce(t){return Math.floor(Math.random()*t)}function lr(t){const e=ce(G(t));return jt(t,e)}function ar(t){return a(function*(){for(;;)yield t()})}function pr(t,e){arguments.length===1&&(e=t,t=void 0);const n=ar(e);return t?W(t,n):n}function _t(t,e,n,...r){const o=w(t,e);return A(t,e,n(o,...r))}function hr(t,e){t=f(t);const n={};for(const r of s(e)){const o=t(r);_t(n,o,pt(L,[]),r)}return n}function _r(t){const e={},n=pt(Kt,0);for(const r of s(t))_t(e,r,n);return e}class dr{constructor(e){this.f=e,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*s(this.res)}}function xr(t){const e=[...s(t)];return e.pop(),e.length>0?e:null}function yr(...t){const[e,n]=t.length>1?t:[1,t[0]];return R((r,o)=>r,n,X(e,n))}function mr(t,e){return[W(t,e),X(t,e)]}function wr(t,e){return[J(t,e),oe(t,e)]}function G(t){if(!t)return 0;const e=t.length||t.size;if(typeof e=="number")return e;let n=0;for(const r of s(t))n++;return n}function gr(t){return t===!0}function Ar(t){return t===!1}function br(t){return t!=null}function vr(t){return!!t}function Mr(t){return t===0}function Er(t){return t<0}function Rr(t){return t>0}function Sr(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function kr(t){return t.length}function Qr(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const o=[e,n,...r],u=o[o.length-1];let i=t,c=0;const l=o.length-2;for(;c<l;c++)i=i[o[c]];return i[o[c]]=u,n}}function Kr(t){for(const e of s(t));return null}function Ir(t){return k(t)}function jr(t){return[...t]}function Nr(t,e,n){return t._add_watch(e,n)}function Tr(t,e){return t._remove_watch(e)}function dt(t,e,n){if(!n)return e;var r=e;for(const o of s(n))r=t(r,o[0],o[1]);return r}function se(t,e,...n){return e==null?t:Math.max(t,e,...n)}function Or(t,e,...n){return e==null?t:Math.min(t,e,...n)}function fe(t){return t==null?!1:!!(z(t)||t instanceof Map)}function Gr(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function qr(...t){return(...e)=>{for(const n of t)for(const r of e){const o=n(r);if(o)return o}}}function le(t,e){return k(e||t)}function Br(t,e){var n=e;return a(function*(){for(;;)yield n,n=t(n)})}function zr(...t){return t=t.map(f),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function tt(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return v(P(t))}function Lr(t){return tt(tt(t))}function b(t,e){if(t===e)return 0;{if(t==null)return-1;if(e==null)return 1;const n=typeof t,r=typeof e;if(n==="number"&&r==="number"||n==="string"&&r==="string")return t===e?0:t<e?-1:1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length<e.length)return-1;if(t.length>e.length)return 1;for(let o=0;o<t.length;o++){let u=b(t[o],e[o]);if(u!=0)return u}return 0}else throw new Error(`comparing ${n} to ${r}`)}}function $r(t){return le(t)}function h(t){return t!=null&&t!==!1}const Fr=h;function ae(t,e,n){return t.substring(e,n)}function pe(t){return typeof t=="function"}function Pr(t,e){return a(function*(){for(;;){const n=t.exec(e);if(n){const r=n[0];yield n.length===1?r:k(n);const u=n.index+se(1,r.length);if(u>e.length)break;e=ae(e,u)}else break}})}function Yr(t){return Number.isNaN(t)}function he(t){return typeof t=="number"}function _e(t){return t?Object.keys(t):null}function Cr(t){return _e(t)}function Dr(t){return t?Object.values(t):null}function xt(t){return typeof t=="string"}function Vr(t){return p(t)!=null}function Ur(t){return t instanceof RegExp}class yt extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function Wr(t){return t instanceof yt?t._data:null}function Jr(t){return t instanceof Error?t.message:null}function Xr(t){return t instanceof yt?t._cause:null}function Zr(t,e,n){return new yt(t,e,n)}function de(t){return Number.isInteger(t)}const Hr=de,xe=Symbol("meta");function to(t){return t instanceof Object?t[xe]:null}function eo(t,e){const n=j(t);return n[xe]=e,n}function no(t){return t===!0||t===!1}function ye(t){switch(p(t)){case x:case _:case y:case S:case m:return!0}return!1}function ro(t,e){return ye(e)?G(e):G(W(t,e))}function oo(t,e){const n=w(t,e);if(n!==void 0)return[e,n]}function uo(t,e){return(t%e+e)%e}function io(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i<=r&&(r=i,o=u)}),o}function co(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i>=r&&(r=i,o=u)}),o}function so(t){throw new Error(`Expected string, got: ${typeof t}`)}function fo(t){if(xt(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return so(t)}function me(t){return t>=0?Math.floor(t):Math.ceil(t)}function we(t,e){const n=t%e;return me((t-n)/e)}function ge(t,...e){if(e.length==0)for(;;){const n=t();if(h(pe(n))){t=n;continue}else return n}else return ge(function(){return Ct(t,e)})}function mt(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return mt(t,n,n(),r)}default:{let n=e[0];const r=e[1],o=e[2];n=t(n);const u=E(n,r,o);return n(u)}}}function lo(t,e){const n={},r=s(t)[Symbol.iterator](),o=s(e)[Symbol.iterator]();let u,i;for(;u=r.next(),!(u.done||(i=o.next(),i.done));)n[u.value]=i.value;return n}function ao(t){return v(t)?t:null}function Ae(t,e,n){const r=function*(o){if(yield o,h(t(o)))for(const u of s(e(o)))yield*r(u)};return a(function*(){yield*r(n)})}function po(t){return C(O(H),P(Ae(H,v,t)))}function ho(t){return j(t)}function _o(t){return Object.freeze(t)}class N{constructor(e){e instanceof N||(e=ht(e));const r=new Set(e);this._elts=[...r],this._set=r}add(e){if(this._set.has(e))return this;const n=this._elts;let r=!1;for(let o=0;o<n.length;o++)if(b(e,n[o])<=0){n.splice(o,0,e),r=!0;break}return r?this._set=new Set(n):(n.push(e),this._set.add(e)),this.size=n.length,this}delete(e){if(!this._set.has(e))return this;const n=this._elts,r=n.indexOf(e);return n.splice(r,1),this._set=new Set(n),this.size=n.length,this}has(e){return this._set.has(e)}keys(){return this.values()}values(){return this._elts[Symbol.iterator]()}entries(){return this._set.entries()}forEach(...e){return this.set.forEach(...e)}clear(){this._elts=[],this._set=new Set(this._elts)}[Symbol.iterator](){return this.keys()}}function xo(...t){return new N(t)}function et(t,e,n){return r=>e(b(r,n),0)}function be(t,e,n=!0){let r=0;for(;r<t.length&&b(e,t[r])>0;r++);return r}function yo([t,e,n]){const r=et(t,e,n);if(e===gt||e===At){const o=[...t],u=be(o,n,!0);return o.splice(0,u),r(o[0])||o.splice(0,1),o}else return[...J(r,t)]}function mo([t,e,n,r,o]){const u=[...t],i=be(u,n,!0);u.splice(0,i);const c=et(t,r,o);return et(t,e,n)(u[0])||u.splice(0,1),[...J(c,u)]}function wo(...t){if(t.length===3)return yo(t);if(t.length===5)return mo(t)}function go(t){return Math.abs(t)}function Ao(t){return me(t)}function bo(t){return t!=null&&t.constructor}function vo(t){return(e,n)=>{const r=t(e,n);return M(r)?Y(r):r}}function ve(t){return t=vo(t),(...e)=>{switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return E(t,e[0],e[1])}}}function Me(t,e){const n=we(t,e);return t-e*n}function Mo(t){const e=new Map;return(...n)=>{const r=[n.length,...n],o=at(e,r);if(o===void 0){const u=t(...n);return Mt(e,r,u),u}else return o}}function Eo(t){return V(t)?t[t.length-1]:K(t)}function Ro(t){if(V(t)){const e=[...t];return e.pop(),e}else return P(t)}function So(t,e){const n=U(t),r=bt(t)||A;return dt((o,u,i)=>r(o,e(u),i),n,t),n}function Ee(t,e){const n=U(t),r=bt(t)||A;return dt((o,u,i)=>r(o,u,e(i)),n,t),n}function ko(){return crypto.randomUUID()}class Qo{constructor(e){this.f=e}_deref(){return this.realized?this.v:(this.v=this.f(),this.realized=!0,this.v)}}function nt(t,e){if(e.has(t))return t;if(e.add(t),fe(t))return Ee(t,r=>nt(r,e));const n=p(t);return n&&n!=y?ct(r=>nt(r,e),t):t}function Ko(t){return nt(t,new Set)}function Io(t,e){E((n,r)=>t(r),null,e)}return je(jo);})();
|
|
1
|
+
var squint;(squint||={}).core=(()=>{var Z=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var Qe=Object.getOwnPropertyNames;var ke=Object.prototype.hasOwnProperty;var Ke=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})},Ie=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Qe(e))!ke.call(t,o)&&o!==n&&Z(t,o,{get:()=>e[o],enumerable:!(r=Se(e,o))||r.enumerable});return t};var je=t=>Ie(Z({},"__esModule",{value:!0}),t);var No={};Ke(No,{Atom:()=>Ft,Cons:()=>Bt,Delay:()=>ko,IIterable:()=>rt,IIterable__iterator:()=>Ot,LazySeq:()=>dr,NaN_QMARK_:()=>Yr,PROTOCOL_SENTINEL:()=>pn,_:()=>Be,_EQ_:()=>Ne,_GT_:()=>gt,_GT__EQ_:()=>At,_LT_:()=>Te,_LT__EQ_:()=>Oe,_PLUS_:()=>Ge,_STAR_:()=>qe,__protocol_satisfies:()=>ze,_iterator:()=>$,abs:()=>go,aclone:()=>jr,add_watch:()=>Nr,alength:()=>Qr,apply:()=>Ct,array_QMARK_:()=>V,aset:()=>kr,assoc:()=>k,assoc_BANG_:()=>A,assoc_in:()=>vt,assoc_in_BANG_:()=>Mt,atom:()=>dn,boolean$:()=>vr,boolean_QMARK_:()=>no,bounded_count:()=>ro,butlast:()=>xr,cat:()=>ve,clj__GT_js:()=>Ko,coll_QMARK_:()=>Vr,comp:()=>Et,compare:()=>b,complement:()=>O,concat:()=>Ut,conj:()=>St,conj_BANG_:()=>L,cons:()=>en,constantly:()=>Rn,contains_QMARK_:()=>kt,count:()=>G,counted_QMARK_:()=>ye,cycle:()=>Vn,dec:()=>Ue,deref:()=>ut,disj:()=>Ce,disj_BANG_:()=>Qt,dissoc:()=>Ve,dissoc_BANG_:()=>De,distinct:()=>Xn,doall:()=>Ir,dorun:()=>Kr,drop:()=>X,drop_last:()=>yr,drop_while:()=>oe,empty:()=>U,empty_QMARK_:()=>fr,ensure_reduced:()=>re,es6_iterator:()=>F,even_QMARK_:()=>Dt,every_QMARK_:()=>ue,every_pred:()=>Gr,ex_cause:()=>Xr,ex_data:()=>Wr,ex_info:()=>Zr,ex_message:()=>Jr,false_QMARK_:()=>Ar,ffirst:()=>Je,filter:()=>C,filterv:()=>nn,find:()=>oo,first:()=>K,flatten:()=>po,fn_QMARK_:()=>pe,fnil:()=>pt,frequencies:()=>_r,get:()=>w,get_in:()=>at,group_by:()=>hr,identical_QMARK_:()=>Ln,identity:()=>Wt,inc:()=>Kt,int_QMARK_:()=>de,integer_QMARK_:()=>Hr,interleave:()=>Jt,interpose:()=>Kn,into:()=>ne,into_array:()=>le,iterable:()=>s,iterate:()=>Br,js_keys:()=>Cr,js_obj:()=>Sr,juxt:()=>zr,keep:()=>nr,keep_indexed:()=>fn,key:()=>te,keys:()=>_e,last:()=>Xe,lazy:()=>a,list:()=>Vt,list_QMARK_:()=>Sn,long$:()=>Ao,map:()=>R,map_QMARK_:()=>fe,map_indexed:()=>un,mapcat:()=>Qn,mapv:()=>ct,max:()=>se,max_key:()=>co,memoize:()=>Mo,merge:()=>qn,merge_with:()=>Bn,meta:()=>to,min:()=>Or,min_key:()=>io,mod:()=>uo,neg_QMARK_:()=>Er,next:()=>tt,nil_QMARK_:()=>an,nnext:()=>Lr,not:()=>Lt,not_EQ_:()=>jo,not_any_QMARK_:()=>cr,not_empty:()=>ao,not_every_QMARK_:()=>tr,nth:()=>jt,number_QMARK_:()=>he,object_QMARK_:()=>Pe,odd_QMARK_:()=>En,parse_long:()=>fo,partial:()=>Dn,partition:()=>Zt,partition_all:()=>Xt,partition_by:()=>Gn,partitionv:()=>Nn,partitionv_all:()=>Tn,peek:()=>Eo,persistent_BANG_:()=>_o,pop:()=>Ro,pos_QMARK_:()=>Rr,pr_str:()=>$t,println:()=>It,prn:()=>_n,quot:()=>we,rand_int:()=>ce,rand_nth:()=>lr,random_uuid:()=>Qo,range:()=>yn,re_find:()=>wn,re_matches:()=>mn,re_pattern:()=>gn,re_seq:()=>Pr,reduce:()=>E,reduce_kv:()=>dt,reduced:()=>Y,reduced_QMARK_:()=>M,reductions:()=>He,regexp_QMARK_:()=>Ur,rem:()=>Me,remove:()=>rn,remove_watch:()=>Tr,repeat:()=>lt,repeatedly:()=>pr,replace:()=>sr,reset_BANG_:()=>Pt,rest:()=>P,reverse:()=>rr,run_BANG_:()=>Io,satisfies_QMARK_:()=>Le,second:()=>We,select_keys:()=>In,seq:()=>v,seq_QMARK_:()=>Nt,seqable_QMARK_:()=>Tt,sequential_QMARK_:()=>H,set:()=>vn,set_QMARK_:()=>Mn,shuffle:()=>ir,some:()=>ie,some_QMARK_:()=>br,some_fn:()=>qr,sort:()=>ht,sort_by:()=>ur,sorted_set:()=>xo,split_at:()=>mr,split_with:()=>wr,str:()=>ln,string_QMARK_:()=>xt,subs:()=>ae,subseq:()=>wo,subvec:()=>An,swap_BANG_:()=>xn,system_time:()=>zn,t:()=>Fr,take:()=>W,take_last:()=>Fn,take_nth:()=>Cn,take_while:()=>J,to_array:()=>$r,trampoline:()=>ge,transduce:()=>mt,transient$:()=>ho,tree_seq:()=>Ae,true_QMARK_:()=>gr,truth_:()=>h,type:()=>bo,unreduced:()=>ft,update:()=>Zn,update_BANG_:()=>_t,update_in:()=>Hn,update_keys:()=>So,update_vals:()=>Ee,val:()=>ee,vals:()=>Dr,vec:()=>Q,vector:()=>it,vector_QMARK_:()=>bn,warn_on_lazy_reusage_BANG_:()=>tn,with_meta:()=>eo,zero_QMARK_:()=>Mr,zipmap:()=>lo});function f(t){if(t==null||t instanceof Function)return t;const e=typeof t;return e==="string"?(n,r)=>w(n,t,r):e==="object"?(n,r)=>w(t,n,r):t}function I(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function Ne(...t){return I(t,(e,n)=>e===n)}function gt(...t){return I(t,(e,n)=>e>n)}function At(...t){return I(t,(e,n)=>e>=n)}function Te(...t){return I(t,(e,n)=>e<n)}function Oe(...t){return I(t,(e,n)=>e<=n)}function Ge(...t){return t.reduce((e,n)=>e+n,0)}function qe(...t){return t.reduce((e,n)=>e*n,1)}function Be(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}const ze={};function Le(t,e){return e==null?t[null]:typeof t=="symbol"?e[t]:e[t.__sym]}function $e(t,e,n){return t.set(e,n),t}function Fe(t,e,n){return t[e]=n,t}function bt(t){switch(p(t)){case _:return $e;case x:case y:return Fe}}function A(t,e,n,...r){if(r.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(t)){case _:t.set(e,n);for(let o=0;o<r.length;o+=2)t.set(r[o],r[o+1]);break;case x:case y:t[e]=n;for(let o=0;o<r.length;o+=2)t[r[o]]=r[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof t}.`)}return t}function j(t){switch(p(t)){case _:return new Map(t);case m:return new t.constructor(t);case x:return[...t];case y:return{...t};default:throw new Error(`Don't know how to copy object of type ${typeof t}.`)}}function k(t,e,n,...r){t||(t={});const o=j(t);return A(o,e,n,...r),o}const _=1,x=2,y=3,S=4,m=5,q=6;function B(t){switch(t){case _:return new Map;case x:return[];case y:return{};case S:return new D;case m:return new Set;case q:return a(function*(){})}}function z(t){return t.constructor===Object}function Pe(t){return t!=null&&z(t)}function p(t){if(t!=null){if(z(t))return y;if(t instanceof Map)return _;if(t instanceof Set)return m;if(t instanceof D)return S;if(Array.isArray(t))return x;if(t instanceof ot)return q;if(t instanceof N)return m;if(t instanceof Object)return y}}function Ye(t,e,n,r,o){r=Q(r);const u=p(n);if(u!==_&&u!==x&&u!==y)throw new Error(`Illegal argument: ${e} expects the first argument to be a Map, Array, or Object.`);const i=[n];let c=n;for(let l=0;l<r.length-1;l+=1){const g=r[l];let d;c instanceof Map?d=c.get(g):d=c[g],d||(d=B(u)),i.push(d),c=d}i.push(o);for(let l=i.length-2;l>=0;l-=1)i[l]=t(i[l],r[l],i[l+1]);return i[0]}function vt(t,e,n){return Ye(k,"assoc-in",t,e,n)}function Mt(t,e,n){e=Q(e);var r=t;const o=p(t);for(const u of e.splice(0,e.length-1)){let i=w(r,u);i===void 0&&(i=B(o),A(r,u,i)),r=i}return A(r,e[e.length-1],n),t}function Et(...t){if(t=t.map(f),t.length===0)return Wt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let o=e(...r);for(const u of n)o=u(o);return o}}function Rt(t,e){for(const n of e)t.add(n);return t}function L(...t){if(t.length===0)return it();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case m:Rt(r,n);break;case S:r.unshift(...n.reverse());break;case x:r.push(...n);break;case _:for(const o of n)Array.isArray(o)?r.set(o[0],o[1]):s(o).forEach(u=>{r.set(u[0],u[1])});break;case y:for(const o of n)Array.isArray(o)?r[o[0]]=o[1]:Object.assign(r,o);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function St(...t){if(t.length===0)return it();const[e,...n]=t;let r=e;r==null&&(r=Vt());let o,u;switch(p(r)){case m:return r instanceof N?Rt(new r.constructor(r),n):new r.constructor([...r,...n]);case S:return new D(...n.reverse(),...r);case x:return[...r,...n];case _:o=new Map(r);for(const i of n)Array.isArray(i)?o.set(i[0],i[1]):s(i).forEach(c=>{o.set(c[0],c[1])});return o;case q:return a(function*(){yield*n,yield*r});case y:u={...r};for(const i of n)Array.isArray(i)?u[i[0]]=i[1]:Object.assign(u,i);return u;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function Qt(t,...e){for(const n of e)t.delete(n);return t}function Ce(t,...e){const n=new t.constructor([...t]);return Qt(n,...e)}function kt(t,e){switch(p(t)){case m:case _:return t.has(e);case void 0:return!1;default:return e in t}}function De(t,...e){for(const n of e)delete t[n];return t}function Ve(t,...e){if(e.length===0)return t;const n=j(t);switch(p(t)){case _:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function Kt(t){return t+1}function Ue(t){return t-1}function It(...t){console.log(...t)}function jt(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const o=s(t);let u=0;for(const i of o)if(u++==e){r=i;break}}if(r!==void 0)return r}return n}function w(t,e,n=void 0){if(t==null)return n;let r;if(z(t))return r=t[e],r===void 0?n:r;let o;switch(p(t)){case m:t.has(e)&&(r=e);break;case _:r=t.get(e);break;case x:r=t[e];break;default:if(o=t.get,o instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function Nt(t){return t!=null&&!!t[Symbol.iterator]}const H=Nt;function Tt(t){return t==null||!!t[Symbol.iterator]}function s(t){if(t==null)return[];if(Tt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const rt=Symbol("Iterable"),Ot=Symbol.iterator;function $(t){return t[Symbol.iterator]()}const F=$;function v(t){if(t==null)return t;const e=s(t);return e.length===0||e.size===0||e[Symbol.iterator]().next().done?null:e}function K(t){const[e]=s(t);return e}function We(t){const[e,n]=s(t);return n}function Je(t){return K(K(t))}function P(t){return a(function*(){let e=!0;for(const n of s(t))e?e=!1:yield n})}class T{value;constructor(e){this.value=e}_deref(){return this.value}}function Xe(t){t=s(t);let e;switch(p(t)){case x:return t[t.length-1];default:for(const n of t)e=n;return e}}function Y(t){return new T(t)}function M(t){return t instanceof T}function E(t,e,n){t=f(t);let r,o;if(arguments.length===2){const u=s(e)[Symbol.iterator](),i=u.next();i.done?o=t():o=i.value,r=u}else o=e,r=s(n);if(o instanceof T)return o.value;for(const u of r)if(o=t(o,u),o instanceof T){o=o.value;break}return o}function*Ze(t,e){const n=e.next();n.done?yield t():yield*Gt(t,n.value,e)}function*Gt(t,e,n){let r=e,o=n;for(;;){if(M(r)){yield r.value;return}else yield r;const u=o.next();if(u.done)break;r=t(r,u.value)}}function He(t,e,n){return t=f(t),arguments.length===2?a(function*(){yield*Ze(t,s(e)[Symbol.iterator]())}):a(function*(){yield*Gt(t,e,s(n)[Symbol.iterator]())})}var qt=!1;function tn(){qt=!0}class ot{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&qt)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}ot.prototype[rt]=!0;function a(t){return new ot(t)}class Bt{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*s(this.coll)}}function en(t,e){return new Bt(t,e)}function R(t,...e){switch(t=f(t),e.length){case 0:return n=>(...r)=>{switch(r.length){case 0:return n();case 1:return n(r[0]);case 2:return n(r[0],t(r[1]));default:return n(r[0],t(...r.slice(1)))}};case 1:return a(function*(){for(const n of s(e[0]))yield t(n)});default:return a(function*(){const n=e.map(r=>F(s(r)));for(;;){const r=[];for(const o of n){const u=o.next();if(u.done)return;r.push(u.value)}yield t(...r)}})}}function zt(t){return e=>(...n)=>{switch(n.length){case 0:return e();case 1:return e(n[0]);case 2:{const r=n[0],o=n[1];return h(t(o))?e(r,o):r}}}}function C(t,e){return arguments.length===1?zt(t):(t=f(t),a(function*(){for(const n of s(e))h(t(n))&&(yield n)}))}function nn(t,e){return[...C(t,e)]}function rn(t,e){return arguments.length===1?zt(O(t)):C(O(t),e)}function on(t){return e=>{let n=-1;return(...r)=>{switch(r.length){case 0:return e();case 1:return e(r[0]);case 2:return e(r[0],t((n=n+1,n),r[1]))}}}}function un(t,e){if(t=f(t),arguments.length===1)return on(t);const n=[];let r=0;for(const o of s(e))n.push(t(r,o)),r++;return n}function cn(t,e){t=f(t);const n=[];let r=0;for(const o of s(e)){const u=t(r,o);h(u)&&n.push(u),r++}return n}function sn(t){return e=>{let n=-1;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1];n++;const c=t(n,i);return c==null?u:e(u,c)}}}}function fn(t,e){return arguments.length===1?sn(t):cn(t,e)}function ln(...t){return t.join("")}function Lt(t){return!h(t)}function an(t){return t==null}const pn={};function hn(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case m:case q:return[...n];case _:return Object.fromEntries(n);default:return n}})}function $t(...t){return t.map(hn).join(" ")}function _n(...t){It($t(...t))}class Ft{constructor(e){this.val=e,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=n=>{const r=this.val;if(this.val=n,this._hasWatches)for(const o of Object.entries(this._watches)){const u=o[0],i=o[1];i(u,this,r,n)}return n},this._add_watch=(n,r)=>{this._watches[n]=r,this._hasWatches=!0},this._remove_watch=n=>{delete this._watches[n]}}}function dn(t){return new Ft(t)}function ut(t){return t._deref()}function Pt(t,e){t._reset_BANG_(e)}function xn(t,e,...n){e=f(e);const r=e(ut(t),...n);return Pt(t,r),r}function yn(t,e,n){return a(function*(){let r=t,o=e,u=n;e===void 0&&(r=0,o=t);let i=r||0;u=n??1;const c=u>=0;for(;o===void 0||c&&i<o||!c&&o<i;)yield i,i+=u})}function mn(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function wn(t,e){if(xt(e)){const n=t.exec(e);return n!=null?n.length===1?n[0]:[...n]:null}else throw new TypeError("re-find must match against a string.")}function gn(t){if(t instanceof RegExp)return t;const e=t.match(/^\(\?([dgimsuvy]*)\)/);return e?new RegExp(t.slice(e[0].length),e[1]):new RegExp(t)}function An(t,e,n){return t.slice(e,n)}function it(...t){return t}function bn(t){return p(t)===x}function ct(...t){if(t.length===2){const[r,o]=t,u=s(o);if(Array.isArray(u)){const i=new Array(u.length);for(var e=0;e<u.length;e++)i[e]=r(u[e]);return i}else{var n=[];for(const i of u)n.push(r(i));return n}}return[...R(...t)]}function Q(t){return V(t)?t:[...s(t)]}function vn(t){return new Set(s(t))}function Mn(t){return p(t)===m}const Yt=Symbol("IApply__apply");function Ct(t,...e){t=f(t);const n=e.slice(0,e.length-1),r=s(e[e.length-1]),o=t[Yt];return o?o(...n,r):t(...n,...r)}function Dt(t){return t%2==0}function En(t){return!Dt(t)}function O(t){return t=f(t),(...e)=>Lt(t(...e))}function Rn(t){return(...e)=>t}class D extends Array{constructor(...e){super(),this.push(...e)}}function Sn(t){return p(t)===S}function Vt(...t){return new D(...t)}function V(t){return Array.isArray(t)}function st(t){return a(function*(){for(const e of t)yield*s(e)})}function Ut(...t){return st(t)}Ut[Yt]=t=>st(t);function Qn(t,...e){if(e.length===0)return Et(R(t),ve);{const n=R(t,...e);return st(n)}}function Wt(t){return t}function Jt(...t){return a(function*(){const e=t.map(n=>F(s(n)));for(;;){const n=[];for(const r of e){const o=r.next();if(o.done)return;n.push(o.value)}yield*n}})}function kn(t){return e=>{let n=!1;return(...r)=>{switch(r.length){case 0:return e();case 1:return e(r[0]);case 2:if(n){const o=e(r[0],t);return M(o)?o:e(o,r[1])}else return n=!0,e(r[0],r[1])}}}}function Kn(t,e){return arguments.length===1?kn(t):X(1,Jt(lt(t),e))}function In(t,e){const n=p(t),r=B(n)||{};for(const o of e){const u=w(t,o);u!=null&&A(r,o,u)}return r}function ft(t){return M(t)?ut(t):t}function jn(t){return e=>{let n=[];return(...r)=>{let o,u;switch(r.length){case 0:return e();case 1:return o=r[0],n.length!==0&&(u=[...n],n=[],o=ft(e(o,u))),e(o);case 2:return o=r[0],n.push(r[1]),t===n.length?(u=[...n],n=[],e(o,u)):o}}}}function Xt(t,...e){if(arguments.length===1)return jn(t);let n=t,r=e[0];return e.length===2&&([n,r]=e),Ht(t,n,[],r,!0)}function Zt(t,...e){let n=t,r=[],o=e[0];return e.length===2?[n,o]=e:e.length>2&&([n,r,o]=e),Ht(t,n,r,o,!1)}const Nn=Zt,Tn=Xt;function Ht(t,e,n,r,o){return a(function*(){let u=[],i=0;for(const c of s(r))i<t&&(u.push(c),u.length===t&&(yield u,u=e<t?u.slice(e):[])),i++,i===e&&(i=0);u.length>0&&(u.length===t||o?yield u:n.length&&(u.push(...n.slice(0,t-u.length)),yield u))})}function On(t){return e=>{let n=[];const r={};let o=r;return(...u)=>{const i=u.length;if(i===0)return e();if(i===1){let c=u[0];if(n.length!==0){const l=[...n];n=[],c=ft(e(c,l))}return e(c)}if(i===2){const c=u[0],l=u[1],g=o,d=t(l);if(o=d,g===r||d===g)return n.push(l),c;{const Re=[...n];n=[];const wt=e(c,Re);return M(wt)||n.push(l),wt}}}}}function Gn(t,e){return t=f(t),arguments.length===1?On(t):a(function*(){const n=F(e),r=n.next();r.done&&(yield*null);const o=r.value;let u=t(o),i=[o],c=[];for(;;){const l=n.next();if(l.done){yield i;break}const g=l.value,d=t(g);u==d?i.push(g):(yield i,c.push(g),i=c,u=d,c=[])}})}function U(t){const e=p(t);if(e!=null)return B(e);throw new Error(`Can't create empty of ${typeof t}`)}function qn(...t){const e=t[0];let n;return e==null?n={}:n=ne(U(e),e),L(n,...t.slice(1))}function te(t){return t[0]}function ee(t){return t[1]}function Bn(t,...e){t=f(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(u,i)=>{const c=te(i),l=ee(i);return kt(u,c)?k(u,c,t(w(u,c),l)):k(u,c,l)};return E((u,i)=>E(r,u||{},v(i)),e)}else return null}function zn(){return performance.now()}function ne(...t){let e,n,r,o,u;switch(t.length){case 0:return[];case 1:return t[0];case 2:return St(t[0]??[],...s(t[1]));case 3:return e=t[0],n=t[1],r=t[2],o=j(e),u=(i,c)=>c===void 0?i:L(i,c),mt(n,u,o,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function Ln(t,e){return t===e}function lt(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[rt]:!0,[Ot]:t.length==1?function*(){const e=t[0];for(;;)yield e}:function*(){const[e,n]=t;for(var r=0;r<e;r++)yield n}}}function re(t){return M(t)?t:Y(t)}function $n(t){return e=>{let n=t;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1){const u=r[0];return e(u)}if(o===2){let u=r[0];const i=r[1],c=n,l=(n=n-1,n);return c>0&&(u=e(u,i)),l>0?u:re(u)}}}}function W(t,e){return arguments.length===1?$n(t):a(function*(){let n=t-1;for(const r of s(e))if(n-->=0&&(yield r),n<0)return})}function Fn(t,e){if(t==0)return null;if(Array.isArray(e))return v(e.slice(-Math.abs(t)));{let n=new Array(t),r=0;for(const o of s(e))n[r%t]=o,r++;return r%t!==0&&r>=t?n.slice(r%t).concat(n.slice(0,r%t)):(n.length=Math.min(r,t),n)}}function Pn(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const o=n[0],u=n[1];return h(t(u))?e(o,u):Y(o)}}}function J(t,e){return t=f(t),arguments.length===1?Pn(t):a(function*(){for(const n of s(e))if(h(t(n)))yield n;else return})}function Yn(t){return e=>{let n=-1;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1];return n++,Me(n,t)===0?e(u,i):u}}}}function Cn(t,e){return arguments.length===1?Yn(t):t<=0?lt(K(e)):a(function*(){let n=0;for(const r of s(e))n%t===0&&(yield r),n++})}function Dn(t,...e){return t=f(t),function(...n){return t(...e,...n)}}function Vn(t){return a(function*(){for(;;)yield*t})}function Un(t){return e=>{let n=t;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1],c=n;return n--,c>0?u:e(u,i)}}}}function X(t,e){return arguments.length===1?Un(t):a(function*(){const n=$(s(e));for(let r=0;r<t;r++)n.next();yield*n})}function Wn(t){return e=>{let n=!0;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=n,i=r[0],c=r[1];return u&&h(t(c))?i:(n=null,e(i,c))}}}}function oe(t,e){return t=f(t),arguments.length===1?Wn(t):a(function*(){const n=$(s(e));for(;;){const r=n.next();if(r.done)break;const o=r.value;if(!h(t(o))){yield o;break}}yield*n})}function Jn(){return t=>{const e=new Set;return(...n)=>{const r=n.length;if(r===0)return t();if(r===1)return t(n[0]);if(r===2){const o=n[0],u=n[1];return e.has(u)?o:(e.add(u),t(o,u))}}}}function Xn(t){return arguments.length===0?Jn():a(function*(){const e=new Set;for(const n of s(t))e.has(n)||(yield n),e.add(n)})}function Zn(t,e,n,...r){return n=f(n),k(t,e,n(w(t,e),...r))}function at(t,e,n){let r=t;for(const o of e)r=w(r,o);return r===void 0?n:r}function Hn(t,e,n,...r){return n=f(n),vt(t,e,n(at(t,e),...r))}function pt(t,e,...n){return t=f(t),function(r,...o){return r?t(r,...n,...o):t(e,...n,...o)}}function ue(t,e){t=f(t);for(const n of s(e))if(!t(n))return!1;return!0}function tr(t,e){return!ue(t,e)}function er(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const o=n[0],u=n[1],i=t(u);return i==null?o:e(o,i)}}}function nr(t,e){return t=f(t),arguments.length===1?er(t):a(function*(){for(const n of s(e)){const r=t(n);h(r)&&(yield r)}})}function rr(t){return t=s(t),[...t].reverse()}function ht(t,e){return arguments.length===1&&(e=t,t=void 0),t=f(t),e=s(e),[...e].sort(t||b)}function or(t){return t===b?t:(e,n)=>{const r=t(e,n);return he(r)?r:r?-1:t(n,e)?1:0}}function ur(t,e,n){return arguments.length===2&&(n=e,e=b),t=f(t),e=f(e),ht((r,o)=>{const u=or(e),i=t(r),c=t(o);return u(i,c)},n)}function ir(t){const e=[...t];let n=t.length;for(;n;){const r=Math.floor(Math.random()*n--),o=e[n];e[n]=e[r],e[r]=o}return e}function ie(t,e){t=f(t);for(const n of s(e)){const r=t(n);if(h(r))return r}}function cr(t,e){return t=f(t),!ie(t,e)}function sr(t,e){return(Array.isArray(e)?ct:R)(r=>{const o=t[r];return o!==void 0?o:r},e)}function fr(t){return!v(t)}function ce(t){return Math.floor(Math.random()*t)}function lr(t){const e=ce(G(t));return jt(t,e)}function ar(t){return a(function*(){for(;;)yield t()})}function pr(t,e){arguments.length===1&&(e=t,t=void 0);const n=ar(e);return t?W(t,n):n}function _t(t,e,n,...r){const o=w(t,e);return A(t,e,n(o,...r))}function hr(t,e){t=f(t);const n={};for(const r of s(e)){const o=t(r);_t(n,o,pt(L,[]),r)}return n}function _r(t){const e={},n=pt(Kt,0);for(const r of s(t))_t(e,r,n);return e}class dr{constructor(e){this.f=e,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*s(this.res)}}function xr(t){const e=[...s(t)];return e.pop(),e.length>0?e:null}function yr(...t){const[e,n]=t.length>1?t:[1,t[0]];return R((r,o)=>r,n,X(e,n))}function mr(t,e){return[W(t,e),X(t,e)]}function wr(t,e){return[J(t,e),oe(t,e)]}function G(t){if(!t)return 0;const e=t.length||t.size;if(typeof e=="number")return e;let n=0;for(const r of s(t))n++;return n}function gr(t){return t===!0}function Ar(t){return t===!1}function br(t){return t!=null}function vr(t){return!!t}function Mr(t){return t===0}function Er(t){return t<0}function Rr(t){return t>0}function Sr(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function Qr(t){return t.length}function kr(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const o=[e,n,...r],u=o[o.length-1];let i=t,c=0;const l=o.length-2;for(;c<l;c++)i=i[o[c]];return i[o[c]]=u,n}}function Kr(t){for(const e of s(t));return null}function Ir(t){return Q(t)}function jr(t){return[...t]}function Nr(t,e,n){return t._add_watch(e,n)}function Tr(t,e){return t._remove_watch(e)}function dt(t,e,n){if(!n)return e;var r=e;for(const o of s(n))r=t(r,o[0],o[1]);return r}function se(t,e,...n){return e==null?t:Math.max(t,e,...n)}function Or(t,e,...n){return e==null?t:Math.min(t,e,...n)}function fe(t){return t==null?!1:!!(z(t)||t instanceof Map)}function Gr(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function qr(...t){return(...e)=>{for(const n of t)for(const r of e){const o=n(r);if(o)return o}}}function le(t,e){return Q(e||t)}function Br(t,e){var n=e;return a(function*(){for(;;)yield n,n=t(n)})}function zr(...t){return t=t.map(f),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function tt(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return v(P(t))}function Lr(t){return tt(tt(t))}function b(t,e){if(t===e)return 0;{if(t==null)return-1;if(e==null)return 1;const n=typeof t,r=typeof e;if(n==="number"&&r==="number"||n==="string"&&r==="string")return t===e?0:t<e?-1:1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length<e.length)return-1;if(t.length>e.length)return 1;for(let o=0;o<t.length;o++){let u=b(t[o],e[o]);if(u!=0)return u}return 0}else throw new Error(`comparing ${n} to ${r}`)}}function $r(t){return le(t)}function h(t){return t!=null&&t!==!1}const Fr=h;function ae(t,e,n){return t.substring(e,n)}function pe(t){return typeof t=="function"}function Pr(t,e){return a(function*(){for(;;){const n=t.exec(e);if(n){const r=n[0];yield n.length===1?r:Q(n);const u=n.index+se(1,r.length);if(u>e.length)break;e=ae(e,u)}else break}})}function Yr(t){return Number.isNaN(t)}function he(t){return typeof t=="number"}function _e(t){return t?Object.keys(t):null}function Cr(t){return _e(t)}function Dr(t){return t?Object.values(t):null}function xt(t){return typeof t=="string"}function Vr(t){return p(t)!=null}function Ur(t){return t instanceof RegExp}class yt extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function Wr(t){return t instanceof yt?t._data:null}function Jr(t){return t instanceof Error?t.message:null}function Xr(t){return t instanceof yt?t._cause:null}function Zr(t,e,n){return new yt(t,e,n)}function de(t){return Number.isInteger(t)}const Hr=de,xe=Symbol("meta");function to(t){return t instanceof Object?t[xe]:null}function eo(t,e){const n=j(t);return n[xe]=e,n}function no(t){return t===!0||t===!1}function ye(t){switch(p(t)){case x:case _:case y:case S:case m:return!0}return!1}function ro(t,e){return ye(e)?G(e):G(W(t,e))}function oo(t,e){const n=w(t,e);if(n!==void 0)return[e,n]}function uo(t,e){return(t%e+e)%e}function io(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i<=r&&(r=i,o=u)}),o}function co(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i>=r&&(r=i,o=u)}),o}function so(t){throw new Error(`Expected string, got: ${typeof t}`)}function fo(t){if(xt(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return so(t)}function me(t){return t>=0?Math.floor(t):Math.ceil(t)}function we(t,e){const n=t%e;return me((t-n)/e)}function ge(t,...e){if(e.length==0)for(;;){const n=t();if(h(pe(n))){t=n;continue}else return n}else return ge(function(){return Ct(t,e)})}function mt(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return mt(t,n,n(),r)}default:{let n=e[0];const r=e[1],o=e[2];n=t(n);const u=E(n,r,o);return n(u)}}}function lo(t,e){const n={},r=s(t)[Symbol.iterator](),o=s(e)[Symbol.iterator]();let u,i;for(;u=r.next(),!(u.done||(i=o.next(),i.done));)n[u.value]=i.value;return n}function ao(t){return v(t)?t:null}function Ae(t,e,n){const r=function*(o){if(yield o,h(t(o)))for(const u of s(e(o)))yield*r(u)};return a(function*(){yield*r(n)})}function po(t){return C(O(H),P(Ae(H,v,t)))}function ho(t){return j(t)}function _o(t){return Object.freeze(t)}class N{constructor(e){e instanceof N||(e=ht(e));const r=new Set(e);this._elts=[...r],this._set=r}add(e){if(this._set.has(e))return this;const n=this._elts;let r=!1;for(let o=0;o<n.length;o++)if(b(e,n[o])<=0){n.splice(o,0,e),r=!0;break}return r?this._set=new Set(n):(n.push(e),this._set.add(e)),this.size=n.length,this}delete(e){if(!this._set.has(e))return this;const n=this._elts,r=n.indexOf(e);return n.splice(r,1),this._set=new Set(n),this.size=n.length,this}has(e){return this._set.has(e)}keys(){return this.values()}values(){return this._elts[Symbol.iterator]()}entries(){return this._set.entries()}forEach(...e){return this.set.forEach(...e)}clear(){this._elts=[],this._set=new Set(this._elts)}[Symbol.iterator](){return this.keys()}}function xo(...t){return new N(t)}function et(t,e,n){return r=>e(b(r,n),0)}function be(t,e,n=!0){let r=0;for(;r<t.length&&b(e,t[r])>0;r++);return r}function yo([t,e,n]){const r=et(t,e,n);if(e===gt||e===At){const o=[...t],u=be(o,n,!0);return o.splice(0,u),r(o[0])||o.splice(0,1),o}else return[...J(r,t)]}function mo([t,e,n,r,o]){const u=[...t],i=be(u,n,!0);u.splice(0,i);const c=et(t,r,o);return et(t,e,n)(u[0])||u.splice(0,1),[...J(c,u)]}function wo(...t){if(t.length===3)return yo(t);if(t.length===5)return mo(t)}function go(t){return Math.abs(t)}function Ao(t){return me(t)}function bo(t){return t!=null&&t.constructor}function vo(t){return(e,n)=>{const r=t(e,n);return M(r)?Y(r):r}}function ve(t){return t=vo(t),(...e)=>{switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return E(t,e[0],e[1])}}}function Me(t,e){const n=we(t,e);return t-e*n}function Mo(t){const e=new Map;return(...n)=>{const r=[n.length,...n],o=at(e,r);if(o===void 0){const u=t(...n);return Mt(e,r,u),u}else return o}}function Eo(t){return V(t)?t[t.length-1]:K(t)}function Ro(t){if(V(t)){const e=[...t];return e.pop(),e}else return P(t)}function So(t,e){const n=U(t),r=bt(t)||A;return dt((o,u,i)=>r(o,e(u),i),n,t),n}function Ee(t,e){const n=U(t),r=bt(t)||A;return dt((o,u,i)=>r(o,u,e(i)),n,t),n}function Qo(){return crypto.randomUUID()}class ko{constructor(e){this.f=e}_deref(){return this.realized?this.v:(this.v=this.f(),this.realized=!0,this.v)}}function nt(t,e){if(e.has(t))return t;if(e.add(t),fe(t))return Ee(t,r=>nt(r,e));const n=p(t);return n&&n!=y?ct(r=>nt(r,e),t):t}function Ko(t){return nt(t,new Set)}function Io(t,e){E((n,r)=>t(r),null,e)}function jo(t,e,...n){if(e===void 0||t===e)return!1;for(const r of n)if(t===r)return!1;return!0}return je(No);})();
|
package/package.json
CHANGED
package/src/squint/core.js
CHANGED
|
@@ -2859,3 +2859,12 @@ export function clj__GT_js(x) {
|
|
|
2859
2859
|
export function run_BANG_(proc, coll) {
|
|
2860
2860
|
reduce((_,x) => proc(x), null, coll);
|
|
2861
2861
|
}
|
|
2862
|
+
|
|
2863
|
+
export function not_EQ_(x, y, ...more) {
|
|
2864
|
+
if (y === undefined) return false;
|
|
2865
|
+
if (x === y) return false;
|
|
2866
|
+
for (const e of more) {
|
|
2867
|
+
if (x === e) return false;
|
|
2868
|
+
}
|
|
2869
|
+
return true;
|
|
2870
|
+
}
|