subscript 10.4.15 → 10.4.16
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/feature/accessor.js +9 -4
- package/feature/async.js +11 -3
- package/feature/number.js +4 -3
- package/feature/switch.js +1 -1
- package/jessie.min.js +8 -8
- package/justin.min.js +4 -4
- package/package.json +1 -1
- package/subscript.min.js +2 -2
package/feature/accessor.js
CHANGED
|
@@ -47,14 +47,17 @@ const accessor = (kind) => a => {
|
|
|
47
47
|
token('get', ASSIGN - 1, accessor('get'));
|
|
48
48
|
token('set', ASSIGN - 1, accessor('set'));
|
|
49
49
|
|
|
50
|
-
// Method shorthand: { foo() {} } / {
|
|
50
|
+
// Method shorthand: { foo() {} } / { async foo() {} } / class { static foo() {} }
|
|
51
51
|
// → [':', key, ['=>', ['()', params], body]]
|
|
52
|
-
// Accepts identifier, string-literal node [, "..."],
|
|
52
|
+
// Accepts identifier, string-literal node [, "..."], ['async', key] from
|
|
53
|
+
// async.js, or ['static', key] from unary('static').
|
|
53
54
|
token('(', ASSIGN - 1, a => {
|
|
54
55
|
if (!a) return;
|
|
55
56
|
// ['static', key] from unary('static'): unwrap, re-wrap the resulting method node.
|
|
56
|
-
|
|
57
|
+
// ['async', key] from async.js: unwrap, wrap the method value in async.
|
|
58
|
+
let wrap, isAsync;
|
|
57
59
|
if (Array.isArray(a) && a[0] === 'static') wrap = 'static', a = a[1];
|
|
60
|
+
if (Array.isArray(a) && a[0] === 'async') isAsync = true, a = a[1];
|
|
58
61
|
// Accept identifier or string-literal node as key
|
|
59
62
|
if (!isMethodKey(a)) return;
|
|
60
63
|
const params = expr(0, CPAREN) || null;
|
|
@@ -62,6 +65,8 @@ token('(', ASSIGN - 1, a => {
|
|
|
62
65
|
// Not followed by { - not method shorthand, fall through
|
|
63
66
|
if (cur.charCodeAt(idx) !== OBRACE) return;
|
|
64
67
|
skip();
|
|
65
|
-
|
|
68
|
+
let value = ['=>', ['()', params], expr(0, CBRACE) || null];
|
|
69
|
+
if (isAsync) value = ['async', value];
|
|
70
|
+
const node = [':', a, value];
|
|
66
71
|
return wrap ? [wrap, node] : node;
|
|
67
72
|
});
|
package/feature/async.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Async/await/yield: async function, async arrow, await, yield expressions - parse half
|
|
2
|
-
import { parse, unary, expr, skip, keyword, cur, idx, word } from '../parse.js';
|
|
2
|
+
import { parse, unary, expr, skip, seek, keyword, cur, idx, word, next } from '../parse.js';
|
|
3
3
|
|
|
4
|
-
const PREFIX = 140, ASSIGN = 20;
|
|
4
|
+
const PREFIX = 140, ASSIGN = 20, OPAREN = 40;
|
|
5
5
|
|
|
6
6
|
// await expr → ['await', expr]
|
|
7
7
|
unary('await', PREFIX);
|
|
@@ -25,8 +25,16 @@ keyword('async', PREFIX, () => {
|
|
|
25
25
|
parse.space();
|
|
26
26
|
// async function - check for 'function' word
|
|
27
27
|
if (word('function')) return ['async', expr(PREFIX)];
|
|
28
|
+
// async name( → method shorthand (accessor.js handles params + body)
|
|
29
|
+
// async name => → arrow with single param
|
|
30
|
+
const from = idx;
|
|
31
|
+
const name = next(parse.id);
|
|
32
|
+
if (name) {
|
|
33
|
+
parse.space();
|
|
34
|
+
if (cur.charCodeAt(idx) === OPAREN) return ['async', name];
|
|
35
|
+
seek(from); // backtrack for general arrow parsing
|
|
36
|
+
}
|
|
28
37
|
// async arrow: async () => or async x =>
|
|
29
|
-
// Parse at assign precedence to catch => operator
|
|
30
38
|
const params = expr(ASSIGN - .5);
|
|
31
39
|
return params && ['async', params];
|
|
32
40
|
});
|
package/feature/number.js
CHANGED
|
@@ -15,8 +15,9 @@ const strip = s => s.indexOf('_') < 0 ? s : s.replaceAll('_', '');
|
|
|
15
15
|
// Supports numeric separators: 1_000_000 and BigInt suffix: 123n
|
|
16
16
|
const num = a => {
|
|
17
17
|
let str = strip(next(c =>
|
|
18
|
-
// . is decimal only if NOT
|
|
19
|
-
|
|
18
|
+
// . is decimal only if NOT range (..) and NOT member access (.name)
|
|
19
|
+
// Allows trailing decimal: 1. → 1, 0.95.toFixed → stops at second .
|
|
20
|
+
(c === PERIOD && (c = cur.charCodeAt(idx + 1)) !== PERIOD && !(parse.id(c) && c > _9)) ||
|
|
20
21
|
(c >= _0 && c <= _9) ||
|
|
21
22
|
c === UNDERSCORE ||
|
|
22
23
|
((c === _E || c === _e) && ((c = cur.charCodeAt(idx + 1)) >= _0 && c <= _9 || c === PLUS || c === MINUS) ? 2 : 0)
|
|
@@ -37,7 +38,7 @@ const charTest = {
|
|
|
37
38
|
parse.number = null;
|
|
38
39
|
|
|
39
40
|
// .1 (but not .. range)
|
|
40
|
-
lookup[PERIOD] = a => !a && cur.charCodeAt(idx + 1)
|
|
41
|
+
lookup[PERIOD] = a => !a && cur.charCodeAt(idx + 1) >= _0 && cur.charCodeAt(idx + 1) <= _9 && num();
|
|
41
42
|
|
|
42
43
|
// 0-9: check parse.number for prefix config
|
|
43
44
|
for (let i = _0; i <= _9; i++) lookup[i] = a => a ? void 0 : num();
|
package/feature/switch.js
CHANGED
|
@@ -10,7 +10,7 @@ let inSwitch = 0;
|
|
|
10
10
|
// Reserve 'case' and 'default' as keywords that fail outside switch body
|
|
11
11
|
// Allows property names like {case:1} ONLY when not in switch context
|
|
12
12
|
const reserve = (w, l = w.length, c = w.charCodeAt(0), prev = lookup[c]) =>
|
|
13
|
-
lookup[c] = (a, prec, op) => (word(w) && !a && inSwitch) || prev?.(a, prec, op);
|
|
13
|
+
lookup[c] = (a, prec, op) => (word(w) && !a && inSwitch && (!parse.prop || parse.prop(idx + l))) || prev?.(a, prec, op);
|
|
14
14
|
reserve('case');
|
|
15
15
|
reserve('default');
|
|
16
16
|
|
package/jessie.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
`),o=t.pop(),n=c.slice(Math.max(0,e-40),e),p="\u032D",m=(c[e]||" ")+p,
|
|
1
|
+
var l,c,s=r=>(l=0,c=r,s.enter?.(),r=d(),c[l]?R():r||""),R=(r="Unexpected token",e=l,t=c.slice(0,e).split(`
|
|
2
|
+
`),o=t.pop(),n=c.slice(Math.max(0,e-40),e),p="\u032D",m=(c[e]||" ")+p,u=c.slice(e+1,e+20))=>{throw SyntaxError(`${r} at ${t.length+1}:${o.length+1}
|
|
3
3
|
${c[e-41]!==`
|
|
4
|
-
`,""+n}${m}${
|
|
5
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},Qr=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,$r=r=>(e,t,o="",n=String.fromCharCode(r))=>{if(e||!s.string?.[n])return;h();let p=()=>{let m=c.charCodeAt(
|
|
6
|
-
`,"/*":"*/"};var cr;s.space=()=>{cr||(cr=Object.entries(s.comment).map(([n,p])=>[n,p,n.charCodeAt(0)]));for(var r;r=Ze();){for(var e=0,t;t=cr[e++];)if(r===t[2]&&c.substr(
|
|
7
|
-
`)for(;c.charCodeAt(o)>=Ye;)o++;else{for(;c[o]&&c.substr(o,t[1].length)!==t[1];)o++;c[o]&&(o+=t[1].length)}
|
|
8
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},re=()=>{let r=[],e="",t;for(;(t=c.charCodeAt(
|
|
9
|
-
`;var Ae=32,_r=10,Zt=59,qt=125,ae=91,de=40,tr=G.asi??G[";"],xt=s._baseSpace??=s.space,bt=s._baseStep??=s.step,Nr=r=>Array.isArray(r)||typeof r=="string",ro=(G[";"]??5)+1,Or=r=>Array.isArray(r)&&(G[r[0]]<=ro||r[0]==="{}"&&Or(r[1])),eo=(r,e)=>{for(;(e=c.charCodeAt(r))<=Ae;){if(e===_r)return!0;r++}return!1},to=(r=u,e)=>{for(;r-- >0&&(e=c.charCodeAt(r))<=Ae;)if(e===_r)return!0;return!1};s.space=(r,e)=>{for(;;){for(e=u,r=xt();e<u;)if(c.charCodeAt(e++)===_r){s.newline=!0;break}if(r===Zt&&eo(u+1)){_(u+1),s.newline=s.semi=!0;continue}return r}};s.enter=()=>s.newline=s.semi=!1;s.exit=(r,e)=>{e===qt&&(s.newline=!0,s.semi=!1)};s.step=(r,e,t,o)=>{if(s.semi&&e>=tr)return!1;if(r&&!Nr(r))return null;if(Nr(r)){let p=(t===ae||t===de)&&to();if(s.semi||t===ae&&(p||Or(r))||t===de&&(Or(r)||p&&e>=tr))return he(r,e,o)??null}let n=s.newline;return bt(r,e,t,o)??(Nr(r)&&n?he(r,e,o)??null:null)};var Rr=0,oo=2e3,he=s.asi=(r,e,t,o,n)=>{if(e>=tr||Rr>=oo)return;s.semi=!1;let p=u;Rr++;try{o=t(tr-.5)}finally{Rr--}if(!(!o||u===p))return n=o?.[0]===";"?o.slice(1):[o],r?.[0]===";"?(r.push(...n),r):[";",r,...n]};var Ce=(r,e,t,o)=>typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="()"&&r.length===2?Ce(r[1],e):(()=>{throw Error("Invalid assignment target")})(),ye={"=":(r,e,t)=>r[e]=t,"+=":(r,e,t)=>r[e]+=t,"-=":(r,e,t)=>r[e]-=t,"*=":(r,e,t)=>r[e]*=t,"/=":(r,e,t)=>r[e]/=t,"%=":(r,e,t)=>r[e]%=t,"|=":(r,e,t)=>r[e]|=t,"&=":(r,e,t)=>r[e]&=t,"^=":(r,e,t)=>r[e]^=t,">>=":(r,e,t)=>r[e]>>=t,"<<=":(r,e,t)=>r[e]<<=t};for(let r in ye)f(r,(e,t)=>(t=i(t),Ce(e,(o,n,p)=>ye[r](o,n,t(p)))));f("!",r=>(r=i(r),e=>!r(e)));f("||",(r,e)=>(r=i(r),e=i(e),t=>r(t)||e(t)));f("&&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&&e(t)));f("~",r=>(r=i(r),e=>~r(e)));f("|",(r,e)=>(r=i(r),e=i(e),t=>r(t)|e(t)));f("&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&e(t)));f("^",(r,e)=>(r=i(r),e=i(e),t=>r(t)^e(t)));f(">>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>e(t)));f("<<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<<e(t)));f(">",(r,e)=>(r=i(r),e=i(e),t=>r(t)>e(t)));f("<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<e(t)));f(">=",(r,e)=>(r=i(r),e=i(e),t=>r(t)>=e(t)));f("<=",(r,e)=>(r=i(r),e=i(e),t=>r(t)<=e(t)));f("==",(r,e)=>(r=i(r),e=i(e),t=>r(t)==e(t)));f("!=",(r,e)=>(r=i(r),e=i(e),t=>r(t)!=e(t)));f("+",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)+e(t)):(r=i(r),t=>+r(t)));f("-",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)-e(t)):(r=i(r),t=>-r(t)));f("*",(r,e)=>(r=i(r),e=i(e),t=>r(t)*e(t)));f("/",(r,e)=>(r=i(r),e=i(e),t=>r(t)/e(t)));f("%",(r,e)=>(r=i(r),e=i(e),t=>r(t)%e(t)));var Lr=(r,e,t,o)=>typeof r=="string"?n=>e(n,r):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n))):r[0]==="()"&&r.length===2?Lr(r[1],e):(()=>{throw Error("Invalid increment target")})();f("++",(r,e)=>Lr(r,e===null?(t,o)=>t[o]++:(t,o)=>++t[o]));f("--",(r,e)=>Lr(r,e===null?(t,o)=>t[o]--:(t,o)=>--t[o]));var we=(...r)=>(r=r.map(i),e=>{let t;for(let o of r)t=o(e);return t});f(",",we);f(";",we);var K=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",or=r=>{throw Error(r)};f("[]",(r,e)=>e===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(t=>t==null?(()=>{}):t[0]==="..."?(t=i(t[1]),o=>t(o)):(t=i(t),o=>[t(o)])),t=>r.flatMap(o=>o(t))):(e==null&&or("Missing index"),r=i(r),e=i(e),t=>{let o=e(t);return K(o)?void 0:r(t)[o]}));f(".",(r,e)=>(r=i(r),e=e[0]?e:e[1],K(e)?()=>{}:t=>r(t)[e]));f("()",(r,e)=>{if(e===void 0)return r==null?or("Empty ()"):i(r);let t=n=>n?.[0]===","&&n.slice(1).some(p=>p==null||t(p));t(e)&&or("Empty argument");let o=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];return Pr(r,(n,p,m)=>n[p](...o(m)))});var v=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&v(r[1])||r[0]==="{}"),Pr=(r,e,t,o)=>r==null?or("Empty ()"):r[0]==="()"&&r.length==2?Pr(r[1],e):typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="?."?(t=i(r[1]),o=r[2],n=>{let p=t(n);return p==null?void 0:e(p,o,n)}):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="?.[]"?(t=i(r[1]),o=i(r[2]),n=>{let p=t(n);return p==null?void 0:e(p,o(n),n)}):(r=i(r),n=>e([r(n)],0,n)),D=Pr;f("===",(r,e)=>(r=i(r),e=i(e),t=>r(t)===e(t)));f("!==",(r,e)=>(r=i(r),e=i(e),t=>r(t)!==e(t)));f("??",(r,e)=>(r=i(r),e=i(e),t=>r(t)??e(t)));var no=r=>{throw Error(r)};f("**",(r,e)=>(r=i(r),e=i(e),t=>r(t)**e(t)));f("**=",(r,e)=>(v(r)||no("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]**=e(n))));f("in",(r,e)=>(r=i(r),e=i(e),t=>r(t)in e(t)));var io=r=>{throw Error(r)};f(">>>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>>e(t)));f(">>>=",(r,e)=>(v(r)||io("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]>>>=e(n))));var so=r=>r[0]?.[0]===","?r[0].slice(1):r,F=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[o,...n]=r,p=so(n);if(o==="{}"){let m=[];for(let l of p){if(Array.isArray(l)&&l[0]==="..."){let w={};for(let R in e)m.includes(R)||(w[R]=e[R]);t[l[1]]=w;break}let a,y,g;typeof l=="string"?a=y=l:l[0]==="="?(typeof l[1]=="string"?a=y=l[1]:[,a,y]=l[1],g=l[2]):[,a,y]=l,m.push(a);let E=e[a];E===void 0&&g&&(E=i(g)(t)),F(y,E,t)}}else if(o==="[]"){let m=0;for(let l of p){if(l===null){m++;continue}if(Array.isArray(l)&&l[0]==="..."){t[l[1]]=e.slice(m);break}let a=l,y;Array.isArray(l)&&l[0]==="="&&([,a,y]=l);let g=e[m++];g===void 0&&y&&(g=i(y)(t)),F(a,g,t)}}},Br=(...r)=>(r=r.map(e=>{if(typeof e=="string")return t=>{t[e]=void 0};if(e[0]==="="){let[,t,o]=e,n=i(o);return typeof t=="string"?p=>{p[t]=n(p)}:p=>F(t,n(p),p)}return i(e)}),e=>{for(let t of r)t(e)});f("let",Br);f("const",Br);f("var",Br);var nr=r=>{throw Error(r)};f("=",(r,e)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let t=r[1];return e=i(e),typeof t=="string"?o=>{o[t]=e(o)}:o=>F(t,e(o),o)}return v(r)||nr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]=e(n))});f("||=",(r,e)=>(v(r)||nr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]||=e(n))));f("&&=",(r,e)=>(v(r)||nr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]&&=e(n))));f("??=",(r,e)=>(v(r)||nr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]??=e(n))));f("?",(r,e,t)=>(r=i(r),e=i(e),t=i(t),o=>r(o)?e(o):t(o)));var P=[];f("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r;let t=r?r[0]===","?r.slice(1):[r]:[],o=-1,n=null,p=t[t.length-1];Array.isArray(p)&&p[0]==="..."&&(o=t.length-1,n=p[1],t.length--);let m=e?.[0]==="{}";return e=i(m?["{",e[1]]:e),l=>(...a)=>{let y={};t.forEach((E,w)=>y[E]=a[w]),n&&(y[n]=a.slice(o));let g=new Proxy(y,{get:(E,w)=>w in E?E[w]:l?.[w],set:(E,w,R)=>((w in E?E:l)[w]=R,!0),has:(E,w)=>w in E||(l?w in l:!1)});try{let E=e(g);return m?void 0:E}catch(E){if(E===P)return E[0];throw E}}});f("...",r=>(r=i(r),e=>Object.entries(r(e))));f("?.",(r,e)=>(r=i(r),K(e)?()=>{}:t=>r(t)?.[e]));f("?.[]",(r,e)=>(r=i(r),e=i(e),t=>{let o=e(t);return K(o)?void 0:r(t)?.[o]}));f("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];if(r[0]==="?."){let n=i(r[1]),p=r[2];return K(p)?()=>{}:m=>n(m)?.[p]?.(...t(m))}if(r[0]==="?.[]"){let n=i(r[1]),p=i(r[2]);return m=>{let l=n(m),a=p(m);return K(a)?void 0:l?.[a]?.(...t(m))}}if(r[0]==="."){let n=i(r[1]),p=r[2];return K(p)?()=>{}:m=>n(m)?.[p]?.(...t(m))}if(r[0]==="[]"&&r.length===3){let n=i(r[1]),p=i(r[2]);return m=>{let l=n(m),a=p(m);return K(a)?void 0:l?.[a]?.(...t(m))}}let o=i(r);return n=>o(n)?.(...t(n))});f("typeof",r=>(r=i(r),e=>typeof r(e)));f("void",r=>(r=i(r),e=>(r(e),void 0)));f("delete",r=>{if(r[0]==="."){let e=i(r[1]),t=r[2];return o=>delete e(o)[t]}if(r[0]==="[]"){let e=i(r[1]),t=i(r[2]);return o=>delete e(o)[t(o)]}return()=>!0});f("new",r=>{let e=i(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,o=t?t[0]===","?(n=>p=>n.map(m=>m(p)))(t.slice(1).map(i)):(n=>p=>[n(p)])(i(t)):()=>[];return n=>new(e(n))(...o(n))});var ir=Symbol("accessor");f("get",(r,e)=>(e=e?i(e):()=>{},t=>[[ir,r,{get:function(){let o=Object.create(t||{});return o.this=this,e(o)}}]]));f("set",(r,e,t)=>(t=t?i(t):()=>{},o=>[[ir,r,{set:function(n){let p=Object.create(o||{});p.this=this,p[e]=n,t(p)}}]]));var po=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);f("{}",(r,e)=>{if(e!==void 0)return;if(!po(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(o=>i(typeof o=="string"?[":",o,o]:o));return o=>{let n={},p={};for(let m of t.flatMap(l=>l(o)))if(m[0]===ir){let[,l,a]=m;p[l]={...p[l],...a,configurable:!0,enumerable:!0}}else n[m[0]]=m[1];for(let m in p)Object.defineProperty(n,m,p[m]);return n}});f("{",r=>(r=r?i(r):()=>{},e=>r(Object.create(e))));f(":",(r,e)=>(e=i(e),Array.isArray(r)?(r=i(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));f("`",(...r)=>(r=r.map(i),e=>r.map(t=>t(e)).join("")));f("``",(r,...e)=>{r=i(r);let t=[],o=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):o.push(i(p));let n=Object.assign([...t],{raw:t});return p=>r(p)(n,...o.map(m=>m(p)))});f("function",(r,e,t)=>{t=t?i(t):()=>{};let o=e?e[0]===","?e.slice(1):[e]:[],n=null,p=-1,m=o[o.length-1];return Array.isArray(m)&&m[0]==="..."&&(p=o.length-1,n=m[1],o.length--),l=>{let a=(...y)=>{let g={};o.forEach((w,R)=>g[w]=y[R]),n&&(g[n]=y.slice(p));let E=new Proxy(g,{get:(w,R)=>R in w?w[R]:l[R],set:(w,R,Se)=>((R in w?w:l)[R]=Se,!0),has:(w,R)=>R in w||R in l});try{return t(E)}catch(w){if(w===P)return w[0];throw w}};return r&&(l[r]=a),a}});f("function*",(r,e,t)=>{throw Error("Generator functions are not supported in evaluation")});f("async",r=>{let e=i(r);return t=>{let o=e(t);return async function(...n){return o(...n)}}});f("await",r=>(r=i(r),async e=>await r(e)));f("yield",r=>(r=r?i(r):null,e=>{throw{__yield__:r?r(e):void 0}}));f("yield*",r=>(r=i(r),e=>{throw{__yield_all__:r(e)}}));var fo=Symbol("static"),lo=r=>{throw Error(r)};f("instanceof",(r,e)=>(r=i(r),e=i(e),t=>r(t)instanceof e(t)));f("class",(r,e,t)=>(e=e?i(e):null,t=t?i(t):null,o=>{let n=e?e(o):Object,p=function(...m){if(!(this instanceof p))return lo("Class constructor must be called with new");let l=e?Reflect.construct(n,m,p):this;return p.prototype.__constructor__&&p.prototype.__constructor__.apply(l,m),l};if(Object.setPrototypeOf(p.prototype,n.prototype),Object.setPrototypeOf(p,n),t){let m=Object.create(o);m.super=n;let l=t(m),a=Array.isArray(l)&&typeof l[0]?.[0]=="string"?l:[];for(let[y,g]of a)y==="constructor"?p.prototype.__constructor__=g:p.prototype[y]=g}return r&&(o[r]=p),p}));f("static",r=>(r=i(r),e=>[[fo,r(e)]]));f("//",(r,e)=>{let t=new RegExp(r,e||"");return()=>t});f("if",(r,e,t)=>(r=i(r),e=i(e),t=t!==void 0?i(t):null,o=>r(o)?e(o):t?.(o)));var M=Symbol("break"),H=Symbol("continue");f("while",(r,e)=>(r=i(r),e=i(e),t=>{let o;for(;r(t);)try{o=e(t)}catch(n){if(n===M)break;if(n===H)continue;if(n===P)return n[0];throw n}return o}));f("do",(r,e)=>(r=i(r),e=i(e),t=>{let o;do try{o=r(t)}catch(n){if(n===M)break;if(n===H)continue;if(n===P)return n[0];throw n}while(e(t));return o}));f("for",(r,e)=>{if(Array.isArray(r)&&r[0]===";"){let[,t,o,n]=r;return t=t?i(t):null,o=o?i(o):()=>!0,n=n?i(n):null,e=i(e),p=>{let m;for(t?.(p);o(p);n?.(p))try{m=e(p)}catch(l){if(l===M)break;if(l===H)continue;if(l===P)return l[0];throw l}return m}}if(Array.isArray(r)&&(r[0]==="in"||r[0]==="of")){let[t,o,n]=r;if(Array.isArray(o)&&(o[0]==="let"||o[0]==="const"||o[0]==="var")&&(o=o[1]),t==="in")return mo(o,n,e);if(t==="of")return uo(o,n,e)}});var uo=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,m=o?null:n[r];for(let l of e(n)){o?F(r,l,n):n[r]=l;try{p=t(n)}catch(a){if(a===M)break;if(a===H)continue;if(a===P)return a[0];throw a}}return o||(n[r]=m),p}},mo=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,m=o?null:n[r];for(let l in e(n)){o?F(r,l,n):n[r]=l;try{p=t(n)}catch(a){if(a===M)break;if(a===H)continue;if(a===P)return a[0];throw a}}return o||(n[r]=m),p}};f("break",()=>()=>{throw M});f("continue",()=>()=>{throw H});f("return",r=>(r=r!==void 0?i(r):null,e=>{throw P[0]=r?.(e),P}));f("try",(r,...e)=>{r=r?i(r):null;let t=e.find(l=>l?.[0]==="catch"),o=e.find(l=>l?.[0]==="finally"),n=t?.[1],p=t?.[2]?i(t[2]):null,m=o?.[1]?i(o[1]):null;return l=>{let a;try{a=r?.(l)}catch(y){if(y===M||y===H||y===P)throw y;if(n!=null&&p){let g=n in l,E=l[n];l[n]=y;try{a=p(l)}finally{g?l[n]=E:delete l[n]}}else if(!p)throw y}finally{m?.(l)}return a}});f("throw",r=>(r=i(r),e=>{throw r(e)}));f("switch",(r,...e)=>(r=i(r),e.length?(e=e.map(t=>[t[0]==="case"?i(t[1]):null,(t[0]==="case"?t[2]:t[1])?.[0]===";"?(t[0]==="case"?t[2]:t[1]).slice(1).map(i):(t[0]==="case"?t[2]:t[1])?[i(t[0]==="case"?t[2]:t[1])]:[]]),t=>{let o=r(t),n=!1,p;for(let[l,a]of e)if(n||l===null||l(t)===o)for(n=!0,m=0;m<a.length;m++)try{p=a[m](t)}catch(y){if(y===M)return p;throw y}var m;return p}):t=>r(t)));f("import",()=>()=>{});f("export",()=>()=>{});f("from",(r,e)=>()=>{});f("as",(r,e)=>()=>{});f("default",r=>i(r));var ge=new WeakMap,co=(r,...e)=>typeof r=="string"?i(s(r)):ge.get(r)||ge.set(r,ao(r,e)).get(r),Ee=57344,ao=(r,e)=>{let t=r.reduce((p,m,l)=>p+(l?String.fromCharCode(Ee+l-1):"")+m,""),o=s(t),n=p=>{if(typeof p=="string"&&p.length===1){let m=p.charCodeAt(0)-Ee,l;if(m>=0&&m<e.length)return l=e[m],ho(l)?l:[,l]}return Array.isArray(p)?p.map(n):p};return i(n(o))},ho=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Ao=co;export{fr as access,A as binary,i as compile,c as cur,Ao as default,N as err,d as expr,W as group,yo as id,u as idx,C as keyword,Q as literal,vr as loc,I as lookup,Mr as member,pr as nary,T as next,f as operator,sr as operators,L as parens,s as parse,j as peek,G as prec,lr as propName,_ as seek,h as skip,S as token,O as unary,k as word};
|
|
4
|
+
`,""+n}${m}${u}`)},vr=(r,e=l)=>(Array.isArray(r)&&(r.loc=e),r),k=(r,e=l,t)=>{for(;t=r(c.charCodeAt(l));)l+=t;return c.slice(e,l)},h=(r=1)=>c[l+=r],I=r=>l=r,d=(r=0,e)=>{let t,o,n;for(e&&s.enter?.(r,e);(t=s.space())&&t!==e&&(n=s.step(o,r,t,d));)o=n;return e&&(t==e?(l++,s.exit?.(r,e)):R("Unclosed "+String.fromCharCode(e-(e>42?2:1)))),o},z=(r=l)=>{for(;c.charCodeAt(r)<=32;)r++;return c.charCodeAt(r)},Co=s.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,T=(r,e=r.length)=>c.substr(l,e)===r&&!s.id(c.charCodeAt(l+e)),L=()=>(h(),d(0,41)),N=[],G={},S=(r,e=32,t,o=r.charCodeAt(0),n=r.length,p=N[o],m=r.toUpperCase()!==r,u,a)=>(e=G[r]=!p&&G[r]||e,N[o]=(y,g,E,w=l)=>(u=E,(E?r==E:(n<2||r.charCodeAt(1)===c.charCodeAt(l+1)&&(n<3||c.substr(l,n)==r))&&(!m||!s.id(c.charCodeAt(l+n)))&&(u=E=r))&&g<e&&(l+=n,(a=t(y))?vr(a,w):(l=w,u=0,!m&&!p&&!y&&R()),a)||p?.(y,g,u))),A=(r,e,t=!1)=>S(r,e,o=>o&&(n=>n&&[r,o,n])(d(e-(t?.5:0)))),_=(r,e,t)=>S(r,e,o=>t?o&&[r,o]:!o&&(o=d(e-.5))&&[r,o]),Q=(r,e)=>S(r,200,t=>!t&&[,e]),sr=(r,e,t,o)=>S(r,e,(n,p,m=n)=>(p=d(e-(t?.5:0)),n?.[0]!==r&&(n=[r,n||null]),p?.[0]===r?n.push(...p.slice(1)):p?n.push(p):o||z()===r.charCodeAt(0)?n.push(null):m&&n.length===2&&(n=n[1]),n)),J=(r,e)=>S(r[0],e,t=>!t&&[r,d(0,r.charCodeAt(1))||null]),pr=(r,e)=>S(r[0],e,t=>t&&[r,t,d(0,r.charCodeAt(1))||null]),fr=(r,e)=>(s.space(),e=c.charCodeAt(l),s.id(e)&&(e<48||e>57)?k(s.id):d(r)),Mr=(r,e)=>S(r,e,t=>t&&(o=>o&&[r,t,o])(fr(e))),C=(r,e,t,o=r.charCodeAt(0),n=r.length,p=N[o],m)=>(G[r]??=e,N[o]=(u,a,y,g=l)=>!u&&(y?r==y:(n<2||c.substr(l,n)==r)&&(y=r))&&a<e&&!s.id(c.charCodeAt(l+n))&&(!s.prop||s.prop(l+n))&&(I(l+n),(m=t())?vr(m,g):I(g),m)||p?.(u,a,y));s.space=r=>{for(;(r=c.charCodeAt(l))<=32;)l++;return r};s.step=(r,e,t,o,n)=>(n=N[t])&&n(r,e)||(r?null:k(s.id)||null);var ir={},f=(r,e,t=ir[r])=>ir[r]=(...o)=>e(...o)||t?.(...o),i=r=>Array.isArray(r)?r[0]==null?(e=>()=>e)(r[1]):ir[r[0]]?.(...r.slice(1))??R(`Unknown operator: ${r[0]}`,r?.loc):r===void 0?()=>{}:e=>e?.[r];var lr=46,j=48,$=57,ke=69,Te=101,Ne=43,Ie=45,Z=95,Ur=110,Re=97,Oe=102,_e=65,Le=70,Kr=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),ur=r=>{let e=Kr(k(t=>t===lr&&(t=c.charCodeAt(l+1))!==lr&&!(s.id(t)&&t>$)||t>=j&&t<=$||t===Z||((t===ke||t===Te)&&((t=c.charCodeAt(l+1))>=j&&t<=$||t===Ne||t===Ie)?2:0)));return c.charCodeAt(l)===Ur?(h(),[,BigInt(e)]):(r=+e)!=r?R():[,r]},Pe={2:r=>r===48||r===49||r===Z,8:r=>r>=48&&r<=55||r===Z,16:r=>r>=j&&r<=$||r>=Re&&r<=Oe||r>=_e&&r<=Le||r===Z};s.number=null;N[lr]=r=>!r&&c.charCodeAt(l+1)>=j&&c.charCodeAt(l+1)<=$&&ur();for(let r=j;r<=$;r++)N[r]=e=>e?void 0:ur();N[j]=r=>{if(r)return;let e=s.number;if(e){for(let[t,o]of Object.entries(e))if(t[0]==="0"&&c[l+1]?.toLowerCase()===t[1]){h(2);let n=Kr(k(Pe[o]));return c.charCodeAt(l)===Ur?(h(),[,BigInt("0"+t[1]+n)]):[,parseInt(n,o)]}}return ur()};var Be=92,Dr=34,Gr=39,Fr=117,Hr=120,ve=123,Me=125,Xr=10,Ue=13,Ke={n:`
|
|
5
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},Qr=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,$r=r=>(e,t,o="",n=String.fromCharCode(r))=>{if(e||!s.string?.[n])return;h();let p=()=>{let m=c.charCodeAt(l+1);if(m===Xr)return 2;if(m===Ue)return c.charCodeAt(l+2)===Xr?3:2;if(m===Hr||m===Fr&&c.charCodeAt(l+2)!==ve){let u=m===Hr?2:4,a=0,y;for(let g=0;g<u;g++){if((y=Qr(c.charCodeAt(l+2+g)))<0)return o+=c[l+1],2;a=a*16+y}return o+=String.fromCharCode(a),2+u}if(m===Fr){let u=0,a=l+3,y;for(;(y=Qr(c.charCodeAt(a)))>=0;)u=u*16+y,a++;return a>l+3&&u<=1114111&&c.charCodeAt(a)===Me?(o+=String.fromCodePoint(u),a-l+1):(o+=c[l+1],2)}return o+=Ke[c[l+1]]||c[l+1],2};return k(m=>m-r&&(m!==Be?(o+=c[l],1):p())),c[l]===n?h():R("Bad string"),[,o]};N[Dr]=$r(Dr);N[Gr]=$r(Gr);s.string={'"':!0};var De=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>A(r,De,!0));var Ge=30,Fe=40,He=140;_("!",He);A("||",Ge);A("&&",Fe);var Xe=50,Qe=60,$e=70,jr=100,je=140;A("|",Xe);A("&",$e);A("^",Qe);A(">>",jr);A("<<",jr);_("~",je);var q=90;A("<",q);A(">",q);A("<=",q);A(">=",q);var Wr=80;A("==",Wr);A("!=",Wr);var zr=110,mr=120,Jr=140;A("+",zr);A("-",zr);A("*",mr);A("/",mr);A("%",mr);_("+",Jr);_("-",Jr);var x=150;S("++",x,r=>r?["++",r,null]:["++",d(x-1)]);S("--",x,r=>r?["--",r,null]:["--",d(x-1)]);var We=5,ze=10;sr(",",ze);sr(";",We,!0,!0);var Je=170;J("()",Je);var Vr=170,Ve=160;pr("[]",Vr);Mr(".",Vr);pr("()",Ve);var Ye=32,Ze=s.space;s.comment??={"//":`
|
|
6
|
+
`,"/*":"*/"};var cr;s.space=()=>{cr||(cr=Object.entries(s.comment).map(([n,p])=>[n,p,n.charCodeAt(0)]));for(var r;r=Ze();){for(var e=0,t;t=cr[e++];)if(r===t[2]&&c.substr(l,t[0].length)===t[0]){var o=l+t[0].length;if(t[1]===`
|
|
7
|
+
`)for(;c.charCodeAt(o)>=Ye;)o++;else{for(;c[o]&&c.substr(o,t[1].length)!==t[1];)o++;c[o]&&(o+=t[1].length)}I(o),r=0;break}if(r)return r}return r};var Yr=80;A("===",Yr);A("!==",Yr);var qe=30;A("??",qe);var xe=130,be=20;A("**",xe,!0);A("**=",be,!0);var Zr=90;A("in",Zr);A("of",Zr);var rt=20,et=100;A(">>>",et);A(">>>=",rt,!0);var ar=20;A("||=",ar,!0);A("&&=",ar,!0);A("??=",ar,!0);Q("true",!0);Q("false",!1);Q("null",null);C("undefined",200,()=>[]);Q("NaN",NaN);Q("Infinity",1/0);var dr=20;S("?",dr,(r,e,t)=>r&&(e=d(dr-1))&&k(o=>o===58)&&(t=d(dr-1),["?",r,e,t]));var tt=20;A("=>",tt,!0);var ot=20;_("...",ot);var qr=170;S("?.",qr,(r,e)=>{if(!r)return;let t=s.space();return t===40?(h(),["?.()",r,d(0,41)||null]):t===91?(h(),["?.[]",r,d(0,93)]):(e=fr(qr),e?["?.",r,e]:void 0)});var hr=140,xr=160,nt=xr+1;_("typeof",hr);_("void",hr);_("delete",hr);var it=r=>s.space()===40?(h(),["()",r,d(0,41)||null]):r;C("new",nt,()=>T(".target")?(h(7),["new.target"]):["new",it(d(xr))]);var st=20,br=200;s.prop=r=>z(r)!==58;J("[]",br);J("{}",br);A(":",st-1,!0);var pt=170,Ar=96,ft=36,lt=123,ut=92,mt={n:`
|
|
8
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},re=()=>{let r=[],e="",t;for(;(t=c.charCodeAt(l))!==Ar;)t?t===ut?(h(),e+=mt[c[l]]||c[l],h()):t===ft&&c.charCodeAt(l+1)===lt?(r.push([,e]),e="",h(2),r.push(d(0,125))):(e+=c[l],h()):R("Unterminated template");return r.push([,e]),h(),r},ct=r=>r.length<2&&r[0]?.[0]===void 0?r[0]||[,""]:["`",...r],at=N[Ar];N[Ar]=(r,e)=>r&&e<pt?s.asi&&s.newline?void 0:(h(),["``",r,...re()]):r?at?.(r,e):(h(),ct(re()));s.string["'"]=!0;s.number={"0x":16,"0b":2,"0o":8};var dt=92,ht=117,At=123,yt=125,Ct=183,wt=s.id,ee=r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,gt=(r=l+2,e,t=0,o=0)=>{if(c.charCodeAt(l)!==dt||c.charCodeAt(l+1)!==ht)return 0;if(c.charCodeAt(r)===At){for(;ee(e=c.charCodeAt(++r));)t=t*16+(e<=57?e-48:(e&31)+9);return r>l+3&&t<=1114111&&c.charCodeAt(r)===yt?r-l+1:0}for(;o<4&&ee(c.charCodeAt(r+o));)o++;return o===4?6:0};s.id=r=>wt(r)||r===Ct||gt();var yr=5,Et=10,Cr=r=>{let e=l,t=d(Et-1);return t==null?r:r==="let"&&(t==="in"||t==="of")?(I(e),r):t[0]==="in"||t[0]==="of"?[t[0],[r,t[1]],t[2]]:t[0]===","?[r,...t.slice(1)]:[r,t]};C("let",yr+1,()=>Cr("let"));C("const",yr+1,()=>Cr("const"));C("var",yr+1,()=>Cr("var"));var b=5,St=59,B=()=>(s.space()===123||R("Expected {"),h(),d(b-.5,125)||null),U=()=>s.space()!==123?d(b+.5):(h(),d(b-.5,125)||null),kt=()=>{let r=l;return s.space()===St&&h(),s.space(),T("else")?(h(4),s.semi=!1,!0):(I(r),!1)};C("if",b+1,()=>{s.space();let r=["if",L(),U()];return kt()&&r.push(U()),r});var Tt=200;C("function",Tt,()=>{s.space();let r=!1;c[l]==="*"&&(r=!0,h(),s.space());let e=k(s.id);return e&&s.space(),r?["function*",e,L()||null,B()]:["function",e,L()||null,B()]});var rr=140,wr=20,Nt=40;_("await",rr);C("yield",rr,()=>(s.space(),c[l]==="*"?(h(),s.space(),["yield*",d(wr)]):["yield",d(wr)]));C("async",rr,()=>{if(s.space(),T("function"))return["async",d(rr)];let r=l,e=k(s.id);if(e){if(s.space(),c.charCodeAt(l)===Nt)return["async",e];I(r)}let t=d(wr-.5);return t&&["async",t]});var te=200;var It=90,Rt=175,Ot=160,_t=Ot-.5;_("static",Rt);A("instanceof",It);S("#",te,r=>{if(r)return;let e=k(s.id);return e?"#"+e:void 0});C("class",te,()=>{s.space();let r=k(s.id)||null;if(r==="extends")r=null,s.space();else{if(s.space(),!T("extends"))return["class",r,null,B()];h(7),s.space()}return["class",r,d(_t),B()]});var gr=47,Lt=92,Pt=91,Bt=93;S("/",140,r=>{let e=c.charCodeAt(l);if(r||e===gr||e===42||e===43||e===63)return;let t=!1,o=k(p=>p===Lt?2:p===Pt?(t=!0,1):p===Bt?(t=!1,1):p&&(t||p!==gr));c.charCodeAt(l)===gr||R("Unterminated regex"),h();let n=k(p=>p===103||p===105||p===109||p===115||p===117||p===121);return n?["//",o,n]:["//",o]});var X=5,V=125,Y=59;C("while",X+1,()=>(s.space(),["while",L(),U()]));C("do",X+1,()=>(r=>(s.space(),h(5),s.space(),["do",r,L()]))(U()));C("for",X+1,()=>(s.space(),T("await")?(h(5),s.space(),["for await",L(),U()]):["for",L(),U()]));C("break",X+1,()=>{s.asi&&(s.newline=!1);let r=l;s.space();let e=c.charCodeAt(l);if(!e||e===V||e===Y||s.newline)return["break"];let t=k(s.id);if(!t)return["break"];s.space();let o=c.charCodeAt(l);return!o||o===V||o===Y||s.newline?["break",t]:(I(r),["break"])});C("continue",X+1,()=>{s.asi&&(s.newline=!1);let r=l;s.space();let e=c.charCodeAt(l);if(!e||e===V||e===Y||s.newline)return["continue"];let t=k(s.id);if(!t)return["continue"];s.space();let o=c.charCodeAt(l);return!o||o===V||o===Y||s.newline?["continue",t]:(I(r),["continue"])});C("return",X+1,()=>{s.asi&&(s.newline=!1);let r=s.space();return!r||r===V||r===Y||s.newline?["return"]:["return",d(X)]});var Er=5;C("try",Er+1,()=>{let r=["try",B()];return s.space(),T("catch")&&(h(5),s.space(),r.push(["catch",z()===40?L():null,B()])),s.space(),T("finally")&&(h(7),r.push(["finally",B()])),r});C("throw",Er+1,()=>{if(s.asi&&(s.newline=!1),s.space(),s.newline)throw SyntaxError("Unexpected newline after throw");return["throw",d(Er)]});var ie=5,vt=20,oe=58,Mt=59,se=125,Sr=0,pe=(r,e=r.length,t=r.charCodeAt(0),o=N[t])=>N[t]=(n,p,m)=>T(r)&&!n&&Sr&&(!s.prop||s.prop(l+e))||o?.(n,p,m);pe("case");pe("default");var ne=r=>{let e=[];for(;(r=s.space())!==se&&!T("case")&&!T("default");){if(r===Mt){h();continue}s.semi=!1,e.push(d(ie+.5))||R()}return e.length>1?[";",...e]:e[0]||null},Ut=()=>{s.space()===123||R("Expected {"),h(),Sr++;let r=[];try{for(;s.space()!==se;)if(T("case")){I(l+4),s.space(),s.semi=!1;let e=d(vt-.5);s.space()===oe&&h(),r.push(["case",e,ne()])}else T("default")?(I(l+7),s.space()===oe&&h(),r.push(["default",ne()])):R("Expected case or default")}finally{Sr--}return h(),r};C("switch",ie+1,()=>s.space()===40&&["switch",L(),...Ut()]);var kr=5,Kt=20;C("debugger",kr+1,()=>["debugger"]);C("with",kr+1,()=>(s.space(),["with",L(),U()]));var Dt=["if","for","while","do","switch","try"];S(":",Kt-1,r=>typeof r=="string"&&(s.space(),Dt.some(e=>T(e)))&&[":",r,d(kr)]);var Tr=5,W=10,fe=42,Gt=N[fe];N[fe]=(r,e)=>r?Gt?.(r,e):(h(),"*");S("from",W+1,r=>r?r[0]!=="="&&r[0]!==","&&(s.space(),["from",r,d(W+1)]):!1);S("as",W+2,r=>r?(s.space(),["as",r,d(W+2)]):!1);C("import",Tr,()=>T(".meta")?(h(5),["import.meta"]):["import",d(W)]);C("export",Tr,()=>(s.space(),T("default")?(h(7),["export",["default",d(W)]]):["export",d(Tr)]));var Nr=20,Ft=200,Ht=10,Xt=13,Qt=34,$t=35,jt=39,Wt=40,le=41,zt=91,ue=123,me=125,Jt=(r,e)=>{for(;r<e;){let t=c.charCodeAt(r++);if(t===Ht||t===Xt)return!0}return!1},Vt=r=>r===Qt||r===jt||r===zt||r===$t,Yt=()=>k(s.id)||(Vt(c.charCodeAt(l))?d(Ft-.5):null),Zt=r=>typeof r=="string"||Array.isArray(r)&&(r[0]===void 0||r[0]==="[]"),ce=r=>e=>{if(e)return;let t=l;if(s.space(),s.semi||Jt(t,l))return!1;let o=Yt();if(!o||(s.space(),c.charCodeAt(l)!==Wt))return!1;h();let n=d(0,le);return s.space(),c.charCodeAt(l)!==ue?!1:(h(),[r,o,n,d(0,me)])};S("get",Nr-1,ce("get"));S("set",Nr-1,ce("set"));S("(",Nr-1,r=>{if(!r)return;let e,t;if(Array.isArray(r)&&r[0]==="static"&&(e="static",r=r[1]),Array.isArray(r)&&r[0]==="async"&&(t=!0,r=r[1]),!Zt(r))return;let o=d(0,le)||null;if(s.space(),c.charCodeAt(l)!==ue)return;h();let n=["=>",["()",o],d(0,me)||null];t&&(n=["async",n]);let p=[":",r,n];return e?[e,p]:p});s.comment["#!"]=`
|
|
9
|
+
`;var Ae=32,_r=10,qt=59,xt=125,ae=91,de=40,er=G.asi??G[";"],bt=s._baseSpace??=s.space,ro=s._baseStep??=s.step,Ir=r=>Array.isArray(r)||typeof r=="string",eo=(G[";"]??5)+1,Or=r=>Array.isArray(r)&&(G[r[0]]<=eo||r[0]==="{}"&&Or(r[1])),to=(r,e)=>{for(;(e=c.charCodeAt(r))<=Ae;){if(e===_r)return!0;r++}return!1},oo=(r=l,e)=>{for(;r-- >0&&(e=c.charCodeAt(r))<=Ae;)if(e===_r)return!0;return!1};s.space=(r,e)=>{for(;;){for(e=l,r=bt();e<l;)if(c.charCodeAt(e++)===_r){s.newline=!0;break}if(r===qt&&to(l+1)){I(l+1),s.newline=s.semi=!0;continue}return r}};s.enter=()=>s.newline=s.semi=!1;s.exit=(r,e)=>{e===xt&&(s.newline=!0,s.semi=!1)};s.step=(r,e,t,o)=>{if(s.semi&&e>=er)return!1;if(r&&!Ir(r))return null;if(Ir(r)){let p=(t===ae||t===de)&&oo();if(s.semi||t===ae&&(p||Or(r))||t===de&&(Or(r)||p&&e>=er))return he(r,e,o)??null}let n=s.newline;return ro(r,e,t,o)??(Ir(r)&&n?he(r,e,o)??null:null)};var Rr=0,no=2e3,he=s.asi=(r,e,t,o,n)=>{if(e>=er||Rr>=no)return;s.semi=!1;let p=l;Rr++;try{o=t(er-.5)}finally{Rr--}if(!(!o||l===p))return n=o?.[0]===";"?o.slice(1):[o],r?.[0]===";"?(r.push(...n),r):[";",r,...n]};var Ce=(r,e,t,o)=>typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="()"&&r.length===2?Ce(r[1],e):(()=>{throw Error("Invalid assignment target")})(),ye={"=":(r,e,t)=>r[e]=t,"+=":(r,e,t)=>r[e]+=t,"-=":(r,e,t)=>r[e]-=t,"*=":(r,e,t)=>r[e]*=t,"/=":(r,e,t)=>r[e]/=t,"%=":(r,e,t)=>r[e]%=t,"|=":(r,e,t)=>r[e]|=t,"&=":(r,e,t)=>r[e]&=t,"^=":(r,e,t)=>r[e]^=t,">>=":(r,e,t)=>r[e]>>=t,"<<=":(r,e,t)=>r[e]<<=t};for(let r in ye)f(r,(e,t)=>(t=i(t),Ce(e,(o,n,p)=>ye[r](o,n,t(p)))));f("!",r=>(r=i(r),e=>!r(e)));f("||",(r,e)=>(r=i(r),e=i(e),t=>r(t)||e(t)));f("&&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&&e(t)));f("~",r=>(r=i(r),e=>~r(e)));f("|",(r,e)=>(r=i(r),e=i(e),t=>r(t)|e(t)));f("&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&e(t)));f("^",(r,e)=>(r=i(r),e=i(e),t=>r(t)^e(t)));f(">>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>e(t)));f("<<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<<e(t)));f(">",(r,e)=>(r=i(r),e=i(e),t=>r(t)>e(t)));f("<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<e(t)));f(">=",(r,e)=>(r=i(r),e=i(e),t=>r(t)>=e(t)));f("<=",(r,e)=>(r=i(r),e=i(e),t=>r(t)<=e(t)));f("==",(r,e)=>(r=i(r),e=i(e),t=>r(t)==e(t)));f("!=",(r,e)=>(r=i(r),e=i(e),t=>r(t)!=e(t)));f("+",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)+e(t)):(r=i(r),t=>+r(t)));f("-",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)-e(t)):(r=i(r),t=>-r(t)));f("*",(r,e)=>(r=i(r),e=i(e),t=>r(t)*e(t)));f("/",(r,e)=>(r=i(r),e=i(e),t=>r(t)/e(t)));f("%",(r,e)=>(r=i(r),e=i(e),t=>r(t)%e(t)));var Lr=(r,e,t,o)=>typeof r=="string"?n=>e(n,r):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n))):r[0]==="()"&&r.length===2?Lr(r[1],e):(()=>{throw Error("Invalid increment target")})();f("++",(r,e)=>Lr(r,e===null?(t,o)=>t[o]++:(t,o)=>++t[o]));f("--",(r,e)=>Lr(r,e===null?(t,o)=>t[o]--:(t,o)=>--t[o]));var we=(...r)=>(r=r.map(i),e=>{let t;for(let o of r)t=o(e);return t});f(",",we);f(";",we);var K=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",tr=r=>{throw Error(r)};f("[]",(r,e)=>e===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(t=>t==null?(()=>{}):t[0]==="..."?(t=i(t[1]),o=>t(o)):(t=i(t),o=>[t(o)])),t=>r.flatMap(o=>o(t))):(e==null&&tr("Missing index"),r=i(r),e=i(e),t=>{let o=e(t);return K(o)?void 0:r(t)[o]}));f(".",(r,e)=>(r=i(r),e=e[0]?e:e[1],K(e)?()=>{}:t=>r(t)[e]));f("()",(r,e)=>{if(e===void 0)return r==null?tr("Empty ()"):i(r);let t=n=>n?.[0]===","&&n.slice(1).some(p=>p==null||t(p));t(e)&&tr("Empty argument");let o=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];return Pr(r,(n,p,m)=>n[p](...o(m)))});var v=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&v(r[1])||r[0]==="{}"),Pr=(r,e,t,o)=>r==null?tr("Empty ()"):r[0]==="()"&&r.length==2?Pr(r[1],e):typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="?."?(t=i(r[1]),o=r[2],n=>{let p=t(n);return p==null?void 0:e(p,o,n)}):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="?.[]"?(t=i(r[1]),o=i(r[2]),n=>{let p=t(n);return p==null?void 0:e(p,o(n),n)}):(r=i(r),n=>e([r(n)],0,n)),D=Pr;f("===",(r,e)=>(r=i(r),e=i(e),t=>r(t)===e(t)));f("!==",(r,e)=>(r=i(r),e=i(e),t=>r(t)!==e(t)));f("??",(r,e)=>(r=i(r),e=i(e),t=>r(t)??e(t)));var io=r=>{throw Error(r)};f("**",(r,e)=>(r=i(r),e=i(e),t=>r(t)**e(t)));f("**=",(r,e)=>(v(r)||io("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]**=e(n))));f("in",(r,e)=>(r=i(r),e=i(e),t=>r(t)in e(t)));var so=r=>{throw Error(r)};f(">>>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>>e(t)));f(">>>=",(r,e)=>(v(r)||so("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]>>>=e(n))));var po=r=>r[0]?.[0]===","?r[0].slice(1):r,F=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[o,...n]=r,p=po(n);if(o==="{}"){let m=[];for(let u of p){if(Array.isArray(u)&&u[0]==="..."){let w={};for(let O in e)m.includes(O)||(w[O]=e[O]);t[u[1]]=w;break}let a,y,g;typeof u=="string"?a=y=u:u[0]==="="?(typeof u[1]=="string"?a=y=u[1]:[,a,y]=u[1],g=u[2]):[,a,y]=u,m.push(a);let E=e[a];E===void 0&&g&&(E=i(g)(t)),F(y,E,t)}}else if(o==="[]"){let m=0;for(let u of p){if(u===null){m++;continue}if(Array.isArray(u)&&u[0]==="..."){t[u[1]]=e.slice(m);break}let a=u,y;Array.isArray(u)&&u[0]==="="&&([,a,y]=u);let g=e[m++];g===void 0&&y&&(g=i(y)(t)),F(a,g,t)}}},Br=(...r)=>(r=r.map(e=>{if(typeof e=="string")return t=>{t[e]=void 0};if(e[0]==="="){let[,t,o]=e,n=i(o);return typeof t=="string"?p=>{p[t]=n(p)}:p=>F(t,n(p),p)}return i(e)}),e=>{for(let t of r)t(e)});f("let",Br);f("const",Br);f("var",Br);var or=r=>{throw Error(r)};f("=",(r,e)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let t=r[1];return e=i(e),typeof t=="string"?o=>{o[t]=e(o)}:o=>F(t,e(o),o)}return v(r)||or("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]=e(n))});f("||=",(r,e)=>(v(r)||or("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]||=e(n))));f("&&=",(r,e)=>(v(r)||or("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]&&=e(n))));f("??=",(r,e)=>(v(r)||or("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]??=e(n))));f("?",(r,e,t)=>(r=i(r),e=i(e),t=i(t),o=>r(o)?e(o):t(o)));var P=[];f("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r;let t=r?r[0]===","?r.slice(1):[r]:[],o=-1,n=null,p=t[t.length-1];Array.isArray(p)&&p[0]==="..."&&(o=t.length-1,n=p[1],t.length--);let m=e?.[0]==="{}";return e=i(m?["{",e[1]]:e),u=>(...a)=>{let y={};t.forEach((E,w)=>y[E]=a[w]),n&&(y[n]=a.slice(o));let g=new Proxy(y,{get:(E,w)=>w in E?E[w]:u?.[w],set:(E,w,O)=>((w in E?E:u)[w]=O,!0),has:(E,w)=>w in E||(u?w in u:!1)});try{let E=e(g);return m?void 0:E}catch(E){if(E===P)return E[0];throw E}}});f("...",r=>(r=i(r),e=>Object.entries(r(e))));f("?.",(r,e)=>(r=i(r),K(e)?()=>{}:t=>r(t)?.[e]));f("?.[]",(r,e)=>(r=i(r),e=i(e),t=>{let o=e(t);return K(o)?void 0:r(t)?.[o]}));f("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];if(r[0]==="?."){let n=i(r[1]),p=r[2];return K(p)?()=>{}:m=>n(m)?.[p]?.(...t(m))}if(r[0]==="?.[]"){let n=i(r[1]),p=i(r[2]);return m=>{let u=n(m),a=p(m);return K(a)?void 0:u?.[a]?.(...t(m))}}if(r[0]==="."){let n=i(r[1]),p=r[2];return K(p)?()=>{}:m=>n(m)?.[p]?.(...t(m))}if(r[0]==="[]"&&r.length===3){let n=i(r[1]),p=i(r[2]);return m=>{let u=n(m),a=p(m);return K(a)?void 0:u?.[a]?.(...t(m))}}let o=i(r);return n=>o(n)?.(...t(n))});f("typeof",r=>(r=i(r),e=>typeof r(e)));f("void",r=>(r=i(r),e=>(r(e),void 0)));f("delete",r=>{if(r[0]==="."){let e=i(r[1]),t=r[2];return o=>delete e(o)[t]}if(r[0]==="[]"){let e=i(r[1]),t=i(r[2]);return o=>delete e(o)[t(o)]}return()=>!0});f("new",r=>{let e=i(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,o=t?t[0]===","?(n=>p=>n.map(m=>m(p)))(t.slice(1).map(i)):(n=>p=>[n(p)])(i(t)):()=>[];return n=>new(e(n))(...o(n))});var nr=Symbol("accessor");f("get",(r,e)=>(e=e?i(e):()=>{},t=>[[nr,r,{get:function(){let o=Object.create(t||{});return o.this=this,e(o)}}]]));f("set",(r,e,t)=>(t=t?i(t):()=>{},o=>[[nr,r,{set:function(n){let p=Object.create(o||{});p.this=this,p[e]=n,t(p)}}]]));var fo=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);f("{}",(r,e)=>{if(e!==void 0)return;if(!fo(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(o=>i(typeof o=="string"?[":",o,o]:o));return o=>{let n={},p={};for(let m of t.flatMap(u=>u(o)))if(m[0]===nr){let[,u,a]=m;p[u]={...p[u],...a,configurable:!0,enumerable:!0}}else n[m[0]]=m[1];for(let m in p)Object.defineProperty(n,m,p[m]);return n}});f("{",r=>(r=r?i(r):()=>{},e=>r(Object.create(e))));f(":",(r,e)=>(e=i(e),Array.isArray(r)?(r=i(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));f("`",(...r)=>(r=r.map(i),e=>r.map(t=>t(e)).join("")));f("``",(r,...e)=>{r=i(r);let t=[],o=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):o.push(i(p));let n=Object.assign([...t],{raw:t});return p=>r(p)(n,...o.map(m=>m(p)))});f("function",(r,e,t)=>{t=t?i(t):()=>{};let o=e?e[0]===","?e.slice(1):[e]:[],n=null,p=-1,m=o[o.length-1];return Array.isArray(m)&&m[0]==="..."&&(p=o.length-1,n=m[1],o.length--),u=>{let a=(...y)=>{let g={};o.forEach((w,O)=>g[w]=y[O]),n&&(g[n]=y.slice(p));let E=new Proxy(g,{get:(w,O)=>O in w?w[O]:u[O],set:(w,O,Se)=>((O in w?w:u)[O]=Se,!0),has:(w,O)=>O in w||O in u});try{return t(E)}catch(w){if(w===P)return w[0];throw w}};return r&&(u[r]=a),a}});f("function*",(r,e,t)=>{throw Error("Generator functions are not supported in evaluation")});f("async",r=>{let e=i(r);return t=>{let o=e(t);return async function(...n){return o(...n)}}});f("await",r=>(r=i(r),async e=>await r(e)));f("yield",r=>(r=r?i(r):null,e=>{throw{__yield__:r?r(e):void 0}}));f("yield*",r=>(r=i(r),e=>{throw{__yield_all__:r(e)}}));var lo=Symbol("static"),uo=r=>{throw Error(r)};f("instanceof",(r,e)=>(r=i(r),e=i(e),t=>r(t)instanceof e(t)));f("class",(r,e,t)=>(e=e?i(e):null,t=t?i(t):null,o=>{let n=e?e(o):Object,p=function(...m){if(!(this instanceof p))return uo("Class constructor must be called with new");let u=e?Reflect.construct(n,m,p):this;return p.prototype.__constructor__&&p.prototype.__constructor__.apply(u,m),u};if(Object.setPrototypeOf(p.prototype,n.prototype),Object.setPrototypeOf(p,n),t){let m=Object.create(o);m.super=n;let u=t(m),a=Array.isArray(u)&&typeof u[0]?.[0]=="string"?u:[];for(let[y,g]of a)y==="constructor"?p.prototype.__constructor__=g:p.prototype[y]=g}return r&&(o[r]=p),p}));f("static",r=>(r=i(r),e=>[[lo,r(e)]]));f("//",(r,e)=>{let t=new RegExp(r,e||"");return()=>t});f("if",(r,e,t)=>(r=i(r),e=i(e),t=t!==void 0?i(t):null,o=>r(o)?e(o):t?.(o)));var M=Symbol("break"),H=Symbol("continue");f("while",(r,e)=>(r=i(r),e=i(e),t=>{let o;for(;r(t);)try{o=e(t)}catch(n){if(n===M)break;if(n===H)continue;if(n===P)return n[0];throw n}return o}));f("do",(r,e)=>(r=i(r),e=i(e),t=>{let o;do try{o=r(t)}catch(n){if(n===M)break;if(n===H)continue;if(n===P)return n[0];throw n}while(e(t));return o}));f("for",(r,e)=>{if(Array.isArray(r)&&r[0]===";"){let[,t,o,n]=r;return t=t?i(t):null,o=o?i(o):()=>!0,n=n?i(n):null,e=i(e),p=>{let m;for(t?.(p);o(p);n?.(p))try{m=e(p)}catch(u){if(u===M)break;if(u===H)continue;if(u===P)return u[0];throw u}return m}}if(Array.isArray(r)&&(r[0]==="in"||r[0]==="of")){let[t,o,n]=r;if(Array.isArray(o)&&(o[0]==="let"||o[0]==="const"||o[0]==="var")&&(o=o[1]),t==="in")return co(o,n,e);if(t==="of")return mo(o,n,e)}});var mo=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,m=o?null:n[r];for(let u of e(n)){o?F(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===M)break;if(a===H)continue;if(a===P)return a[0];throw a}}return o||(n[r]=m),p}},co=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,m=o?null:n[r];for(let u in e(n)){o?F(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===M)break;if(a===H)continue;if(a===P)return a[0];throw a}}return o||(n[r]=m),p}};f("break",()=>()=>{throw M});f("continue",()=>()=>{throw H});f("return",r=>(r=r!==void 0?i(r):null,e=>{throw P[0]=r?.(e),P}));f("try",(r,...e)=>{r=r?i(r):null;let t=e.find(u=>u?.[0]==="catch"),o=e.find(u=>u?.[0]==="finally"),n=t?.[1],p=t?.[2]?i(t[2]):null,m=o?.[1]?i(o[1]):null;return u=>{let a;try{a=r?.(u)}catch(y){if(y===M||y===H||y===P)throw y;if(n!=null&&p){let g=n in u,E=u[n];u[n]=y;try{a=p(u)}finally{g?u[n]=E:delete u[n]}}else if(!p)throw y}finally{m?.(u)}return a}});f("throw",r=>(r=i(r),e=>{throw r(e)}));f("switch",(r,...e)=>(r=i(r),e.length?(e=e.map(t=>[t[0]==="case"?i(t[1]):null,(t[0]==="case"?t[2]:t[1])?.[0]===";"?(t[0]==="case"?t[2]:t[1]).slice(1).map(i):(t[0]==="case"?t[2]:t[1])?[i(t[0]==="case"?t[2]:t[1])]:[]]),t=>{let o=r(t),n=!1,p;for(let[u,a]of e)if(n||u===null||u(t)===o)for(n=!0,m=0;m<a.length;m++)try{p=a[m](t)}catch(y){if(y===M)return p;throw y}var m;return p}):t=>r(t)));f("import",()=>()=>{});f("export",()=>()=>{});f("from",(r,e)=>()=>{});f("as",(r,e)=>()=>{});f("default",r=>i(r));var ge=new WeakMap,ao=(r,...e)=>typeof r=="string"?i(s(r)):ge.get(r)||ge.set(r,ho(r,e)).get(r),Ee=57344,ho=(r,e)=>{let t=r.reduce((p,m,u)=>p+(u?String.fromCharCode(Ee+u-1):"")+m,""),o=s(t),n=p=>{if(typeof p=="string"&&p.length===1){let m=p.charCodeAt(0)-Ee,u;if(m>=0&&m<e.length)return u=e[m],Ao(u)?u:[,u]}return Array.isArray(p)?p.map(n):p};return i(n(o))},Ao=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),yo=ao;export{pr as access,A as binary,i as compile,c as cur,yo as default,R as err,d as expr,J as group,Co as id,l as idx,C as keyword,Q as literal,vr as loc,N as lookup,Mr as member,sr as nary,k as next,f as operator,ir as operators,L as parens,s as parse,z as peek,G as prec,fr as propName,I as seek,h as skip,S as token,_ as unary,T as word};
|
package/justin.min.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var u,l,d=r=>(u=0,l=r,d.enter?.(),r=C(),l[u]?N():r||""),N=(r="Unexpected token",t=u,e=l.slice(0,t).split(`
|
|
2
2
|
`),o=e.pop(),i=l.slice(Math.max(0,t-40),t),s="\u032D",m=(l[t]||" ")+s,f=l.slice(t+1,t+20))=>{throw SyntaxError(`${r} at ${e.length+1}:${o.length+1}
|
|
3
3
|
${l[t-41]!==`
|
|
4
|
-
`,""+i}${m}${f}`)},sr=(r,t=u)=>(Array.isArray(r)&&(r.loc=t),r),L=(r,t=u,e)=>{for(;e=r(l.charCodeAt(u));)u+=e;return l.slice(t,u)},y=(r=1)=>l[u+=r],
|
|
5
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},gr=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,Cr=r=>(t,e,o="",i=String.fromCharCode(r))=>{if(t||!d.string?.[i])return;y();let s=()=>{let m=l.charCodeAt(u+1);if(m===hr)return 2;if(m===zr)return l.charCodeAt(u+2)===hr?3:2;if(m===Ar||m===dr&&l.charCodeAt(u+2)!==Kr){let f=m===Ar?2:4,A=0,h;for(let S=0;S<f;S++){if((h=gr(l.charCodeAt(u+2+S)))<0)return o+=l[u+1],2;A=A*16+h}return o+=String.fromCharCode(A),2+f}if(m===dr){let f=0,A=u+3,h;for(;(h=gr(l.charCodeAt(A)))>=0;)f=f*16+h,A++;return A>u+3&&f<=1114111&&l.charCodeAt(A)===Wr?(o+=String.fromCodePoint(f),A-u+1):(o+=l[u+1],2)}return o+=Jr[l[u+1]]||l[u+1],2};return L(m=>m-r&&(m!==jr?(o+=l[u],1):s())),l[u]===i?y():N("Bad string"),[,o]};w[lr]=Cr(lr);w[cr]=Cr(cr);d.string={'"':!0};var Vr=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>c(r,Vr,!0));var Yr=30,Zr=40,qr=140;k("!",qr);c("||",Yr);c("&&",Zr);var xr=50,br=60,rt=70,yr=100,tt=140;c("|",xr);c("&",rt);c("^",br);c(">>",yr);c("<<",yr);k("~",tt);var
|
|
4
|
+
`,""+i}${m}${f}`)},sr=(r,t=u)=>(Array.isArray(r)&&(r.loc=t),r),L=(r,t=u,e)=>{for(;e=r(l.charCodeAt(u));)u+=e;return l.slice(t,u)},y=(r=1)=>l[u+=r],M=r=>u=r,C=(r=0,t)=>{let e,o,i;for(t&&d.enter?.(r,t);(e=d.space())&&e!==t&&(i=d.step(o,r,e,C));)o=i;return t&&(e==t?(u++,d.exit?.(r,t)):N("Unclosed "+String.fromCharCode(t-(t>42?2:1)))),o},W=(r=u)=>{for(;l.charCodeAt(r)<=32;)r++;return l.charCodeAt(r)},at=d.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,pr=(r,t=r.length)=>l.substr(u,t)===r&&!d.id(l.charCodeAt(u+t)),Mt=()=>(y(),C(0,41)),w=[],j={},I=(r,t=32,e,o=r.charCodeAt(0),i=r.length,s=w[o],m=r.toUpperCase()!==r,f,A)=>(t=j[r]=!s&&j[r]||t,w[o]=(h,S,g,E=u)=>(f=g,(g?r==g:(i<2||r.charCodeAt(1)===l.charCodeAt(u+1)&&(i<3||l.substr(u,i)==r))&&(!m||!d.id(l.charCodeAt(u+i)))&&(f=g=r))&&S<t&&(u+=i,(A=e(h))?sr(A,E):(u=E,f=0,!m&&!s&&!h&&N()),A)||s?.(h,S,f))),c=(r,t,e=!1)=>I(r,t,o=>o&&(i=>i&&[r,o,i])(C(t-(e?.5:0)))),k=(r,t,e)=>I(r,t,o=>e?o&&[r,o]:!o&&(o=C(t-.5))&&[r,o]),P=(r,t)=>I(r,200,e=>!e&&[,t]),z=(r,t,e,o)=>I(r,t,(i,s,m=i)=>(s=C(t-(e?.5:0)),i?.[0]!==r&&(i=[r,i||null]),s?.[0]===r?i.push(...s.slice(1)):s?i.push(s):o||W()===r.charCodeAt(0)?i.push(null):m&&i.length===2&&(i=i[1]),i)),B=(r,t)=>I(r[0],t,e=>!e&&[r,C(0,r.charCodeAt(1))||null]),J=(r,t)=>I(r[0],t,e=>e&&[r,e,C(0,r.charCodeAt(1))||null]),V=(r,t)=>(d.space(),t=l.charCodeAt(u),d.id(t)&&(t<48||t>57)?L(d.id):C(r)),mr=(r,t)=>I(r,t,e=>e&&(o=>o&&[r,e,o])(V(t))),D=(r,t,e,o=r.charCodeAt(0),i=r.length,s=w[o],m)=>(j[r]??=t,w[o]=(f,A,h,S=u)=>!f&&(h?r==h:(i<2||l.substr(u,i)==r)&&(h=r))&&A<t&&!d.id(l.charCodeAt(u+i))&&(!d.prop||d.prop(u+i))&&(M(u+i),(m=e())?sr(m,S):M(S),m)||s?.(f,A,h));d.space=r=>{for(;(r=l.charCodeAt(u))<=32;)u++;return r};d.step=(r,t,e,o,i)=>(i=w[e])&&i(r,t)||(r?null:L(d.id)||null);var K={},p=(r,t,e=K[r])=>K[r]=(...o)=>t(...o)||e?.(...o),n=r=>Array.isArray(r)?r[0]==null?(t=>()=>t)(r[1]):K[r[0]]?.(...r.slice(1))??N(`Unknown operator: ${r[0]}`,r?.loc):r===void 0?()=>{}:t=>t?.[r];var Y=46,U=48,T=57,ar=69,Mr=101,Dr=43,Fr=45,F=95,fr=110,Gr=97,Xr=102,$r=65,Qr=70,ur=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),Z=r=>{let t=ur(L(e=>e===Y&&(e=l.charCodeAt(u+1))!==Y&&!(d.id(e)&&e>T)||e>=U&&e<=T||e===F||((e===ar||e===Mr)&&((e=l.charCodeAt(u+1))>=U&&e<=T||e===Dr||e===Fr)?2:0)));return l.charCodeAt(u)===fr?(y(),[,BigInt(t)]):(r=+t)!=r?N():[,r]},Hr={2:r=>r===48||r===49||r===F,8:r=>r>=48&&r<=55||r===F,16:r=>r>=U&&r<=T||r>=Gr&&r<=Xr||r>=$r&&r<=Qr||r===F};d.number=null;w[Y]=r=>!r&&l.charCodeAt(u+1)>=U&&l.charCodeAt(u+1)<=T&&Z();for(let r=U;r<=T;r++)w[r]=t=>t?void 0:Z();w[U]=r=>{if(r)return;let t=d.number;if(t){for(let[e,o]of Object.entries(t))if(e[0]==="0"&&l[u+1]?.toLowerCase()===e[1]){y(2);let i=ur(L(Hr[o]));return l.charCodeAt(u)===fr?(y(),[,BigInt("0"+e[1]+i)]):[,parseInt(i,o)]}}return Z()};var jr=92,lr=34,cr=39,dr=117,Ar=120,Kr=123,Wr=125,hr=10,zr=13,Jr={n:`
|
|
5
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},gr=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,Cr=r=>(t,e,o="",i=String.fromCharCode(r))=>{if(t||!d.string?.[i])return;y();let s=()=>{let m=l.charCodeAt(u+1);if(m===hr)return 2;if(m===zr)return l.charCodeAt(u+2)===hr?3:2;if(m===Ar||m===dr&&l.charCodeAt(u+2)!==Kr){let f=m===Ar?2:4,A=0,h;for(let S=0;S<f;S++){if((h=gr(l.charCodeAt(u+2+S)))<0)return o+=l[u+1],2;A=A*16+h}return o+=String.fromCharCode(A),2+f}if(m===dr){let f=0,A=u+3,h;for(;(h=gr(l.charCodeAt(A)))>=0;)f=f*16+h,A++;return A>u+3&&f<=1114111&&l.charCodeAt(A)===Wr?(o+=String.fromCodePoint(f),A-u+1):(o+=l[u+1],2)}return o+=Jr[l[u+1]]||l[u+1],2};return L(m=>m-r&&(m!==jr?(o+=l[u],1):s())),l[u]===i?y():N("Bad string"),[,o]};w[lr]=Cr(lr);w[cr]=Cr(cr);d.string={'"':!0};var Vr=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>c(r,Vr,!0));var Yr=30,Zr=40,qr=140;k("!",qr);c("||",Yr);c("&&",Zr);var xr=50,br=60,rt=70,yr=100,tt=140;c("|",xr);c("&",rt);c("^",br);c(">>",yr);c("<<",yr);k("~",tt);var G=90;c("<",G);c(">",G);c("<=",G);c(">=",G);var Sr=80;c("==",Sr);c("!=",Sr);var Er=110,q=120,wr=140;c("+",Er);c("-",Er);c("*",q);c("/",q);c("%",q);k("+",wr);k("-",wr);var X=150;I("++",X,r=>r?["++",r,null]:["++",C(X-1)]);I("--",X,r=>r?["--",r,null]:["--",C(X-1)]);var et=5,ot=10;z(",",ot);z(";",et,!0,!0);var nt=170;B("()",nt);var Ir=170,it=160;J("[]",Ir);mr(".",Ir);J("()",it);var st=32,pt=d.space;d.comment??={"//":`
|
|
6
6
|
`,"/*":"*/"};var x;d.space=()=>{x||(x=Object.entries(d.comment).map(([i,s])=>[i,s,i.charCodeAt(0)]));for(var r;r=pt();){for(var t=0,e;e=x[t++];)if(r===e[2]&&l.substr(u,e[0].length)===e[0]){var o=u+e[0].length;if(e[1]===`
|
|
7
|
-
`)for(;l.charCodeAt(o)>=st;)o++;else{for(;l[o]&&l.substr(o,e[1].length)!==e[1];)o++;l[o]&&(o+=e[1].length)}
|
|
8
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},Rr=()=>{let r=[],t="",e;for(;(e=l.charCodeAt(u))!==er;)e?e===wt?(y(),t+=It[l[u]]||l[u],y()):e===St&&l.charCodeAt(u+1)===Et?(r.push([,t]),t="",y(2),r.push(C(0,125))):(t+=l[u],y()):N("Unterminated template");return r.push([,t]),y(),r},kt=r=>r.length<2&&r[0]?.[0]===void 0?r[0]||[,""]:["`",...r],Nt=w[er];w[er]=(r,t)=>r&&t<yt?d.asi&&d.newline?void 0:(y(),["``",r,...Rr()]):r?Nt?.(r,t):(y(),kt(Rr()));d.string["'"]=!0;d.number={"0x":16,"0b":2,"0o":8};var Tr=(r,t,e,o)=>typeof r=="string"?i=>t(i,r,i):r[0]==="."?(e=n(r[1]),o=r[2],i=>t(e(i),o,i)):r[0]==="[]"&&r.length===3?(e=n(r[1]),o=n(r[2]),i=>t(e(i),o(i),i)):r[0]==="()"&&r.length===2?Tr(r[1],t):(()=>{throw Error("Invalid assignment target")})(),Pr={"=":(r,t,e)=>r[t]=e,"+=":(r,t,e)=>r[t]+=e,"-=":(r,t,e)=>r[t]-=e,"*=":(r,t,e)=>r[t]*=e,"/=":(r,t,e)=>r[t]/=e,"%=":(r,t,e)=>r[t]%=e,"|=":(r,t,e)=>r[t]|=e,"&=":(r,t,e)=>r[t]&=e,"^=":(r,t,e)=>r[t]^=e,">>=":(r,t,e)=>r[t]>>=e,"<<=":(r,t,e)=>r[t]<<=e};for(let r in Pr)p(r,(t,e)=>(e=n(e),Tr(t,(o,i,s)=>Pr[r](o,i,e(s)))));p("!",r=>(r=n(r),t=>!r(t)));p("||",(r,t)=>(r=n(r),t=n(t),e=>r(e)||t(e)));p("&&",(r,t)=>(r=n(r),t=n(t),e=>r(e)&&t(e)));p("~",r=>(r=n(r),t=>~r(t)));p("|",(r,t)=>(r=n(r),t=n(t),e=>r(e)|t(e)));p("&",(r,t)=>(r=n(r),t=n(t),e=>r(e)&t(e)));p("^",(r,t)=>(r=n(r),t=n(t),e=>r(e)^t(e)));p(">>",(r,t)=>(r=n(r),t=n(t),e=>r(e)>>t(e)));p("<<",(r,t)=>(r=n(r),t=n(t),e=>r(e)<<t(e)));p(">",(r,t)=>(r=n(r),t=n(t),e=>r(e)>t(e)));p("<",(r,t)=>(r=n(r),t=n(t),e=>r(e)<t(e)));p(">=",(r,t)=>(r=n(r),t=n(t),e=>r(e)>=t(e)));p("<=",(r,t)=>(r=n(r),t=n(t),e=>r(e)<=t(e)));p("==",(r,t)=>(r=n(r),t=n(t),e=>r(e)==t(e)));p("!=",(r,t)=>(r=n(r),t=n(t),e=>r(e)!=t(e)));p("+",(r,t)=>t!==void 0?(r=n(r),t=n(t),e=>r(e)+t(e)):(r=n(r),e=>+r(e)));p("-",(r,t)=>t!==void 0?(r=n(r),t=n(t),e=>r(e)-t(e)):(r=n(r),e=>-r(e)));p("*",(r,t)=>(r=n(r),t=n(t),e=>r(e)*t(e)));p("/",(r,t)=>(r=n(r),t=n(t),e=>r(e)/t(e)));p("%",(r,t)=>(r=n(r),t=n(t),e=>r(e)%t(e)));var or=(r,t,e,o)=>typeof r=="string"?i=>t(i,r):r[0]==="."?(e=n(r[1]),o=r[2],i=>t(e(i),o)):r[0]==="[]"&&r.length===3?(e=n(r[1]),o=n(r[2]),i=>t(e(i),o(i))):r[0]==="()"&&r.length===2?or(r[1],t):(()=>{throw Error("Invalid increment target")})();p("++",(r,t)=>or(r,t===null?(e,o)=>e[o]++:(e,o)=>++e[o]));p("--",(r,t)=>or(r,t===null?(e,o)=>e[o]--:(e,o)=>--e[o]));var Ur=(...r)=>(r=r.map(n),t=>{let e;for(let o of r)e=o(t);return e});p(",",Ur);p(";",Ur);var O=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype"
|
|
7
|
+
`)for(;l.charCodeAt(o)>=st;)o++;else{for(;l[o]&&l.substr(o,e[1].length)!==e[1];)o++;l[o]&&(o+=e[1].length)}M(o),r=0;break}if(r)return r}return r};var kr=80;c("===",kr);c("!==",kr);var mt=30;c("??",mt);var ft=130,ut=20;c("**",ft,!0);c("**=",ut,!0);var Nr=90;c("in",Nr);c("of",Nr);var lt=20,ct=100;c(">>>",ct);c(">>>=",lt,!0);var b=20;c("||=",b,!0);c("&&=",b,!0);c("??=",b,!0);P("true",!0);P("false",!1);P("null",null);D("undefined",200,()=>[]);P("NaN",NaN);P("Infinity",1/0);var rr=20;I("?",rr,(r,t,e)=>r&&(t=C(rr-1))&&L(o=>o===58)&&(e=C(rr-1),["?",r,t,e]));var dt=20;c("=>",dt,!0);var At=20;k("...",At);var vr=170;I("?.",vr,(r,t)=>{if(!r)return;let e=d.space();return e===40?(y(),["?.()",r,C(0,41)||null]):e===91?(y(),["?.[]",r,C(0,93)]):(t=V(vr),t?["?.",r,t]:void 0)});var tr=140,Lr=160,ht=Lr+1;k("typeof",tr);k("void",tr);k("delete",tr);var gt=r=>d.space()===40?(y(),["()",r,C(0,41)||null]):r;D("new",ht,()=>pr(".target")?(y(7),["new.target"]):["new",gt(C(Lr))]);var Ct=20,Or=200;d.prop=r=>W(r)!==58;B("[]",Or);B("{}",Or);c(":",Ct-1,!0);var yt=170,er=96,St=36,Et=123,wt=92,It={n:`
|
|
8
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},Rr=()=>{let r=[],t="",e;for(;(e=l.charCodeAt(u))!==er;)e?e===wt?(y(),t+=It[l[u]]||l[u],y()):e===St&&l.charCodeAt(u+1)===Et?(r.push([,t]),t="",y(2),r.push(C(0,125))):(t+=l[u],y()):N("Unterminated template");return r.push([,t]),y(),r},kt=r=>r.length<2&&r[0]?.[0]===void 0?r[0]||[,""]:["`",...r],Nt=w[er];w[er]=(r,t)=>r&&t<yt?d.asi&&d.newline?void 0:(y(),["``",r,...Rr()]):r?Nt?.(r,t):(y(),kt(Rr()));d.string["'"]=!0;d.number={"0x":16,"0b":2,"0o":8};var Tr=(r,t,e,o)=>typeof r=="string"?i=>t(i,r,i):r[0]==="."?(e=n(r[1]),o=r[2],i=>t(e(i),o,i)):r[0]==="[]"&&r.length===3?(e=n(r[1]),o=n(r[2]),i=>t(e(i),o(i),i)):r[0]==="()"&&r.length===2?Tr(r[1],t):(()=>{throw Error("Invalid assignment target")})(),Pr={"=":(r,t,e)=>r[t]=e,"+=":(r,t,e)=>r[t]+=e,"-=":(r,t,e)=>r[t]-=e,"*=":(r,t,e)=>r[t]*=e,"/=":(r,t,e)=>r[t]/=e,"%=":(r,t,e)=>r[t]%=e,"|=":(r,t,e)=>r[t]|=e,"&=":(r,t,e)=>r[t]&=e,"^=":(r,t,e)=>r[t]^=e,">>=":(r,t,e)=>r[t]>>=e,"<<=":(r,t,e)=>r[t]<<=e};for(let r in Pr)p(r,(t,e)=>(e=n(e),Tr(t,(o,i,s)=>Pr[r](o,i,e(s)))));p("!",r=>(r=n(r),t=>!r(t)));p("||",(r,t)=>(r=n(r),t=n(t),e=>r(e)||t(e)));p("&&",(r,t)=>(r=n(r),t=n(t),e=>r(e)&&t(e)));p("~",r=>(r=n(r),t=>~r(t)));p("|",(r,t)=>(r=n(r),t=n(t),e=>r(e)|t(e)));p("&",(r,t)=>(r=n(r),t=n(t),e=>r(e)&t(e)));p("^",(r,t)=>(r=n(r),t=n(t),e=>r(e)^t(e)));p(">>",(r,t)=>(r=n(r),t=n(t),e=>r(e)>>t(e)));p("<<",(r,t)=>(r=n(r),t=n(t),e=>r(e)<<t(e)));p(">",(r,t)=>(r=n(r),t=n(t),e=>r(e)>t(e)));p("<",(r,t)=>(r=n(r),t=n(t),e=>r(e)<t(e)));p(">=",(r,t)=>(r=n(r),t=n(t),e=>r(e)>=t(e)));p("<=",(r,t)=>(r=n(r),t=n(t),e=>r(e)<=t(e)));p("==",(r,t)=>(r=n(r),t=n(t),e=>r(e)==t(e)));p("!=",(r,t)=>(r=n(r),t=n(t),e=>r(e)!=t(e)));p("+",(r,t)=>t!==void 0?(r=n(r),t=n(t),e=>r(e)+t(e)):(r=n(r),e=>+r(e)));p("-",(r,t)=>t!==void 0?(r=n(r),t=n(t),e=>r(e)-t(e)):(r=n(r),e=>-r(e)));p("*",(r,t)=>(r=n(r),t=n(t),e=>r(e)*t(e)));p("/",(r,t)=>(r=n(r),t=n(t),e=>r(e)/t(e)));p("%",(r,t)=>(r=n(r),t=n(t),e=>r(e)%t(e)));var or=(r,t,e,o)=>typeof r=="string"?i=>t(i,r):r[0]==="."?(e=n(r[1]),o=r[2],i=>t(e(i),o)):r[0]==="[]"&&r.length===3?(e=n(r[1]),o=n(r[2]),i=>t(e(i),o(i))):r[0]==="()"&&r.length===2?or(r[1],t):(()=>{throw Error("Invalid increment target")})();p("++",(r,t)=>or(r,t===null?(e,o)=>e[o]++:(e,o)=>++e[o]));p("--",(r,t)=>or(r,t===null?(e,o)=>e[o]--:(e,o)=>--e[o]));var Ur=(...r)=>(r=r.map(n),t=>{let e;for(let o of r)e=o(t);return e});p(",",Ur);p(";",Ur);var O=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",$=r=>{throw Error(r)};p("[]",(r,t)=>t===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(e=>e==null?(()=>{}):e[0]==="..."?(e=n(e[1]),o=>e(o)):(e=n(e),o=>[e(o)])),e=>r.flatMap(o=>o(e))):(t==null&&$("Missing index"),r=n(r),t=n(t),e=>{let o=t(e);return O(o)?void 0:r(e)[o]}));p(".",(r,t)=>(r=n(r),t=t[0]?t:t[1],O(t)?()=>{}:e=>r(e)[t]));p("()",(r,t)=>{if(t===void 0)return r==null?$("Empty ()"):n(r);let e=i=>i?.[0]===","&&i.slice(1).some(s=>s==null||e(s));e(t)&&$("Empty argument");let o=t?t[0]===","?(t=t.slice(1).map(n),i=>t.map(s=>s(i))):(t=n(t),i=>[t(i)]):()=>[];return nr(r,(i,s,m)=>i[s](...o(m)))});var v=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&v(r[1])||r[0]==="{}"),nr=(r,t,e,o)=>r==null?$("Empty ()"):r[0]==="()"&&r.length==2?nr(r[1],t):typeof r=="string"?i=>t(i,r,i):r[0]==="."?(e=n(r[1]),o=r[2],i=>t(e(i),o,i)):r[0]==="?."?(e=n(r[1]),o=r[2],i=>{let s=e(i);return s==null?void 0:t(s,o,i)}):r[0]==="[]"&&r.length===3?(e=n(r[1]),o=n(r[2]),i=>t(e(i),o(i),i)):r[0]==="?.[]"?(e=n(r[1]),o=n(r[2]),i=>{let s=e(i);return s==null?void 0:t(s,o(i),i)}):(r=n(r),i=>t([r(i)],0,i)),R=nr;p("===",(r,t)=>(r=n(r),t=n(t),e=>r(e)===t(e)));p("!==",(r,t)=>(r=n(r),t=n(t),e=>r(e)!==t(e)));p("??",(r,t)=>(r=n(r),t=n(t),e=>r(e)??t(e)));var vt=r=>{throw Error(r)};p("**",(r,t)=>(r=n(r),t=n(t),e=>r(e)**t(e)));p("**=",(r,t)=>(v(r)||vt("Invalid assignment target"),t=n(t),R(r,(e,o,i)=>e[o]**=t(i))));p("in",(r,t)=>(r=n(r),t=n(t),e=>r(e)in t(e)));var Lt=r=>{throw Error(r)};p(">>>",(r,t)=>(r=n(r),t=n(t),e=>r(e)>>>t(e)));p(">>>=",(r,t)=>(v(r)||Lt("Invalid assignment target"),t=n(t),R(r,(e,o,i)=>e[o]>>>=t(i))));var Ot=r=>r[0]?.[0]===","?r[0].slice(1):r,a=(r,t,e)=>{if(typeof r=="string"){e[r]=t;return}let[o,...i]=r,s=Ot(i);if(o==="{}"){let m=[];for(let f of s){if(Array.isArray(f)&&f[0]==="..."){let E={};for(let _ in t)m.includes(_)||(E[_]=t[_]);e[f[1]]=E;break}let A,h,S;typeof f=="string"?A=h=f:f[0]==="="?(typeof f[1]=="string"?A=h=f[1]:[,A,h]=f[1],S=f[2]):[,A,h]=f,m.push(A);let g=t[A];g===void 0&&S&&(g=n(S)(e)),a(h,g,e)}}else if(o==="[]"){let m=0;for(let f of s){if(f===null){m++;continue}if(Array.isArray(f)&&f[0]==="..."){e[f[1]]=t.slice(m);break}let A=f,h;Array.isArray(f)&&f[0]==="="&&([,A,h]=f);let S=t[m++];S===void 0&&h&&(S=n(h)(e)),a(A,S,e)}}},ir=(...r)=>(r=r.map(t=>{if(typeof t=="string")return e=>{e[t]=void 0};if(t[0]==="="){let[,e,o]=t,i=n(o);return typeof e=="string"?s=>{s[e]=i(s)}:s=>a(e,i(s),s)}return n(t)}),t=>{for(let e of r)e(t)});p("let",ir);p("const",ir);p("var",ir);var Q=r=>{throw Error(r)};p("=",(r,t)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let e=r[1];return t=n(t),typeof e=="string"?o=>{o[e]=t(o)}:o=>a(e,t(o),o)}return v(r)||Q("Invalid assignment target"),t=n(t),R(r,(e,o,i)=>e[o]=t(i))});p("||=",(r,t)=>(v(r)||Q("Invalid assignment target"),t=n(t),R(r,(e,o,i)=>e[o]||=t(i))));p("&&=",(r,t)=>(v(r)||Q("Invalid assignment target"),t=n(t),R(r,(e,o,i)=>e[o]&&=t(i))));p("??=",(r,t)=>(v(r)||Q("Invalid assignment target"),t=n(t),R(r,(e,o,i)=>e[o]??=t(i))));p("?",(r,t,e)=>(r=n(r),t=n(t),e=n(e),o=>r(o)?t(o):e(o)));var Rt=[];p("=>",(r,t)=>{r=r?.[0]==="()"?r[1]:r;let e=r?r[0]===","?r.slice(1):[r]:[],o=-1,i=null,s=e[e.length-1];Array.isArray(s)&&s[0]==="..."&&(o=e.length-1,i=s[1],e.length--);let m=t?.[0]==="{}";return t=n(m?["{",t[1]]:t),f=>(...A)=>{let h={};e.forEach((g,E)=>h[g]=A[E]),i&&(h[i]=A.slice(o));let S=new Proxy(h,{get:(g,E)=>E in g?g[E]:f?.[E],set:(g,E,_)=>((E in g?g:f)[E]=_,!0),has:(g,E)=>E in g||(f?E in f:!1)});try{let g=t(S);return m?void 0:g}catch(g){if(g===Rt)return g[0];throw g}}});p("...",r=>(r=n(r),t=>Object.entries(r(t))));p("?.",(r,t)=>(r=n(r),O(t)?()=>{}:e=>r(e)?.[t]));p("?.[]",(r,t)=>(r=n(r),t=n(t),e=>{let o=t(e);return O(o)?void 0:r(e)?.[o]}));p("?.()",(r,t)=>{let e=t?t[0]===","?(t=t.slice(1).map(n),i=>t.map(s=>s(i))):(t=n(t),i=>[t(i)]):()=>[];if(r[0]==="?."){let i=n(r[1]),s=r[2];return O(s)?()=>{}:m=>i(m)?.[s]?.(...e(m))}if(r[0]==="?.[]"){let i=n(r[1]),s=n(r[2]);return m=>{let f=i(m),A=s(m);return O(A)?void 0:f?.[A]?.(...e(m))}}if(r[0]==="."){let i=n(r[1]),s=r[2];return O(s)?()=>{}:m=>i(m)?.[s]?.(...e(m))}if(r[0]==="[]"&&r.length===3){let i=n(r[1]),s=n(r[2]);return m=>{let f=i(m),A=s(m);return O(A)?void 0:f?.[A]?.(...e(m))}}let o=n(r);return i=>o(i)?.(...e(i))});p("typeof",r=>(r=n(r),t=>typeof r(t)));p("void",r=>(r=n(r),t=>(r(t),void 0)));p("delete",r=>{if(r[0]==="."){let t=n(r[1]),e=r[2];return o=>delete t(o)[e]}if(r[0]==="[]"){let t=n(r[1]),e=n(r[2]);return o=>delete t(o)[e(o)]}return()=>!0});p("new",r=>{let t=n(r?.[0]==="()"?r[1]:r),e=r?.[0]==="()"?r[2]:null,o=e?e[0]===","?(i=>s=>i.map(m=>m(s)))(e.slice(1).map(n)):(i=>s=>[i(s)])(n(e)):()=>[];return i=>new(t(i))(...o(i))});var H=Symbol("accessor");p("get",(r,t)=>(t=t?n(t):()=>{},e=>[[H,r,{get:function(){let o=Object.create(e||{});return o.this=this,t(o)}}]]));p("set",(r,t,e)=>(e=e?n(e):()=>{},o=>[[H,r,{set:function(i){let s=Object.create(o||{});s.this=this,s[t]=i,e(s)}}]]));var Pt=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);p("{}",(r,t)=>{if(t!==void 0)return;if(!Pt(r))return n(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let e=r.map(o=>n(typeof o=="string"?[":",o,o]:o));return o=>{let i={},s={};for(let m of e.flatMap(f=>f(o)))if(m[0]===H){let[,f,A]=m;s[f]={...s[f],...A,configurable:!0,enumerable:!0}}else i[m[0]]=m[1];for(let m in s)Object.defineProperty(i,m,s[m]);return i}});p("{",r=>(r=r?n(r):()=>{},t=>r(Object.create(t))));p(":",(r,t)=>(t=n(t),Array.isArray(r)?(r=n(r),e=>[[r(e),t(e)]]):e=>[[r,t(e)]]));p("`",(...r)=>(r=r.map(n),t=>r.map(e=>e(t)).join("")));p("``",(r,...t)=>{r=n(r);let e=[],o=[];for(let s of t)Array.isArray(s)&&s[0]===void 0?e.push(s[1]):o.push(n(s));let i=Object.assign([...e],{raw:e});return s=>r(s)(i,...o.map(m=>m(s)))});var _r=new WeakMap,Tt=(r,...t)=>typeof r=="string"?n(d(r)):_r.get(r)||_r.set(r,Ut(r,t)).get(r),Br=57344,Ut=(r,t)=>{let e=r.reduce((s,m,f)=>s+(f?String.fromCharCode(Br+f-1):"")+m,""),o=d(e),i=s=>{if(typeof s=="string"&&s.length===1){let m=s.charCodeAt(0)-Br,f;if(m>=0&&m<t.length)return f=t[m],_t(f)?f:[,f]}return Array.isArray(s)?s.map(i):s};return n(i(o))},_t=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Bt=Tt;export{J as access,c as binary,n as compile,l as cur,Bt as default,N as err,C as expr,B as group,at as id,u as idx,D as keyword,P as literal,sr as loc,w as lookup,mr as member,z as nary,L as next,p as operator,K as operators,Mt as parens,d as parse,W as peek,j as prec,V as propName,M as seek,y as skip,I as token,k as unary,pr as word};
|
package/package.json
CHANGED
package/subscript.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var s,p,f=r=>(s=0,p=r,f.enter?.(),r=g(),p[s]?S():r||""),S=(r="Unexpected token",t=s,e=p.slice(0,t).split(`
|
|
2
2
|
`),n=e.pop(),o=p.slice(Math.max(0,t-40),t),m="\u032D",u=(p[t]||" ")+m,d=p.slice(t+1,t+20))=>{throw SyntaxError(`${r} at ${e.length+1}:${n.length+1}
|
|
3
3
|
${p[t-41]!==`
|
|
4
|
-
`,""+o}${u}${d}`)},G=(r,t=s)=>(Array.isArray(r)&&(r.loc=t),r),_=(r,t=s,e)=>{for(;e=r(p.charCodeAt(s));)s+=e;return p.slice(t,s)},w=(r=1)=>p[s+=r],v=r=>s=r,g=(r=0,t)=>{let e,n,o;for(t&&f.enter?.(r,t);(e=f.space())&&e!==t&&(o=f.step(n,r,e,g));)n=o;return t&&(e==t?(s++,f.exit?.(r,t)):S("Unclosed "+String.fromCharCode(t-(t>42?2:1)))),n},fr=(r=s)=>{for(;p.charCodeAt(r)<=32;)r++;return p.charCodeAt(r)},Wr=f.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,zr=(r,t=r.length)=>p.substr(s,t)===r&&!f.id(p.charCodeAt(s+t)),Jr=()=>(w(),g(0,41)),c=[],
|
|
5
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},j=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,a=r=>(t,e,n="",o=String.fromCharCode(r))=>{if(t||!f.string?.[o])return;w();let m=()=>{let u=p.charCodeAt(s+1);if(u===x)return 2;if(u===Ur)return p.charCodeAt(s+2)===x?3:2;if(u===q||u===Z&&p.charCodeAt(s+2)!==Ir){let d=u===q?2:4,A=0,C;for(let E=0;E<d;E++){if((C=j(p.charCodeAt(s+2+E)))<0)return n+=p[s+1],2;A=A*16+C}return n+=String.fromCharCode(A),2+d}if(u===Z){let d=0,A=s+3,C;for(;(C=j(p.charCodeAt(A)))>=0;)d=d*16+C,A++;return A>s+3&&d<=1114111&&p.charCodeAt(A)===Rr?(n+=String.fromCodePoint(d),A-s+1):(n+=p[s+1],2)}return n+=Lr[p[s+1]]||p[s+1],2};return _(u=>u-r&&(u!==_r?(n+=p[s],1):m())),p[s]===o?w():S("Bad string"),[,n]};c[V]=a(V);c[Y]=a(Y);f.string={'"':!0};var Pr=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>h(r,Pr,!0));var Tr=30,kr=40,Dr=140;I("!",Dr);h("||",Tr);h("&&",kr);var Mr=50,Nr=60,Fr=70,b=100,$r=140;h("|",Mr);h("&",Fr);h("^",Nr);h(">>",b);h("<<",b);I("~",$r);var
|
|
4
|
+
`,""+o}${u}${d}`)},G=(r,t=s)=>(Array.isArray(r)&&(r.loc=t),r),_=(r,t=s,e)=>{for(;e=r(p.charCodeAt(s));)s+=e;return p.slice(t,s)},w=(r=1)=>p[s+=r],v=r=>s=r,g=(r=0,t)=>{let e,n,o;for(t&&f.enter?.(r,t);(e=f.space())&&e!==t&&(o=f.step(n,r,e,g));)n=o;return t&&(e==t?(s++,f.exit?.(r,t)):S("Unclosed "+String.fromCharCode(t-(t>42?2:1)))),n},fr=(r=s)=>{for(;p.charCodeAt(r)<=32;)r++;return p.charCodeAt(r)},Wr=f.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,zr=(r,t=r.length)=>p.substr(s,t)===r&&!f.id(p.charCodeAt(s+t)),Jr=()=>(w(),g(0,41)),c=[],M={},y=(r,t=32,e,n=r.charCodeAt(0),o=r.length,m=c[n],u=r.toUpperCase()!==r,d,A)=>(t=M[r]=!m&&M[r]||t,c[n]=(C,E,L,H=s)=>(d=L,(L?r==L:(o<2||r.charCodeAt(1)===p.charCodeAt(s+1)&&(o<3||p.substr(s,o)==r))&&(!u||!f.id(p.charCodeAt(s+o)))&&(d=L=r))&&E<t&&(s+=o,(A=e(C))?G(A,H):(s=H,d=0,!u&&!m&&!C&&S()),A)||m?.(C,E,d))),h=(r,t,e=!1)=>y(r,t,n=>n&&(o=>o&&[r,n,o])(g(t-(e?.5:0)))),I=(r,t,e)=>y(r,t,n=>e?n&&[r,n]:!n&&(n=g(t-.5))&&[r,n]),Kr=(r,t)=>y(r,200,e=>!e&&[,t]),F=(r,t,e,n)=>y(r,t,(o,m,u=o)=>(m=g(t-(e?.5:0)),o?.[0]!==r&&(o=[r,o||null]),m?.[0]===r?o.push(...m.slice(1)):m?o.push(m):n||fr()===r.charCodeAt(0)?o.push(null):u&&o.length===2&&(o=o[1]),o)),W=(r,t)=>y(r[0],t,e=>!e&&[r,g(0,r.charCodeAt(1))||null]),$=(r,t)=>y(r[0],t,e=>e&&[r,e,g(0,r.charCodeAt(1))||null]),dr=(r,t)=>(f.space(),t=p.charCodeAt(s),f.id(t)&&(t<48||t>57)?_(f.id):g(r)),z=(r,t)=>y(r,t,e=>e&&(n=>n&&[r,e,n])(dr(t))),Vr=(r,t,e,n=r.charCodeAt(0),o=r.length,m=c[n],u)=>(M[r]??=t,c[n]=(d,A,C,E=s)=>!d&&(C?r==C:(o<2||p.substr(s,o)==r)&&(C=r))&&A<t&&!f.id(p.charCodeAt(s+o))&&(!f.prop||f.prop(s+o))&&(v(s+o),(u=e())?G(u,E):v(E),u)||m?.(d,A,C));f.space=r=>{for(;(r=p.charCodeAt(s))<=32;)s++;return r};f.step=(r,t,e,n,o)=>(o=c[e])&&o(r,t)||(r?null:_(f.id)||null);var N={},l=(r,t,e=N[r])=>N[r]=(...n)=>t(...n)||e?.(...n),i=r=>Array.isArray(r)?r[0]==null?(t=>()=>t)(r[1]):N[r[0]]?.(...r.slice(1))??S(`Unknown operator: ${r[0]}`,r?.loc):r===void 0?()=>{}:t=>t?.[r];var B=46,U=48,R=57,hr=69,Ar=101,Cr=43,cr=45,P=95,J=110,gr=97,yr=102,Er=65,Sr=70,K=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),X=r=>{let t=K(_(e=>e===B&&(e=p.charCodeAt(s+1))!==B&&!(f.id(e)&&e>R)||e>=U&&e<=R||e===P||((e===hr||e===Ar)&&((e=p.charCodeAt(s+1))>=U&&e<=R||e===Cr||e===cr)?2:0)));return p.charCodeAt(s)===J?(w(),[,BigInt(t)]):(r=+t)!=r?S():[,r]},wr={2:r=>r===48||r===49||r===P,8:r=>r>=48&&r<=55||r===P,16:r=>r>=U&&r<=R||r>=gr&&r<=yr||r>=Er&&r<=Sr||r===P};f.number=null;c[B]=r=>!r&&p.charCodeAt(s+1)>=U&&p.charCodeAt(s+1)<=R&&X();for(let r=U;r<=R;r++)c[r]=t=>t?void 0:X();c[U]=r=>{if(r)return;let t=f.number;if(t){for(let[e,n]of Object.entries(t))if(e[0]==="0"&&p[s+1]?.toLowerCase()===e[1]){w(2);let o=K(_(wr[n]));return p.charCodeAt(s)===J?(w(),[,BigInt("0"+e[1]+o)]):[,parseInt(o,n)]}}return X()};var _r=92,V=34,Y=39,Z=117,q=120,Ir=123,Rr=125,x=10,Ur=13,Lr={n:`
|
|
5
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},j=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,a=r=>(t,e,n="",o=String.fromCharCode(r))=>{if(t||!f.string?.[o])return;w();let m=()=>{let u=p.charCodeAt(s+1);if(u===x)return 2;if(u===Ur)return p.charCodeAt(s+2)===x?3:2;if(u===q||u===Z&&p.charCodeAt(s+2)!==Ir){let d=u===q?2:4,A=0,C;for(let E=0;E<d;E++){if((C=j(p.charCodeAt(s+2+E)))<0)return n+=p[s+1],2;A=A*16+C}return n+=String.fromCharCode(A),2+d}if(u===Z){let d=0,A=s+3,C;for(;(C=j(p.charCodeAt(A)))>=0;)d=d*16+C,A++;return A>s+3&&d<=1114111&&p.charCodeAt(A)===Rr?(n+=String.fromCodePoint(d),A-s+1):(n+=p[s+1],2)}return n+=Lr[p[s+1]]||p[s+1],2};return _(u=>u-r&&(u!==_r?(n+=p[s],1):m())),p[s]===o?w():S("Bad string"),[,n]};c[V]=a(V);c[Y]=a(Y);f.string={'"':!0};var Pr=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>h(r,Pr,!0));var Tr=30,kr=40,Dr=140;I("!",Dr);h("||",Tr);h("&&",kr);var Mr=50,Nr=60,Fr=70,b=100,$r=140;h("|",Mr);h("&",Fr);h("^",Nr);h(">>",b);h("<<",b);I("~",$r);var T=90;h("<",T);h(">",T);h("<=",T);h(">=",T);var rr=80;h("==",rr);h("!=",rr);var tr=110,O=120,er=140;h("+",tr);h("-",tr);h("*",O);h("/",O);h("%",O);I("+",er);I("-",er);var k=150;y("++",k,r=>r?["++",r,null]:["++",g(k-1)]);y("--",k,r=>r?["--",r,null]:["--",g(k-1)]);var Br=5,Xr=10;F(",",Xr);F(";",Br,!0,!0);var Or=170;W("()",Or);var or=170,Qr=160;$("[]",or);z(".",or);$("()",Qr);var ir=(r,t,e,n)=>typeof r=="string"?o=>t(o,r,o):r[0]==="."?(e=i(r[1]),n=r[2],o=>t(e(o),n,o)):r[0]==="[]"&&r.length===3?(e=i(r[1]),n=i(r[2]),o=>t(e(o),n(o),o)):r[0]==="()"&&r.length===2?ir(r[1],t):(()=>{throw Error("Invalid assignment target")})(),nr={"=":(r,t,e)=>r[t]=e,"+=":(r,t,e)=>r[t]+=e,"-=":(r,t,e)=>r[t]-=e,"*=":(r,t,e)=>r[t]*=e,"/=":(r,t,e)=>r[t]/=e,"%=":(r,t,e)=>r[t]%=e,"|=":(r,t,e)=>r[t]|=e,"&=":(r,t,e)=>r[t]&=e,"^=":(r,t,e)=>r[t]^=e,">>=":(r,t,e)=>r[t]>>=e,"<<=":(r,t,e)=>r[t]<<=e};for(let r in nr)l(r,(t,e)=>(e=i(e),ir(t,(n,o,m)=>nr[r](n,o,e(m)))));l("!",r=>(r=i(r),t=>!r(t)));l("||",(r,t)=>(r=i(r),t=i(t),e=>r(e)||t(e)));l("&&",(r,t)=>(r=i(r),t=i(t),e=>r(e)&&t(e)));l("~",r=>(r=i(r),t=>~r(t)));l("|",(r,t)=>(r=i(r),t=i(t),e=>r(e)|t(e)));l("&",(r,t)=>(r=i(r),t=i(t),e=>r(e)&t(e)));l("^",(r,t)=>(r=i(r),t=i(t),e=>r(e)^t(e)));l(">>",(r,t)=>(r=i(r),t=i(t),e=>r(e)>>t(e)));l("<<",(r,t)=>(r=i(r),t=i(t),e=>r(e)<<t(e)));l(">",(r,t)=>(r=i(r),t=i(t),e=>r(e)>t(e)));l("<",(r,t)=>(r=i(r),t=i(t),e=>r(e)<t(e)));l(">=",(r,t)=>(r=i(r),t=i(t),e=>r(e)>=t(e)));l("<=",(r,t)=>(r=i(r),t=i(t),e=>r(e)<=t(e)));l("==",(r,t)=>(r=i(r),t=i(t),e=>r(e)==t(e)));l("!=",(r,t)=>(r=i(r),t=i(t),e=>r(e)!=t(e)));l("+",(r,t)=>t!==void 0?(r=i(r),t=i(t),e=>r(e)+t(e)):(r=i(r),e=>+r(e)));l("-",(r,t)=>t!==void 0?(r=i(r),t=i(t),e=>r(e)-t(e)):(r=i(r),e=>-r(e)));l("*",(r,t)=>(r=i(r),t=i(t),e=>r(e)*t(e)));l("/",(r,t)=>(r=i(r),t=i(t),e=>r(e)/t(e)));l("%",(r,t)=>(r=i(r),t=i(t),e=>r(e)%t(e)));var Q=(r,t,e,n)=>typeof r=="string"?o=>t(o,r):r[0]==="."?(e=i(r[1]),n=r[2],o=>t(e(o),n)):r[0]==="[]"&&r.length===3?(e=i(r[1]),n=i(r[2]),o=>t(e(o),n(o))):r[0]==="()"&&r.length===2?Q(r[1],t):(()=>{throw Error("Invalid increment target")})();l("++",(r,t)=>Q(r,t===null?(e,n)=>e[n]++:(e,n)=>++e[n]));l("--",(r,t)=>Q(r,t===null?(e,n)=>e[n]--:(e,n)=>--e[n]));var sr=(...r)=>(r=r.map(i),t=>{let e;for(let n of r)e=n(t);return e});l(",",sr);l(";",sr);var pr=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",D=r=>{throw Error(r)};l("[]",(r,t)=>t===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(e=>e==null?(()=>{}):e[0]==="..."?(e=i(e[1]),n=>e(n)):(e=i(e),n=>[e(n)])),e=>r.flatMap(n=>n(e))):(t==null&&D("Missing index"),r=i(r),t=i(t),e=>{let n=t(e);return pr(n)?void 0:r(e)[n]}));l(".",(r,t)=>(r=i(r),t=t[0]?t:t[1],pr(t)?()=>{}:e=>r(e)[t]));l("()",(r,t)=>{if(t===void 0)return r==null?D("Empty ()"):i(r);let e=o=>o?.[0]===","&&o.slice(1).some(m=>m==null||e(m));e(t)&&D("Empty argument");let n=t?t[0]===","?(t=t.slice(1).map(i),o=>t.map(m=>m(o))):(t=i(t),o=>[t(o)]):()=>[];return mr(r,(o,m,u)=>o[m](...n(u)))});var mr=(r,t,e,n)=>r==null?D("Empty ()"):r[0]==="()"&&r.length==2?mr(r[1],t):typeof r=="string"?o=>t(o,r,o):r[0]==="."?(e=i(r[1]),n=r[2],o=>t(e(o),n,o)):r[0]==="?."?(e=i(r[1]),n=r[2],o=>{let m=e(o);return m==null?void 0:t(m,n,o)}):r[0]==="[]"&&r.length===3?(e=i(r[1]),n=i(r[2]),o=>t(e(o),n(o),o)):r[0]==="?.[]"?(e=i(r[1]),n=i(r[2]),o=>{let m=e(o);return m==null?void 0:t(m,n(o),o)}):(r=i(r),o=>t([r(o)],0,o));var lr=new WeakMap,Hr=(r,...t)=>typeof r=="string"?i(f(r)):lr.get(r)||lr.set(r,vr(r,t)).get(r),ur=57344,vr=(r,t)=>{let e=r.reduce((m,u,d)=>m+(d?String.fromCharCode(ur+d-1):"")+u,""),n=f(e),o=m=>{if(typeof m=="string"&&m.length===1){let u=m.charCodeAt(0)-ur,d;if(u>=0&&u<t.length)return d=t[u],Gr(d)?d:[,d]}return Array.isArray(m)?m.map(o):m};return i(o(n))},Gr=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),zt=Hr;export{$ as access,h as binary,i as compile,p as cur,zt as default,S as err,g as expr,W as group,Wr as id,s as idx,Vr as keyword,Kr as literal,G as loc,c as lookup,z as member,F as nary,_ as next,l as operator,N as operators,Jr as parens,f as parse,fr as peek,M as prec,dr as propName,v as seek,w as skip,y as token,I as unary,zr as word};
|