@statedelta-libs/operators 0.0.2 → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Anderson D. Rosa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -278,7 +278,8 @@ cond([
278
278
  | `subtract(a, b)` | Subtraction |
279
279
  | `multiply(a, b)` | Multiplication |
280
280
  | `divide(a, b)` | Division |
281
- | `modulo(a, b)` | Modulo |
281
+ | `modulo(a, b)` | Remainder (JS `%`) |
282
+ | `mathMod(a, b)` | Mathematical modulo (always ≥ 0) |
282
283
  | `negate(x)` | Negate number |
283
284
  | `inc(x)` | Increment |
284
285
  | `dec(x)` | Decrement |
@@ -294,6 +295,10 @@ cond([
294
295
  map(multiply(2), [1, 2, 3]); // [2, 4, 6]
295
296
  clamp(0, 100, value);
296
297
  pipe(prices, map(multiply(1.1)), map(round));
298
+
299
+ // modulo vs mathMod
300
+ modulo(-1, 4); // -1 (JS remainder)
301
+ mathMod(-1, 4); // 3 (mathematical modulo, always non-negative)
297
302
  ```
298
303
 
299
304
  ---
@@ -408,6 +413,27 @@ transduce(xform, (acc, x) => acc + x, 0, [1, 2, 3, 4, 5, 6, 7]);
408
413
 
409
414
  ---
410
415
 
416
+ ## Scope
417
+
418
+ All pure functions are available as a single `scope` object, useful when you need to pass operators as a `Record<string, Function>` (e.g., for JSON DSL evaluation):
419
+
420
+ ```typescript
421
+ import { scope } from '@statedelta-libs/operators';
422
+
423
+ // scope contains all 176 functions, no placeholders or non-function values
424
+ // Type-safe: satisfies Record<string, (...args: any[]) => any>
425
+
426
+ // Use with DSL engines that expect a function-only scope
427
+ evaluate(expression, scope);
428
+
429
+ // Or pick what you need
430
+ const { map, filter, sum } = scope;
431
+ ```
432
+
433
+ > **Note:** `__` (placeholder) and `isPlaceholder` are **not** included in `scope` since they are not functions. Import them directly when needed.
434
+
435
+ ---
436
+
411
437
  ## TypeScript
412
438
 
413
439
  Full type inference throughout:
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';function v(n){return n}function E(n){return function(){return n}}function F(){return true}function V(){return false}var w=Symbol.for("@@statedelta/placeholder"),D={[w]:true,__:w};function c(n){return n!==null&&typeof n=="object"&&w in n&&n[w]===true}function p(n){return function e(r){return arguments.length===0?e:n(r)}}function l(n){return function e(r,t){switch(arguments.length){case 0:return e;case 1:return c(r)?e:p(o=>n(r,o));default:return c(r)&&c(t)?e:c(r)?p(o=>n(o,t)):c(t)?p(o=>n(r,o)):n(r,t)}}}var j=l(function(e,r){return e(r),r});function k(n){return function e(r,t,o){switch(arguments.length){case 0:return e;case 1:return c(r)?e:l((s,T)=>n(r,s,T));case 2:return c(r)&&c(t)?e:c(r)?l((s,T)=>n(s,t,T)):c(t)?l((s,T)=>n(r,s,T)):p(s=>n(r,t,s));default:let u=c(r),i=c(t),a=c(o),d=(u?1:0)+(i?1:0)+(a?1:0);return d===3?e:d===2?u?i?l((s,T)=>n(s,T,o)):l((s,T)=>n(s,t,T)):l((s,T)=>n(r,s,T)):d===1?u?p(s=>n(s,t,o)):i?p(s=>n(r,s,o)):p(s=>n(r,t,s)):n(r,t,o)}}}function A(n,e,r){return function t(...o){if(o.length===0)return t;let u=[],i=0;for(let d=0;d<e.length;d++)c(e[d])&&i<o.length?(u.push(o[i]),i++):u.push(e[d]);for(;i<o.length;)u.push(o[i]),i++;let a=0;for(let d=0;d<Math.min(u.length,n);d++)c(u[d])||a++;return a>=n?r.apply(this,u.slice(0,n)):A(n,u,r)}}function N(n){let e=n.length;switch(e){case 0:return n;case 1:return p(n);case 2:return l(n);case 3:return k(n);default:return A(e,[],n)}}function O(n,e){if(n<0)throw new Error(`curryN: arity must be non-negative, got ${n}`);if(n>10)throw new Error(`curryN: arity must be at most 10, got ${n}`);switch(n){case 0:return e;case 1:return p(e);case 2:return l(e);case 3:return k(e);default:return A(n,[],e)}}function L(n,e){return function(...t){let o=[],u=0;for(let i=0;i<e.length;i++)c(e[i])&&u<t.length?(o.push(t[u]),u++):o.push(e[i]);for(;u<t.length;)o.push(t[u]),u++;return n(...o)}}function W(n,e){return function(...t){return n(...t,...e)}}var _=function(e,...r){let t=e;for(let o=0;o<r.length;o++)t=r[o](t);return t},q=function(...e){return e.length===0?r=>r:e.length===1?e[0]:function(t){let o=t;for(let u=0;u<e.length;u++)o=e[u](o);return o}};var I=function(...e){return e.length===0?r=>r:e.length===1?e[0]:function(t){let o=t;for(let u=e.length-1;u>=0;u--)o=e[u](o);return o}};function M(n,e){return e.length===0?(r=>r):function(t){let o=t;for(let u=0;u<e.length;u++)o=n(e[u],o);return o}}function z(...n){return async function(r){let t=r;for(let o=0;o<n.length;o++)t=await n[o](t);return t}}function H(...n){return async function(r){let t=r;for(let o=n.length-1;o>=0;o--)t=await n[o](t);return t}}function $(...n){return e=>r=>n.reduce((t,o)=>o(t)(r),e)}function Y(...n){return e=>r=>n.reduceRight((t,o)=>o(t)(r),e)}function dr(n,e){let r={...e};for(let[t,o]of Object.entries(n))r[t]=typeof o=="function"?o(r):o;return r}function U(n,e,r){let t=dr(n,r);return e(t)}function G(n,e,r){return e!==void 0&&r!==void 0?U(n,e,r):e!==void 0?t=>U(n,e,t):(t,o)=>o!==void 0?U(n,t,o):u=>U(n,t,u)}var J=l((n,e)=>{let r=e.length,t=new Array(r);for(let o=0;o<r;o++)t[o]=n(e[o],o,e);return t});var Q=l((n,e)=>{let r=[],t=e.length;for(let o=0;o<t;o++)n(e[o],o,e)&&r.push(e[o]);return r}),X=l((n,e)=>{let r=[],t=e.length;for(let o=0;o<t;o++)n(e[o],o,e)||r.push(e[o]);return r});var Z=k((n,e,r)=>{let t=e,o=r.length;for(let u=0;u<o;u++)t=n(t,r[u],u,r);return t}),nn=k((n,e,r)=>{let t=e;for(let o=r.length-1;o>=0;o--)t=n(t,r[o],o,r);return t});function en(n){return n[0]}function rn(n){return n.slice(1)}function tn(n){return n[n.length-1]}function on(n){return n.slice(0,-1)}function un(n,e){if(e===void 0)return t=>{let o=n<0?t.length+n:n;return t[o]};let r=n<0?e.length+n:n;return e[r]}function an(n,e){return e===void 0?r=>r.slice(0,Math.max(0,n)):e.slice(0,Math.max(0,n))}function dn(n,e){return e===void 0?r=>n<=0?[]:r.slice(-n):n<=0?[]:e.slice(-n)}function sn(n,e){let r=t=>{let o=[];for(let u=0;u<t.length&&n(t[u],u,t);u++)o.push(t[u]);return o};return e===void 0?r:r(e)}function cn(n,e){return e===void 0?r=>r.slice(Math.max(0,n)):e.slice(Math.max(0,n))}function ln(n,e){return e===void 0?r=>n<=0?r.slice():r.slice(0,-n):n<=0?e.slice():e.slice(0,-n)}function fn(n,e){let r=t=>{let o=0;for(;o<t.length&&n(t[o],o,t);)o++;return t.slice(o)};return e===void 0?r:r(e)}function Tn(n,e,r){return e!==void 0&&r!==void 0?r.slice(n,e):e!==void 0?t=>t.slice(n,e):function(o,u){return u!==void 0?u.slice(n,o):i=>i.slice(n,o)}}function pn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(n(t[o],o,t))return t[o]};return e===void 0?r:r(e)}function yn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(n(t[o],o,t))return o;return -1};return e===void 0?r:r(e)}function mn(n,e){let r=t=>{for(let o=t.length-1;o>=0;o--)if(n(t[o],o,t))return t[o]};return e===void 0?r:r(e)}function xn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(t[o]===n)return o;return -1};return e===void 0?r:r(e)}function bn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(t[o]===n)return true;return false};return e===void 0?r:r(e)}function K(n){let e=[];for(let r=0;r<n.length;r++){let t=n[r];if(Array.isArray(t))for(let o=0;o<t.length;o++)e.push(t[o]);else e.push(t);}return e}var gn=K;function Rn(n,e){let r=t=>{let o=[];for(let u=0;u<t.length;u++){let i=n(t[u],u,t);for(let a=0;a<i.length;a++)o.push(i[a]);}return o};return e===void 0?r:r(e)}function kn(n){let e=new Set,r=[];for(let t=0;t<n.length;t++){let o=n[t];e.has(o)||(e.add(o),r.push(o));}return r}function An(n,e){let r=t=>{let o=new Set,u=[];for(let i=0;i<t.length;i++){let a=t[i],d=n(a);o.has(d)||(o.add(d),u.push(a));}return u};return e===void 0?r:r(e)}function hn(n,e){return e===void 0?r=>[...r].sort(n):[...e].sort(n)}function wn(n,e){let r=(t,o)=>{let u=n(t),i=n(o);return u<i?-1:u>i?1:0};return e===void 0?t=>[...t].sort(r):[...e].sort(r)}function Un(n){let e=new Array(n.length);for(let r=0;r<n.length;r++)e[n.length-1-r]=n[r];return e}function Cn(n,e){let r=t=>{let o={};for(let u=0;u<t.length;u++){let i=t[u],a=n(i);a in o||(o[a]=[]),o[a].push(i);}return o};return e===void 0?r:r(e)}function Sn(n,e){return e===void 0?r=>[...n,...r]:[...n,...e]}function Kn(n,e){return e===void 0?r=>[...r,n]:[...e,n]}function Bn(n,e){return e===void 0?r=>[n,...r]:[n,...e]}function Pn(n,e){if(e===void 0)return o=>{let u=Math.min(n.length,o.length),i=new Array(u);for(let a=0;a<u;a++)i[a]=[n[a],o[a]];return i};let r=Math.min(n.length,e.length),t=new Array(r);for(let o=0;o<r;o++)t[o]=[n[o],e[o]];return t}function vn(n,e,r){if(e!==void 0&&r!==void 0){let t=Math.min(e.length,r.length),o=new Array(t);for(let u=0;u<t;u++)o[u]=n(e[u],r[u]);return o}return e!==void 0?t=>{let o=Math.min(e.length,t.length),u=new Array(o);for(let i=0;i<o;i++)u[i]=n(e[i],t[i]);return u}:function(o,u){if(u!==void 0){let i=Math.min(o.length,u.length),a=new Array(i);for(let d=0;d<i;d++)a[d]=n(o[d],u[d]);return a}return i=>{let a=Math.min(o.length,i.length),d=new Array(a);for(let s=0;s<a;s++)d[s]=n(o[s],i[s]);return d}}}function En(n,e){if(e===void 0)return o=>{let u={},i=Math.min(n.length,o.length);for(let a=0;a<i;a++)u[n[a]]=o[a];return u};let r={},t=Math.min(n.length,e.length);for(let o=0;o<t;o++)r[n[o]]=e[o];return r}function Fn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(n(t[o],o,t))return true;return false};return e===void 0?r:r(e)}function Vn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(!n(t[o],o,t))return false;return true};return e===void 0?r:r(e)}function Dn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(n(t[o],o,t))return false;return true};return e===void 0?r:r(e)}function jn(n){return n.length}function Nn(n){let e=0;for(let r=0;r<n.length;r++)e+=n[r];return e}function On(n){if(n.length===0)return 1;let e=1;for(let r=0;r<n.length;r++)e*=n[r];return e}function Ln(n){if(n.length===0)return NaN;let e=0;for(let r=0;r<n.length;r++)e+=n[r];return e/n.length}function Wn(n){if(n.length===0)return NaN;let e=[...n].sort((t,o)=>t-o),r=Math.floor(e.length/2);return e.length%2===0?(e[r-1]+e[r])/2:e[r]}function _n(n){if(n.length===0)return 1/0;let e=n[0];for(let r=1;r<n.length;r++)n[r]<e&&(e=n[r]);return e}function qn(n){if(n.length===0)return -1/0;let e=n[0];for(let r=1;r<n.length;r++)n[r]>e&&(e=n[r]);return e}function In(n,e){let r=t=>{let o={};for(let u=0;u<t.length;u++){let i=n(t[u]);o[i]=(o[i]||0)+1;}return o};return e===void 0?r:r(e)}function Mn(n,e){if(e===void 0)return t=>{if(n>=t)return [];let o=new Array(t-n);for(let u=0;u<o.length;u++)o[u]=n+u;return o};if(n>=e)return [];let r=new Array(e-n);for(let t=0;t<r.length;t++)r[t]=n+t;return r}function zn(n,e){let r=t=>{let o=[],u=[];for(let i=0;i<t.length;i++)n(t[i],i,t)?o.push(t[i]):u.push(t[i]);return [o,u]};return e===void 0?r:r(e)}function Hn(n,e){if(e===void 0)return t=>{if(n<=0)return [];let o=[];for(let u=0;u<t.length;u+=n)o.push(t.slice(u,u+n));return o};if(n<=0)return [];let r=[];for(let t=0;t<e.length;t+=n)r.push(e.slice(t,t+n));return r}function $n(n,e){let r=t=>{let o={};for(let u=0;u<t.length;u++){let i=n(t[u]);o[i]=t[u];}return o};return e===void 0?r:r(e)}function Yn(n,e){return e===void 0?r=>r[n]:e[n]}function f(n,e){if(e===void 0)return t=>f(n,t);let r=e;for(let t of n){if(r==null)return;r=r[t];}return r}function Gn(n,e,r){if(e===void 0)return (o,u)=>{if(u===void 0)return a=>{let d=a[o];return d??n};let i=u[o];return i??n};if(r===void 0)return o=>{let u=o[e];return u??n};let t=r[e];return t??n}function Jn(n,e,r){if(e===void 0)return (o,u)=>{if(u===void 0)return a=>{let d=f(o,a);return d??n};let i=f(o,u);return i??n};if(r===void 0)return o=>{let u=f(e,o);return u??n};let t=f(e,r);return t??n}function Qn(n,e){return e===void 0?r=>n.map(t=>r[t]):n.map(r=>e[r])}function Xn(n,e){return e===void 0?r=>r.map(t=>t[n]):e.map(r=>r[n])}function Zn(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>({...u,[n]:t}):{...o,[n]:t}:r===void 0?t=>({...t,[n]:e}):{...r,[n]:e}}function g(n,e,r){if(n.length===0)return e;let[t,...o]=n,u=typeof t=="number";if(r==null){let a=u?[]:{};if(o.length===0){if(u){let d=a;return d[t]=e,d}return {...a,[t]:e}}if(u){let d=a;return d[t]=g(o,e,void 0),d}return {...a,[t]:g(o,e,void 0)}}if(Array.isArray(r)){let a=[...r];return a[t]=o.length===0?e:g(o,e,r[t]),a}let i=r;return {...i,[t]:o.length===0?e:g(o,e,i[t])}}function ne(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>g(n,t,u):g(n,t,o):r===void 0?t=>g(n,e,t):g(n,e,r)}function ee(n,e){if(e===void 0)return o=>{let{[n]:u,...i}=o;return i};let{[n]:r,...t}=e;return t}function C(n,e){if(n.length===0||e===null||e===void 0)return e;let[r,...t]=n;if(t.length===0){if(Array.isArray(e)){let a=[...e];return a.splice(r,1),a}let{[r]:u,...i}=e;return i}if(Array.isArray(e)){let u=[...e];return u[r]=C(t,e[r]),u}let o=e;return {...o,[r]:C(t,o[r])}}function re(n,e){return e===void 0?r=>C(n,r):C(n,e)}function te(n,e){if(e===void 0)return t=>{let o={};for(let u of n)u in t&&(o[u]=t[u]);return o};let r={};for(let t of n)t in e&&(r[t]=e[t]);return r}function oe(n,e){let r=new Set(n);if(e===void 0)return o=>{let u={};for(let i in o)r.has(i)||(u[i]=o[i]);return u};let t={};for(let o in e)r.has(o)||(t[o]=e[o]);return t}function ue(n,e){return e===void 0?r=>({...n,...r}):{...n,...e}}function h(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function ie(n,e){let r=(t,o)=>{let u={...t};for(let i in o)h(t[i])&&h(o[i])?u[i]=r(t[i],o[i]):u[i]=o[i];return u};return e===void 0?t=>r(n,t):r(n,e)}function ae(n,e){let r=(t,o)=>{let u={...o};for(let i in t)if(i in o){let a=t[i];typeof a=="function"?u[i]=a(o[i]):h(a)&&h(o[i])&&(u[i]=r(a,o[i]));}return u};return e===void 0?t=>r(n,t):r(n,e)}function de(n){let e=(r,t)=>{let o={};for(let u in r){let i=r[u];typeof i=="function"?o[u]=i(...t):h(i)?o[u]=e(i,t):o[u]=i;}return o};return (...r)=>e(n,r)}function se(n,e){let r=(t,o)=>{let u={};for(let i in t)u[i]=t[i](o);return {...o,...u}};return e===void 0?t=>r(n,t):r(n,e)}function ce(n){return Object.keys(n)}function le(n){return Object.values(n)}function fe(n){return Object.entries(n)}function Te(n){return Object.fromEntries(n)}function S(n,e){if(n===e)return true;if(n===null||e===null)return n===e;if(typeof n!=typeof e)return false;if(typeof n=="object"){if(Array.isArray(n)&&Array.isArray(e))return n.length!==e.length?false:n.every((i,a)=>S(i,e[a]));if(Array.isArray(n)||Array.isArray(e))return false;let r=n,t=e,o=Object.keys(r),u=Object.keys(t);return o.length!==u.length?false:o.every(i=>S(r[i],t[i]))}return false}function y(n,e){return e===void 0&&arguments.length===1?r=>S(n,r):S(n,e)}function pe(n,e){return e===void 0&&arguments.length===1?r=>n===r:n===e}function ye(n,e){return e===void 0?r=>r>n:n>e}function me(n,e){return e===void 0?r=>r>=n:n>=e}function xe(n,e){return e===void 0?r=>r<n:n<e}function be(n,e){return e===void 0?r=>r<=n:n<=e}function ge(n){return !n}function Re(n,e){return e===void 0&&arguments.length===1?r=>n&&r:n&&e}function ke(n,e){return e===void 0&&arguments.length===1?r=>n||r:n||e}function Ae(n,e){return e===void 0?r=>t=>n(t)&&r(t):r=>n(r)&&e(r)}function he(n,e){return e===void 0?r=>t=>n(t)||r(t):r=>n(r)||e(r)}function we(n){return e=>!n(e)}function Ue(n){return e=>n.every(r=>r(e))}function Ce(n){return e=>n.some(r=>r(e))}function Se(n,e,r){return t=>n(t)?e(t):r(t)}function Ke(n,e){return r=>n(r)?e(r):r}function Be(n,e){return r=>n(r)?r:e(r)}function Pe(n){return e=>{for(let[r,t]of n)if(r(e))return t(e)}}function ve(n,e){return r=>{try{return n(r)}catch(t){return e(t,r)}}}function Ee(n,e,r){return arguments.length===1?(t,o)=>o===void 0?u=>y(u[n],t):y(o[n],t):r===void 0?t=>y(t[n],e):y(r[n],e)}function Fe(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>n(u[t]):n(o[t]):r===void 0?t=>n(t[e]):n(r[e])}function Ve(n,e,r){return e===void 0&&arguments.length===1?(t,o)=>o===void 0?u=>y(f(n,u),t):y(f(n,o),t):r===void 0?t=>y(f(n,t),e):y(f(n,r),e)}function De(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>n(f(t,u)):n(f(t,o)):r===void 0?t=>n(f(e,t)):n(f(e,r))}function je(n,e){let r=t=>{for(let o in n){let u=n[o];if(u&&!u(t[o]))return false}return true};return e===void 0?r:r(e)}function Ne(n,e){let r=t=>{for(let o in n)if(!y(n[o],t[o]))return false;return true};return e===void 0?r:r(e)}function Oe(n,e){return e===void 0&&arguments.length===1?r=>r==null?false:r instanceof n||r.constructor===n:e==null?false:e instanceof n||e.constructor===n}function Le(n){return n==null}function We(n){return n!=null}function B(n){return n==null?true:typeof n=="string"||Array.isArray(n)?n.length===0:typeof n=="object"?Object.keys(n).length===0:false}function _e(n){return !B(n)}function qe(n,e){return e===void 0&&arguments.length===1?r=>r==null||typeof r=="number"&&Number.isNaN(r)?n:r:e==null||typeof e=="number"&&Number.isNaN(e)?n:e}function Ie(...n){for(let e of n)if(e!=null)return e}function sr(n,e){return e===void 0?r=>n+r:n+e}function cr(n,e){return e===void 0?r=>n-r:n-e}function lr(n,e){return e===void 0?r=>n*r:n*e}function fr(n,e){return e===void 0?r=>n/r:n/e}function Tr(n,e){return e===void 0?r=>n%r:n%e}function pr(n){return -n}function yr(n){return n+1}function mr(n){return n-1}function xr(n,e,r){return r===void 0?t=>Math.min(e,Math.max(n,t)):Math.min(e,Math.max(n,r))}function br(n){return Math.abs(n)}function gr(n){return Math.round(n)}function Rr(n){return Math.floor(n)}function kr(n){return Math.ceil(n)}function Ar(n,e){return e===void 0?r=>Math.pow(r,n):Math.pow(e,n)}function hr(n){return n.toUpperCase()}function wr(n){return n.toLowerCase()}function Ur(n){return n.trim()}function Cr(n,e){return e===void 0?r=>r.split(n):e.split(n)}function Sr(n,e){return e===void 0?r=>r.join(n):e.join(n)}function Kr(n,e,r){return r===void 0?t=>t.replace(n,e):r.replace(n,e)}function Br(n,e){return e===void 0?r=>r.startsWith(n):e.startsWith(n)}function Pr(n,e){return e===void 0?r=>r.endsWith(n):e.endsWith(n)}function vr(n,e){return e===void 0?r=>n.test(r):n.test(e)}function Er(n,e){return e===void 0?r=>r.match(n):e.match(n)}function Fr(n,e,r){return typeof e=="string"?e.substring(n):r===void 0?t=>t.substring(n,e):r.substring(n,e)}function Vr(n,e,r){return typeof e=="string"&&r===void 0&&e.length>1,r===void 0?t=>t.padStart(n,e):r.padStart(n,e)}function Dr(n,e,r){return r===void 0?t=>t.padEnd(n,e):r.padEnd(n,e)}function jr(n,e){return e===void 0?r=>n+r:n+e}function Nr(n){return n===null?"null":n===void 0?"undefined":String(n)}function Or(n){return typeof n=="number"?n:typeof n=="string"?Number(n):typeof n=="boolean"?n?1:0:n==null?NaN:Number(n)}function Lr(n){return !!n}function Wr(n){return Array.isArray(n)?[...n]:n==null?[]:typeof n=="string"?[...n]:typeof n[Symbol.iterator]=="function"?[...n]:[n]}function _r(n){return n==null?{}:typeof n=="object"?n:Object(n)}function qr(n){return n===null?"Null":n===void 0?"Undefined":Object.prototype.toString.call(n).slice(8,-1)}function Me(n,e){return {get:n,set:e}}function ze(n){return {get:e=>e[n],set:(e,r)=>({...r,[n]:e})}}function He(n){return {get:e=>{let r=e;for(let t of n){if(r==null)return;r=r[t];}return r},set:(e,r)=>{if(n.length===0)return e;let t=(o,u,i)=>{let[a,...d]=o,s=typeof a=="number";if(d.length===0){if(Array.isArray(i)){let R=[...i];return R[a]=u,R}return {...i,[a]:u}}if(i==null){let R=s?[]:{};if(s){let P=R;return P[a]=t(d,u,void 0),P}return {[a]:t(d,u,void 0)}}if(Array.isArray(i)){let R=[...i];return R[a]=t(d,u,i[a]),R}let T=i;return {...T,[a]:t(d,u,T[a])}};return t(n,e,r)}}}function $e(n){return {get:e=>e[n],set:(e,r)=>{let t=[...r];return t[n]=e,t}}}function Ye(n,e){return e===void 0?r=>n.get(r):n.get(e)}function Ge(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>n.set(t,u):n.set(t,o):r===void 0?t=>n.set(e,t):n.set(e,r)}function Je(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>n.set(t(n.get(u)),u):n.set(t(n.get(o)),o):r===void 0?t=>n.set(e(n.get(t)),t):n.set(e(n.get(r)),r)}function Qe(n,e){return e===void 0?r=>Promise.all(r.map((t,o)=>n(t,o))):Promise.all(e.map((r,t)=>n(r,t)))}function Xe(n,e){let r=async t=>{let o=[];for(let u=0;u<t.length;u++)o.push(await n(t[u],u));return o};return e===void 0?t=>r(t):r(e)}function Ze(n,e){let r=async t=>(await Promise.all(t.map(async(u,i)=>({item:u,keep:await n(u,i)})))).filter(({keep:u})=>u).map(({item:u})=>u);return e===void 0?t=>r(t):r(e)}function nr(n,e,r){let t=async o=>{let u=e;for(let i=0;i<o.length;i++)u=await n(u,o[i],i);return u};return r===void 0?o=>t(o):t(r)}var b="@@transducer/init",m="@@transducer/step",x="@@transducer/result";function er(n){return e=>({[b]:()=>e[b](),[m]:(r,t)=>e[m](r,n(t)),[x]:r=>e[x](r)})}function rr(n){return e=>({[b]:()=>e[b](),[m]:(r,t)=>n(t)?e[m](r,t):r,[x]:r=>e[x](r)})}function tr(n){return e=>{let r=0;return {[b]:()=>e[b](),[m]:(t,o)=>r<n?(r++,e[m](t,o)):t,[x]:t=>e[x](t)}}}function or(n){return e=>{let r=0;return {[b]:()=>e[b](),[m]:(t,o)=>r<n?(r++,t):e[m](t,o),[x]:t=>e[x](t)}}}function ur(...n){return e=>n.reduceRight((r,t)=>t(r),e)}function Ir(){return {[b]:()=>[],[m]:(n,e)=>(n.push(e),n),[x]:n=>n}}function ir(n,e,r,t){let o=u=>{let i=n(e),a=r;for(let d of u)a=i[m](a,d);return i[x](a)};return t===void 0?u=>o(u):o(t)}function ar(n,e){let r=t=>{let o=n(Ir()),u=o[b]();for(let i of t)u=o[m](u,i);return o[x](u)};return e===void 0?t=>r(t):r(e)}exports.F=V;exports.T=F;exports.__=D;exports.abs=br;exports.add=sr;exports.allPass=Ue;exports.always=E;exports.and=Re;exports.anyPass=Ce;exports.append=Kn;exports.applySpec=de;exports.assoc=Zn;exports.assocPath=ne;exports.both=Ae;exports.ceil=kr;exports.chain=Rn;exports.clamp=xr;exports.coalesce=Ie;exports.complement=we;exports.compose=I;exports.composeAsync=H;exports.composeK=Y;exports.composeT=ur;exports.concat=Sn;exports.concatStr=jr;exports.cond=Pe;exports.countBy=In;exports.curry=N;exports.curryN=O;exports.dec=mr;exports.defaultTo=qe;exports.dissoc=ee;exports.dissocPath=re;exports.divide=fr;exports.drop=cn;exports.dropLast=ln;exports.dropT=or;exports.dropWhile=fn;exports.either=he;exports.endsWith=Pr;exports.entries=fe;exports.equals=y;exports.every=Vn;exports.evolve=ae;exports.extend=se;exports.filter=Q;exports.filterAsync=Ze;exports.filterT=rr;exports.find=pn;exports.findIndex=yn;exports.findLast=mn;exports.flatten=K;exports.floor=Rr;exports.fromEntries=Te;exports.groupBy=Cn;exports.gt=ye;exports.gte=me;exports.head=en;exports.identical=pe;exports.identity=v;exports.ifElse=Se;exports.inc=yr;exports.includes=bn;exports.indexBy=$n;exports.indexOf=xn;exports.init=on;exports.into=ar;exports.is=Oe;exports.isEmpty=B;exports.isNil=Le;exports.isNotEmpty=_e;exports.isNotNil=We;exports.isPlaceholder=c;exports.join=Sr;exports.keys=ce;exports.last=tn;exports.length=jn;exports.lens=Me;exports.lensIndex=$e;exports.lensPath=He;exports.lensProp=ze;exports.letIn=G;exports.lt=xe;exports.lte=be;exports.map=J;exports.mapAsync=Qe;exports.mapSerial=Xe;exports.mapT=er;exports.match=Er;exports.max=qn;exports.mean=Ln;exports.median=Wn;exports.merge=ue;exports.mergeDeep=ie;exports.min=_n;exports.modulo=Tr;exports.multiply=lr;exports.negate=pr;exports.none=Dn;exports.not=ge;exports.nth=un;exports.omit=oe;exports.or=ke;exports.over=Je;exports.padEnd=Dr;exports.padStart=Vr;exports.partial=L;exports.partialRight=W;exports.partition=zn;exports.path=f;exports.pathEq=Ve;exports.pathOr=Jn;exports.pathSatisfies=De;exports.pick=te;exports.pipe=_;exports.pipeAsync=z;exports.pipeBuilder=q;exports.pipeK=$;exports.pipeWith=M;exports.pluck=Xn;exports.pow=Ar;exports.prepend=Bn;exports.product=On;exports.prop=Yn;exports.propEq=Ee;exports.propOr=Gn;exports.propSatisfies=Fe;exports.props=Qn;exports.range=Mn;exports.reduce=Z;exports.reduceAsync=nr;exports.reduceRight=nn;exports.reject=X;exports.replace=Kr;exports.reverse=Un;exports.round=gr;exports.set=Ge;exports.slice=Tn;exports.some=Fn;exports.sort=hn;exports.sortBy=wn;exports.split=Cr;exports.splitEvery=Hn;exports.startsWith=Br;exports.substring=Fr;exports.subtract=cr;exports.sum=Nn;exports.tail=rn;exports.take=an;exports.takeLast=dn;exports.takeT=tr;exports.takeWhile=sn;exports.tap=j;exports.test=vr;exports.toArray=Wr;exports.toBoolean=Lr;exports.toLower=wr;exports.toNumber=Or;exports.toObject=_r;exports.toString=Nr;exports.toUpper=hr;exports.transduce=ir;exports.trim=Ur;exports.tryCatch=ve;exports.type=qr;exports.uniq=kn;exports.uniqBy=An;exports.unless=Be;exports.unnest=gn;exports.values=le;exports.view=Ye;exports.when=Ke;exports.where=je;exports.whereEq=Ne;exports.zip=Pn;exports.zipObj=En;exports.zipWith=vn;
1
+ 'use strict';function C(n){return n}function S(n){return function(){return n}}function K(){return true}function B(){return false}var P=Symbol.for("@@statedelta/placeholder"),Ir={[P]:true,__:P};function c(n){return n!==null&&typeof n=="object"&&P in n&&n[P]===true}function y(n){return function e(r){return arguments.length===0?e:n(r)}}function l(n){return function e(r,t){switch(arguments.length){case 0:return e;case 1:return c(r)?e:y(o=>n(r,o));default:return c(r)&&c(t)?e:c(r)?y(o=>n(o,t)):c(t)?y(o=>n(r,o)):n(r,t)}}}var v=l(function(e,r){return e(r),r});function k(n){return function e(r,t,o){switch(arguments.length){case 0:return e;case 1:return c(r)?e:l((s,p)=>n(r,s,p));case 2:return c(r)&&c(t)?e:c(r)?l((s,p)=>n(s,t,p)):c(t)?l((s,p)=>n(r,s,p)):y(s=>n(r,t,s));default:let u=c(r),i=c(t),a=c(o),d=(u?1:0)+(i?1:0)+(a?1:0);return d===3?e:d===2?u?i?l((s,p)=>n(s,p,o)):l((s,p)=>n(s,t,p)):l((s,p)=>n(r,s,p)):d===1?u?y(s=>n(s,t,o)):i?y(s=>n(r,s,o)):y(s=>n(r,t,s)):n(r,t,o)}}}function h(n,e,r){return function t(...o){if(o.length===0)return t;let u=[],i=0;for(let d=0;d<e.length;d++)c(e[d])&&i<o.length?(u.push(o[i]),i++):u.push(e[d]);for(;i<o.length;)u.push(o[i]),i++;let a=0;for(let d=0;d<Math.min(u.length,n);d++)c(u[d])||a++;return a>=n?r.apply(this,u.slice(0,n)):h(n,u,r)}}function E(n){let e=n.length;switch(e){case 0:return n;case 1:return y(n);case 2:return l(n);case 3:return k(n);default:return h(e,[],n)}}function F(n,e){if(n<0)throw new Error(`curryN: arity must be non-negative, got ${n}`);if(n>10)throw new Error(`curryN: arity must be at most 10, got ${n}`);switch(n){case 0:return e;case 1:return y(e);case 2:return l(e);case 3:return k(e);default:return h(n,[],e)}}function V(n,e){return function(...t){let o=[],u=0;for(let i=0;i<e.length;i++)c(e[i])&&u<t.length?(o.push(t[u]),u++):o.push(e[i]);for(;u<t.length;)o.push(t[u]),u++;return n(...o)}}function j(n,e){return function(...t){return n(...t,...e)}}var D=function(e,...r){let t=e;for(let o=0;o<r.length;o++)t=r[o](t);return t},N=function(...e){return e.length===0?r=>r:e.length===1?e[0]:function(t){let o=t;for(let u=0;u<e.length;u++)o=e[u](o);return o}};var O=function(...e){return e.length===0?r=>r:e.length===1?e[0]:function(t){let o=t;for(let u=e.length-1;u>=0;u--)o=e[u](o);return o}};function L(n,e){return e.length===0?(r=>r):function(t){let o=t;for(let u=0;u<e.length;u++)o=n(e[u],o);return o}}function W(...n){return async function(r){let t=r;for(let o=0;o<n.length;o++)t=await n[o](t);return t}}function q(...n){return async function(r){let t=r;for(let o=n.length-1;o>=0;o--)t=await n[o](t);return t}}function I(...n){return e=>r=>n.reduce((t,o)=>o(t)(r),e)}function _(...n){return e=>r=>n.reduceRight((t,o)=>o(t)(r),e)}function _r(n,e){let r={...e};for(let[t,o]of Object.entries(n))r[t]=typeof o=="function"?o(r):o;return r}function M(n,e,r){let t=_r(n,r);return e(t)}function z(n,e,r){return e!==void 0&&r!==void 0?M(n,e,r):e!==void 0?t=>M(n,e,t):(t,o)=>o!==void 0?M(n,t,o):u=>M(n,t,u)}var H=l((n,e)=>{let r=e.length,t=new Array(r);for(let o=0;o<r;o++)t[o]=n(e[o],o,e);return t});var $=l((n,e)=>{let r=[],t=e.length;for(let o=0;o<t;o++)n(e[o],o,e)&&r.push(e[o]);return r}),Y=l((n,e)=>{let r=[],t=e.length;for(let o=0;o<t;o++)n(e[o],o,e)||r.push(e[o]);return r});var G=k((n,e,r)=>{let t=e,o=r.length;for(let u=0;u<o;u++)t=n(t,r[u],u,r);return t}),J=k((n,e,r)=>{let t=e;for(let o=r.length-1;o>=0;o--)t=n(t,r[o],o,r);return t});function Q(n){return n[0]}function X(n){return n.slice(1)}function Z(n){return n[n.length-1]}function nn(n){return n.slice(0,-1)}function en(n,e){if(e===void 0)return t=>{let o=n<0?t.length+n:n;return t[o]};let r=n<0?e.length+n:n;return e[r]}function rn(n,e){return e===void 0?r=>r.slice(0,Math.max(0,n)):e.slice(0,Math.max(0,n))}function tn(n,e){return e===void 0?r=>n<=0?[]:r.slice(-n):n<=0?[]:e.slice(-n)}function on(n,e){let r=t=>{let o=[];for(let u=0;u<t.length&&n(t[u],u,t);u++)o.push(t[u]);return o};return e===void 0?r:r(e)}function un(n,e){return e===void 0?r=>r.slice(Math.max(0,n)):e.slice(Math.max(0,n))}function an(n,e){return e===void 0?r=>n<=0?r.slice():r.slice(0,-n):n<=0?e.slice():e.slice(0,-n)}function dn(n,e){let r=t=>{let o=0;for(;o<t.length&&n(t[o],o,t);)o++;return t.slice(o)};return e===void 0?r:r(e)}function sn(n,e,r){return e!==void 0&&r!==void 0?r.slice(n,e):e!==void 0?t=>t.slice(n,e):function(o,u){return u!==void 0?u.slice(n,o):i=>i.slice(n,o)}}function cn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(n(t[o],o,t))return t[o]};return e===void 0?r:r(e)}function ln(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(n(t[o],o,t))return o;return -1};return e===void 0?r:r(e)}function fn(n,e){let r=t=>{for(let o=t.length-1;o>=0;o--)if(n(t[o],o,t))return t[o]};return e===void 0?r:r(e)}function pn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(t[o]===n)return o;return -1};return e===void 0?r:r(e)}function Tn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(t[o]===n)return true;return false};return e===void 0?r:r(e)}function A(n){let e=[];for(let r=0;r<n.length;r++){let t=n[r];if(Array.isArray(t))for(let o=0;o<t.length;o++)e.push(t[o]);else e.push(t);}return e}var yn=A;function mn(n,e){let r=t=>{let o=[];for(let u=0;u<t.length;u++){let i=n(t[u],u,t);for(let a=0;a<i.length;a++)o.push(i[a]);}return o};return e===void 0?r:r(e)}function xn(n){let e=new Set,r=[];for(let t=0;t<n.length;t++){let o=n[t];e.has(o)||(e.add(o),r.push(o));}return r}function bn(n,e){let r=t=>{let o=new Set,u=[];for(let i=0;i<t.length;i++){let a=t[i],d=n(a);o.has(d)||(o.add(d),u.push(a));}return u};return e===void 0?r:r(e)}function gn(n,e){return e===void 0?r=>[...r].sort(n):[...e].sort(n)}function Rn(n,e){let r=(t,o)=>{let u=n(t),i=n(o);return u<i?-1:u>i?1:0};return e===void 0?t=>[...t].sort(r):[...e].sort(r)}function kn(n){let e=new Array(n.length);for(let r=0;r<n.length;r++)e[n.length-1-r]=n[r];return e}function hn(n,e){let r=t=>{let o={};for(let u=0;u<t.length;u++){let i=t[u],a=n(i);a in o||(o[a]=[]),o[a].push(i);}return o};return e===void 0?r:r(e)}function An(n,e){return e===void 0?r=>[...n,...r]:[...n,...e]}function wn(n,e){return e===void 0?r=>[...r,n]:[...e,n]}function Un(n,e){return e===void 0?r=>[n,...r]:[n,...e]}function Cn(n,e){if(e===void 0)return o=>{let u=Math.min(n.length,o.length),i=new Array(u);for(let a=0;a<u;a++)i[a]=[n[a],o[a]];return i};let r=Math.min(n.length,e.length),t=new Array(r);for(let o=0;o<r;o++)t[o]=[n[o],e[o]];return t}function Sn(n,e,r){if(e!==void 0&&r!==void 0){let t=Math.min(e.length,r.length),o=new Array(t);for(let u=0;u<t;u++)o[u]=n(e[u],r[u]);return o}return e!==void 0?t=>{let o=Math.min(e.length,t.length),u=new Array(o);for(let i=0;i<o;i++)u[i]=n(e[i],t[i]);return u}:function(o,u){if(u!==void 0){let i=Math.min(o.length,u.length),a=new Array(i);for(let d=0;d<i;d++)a[d]=n(o[d],u[d]);return a}return i=>{let a=Math.min(o.length,i.length),d=new Array(a);for(let s=0;s<a;s++)d[s]=n(o[s],i[s]);return d}}}function Kn(n,e){if(e===void 0)return o=>{let u={},i=Math.min(n.length,o.length);for(let a=0;a<i;a++)u[n[a]]=o[a];return u};let r={},t=Math.min(n.length,e.length);for(let o=0;o<t;o++)r[n[o]]=e[o];return r}function Bn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(n(t[o],o,t))return true;return false};return e===void 0?r:r(e)}function Pn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(!n(t[o],o,t))return false;return true};return e===void 0?r:r(e)}function vn(n,e){let r=t=>{for(let o=0;o<t.length;o++)if(n(t[o],o,t))return false;return true};return e===void 0?r:r(e)}function En(n){return n.length}function Fn(n){let e=0;for(let r=0;r<n.length;r++)e+=n[r];return e}function Vn(n){if(n.length===0)return 1;let e=1;for(let r=0;r<n.length;r++)e*=n[r];return e}function jn(n){if(n.length===0)return NaN;let e=0;for(let r=0;r<n.length;r++)e+=n[r];return e/n.length}function Dn(n){if(n.length===0)return NaN;let e=[...n].sort((t,o)=>t-o),r=Math.floor(e.length/2);return e.length%2===0?(e[r-1]+e[r])/2:e[r]}function Nn(n){if(n.length===0)return 1/0;let e=n[0];for(let r=1;r<n.length;r++)n[r]<e&&(e=n[r]);return e}function On(n){if(n.length===0)return -1/0;let e=n[0];for(let r=1;r<n.length;r++)n[r]>e&&(e=n[r]);return e}function Ln(n,e){let r=t=>{let o={};for(let u=0;u<t.length;u++){let i=n(t[u]);o[i]=(o[i]||0)+1;}return o};return e===void 0?r:r(e)}function Wn(n,e){if(e===void 0)return t=>{if(n>=t)return [];let o=new Array(t-n);for(let u=0;u<o.length;u++)o[u]=n+u;return o};if(n>=e)return [];let r=new Array(e-n);for(let t=0;t<r.length;t++)r[t]=n+t;return r}function qn(n,e){let r=t=>{let o=[],u=[];for(let i=0;i<t.length;i++)n(t[i],i,t)?o.push(t[i]):u.push(t[i]);return [o,u]};return e===void 0?r:r(e)}function In(n,e){if(e===void 0)return t=>{if(n<=0)return [];let o=[];for(let u=0;u<t.length;u+=n)o.push(t.slice(u,u+n));return o};if(n<=0)return [];let r=[];for(let t=0;t<e.length;t+=n)r.push(e.slice(t,t+n));return r}function _n(n,e){let r=t=>{let o={};for(let u=0;u<t.length;u++){let i=n(t[u]);o[i]=t[u];}return o};return e===void 0?r:r(e)}function Mn(n,e){return e===void 0?r=>r[n]:e[n]}function f(n,e){if(e===void 0)return t=>f(n,t);let r=e;for(let t of n){if(r==null)return;r=r[t];}return r}function zn(n,e,r){if(e===void 0)return (o,u)=>{if(u===void 0)return a=>{let d=a[o];return d??n};let i=u[o];return i??n};if(r===void 0)return o=>{let u=o[e];return u??n};let t=r[e];return t??n}function Hn(n,e,r){if(e===void 0)return (o,u)=>{if(u===void 0)return a=>{let d=f(o,a);return d??n};let i=f(o,u);return i??n};if(r===void 0)return o=>{let u=f(e,o);return u??n};let t=f(e,r);return t??n}function $n(n,e){return e===void 0?r=>n.map(t=>r[t]):n.map(r=>e[r])}function Yn(n,e){return e===void 0?r=>r.map(t=>t[n]):e.map(r=>r[n])}function Jn(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>({...u,[n]:t}):{...o,[n]:t}:r===void 0?t=>({...t,[n]:e}):{...r,[n]:e}}function g(n,e,r){if(n.length===0)return e;let[t,...o]=n,u=typeof t=="number";if(r==null){let a=u?[]:{};if(o.length===0){if(u){let d=a;return d[t]=e,d}return {...a,[t]:e}}if(u){let d=a;return d[t]=g(o,e,void 0),d}return {...a,[t]:g(o,e,void 0)}}if(Array.isArray(r)){let a=[...r];return a[t]=o.length===0?e:g(o,e,r[t]),a}let i=r;return {...i,[t]:o.length===0?e:g(o,e,i[t])}}function Qn(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>g(n,t,u):g(n,t,o):r===void 0?t=>g(n,e,t):g(n,e,r)}function Xn(n,e){if(e===void 0)return o=>{let{[n]:u,...i}=o;return i};let{[n]:r,...t}=e;return t}function Gn(n,e){if(n.length===0||e===null||e===void 0)return e;let[r,...t]=n;if(t.length===0){if(Array.isArray(e)){let a=[...e];return a.splice(r,1),a}let{[r]:u,...i}=e;return i}if(Array.isArray(e)){let u=[...e];return u[r]=Gn(t,e[r]),u}let o=e;return {...o,[r]:Gn(t,o[r])}}function Zn(n,e){return e===void 0?r=>Gn(n,r):Gn(n,e)}function ne(n,e){if(e===void 0)return t=>{let o={};for(let u of n)u in t&&(o[u]=t[u]);return o};let r={};for(let t of n)t in e&&(r[t]=e[t]);return r}function ee(n,e){let r=new Set(n);if(e===void 0)return o=>{let u={};for(let i in o)r.has(i)||(u[i]=o[i]);return u};let t={};for(let o in e)r.has(o)||(t[o]=e[o]);return t}function re(n,e){return e===void 0?r=>({...n,...r}):{...n,...e}}function w(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function te(n,e){let r=(t,o)=>{let u={...t};for(let i in o)w(t[i])&&w(o[i])?u[i]=r(t[i],o[i]):u[i]=o[i];return u};return e===void 0?t=>r(n,t):r(n,e)}function oe(n,e){let r=(t,o)=>{let u={...o};for(let i in t)if(i in o){let a=t[i];typeof a=="function"?u[i]=a(o[i]):w(a)&&w(o[i])&&(u[i]=r(a,o[i]));}return u};return e===void 0?t=>r(n,t):r(n,e)}function ue(n){let e=(r,t)=>{let o={};for(let u in r){let i=r[u];typeof i=="function"?o[u]=i(...t):w(i)?o[u]=e(i,t):o[u]=i;}return o};return (...r)=>e(n,r)}function ie(n,e){let r=(t,o)=>{let u={};for(let i in t)u[i]=t[i](o);return {...o,...u}};return e===void 0?t=>r(n,t):r(n,e)}function ae(n){return Object.keys(n)}function de(n){return Object.values(n)}function se(n){return Object.entries(n)}function ce(n){return Object.fromEntries(n)}function le(n,e){if(n===e)return true;if(n===null||e===null)return n===e;if(typeof n!=typeof e)return false;if(typeof n=="object"){if(Array.isArray(n)&&Array.isArray(e))return n.length!==e.length?false:n.every((i,a)=>le(i,e[a]));if(Array.isArray(n)||Array.isArray(e))return false;let r=n,t=e,o=Object.keys(r),u=Object.keys(t);return o.length!==u.length?false:o.every(i=>le(r[i],t[i]))}return false}function T(n,e){return e===void 0&&arguments.length===1?r=>le(n,r):le(n,e)}function fe(n,e){return e===void 0&&arguments.length===1?r=>n===r:n===e}function pe(n,e){return e===void 0?r=>r>n:n>e}function Te(n,e){return e===void 0?r=>r>=n:n>=e}function ye(n,e){return e===void 0?r=>r<n:n<e}function me(n,e){return e===void 0?r=>r<=n:n<=e}function xe(n){return !n}function be(n,e){return e===void 0&&arguments.length===1?r=>n&&r:n&&e}function ge(n,e){return e===void 0&&arguments.length===1?r=>n||r:n||e}function Re(n,e){return e===void 0?r=>t=>n(t)&&r(t):r=>n(r)&&e(r)}function ke(n,e){return e===void 0?r=>t=>n(t)||r(t):r=>n(r)||e(r)}function he(n){return e=>!n(e)}function Ae(n){return e=>n.every(r=>r(e))}function we(n){return e=>n.some(r=>r(e))}function Ue(n,e,r){return t=>n(t)?e(t):r(t)}function Ce(n,e){return r=>n(r)?e(r):r}function Se(n,e){return r=>n(r)?r:e(r)}function Ke(n){return e=>{for(let[r,t]of n)if(r(e))return t(e)}}function Be(n,e){return r=>{try{return n(r)}catch(t){return e(t,r)}}}function Pe(n,e,r){return arguments.length===1?(t,o)=>o===void 0?u=>T(u[n],t):T(o[n],t):r===void 0?t=>T(t[n],e):T(r[n],e)}function ve(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>n(u[t]):n(o[t]):r===void 0?t=>n(t[e]):n(r[e])}function Ee(n,e,r){return e===void 0&&arguments.length===1?(t,o)=>o===void 0?u=>T(f(n,u),t):T(f(n,o),t):r===void 0?t=>T(f(n,t),e):T(f(n,r),e)}function Fe(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>n(f(t,u)):n(f(t,o)):r===void 0?t=>n(f(e,t)):n(f(e,r))}function Ve(n,e){let r=t=>{for(let o in n){let u=n[o];if(u&&!u(t[o]))return false}return true};return e===void 0?r:r(e)}function je(n,e){let r=t=>{for(let o in n)if(!T(n[o],t[o]))return false;return true};return e===void 0?r:r(e)}function De(n,e){return e===void 0&&arguments.length===1?r=>r==null?false:r instanceof n||r.constructor===n:e==null?false:e instanceof n||e.constructor===n}function Ne(n){return n==null}function Oe(n){return n!=null}function U(n){return n==null?true:typeof n=="string"||Array.isArray(n)?n.length===0:typeof n=="object"?Object.keys(n).length===0:false}function Le(n){return !U(n)}function We(n,e){return e===void 0&&arguments.length===1?r=>r==null||typeof r=="number"&&Number.isNaN(r)?n:r:e==null||typeof e=="number"&&Number.isNaN(e)?n:e}function qe(...n){for(let e of n)if(e!=null)return e}function ir(n,e){return e===void 0?r=>n+r:n+e}function ar(n,e){return e===void 0?r=>n-r:n-e}function dr(n,e){return e===void 0?r=>n*r:n*e}function sr(n,e){return e===void 0?r=>n/r:n/e}function cr(n,e){return e===void 0?r=>n%r:n%e}function lr(n,e){return e===void 0?r=>!Number.isInteger(n)||!Number.isInteger(r)||r<=0?NaN:(n%r+r)%r:!Number.isInteger(n)||!Number.isInteger(e)||e<=0?NaN:(n%e+e)%e}function fr(n){return -n}function pr(n){return n+1}function Tr(n){return n-1}function yr(n,e,r){return r===void 0?t=>Math.min(e,Math.max(n,t)):Math.min(e,Math.max(n,r))}function mr(n){return Math.abs(n)}function xr(n){return Math.round(n)}function br(n){return Math.floor(n)}function gr(n){return Math.ceil(n)}function Rr(n,e){return e===void 0?r=>Math.pow(r,n):Math.pow(e,n)}function kr(n){return n.toUpperCase()}function hr(n){return n.toLowerCase()}function Ar(n){return n.trim()}function wr(n,e){return e===void 0?r=>r.split(n):e.split(n)}function Ur(n,e){return e===void 0?r=>r.join(n):e.join(n)}function Cr(n,e,r){return r===void 0?t=>t.replace(n,e):r.replace(n,e)}function Sr(n,e){return e===void 0?r=>r.startsWith(n):e.startsWith(n)}function Kr(n,e){return e===void 0?r=>r.endsWith(n):e.endsWith(n)}function Br(n,e){return e===void 0?r=>n.test(r):n.test(e)}function Pr(n,e){return e===void 0?r=>r.match(n):e.match(n)}function vr(n,e,r){return typeof e=="string"?e.substring(n):r===void 0?t=>t.substring(n,e):r.substring(n,e)}function Er(n,e,r){return typeof e=="string"&&r===void 0&&e.length>1,r===void 0?t=>t.padStart(n,e):r.padStart(n,e)}function Fr(n,e,r){return r===void 0?t=>t.padEnd(n,e):r.padEnd(n,e)}function Vr(n,e){return e===void 0?r=>n+r:n+e}function jr(n){return n===null?"null":n===void 0?"undefined":String(n)}function Dr(n){return typeof n=="number"?n:typeof n=="string"?Number(n):typeof n=="boolean"?n?1:0:n==null?NaN:Number(n)}function Nr(n){return !!n}function Or(n){return Array.isArray(n)?[...n]:n==null?[]:typeof n=="string"?[...n]:typeof n[Symbol.iterator]=="function"?[...n]:[n]}function Lr(n){return n==null?{}:typeof n=="object"?n:Object(n)}function Wr(n){return n===null?"Null":n===void 0?"Undefined":Object.prototype.toString.call(n).slice(8,-1)}function Ie(n,e){return {get:n,set:e}}function _e(n){return {get:e=>e[n],set:(e,r)=>({...r,[n]:e})}}function Me(n){return {get:e=>{let r=e;for(let t of n){if(r==null)return;r=r[t];}return r},set:(e,r)=>{if(n.length===0)return e;let t=(o,u,i)=>{let[a,...d]=o,s=typeof a=="number";if(d.length===0){if(Array.isArray(i)){let R=[...i];return R[a]=u,R}return {...i,[a]:u}}if(i==null){let R=s?[]:{};if(s){let qr=R;return qr[a]=t(d,u,void 0),qr}return {[a]:t(d,u,void 0)}}if(Array.isArray(i)){let R=[...i];return R[a]=t(d,u,i[a]),R}let p=i;return {...p,[a]:t(d,u,p[a])}};return t(n,e,r)}}}function ze(n){return {get:e=>e[n],set:(e,r)=>{let t=[...r];return t[n]=e,t}}}function He(n,e){return e===void 0?r=>n.get(r):n.get(e)}function $e(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>n.set(t,u):n.set(t,o):r===void 0?t=>n.set(e,t):n.set(e,r)}function Ye(n,e,r){return e===void 0?(t,o)=>o===void 0?u=>n.set(t(n.get(u)),u):n.set(t(n.get(o)),o):r===void 0?t=>n.set(e(n.get(t)),t):n.set(e(n.get(r)),r)}function Ge(n,e){return e===void 0?r=>Promise.all(r.map((t,o)=>n(t,o))):Promise.all(e.map((r,t)=>n(r,t)))}function Je(n,e){let r=async t=>{let o=[];for(let u=0;u<t.length;u++)o.push(await n(t[u],u));return o};return e===void 0?t=>r(t):r(e)}function Qe(n,e){let r=async t=>(await Promise.all(t.map(async(u,i)=>({item:u,keep:await n(u,i)})))).filter(({keep:u})=>u).map(({item:u})=>u);return e===void 0?t=>r(t):r(e)}function Xe(n,e,r){let t=async o=>{let u=e;for(let i=0;i<o.length;i++)u=await n(u,o[i],i);return u};return r===void 0?o=>t(o):t(r)}var b="@@transducer/init",m="@@transducer/step",x="@@transducer/result";function Ze(n){return e=>({[b]:()=>e[b](),[m]:(r,t)=>e[m](r,n(t)),[x]:r=>e[x](r)})}function nr(n){return e=>({[b]:()=>e[b](),[m]:(r,t)=>n(t)?e[m](r,t):r,[x]:r=>e[x](r)})}function er(n){return e=>{let r=0;return {[b]:()=>e[b](),[m]:(t,o)=>r<n?(r++,e[m](t,o)):t,[x]:t=>e[x](t)}}}function rr(n){return e=>{let r=0;return {[b]:()=>e[b](),[m]:(t,o)=>r<n?(r++,t):e[m](t,o),[x]:t=>e[x](t)}}}function tr(...n){return e=>n.reduceRight((r,t)=>t(r),e)}function Mr(){return {[b]:()=>[],[m]:(n,e)=>(n.push(e),n),[x]:n=>n}}function or(n,e,r,t){let o=u=>{let i=n(e),a=r;for(let d of u)a=i[m](a,d);return i[x](a)};return t===void 0?u=>o(u):o(t)}function ur(n,e){let r=t=>{let o=n(Mr()),u=o[b]();for(let i of t)u=o[m](u,i);return o[x](u)};return e===void 0?t=>r(t):r(e)}var Go={identity:C,always:S,T:K,F:B,tap:v,curry:E,curryN:F,partial:V,partialRight:j,pipe:D,pipeBuilder:N,compose:O,pipeWith:L,pipeAsync:W,composeAsync:q,pipeK:I,composeK:_,letIn:z,map:H,filter:$,reject:Y,reduce:G,reduceRight:J,head:Q,tail:X,last:Z,init:nn,nth:en,take:rn,takeLast:tn,takeWhile:on,drop:un,dropLast:an,dropWhile:dn,slice:sn,find:cn,findIndex:ln,findLast:fn,indexOf:pn,includes:Tn,flatten:A,unnest:yn,chain:mn,uniq:xn,uniqBy:bn,sort:gn,sortBy:Rn,reverse:kn,groupBy:hn,concat:An,append:wn,prepend:Un,zip:Cn,zipWith:Sn,zipObj:Kn,some:Bn,every:Pn,none:vn,length:En,sum:Fn,product:Vn,mean:jn,median:Dn,min:Nn,max:On,countBy:Ln,range:Wn,partition:qn,splitEvery:In,indexBy:_n,prop:Mn,path:f,propOr:zn,pathOr:Hn,props:$n,pluck:Yn,assoc:Jn,assocPath:Qn,dissoc:Xn,dissocPath:Zn,pick:ne,omit:ee,merge:re,mergeDeep:te,evolve:oe,applySpec:ue,extend:ie,keys:ae,values:de,entries:se,fromEntries:ce,equals:T,identical:fe,gt:pe,gte:Te,lt:ye,lte:me,not:xe,and:be,or:ge,both:Re,either:ke,complement:he,allPass:Ae,anyPass:we,ifElse:Ue,when:Ce,unless:Se,cond:Ke,tryCatch:Be,propEq:Pe,propSatisfies:ve,pathEq:Ee,pathSatisfies:Fe,where:Ve,whereEq:je,is:De,isNil:Ne,isEmpty:U,isNotNil:Oe,isNotEmpty:Le,defaultTo:We,coalesce:qe,add:ir,subtract:ar,multiply:dr,divide:sr,modulo:cr,mathMod:lr,negate:fr,inc:pr,dec:Tr,clamp:yr,abs:mr,round:xr,floor:br,ceil:gr,pow:Rr,toUpper:kr,toLower:hr,trim:Ar,split:wr,join:Ur,replace:Cr,startsWith:Sr,endsWith:Kr,test:Br,match:Pr,substring:vr,padStart:Er,padEnd:Fr,concatStr:Vr,toString:jr,toNumber:Dr,toBoolean:Nr,toArray:Or,toObject:Lr,type:Wr,lens:Ie,lensProp:_e,lensPath:Me,lensIndex:ze,view:He,set:$e,over:Ye,mapAsync:Ge,mapSerial:Je,filterAsync:Qe,reduceAsync:Xe,mapT:Ze,filterT:nr,takeT:er,dropT:rr,composeT:tr,transduce:or,into:ur};exports.F=B;exports.T=K;exports.__=Ir;exports.abs=mr;exports.add=ir;exports.allPass=Ae;exports.always=S;exports.and=be;exports.anyPass=we;exports.append=wn;exports.applySpec=ue;exports.assoc=Jn;exports.assocPath=Qn;exports.both=Re;exports.ceil=gr;exports.chain=mn;exports.clamp=yr;exports.coalesce=qe;exports.complement=he;exports.compose=O;exports.composeAsync=q;exports.composeK=_;exports.composeT=tr;exports.concat=An;exports.concatStr=Vr;exports.cond=Ke;exports.countBy=Ln;exports.curry=E;exports.curryN=F;exports.dec=Tr;exports.defaultTo=We;exports.dissoc=Xn;exports.dissocPath=Zn;exports.divide=sr;exports.drop=un;exports.dropLast=an;exports.dropT=rr;exports.dropWhile=dn;exports.either=ke;exports.endsWith=Kr;exports.entries=se;exports.equals=T;exports.every=Pn;exports.evolve=oe;exports.extend=ie;exports.filter=$;exports.filterAsync=Qe;exports.filterT=nr;exports.find=cn;exports.findIndex=ln;exports.findLast=fn;exports.flatten=A;exports.floor=br;exports.fromEntries=ce;exports.groupBy=hn;exports.gt=pe;exports.gte=Te;exports.head=Q;exports.identical=fe;exports.identity=C;exports.ifElse=Ue;exports.inc=pr;exports.includes=Tn;exports.indexBy=_n;exports.indexOf=pn;exports.init=nn;exports.into=ur;exports.is=De;exports.isEmpty=U;exports.isNil=Ne;exports.isNotEmpty=Le;exports.isNotNil=Oe;exports.isPlaceholder=c;exports.join=Ur;exports.keys=ae;exports.last=Z;exports.length=En;exports.lens=Ie;exports.lensIndex=ze;exports.lensPath=Me;exports.lensProp=_e;exports.letIn=z;exports.lt=ye;exports.lte=me;exports.map=H;exports.mapAsync=Ge;exports.mapSerial=Je;exports.mapT=Ze;exports.match=Pr;exports.mathMod=lr;exports.max=On;exports.mean=jn;exports.median=Dn;exports.merge=re;exports.mergeDeep=te;exports.min=Nn;exports.modulo=cr;exports.multiply=dr;exports.negate=fr;exports.none=vn;exports.not=xe;exports.nth=en;exports.omit=ee;exports.or=ge;exports.over=Ye;exports.padEnd=Fr;exports.padStart=Er;exports.partial=V;exports.partialRight=j;exports.partition=qn;exports.path=f;exports.pathEq=Ee;exports.pathOr=Hn;exports.pathSatisfies=Fe;exports.pick=ne;exports.pipe=D;exports.pipeAsync=W;exports.pipeBuilder=N;exports.pipeK=I;exports.pipeWith=L;exports.pluck=Yn;exports.pow=Rr;exports.prepend=Un;exports.product=Vn;exports.prop=Mn;exports.propEq=Pe;exports.propOr=zn;exports.propSatisfies=ve;exports.props=$n;exports.range=Wn;exports.reduce=G;exports.reduceAsync=Xe;exports.reduceRight=J;exports.reject=Y;exports.replace=Cr;exports.reverse=kn;exports.round=xr;exports.scope=Go;exports.set=$e;exports.slice=sn;exports.some=Bn;exports.sort=gn;exports.sortBy=Rn;exports.split=wr;exports.splitEvery=In;exports.startsWith=Sr;exports.substring=vr;exports.subtract=ar;exports.sum=Fn;exports.tail=X;exports.take=rn;exports.takeLast=tn;exports.takeT=er;exports.takeWhile=on;exports.tap=v;exports.test=Br;exports.toArray=Or;exports.toBoolean=Nr;exports.toLower=hr;exports.toNumber=Dr;exports.toObject=Lr;exports.toString=jr;exports.toUpper=kr;exports.transduce=or;exports.trim=Ar;exports.tryCatch=Be;exports.type=Wr;exports.uniq=xn;exports.uniqBy=bn;exports.unless=Se;exports.unnest=yn;exports.values=de;exports.view=He;exports.when=Ce;exports.where=Ve;exports.whereEq=je;exports.zip=Cn;exports.zipObj=Kn;exports.zipWith=Sn;