squint-cljs 0.8.158 → 0.8.159
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 +7 -7
- package/lib/cljs.pprint.js +59 -59
- package/lib/compiler.js +229 -228
- package/lib/compiler.node.js +2 -2
- package/lib/compiler.sci.js +574 -574
- package/lib/squint.core.umd.js +1 -1
- package/package.json +1 -1
- package/src/squint/core.js +15 -9
package/lib/squint.core.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var squint;(squint||={}).core=(()=>{var tt=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var Ie=Object.getOwnPropertyNames;var Ne=Object.prototype.hasOwnProperty;var Oe=(t,e)=>{for(var n in e)tt(t,n,{get:e[n],enumerable:!0})},Te=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of Ie(e))!Ne.call(t,u)&&u!==n&&tt(t,u,{get:()=>e[u],enumerable:!(r=je(e,u))||r.enumerable});return t};var Ge=t=>Te(tt({},"__esModule",{value:!0}),t);var Gu={};Oe(Gu,{Atom:()=>Ct,Cons:()=>Ft,Delay:()=>Iu,IIterable:()=>ot,IIterable__iterator:()=>qt,LazySeq:()=>wr,NaN_QMARK_:()=>Ur,PROTOCOL_SENTINEL:()=>xn,_:()=>Le,_EQ_:()=>ze,_GT_:()=>vt,_GT__EQ_:()=>Mt,_LT_:()=>qe,_LT__EQ_:()=>Be,_PLUS_:()=>$e,_STAR_:()=>Fe,__protocol_satisfies:()=>Pe,_iterator:()=>L,abs:()=>vu,aclone:()=>Gr,add_watch:()=>zr,alength:()=>Ir,apply:()=>Ut,array_QMARK_:()=>U,aset:()=>Nr,assoc:()=>K,assoc_BANG_:()=>A,assoc_in:()=>Rt,assoc_in_BANG_:()=>St,atom:()=>wn,boolean$:()=>Sr,boolean_QMARK_:()=>iu,bounded_count:()=>cu,butlast:()=>gr,cat:()=>Se,clj__GT_js:()=>Nu,coll_QMARK_:()=>Xr,comp:()=>kt,compare:()=>b,complement:()=>G,concat:()=>Xt,conj:()=>Kt,conj_BANG_:()=>F,cons:()=>on,constantly:()=>Kn,contains_QMARK_:()=>It,count:()=>z,counted_QMARK_:()=>ge,cycle:()=>Xn,dec:()=>Ze,deref:()=>ct,disj:()=>We,disj_BANG_:()=>jt,dissoc:()=>Xe,dissoc_BANG_:()=>Je,distinct:()=>er,doall:()=>Tr,dorun:()=>Or,drop:()=>Z,drop_last:()=>Ar,drop_while:()=>ce,empty:()=>W,empty_QMARK_:()=>hr,ensure_reduced:()=>ie,es6_iterator:()=>P,even_QMARK_:()=>Wt,every_QMARK_:()=>se,every_pred:()=>$r,ex_cause:()=>eu,ex_data:()=>Hr,ex_info:()=>nu,ex_message:()=>tu,false_QMARK_:()=>Er,ffirst:()=>tn,filter:()=>D,filterv:()=>cn,find:()=>su,first:()=>j,flatten:()=>xu,fn_QMARK_:()=>de,fnil:()=>_t,frequencies:()=>mr,get:()=>w,get_in:()=>ht,group_by:()=>yr,identical_QMARK_:()=>Yn,identity:()=>Zt,inc:()=>Nt,int_QMARK_:()=>me,integer_QMARK_:()=>ru,interleave:()=>Ht,interpose:()=>On,into:()=>oe,into_array:()=>he,iterable:()=>s,iterate:()=>Lr,js_keys:()=>Wr,js_obj:()=>jr,juxt:()=>Pr,keep:()=>ir,keep_indexed:()=>hn,key:()=>re,keys:()=>ye,last:()=>en,lazy:()=>f,list:()=>Jt,list_QMARK_:()=>jn,long$:()=>Mu,map:()=>R,map_QMARK_:()=>pe,map_indexed:()=>ln,mapcat:()=>In,mapv:()=>ft,max:()=>ae,max_key:()=>au,memoize:()=>Su,merge:()=>Fn,merge_with:()=>Ln,meta:()=>uu,min:()=>Br,min_key:()=>lu,mod:()=>fu,neg_QMARK_:()=>Qr,next:()=>nt,nil_QMARK_:()=>dn,nnext:()=>Yr,not:()=>Pt,not_EQ_:()=>Tu,not_any_QMARK_:()=>ar,not_empty:()=>du,not_every_QMARK_:()=>ur,nth:()=>Tt,number_QMARK_:()=>xe,object_QMARK_:()=>Ve,odd_QMARK_:()=>Qn,parse_double:()=>hu,parse_long:()=>pu,partial:()=>Jn,partition:()=>ee,partition_all:()=>te,partition_by:()=>$n,partitionv:()=>zn,partitionv_all:()=>qn,peek:()=>ku,persistent_BANG_:()=>mu,pop:()=>Qu,pos_QMARK_:()=>Kr,pr_str:()=>Yt,println:()=>Ot,prn:()=>mn,quot:()=>ve,rand_int:()=>le,rand_nth:()=>_r,random_uuid:()=>ju,range:()=>An,re_find:()=>vn,re_matches:()=>bn,re_pattern:()=>Mn,re_seq:()=>Vr,reduce:()=>E,reduce_kv:()=>yt,reduced:()=>C,reduced_QMARK_:()=>M,reductions:()=>rn,regexp_QMARK_:()=>Zr,rem:()=>ke,remove:()=>sn,remove_watch:()=>qr,repeat:()=>pt,repeatedly:()=>xr,replace:()=>pr,reset_BANG_:()=>Dt,rest:()=>Y,reverse:()=>cr,run_BANG_:()=>Ou,satisfies_QMARK_:()=>Ye,second:()=>He,select_keys:()=>Tn,seq:()=>v,seq_QMARK_:()=>Gt,seqable_QMARK_:()=>zt,sequential_QMARK_:()=>et,set:()=>Sn,set_QMARK_:()=>kn,shuffle:()=>lr,some:()=>fe,some_QMARK_:()=>Rr,some_fn:()=>Fr,sort:()=>dt,sort_by:()=>fr,sorted_set:()=>wu,split_at:()=>br,split_with:()=>vr,str:()=>_n,string_QMARK_:()=>H,subs:()=>_e,subseq:()=>bu,subvec:()=>En,swap_BANG_:()=>gn,system_time:()=>Pn,t:()=>Dr,take:()=>J,take_last:()=>Dn,take_nth:()=>Wn,take_while:()=>X,to_array:()=>Cr,trampoline:()=>Me,transduce:()=>wt,transient$:()=>yu,tree_seq:()=>Ee,true_QMARK_:()=>Mr,truth_:()=>h,type:()=>Eu,unreduced:()=>at,update:()=>nr,update_BANG_:()=>xt,update_in:()=>rr,update_keys:()=>Ku,update_vals:()=>Qe,val:()=>ue,vals:()=>Jr,vec:()=>k,vector:()=>st,vector_QMARK_:()=>Rn,warn_on_lazy_reusage_BANG_:()=>un,with_meta:()=>ou,zero_QMARK_:()=>kr,zipmap:()=>_u});function l(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}var At=Object.prototype.hasOwnProperty;function bt(t,e,n){for(n of t.keys())if(Q(n,e))return n}function Q(t,e){if(t===e)return!0;var n,r,u;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Array){if((r=t.length)===e.length)for(;r--&&Q(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(const o of t)if(u=o,u&&typeof u=="object"&&(u=bt(e,u),!u)||!e.has(u))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(const o of t)if(u=o[0],u&&typeof u=="object"&&(u=bt(e,u),!u)||!Q(r[1],e.get(u)))return!1;return!0}if(!n||typeof t=="object"){r=0;for(const o in t)if(At.call(t,o)&&++r&&!At.call(e,o)||!(o in e)||!Q(t[o],e[o]))return!1;return Object.keys(e).length===r}}return!1}function I(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function ze(...t){return I(t,(e,n)=>Q(e,n))}function vt(...t){return I(t,(e,n)=>e>n)}function Mt(...t){return I(t,(e,n)=>e>=n)}function qe(...t){return I(t,(e,n)=>e<n)}function Be(...t){return I(t,(e,n)=>e<=n)}function $e(...t){return t.reduce((e,n)=>e+n,0)}function Fe(...t){return t.reduce((e,n)=>e*n,1)}function Le(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}const Pe={};function Ye(t,e){return e==null?t[null]:typeof t=="symbol"?e[t]:e[t.__sym]}function Ce(t,e,n){return t.set(e,n),t}function De(t,e,n){return t[e]=n,t}function Et(t){switch(p(t)){case _:return Ce;case x:case y:return De}}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 u=0;u<r.length;u+=2)t.set(r[u],r[u+1]);break;case x:case y:t[e]=n;for(let u=0;u<r.length;u+=2)t[r[u]]=r[u+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 N(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 u=N(t);return A(u,e,n,...r),u}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 V;case m:return new Set;case q:return f(function*(){})}}function $(t){return t.constructor===Object}function Ve(t){return t!=null&&$(t)}function p(t){if(t!=null){if($(t))return y;if(t instanceof Map)return _;if(t instanceof Set)return m;if(t instanceof V)return S;if(Array.isArray(t))return x;if(t instanceof it)return q;if(t instanceof O)return m;if(t instanceof Object)return y}}function Ue(t,e,n,r,u){r=k(r),n=n||{};const o=p(n);if(o!==_&&o!==x&&o!==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 a=0;a<r.length-1;a+=1){const g=r[a];let d;c instanceof Map?d=c.get(g):d=c[g],d||(d=B(o)),i.push(d),c=d}i.push(u);for(let a=i.length-2;a>=0;a-=1)i[a]=t(i[a],r[a],i[a+1]);return i[0]}function Rt(t,e,n){return Ue(K,"assoc-in",t,e,n)}function St(t,e,n){e=k(e);var r=t;const u=p(t);for(const o of e.splice(0,e.length-1)){let i=w(r,o);i===void 0&&(i=B(u),A(r,o,i)),r=i}return A(r,e[e.length-1],n),t}function kt(...t){if(t=t.map(l),t.length===0)return Zt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let u=e(...r);for(const o of n)u=o(u);return u}}function Qt(t,e){for(const n of e)t.add(n);return t}function F(...t){if(t.length===0)return st();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case m:Qt(r,n);break;case S:r.unshift(...n.reverse());break;case x:r.push(...n);break;case _:for(const u of n)Array.isArray(u)?r.set(u[0],u[1]):s(u).forEach(o=>{r.set(o[0],o[1])});break;case y:for(const u of n)Array.isArray(u)?r[u[0]]=u[1]:Object.assign(r,u);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function Kt(...t){if(t.length===0)return st();const[e,...n]=t;let r=e;r==null&&(r=Jt());let u,o;switch(p(r)){case m:return r instanceof O?Qt(new r.constructor(r),n):new r.constructor([...r,...n]);case S:return new V(...n.reverse(),...r);case x:return[...r,...n];case _:u=new Map(r);for(const i of n)Array.isArray(i)?u.set(i[0],i[1]):s(i).forEach(c=>{u.set(c[0],c[1])});return u;case q:return f(function*(){yield*n,yield*r});case y:o={...r};for(const i of n)Array.isArray(i)?o[i[0]]=i[1]:Object.assign(o,i);return o;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function jt(t,...e){for(const n of e)t.delete(n);return t}function We(t,...e){const n=new t.constructor([...t]);return jt(n,...e)}function It(t,e){switch(p(t)){case m:case _:return t.has(e);case void 0:return!1;default:return e in t}}function Je(t,...e){for(const n of e)delete t[n];return t}function Xe(t,...e){if(!t)return;if(e.length===0)return t;const n=N(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 Nt(t){return t+1}function Ze(t){return t-1}function Ot(...t){console.log(...t)}function Tt(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const u=s(t);let o=0;for(const i of u)if(o++==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($(t))return r=t[e],r===void 0?n:r;let u;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(u=t.get,u instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function Gt(t){return t!=null&&!!t[Symbol.iterator]}const et=Gt;function zt(t){return t==null||!!t[Symbol.iterator]}function s(t){if(t==null)return[];if(zt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const ot=Symbol("Iterable"),qt=Symbol.iterator;function L(t){return t[Symbol.iterator]()}const P=L;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 j(t){const[e]=s(t);return e}function He(t){const[e,n]=s(t);return n}function tn(t){return j(j(t))}function Y(t){return f(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 en(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 C(t){return new T(t)}function M(t){return t instanceof T}function E(t,e,n){t=l(t);let r,u;if(arguments.length===2){const o=s(e)[Symbol.iterator](),i=o.next();i.done?u=t():u=i.value,r=o}else u=e,r=s(n);if(u instanceof T)return u.value;for(const o of r)if(u=t(u,o),u instanceof T){u=u.value;break}return u}function*nn(t,e){const n=e.next();n.done?yield t():yield*Bt(t,n.value,e)}function*Bt(t,e,n){let r=e,u=n;for(;;){if(M(r)){yield r.value;return}else yield r;const o=u.next();if(o.done)break;r=t(r,o.value)}}function rn(t,e,n){return t=l(t),arguments.length===2?f(function*(){yield*nn(t,s(e)[Symbol.iterator]())}):f(function*(){yield*Bt(t,e,s(n)[Symbol.iterator]())})}var $t=!1;function un(){$t=!0}class it{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&$t)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}it.prototype[ot]=!0;function f(t){return new it(t)}class Ft{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*s(this.coll)}}function on(t,e){return new Ft(t,e)}function R(t,...e){switch(t=l(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 f(function*(){for(const n of s(e[0]))yield t(n)});default:return f(function*(){const n=e.map(r=>P(s(r)));for(;;){const r=[];for(const u of n){const o=u.next();if(o.done)return;r.push(o.value)}yield t(...r)}})}}function Lt(t){return e=>(...n)=>{switch(n.length){case 0:return e();case 1:return e(n[0]);case 2:{const r=n[0],u=n[1];return h(t(u))?e(r,u):r}}}}function D(t,e){return arguments.length===1?Lt(t):(t=l(t),f(function*(){for(const n of s(e))h(t(n))&&(yield n)}))}function cn(t,e){return[...D(t,e)]}function sn(t,e){return arguments.length===1?Lt(G(t)):D(G(t),e)}function fn(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 ln(t,e){return t=l(t),arguments.length===1?fn(t):f(function*(){let n=0;for(const r of s(e))yield t(n,r),n++})}function an(t,e){return t=l(t),f(function*(){let n=0;for(const r of s(e)){const u=t(n,r);h(u)&&(yield u),n++}})}function pn(t){return e=>{let n=-1;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1)return e(r[0]);if(u===2){const o=r[0],i=r[1];n++;const c=t(n,i);return c==null?o:e(o,c)}}}}function hn(t,e){return arguments.length===1?pn(t):an(t,e)}function _n(...t){return t.join("")}function Pt(t){return!h(t)}function dn(t){return t==null}const xn={};function yn(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 Yt(...t){return t.map(yn).join(" ")}function mn(...t){Ot(Yt(...t))}class Ct{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 u of Object.entries(this._watches)){const o=u[0],i=u[1];i(o,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 wn(t){return new Ct(t)}function ct(t){return t._deref()}function Dt(t,e){t._reset_BANG_(e)}function gn(t,e,...n){e=l(e);const r=e(ct(t),...n);return Dt(t,r),r}function An(t,e,n){return f(function*(){let r=t,u=e,o=n;e===void 0&&(r=0,u=t);let i=r||0;o=n??1;const c=o>=0;for(;u===void 0||c&&i<u||!c&&u<i;)yield i,i+=o})}function bn(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function vn(t,e){if(H(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 Mn(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 En(t,e,n){return t.slice(e,n)}function st(...t){return t}function Rn(t){return p(t)===x}function ft(...t){if(t.length===2){const[r,u]=t,o=s(u);if(Array.isArray(o)){const i=new Array(o.length);for(var e=0;e<o.length;e++)i[e]=r(o[e]);return i}else{var n=[];for(const i of o)n.push(r(i));return n}}return[...R(...t)]}function k(t){return U(t)?t:[...s(t)]}function Sn(t){return new Set(s(t))}function kn(t){return p(t)===m}const Vt=Symbol("IApply__apply");function Ut(t,...e){t=l(t);const n=e.slice(0,e.length-1),r=s(e[e.length-1]),u=t[Vt];return u?u(...n,r):t(...n,...r)}function Wt(t){return t%2==0}function Qn(t){return!Wt(t)}function G(t){return t=l(t),(...e)=>Pt(t(...e))}function Kn(t){return(...e)=>t}class V extends Array{constructor(...e){super(),this.push(...e)}}function jn(t){return p(t)===S}function Jt(...t){return new V(...t)}function U(t){return Array.isArray(t)}function lt(t){return f(function*(){for(const e of t)yield*s(e)})}function Xt(...t){return lt(t)}Xt[Vt]=t=>lt(t);function In(t,...e){if(e.length===0)return kt(R(t),Se);{const n=R(t,...e);return lt(n)}}function Zt(t){return t}function Ht(...t){return f(function*(){const e=t.map(n=>P(s(n)));for(;;){const n=[];for(const r of e){const u=r.next();if(u.done)return;n.push(u.value)}yield*n}})}function Nn(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 u=e(r[0],t);return M(u)?u:e(u,r[1])}else return n=!0,e(r[0],r[1])}}}}function On(t,e){return arguments.length===1?Nn(t):Z(1,Ht(pt(t),e))}function Tn(t,e){const n=p(t),r=B(n)||{};for(const u of e){const o=w(t,u);o!=null&&A(r,u,o)}return r}function at(t){return M(t)?ct(t):t}function Gn(t){return e=>{let n=[];return(...r)=>{let u,o;switch(r.length){case 0:return e();case 1:return u=r[0],n.length!==0&&(o=[...n],n=[],u=at(e(u,o))),e(u);case 2:return u=r[0],n.push(r[1]),t===n.length?(o=[...n],n=[],e(u,o)):u}}}}function te(t,...e){if(arguments.length===1)return Gn(t);let n=t,r=e[0];return e.length===2&&([n,r]=e),ne(t,n,[],r,!0)}function ee(t,...e){let n=t,r=[],u=e[0];return e.length===2?[n,u]=e:e.length>2&&([n,r,u]=e),ne(t,n,r,u,!1)}const zn=ee,qn=te;function ne(t,e,n,r,u){return f(function*(){let o=[],i=0;for(const c of s(r))i<t&&(o.push(c),o.length===t&&(yield o,o=e<t?o.slice(e):[])),i++,i===e&&(i=0);o.length>0&&(o.length===t||u?yield o:n.length&&(o.push(...n.slice(0,t-o.length)),yield o))})}function Bn(t){return e=>{let n=[];const r={};let u=r;return(...o)=>{const i=o.length;if(i===0)return e();if(i===1){let c=o[0];if(n.length!==0){const a=[...n];n=[],c=at(e(c,a))}return e(c)}if(i===2){const c=o[0],a=o[1],g=u,d=t(a);if(u=d,g===r||d===g)return n.push(a),c;{const Ke=[...n];n=[];const gt=e(c,Ke);return M(gt)||n.push(a),gt}}}}}function $n(t,e){return t=l(t),arguments.length===1?Bn(t):f(function*(){const n=P(e),r=n.next();r.done&&(yield*null);const u=r.value;let o=t(u),i=[u],c=[];for(;;){const a=n.next();if(a.done){yield i;break}const g=a.value,d=t(g);o==d?i.push(g):(yield i,c.push(g),i=c,o=d,c=[])}})}function W(t){const e=p(t);if(e!=null)return B(e);throw new Error(`Can't create empty of ${typeof t}`)}function Fn(...t){const e=t[0];let n;return e==null?n={}:n=oe(W(e),e),F(n,...t.slice(1))}function re(t){return t[0]}function ue(t){return t[1]}function Ln(t,...e){t=l(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(o,i)=>{const c=re(i),a=ue(i);return It(o,c)?K(o,c,t(w(o,c),a)):K(o,c,a)};return E((o,i)=>E(r,o||{},v(i)),e)}else return null}function Pn(){return performance.now()}function oe(...t){let e,n,r,u,o;switch(t.length){case 0:return[];case 1:return t[0];case 2:return Kt(t[0]??[],...s(t[1]));case 3:return e=t[0],n=t[1],r=t[2],u=N(e),o=(i,c)=>c===void 0?i:F(i,c),wt(n,o,u,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function Yn(t,e){return t===e}function pt(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[ot]:!0,[qt]: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 ie(t){return M(t)?t:C(t)}function Cn(t){return e=>{let n=t;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1){const o=r[0];return e(o)}if(u===2){let o=r[0];const i=r[1],c=n,a=(n=n-1,n);return c>0&&(o=e(o,i)),a>0?o:ie(o)}}}}function J(t,e){return arguments.length===1?Cn(t):f(function*(){let n=t-1;for(const r of s(e))if(n-->=0&&(yield r),n<0)return})}function Dn(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 u of s(e))n[r%t]=u,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 Vn(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const u=n[0],o=n[1];return h(t(o))?e(u,o):C(u)}}}function X(t,e){return t=l(t),arguments.length===1?Vn(t):f(function*(){for(const n of s(e))if(h(t(n)))yield n;else return})}function Un(t){return e=>{let n=-1;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1)return e(r[0]);if(u===2){const o=r[0],i=r[1];return n++,ke(n,t)===0?e(o,i):o}}}}function Wn(t,e){return arguments.length===1?Un(t):t<=0?pt(j(e)):f(function*(){let n=0;for(const r of s(e))n%t===0&&(yield r),n++})}function Jn(t,...e){return t=l(t),function(...n){return t(...e,...n)}}function Xn(t){return f(function*(){for(;;)yield*t})}function Zn(t){return e=>{let n=t;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1)return e(r[0]);if(u===2){const o=r[0],i=r[1],c=n;return n--,c>0?o:e(o,i)}}}}function Z(t,e){return arguments.length===1?Zn(t):f(function*(){const n=L(s(e));for(let r=0;r<t;r++)n.next();yield*n})}function Hn(t){return e=>{let n=!0;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1)return e(r[0]);if(u===2){const o=n,i=r[0],c=r[1];return o&&h(t(c))?i:(n=null,e(i,c))}}}}function ce(t,e){return t=l(t),arguments.length===1?Hn(t):f(function*(){const n=L(s(e));for(;;){const r=n.next();if(r.done)break;const u=r.value;if(!h(t(u))){yield u;break}}yield*n})}function tr(){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 u=n[0],o=n[1];return e.has(o)?u:(e.add(o),t(u,o))}}}}function er(t){return arguments.length===0?tr():f(function*(){const e=new Set;for(const n of s(t))e.has(n)||(yield n),e.add(n)})}function nr(t,e,n,...r){return n=l(n),K(t,e,n(w(t,e),...r))}function ht(t,e,n){let r=t;for(const u of e)r=w(r,u);return r===void 0?n:r}function rr(t,e,n,...r){return n=l(n),Rt(t,e,n(ht(t,e),...r))}function _t(t,e,...n){return t=l(t),function(r,...u){return r?t(r,...n,...u):t(e,...n,...u)}}function se(t,e){t=l(t);for(const n of s(e))if(!t(n))return!1;return!0}function ur(t,e){return!se(t,e)}function or(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const u=n[0],o=n[1],i=t(o);return i==null?u:e(u,i)}}}function ir(t,e){return t=l(t),arguments.length===1?or(t):f(function*(){for(const n of s(e)){const r=t(n);h(r)&&(yield r)}})}function cr(t){return t=s(t),[...t].reverse()}function dt(t,e){return arguments.length===1&&(e=t,t=void 0),t=l(t),e=s(e),[...e].sort(t||b)}function sr(t){return t===b?t:(e,n)=>{const r=t(e,n);return xe(r)?r:r?-1:t(n,e)?1:0}}function fr(t,e,n){return arguments.length===2&&(n=e,e=b),t=l(t),e=l(e),dt((r,u)=>{const o=sr(e),i=t(r),c=t(u);return o(i,c)},n)}function lr(t){const e=[...t];let n=t.length;for(;n;){const r=Math.floor(Math.random()*n--),u=e[n];e[n]=e[r],e[r]=u}return e}function fe(t,e){t=l(t);for(const n of s(e)){const r=t(n);if(h(r))return r}}function ar(t,e){return t=l(t),!fe(t,e)}function pr(t,e){return(Array.isArray(e)?ft:R)(r=>{const u=t[r];return u!==void 0?u:r},e)}function hr(t){return!v(t)}function le(t){return Math.floor(Math.random()*t)}function _r(t){const e=le(z(t));return Tt(t,e)}function dr(t){return f(function*(){for(;;)yield t()})}function xr(t,e){arguments.length===1&&(e=t,t=void 0);const n=dr(e);return t?J(t,n):n}function xt(t,e,n,...r){const u=w(t,e);return A(t,e,n(u,...r))}function yr(t,e){t=l(t);const n={};for(const r of s(e)){const u=t(r);xt(n,u,_t(F,[]),r)}return n}function mr(t){const e={},n=_t(Nt,0);for(const r of s(t))xt(e,r,n);return e}class wr{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 gr(t){const e=[...s(t)];return e.pop(),e.length>0?e:null}function Ar(...t){const[e,n]=t.length>1?t:[1,t[0]];return R((r,u)=>r,n,Z(e,n))}function br(t,e){return[J(t,e),Z(t,e)]}function vr(t,e){return[X(t,e),ce(t,e)]}function z(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 Mr(t){return t===!0}function Er(t){return t===!1}function Rr(t){return t!=null}function Sr(t){return!!t}function kr(t){return t===0}function Qr(t){return t<0}function Kr(t){return t>0}function jr(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function Ir(t){return t.length}function Nr(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const u=[e,n,...r],o=u[u.length-1];let i=t,c=0;const a=u.length-2;for(;c<a;c++)i=i[u[c]];return i[u[c]]=o,n}}function Or(t){for(const e of s(t));return null}function Tr(t){return k(t)}function Gr(t){return[...t]}function zr(t,e,n){return t._add_watch(e,n)}function qr(t,e){return t._remove_watch(e)}function yt(t,e,n){if(!n)return e;var r=e;for(const u of s(n))r=t(r,u[0],u[1]);return r}function ae(t,e,...n){return e==null?t:Math.max(t,e,...n)}function Br(t,e,...n){return e==null?t:Math.min(t,e,...n)}function pe(t){return t==null?!1:!!($(t)||t instanceof Map)}function $r(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function Fr(...t){return(...e)=>{for(const n of t)for(const r of e){const u=n(r);if(u)return u}}}function he(t,e){return k(e||t)}function Lr(t,e){var n=e;return f(function*(){for(;;)yield n,n=t(n)})}function Pr(...t){return t=t.map(l),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function nt(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return v(Y(t))}function Yr(t){return nt(nt(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 u=0;u<t.length;u++){let o=b(t[u],e[u]);if(o!=0)return o}return 0}else throw new Error(`comparing ${n} to ${r}`)}}function Cr(t){return he(t)}function h(t){return t!=null&&t!==!1}const Dr=h;function _e(t,e,n){return t.substring(e,n)}function de(t){return typeof t=="function"}function Vr(t,e){return f(function*(){for(;;){const n=t.exec(e);if(n){const r=n[0];yield n.length===1?r:k(n);const o=n.index+ae(1,r.length);if(o>e.length)break;e=_e(e,o)}else break}})}function Ur(t){return Number.isNaN(t)}function xe(t){return typeof t=="number"}function ye(t){return t?Object.keys(t):null}function Wr(t){return ye(t)}function Jr(t){return t?Object.values(t):null}function H(t){return typeof t=="string"}function Xr(t){return p(t)!=null}function Zr(t){return t instanceof RegExp}class mt extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function Hr(t){return t instanceof mt?t._data:null}function tu(t){return t instanceof Error?t.message:null}function eu(t){return t instanceof mt?t._cause:null}function nu(t,e,n){return new mt(t,e,n)}function me(t){return Number.isInteger(t)}const ru=me,we=Symbol("meta");function uu(t){return t instanceof Object?t[we]:null}function ou(t,e){const n=N(t);return n[we]=e,n}function iu(t){return t===!0||t===!1}function ge(t){switch(p(t)){case x:case _:case y:case S:case m:return!0}return!1}function cu(t,e){return ge(e)?z(e):z(J(t,e))}function su(t,e){const n=w(t,e);if(n!==void 0)return[e,n]}function fu(t,e){return(t%e+e)%e}function lu(t,e,...n){if(n.length==0)return e;var r=t(e),u=e;return n.forEach(o=>{var i=t(o);i<=r&&(r=i,u=o)}),u}function au(t,e,...n){if(n.length==0)return e;var r=t(e),u=e;return n.forEach(o=>{var i=t(o);i>=r&&(r=i,u=o)}),u}function Ae(t){throw new Error(`Expected string, got: ${typeof t}`)}function pu(t){if(H(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return Ae(t)}function hu(t){if(H(t))return/^[\\x00-\\x20]*[+-]?NaN[\\x00-\\x20]*$/.test(t)?NaN:/^[\\x00-\\x20]*[+-]?(Infinity|((\d+\.?\d*|\.\d+)([eE][+-]?\d+)?)[dDfF]?)[\\x00-\\x20]*$/.test(t)?parseFloat(t):null;throw new Ae(t)}function be(t){return t>=0?Math.floor(t):Math.ceil(t)}function ve(t,e){const n=t%e;return be((t-n)/e)}function Me(t,...e){if(e.length==0)for(;;){const n=t();if(h(de(n))){t=n;continue}else return n}else return Me(function(){return Ut(t,e)})}function wt(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return wt(t,n,n(),r)}default:{let n=e[0];const r=e[1],u=e[2];n=t(n);const o=E(n,r,u);return n(o)}}}function _u(t,e){const n={},r=s(t)[Symbol.iterator](),u=s(e)[Symbol.iterator]();let o,i;for(;o=r.next(),!(o.done||(i=u.next(),i.done));)n[o.value]=i.value;return n}function du(t){return v(t)?t:null}function Ee(t,e,n){const r=function*(u){if(yield u,h(t(u)))for(const o of s(e(u)))yield*r(o)};return f(function*(){yield*r(n)})}function xu(t){return D(G(et),Y(Ee(et,v,t)))}function yu(t){return N(t)}function mu(t){return Object.freeze(t)}class O{constructor(e){e instanceof O||(e=dt(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 u=0;u<n.length;u++)if(b(e,n[u])<=0){n.splice(u,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 wu(...t){return new O(t)}function rt(t,e,n){return r=>e(b(r,n),0)}function Re(t,e,n=!0){let r=0;for(;r<t.length&&b(e,t[r])>0;r++);return r}function gu([t,e,n]){const r=rt(t,e,n);if(e===vt||e===Mt){const u=[...t],o=Re(u,n,!0);return u.splice(0,o),r(u[0])||u.splice(0,1),u}else return[...X(r,t)]}function Au([t,e,n,r,u]){const o=[...t],i=Re(o,n,!0);o.splice(0,i);const c=rt(t,r,u);return rt(t,e,n)(o[0])||o.splice(0,1),[...X(c,o)]}function bu(...t){if(t.length===3)return gu(t);if(t.length===5)return Au(t)}function vu(t){return Math.abs(t)}function Mu(t){return be(t)}function Eu(t){return t!=null&&t.constructor}function Ru(t){return(e,n)=>{const r=t(e,n);return M(r)?C(r):r}}function Se(t){return t=Ru(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 ke(t,e){const n=ve(t,e);return t-e*n}function Su(t){const e=new Map;return(...n)=>{const r=[n.length,...n],u=ht(e,r);if(u===void 0){const o=t(...n);return St(e,r,o),o}else return u}}function ku(t){return U(t)?t[t.length-1]:j(t)}function Qu(t){if(U(t)){const e=[...t];return e.pop(),e}else return Y(t)}function Ku(t,e){const n=W(t),r=Et(t)||A;return yt((u,o,i)=>r(u,e(o),i),n,t),n}function Qe(t,e){const n=W(t),r=Et(t)||A;return yt((u,o,i)=>r(u,o,e(i)),n,t),n}function ju(){return crypto.randomUUID()}class Iu{constructor(e){this.f=e}_deref(){return this.realized?this.v:(this.v=this.f(),this.realized=!0,this.v)}}function ut(t,e){if(e.has(t))return t;if(e.add(t),pe(t))return Qe(t,r=>ut(r,e));const n=p(t);return n&&n!=y?ft(r=>ut(r,e),t):t}function Nu(t){return ut(t,new Set)}function Ou(t,e){E((n,r)=>t(r),null,e)}function Tu(t,e,...n){if(e===void 0||t===e)return!1;for(const r of n)if(t===r)return!1;return!0}return Ge(Gu);})();
|
|
1
|
+
var squint;(squint||={}).core=(()=>{var tt=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Ne=Object.getOwnPropertyNames;var je=Object.prototype.hasOwnProperty;var Oe=(t,e)=>{for(var n in e)tt(t,n,{get:e[n],enumerable:!0})},Te=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of Ne(e))!je.call(t,u)&&u!==n&&tt(t,u,{get:()=>e[u],enumerable:!(r=Ie(e,u))||r.enumerable});return t};var Ge=t=>Te(tt({},"__esModule",{value:!0}),t);var Gu={};Oe(Gu,{Atom:()=>Ct,Cons:()=>Ft,Delay:()=>Nu,IIterable:()=>ot,IIterable__iterator:()=>qt,LazySeq:()=>wr,NaN_QMARK_:()=>Ur,PROTOCOL_SENTINEL:()=>xn,_:()=>Le,_EQ_:()=>ze,_GT_:()=>vt,_GT__EQ_:()=>Mt,_LT_:()=>qe,_LT__EQ_:()=>Be,_PLUS_:()=>$e,_STAR_:()=>Fe,__protocol_satisfies:()=>Pe,_iterator:()=>L,abs:()=>vu,aclone:()=>Gr,add_watch:()=>zr,alength:()=>Nr,apply:()=>Ut,array_QMARK_:()=>U,aset:()=>jr,assoc:()=>K,assoc_BANG_:()=>A,assoc_in:()=>Rt,assoc_in_BANG_:()=>St,atom:()=>wn,boolean$:()=>Sr,boolean_QMARK_:()=>iu,bounded_count:()=>cu,butlast:()=>gr,cat:()=>Se,clj__GT_js:()=>ju,coll_QMARK_:()=>Xr,comp:()=>kt,compare:()=>b,complement:()=>G,concat:()=>Xt,conj:()=>Kt,conj_BANG_:()=>F,cons:()=>on,constantly:()=>Kn,contains_QMARK_:()=>Nt,count:()=>z,counted_QMARK_:()=>ge,cycle:()=>Xn,dec:()=>Ze,deref:()=>ct,disj:()=>We,disj_BANG_:()=>It,dissoc:()=>Xe,dissoc_BANG_:()=>Je,distinct:()=>er,doall:()=>Tr,dorun:()=>Or,drop:()=>Z,drop_last:()=>Ar,drop_while:()=>ce,empty:()=>W,empty_QMARK_:()=>hr,ensure_reduced:()=>ie,es6_iterator:()=>P,even_QMARK_:()=>Wt,every_QMARK_:()=>se,every_pred:()=>$r,ex_cause:()=>eu,ex_data:()=>Hr,ex_info:()=>nu,ex_message:()=>tu,false_QMARK_:()=>Er,ffirst:()=>tn,filter:()=>D,filterv:()=>cn,find:()=>su,first:()=>I,flatten:()=>xu,fn_QMARK_:()=>de,fnil:()=>_t,frequencies:()=>mr,get:()=>w,get_in:()=>ht,group_by:()=>yr,identical_QMARK_:()=>Yn,identity:()=>Zt,inc:()=>jt,int_QMARK_:()=>me,integer_QMARK_:()=>ru,interleave:()=>Ht,interpose:()=>On,into:()=>oe,into_array:()=>he,iterable:()=>s,iterate:()=>Lr,js_keys:()=>Wr,js_obj:()=>Ir,juxt:()=>Pr,keep:()=>ir,keep_indexed:()=>hn,key:()=>re,keys:()=>ye,last:()=>en,lazy:()=>f,list:()=>Jt,list_QMARK_:()=>In,long$:()=>Mu,map:()=>R,map_QMARK_:()=>pe,map_indexed:()=>ln,mapcat:()=>Nn,mapv:()=>ft,max:()=>ae,max_key:()=>au,memoize:()=>Su,merge:()=>Fn,merge_with:()=>Ln,meta:()=>uu,min:()=>Br,min_key:()=>lu,mod:()=>fu,neg_QMARK_:()=>Qr,next:()=>nt,nil_QMARK_:()=>dn,nnext:()=>Yr,not:()=>Pt,not_EQ_:()=>Tu,not_any_QMARK_:()=>ar,not_empty:()=>du,not_every_QMARK_:()=>ur,nth:()=>Tt,number_QMARK_:()=>xe,object_QMARK_:()=>Ve,odd_QMARK_:()=>Qn,parse_double:()=>hu,parse_long:()=>pu,partial:()=>Jn,partition:()=>ee,partition_all:()=>te,partition_by:()=>$n,partitionv:()=>zn,partitionv_all:()=>qn,peek:()=>ku,persistent_BANG_:()=>mu,pop:()=>Qu,pos_QMARK_:()=>Kr,pr_str:()=>Yt,println:()=>Ot,prn:()=>mn,quot:()=>ve,rand_int:()=>le,rand_nth:()=>_r,random_uuid:()=>Iu,range:()=>An,re_find:()=>vn,re_matches:()=>bn,re_pattern:()=>Mn,re_seq:()=>Vr,reduce:()=>E,reduce_kv:()=>yt,reduced:()=>C,reduced_QMARK_:()=>M,reductions:()=>rn,regexp_QMARK_:()=>Zr,rem:()=>ke,remove:()=>sn,remove_watch:()=>qr,repeat:()=>pt,repeatedly:()=>xr,replace:()=>pr,reset_BANG_:()=>Dt,rest:()=>Y,reverse:()=>cr,run_BANG_:()=>Ou,satisfies_QMARK_:()=>Ye,second:()=>He,select_keys:()=>Tn,seq:()=>v,seq_QMARK_:()=>Gt,seqable_QMARK_:()=>zt,sequential_QMARK_:()=>et,set:()=>Sn,set_QMARK_:()=>kn,shuffle:()=>lr,some:()=>fe,some_QMARK_:()=>Rr,some_fn:()=>Fr,sort:()=>dt,sort_by:()=>fr,sorted_set:()=>wu,split_at:()=>br,split_with:()=>vr,str:()=>_n,string_QMARK_:()=>H,subs:()=>_e,subseq:()=>bu,subvec:()=>En,swap_BANG_:()=>gn,system_time:()=>Pn,t:()=>Dr,take:()=>J,take_last:()=>Dn,take_nth:()=>Wn,take_while:()=>X,to_array:()=>Cr,trampoline:()=>Me,transduce:()=>wt,transient$:()=>yu,tree_seq:()=>Ee,true_QMARK_:()=>Mr,truth_:()=>_,type:()=>Eu,unreduced:()=>at,update:()=>nr,update_BANG_:()=>xt,update_in:()=>rr,update_keys:()=>Ku,update_vals:()=>Qe,val:()=>ue,vals:()=>Jr,vec:()=>k,vector:()=>st,vector_QMARK_:()=>Rn,warn_on_lazy_reusage_BANG_:()=>un,with_meta:()=>ou,zero_QMARK_:()=>kr,zipmap:()=>_u});function l(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}var At=Object.prototype.hasOwnProperty;function bt(t,e,n){for(n of t.keys())if(Q(n,e))return n}function Q(t,e){if(t===e)return!0;var n,r,u;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Array){if((r=t.length)===e.length)for(;r--&&Q(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(const o of t)if(u=o,u&&typeof u=="object"&&(u=bt(e,u),!u)||!e.has(u))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(const o of t)if(u=o[0],u&&typeof u=="object"&&(u=bt(e,u),!u)||!Q(r[1],e.get(u)))return!1;return!0}if(!n||typeof t=="object"){r=0;for(const o in t)if(At.call(t,o)&&++r&&!At.call(e,o)||!(o in e)||!Q(t[o],e[o]))return!1;return Object.keys(e).length===r}}return!1}function N(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function ze(...t){return N(t,(e,n)=>Q(e,n))}function vt(...t){return N(t,(e,n)=>e>n)}function Mt(...t){return N(t,(e,n)=>e>=n)}function qe(...t){return N(t,(e,n)=>e<n)}function Be(...t){return N(t,(e,n)=>e<=n)}function $e(...t){return t.reduce((e,n)=>e+n,0)}function Fe(...t){return t.reduce((e,n)=>e*n,1)}function Le(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}const Pe={};function Ye(t,e){return e==null?t[null]:typeof t=="symbol"?e[t]:e[t.__sym]}function Ce(t,e,n){return t.set(e,n),t}function De(t,e,n){return t[e]=n,t}function Et(t){switch(p(t)){case h:return Ce;case y:case d:return De}}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 h:t.set(e,n);for(let u=0;u<r.length;u+=2)t.set(r[u],r[u+1]);break;case y:case d:t[e]=n;for(let u=0;u<r.length;u+=2)t[r[u]]=r[u+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 h:return new Map(t);case m:return new t.constructor(t);case y:return[...t];case d: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 u=j(t);return A(u,e,n,...r),u}const h=1,y=2,d=3,S=4,m=5,q=6;function B(t){switch(t){case h:return new Map;case y:return[];case d:return{};case S:return new V;case m:return new Set;case q:return f(function*(){})}}function $(t){return t.constructor===Object}function Ve(t){return t!=null&&$(t)}function p(t){if(t!=null){if($(t))return d;if(t instanceof Map)return h;if(t instanceof Set)return m;if(t instanceof V)return S;if(Array.isArray(t))return y;if(t instanceof it)return q;if(t instanceof O)return m;if(t instanceof Object)return d}}function Ue(t,e,n,r,u){r=k(r),n=n||{};const o=p(n);if(o!==h&&o!==y&&o!==d)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 a=0;a<r.length-1;a+=1){const g=r[a];let x;c instanceof Map?x=c.get(g):x=c[g],x||(x=B(o)),i.push(x),c=x}i.push(u);for(let a=i.length-2;a>=0;a-=1)i[a]=t(i[a],r[a],i[a+1]);return i[0]}function Rt(t,e,n){return Ue(K,"assoc-in",t,e,n)}function St(t,e,n){e=k(e);var r=t;const u=p(t);for(const o of e.splice(0,e.length-1)){let i=w(r,o);i===void 0&&(i=B(u),A(r,o,i)),r=i}return A(r,e[e.length-1],n),t}function kt(...t){if(t=t.map(l),t.length===0)return Zt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let u=e(...r);for(const o of n)u=o(u);return u}}function Qt(t,e){for(const n of e)t.add(n);return t}function F(...t){if(t.length===0)return st();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case m:Qt(r,n);break;case S:r.unshift(...n.reverse());break;case y:r.push(...n);break;case h:for(const u of n)Array.isArray(u)?r.set(u[0],u[1]):s(u).forEach(o=>{r.set(o[0],o[1])});break;case d:for(const u of n)Array.isArray(u)?r[u[0]]=u[1]:Object.assign(r,u);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function Kt(...t){if(t.length===0)return st();const[e,...n]=t;let r=e;r==null&&(r=Jt());let u,o;switch(p(r)){case m:return r instanceof O?Qt(new r.constructor(r),n):new r.constructor([...r,...n]);case S:return new V(...n.reverse(),...r);case y:return[...r,...n];case h:u=new Map(r);for(const i of n)Array.isArray(i)?u.set(i[0],i[1]):s(i).forEach(c=>{u.set(c[0],c[1])});return u;case q:return f(function*(){yield*n,yield*r});case d:o={...r};for(const i of n)Array.isArray(i)?o[i[0]]=i[1]:Object.assign(o,i);return o;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function It(t,...e){for(const n of e)t.delete(n);return t}function We(t,...e){const n=new t.constructor([...t]);return It(n,...e)}function Nt(t,e){switch(p(t)){case m:case h:return t.has(e);case void 0:return!1;default:return e in t}}function Je(t,...e){for(const n of e)delete t[n];return t}function Xe(t,...e){if(!t)return;if(e.length===0)return t;const n=j(t);switch(p(t)){case h:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function jt(t){return t+1}function Ze(t){return t-1}function Ot(...t){console.log(...t)}function Tt(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const u=s(t);let o=0;for(const i of u)if(o++==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($(t))return r=t[e],r===void 0?n:r;let u;switch(p(t)){case m:t.has(e)&&(r=e);break;case h:r=t.get(e);break;case y:r=t[e];break;default:if(u=t.get,u instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function Gt(t){return t!=null&&!!t[Symbol.iterator]}const et=Gt;function zt(t){return t==null||!!t[Symbol.iterator]}function s(t){if(t==null)return[];if(zt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const ot=Symbol("Iterable"),qt=Symbol.iterator;function L(t){return t[Symbol.iterator]()}const P=L;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 I(t){const[e]=s(t);return e}function He(t){const[e,n]=s(t);return n}function tn(t){return I(I(t))}function Y(t){return f(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 en(t){t=s(t);let e;switch(p(t)){case y:return t[t.length-1];default:for(const n of t)e=n;return e}}function C(t){return new T(t)}function M(t){return t instanceof T}function E(t,e,n){t=l(t);let r,u;if(arguments.length===2){const o=s(e)[Symbol.iterator](),i=o.next();i.done?u=t():u=i.value,r=o}else u=e,r=s(n);if(u instanceof T)return u.value;for(const o of r)if(u=t(u,o),u instanceof T){u=u.value;break}return u}function*nn(t,e){const n=e.next();n.done?yield t():yield*Bt(t,n.value,e)}function*Bt(t,e,n){let r=e,u=n;for(;;){if(M(r)){yield r.value;return}else yield r;const o=u.next();if(o.done)break;r=t(r,o.value)}}function rn(t,e,n){return t=l(t),arguments.length===2?f(function*(){yield*nn(t,s(e)[Symbol.iterator]())}):f(function*(){yield*Bt(t,e,s(n)[Symbol.iterator]())})}var $t=!1;function un(){$t=!0}class it{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&$t)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}it.prototype[ot]=!0;function f(t){return new it(t)}class Ft{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*s(this.coll)}}function on(t,e){return new Ft(t,e)}function R(t,...e){switch(t=l(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 f(function*(){for(const n of s(e[0]))yield t(n)});default:return f(function*(){const n=e.map(r=>P(s(r)));for(;;){const r=[];for(const u of n){const o=u.next();if(o.done)return;r.push(o.value)}yield t(...r)}})}}function Lt(t){return e=>(...n)=>{switch(n.length){case 0:return e();case 1:return e(n[0]);case 2:{const r=n[0],u=n[1];return _(t(u))?e(r,u):r}}}}function D(t,e){return arguments.length===1?Lt(t):(t=l(t),f(function*(){for(const n of s(e))_(t(n))&&(yield n)}))}function cn(t,e){return[...D(t,e)]}function sn(t,e){return arguments.length===1?Lt(G(t)):D(G(t),e)}function fn(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 ln(t,e){return t=l(t),arguments.length===1?fn(t):f(function*(){let n=0;for(const r of s(e))yield t(n,r),n++})}function an(t,e){return t=l(t),f(function*(){let n=0;for(const r of s(e)){const u=t(n,r);_(u)&&(yield u),n++}})}function pn(t){return e=>{let n=-1;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1)return e(r[0]);if(u===2){const o=r[0],i=r[1];n++;const c=t(n,i);return c==null?o:e(o,c)}}}}function hn(t,e){return arguments.length===1?pn(t):an(t,e)}function _n(...t){return t.join("")}function Pt(t){return!_(t)}function dn(t){return t==null}const xn={};function yn(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case m:case q:return[...n];case h:return Object.fromEntries(n);default:return n}})}function Yt(...t){return t.map(yn).join(" ")}function mn(...t){Ot(Yt(...t))}class Ct{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 u of Object.entries(this._watches)){const o=u[0],i=u[1];i(o,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 wn(t){return new Ct(t)}function ct(t){return t._deref()}function Dt(t,e){t._reset_BANG_(e)}function gn(t,e,...n){e=l(e);const r=e(ct(t),...n);return Dt(t,r),r}function An(t,e,n){return f(function*(){let r=t,u=e,o=n;e===void 0&&(r=0,u=t);let i=r||0;o=n??1;const c=o>=0;for(;u===void 0||c&&i<u||!c&&u<i;)yield i,i+=o})}function bn(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function vn(t,e){if(H(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 Mn(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 En(t,e,n){return t.slice(e,n)}function st(...t){return t}function Rn(t){return p(t)===y}function ft(...t){if(t.length===2){const[r,u]=t,o=s(u);if(Array.isArray(o)){const i=new Array(o.length);for(var e=0;e<o.length;e++)i[e]=r(o[e]);return i}else{var n=[];for(const i of o)n.push(r(i));return n}}return[...R(...t)]}function k(t){return U(t)?t:[...s(t)]}function Sn(t){return new Set(s(t))}function kn(t){return p(t)===m}const Vt=Symbol("IApply__apply");function Ut(t,...e){t=l(t);const n=e.slice(0,e.length-1),r=s(e[e.length-1]),u=t[Vt];return u?u(...n,r):t(...n,...r)}function Wt(t){return t%2==0}function Qn(t){return!Wt(t)}function G(t){return t=l(t),(...e)=>Pt(t(...e))}function Kn(t){return(...e)=>t}class V extends Array{constructor(...e){super(),this.push(...e)}}function In(t){return p(t)===S}function Jt(...t){return new V(...t)}function U(t){return Array.isArray(t)}function lt(t){return f(function*(){for(const e of t)yield*s(e)})}function Xt(...t){return lt(t)}Xt[Vt]=t=>lt(t);function Nn(t,...e){if(e.length===0)return kt(R(t),Se);{const n=R(t,...e);return lt(n)}}function Zt(t){return t}function Ht(...t){return f(function*(){const e=t.map(n=>P(s(n)));for(;;){const n=[];for(const r of e){const u=r.next();if(u.done)return;n.push(u.value)}yield*n}})}function jn(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 u=e(r[0],t);return M(u)?u:e(u,r[1])}else return n=!0,e(r[0],r[1])}}}}function On(t,e){return arguments.length===1?jn(t):Z(1,Ht(pt(t),e))}function Tn(t,e){const n=p(t),r=B(n)||{};for(const u of e){const o=w(t,u);o!=null&&A(r,u,o)}return r}function at(t){return M(t)?ct(t):t}function Gn(t){return e=>{let n=[];return(...r)=>{let u,o;switch(r.length){case 0:return e();case 1:return u=r[0],n.length!==0&&(o=[...n],n=[],u=at(e(u,o))),e(u);case 2:return u=r[0],n.push(r[1]),t===n.length?(o=[...n],n=[],e(u,o)):u}}}}function te(t,...e){if(arguments.length===1)return Gn(t);let n=t,r=e[0];return e.length===2&&([n,r]=e),ne(t,n,[],r,!0)}function ee(t,...e){let n=t,r=[],u=e[0];return e.length===2?[n,u]=e:e.length>2&&([n,r,u]=e),ne(t,n,r,u,!1)}const zn=ee,qn=te;function ne(t,e,n,r,u){return f(function*(){let o=[],i=0;for(const c of s(r))i<t&&(o.push(c),o.length===t&&(yield o,o=e<t?o.slice(e):[])),i++,i===e&&(i=0);o.length>0&&(o.length===t||u?yield o:n.length&&(o.push(...n.slice(0,t-o.length)),yield o))})}function Bn(t){return e=>{let n=[];const r={};let u=r;return(...o)=>{const i=o.length;if(i===0)return e();if(i===1){let c=o[0];if(n.length!==0){const a=[...n];n=[],c=at(e(c,a))}return e(c)}if(i===2){const c=o[0],a=o[1],g=u,x=t(a);if(u=x,g===r||x===g)return n.push(a),c;{const Ke=[...n];n=[];const gt=e(c,Ke);return M(gt)||n.push(a),gt}}}}}function $n(t,e){return t=l(t),arguments.length===1?Bn(t):f(function*(){const n=P(e),r=n.next();r.done&&(yield*null);const u=r.value;let o=t(u),i=[u],c=[];for(;;){const a=n.next();if(a.done){yield i;break}const g=a.value,x=t(g);o==x?i.push(g):(yield i,c.push(g),i=c,o=x,c=[])}})}function W(t){const e=p(t);if(e!=null)return B(e);throw new Error(`Can't create empty of ${typeof t}`)}function Fn(...t){const e=t[0];let n;return e==null?n={}:n=oe(W(e),e),F(n,...t.slice(1))}function re(t){return t[0]}function ue(t){return t[1]}function Ln(t,...e){t=l(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(o,i)=>{const c=re(i),a=ue(i);return Nt(o,c)?K(o,c,t(w(o,c),a)):K(o,c,a)};return E((o,i)=>E(r,o||{},v(i)),e)}else return null}function Pn(){return performance.now()}function oe(...t){let e,n,r,u,o;switch(t.length){case 0:return[];case 1:return t[0];case 2:return Kt(t[0]??[],...s(t[1]));case 3:return e=t[0],n=t[1],r=t[2],u=j(e),o=(i,c)=>c===void 0?i:F(i,c),wt(n,o,u,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function Yn(t,e){return t===e}function pt(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[ot]:!0,[qt]: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 ie(t){return M(t)?t:C(t)}function Cn(t){return e=>{let n=t;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1){const o=r[0];return e(o)}if(u===2){let o=r[0];const i=r[1],c=n,a=(n=n-1,n);return c>0&&(o=e(o,i)),a>0?o:ie(o)}}}}function J(t,e){return arguments.length===1?Cn(t):f(function*(){let n=t-1;for(const r of s(e))if(n-->=0&&(yield r),n<0)return})}function Dn(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 u of s(e))n[r%t]=u,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 Vn(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const u=n[0],o=n[1];return _(t(o))?e(u,o):C(u)}}}function X(t,e){return t=l(t),arguments.length===1?Vn(t):f(function*(){for(const n of s(e))if(_(t(n)))yield n;else return})}function Un(t){return e=>{let n=-1;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1)return e(r[0]);if(u===2){const o=r[0],i=r[1];return n++,ke(n,t)===0?e(o,i):o}}}}function Wn(t,e){return arguments.length===1?Un(t):t<=0?pt(I(e)):f(function*(){let n=0;for(const r of s(e))n%t===0&&(yield r),n++})}function Jn(t,...e){return t=l(t),function(...n){return t(...e,...n)}}function Xn(t){return f(function*(){for(;;)yield*t})}function Zn(t){return e=>{let n=t;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1)return e(r[0]);if(u===2){const o=r[0],i=r[1],c=n;return n--,c>0?o:e(o,i)}}}}function Z(t,e){return arguments.length===1?Zn(t):f(function*(){const n=L(s(e));for(let r=0;r<t;r++)n.next();yield*n})}function Hn(t){return e=>{let n=!0;return(...r)=>{const u=r.length;if(u===0)return e();if(u===1)return e(r[0]);if(u===2){const o=n,i=r[0],c=r[1];return o&&_(t(c))?i:(n=null,e(i,c))}}}}function ce(t,e){return t=l(t),arguments.length===1?Hn(t):f(function*(){const n=L(s(e));for(;;){const r=n.next();if(r.done)break;const u=r.value;if(!_(t(u))){yield u;break}}yield*n})}function tr(){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 u=n[0],o=n[1];return e.has(o)?u:(e.add(o),t(u,o))}}}}function er(t){return arguments.length===0?tr():f(function*(){const e=new Set;for(const n of s(t))e.has(n)||(yield n),e.add(n)})}function nr(t,e,n,...r){return n=l(n),K(t,e,n(w(t,e),...r))}function ht(t,e,n){let r=t;for(const u of e)r=w(r,u);return r===void 0?n:r}function rr(t,e,n,...r){return n=l(n),Rt(t,e,n(ht(t,e),...r))}function _t(t,e,...n){return t=l(t),function(r,...u){return r?t(r,...n,...u):t(e,...n,...u)}}function se(t,e){t=l(t);for(const n of s(e))if(!t(n))return!1;return!0}function ur(t,e){return!se(t,e)}function or(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const u=n[0],o=n[1],i=t(o);return i==null?u:e(u,i)}}}function ir(t,e){return t=l(t),arguments.length===1?or(t):f(function*(){for(const n of s(e)){const r=t(n);_(r)&&(yield r)}})}function cr(t){return t=s(t),[...t].reverse()}function dt(t,e){return arguments.length===1&&(e=t,t=void 0),t=l(t),e=s(e),[...e].sort(t||b)}function sr(t){return t===b?t:(e,n)=>{const r=t(e,n);return xe(r)?r:r?-1:t(n,e)?1:0}}function fr(t,e,n){return arguments.length===2&&(n=e,e=b),t=l(t),e=l(e),dt((r,u)=>{const o=sr(e),i=t(r),c=t(u);return o(i,c)},n)}function lr(t){const e=[...t];let n=t.length;for(;n;){const r=Math.floor(Math.random()*n--),u=e[n];e[n]=e[r],e[r]=u}return e}function fe(t,e){t=l(t);for(const n of s(e)){const r=t(n);if(_(r))return r}}function ar(t,e){return t=l(t),!fe(t,e)}function pr(t,e){return(Array.isArray(e)?ft:R)(r=>{const u=t[r];return u!==void 0?u:r},e)}function hr(t){return!v(t)}function le(t){return Math.floor(Math.random()*t)}function _r(t){const e=le(z(t));return Tt(t,e)}function dr(t){return f(function*(){for(;;)yield t()})}function xr(t,e){arguments.length===1&&(e=t,t=void 0);const n=dr(e);return t?J(t,n):n}function xt(t,e,n,...r){const u=w(t,e);return A(t,e,n(u,...r))}function yr(t,e){t=l(t);const n={};for(const r of s(e)){const u=t(r);xt(n,u,_t(F,[]),r)}return n}function mr(t){const e={},n=_t(jt,0);for(const r of s(t))xt(e,r,n);return e}class wr{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 gr(t){const e=[...s(t)];return e.pop(),e.length>0?e:null}function Ar(...t){const[e,n]=t.length>1?t:[1,t[0]];return R((r,u)=>r,n,Z(e,n))}function br(t,e){return[J(t,e),Z(t,e)]}function vr(t,e){return[X(t,e),ce(t,e)]}function z(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 Mr(t){return t===!0}function Er(t){return t===!1}function Rr(t){return t!=null}function Sr(t){return!!t}function kr(t){return t===0}function Qr(t){return t<0}function Kr(t){return t>0}function Ir(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function Nr(t){return t.length}function jr(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const u=[e,n,...r],o=u[u.length-1];let i=t,c=0;const a=u.length-2;for(;c<a;c++)i=i[u[c]];return i[u[c]]=o,n}}function Or(t){for(const e of s(t));return null}function Tr(t){return k(t)}function Gr(t){return[...t]}function zr(t,e,n){return t._add_watch(e,n)}function qr(t,e){return t._remove_watch(e)}function yt(t,e,n){if(!n)return e;var r=e;for(const u of s(n))r=t(r,u[0],u[1]);return r}function ae(t,e,...n){return e==null?t:Math.max(t,e,...n)}function Br(t,e,...n){return e==null?t:Math.min(t,e,...n)}function pe(t){return t==null?!1:!!($(t)||t instanceof Map)}function $r(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function Fr(...t){return(...e)=>{for(const n of t)for(const r of e){const u=n(r);if(u)return u}}}function he(t,e){return k(e||t)}function Lr(t,e){var n=e;return f(function*(){for(;;)yield n,n=t(n)})}function Pr(...t){return t=t.map(l),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function nt(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return v(Y(t))}function Yr(t){return nt(nt(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 u=0;u<t.length;u++){const o=b(t[u],e[u]);if(o!=0)return o}return 0}else throw new Error(`comparing ${n} to ${r}`)}}function Cr(t){return he(t)}function _(t){return t!=null&&t!==!1}const Dr=_;function _e(t,e,n){return t.substring(e,n)}function de(t){return typeof t=="function"}function Vr(t,e){return f(function*(){for(;;){const n=t.exec(e);if(n){const r=n[0];yield n.length===1?r:k(n);const o=n.index+ae(1,r.length);if(o>e.length)break;e=_e(e,o)}else break}})}function Ur(t){return Number.isNaN(t)}function xe(t){return typeof t=="number"}function ye(t){if(t==null)return;switch(p(t)){case d:return Object.keys(t);case h:return Array.from(t.keys())}}function Wr(t){return ye(t)}function Jr(t){if(t==null)return;switch(p(t)){case d:return Object.values(t);case h:return Array.from(t.values())}}function H(t){return typeof t=="string"}function Xr(t){return p(t)!=null}function Zr(t){return t instanceof RegExp}class mt extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function Hr(t){return t instanceof mt?t._data:null}function tu(t){return t instanceof Error?t.message:null}function eu(t){return t instanceof mt?t._cause:null}function nu(t,e,n){return new mt(t,e,n)}function me(t){return Number.isInteger(t)}const ru=me,we=Symbol("meta");function uu(t){return t instanceof Object?t[we]:null}function ou(t,e){const n=j(t);return n[we]=e,n}function iu(t){return t===!0||t===!1}function ge(t){switch(p(t)){case y:case h:case d:case S:case m:return!0}return!1}function cu(t,e){return ge(e)?z(e):z(J(t,e))}function su(t,e){const n=w(t,e);if(n!==void 0)return[e,n]}function fu(t,e){return(t%e+e)%e}function lu(t,e,...n){if(n.length==0)return e;var r=t(e),u=e;return n.forEach(o=>{var i=t(o);i<=r&&(r=i,u=o)}),u}function au(t,e,...n){if(n.length==0)return e;var r=t(e),u=e;return n.forEach(o=>{var i=t(o);i>=r&&(r=i,u=o)}),u}function Ae(t){throw new Error(`Expected string, got: ${typeof t}`)}function pu(t){if(H(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return Ae(t)}function hu(t){if(H(t))return/^[\\x00-\\x20]*[+-]?NaN[\\x00-\\x20]*$/.test(t)?NaN:/^[\\x00-\\x20]*[+-]?(Infinity|((\d+\.?\d*|\.\d+)([eE][+-]?\d+)?)[dDfF]?)[\\x00-\\x20]*$/.test(t)?parseFloat(t):null;throw new Ae(t)}function be(t){return t>=0?Math.floor(t):Math.ceil(t)}function ve(t,e){const n=t%e;return be((t-n)/e)}function Me(t,...e){if(e.length==0)for(;;){const n=t();if(_(de(n))){t=n;continue}else return n}else return Me(function(){return Ut(t,e)})}function wt(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return wt(t,n,n(),r)}default:{let n=e[0];const r=e[1],u=e[2];n=t(n);const o=E(n,r,u);return n(o)}}}function _u(t,e){const n={},r=s(t)[Symbol.iterator](),u=s(e)[Symbol.iterator]();let o,i;for(;o=r.next(),!(o.done||(i=u.next(),i.done));)n[o.value]=i.value;return n}function du(t){return v(t)?t:null}function Ee(t,e,n){const r=function*(u){if(yield u,_(t(u)))for(const o of s(e(u)))yield*r(o)};return f(function*(){yield*r(n)})}function xu(t){return D(G(et),Y(Ee(et,v,t)))}function yu(t){return j(t)}function mu(t){return Object.freeze(t)}class O{constructor(e){e instanceof O||(e=dt(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 u=0;u<n.length;u++)if(b(e,n[u])<=0){n.splice(u,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 wu(...t){return new O(t)}function rt(t,e,n){return r=>e(b(r,n),0)}function Re(t,e,n=!0){let r=0;for(;r<t.length&&b(e,t[r])>0;r++);return r}function gu([t,e,n]){const r=rt(t,e,n);if(e===vt||e===Mt){const u=[...t],o=Re(u,n,!0);return u.splice(0,o),r(u[0])||u.splice(0,1),u}else return[...X(r,t)]}function Au([t,e,n,r,u]){const o=[...t],i=Re(o,n,!0);o.splice(0,i);const c=rt(t,r,u);return rt(t,e,n)(o[0])||o.splice(0,1),[...X(c,o)]}function bu(...t){if(t.length===3)return gu(t);if(t.length===5)return Au(t)}function vu(t){return Math.abs(t)}function Mu(t){return be(t)}function Eu(t){return t!=null&&t.constructor}function Ru(t){return(e,n)=>{const r=t(e,n);return M(r)?C(r):r}}function Se(t){return t=Ru(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 ke(t,e){const n=ve(t,e);return t-e*n}function Su(t){const e=new Map;return(...n)=>{const r=[n.length,...n],u=ht(e,r);if(u===void 0){const o=t(...n);return St(e,r,o),o}else return u}}function ku(t){return U(t)?t[t.length-1]:I(t)}function Qu(t){if(U(t)){const e=[...t];return e.pop(),e}else return Y(t)}function Ku(t,e){const n=W(t),r=Et(t)||A;return yt((u,o,i)=>r(u,e(o),i),n,t),n}function Qe(t,e){const n=W(t),r=Et(t)||A;return yt((u,o,i)=>r(u,o,e(i)),n,t),n}function Iu(){return crypto.randomUUID()}class Nu{constructor(e){this.f=e}_deref(){return this.realized?this.v:(this.v=this.f(),this.realized=!0,this.v)}}function ut(t,e){if(e.has(t))return t;if(e.add(t),pe(t))return Qe(t,r=>ut(r,e));const n=p(t);return n&&n!=d?ft(r=>ut(r,e),t):t}function ju(t){return ut(t,new Set)}function Ou(t,e){E((n,r)=>t(r),null,e)}function Tu(t,e,...n){if(e===void 0||t===e)return!1;for(const r of n)if(t===r)return!1;return!0}return Ge(Gu);})();
|
package/package.json
CHANGED
package/src/squint/core.js
CHANGED
|
@@ -2346,7 +2346,7 @@ export function compare(x, y) {
|
|
|
2346
2346
|
return 1;
|
|
2347
2347
|
} else {
|
|
2348
2348
|
for (let i = 0; i < x.length; i++) {
|
|
2349
|
-
|
|
2349
|
+
const c = compare(x[i], y[i]);
|
|
2350
2350
|
if (c != 0) {
|
|
2351
2351
|
return c;
|
|
2352
2352
|
}
|
|
@@ -2402,10 +2402,13 @@ export function number_QMARK_(x) {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
|
|
2404
2404
|
export function keys(obj) {
|
|
2405
|
-
if (obj)
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2405
|
+
if (obj == null) return;
|
|
2406
|
+
const t = typeConst(obj);
|
|
2407
|
+
switch (t) {
|
|
2408
|
+
case OBJECT_TYPE:
|
|
2409
|
+
return Object.keys(obj);
|
|
2410
|
+
case MAP_TYPE:
|
|
2411
|
+
return Array.from(obj.keys());
|
|
2409
2412
|
}
|
|
2410
2413
|
}
|
|
2411
2414
|
|
|
@@ -2414,10 +2417,13 @@ export function js_keys(obj) {
|
|
|
2414
2417
|
}
|
|
2415
2418
|
|
|
2416
2419
|
export function vals(obj) {
|
|
2417
|
-
if (obj)
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2420
|
+
if (obj == null) return;
|
|
2421
|
+
const t = typeConst(obj);
|
|
2422
|
+
switch (t) {
|
|
2423
|
+
case OBJECT_TYPE:
|
|
2424
|
+
return Object.values(obj);
|
|
2425
|
+
case MAP_TYPE:
|
|
2426
|
+
return Array.from(obj.values());
|
|
2421
2427
|
}
|
|
2422
2428
|
}
|
|
2423
2429
|
|