solve-engine 2.14.0 → 2.15.0
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/dist/{BytecodeBuilder-BGq9ZiO3.d.cts → BytecodeBuilder-CRYfrFfq.d.cts} +2 -1
- package/dist/{BytecodeBuilder-BGq9ZiO3.d.ts → BytecodeBuilder-CRYfrFfq.d.ts} +2 -1
- package/dist/{EngineError-Ce1lPkjZ.d.cts → EngineError-Cv5q4Rbv.d.cts} +3 -1
- package/dist/{EngineError-Ce1lPkjZ.d.ts → EngineError-Cv5q4Rbv.d.ts} +3 -1
- package/dist/{Lexer-B4C1qHXu.d.cts → Lexer-CCHFDcgP.d.cts} +1 -1
- package/dist/{Lexer-DKMlj7Sy.d.ts → Lexer-CqagTewQ.d.ts} +1 -1
- package/dist/{PackageCompatibility-BG0iur4I.d.cts → PackageCompatibility-C2IQZ_w3.d.cts} +1 -1
- package/dist/{PackageCompatibility-BlIcQg5v.d.ts → PackageCompatibility-Cl7GF_Iu.d.ts} +1 -1
- package/dist/{PackageRegistry-BJ0QQd3k.d.ts → PackageRegistry-CK_JoX50.d.ts} +14 -7
- package/dist/{PackageRegistry-DeGDZkNt.d.cts → PackageRegistry-CZO1IbS-.d.cts} +14 -7
- package/dist/{Parselet-Blq8B0Gj.d.ts → Parselet-CK0bNO1l.d.ts} +2 -2
- package/dist/{Parselet-BSndkWEY.d.cts → Parselet-DOGmj6N6.d.cts} +2 -2
- package/dist/{ScopeManager-D8nLv--u.d.cts → ScopeManager-BtqiTVjG.d.cts} +3 -3
- package/dist/{ScopeManager-CF3cZUqW.d.ts → ScopeManager-C6c1WmJD.d.ts} +3 -3
- package/dist/{TokenNormalizer-DnlL7_8c.d.cts → TokenNormalizer-BfTHg1qt.d.cts} +35 -0
- package/dist/{TokenNormalizer-DCWdZjGz.d.ts → TokenNormalizer-d7F1KQFs.d.ts} +35 -0
- package/dist/{VMCheckpoints-Dy39SVHa.d.cts → VMCheckpoints-BFDlaGse.d.cts} +2 -2
- package/dist/{VMCheckpoints-BsR5_auF.d.ts → VMCheckpoints-DJdvpliw.d.ts} +2 -2
- package/dist/{WorkerError-B4p6PNfx.d.cts → WorkerError-FH7KXX4_.d.cts} +1 -1
- package/dist/{WorkerError-Dhj9BQ_A.d.ts → WorkerError-J3v3ix_z.d.ts} +1 -1
- package/dist/{chunk-75XDS65A.cjs → chunk-2XZCLDHJ.cjs} +2 -2
- package/dist/chunk-2XZCLDHJ.cjs.map +1 -0
- package/dist/{chunk-BW6FR7DA.js → chunk-3PDDKWTJ.js} +3 -3
- package/dist/{chunk-BW6FR7DA.js.map → chunk-3PDDKWTJ.js.map} +1 -1
- package/dist/{chunk-3MBENI4Q.cjs → chunk-3Y56PSQD.cjs} +3 -3
- package/dist/{chunk-3MBENI4Q.cjs.map → chunk-3Y56PSQD.cjs.map} +1 -1
- package/dist/{chunk-YOHM2WQT.js → chunk-4IIFFJTJ.js} +4 -4
- package/dist/chunk-4IIFFJTJ.js.map +1 -0
- package/dist/chunk-5SDSIRPL.js +2 -0
- package/dist/chunk-5SDSIRPL.js.map +1 -0
- package/dist/{chunk-PNDQRCRQ.cjs → chunk-6U66HQKQ.cjs} +2 -2
- package/dist/chunk-6U66HQKQ.cjs.map +1 -0
- package/dist/{chunk-VBSMA7WJ.cjs → chunk-ABVDKMNF.cjs} +2 -2
- package/dist/chunk-ABVDKMNF.cjs.map +1 -0
- package/dist/chunk-AYTEPHRO.js +3 -0
- package/dist/chunk-AYTEPHRO.js.map +1 -0
- package/dist/chunk-C5MP74ER.js +2 -0
- package/dist/chunk-C5MP74ER.js.map +1 -0
- package/dist/{chunk-JQBG3LX4.js → chunk-CUDPOWXA.js} +2 -2
- package/dist/{chunk-JQBG3LX4.js.map → chunk-CUDPOWXA.js.map} +1 -1
- package/dist/{chunk-LUMVKVFQ.cjs → chunk-EEUA3OJ6.cjs} +2 -2
- package/dist/{chunk-LUMVKVFQ.cjs.map → chunk-EEUA3OJ6.cjs.map} +1 -1
- package/dist/chunk-EEVUKZ5B.cjs +2 -0
- package/dist/{chunk-EURCQMZK.cjs.map → chunk-EEVUKZ5B.cjs.map} +1 -1
- package/dist/{chunk-3HYO3QYW.cjs → chunk-EXCFCHAT.cjs} +2 -2
- package/dist/{chunk-3HYO3QYW.cjs.map → chunk-EXCFCHAT.cjs.map} +1 -1
- package/dist/chunk-FAGFPVYK.cjs +2 -0
- package/dist/chunk-FAGFPVYK.cjs.map +1 -0
- package/dist/chunk-FPGYRFJY.cjs +5 -0
- package/dist/chunk-FPGYRFJY.cjs.map +1 -0
- package/dist/chunk-FVQWN5HZ.cjs +2 -0
- package/dist/chunk-FVQWN5HZ.cjs.map +1 -0
- package/dist/{chunk-4BZIYU7S.cjs → chunk-GWCBPITD.cjs} +3 -3
- package/dist/{chunk-4BZIYU7S.cjs.map → chunk-GWCBPITD.cjs.map} +1 -1
- package/dist/{chunk-YAYBVVG2.js → chunk-GWJJRH32.js} +3 -3
- package/dist/{chunk-YAYBVVG2.js.map → chunk-GWJJRH32.js.map} +1 -1
- package/dist/chunk-HDGARCI2.cjs +2 -0
- package/dist/chunk-HDGARCI2.cjs.map +1 -0
- package/dist/{chunk-MVP2YD4X.cjs → chunk-HG4NPDN5.cjs} +2 -2
- package/dist/{chunk-MVP2YD4X.cjs.map → chunk-HG4NPDN5.cjs.map} +1 -1
- package/dist/{chunk-FNNIAJNY.cjs → chunk-IMXSVHQK.cjs} +2 -2
- package/dist/{chunk-FNNIAJNY.cjs.map → chunk-IMXSVHQK.cjs.map} +1 -1
- package/dist/{chunk-LH7URJZT.js → chunk-IPOU3JTA.js} +3 -3
- package/dist/{chunk-LH7URJZT.js.map → chunk-IPOU3JTA.js.map} +1 -1
- package/dist/{chunk-WTEXBPBR.js → chunk-JOIQFDZQ.js} +2 -2
- package/dist/chunk-JOIQFDZQ.js.map +1 -0
- package/dist/{chunk-KHCNMNZZ.js → chunk-JP4JMQOG.js} +2 -2
- package/dist/{chunk-KHCNMNZZ.js.map → chunk-JP4JMQOG.js.map} +1 -1
- package/dist/chunk-KKMLFYVW.cjs +3 -0
- package/dist/chunk-KKMLFYVW.cjs.map +1 -0
- package/dist/{chunk-62LMTO4F.js → chunk-LHLW7JLS.js} +2 -2
- package/dist/{chunk-62LMTO4F.js.map → chunk-LHLW7JLS.js.map} +1 -1
- package/dist/{chunk-SOMGSIO4.cjs → chunk-NAZ6PGLS.cjs} +2 -2
- package/dist/chunk-NAZ6PGLS.cjs.map +1 -0
- package/dist/{chunk-A33K7NY4.js → chunk-O3ALJLYC.js} +2 -2
- package/dist/chunk-O3ALJLYC.js.map +1 -0
- package/dist/chunk-P4ETODMP.js +2 -0
- package/dist/chunk-P4ETODMP.js.map +1 -0
- package/dist/{chunk-P6WPEUAJ.cjs → chunk-PREIL3IB.cjs} +2 -2
- package/dist/{chunk-P6WPEUAJ.cjs.map → chunk-PREIL3IB.cjs.map} +1 -1
- package/dist/chunk-Q3PSTNSY.js +2 -0
- package/dist/chunk-Q3PSTNSY.js.map +1 -0
- package/dist/{chunk-NQSWT3UO.js → chunk-Q7HPPLMG.js} +2 -2
- package/dist/{chunk-NQSWT3UO.js.map → chunk-Q7HPPLMG.js.map} +1 -1
- package/dist/chunk-RC4M6HBX.cjs +2 -0
- package/dist/chunk-RC4M6HBX.cjs.map +1 -0
- package/dist/{chunk-MSYX32PF.cjs → chunk-S3DFU33X.cjs} +2 -2
- package/dist/{chunk-MSYX32PF.cjs.map → chunk-S3DFU33X.cjs.map} +1 -1
- package/dist/chunk-TVE2DNPU.js +2 -0
- package/dist/chunk-TVE2DNPU.js.map +1 -0
- package/dist/{chunk-YNMMRH44.js → chunk-TZYMXNIB.js} +2 -2
- package/dist/chunk-TZYMXNIB.js.map +1 -0
- package/dist/{chunk-6TPXH6Y5.cjs → chunk-UUAFDZK6.cjs} +3 -3
- package/dist/{chunk-6TPXH6Y5.cjs.map → chunk-UUAFDZK6.cjs.map} +1 -1
- package/dist/{chunk-QYO7IEPR.js → chunk-UZSPBFZN.js} +2 -2
- package/dist/{chunk-QYO7IEPR.js.map → chunk-UZSPBFZN.js.map} +1 -1
- package/dist/chunk-VJP4GGCW.cjs +2 -0
- package/dist/chunk-VJP4GGCW.cjs.map +1 -0
- package/dist/chunk-W5ELYJ4Z.cjs +2 -0
- package/dist/chunk-W5ELYJ4Z.cjs.map +1 -0
- package/dist/{chunk-YTCTUBR2.js → chunk-WOIJPV7Z.js} +2 -2
- package/dist/{chunk-YTCTUBR2.js.map → chunk-WOIJPV7Z.js.map} +1 -1
- package/dist/{chunk-MVZUTETT.js → chunk-XK23K3EJ.js} +2 -2
- package/dist/{chunk-MVZUTETT.js.map → chunk-XK23K3EJ.js.map} +1 -1
- package/dist/{chunk-MPB7KUN5.js → chunk-YAZ4DUJJ.js} +2 -2
- package/dist/chunk-YAZ4DUJJ.js.map +1 -0
- package/dist/chunk-YFX53MZF.js +2 -0
- package/dist/chunk-YFX53MZF.js.map +1 -0
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +10 -10
- package/dist/engine.d.ts +10 -10
- package/dist/engine.js +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.d.cts +3 -3
- package/dist/errors.d.ts +3 -3
- package/dist/errors.js +1 -1
- package/dist/format.cjs +1 -1
- package/dist/format.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/dist/language.d.cts +9 -9
- package/dist/language.d.ts +9 -9
- package/dist/lexer.cjs +1 -1
- package/dist/lexer.d.cts +2 -2
- package/dist/lexer.d.ts +2 -2
- package/dist/lexer.js +1 -1
- package/dist/normalizer.cjs +1 -1
- package/dist/normalizer.d.cts +2 -2
- package/dist/normalizer.d.ts +2 -2
- package/dist/normalizer.js +1 -1
- package/dist/packages.cjs +1 -1
- package/dist/packages.d.cts +8 -8
- package/dist/packages.d.ts +8 -8
- package/dist/packages.js +1 -1
- package/dist/parser.cjs +1 -1
- package/dist/parser.d.cts +3 -3
- package/dist/parser.d.ts +3 -3
- package/dist/parser.js +1 -1
- package/dist/{pipeline-BM8xc0CZ.d.cts → pipeline-B4wf3M1h.d.cts} +5 -24
- package/dist/{pipeline-J2ehIm7t.d.ts → pipeline-QIT4iD8f.d.ts} +5 -24
- package/dist/resolvers.d.cts +1 -1
- package/dist/resolvers.d.ts +1 -1
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.cts +9 -9
- package/dist/testing.d.ts +9 -9
- package/dist/testing.js +1 -1
- package/dist/uom.cjs +1 -1
- package/dist/uom.d.cts +1 -1
- package/dist/uom.d.ts +1 -1
- package/dist/uom.js +1 -1
- package/dist/vm.cjs +1 -1
- package/dist/vm.d.cts +8 -7
- package/dist/vm.d.ts +8 -7
- package/dist/vm.js +1 -1
- package/dist/worker.cjs +2 -2
- package/dist/worker.d.cts +9 -9
- package/dist/worker.d.ts +9 -9
- package/dist/worker.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2VK3NH5S.cjs +0 -3
- package/dist/chunk-2VK3NH5S.cjs.map +0 -1
- package/dist/chunk-3GAWAMT4.js +0 -2
- package/dist/chunk-3GAWAMT4.js.map +0 -1
- package/dist/chunk-4FCHZYAH.js +0 -3
- package/dist/chunk-4FCHZYAH.js.map +0 -1
- package/dist/chunk-4QVBSG6B.cjs +0 -2
- package/dist/chunk-4QVBSG6B.cjs.map +0 -1
- package/dist/chunk-556Q7VZC.cjs +0 -2
- package/dist/chunk-556Q7VZC.cjs.map +0 -1
- package/dist/chunk-75XDS65A.cjs.map +0 -1
- package/dist/chunk-A33K7NY4.js.map +0 -1
- package/dist/chunk-C65UDMWH.cjs +0 -2
- package/dist/chunk-C65UDMWH.cjs.map +0 -1
- package/dist/chunk-EURCQMZK.cjs +0 -2
- package/dist/chunk-FUDVKPB7.cjs +0 -2
- package/dist/chunk-FUDVKPB7.cjs.map +0 -1
- package/dist/chunk-GMSBBLUQ.js +0 -2
- package/dist/chunk-GMSBBLUQ.js.map +0 -1
- package/dist/chunk-JEFMG6CV.js +0 -2
- package/dist/chunk-JEFMG6CV.js.map +0 -1
- package/dist/chunk-K4MME6ZT.js +0 -2
- package/dist/chunk-K4MME6ZT.js.map +0 -1
- package/dist/chunk-MPB7KUN5.js.map +0 -1
- package/dist/chunk-PL7AH5EU.cjs +0 -5
- package/dist/chunk-PL7AH5EU.cjs.map +0 -1
- package/dist/chunk-PNDQRCRQ.cjs.map +0 -1
- package/dist/chunk-SNVPM27Q.cjs +0 -2
- package/dist/chunk-SNVPM27Q.cjs.map +0 -1
- package/dist/chunk-SOMGSIO4.cjs.map +0 -1
- package/dist/chunk-T3FBAFRR.js +0 -2
- package/dist/chunk-T3FBAFRR.js.map +0 -1
- package/dist/chunk-VBSMA7WJ.cjs.map +0 -1
- package/dist/chunk-WTEXBPBR.js.map +0 -1
- package/dist/chunk-WYIOXAFW.cjs +0 -2
- package/dist/chunk-WYIOXAFW.cjs.map +0 -1
- package/dist/chunk-YNMMRH44.js.map +0 -1
- package/dist/chunk-YOHM2WQT.js.map +0 -1
- package/dist/chunk-YVKHEAFT.js +0 -2
- package/dist/chunk-YVKHEAFT.js.map +0 -1
package/dist/testing.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { I as IEnginePackage, E as ExpressionEngine } from './PackageRegistry-
|
|
1
|
+
import { I as IEnginePackage, E as ExpressionEngine } from './PackageRegistry-CZO1IbS-.cjs';
|
|
2
2
|
import { V as Value } from './Value-DCTqTSeP.cjs';
|
|
3
|
-
import { E as EngineError } from './EngineError-
|
|
4
|
-
import { C as CompatibilityReport } from './PackageCompatibility-
|
|
5
|
-
import './Parselet-
|
|
6
|
-
import './BytecodeBuilder-
|
|
3
|
+
import { E as EngineError } from './EngineError-Cv5q4Rbv.cjs';
|
|
4
|
+
import { C as CompatibilityReport } from './PackageCompatibility-C2IQZ_w3.cjs';
|
|
5
|
+
import './Parselet-DOGmj6N6.cjs';
|
|
6
|
+
import './BytecodeBuilder-CRYfrFfq.cjs';
|
|
7
7
|
import './Token-CbP_OutD.cjs';
|
|
8
|
-
import './pipeline-
|
|
9
|
-
import './Lexer-
|
|
8
|
+
import './pipeline-B4wf3M1h.cjs';
|
|
9
|
+
import './Lexer-CCHFDcgP.cjs';
|
|
10
10
|
import './resolvers.cjs';
|
|
11
11
|
import '@tanstack/query-core';
|
|
12
|
-
import './TokenNormalizer-
|
|
13
|
-
import './ScopeManager-
|
|
12
|
+
import './TokenNormalizer-BfTHg1qt.cjs';
|
|
13
|
+
import './ScopeManager-BtqiTVjG.cjs';
|
|
14
14
|
import './Configuration-BGQn-cJ8.cjs';
|
|
15
15
|
|
|
16
16
|
/**
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { I as IEnginePackage, E as ExpressionEngine } from './PackageRegistry-
|
|
1
|
+
import { I as IEnginePackage, E as ExpressionEngine } from './PackageRegistry-CK_JoX50.js';
|
|
2
2
|
import { V as Value } from './Value-DCTqTSeP.js';
|
|
3
|
-
import { E as EngineError } from './EngineError-
|
|
4
|
-
import { C as CompatibilityReport } from './PackageCompatibility-
|
|
5
|
-
import './Parselet-
|
|
6
|
-
import './BytecodeBuilder-
|
|
3
|
+
import { E as EngineError } from './EngineError-Cv5q4Rbv.js';
|
|
4
|
+
import { C as CompatibilityReport } from './PackageCompatibility-Cl7GF_Iu.js';
|
|
5
|
+
import './Parselet-CK0bNO1l.js';
|
|
6
|
+
import './BytecodeBuilder-CRYfrFfq.js';
|
|
7
7
|
import './Token-CbP_OutD.js';
|
|
8
|
-
import './pipeline-
|
|
9
|
-
import './Lexer-
|
|
8
|
+
import './pipeline-QIT4iD8f.js';
|
|
9
|
+
import './Lexer-CqagTewQ.js';
|
|
10
10
|
import './resolvers.js';
|
|
11
11
|
import '@tanstack/query-core';
|
|
12
|
-
import './TokenNormalizer-
|
|
13
|
-
import './ScopeManager-
|
|
12
|
+
import './TokenNormalizer-d7F1KQFs.js';
|
|
13
|
+
import './ScopeManager-C6c1WmJD.js';
|
|
14
14
|
import './Configuration-BGQn-cJ8.js';
|
|
15
15
|
|
|
16
16
|
/**
|
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {n as n$1,a,b}from'./chunk-
|
|
1
|
+
import {n as n$1,a,b}from'./chunk-4IIFFJTJ.js';import'./chunk-CUDPOWXA.js';import'./chunk-2RWAXT6O.js';import'./chunk-7E7NXKQ5.js';import'./chunk-MIQBJGGR.js';import'./chunk-P4ETODMP.js';import'./chunk-JP4JMQOG.js';import'./chunk-IPOU3JTA.js';import'./chunk-XEIDV5JP.js';import {y}from'./chunk-AYTEPHRO.js';import'./chunk-C5MP74ER.js';import'./chunk-5SDSIRPL.js';import'./chunk-Q3PSTNSY.js';import'./chunk-YFX53MZF.js';import'./chunk-76F3LCIL.js';import'./chunk-TCZSPH4A.js';import'./chunk-WOIJPV7Z.js';import'./chunk-GWJJRH32.js';import'./chunk-TZYMXNIB.js';import'./chunk-HFKDWQUL.js';import'./chunk-5TCSFTZD.js';import'./chunk-JOIQFDZQ.js';import {m}from'./chunk-O3ALJLYC.js';import'./chunk-DLAKPF5T.js';import {a as a$1}from'./chunk-Q7HPPLMG.js';import'./chunk-UZSPBFZN.js';import'./chunk-JPFCXLJV.js';import'./chunk-TVE2DNPU.js';import'./chunk-IJMNVBIS.js';import'./chunk-LHLW7JLS.js';import'./chunk-UWAXJX5G.js';import'./chunk-44EOEWGP.js';import {b as b$1}from'./chunk-YAZ4DUJJ.js';var i=class o extends Error{constructor(t){super(t.message),this.name="ExpectationError",this.code=t.code,this.expected=t.expected,this.actual=t.actual,Object.setPrototypeOf(this,o.prototype);}};function V(o=[],t={}){let{locale:e="en",includeBuiltins:r=true}=t,s=new n$1({locale:e,packages:r?y:[]});for(let a of o)s.registerPackage(a);return s}function v(o,t){try{let e=o.evaluateExpression(t);return e.isError()?{status:"error",code:e.errorCode??"",message:e.errorMessage??"",source:e}:e.isPending()?{status:"pending",value:e}:{status:"value",value:e}}catch(e){if(e instanceof b$1)return {status:"error",code:e.code,message:e.message,source:e};let r=e instanceof Error?e.message:String(e);return {status:"error",code:"UNKNOWN_ERROR",message:r,source:new m(13,"UNKNOWN_ERROR",r)}}}function x(o,t){if(Object.is(o,t))return true;if(!Number.isFinite(o)||!Number.isFinite(t))return false;let e=1e-9*Math.max(1,Math.abs(o),Math.abs(t));return Math.abs(o-t)<=e}function l(o){return o.type===3?JSON.stringify(o.value):o.type===6&&typeof o.unit=="string"?`${String(o.value)} ${o.unit}`:String(o.value)}function n(o){switch(o.status){case "value":return l(o.value);case "pending":return "a pending async value";case "error":return `an error (${o.code}: ${o.message})`}}var d=class{constructor(t,e){this.expression=t;this.outcome=e;}get value(){if(this.outcome.status==="error")throw new i({code:"EXPECTED_VALUE",message:`Expected "${this.expression}" to evaluate, but it failed with ${n(this.outcome)}.`,expected:"a resolved value",actual:n(this.outcome)});return this.outcome.value}toEvaluate(){if(this.outcome.status!=="value")throw new i({code:"EXPECTED_EVALUATE",message:`Expected "${this.expression}" to evaluate to a value, but got ${n(this.outcome)}.`,expected:"a resolved value",actual:n(this.outcome)});return this}toEqual(t,e){if(this.outcome.status!=="value")throw new i({code:"EXPECTED_EQUAL",message:`Expected "${this.expression}" to equal ${c(t,e)}, but got ${n(this.outcome)}.`,expected:c(t,e),actual:n(this.outcome)});let r=this.outcome.value,s;if(typeof t=="number"?s=x(r.toNumber(),t):typeof t=="boolean"?s=r.type===10&&r.value===t:s=C(r)===t,!s)throw new i({code:"EXPECTED_EQUAL",message:`Expected "${this.expression}" to equal ${c(t,e)}, but it was ${l(r)}.`,expected:c(t,e),actual:l(r)});if(e!==void 0&&r.unit!==e)throw new i({code:"EXPECTED_UNIT",message:`Expected "${this.expression}" to carry the unit "${e}", but it was ${r.unit===void 0?"unitless":`"${r.unit}"`}.`,expected:`unit "${e}"`,actual:r.unit===void 0?"no unit":`unit "${r.unit}"`});return this}toBeError(){if(this.outcome.status!=="error")throw new i({code:"EXPECTED_ERROR",message:`Expected "${this.expression}" to fail, but it produced ${n(this.outcome)}.`,expected:"an error",actual:n(this.outcome)});return this}toFailWith(t){if(this.outcome.status!=="error")throw new i({code:"EXPECTED_FAIL_WITH",message:`Expected "${this.expression}" to fail with "${t}", but it produced ${n(this.outcome)}.`,expected:`error code "${t}"`,actual:n(this.outcome)});if(this.outcome.code!==t)throw new i({code:"EXPECTED_FAIL_WITH",message:`Expected "${this.expression}" to fail with "${t}", but it failed with "${this.outcome.code}" (${this.outcome.message}).`,expected:`error code "${t}"`,actual:`error code "${this.outcome.code}"`});return this}toBePending(){if(this.outcome.status!=="pending")throw new i({code:"EXPECTED_PENDING",message:`Expected "${this.expression}" to be pending, but got ${n(this.outcome)}.`,expected:"a pending async value",actual:n(this.outcome)});return this}};function c(o,t){let e=typeof o=="string"?JSON.stringify(o):String(o);return t===void 0?e:`${e} ${t}`}function C(o){return String(o.value)}function D(o,t){return new d(t,v(o,t))}var O=["a","an","and","or","but","if","then","the","this","that","these","those","in","on","at","to","of","for","from","with","by","as","per","into","over","is","are","was","were","be","been","being","do","does","did","have","has","had","will","would","can","could","should","may","might","must","price","cost","value","total","sum","count","rate","amount","number","time","date","day","week","month","year","hour","minute","second","add","buy","sell","hold","make","take","give","get","set","run","up","down","out","off","all","some","any","no","not","more","less","one","two","three","first","last","next","each","every","here","there"],$=["error","warning","info"];function k(o){let t=[],e=o.lexerVocabulary;if(e?.keywords)for(let[r,s]of Object.entries(e.keywords))t.push({word:r,via:"keyword",tokenType:s});if(e?.units)for(let r of e.units)t.push({word:r,via:"unit"});if(e?.operators)for(let[r,s]of Object.entries(e.operators))t.push({word:r,via:"operator",tokenType:s});if(o.phrases)for(let[r,s]of Object.entries(o.phrases))r.includes(" ")||t.push({word:r,via:"phrase",tokenType:s});return t}var p=class{constructor(t){this.pkg=t;}notToShadow(t=O){let e=new Set(t.map(s=>s.toLowerCase())),r=k(this.pkg).filter(s=>e.has(s.word.toLowerCase()));if(r.length>0){let s=r.map(a=>`"${a.word}" (${a.via})`).join(", ");throw new i({code:"PACKAGE_SHADOWS_PROSE",message:`Package "${this.pkg.name}" claims prose word(s) as syntax: ${s}. A word that is also ordinary English turns prose into arithmetic; prefer a multi-word phrase or a form that requires a parenthesis.`,expected:"no prose words claimed as syntax",actual:s})}return r}notToCollideWith(t,e="error"){let r=a(this.pkg,t),s=$.indexOf(e),a$1=r.conflicts.filter(u=>$.indexOf(u.severity)<=s);if(a$1.length>0){let u=a$1.map(g=>`[${g.severity}] ${g.detail}`).join(`
|
|
2
2
|
`);throw new i({code:"PACKAGE_VOCABULARY_COLLISION",message:`Package "${this.pkg.name}" collides with another package:
|
|
3
3
|
${u}`,expected:`no conflicts at or above "${e}" severity`,actual:`${a$1.length} conflict(s)`})}return r}toDeclareCompatibleEngineVersion(t=a$1){let e=b(this.pkg,t);if(!e.compatible){let r=e.reason==="invalid-range"?`its range "${e.declaredRange}" is not valid semver`:`its range "${e.declaredRange}" is not satisfied by engine version "${e.engineVersion}"`;throw new i({code:"PACKAGE_ENGINE_VERSION_INCOMPATIBLE",message:`Package "${this.pkg.name}" declares an engineVersion that will be rejected at registration: ${r}.`,expected:`an engineVersion satisfied by "${t}"`,actual:`"${e.declaredRange}"`})}return this}};function L(o){return new p(o)}export{O as COMMON_PROSE_WORDS,i as ExpectationError,d as ExpressionAssertion,p as PackageAssertion,V as createTestEngine,D as expectExpression,L as expectPackage};//# sourceMappingURL=testing.js.map
|
|
4
4
|
//# sourceMappingURL=testing.js.map
|
package/dist/uom.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkW5ELYJ4Z_cjs=require('./chunk-W5ELYJ4Z.cjs'),chunkGWCBPITD_cjs=require('./chunk-GWCBPITD.cjs');require('./chunk-ABVDKMNF.cjs'),require('./chunk-TLG7VZRX.cjs'),require('./chunk-6U66HQKQ.cjs');var chunkBKSKZA4W_cjs=require('./chunk-BKSKZA4W.cjs');require('./chunk-6QRHN3I6.cjs'),require('./chunk-NAZ6PGLS.cjs');Object.defineProperty(exports,"CurrencyAsyncResolver",{enumerable:true,get:function(){return chunkW5ELYJ4Z_cjs.b}});Object.defineProperty(exports,"CurrencyExchangeService",{enumerable:true,get:function(){return chunkGWCBPITD_cjs.a}});Object.defineProperty(exports,"currencyExchangeService",{enumerable:true,get:function(){return chunkGWCBPITD_cjs.b}});Object.defineProperty(exports,"sharedCurrencyExchange",{enumerable:true,get:function(){return chunkGWCBPITD_cjs.c}});Object.defineProperty(exports,"canConvert",{enumerable:true,get:function(){return chunkBKSKZA4W_cjs.d}});Object.defineProperty(exports,"convertUnit",{enumerable:true,get:function(){return chunkBKSKZA4W_cjs.e}});Object.defineProperty(exports,"getBestUnit",{enumerable:true,get:function(){return chunkBKSKZA4W_cjs.h}});Object.defineProperty(exports,"getMeasure",{enumerable:true,get:function(){return chunkBKSKZA4W_cjs.c}});Object.defineProperty(exports,"isConvertibleUnit",{enumerable:true,get:function(){return chunkBKSKZA4W_cjs.g}});Object.defineProperty(exports,"resolveUnit",{enumerable:true,get:function(){return chunkBKSKZA4W_cjs.b}});//# sourceMappingURL=uom.cjs.map
|
|
2
2
|
//# sourceMappingURL=uom.cjs.map
|
package/dist/uom.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/query-core';
|
|
2
2
|
import { T as Token } from './Token-CbP_OutD.cjs';
|
|
3
|
-
import { a as BytecodeProgram } from './BytecodeBuilder-
|
|
3
|
+
import { a as BytecodeProgram } from './BytecodeBuilder-CRYfrFfq.cjs';
|
|
4
4
|
import { IAsyncResolver, AsyncCheckResult } from './resolvers.cjs';
|
|
5
5
|
import './Value-DCTqTSeP.cjs';
|
|
6
6
|
|
package/dist/uom.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/query-core';
|
|
2
2
|
import { T as Token } from './Token-CbP_OutD.js';
|
|
3
|
-
import { a as BytecodeProgram } from './BytecodeBuilder-
|
|
3
|
+
import { a as BytecodeProgram } from './BytecodeBuilder-CRYfrFfq.js';
|
|
4
4
|
import { IAsyncResolver, AsyncCheckResult } from './resolvers.js';
|
|
5
5
|
import './Value-DCTqTSeP.js';
|
|
6
6
|
|
package/dist/uom.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{b as CurrencyAsyncResolver}from'./chunk-
|
|
1
|
+
export{b as CurrencyAsyncResolver}from'./chunk-C5MP74ER.js';export{a as CurrencyExchangeService,b as currencyExchangeService,c as sharedCurrencyExchange}from'./chunk-GWJJRH32.js';import'./chunk-TZYMXNIB.js';import'./chunk-HFKDWQUL.js';import'./chunk-O3ALJLYC.js';export{d as canConvert,e as convertUnit,h as getBestUnit,c as getMeasure,g as isConvertibleUnit,b as resolveUnit}from'./chunk-DLAKPF5T.js';import'./chunk-44EOEWGP.js';import'./chunk-YAZ4DUJJ.js';//# sourceMappingURL=uom.js.map
|
|
2
2
|
//# sourceMappingURL=uom.js.map
|
package/dist/vm.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkVJP4GGCW_cjs=require('./chunk-VJP4GGCW.cjs');require('./chunk-HG4NPDN5.cjs');var chunkEEVUKZ5B_cjs=require('./chunk-EEVUKZ5B.cjs');require('./chunk-GWCBPITD.cjs'),require('./chunk-ABVDKMNF.cjs'),require('./chunk-TLG7VZRX.cjs'),require('./chunk-2XZCLDHJ.cjs');var chunk6U66HQKQ_cjs=require('./chunk-6U66HQKQ.cjs');require('./chunk-BKSKZA4W.cjs'),require('./chunk-6QRHN3I6.cjs'),require('./chunk-NAZ6PGLS.cjs');var l=class{constructor(t){this.checkpoints=[];this.vm=t;}snapshot(t,n,e){if(e.length===0)return null;let r=this.checkpoints.length>0?this.checkpoints[this.checkpoints.length-1]:null,o=Object.create(r?.variables??null),i=Object.create(r?.functions??null);for(let s of e){if(this.vm.hasUserFunction(s)){let p=this.vm.getUserFunction(s);p&&(i[s]=p);continue}let u=this.vm.getVar(s);u!==void 0&&(o[s]=u);}let c={lineNumber:t,lineId:n,variables:o,functions:i,parent:r};return this.checkpoints.push(c),c}restoreTo(t){let n=this.getNearestCheckpoint(t);if(!n){this.vm.reset();return}let e=[],r=n;for(;r;)e.unshift(r),r=r.parent;this.vm.reset();for(let o of e){for(let i of Object.keys(o.variables))this.vm.setVar(i,o.variables[i]);for(let i of Object.keys(o.functions)){let c=o.functions[i];this.vm.defineUserFunction(c.name,c.params,c.program);}}}getNearestCheckpoint(t){let n=null;for(let e of this.checkpoints)if(e.lineNumber<=t)n=e;else break;return n}getCheckpointAt(t){return this.checkpoints.find(n=>n.lineNumber===t)}getAllCheckpoints(){return this.checkpoints}lookupVariable(t){if(this.checkpoints.length===0)return;let e=this.checkpoints[this.checkpoints.length-1].variables;for(;e;){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];e=Object.getPrototypeOf(e);}}clear(){this.checkpoints=[];}get count(){return this.checkpoints.length}get isEmpty(){return this.checkpoints.length===0}get vmInstance(){return this.vm}};Object.defineProperty(exports,"DependencyGraph",{enumerable:true,get:function(){return chunkVJP4GGCW_cjs.a}});Object.defineProperty(exports,"ScopeManager",{enumerable:true,get:function(){return chunkVJP4GGCW_cjs.b}});Object.defineProperty(exports,"createVM",{enumerable:true,get:function(){return chunkVJP4GGCW_cjs.c}});Object.defineProperty(exports,"executeBytecode",{enumerable:true,get:function(){return chunkVJP4GGCW_cjs.d}});Object.defineProperty(exports,"OpRegistry",{enumerable:true,get:function(){return chunkEEVUKZ5B_cjs.v}});Object.defineProperty(exports,"allocatePluginFunctionIndex",{enumerable:true,get:function(){return chunkEEVUKZ5B_cjs.E}});Object.defineProperty(exports,"binaryOp",{enumerable:true,get:function(){return chunkEEVUKZ5B_cjs.u}});Object.defineProperty(exports,"builtinFunctions",{enumerable:true,get:function(){return chunkEEVUKZ5B_cjs.C}});Object.defineProperty(exports,"pluginFunctionIndexFor",{enumerable:true,get:function(){return chunkEEVUKZ5B_cjs.F}});Object.defineProperty(exports,"pluginFunctionRegistry",{enumerable:true,get:function(){return chunkEEVUKZ5B_cjs.D}});Object.defineProperty(exports,"sharedOpRegistry",{enumerable:true,get:function(){return chunkEEVUKZ5B_cjs.w}});Object.defineProperty(exports,"unifyUom",{enumerable:true,get:function(){return chunkEEVUKZ5B_cjs.j}});Object.defineProperty(exports,"Value",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.m}});Object.defineProperty(exports,"ValueType",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.g}});Object.defineProperty(exports,"bigIntValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.s}});Object.defineProperty(exports,"chargeAllocation",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.c}});Object.defineProperty(exports,"checkAllocation",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.d}});Object.defineProperty(exports,"checkedArray",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.e}});Object.defineProperty(exports,"colVectorValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.E}});Object.defineProperty(exports,"hexValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.r}});Object.defineProperty(exports,"matrixValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.C}});Object.defineProperty(exports,"numberValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.n}});Object.defineProperty(exports,"rangeValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.F}});Object.defineProperty(exports,"rowVectorValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.D}});Object.defineProperty(exports,"stringValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.t}});Object.defineProperty(exports,"uomValue",{enumerable:true,get:function(){return chunk6U66HQKQ_cjs.u}});exports.VMCheckpointer=l;//# sourceMappingURL=vm.cjs.map
|
|
2
2
|
//# sourceMappingURL=vm.cjs.map
|
package/dist/vm.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { P as PluginFunctionHandler } from './ScopeManager-
|
|
2
|
-
export { B as Bytecode, D as DependencyGraph, E as ExpressionRecord, O as OpRegistry, S as ScopeManager, V as VM, c as createVM, e as executeBytecode, s as sharedOpRegistry } from './ScopeManager-
|
|
1
|
+
import { P as PluginFunctionHandler } from './ScopeManager-BtqiTVjG.cjs';
|
|
2
|
+
export { B as Bytecode, D as DependencyGraph, E as ExpressionRecord, O as OpRegistry, S as ScopeManager, V as VM, c as createVM, e as executeBytecode, s as sharedOpRegistry } from './ScopeManager-BtqiTVjG.cjs';
|
|
3
3
|
import { V as Value } from './Value-DCTqTSeP.cjs';
|
|
4
4
|
export { M as MatrixData, a as MatrixEntry, R as RangeData, b as ValueType, c as bigIntValue, d as colVectorValue, h as hexValue, m as matrixValue, n as numberValue, r as rangeValue, e as rowVectorValue, s as stringValue, u as uomValue } from './Value-DCTqTSeP.cjs';
|
|
5
|
-
export { V as VMCheckpoint, a as VMCheckpointer } from './VMCheckpoints-
|
|
6
|
-
import './BytecodeBuilder-
|
|
7
|
-
import './EngineError-
|
|
8
|
-
import './pipeline-
|
|
5
|
+
export { V as VMCheckpoint, a as VMCheckpointer } from './VMCheckpoints-BFDlaGse.cjs';
|
|
6
|
+
import './BytecodeBuilder-CRYfrFfq.cjs';
|
|
7
|
+
import './EngineError-Cv5q4Rbv.cjs';
|
|
8
|
+
import './pipeline-B4wf3M1h.cjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The ceiling on how much memory one evaluation is allowed to ask for.
|
|
@@ -133,7 +133,8 @@ declare const pluginFunctionRegistry: Record<number, PluginFunctionHandler>;
|
|
|
133
133
|
* an index: two packages independently picking the same arbitrary number
|
|
134
134
|
* would silently overwrite each other's handler in the shared registry.
|
|
135
135
|
*
|
|
136
|
-
* @throws If the index pool (
|
|
136
|
+
* @throws If the index pool is exhausted (up to 65536: two opcode-stream bytes
|
|
137
|
+
* via CALL_PLUGIN_WIDE, the first 256 via the one-byte CALL_PLUGIN).
|
|
137
138
|
*/
|
|
138
139
|
declare function allocatePluginFunctionIndex(): number;
|
|
139
140
|
/**
|
package/dist/vm.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { P as PluginFunctionHandler } from './ScopeManager-
|
|
2
|
-
export { B as Bytecode, D as DependencyGraph, E as ExpressionRecord, O as OpRegistry, S as ScopeManager, V as VM, c as createVM, e as executeBytecode, s as sharedOpRegistry } from './ScopeManager-
|
|
1
|
+
import { P as PluginFunctionHandler } from './ScopeManager-C6c1WmJD.js';
|
|
2
|
+
export { B as Bytecode, D as DependencyGraph, E as ExpressionRecord, O as OpRegistry, S as ScopeManager, V as VM, c as createVM, e as executeBytecode, s as sharedOpRegistry } from './ScopeManager-C6c1WmJD.js';
|
|
3
3
|
import { V as Value } from './Value-DCTqTSeP.js';
|
|
4
4
|
export { M as MatrixData, a as MatrixEntry, R as RangeData, b as ValueType, c as bigIntValue, d as colVectorValue, h as hexValue, m as matrixValue, n as numberValue, r as rangeValue, e as rowVectorValue, s as stringValue, u as uomValue } from './Value-DCTqTSeP.js';
|
|
5
|
-
export { V as VMCheckpoint, a as VMCheckpointer } from './VMCheckpoints-
|
|
6
|
-
import './BytecodeBuilder-
|
|
7
|
-
import './EngineError-
|
|
8
|
-
import './pipeline-
|
|
5
|
+
export { V as VMCheckpoint, a as VMCheckpointer } from './VMCheckpoints-DJdvpliw.js';
|
|
6
|
+
import './BytecodeBuilder-CRYfrFfq.js';
|
|
7
|
+
import './EngineError-Cv5q4Rbv.js';
|
|
8
|
+
import './pipeline-QIT4iD8f.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The ceiling on how much memory one evaluation is allowed to ask for.
|
|
@@ -133,7 +133,8 @@ declare const pluginFunctionRegistry: Record<number, PluginFunctionHandler>;
|
|
|
133
133
|
* an index: two packages independently picking the same arbitrary number
|
|
134
134
|
* would silently overwrite each other's handler in the shared registry.
|
|
135
135
|
*
|
|
136
|
-
* @throws If the index pool (
|
|
136
|
+
* @throws If the index pool is exhausted (up to 65536: two opcode-stream bytes
|
|
137
|
+
* via CALL_PLUGIN_WIDE, the first 256 via the one-byte CALL_PLUGIN).
|
|
137
138
|
*/
|
|
138
139
|
declare function allocatePluginFunctionIndex(): number;
|
|
139
140
|
/**
|
package/dist/vm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as DependencyGraph,b as ScopeManager,c as createVM,d as executeBytecode}from'./chunk-
|
|
1
|
+
export{a as DependencyGraph,b as ScopeManager,c as createVM,d as executeBytecode}from'./chunk-P4ETODMP.js';import'./chunk-JP4JMQOG.js';export{v as OpRegistry,E as allocatePluginFunctionIndex,u as binaryOp,C as builtinFunctions,F as pluginFunctionIndexFor,D as pluginFunctionRegistry,w as sharedOpRegistry,j as unifyUom}from'./chunk-WOIJPV7Z.js';import'./chunk-GWJJRH32.js';import'./chunk-TZYMXNIB.js';import'./chunk-HFKDWQUL.js';import'./chunk-JOIQFDZQ.js';export{m as Value,g as ValueType,s as bigIntValue,c as chargeAllocation,d as checkAllocation,e as checkedArray,E as colVectorValue,r as hexValue,C as matrixValue,n as numberValue,F as rangeValue,D as rowVectorValue,t as stringValue,u as uomValue}from'./chunk-O3ALJLYC.js';import'./chunk-DLAKPF5T.js';import'./chunk-44EOEWGP.js';import'./chunk-YAZ4DUJJ.js';var l=class{constructor(t){this.checkpoints=[];this.vm=t;}snapshot(t,n,e){if(e.length===0)return null;let r=this.checkpoints.length>0?this.checkpoints[this.checkpoints.length-1]:null,o=Object.create(r?.variables??null),i=Object.create(r?.functions??null);for(let s of e){if(this.vm.hasUserFunction(s)){let p=this.vm.getUserFunction(s);p&&(i[s]=p);continue}let u=this.vm.getVar(s);u!==void 0&&(o[s]=u);}let c={lineNumber:t,lineId:n,variables:o,functions:i,parent:r};return this.checkpoints.push(c),c}restoreTo(t){let n=this.getNearestCheckpoint(t);if(!n){this.vm.reset();return}let e=[],r=n;for(;r;)e.unshift(r),r=r.parent;this.vm.reset();for(let o of e){for(let i of Object.keys(o.variables))this.vm.setVar(i,o.variables[i]);for(let i of Object.keys(o.functions)){let c=o.functions[i];this.vm.defineUserFunction(c.name,c.params,c.program);}}}getNearestCheckpoint(t){let n=null;for(let e of this.checkpoints)if(e.lineNumber<=t)n=e;else break;return n}getCheckpointAt(t){return this.checkpoints.find(n=>n.lineNumber===t)}getAllCheckpoints(){return this.checkpoints}lookupVariable(t){if(this.checkpoints.length===0)return;let e=this.checkpoints[this.checkpoints.length-1].variables;for(;e;){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];e=Object.getPrototypeOf(e);}}clear(){this.checkpoints=[];}get count(){return this.checkpoints.length}get isEmpty(){return this.checkpoints.length===0}get vmInstance(){return this.vm}};export{l as VMCheckpointer};//# sourceMappingURL=vm.js.map
|
|
2
2
|
//# sourceMappingURL=vm.js.map
|
package/dist/worker.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
`).forEach((u,d)=>a.set(d+1,u)):o.method==="evaluateLines"?o.args[0].forEach((u,d)=>a.set(d+1,u)):a.set(-1,o.args[0]),a},q=(o,a)=>{if(a.type==="error"){g({kind:"async-error",queryKey:a.queryKey,packageId:a.packageId,error:
|
|
1
|
+
'use strict';var chunkPREIL3IB_cjs=require('./chunk-PREIL3IB.cjs'),chunkFPGYRFJY_cjs=require('./chunk-FPGYRFJY.cjs');require('./chunk-IMXSVHQK.cjs'),require('./chunk-NGBBNL4K.cjs'),require('./chunk-LNZNJSRW.cjs'),require('./chunk-TTFO4YDP.cjs'),require('./chunk-VJP4GGCW.cjs'),require('./chunk-HG4NPDN5.cjs');var chunkUUAFDZK6_cjs=require('./chunk-UUAFDZK6.cjs');require('./chunk-R2SZFJTT.cjs');var chunkKKMLFYVW_cjs=require('./chunk-KKMLFYVW.cjs');require('./chunk-W5ELYJ4Z.cjs'),require('./chunk-HDGARCI2.cjs'),require('./chunk-FVQWN5HZ.cjs'),require('./chunk-RC4M6HBX.cjs'),require('./chunk-UURM7P3P.cjs'),require('./chunk-ZLRJ7TDP.cjs'),require('./chunk-EEVUKZ5B.cjs'),require('./chunk-GWCBPITD.cjs'),require('./chunk-ABVDKMNF.cjs'),require('./chunk-TLG7VZRX.cjs');var chunk5TVI2UPZ_cjs=require('./chunk-5TVI2UPZ.cjs'),chunk2XZCLDHJ_cjs=require('./chunk-2XZCLDHJ.cjs');require('./chunk-6U66HQKQ.cjs'),require('./chunk-BKSKZA4W.cjs'),require('./chunk-EEUA3OJ6.cjs'),require('./chunk-EXCFCHAT.cjs'),require('./chunk-Y7O4D3BJ.cjs'),require('./chunk-FAGFPVYK.cjs'),require('./chunk-5IJD5L3O.cjs'),require('./chunk-S3DFU33X.cjs'),require('./chunk-WEAKI5V5.cjs'),require('./chunk-6QRHN3I6.cjs');var chunkNAZ6PGLS_cjs=require('./chunk-NAZ6PGLS.cjs');var W=class{constructor(r){this.nextId=1;this.pending=new Map;this.resolvedListeners=new Set;this.asyncErrorListeners=new Set;this.terminated=false;this.transport=r,this.transport.onMessage(n=>this.onMessage(n));}init(r){let n=this.nextId++;return new Promise((t,s)=>{this.pending.set(n,{resolve:()=>t(),reject:s}),this.transport.postMessage({kind:"init",id:n,localeCode:r.localeCode,diagnostics:r.diagnostics,config:r.config,packages:r.packages,formatting:r.formatting});})}parseDocument(r,n){let{signal:t,...s}=n??{},i=Object.keys(s).length>0?s:void 0;return this.call("parseDocument",[r,i],t)}evaluateLines(r,n){return this.call("evaluateLines",[r],n?.signal)}evaluateExpression(r,n){return this.call("evaluateExpression",[r],n?.signal)}onResolved(r){return this.resolvedListeners.add(r),()=>this.resolvedListeners.delete(r)}onAsyncError(r){return this.asyncErrorListeners.add(r),()=>this.asyncErrorListeners.delete(r)}terminate(){if(this.terminated)return;this.terminated=true;let r=chunkPREIL3IB_cjs.e();for(let n of this.pending.values())this.unhook(n),n.reject(r);this.pending.clear(),this.resolvedListeners.clear(),this.asyncErrorListeners.clear(),this.transport.terminate();}call(r,n,t){if(this.terminated)return Promise.reject(chunkPREIL3IB_cjs.e());if(t?.aborted)return Promise.reject(chunkPREIL3IB_cjs.d(r));let s=this.nextId++;return new Promise((i,l)=>{let p={resolve:i,reject:l};if(t){let c=()=>{this.pending.has(s)&&(this.pending.delete(s),this.transport.postMessage({kind:"cancel",id:s}),l(chunkPREIL3IB_cjs.d(r)));};p.signal=t,p.onAbort=c,t.addEventListener("abort",c,{once:true});}this.pending.set(s,p),this.transport.postMessage({kind:"request",id:s,method:r,args:n});})}onMessage(r){let n=r;switch(n.kind){case "ready":case "result":{let t=n.kind==="result"?n.value:void 0;this.settle(n.id,s=>s.resolve(t));break}case "error":this.settle(n.id,t=>t.reject(chunkPREIL3IB_cjs.c(n.error)));break;case "async-update":for(let t of [...this.resolvedListeners])t(n.lines);break;case "async-error":for(let t of [...this.asyncErrorListeners])t({queryKey:n.queryKey,packageId:n.packageId,error:chunkPREIL3IB_cjs.c(n.error)});break}}settle(r,n){let t=this.pending.get(r);t&&(this.pending.delete(r),this.unhook(t),n(t));}unhook(r){r.signal&&r.onAbort&&r.signal.removeEventListener("abort",r.onAbort);}};async function K(e){let r=new W(e.transport);return await r.init(e),r}function C(e){return e>0?"Infinity":e<0?"-Infinity":"NaN"}function U(e){let r=e.data.map(n=>typeof n=="object"&&n!==null?chunk2XZCLDHJ_cjs.R(n):typeof n=="number"&&!Number.isFinite(n)?C(n):n);return {rows:e.rows,cols:e.cols,cells:r,hasSymbolic:e.hasSymbolic}}function m(e,r){let n=e.toNumber(),t={type:e.type,text:chunkUUAFDZK6_cjs.c(e,r),number:Number.isFinite(n)?n:0};Number.isFinite(n)||(t.nonFinite=C(n)),e.unit!==void 0&&(t.unit=e.unit),e.timedOut!==void 0&&(t.timedOut=e.timedOut);let s=e.value;if(typeof s=="bigint")t.bigint=s.toString();else if(e.type===7)t.matrix=U(s);else if(e.type===8){let i=s;t.range={min:i.min,max:i.max};}else if(e.type===14){let i=s;t.colour={hex:chunk5TVI2UPZ_cjs.f(i),r:i.r,g:i.g,b:i.b,a:i.a,format:i.format,css:chunk5TVI2UPZ_cjs.g(i)};}else if(e.type===16){let i=s;t.chart={kind:i.kind,points:i.points.map(l=>[l[0],l[1]]),label:i.label,domain:[i.domain[0],i.domain[1]],range:[i.range[0],i.range[1]],...i.expr!==void 0?{expr:i.expr}:{}};}else if(e.type===17){let i=s;t.ipCidr={...i.addr!==void 0?{addr:i.addr}:{},...i.prefix!==void 0?{prefix:i.prefix}:{},text:chunkUUAFDZK6_cjs.c(e).replace(/^=\s*/,"")};}return t}function O(e,r){return e?m(e,r):null}function _(e,r){return {start:e.start,end:e.end,expression:e.expression,lineNumber:e.lineNumber,columnNumber:e.columnNumber,result:O(e.result,r),error:e.error??null}}function y(e,r){return {lineNumber:e.lineNumber,text:e.text,startPosition:e.startPosition,endPosition:e.endPosition,isEmpty:e.isEmpty,hasInlineSolves:e.hasInlineSolves,inlineSolves:e.inlineSolves.map(n=>_(n,r)),expression:e.expression,result:O(e.result,r),error:e.error}}function R(e,r){let n={lines:e.lines.map(t=>y(t,r)),totalLines:e.totalLines,errors:[...e.errors]};return e.diagnostics!==void 0&&(n.diagnostics=e.diagnostics),n}function H(e,r){if(r===void 0)return e;let n=new Map(e.map(s=>[s.name,s])),t=[];for(let s of r){let i=n.get(s);if(!i)throw chunkNAZ6PGLS_cjs.c.config(chunkPREIL3IB_cjs.a.WORKER_UNKNOWN_PACKAGE,`No package named "${s}" is available in this worker runtime`,{name:s,available:[...n.keys()]});t.push(i);}return t}function B(e,r={}){let n=r.packages??chunkKKMLFYVW_cjs.y,t=null,s,i=new Map,l=new Map,p=null,c=null,g=o=>e.postMessage(o),h=(o,a)=>{g({kind:"error",id:o,error:chunkPREIL3IB_cjs.b(chunkNAZ6PGLS_cjs.d(a))});},N=o=>{let a=new Map;return o.method==="parseDocument"?o.args[0].split(`
|
|
2
|
+
`).forEach((u,d)=>a.set(d+1,u)):o.method==="evaluateLines"?o.args[0].forEach((u,d)=>a.set(d+1,u)):a.set(-1,o.args[0]),a},q=(o,a)=>{if(a.type==="error"){g({kind:"async-error",queryKey:a.queryKey,packageId:a.packageId,error:chunkPREIL3IB_cjs.b(chunkNAZ6PGLS_cjs.d(a.error))});return}let u=[];for(let d of a.lineNumbers){let f=l.get(d);if(f!==void 0)try{let L=o.evaluateLine(d,f);L&&u.push({lineNumber:d,value:m(L,s)});}catch{}}u.length>0&&g({kind:"async-update",lines:u});},F=o=>{c?.();let a=o.getEventStream().getReader();c=()=>{a.cancel();},(async()=>{try{for(;;){let{done:u,value:d}=await a.read();if(u)return;q(o,d);}}catch{}})();},D=o=>{try{let a=H(n,o.packages);t=new chunkFPGYRFJY_cjs.n({locale:o.localeCode??"en",diagnostics:o.diagnostics??!1,config:o.config,packages:a}),s=o.formatting,F(t),g({kind:"ready",id:o.id});}catch(a){h(o.id,a);}},V=(o,a)=>{let{method:u,args:d}=a;switch(u){case "parseDocument":return R(o.parseDocument(d[0],d[1]),s);case "evaluateLines":return o.evaluateLines(d[0]).map(f=>y(f,s));case "evaluateExpression":return m(o.evaluateExpression(d[0]),s);default:throw chunkNAZ6PGLS_cjs.c.execution(chunkPREIL3IB_cjs.a.WORKER_UNKNOWN_METHOD,`The worker runtime has no method named "${String(u)}"`,{method:u})}},j=o=>{let a=t;if(!a){h(o.id,chunkNAZ6PGLS_cjs.c.execution(chunkPREIL3IB_cjs.a.WORKER_NOT_INITIALISED,"The worker received a request before its engine finished initialising"));return}p?.abort();let u=new AbortController;p=u,l=N(o),i.set(o.id,u),a.setKeystrokeSignal(u.signal);try{let d=V(a,o);g({kind:"result",id:o.id,value:d});}catch(d){h(o.id,d);}finally{i.delete(o.id),a.setKeystrokeSignal(null);}};return e.onMessage(o=>{let a=o;switch(a.kind){case "init":D(a);break;case "request":j(a);break;case "cancel":i.get(a.id)?.abort();break}}),()=>{c?.(),c=null,p?.abort(),p=null,l=new Map;for(let o of i.values())o.abort();i.clear(),t?.clear(),t=null,e.terminate();}}function G(e){return typeof globalThis.structuredClone=="function"?globalThis.structuredClone(e):JSON.parse(JSON.stringify(e))}function J(){let e=null,r=null,n=true,t=(l,p)=>{let c=G(p);queueMicrotask(()=>{n&&l()?.(c);});};return {client:{postMessage:l=>t(()=>r,l),onMessage:l=>{e=l;},terminate:()=>{n=false;}},host:{postMessage:l=>t(()=>e,l),onMessage:l=>{r=l;},terminate:()=>{n=false;}}}}function $(e){return {postMessage:r=>e.postMessage(r),onMessage:r=>{let n=t=>r(t.data);typeof e.addEventListener=="function"?e.addEventListener("message",n):e.onmessage=n,e.start?.();},terminate:()=>{e.terminate?.(),e.close?.();}}}function Q(e){return {postMessage:r=>e.postMessage(r),onMessage:r=>{e.on("message",n=>r(n));},terminate:()=>{e.terminate?.(),e.close?.();}}}exports.createLinkedTransports=J;exports.createWorkerEngine=K;exports.eventTargetTransport=$;exports.messagePortTransport=Q;exports.serializeParsedLine=y;exports.serializeParsingResult=R;exports.serializeValue=m;exports.startWorkerRuntime=B;//# sourceMappingURL=worker.cjs.map
|
|
3
3
|
//# sourceMappingURL=worker.cjs.map
|
package/dist/worker.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { E as EngineConfigOverride } from './Configuration-BGQn-cJ8.cjs';
|
|
2
|
-
import { U as UnifiedParsingOptions, I as IEnginePackage, J as ParsedLine, P as ParsingResult } from './PackageRegistry-
|
|
2
|
+
import { U as UnifiedParsingOptions, I as IEnginePackage, J as ParsedLine, P as ParsingResult } from './PackageRegistry-CZO1IbS-.cjs';
|
|
3
3
|
import { F as FormattingSettings } from './FormattingSettings-bRKjU7wI.cjs';
|
|
4
|
-
import { E as EngineError } from './EngineError-
|
|
4
|
+
import { E as EngineError } from './EngineError-Cv5q4Rbv.cjs';
|
|
5
5
|
import { b as ValueType, i as ColourFormat, V as Value } from './Value-DCTqTSeP.cjs';
|
|
6
|
-
import { a as DiagnosticReportJSON } from './pipeline-
|
|
7
|
-
import { S as SerializedEngineError } from './WorkerError-
|
|
8
|
-
import './Parselet-
|
|
9
|
-
import './BytecodeBuilder-
|
|
6
|
+
import { a as DiagnosticReportJSON } from './pipeline-B4wf3M1h.cjs';
|
|
7
|
+
import { S as SerializedEngineError } from './WorkerError-FH7KXX4_.cjs';
|
|
8
|
+
import './Parselet-DOGmj6N6.cjs';
|
|
9
|
+
import './BytecodeBuilder-CRYfrFfq.cjs';
|
|
10
10
|
import './Token-CbP_OutD.cjs';
|
|
11
|
-
import './Lexer-
|
|
11
|
+
import './Lexer-CCHFDcgP.cjs';
|
|
12
12
|
import './resolvers.cjs';
|
|
13
13
|
import '@tanstack/query-core';
|
|
14
|
-
import './TokenNormalizer-
|
|
15
|
-
import './ScopeManager-
|
|
14
|
+
import './TokenNormalizer-BfTHg1qt.cjs';
|
|
15
|
+
import './ScopeManager-BtqiTVjG.cjs';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The seam between the harness and whatever actually carries messages.
|
package/dist/worker.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { E as EngineConfigOverride } from './Configuration-BGQn-cJ8.js';
|
|
2
|
-
import { U as UnifiedParsingOptions, I as IEnginePackage, J as ParsedLine, P as ParsingResult } from './PackageRegistry-
|
|
2
|
+
import { U as UnifiedParsingOptions, I as IEnginePackage, J as ParsedLine, P as ParsingResult } from './PackageRegistry-CK_JoX50.js';
|
|
3
3
|
import { F as FormattingSettings } from './FormattingSettings-bRKjU7wI.js';
|
|
4
|
-
import { E as EngineError } from './EngineError-
|
|
4
|
+
import { E as EngineError } from './EngineError-Cv5q4Rbv.js';
|
|
5
5
|
import { b as ValueType, i as ColourFormat, V as Value } from './Value-DCTqTSeP.js';
|
|
6
|
-
import { a as DiagnosticReportJSON } from './pipeline-
|
|
7
|
-
import { S as SerializedEngineError } from './WorkerError-
|
|
8
|
-
import './Parselet-
|
|
9
|
-
import './BytecodeBuilder-
|
|
6
|
+
import { a as DiagnosticReportJSON } from './pipeline-QIT4iD8f.js';
|
|
7
|
+
import { S as SerializedEngineError } from './WorkerError-J3v3ix_z.js';
|
|
8
|
+
import './Parselet-CK0bNO1l.js';
|
|
9
|
+
import './BytecodeBuilder-CRYfrFfq.js';
|
|
10
10
|
import './Token-CbP_OutD.js';
|
|
11
|
-
import './Lexer-
|
|
11
|
+
import './Lexer-CqagTewQ.js';
|
|
12
12
|
import './resolvers.js';
|
|
13
13
|
import '@tanstack/query-core';
|
|
14
|
-
import './TokenNormalizer-
|
|
15
|
-
import './ScopeManager-
|
|
14
|
+
import './TokenNormalizer-d7F1KQFs.js';
|
|
15
|
+
import './ScopeManager-C6c1WmJD.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The seam between the harness and whatever actually carries messages.
|
package/dist/worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {a,e,d,c as c$2,b}from'./chunk-
|
|
1
|
+
import {a,e,d,c as c$2,b}from'./chunk-XK23K3EJ.js';import {n}from'./chunk-4IIFFJTJ.js';import'./chunk-CUDPOWXA.js';import'./chunk-2RWAXT6O.js';import'./chunk-7E7NXKQ5.js';import'./chunk-MIQBJGGR.js';import'./chunk-P4ETODMP.js';import'./chunk-JP4JMQOG.js';import {c}from'./chunk-IPOU3JTA.js';import'./chunk-XEIDV5JP.js';import {y as y$1}from'./chunk-AYTEPHRO.js';import'./chunk-C5MP74ER.js';import'./chunk-5SDSIRPL.js';import'./chunk-Q3PSTNSY.js';import'./chunk-YFX53MZF.js';import'./chunk-76F3LCIL.js';import'./chunk-TCZSPH4A.js';import'./chunk-WOIJPV7Z.js';import'./chunk-GWJJRH32.js';import'./chunk-TZYMXNIB.js';import'./chunk-HFKDWQUL.js';import {g,f}from'./chunk-5TCSFTZD.js';import {R as R$1}from'./chunk-JOIQFDZQ.js';import'./chunk-O3ALJLYC.js';import'./chunk-DLAKPF5T.js';import'./chunk-Q7HPPLMG.js';import'./chunk-UZSPBFZN.js';import'./chunk-JPFCXLJV.js';import'./chunk-TVE2DNPU.js';import'./chunk-IJMNVBIS.js';import'./chunk-LHLW7JLS.js';import'./chunk-UWAXJX5G.js';import'./chunk-44EOEWGP.js';import {c as c$1,d as d$1}from'./chunk-YAZ4DUJJ.js';var W=class{constructor(r){this.nextId=1;this.pending=new Map;this.resolvedListeners=new Set;this.asyncErrorListeners=new Set;this.terminated=false;this.transport=r,this.transport.onMessage(n=>this.onMessage(n));}init(r){let n=this.nextId++;return new Promise((t,s)=>{this.pending.set(n,{resolve:()=>t(),reject:s}),this.transport.postMessage({kind:"init",id:n,localeCode:r.localeCode,diagnostics:r.diagnostics,config:r.config,packages:r.packages,formatting:r.formatting});})}parseDocument(r,n){let{signal:t,...s}=n??{},i=Object.keys(s).length>0?s:void 0;return this.call("parseDocument",[r,i],t)}evaluateLines(r,n){return this.call("evaluateLines",[r],n?.signal)}evaluateExpression(r,n){return this.call("evaluateExpression",[r],n?.signal)}onResolved(r){return this.resolvedListeners.add(r),()=>this.resolvedListeners.delete(r)}onAsyncError(r){return this.asyncErrorListeners.add(r),()=>this.asyncErrorListeners.delete(r)}terminate(){if(this.terminated)return;this.terminated=true;let r=e();for(let n of this.pending.values())this.unhook(n),n.reject(r);this.pending.clear(),this.resolvedListeners.clear(),this.asyncErrorListeners.clear(),this.transport.terminate();}call(r,n,t){if(this.terminated)return Promise.reject(e());if(t?.aborted)return Promise.reject(d(r));let s=this.nextId++;return new Promise((i,l)=>{let p={resolve:i,reject:l};if(t){let c=()=>{this.pending.has(s)&&(this.pending.delete(s),this.transport.postMessage({kind:"cancel",id:s}),l(d(r)));};p.signal=t,p.onAbort=c,t.addEventListener("abort",c,{once:true});}this.pending.set(s,p),this.transport.postMessage({kind:"request",id:s,method:r,args:n});})}onMessage(r){let n=r;switch(n.kind){case "ready":case "result":{let t=n.kind==="result"?n.value:void 0;this.settle(n.id,s=>s.resolve(t));break}case "error":this.settle(n.id,t=>t.reject(c$2(n.error)));break;case "async-update":for(let t of [...this.resolvedListeners])t(n.lines);break;case "async-error":for(let t of [...this.asyncErrorListeners])t({queryKey:n.queryKey,packageId:n.packageId,error:c$2(n.error)});break}}settle(r,n){let t=this.pending.get(r);t&&(this.pending.delete(r),this.unhook(t),n(t));}unhook(r){r.signal&&r.onAbort&&r.signal.removeEventListener("abort",r.onAbort);}};async function K(e){let r=new W(e.transport);return await r.init(e),r}function C(e){return e>0?"Infinity":e<0?"-Infinity":"NaN"}function U(e){let r=e.data.map(n=>typeof n=="object"&&n!==null?R$1(n):typeof n=="number"&&!Number.isFinite(n)?C(n):n);return {rows:e.rows,cols:e.cols,cells:r,hasSymbolic:e.hasSymbolic}}function m(e,r){let n=e.toNumber(),t={type:e.type,text:c(e,r),number:Number.isFinite(n)?n:0};Number.isFinite(n)||(t.nonFinite=C(n)),e.unit!==void 0&&(t.unit=e.unit),e.timedOut!==void 0&&(t.timedOut=e.timedOut);let s=e.value;if(typeof s=="bigint")t.bigint=s.toString();else if(e.type===7)t.matrix=U(s);else if(e.type===8){let i=s;t.range={min:i.min,max:i.max};}else if(e.type===14){let i=s;t.colour={hex:f(i),r:i.r,g:i.g,b:i.b,a:i.a,format:i.format,css:g(i)};}else if(e.type===16){let i=s;t.chart={kind:i.kind,points:i.points.map(l=>[l[0],l[1]]),label:i.label,domain:[i.domain[0],i.domain[1]],range:[i.range[0],i.range[1]],...i.expr!==void 0?{expr:i.expr}:{}};}else if(e.type===17){let i=s;t.ipCidr={...i.addr!==void 0?{addr:i.addr}:{},...i.prefix!==void 0?{prefix:i.prefix}:{},text:c(e).replace(/^=\s*/,"")};}return t}function O(e,r){return e?m(e,r):null}function _(e,r){return {start:e.start,end:e.end,expression:e.expression,lineNumber:e.lineNumber,columnNumber:e.columnNumber,result:O(e.result,r),error:e.error??null}}function y(e,r){return {lineNumber:e.lineNumber,text:e.text,startPosition:e.startPosition,endPosition:e.endPosition,isEmpty:e.isEmpty,hasInlineSolves:e.hasInlineSolves,inlineSolves:e.inlineSolves.map(n=>_(n,r)),expression:e.expression,result:O(e.result,r),error:e.error}}function R(e,r){let n={lines:e.lines.map(t=>y(t,r)),totalLines:e.totalLines,errors:[...e.errors]};return e.diagnostics!==void 0&&(n.diagnostics=e.diagnostics),n}function H(e,r){if(r===void 0)return e;let n=new Map(e.map(s=>[s.name,s])),t=[];for(let s of r){let i=n.get(s);if(!i)throw c$1.config(a.WORKER_UNKNOWN_PACKAGE,`No package named "${s}" is available in this worker runtime`,{name:s,available:[...n.keys()]});t.push(i);}return t}function B(e,r={}){let n$1=r.packages??y$1,t=null,s,i=new Map,l=new Map,p=null,c=null,g=o=>e.postMessage(o),h=(o,a)=>{g({kind:"error",id:o,error:b(d$1(a))});},N=o=>{let a=new Map;return o.method==="parseDocument"?o.args[0].split(`
|
|
2
2
|
`).forEach((u,d)=>a.set(d+1,u)):o.method==="evaluateLines"?o.args[0].forEach((u,d)=>a.set(d+1,u)):a.set(-1,o.args[0]),a},q=(o,a)=>{if(a.type==="error"){g({kind:"async-error",queryKey:a.queryKey,packageId:a.packageId,error:b(d$1(a.error))});return}let u=[];for(let d of a.lineNumbers){let f=l.get(d);if(f!==void 0)try{let L=o.evaluateLine(d,f);L&&u.push({lineNumber:d,value:m(L,s)});}catch{}}u.length>0&&g({kind:"async-update",lines:u});},F=o=>{c?.();let a=o.getEventStream().getReader();c=()=>{a.cancel();},(async()=>{try{for(;;){let{done:u,value:d}=await a.read();if(u)return;q(o,d);}}catch{}})();},D=o=>{try{let a=H(n$1,o.packages);t=new n({locale:o.localeCode??"en",diagnostics:o.diagnostics??!1,config:o.config,packages:a}),s=o.formatting,F(t),g({kind:"ready",id:o.id});}catch(a){h(o.id,a);}},V=(o,a$1)=>{let{method:u,args:d}=a$1;switch(u){case "parseDocument":return R(o.parseDocument(d[0],d[1]),s);case "evaluateLines":return o.evaluateLines(d[0]).map(f=>y(f,s));case "evaluateExpression":return m(o.evaluateExpression(d[0]),s);default:throw c$1.execution(a.WORKER_UNKNOWN_METHOD,`The worker runtime has no method named "${String(u)}"`,{method:u})}},j=o=>{let a$1=t;if(!a$1){h(o.id,c$1.execution(a.WORKER_NOT_INITIALISED,"The worker received a request before its engine finished initialising"));return}p?.abort();let u=new AbortController;p=u,l=N(o),i.set(o.id,u),a$1.setKeystrokeSignal(u.signal);try{let d=V(a$1,o);g({kind:"result",id:o.id,value:d});}catch(d){h(o.id,d);}finally{i.delete(o.id),a$1.setKeystrokeSignal(null);}};return e.onMessage(o=>{let a=o;switch(a.kind){case "init":D(a);break;case "request":j(a);break;case "cancel":i.get(a.id)?.abort();break}}),()=>{c?.(),c=null,p?.abort(),p=null,l=new Map;for(let o of i.values())o.abort();i.clear(),t?.clear(),t=null,e.terminate();}}function G(e){return typeof globalThis.structuredClone=="function"?globalThis.structuredClone(e):JSON.parse(JSON.stringify(e))}function J(){let e=null,r=null,n=true,t=(l,p)=>{let c=G(p);queueMicrotask(()=>{n&&l()?.(c);});};return {client:{postMessage:l=>t(()=>r,l),onMessage:l=>{e=l;},terminate:()=>{n=false;}},host:{postMessage:l=>t(()=>e,l),onMessage:l=>{r=l;},terminate:()=>{n=false;}}}}function $(e){return {postMessage:r=>e.postMessage(r),onMessage:r=>{let n=t=>r(t.data);typeof e.addEventListener=="function"?e.addEventListener("message",n):e.onmessage=n,e.start?.();},terminate:()=>{e.terminate?.(),e.close?.();}}}function Q(e){return {postMessage:r=>e.postMessage(r),onMessage:r=>{e.on("message",n=>r(n));},terminate:()=>{e.terminate?.(),e.close?.();}}}export{J as createLinkedTransports,K as createWorkerEngine,$ as eventTargetTransport,Q as messagePortTransport,y as serializeParsedLine,R as serializeParsingResult,m as serializeValue,B as startWorkerRuntime};//# sourceMappingURL=worker.js.map
|
|
3
3
|
//# sourceMappingURL=worker.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solve-engine",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "An embeddable expression engine for natural-language calculations: units, currencies, percentages, dates and matrices, with the parsing and evaluation plumbing already built.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"expression-evaluator",
|