@ohtaman/washi 0.8.2 → 0.9.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.
Files changed (47) hide show
  1. package/README.md +3 -0
  2. package/dist/browser/solvers/{highs-__vite-browser-external-Dn-83hnF.js → highs-__vite-browser-external-xcxOpLMD.js} +1 -1
  3. package/dist/browser/solvers/{highs-browser-runtime-0Bgq5ksG.js → highs-browser-runtime-ccRmE4qj.js} +1 -1
  4. package/dist/browser/solvers/highs-inline.js +51 -0
  5. package/dist/{lib/solvers/loader-CDpPXN_F.js → browser/solvers/highs-loader-Csn3-0tq.js} +241 -149
  6. package/dist/browser/solvers/highs-worker.js +17 -16
  7. package/dist/browser/solvers/highs.js +295 -255
  8. package/dist/browser/solvers/pumpkin-inline.js +51 -0
  9. package/dist/{lib/solvers/loader-Ow74Fa1B.js → browser/solvers/pumpkin-loader-BI3n3dWO.js} +145 -55
  10. package/dist/browser/solvers/pumpkin-worker.js +24 -23
  11. package/dist/browser/solvers/pumpkin.js +307 -288
  12. package/dist/browser/washi.js +365 -316
  13. package/dist/browser/washi.min.js +4 -4
  14. package/dist/lib/solvers/embedded-wasm-CSFlLV5N.js +49 -0
  15. package/dist/lib/solvers/highs-node-runtime.js +1 -7
  16. package/dist/lib/solvers/highs-worker.js +19 -17
  17. package/dist/lib/solvers/highs.js +153 -112
  18. package/dist/{browser/solvers/highs-loader-BLY3wzDH.js → lib/solvers/loader-DCtyxsfF.js} +56 -36
  19. package/dist/{browser/solvers/pumpkin-loader-CvdaKxf4.js → lib/solvers/loader-b5PNpCmX.js} +58 -33
  20. package/dist/lib/solvers/pumpkin-worker.js +25 -23
  21. package/dist/lib/solvers/pumpkin.js +212 -192
  22. package/dist/lib/washi.js +365 -316
  23. package/dist/types/modeler/model.d.ts +7 -0
  24. package/dist/types/modeler/model.d.ts.map +1 -1
  25. package/dist/types/modeler/solvers/embedded-wasm.d.ts +36 -0
  26. package/dist/types/modeler/solvers/embedded-wasm.d.ts.map +1 -0
  27. package/dist/types/modeler/solvers/highs/loader.d.ts.map +1 -1
  28. package/dist/types/modeler/solvers/highs/node-runtime.d.ts.map +1 -1
  29. package/dist/types/modeler/solvers/highs/worker-client.d.ts.map +1 -1
  30. package/dist/types/modeler/solvers/inline-pack.d.ts +6 -0
  31. package/dist/types/modeler/solvers/inline-pack.d.ts.map +1 -0
  32. package/dist/types/modeler/solvers/pumpkin/loader.d.ts +1 -1
  33. package/dist/types/modeler/solvers/pumpkin/loader.d.ts.map +1 -1
  34. package/dist/types/modeler/solvers/pumpkin/solver.d.ts.map +1 -1
  35. package/dist/types/modeler/solvers/pumpkin/worker-client.d.ts.map +1 -1
  36. package/dist/types/modeler/solvers/pumpkin/worker.d.ts +1 -0
  37. package/dist/types/modeler/solvers/pumpkin/worker.d.ts.map +1 -1
  38. package/docs/getting-started/ai-agents.md +56 -1
  39. package/docs/getting-started/coding-agents.md +38 -5
  40. package/docs/getting-started/runtimes.md +63 -1
  41. package/docs/solvers/highs.md +2 -0
  42. package/docs/solvers/pumpkin.md +2 -0
  43. package/llms-full.txt +123 -2
  44. package/llms.txt +56 -1
  45. package/package.json +12 -1
  46. package/skills/washi/SKILL.md +75 -14
  47. package/skills/washi/references/single-html.md +330 -0
@@ -1,6 +1,6 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./highs-loader-BLY3wzDH.js";
1
+ import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, y as v } from "./highs-loader-Csn3-0tq.js";
2
2
  //#region src/modeler/constraint.ts
3
- var _ = 0, v = class e {
3
+ var y = 0, b = class e {
4
4
  kind = "constraint";
5
5
  id;
6
6
  _lhs;
@@ -15,13 +15,13 @@ var _ = 0, v = class e {
15
15
  slack = null;
16
16
  dual = null;
17
17
  addTerm(e, t) {
18
- return t === 0 ? this : (this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._lhs.addTerm(e, t), w(this.ownerModel), this);
18
+ return t === 0 ? this : (this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._lhs.addTerm(e, t), E(this.ownerModel), this);
19
19
  }
20
20
  setTerm(e, t) {
21
- return this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._lhs.setTerm(e, t), w(this.ownerModel), this;
21
+ return this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._lhs.setTerm(e, t), E(this.ownerModel), this;
22
22
  }
23
23
  constructor(e, t, n, r) {
24
- this.id = ++_, this._lhs = e, this._sense = t, this._rhs = n;
24
+ this.id = ++y, this._lhs = e, this._sense = t, this._rhs = n;
25
25
  let i = typeof r == "string" ? r.trim() : void 0;
26
26
  i && i.length > 0 ? (this._name = i, this.hasExplicitName = !0) : (this._name = `c_${this.id}`, this.hasExplicitName = !1);
27
27
  }
@@ -29,27 +29,27 @@ var _ = 0, v = class e {
29
29
  return this._lhs;
30
30
  }
31
31
  set lhs(e) {
32
- this._lhs !== e && (this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._lhs = e, w(this.ownerModel));
32
+ this._lhs !== e && (this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._lhs = e, E(this.ownerModel));
33
33
  }
34
34
  get sense() {
35
35
  return this._sense;
36
36
  }
37
37
  set sense(e) {
38
38
  if (e === "!=" && !Number.isSafeInteger(this._rhs)) throw Error(`Discrete "!=" in constraint "${this._name}" requires a safe integer RHS, received ${this._rhs}.`);
39
- this._sense !== e && (this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._sense = e, w(this.ownerModel));
39
+ this._sense !== e && (this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._sense = e, E(this.ownerModel));
40
40
  }
41
41
  get rhs() {
42
42
  return this._rhs;
43
43
  }
44
44
  set rhs(e) {
45
45
  if (this._sense === "!=" && !Number.isSafeInteger(e)) throw Error(`Discrete "!=" in constraint "${this._name}" requires a safe integer RHS, received ${e}.`);
46
- Object.is(this._rhs, e) || (this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._rhs = e, w(this.ownerModel));
46
+ Object.is(this._rhs, e) || (this._indicatorOrigin = void 0, this._indicatorSnapshot = void 0, this._rhs = e, E(this.ownerModel));
47
47
  }
48
48
  get name() {
49
49
  return this._name;
50
50
  }
51
51
  set name(e) {
52
- this._name !== e && (this._name = e, w(this.ownerModel)), this.hasExplicitName = !0;
52
+ this._name !== e && (this._name = e, E(this.ownerModel)), this.hasExplicitName = !0;
53
53
  }
54
54
  get _indicatorMeta() {
55
55
  let e = this._indicatorOrigin, t = this._indicatorSnapshot;
@@ -93,19 +93,19 @@ var _ = 0, v = class e {
93
93
  this._name = e, this.hasExplicitName = t;
94
94
  }
95
95
  and(e) {
96
- return new S("and", [this, e]);
96
+ return new w("and", [this, e]);
97
97
  }
98
98
  or(e) {
99
- return new S("or", [this, e]);
99
+ return new w("or", [this, e]);
100
100
  }
101
101
  implies(e) {
102
- return new S("implies", [this, e]);
102
+ return new w("implies", [this, e]);
103
103
  }
104
104
  xor(e) {
105
- return new S("xor", [this, e]);
105
+ return new w("xor", [this, e]);
106
106
  }
107
107
  not() {
108
- return new S("not", [this]);
108
+ return new w("not", [this]);
109
109
  }
110
110
  add(e) {
111
111
  throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
@@ -155,46 +155,46 @@ var _ = 0, v = class e {
155
155
  return `${this.name}: ${this.lhs.toString()} ${e} ${this.rhs}`;
156
156
  }
157
157
  };
158
- function y(e) {
159
- return e instanceof v || typeof e == "object" && !!e && "sense" in e && "lhs" in e && "rhs" in e;
158
+ function x(e) {
159
+ return e instanceof b || typeof e == "object" && !!e && "sense" in e && "lhs" in e && "rhs" in e;
160
160
  }
161
161
  //#endregion
162
162
  //#region src/modeler/boolean-expr.ts
163
- function b(e, t) {
164
- if (e instanceof x || e instanceof v) return e;
163
+ function S(e, t) {
164
+ if (e instanceof C || e instanceof b) return e;
165
165
  throw typeof e == "object" && e && ("terms" in e || "quadTerms" in e) ? Error(`Cannot use an arithmetic expression without a comparison operator (<=, >=, ==) in logical operator "${t}". Use a comparison constraint such as expr\`\${x} <= 10\` or a BoolVar/BoolExpr.`) : typeof e == "object" && e && "id" in e && "name" in e && "lb" in e && "ub" in e && !("sense" in e) ? Error(`Invalid operand passed to logical operator "${t}": expected a BoolVar, BoolExpr, or Constraint, but received numeric variable "${e.name}". Use m.bool() for propositional variables, add a comparison such as expr\`\${x} == 1\`, or use m.indicator(binVar, constraint) for 0-1 Big-M indicator constraints.`) : Error(`Invalid operand passed to logical operator "${t}": expected a BoolVar, BoolExpr, or Constraint.`);
166
166
  }
167
- var x = class {
167
+ var C = class {
168
168
  and(e) {
169
- return new S("and", [this, b(e, "and")]);
169
+ return new w("and", [this, S(e, "and")]);
170
170
  }
171
171
  or(e) {
172
- return new S("or", [this, b(e, "or")]);
172
+ return new w("or", [this, S(e, "or")]);
173
173
  }
174
174
  implies(e) {
175
- return new S("implies", [this, b(e, "implies")]);
175
+ return new w("implies", [this, S(e, "implies")]);
176
176
  }
177
177
  xor(e) {
178
- return new S("xor", [this, b(e, "xor")]);
178
+ return new w("xor", [this, S(e, "xor")]);
179
179
  }
180
180
  not() {
181
- return new S("not", [this]);
181
+ return new w("not", [this]);
182
182
  }
183
- }, S = class extends x {
183
+ }, w = class extends C {
184
184
  op;
185
185
  children;
186
186
  constructor(e, t) {
187
- super(), this.op = e, this.children = t.map((t) => b(t, e));
187
+ super(), this.op = e, this.children = t.map((t) => S(t, e));
188
188
  }
189
189
  toString() {
190
190
  return this.op === "not" ? `not(${this.children[0].toString()})` : `(${this.children.map((e) => e.toString()).join(` ${this.op} `)})`;
191
191
  }
192
- }, C = /* @__PURE__ */ new WeakMap();
193
- function w(e) {
194
- e && C.get(e)?.();
195
- }
196
- var T = 1e-6;
192
+ }, T = /* @__PURE__ */ new WeakMap();
197
193
  function E(e) {
194
+ e && T.get(e)?.();
195
+ }
196
+ var D = 1e-6;
197
+ function O(e) {
198
198
  if (typeof e.lb != "number" || Number.isNaN(e.lb)) throw Error(`Variable "${e.name}" has invalid lower bound: ${e.lb} (NaN or non-numeric bound is not allowed).`);
199
199
  if (e.lb === Infinity) throw Error(`Variable "${e.name}" has invalid lower bound: +Infinity is not allowed as a lower bound.`);
200
200
  if (typeof e.ub != "number" || Number.isNaN(e.ub)) throw Error(`Variable "${e.name}" has invalid upper bound: ${e.ub} (NaN or non-numeric bound is not allowed).`);
@@ -203,16 +203,16 @@ function E(e) {
203
203
  if (e.initialValue !== void 0) {
204
204
  if (typeof e.initialValue != "number" || !Number.isFinite(e.initialValue)) throw Error(`Variable "${e.name}" has invalid initialValue: ${String(e.initialValue)} (initialValue must be a finite number).`);
205
205
  let t = e.type === "Binary" ? Math.max(0, e.lb) : e.lb, n = e.type === "Binary" ? Math.min(1, e.ub) : e.ub;
206
- if (e.initialValue < t - 1e-6 || e.initialValue > n + 1e-6) throw Error(`Variable "${e.name}" has initialValue (${e.initialValue}) outside its bounds [${t}, ${n}] (tolerance ${T}).`);
206
+ if (e.initialValue < t - 1e-6 || e.initialValue > n + 1e-6) throw Error(`Variable "${e.name}" has initialValue (${e.initialValue}) outside its bounds [${t}, ${n}] (tolerance ${D}).`);
207
207
  if (e.type === "Integer" || e.type === "Binary") {
208
208
  let r = Math.round(e.initialValue);
209
- if (Math.abs(e.initialValue - r) > 1e-6 || r < t || r > n) throw Error(`Variable "${e.name}" of type "${e.type}" has non-integral or out-of-domain initialValue: ${e.initialValue} (must be within ${T} of an integer in [${t}, ${n}]).`);
209
+ if (Math.abs(e.initialValue - r) > 1e-6 || r < t || r > n) throw Error(`Variable "${e.name}" of type "${e.type}" has non-integral or out-of-domain initialValue: ${e.initialValue} (must be within ${D} of an integer in [${t}, ${n}]).`);
210
210
  }
211
211
  }
212
212
  }
213
213
  function ee(e) {
214
214
  if (e.initialValue === void 0) return;
215
- if (E(e), e.type === "Integer" || e.type === "Binary") {
215
+ if (O(e), e.type === "Integer" || e.type === "Binary") {
216
216
  let t = Math.round(e.initialValue);
217
217
  return Object.is(t, -0) ? 0 : t;
218
218
  }
@@ -221,8 +221,8 @@ function ee(e) {
221
221
  }
222
222
  //#endregion
223
223
  //#region src/modeler/variable.ts
224
- var D = 0;
225
- function O(e) {
224
+ var k = 0;
225
+ function A(e) {
226
226
  if (e === void 0) return "Continuous";
227
227
  if (typeof e == "string") {
228
228
  let t = e.toLowerCase();
@@ -232,7 +232,7 @@ function O(e) {
232
232
  }
233
233
  throw Error(`Invalid variable type "${String(e)}": expected "Continuous", "Integer", or "Binary".`);
234
234
  }
235
- var k = class {
235
+ var j = class {
236
236
  id;
237
237
  _name;
238
238
  prefix;
@@ -245,9 +245,9 @@ var k = class {
245
245
  value = null;
246
246
  reducedCost = null;
247
247
  constructor(e = {}) {
248
- this.id = ++D;
248
+ this.id = ++k;
249
249
  let t = typeof e.name == "string" ? e.name.trim() : "", n = typeof e.prefix == "string" ? e.prefix.trim() : "";
250
- this.prefix = n.length > 0 ? n : "x", this.hasExplicitName = t.length > 0, this._name = this.hasExplicitName ? t : `${this.prefix}_${this.id}`, this._type = O(e.type), this._type === "Binary" ? (this._lb = 0, this._ub = 1) : (this._lb = e.lb === void 0 ? 0 : e.lb, this._ub = e.ub === void 0 ? Infinity : e.ub), this._initialValue = e.initialValue === void 0 ? void 0 : Object.is(e.initialValue, -0) ? 0 : e.initialValue, this._initialValue !== void 0 && E(this);
250
+ this.prefix = n.length > 0 ? n : "x", this.hasExplicitName = t.length > 0, this._name = this.hasExplicitName ? t : `${this.prefix}_${this.id}`, this._type = A(e.type), this._type === "Binary" ? (this._lb = 0, this._ub = 1) : (this._lb = e.lb === void 0 ? 0 : e.lb, this._ub = e.ub === void 0 ? Infinity : e.ub), this._initialValue = e.initialValue === void 0 ? void 0 : Object.is(e.initialValue, -0) ? 0 : e.initialValue, this._initialValue !== void 0 && O(this);
251
251
  }
252
252
  get name() {
253
253
  return this._name;
@@ -256,60 +256,60 @@ var k = class {
256
256
  return this._type;
257
257
  }
258
258
  set type(e) {
259
- let t = O(e);
260
- this._type !== t && (this._type = t, w(this.ownerModel));
259
+ let t = A(e);
260
+ this._type !== t && (this._type = t, E(this.ownerModel));
261
261
  }
262
262
  get lb() {
263
263
  return this._lb;
264
264
  }
265
265
  set lb(e) {
266
- Object.is(this._lb, e) || (this._lb = e, w(this.ownerModel));
266
+ Object.is(this._lb, e) || (this._lb = e, E(this.ownerModel));
267
267
  }
268
268
  get ub() {
269
269
  return this._ub;
270
270
  }
271
271
  set ub(e) {
272
- Object.is(this._ub, e) || (this._ub = e, w(this.ownerModel));
272
+ Object.is(this._ub, e) || (this._ub = e, E(this.ownerModel));
273
273
  }
274
274
  get initialValue() {
275
275
  return this._initialValue;
276
276
  }
277
277
  set initialValue(e) {
278
278
  let t = e !== void 0 && Object.is(e, -0) ? 0 : e;
279
- Object.is(this._initialValue, t) || (this._initialValue = t, w(this.ownerModel));
279
+ Object.is(this._initialValue, t) || (this._initialValue = t, E(this.ownerModel));
280
280
  }
281
281
  _assignModelName(e) {
282
282
  this._name = e;
283
283
  }
284
284
  mul(e) {
285
- return typeof e == "number" ? new P(/* @__PURE__ */ new Map([[this, 1]]), 0).mul(e) : new I(/* @__PURE__ */ new Map([[this, 1]]), /* @__PURE__ */ new Map(), 0).mul(e);
285
+ return typeof e == "number" ? new F(/* @__PURE__ */ new Map([[this, 1]]), 0).mul(e) : new L(/* @__PURE__ */ new Map([[this, 1]]), /* @__PURE__ */ new Map(), 0).mul(e);
286
286
  }
287
287
  add(e) {
288
- return e instanceof I ? e.add(this) : new P(/* @__PURE__ */ new Map([[this, 1]]), 0).add(e);
288
+ return e instanceof L ? e.add(this) : new F(/* @__PURE__ */ new Map([[this, 1]]), 0).add(e);
289
289
  }
290
290
  sub(e) {
291
- return e instanceof I ? e.neg().add(this) : new P(/* @__PURE__ */ new Map([[this, 1]]), 0).sub(e);
291
+ return e instanceof L ? e.neg().add(this) : new F(/* @__PURE__ */ new Map([[this, 1]]), 0).sub(e);
292
292
  }
293
293
  neg() {
294
294
  return this.mul(-1);
295
295
  }
296
296
  le(e, t) {
297
- return new P(/* @__PURE__ */ new Map([[this, 1]]), 0).le(e, t);
297
+ return new F(/* @__PURE__ */ new Map([[this, 1]]), 0).le(e, t);
298
298
  }
299
299
  ge(e, t) {
300
- return new P(/* @__PURE__ */ new Map([[this, 1]]), 0).ge(e, t);
300
+ return new F(/* @__PURE__ */ new Map([[this, 1]]), 0).ge(e, t);
301
301
  }
302
302
  eq(e, t) {
303
- return new P(/* @__PURE__ */ new Map([[this, 1]]), 0).eq(e, t);
303
+ return new F(/* @__PURE__ */ new Map([[this, 1]]), 0).eq(e, t);
304
304
  }
305
305
  lt(e, t) {
306
- return new P(/* @__PURE__ */ new Map([[this, 1]]), 0).lt(e, t);
306
+ return new F(/* @__PURE__ */ new Map([[this, 1]]), 0).lt(e, t);
307
307
  }
308
308
  gt(e, t) {
309
- return new P(/* @__PURE__ */ new Map([[this, 1]]), 0).gt(e, t);
309
+ return new F(/* @__PURE__ */ new Map([[this, 1]]), 0).gt(e, t);
310
310
  }
311
311
  ne(e, t) {
312
- return new P(/* @__PURE__ */ new Map([[this, 1]]), 0).ne(e, t);
312
+ return new F(/* @__PURE__ */ new Map([[this, 1]]), 0).ne(e, t);
313
313
  }
314
314
  toString() {
315
315
  return this.name;
@@ -317,7 +317,7 @@ var k = class {
317
317
  };
318
318
  //#endregion
319
319
  //#region src/modeler/expression.ts
320
- function A(e) {
320
+ function M(e) {
321
321
  switch (e.kind) {
322
322
  case "abs": return {
323
323
  kind: "abs",
@@ -339,7 +339,7 @@ function A(e) {
339
339
  };
340
340
  }
341
341
  }
342
- function j(e) {
342
+ function te(e) {
343
343
  switch (e.kind) {
344
344
  case "abs": return `abs(${e.arg.toString()})`;
345
345
  case "max": return `max(${e.args.map((e) => e.toString()).join(", ")})`;
@@ -347,7 +347,7 @@ function j(e) {
347
347
  case "at": return `at([${e.array.map((e) => e.toString()).join(", ")}], ${e.index.toString()})`;
348
348
  }
349
349
  }
350
- function M(e) {
350
+ function N(e) {
351
351
  switch (e.kind) {
352
352
  case "abs": {
353
353
  let t = e.arg.value;
@@ -379,21 +379,21 @@ function M(e) {
379
379
  }
380
380
  }
381
381
  }
382
- function te(e) {
383
- return e instanceof k || typeof e == "object" && !!e && !y(e) && typeof e.id == "number" && typeof e.name == "string" && typeof e.lb == "number" && typeof e.ub == "number" && typeof e.type == "string" && typeof e.mul == "function";
382
+ function ne(e) {
383
+ return e instanceof j || typeof e == "object" && !!e && !x(e) && typeof e.id == "number" && typeof e.name == "string" && typeof e.lb == "number" && typeof e.ub == "number" && typeof e.type == "string" && typeof e.mul == "function";
384
384
  }
385
- function N(e, t, n = /* @__PURE__ */ new Set()) {
385
+ function P(e, t, n = /* @__PURE__ */ new Set()) {
386
386
  if (typeof e == "number") {
387
387
  if (!Number.isSafeInteger(e)) throw Error(`${t} requires Integer or Binary variables and integer constants/coefficients, but received constant ${e}.`);
388
388
  return n;
389
389
  }
390
- if (y(e)) throw Error(`${t} cannot accept a Constraint comparison.`);
391
- if (e instanceof I || "quadTerms" in e && e.quadTerms instanceof Map && "linearTerms" in e && e.linearTerms instanceof Map && typeof e.constant == "number") {
390
+ if (x(e)) throw Error(`${t} cannot accept a Constraint comparison.`);
391
+ if (e instanceof L || "quadTerms" in e && e.quadTerms instanceof Map && "linearTerms" in e && e.linearTerms instanceof Map && typeof e.constant == "number") {
392
392
  let r = e;
393
393
  if (r.quadTerms.size > 0) throw Error(`${t} does not support quadratic expressions.`);
394
- return N(new P(r.linearTerms, r.constant, r.nonlinearTerms ?? []), t, n);
394
+ return P(new F(r.linearTerms, r.constant, r.nonlinearTerms ?? []), t, n);
395
395
  }
396
- if (te(e)) {
396
+ if (ne(e)) {
397
397
  if (e.type !== "Integer" && e.type !== "Binary") throw Error(`${t} requires Integer or Binary variables, but involves Continuous variable "${e.name}".`);
398
398
  return n.add(e), n;
399
399
  }
@@ -409,25 +409,25 @@ function N(e, t, n = /* @__PURE__ */ new Set()) {
409
409
  if (e.coeff === 0) continue;
410
410
  if (!Number.isSafeInteger(e.coeff)) throw Error(`${t} requires integer coefficients on nonlinear expressions, received ${e.coeff}.`);
411
411
  let r = e.atom;
412
- if (r.kind === "abs") N(r.arg, t, n);
413
- else if (r.kind === "max" || r.kind === "min") for (let e of r.args) N(e, t, n);
412
+ if (r.kind === "abs") P(r.arg, t, n);
413
+ else if (r.kind === "max" || r.kind === "min") for (let e of r.args) P(e, t, n);
414
414
  else if (r.kind === "at") {
415
- N(r.index, t, n);
416
- for (let e of r.array) N(e, t, n);
415
+ P(r.index, t, n);
416
+ for (let e of r.array) P(e, t, n);
417
417
  }
418
418
  }
419
419
  return n;
420
420
  }
421
421
  throw Error(`${t} expected an integer-valued scalar expression.`);
422
422
  }
423
- var P = class e {
423
+ var F = class e {
424
424
  kind = "linear";
425
425
  terms;
426
426
  constant;
427
427
  nonlinearTerms;
428
428
  constructor(e = /* @__PURE__ */ new Map(), t = 0, n = []) {
429
429
  this.terms = new Map(e), this.constant = t, this.nonlinearTerms = n.filter((e) => e.coeff !== 0).map((e) => ({
430
- atom: A(e.atom),
430
+ atom: M(e.atom),
431
431
  coeff: e.coeff
432
432
  }));
433
433
  }
@@ -445,8 +445,8 @@ var P = class e {
445
445
  return new e(this.terms, this.constant, this.nonlinearTerms);
446
446
  }
447
447
  add(e) {
448
- if (y(e)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
449
- if (e instanceof I) return e.add(this);
448
+ if (x(e)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
449
+ if (e instanceof L) return e.add(this);
450
450
  let t = this.clone();
451
451
  if (typeof e == "number") t.constant += e;
452
452
  else if ("terms" in e) {
@@ -455,7 +455,7 @@ var P = class e {
455
455
  e === 0 ? t.terms.delete(n) : t.terms.set(n, e);
456
456
  }
457
457
  if (t.constant += e.constant, Array.isArray(e.nonlinearTerms)) for (let n of e.nonlinearTerms) n.coeff !== 0 && t.nonlinearTerms.push({
458
- atom: A(n.atom),
458
+ atom: M(n.atom),
459
459
  coeff: n.coeff
460
460
  });
461
461
  } else {
@@ -465,11 +465,11 @@ var P = class e {
465
465
  return t;
466
466
  }
467
467
  sub(e) {
468
- if (y(e)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
469
- return e instanceof I ? e.neg().add(this) : typeof e == "number" ? this.add(-e) : this.add(e.mul(-1));
468
+ if (x(e)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
469
+ return e instanceof L ? e.neg().add(this) : typeof e == "number" ? this.add(-e) : this.add(e.mul(-1));
470
470
  }
471
471
  mul(t) {
472
- if (y(t)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
472
+ if (x(t)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
473
473
  if (typeof t == "number") {
474
474
  let n = this.terms.size > 0 || this.nonlinearTerms.length > 0, r = this.constant === 0 && n ? 0 : this.constant * t;
475
475
  if (this.constant !== 0 && t !== 0 && r === 0) throw Error("Constant multiplication underflows to zero.");
@@ -483,17 +483,17 @@ var P = class e {
483
483
  let n = e.coeff * t;
484
484
  if (e.coeff !== 0 && n === 0) throw Error("Coefficient multiplication underflows to zero.");
485
485
  n !== 0 && i.nonlinearTerms.push({
486
- atom: A(e.atom),
486
+ atom: M(e.atom),
487
487
  coeff: n
488
488
  });
489
489
  }
490
490
  return i;
491
491
  }
492
- if (t instanceof k || typeof t == "object" && t && "id" in t && !("terms" in t) && !("quadTerms" in t)) {
492
+ if (t instanceof j || typeof t == "object" && t && "id" in t && !("terms" in t) && !("quadTerms" in t)) {
493
493
  if (this.hasNonlinearTerms()) throw Error("Cannot multiply nonlinear expression (max, min, abs, or at) by a variable expression: only scalar multiplication is supported.");
494
- return I.multiplyLinearTerms(this.constant, this.terms, 0, /* @__PURE__ */ new Map([[t, 1]]));
494
+ return L.multiplyLinearTerms(this.constant, this.terms, 0, /* @__PURE__ */ new Map([[t, 1]]));
495
495
  }
496
- if (t instanceof I) {
496
+ if (t instanceof L) {
497
497
  let e = t.linearTerms.size > 0 || t.quadTerms.size > 0 || t.hasNonlinearTerms();
498
498
  if (this.hasNonlinearTerms()) {
499
499
  if (!e) return this.mul(t.constant);
@@ -503,7 +503,7 @@ var P = class e {
503
503
  if (this.terms.size === 0) return t.mul(this.constant);
504
504
  throw Error("Cannot multiply nonlinear expression (max, min, abs, or at) by a variable expression: only scalar multiplication is supported.");
505
505
  }
506
- return this.terms.size === 0 ? t.mul(this.constant) : new I(this.terms, /* @__PURE__ */ new Map(), this.constant).mul(t);
506
+ return this.terms.size === 0 ? t.mul(this.constant) : new L(this.terms, /* @__PURE__ */ new Map(), this.constant).mul(t);
507
507
  }
508
508
  let n = Array.isArray(t.nonlinearTerms) && t.nonlinearTerms.length > 0;
509
509
  if (this.hasNonlinearTerms()) {
@@ -514,10 +514,10 @@ var P = class e {
514
514
  if (this.terms.size === 0) return t.mul(this.constant);
515
515
  throw Error("Cannot multiply nonlinear expression (max, min, abs, or at) by a variable expression: only scalar multiplication is supported.");
516
516
  }
517
- return this.terms.size === 0 ? t.mul(this.constant) : t.terms.size === 0 ? this.mul(t.constant) : I.multiplyLinearTerms(this.constant, this.terms, t.constant, t.terms);
517
+ return this.terms.size === 0 ? t.mul(this.constant) : t.terms.size === 0 ? this.mul(t.constant) : L.multiplyLinearTerms(this.constant, this.terms, t.constant, t.terms);
518
518
  }
519
519
  div(e) {
520
- let t = I.extractScalarDivisor(e, "LinExpr.div()");
520
+ let t = L.extractScalarDivisor(e, "LinExpr.div()");
521
521
  return this.mul(1 / t);
522
522
  }
523
523
  neg() {
@@ -530,7 +530,7 @@ var P = class e {
530
530
  e += n * t.value;
531
531
  }
532
532
  for (let t of this.nonlinearTerms) {
533
- let n = M(t.atom);
533
+ let n = N(t.atom);
534
534
  if (n === null) return null;
535
535
  e += t.coeff * n;
536
536
  }
@@ -555,9 +555,9 @@ var P = class e {
555
555
  return this.toDiscreteComparison("!=", e, t);
556
556
  }
557
557
  toDiscreteComparison(e, t, n) {
558
- if (t instanceof v || typeof t == "object" && t && "sense" in t && "lhs" in t) throw Error(`Cannot compare against a Constraint in (${e}): expected a finite integer, discrete Var, or discrete LinExpr.`);
558
+ if (t instanceof b || typeof t == "object" && t && "sense" in t && "lhs" in t) throw Error(`Cannot compare against a Constraint in (${e}): expected a finite integer, discrete Var, or discrete LinExpr.`);
559
559
  let r = `discrete ${e}`, i = /* @__PURE__ */ new Set();
560
- N(this, r, i), N(t, r, i);
560
+ P(this, r, i), P(t, r, i);
561
561
  let a = this.toConstraint(e === "<" ? "<=" : e === ">" ? ">=" : "!=", t, n);
562
562
  if (e === "<") {
563
563
  let e = a.rhs - 1;
@@ -573,14 +573,14 @@ var P = class e {
573
573
  toConstraint(t, n, r) {
574
574
  let i = this.clone(), a = 0;
575
575
  if (typeof n == "number") a = n;
576
- else if (n instanceof v || typeof n == "object" && n && "sense" in n && "lhs" in n) throw Error(`Cannot compare against a Constraint in (${t}): expected a number, Var, or LinExpr.`);
577
- else if (n instanceof I || typeof n == "object" && n && "quadTerms" in n) {
576
+ else if (n instanceof b || typeof n == "object" && n && "sense" in n && "lhs" in n) throw Error(`Cannot compare against a Constraint in (${t}): expected a number, Var, or LinExpr.`);
577
+ else if (n instanceof L || typeof n == "object" && n && "quadTerms" in n) {
578
578
  let r = n;
579
579
  if (r.quadTerms.size > 0) throw Error(`Quadratic expressions are not supported in linear constraints (${t}): quadratic terms are only allowed in objectives.`);
580
580
  i = i.sub(new e(r.linearTerms, 0, r.nonlinearTerms ?? [])), a = r.constant;
581
581
  } else "terms" in n ? (i = i.sub(new e(n.terms, 0, n.nonlinearTerms ?? [])), a = n.constant) : i = i.sub(n);
582
582
  let o = a - i.constant;
583
- return i.constant = 0, new v(i, t, o, r);
583
+ return i.constant = 0, new b(i, t, o, r);
584
584
  }
585
585
  and(e) {
586
586
  throw Error("Cannot use an arithmetic expression without a comparison operator (<=, >=, ==, !=, <, >) in logical 'and': expected a BoolVar, Constraint, or BoolOp.");
@@ -605,7 +605,7 @@ var P = class e {
605
605
  }
606
606
  for (let n of this.nonlinearTerms) {
607
607
  let r = n.coeff, i = r >= 0 ? t ? "" : "+ " : "- ", a = Math.abs(r), o = a === 1 ? "" : `${a} `;
608
- e.push(`${i}${o}${j(n.atom)}`), t = !1;
608
+ e.push(`${i}${o}${te(n.atom)}`), t = !1;
609
609
  }
610
610
  if (this.constant !== 0 || e.length === 0) {
611
611
  let n = this.constant >= 0 ? t ? "" : "+ " : "- ";
@@ -616,11 +616,11 @@ var P = class e {
616
616
  };
617
617
  //#endregion
618
618
  //#region src/modeler/quad-expr.ts
619
- function F(e, t) {
619
+ function I(e, t) {
620
620
  let n = e.id, r = t.id;
621
621
  return n <= r ? `${n}:${r}` : `${r}:${n}`;
622
622
  }
623
- var I = class e {
623
+ var L = class e {
624
624
  kind = "quadratic";
625
625
  linearTerms;
626
626
  quadTerms;
@@ -630,7 +630,7 @@ var I = class e {
630
630
  this.linearTerms = new Map(e), this.quadTerms = /* @__PURE__ */ new Map();
631
631
  for (let [e, n] of t) this.quadTerms.set(e, { ...n });
632
632
  this.constant = n, this.nonlinearTerms = r.filter((e) => e.coeff !== 0).map((e) => ({
633
- atom: A(e.atom),
633
+ atom: M(e.atom),
634
634
  coeff: e.coeff
635
635
  }));
636
636
  }
@@ -641,11 +641,11 @@ var I = class e {
641
641
  return new e(this.linearTerms, this.quadTerms, this.constant, this.nonlinearTerms);
642
642
  }
643
643
  getQuadCoeff(e, t) {
644
- let n = F(e, t), r = this.quadTerms.get(n);
644
+ let n = I(e, t), r = this.quadTerms.get(n);
645
645
  return r ? r.coeff : 0;
646
646
  }
647
647
  add(t) {
648
- if (y(t)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
648
+ if (x(t)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
649
649
  let n = this.clone();
650
650
  if (typeof t == "number") return n.constant += t, n;
651
651
  if (t instanceof e) {
@@ -662,7 +662,7 @@ var I = class e {
662
662
  t === 0 ? n.linearTerms.delete(e) : n.linearTerms.set(e, t);
663
663
  }
664
664
  if (n.constant += t.constant, Array.isArray(t.nonlinearTerms)) for (let e of t.nonlinearTerms) e.coeff !== 0 && n.nonlinearTerms.push({
665
- atom: A(e.atom),
665
+ atom: M(e.atom),
666
666
  coeff: e.coeff
667
667
  });
668
668
  return n;
@@ -673,7 +673,7 @@ var I = class e {
673
673
  t === 0 ? n.linearTerms.delete(e) : n.linearTerms.set(e, t);
674
674
  }
675
675
  if (n.constant += t.constant, Array.isArray(t.nonlinearTerms)) for (let e of t.nonlinearTerms) e.coeff !== 0 && n.nonlinearTerms.push({
676
- atom: A(e.atom),
676
+ atom: M(e.atom),
677
677
  coeff: e.coeff
678
678
  });
679
679
  return n;
@@ -682,11 +682,11 @@ var I = class e {
682
682
  return i === 0 ? n.linearTerms.delete(r) : n.linearTerms.set(r, i), n;
683
683
  }
684
684
  sub(e) {
685
- if (y(e)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
685
+ if (x(e)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
686
686
  return typeof e == "number" ? this.add(-e) : this.add(e.mul(-1));
687
687
  }
688
688
  mul(t) {
689
- if (y(t)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
689
+ if (x(t)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
690
690
  if (typeof t == "number") {
691
691
  let n = this.linearTerms.size > 0 || this.quadTerms.size > 0 || this.nonlinearTerms.length > 0, r = this.constant === 0 && n ? 0 : this.constant * t;
692
692
  if (this.constant !== 0 && t !== 0 && r === 0) throw Error("Constant multiplication underflows to zero.");
@@ -709,7 +709,7 @@ var I = class e {
709
709
  let n = e.coeff * t;
710
710
  if (e.coeff !== 0 && n === 0) throw Error("Coefficient multiplication underflows to zero.");
711
711
  n !== 0 && i.nonlinearTerms.push({
712
- atom: A(e.atom),
712
+ atom: M(e.atom),
713
713
  coeff: n
714
714
  });
715
715
  }
@@ -753,7 +753,7 @@ var I = class e {
753
753
  e += t.coeff * t.var1.value * t.var2.value;
754
754
  }
755
755
  for (let t of this.nonlinearTerms) {
756
- let n = M(t.atom);
756
+ let n = N(t.atom);
757
757
  if (n === null) return null;
758
758
  e += t.coeff * n;
759
759
  }
@@ -779,12 +779,12 @@ var I = class e {
779
779
  }
780
780
  toDiscreteComparison(e, t, n) {
781
781
  if (this.quadTerms.size > 0) throw Error(`Quadratic expressions are not supported in discrete comparisons (${e}): quadratic terms are only allowed in objectives.`);
782
- let r = new P(this.linearTerms, this.constant, this.nonlinearTerms);
782
+ let r = new F(this.linearTerms, this.constant, this.nonlinearTerms);
783
783
  return e === "<" ? r.lt(t, n) : e === ">" ? r.gt(t, n) : r.ne(t, n);
784
784
  }
785
785
  toConstraint(e, t, n) {
786
786
  if (this.quadTerms.size > 0) throw Error(`Quadratic expressions are not supported in linear constraints (${e}): quadratic terms are only allowed in objectives.`);
787
- let r = new P(this.linearTerms, this.constant, this.nonlinearTerms);
787
+ let r = new F(this.linearTerms, this.constant, this.nonlinearTerms);
788
788
  return e === "<=" ? r.le(t, n) : e === ">=" ? r.ge(t, n) : r.eq(t, n);
789
789
  }
790
790
  and(e) {
@@ -813,7 +813,7 @@ var I = class e {
813
813
  e.push(`${i}${o}${n.name}`), t = !1;
814
814
  }
815
815
  if (this.nonlinearTerms.length > 0) {
816
- let n = new P(/* @__PURE__ */ new Map(), 0, this.nonlinearTerms).toString();
816
+ let n = new F(/* @__PURE__ */ new Map(), 0, this.nonlinearTerms).toString();
817
817
  n !== "0" && (e.push(t ? n : n.startsWith("-") ? `- ${n.slice(2)}` : `+ ${n}`), t = !1);
818
818
  }
819
819
  if (this.constant !== 0 || e.length === 0) {
@@ -825,7 +825,7 @@ var I = class e {
825
825
  static fromProduct(t, n, r = 1) {
826
826
  let i = new e();
827
827
  if (r === 0) return i;
828
- let a = F(t, n);
828
+ let a = I(t, n);
829
829
  return i.quadTerms.set(a, {
830
830
  var1: t.id <= n.id ? t : n,
831
831
  var2: t.id <= n.id ? n : t,
@@ -855,7 +855,7 @@ var I = class e {
855
855
  return s;
856
856
  }
857
857
  static extractScalarDivisor(e, t) {
858
- if (y(e)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
858
+ if (x(e)) throw Error("Cannot perform arithmetic on a Constraint: expected a number, Var, LinExpr, or QuadExpr.");
859
859
  if (typeof e == "number") {
860
860
  if (e === 0) throw Error(`Division by zero in ${t}`);
861
861
  return e;
@@ -868,10 +868,10 @@ var I = class e {
868
868
  };
869
869
  //#endregion
870
870
  //#region src/modeler/lp-writer.ts
871
- function ne(e) {
871
+ function re(e) {
872
872
  return typeof e == "object" && !!e && typeof e.lpString == "string" && e.nameToVar instanceof Map && e.nameToConstraint instanceof Map;
873
873
  }
874
- function re(e, t = "x", n = 0) {
874
+ function R(e, t = "x", n = 0) {
875
875
  let r = e.replace(/[^a-zA-Z0-9_]/g, "_");
876
876
  return /^[0-9]/.test(r) && (r = `${t}_${r}`), (!r || r.length === 0) && (r = `${t}_${n}`), r;
877
877
  }
@@ -880,13 +880,13 @@ function ie(e) {
880
880
  for (let e = 0; e < t.length; e++) {
881
881
  let n = t[e];
882
882
  s.set(n, e);
883
- let a = re(n.name, "x", e), o = a, l = 1;
883
+ let a = R(n.name, "x", e), o = a, l = 1;
884
884
  for (; c.has(o);) o = `${a}_${l++}`;
885
885
  c.add(o), i.set(n, o), r.set(o, n);
886
886
  }
887
887
  let l = /* @__PURE__ */ new Set();
888
888
  for (let e = 0; e < n.length; e++) {
889
- let t = n[e], r = re(t.name, "c", e + 1), i = r, s = 1;
889
+ let t = n[e], r = R(t.name, "c", e + 1), i = r, s = 1;
890
890
  for (; l.has(i);) i = `${r}_${s++}`;
891
891
  l.add(i), o.set(t, i), a.set(i, t);
892
892
  }
@@ -904,13 +904,13 @@ function ae(e, t) {
904
904
  if (typeof r.hasNonlinearTerms == "function" && r.hasNonlinearTerms()) throw Error("generateLpString() received an unlowered nonlinear objective (max/min/abs/at). Lower via Model.toLpString() or linearizeModelForMip() first.");
905
905
  let o = t?.relax === !0, { nameToVar: s, varToName: c, nameToConstraint: l, constrToName: u, varOrder: d } = ie(e), f = [];
906
906
  f.push(n && n.toLowerCase() === "maximize" ? "Maximize" : "Minimize");
907
- let p = [], m = !0, h = r instanceof I ? r.linearTerms : r.terms;
907
+ let p = [], m = !0, h = r instanceof L ? r.linearTerms : r.terms;
908
908
  if (h) for (let [e, t] of h) {
909
909
  if (t === 0) continue;
910
910
  let n = c.get(e), r = t >= 0 ? m ? "" : "+ " : "- ", i = Math.abs(t), a = i === 1 ? "" : `${i} `;
911
911
  p.push(`${r}${a}${n}`), m = !1;
912
912
  }
913
- if (r instanceof I && r.quadTerms.size > 0) {
913
+ if (r instanceof L && r.quadTerms.size > 0) {
914
914
  let e = [], t = !0, n = Array.from(r.quadTerms.values()).filter((e) => e.coeff !== 0).map((e) => {
915
915
  let t = d.get(e.var1) ?? e.var1.id, n = d.get(e.var2) ?? e.var2.id, [r, i, a, o] = t <= n ? [
916
916
  e.var1,
@@ -981,8 +981,8 @@ function ae(e, t) {
981
981
  }
982
982
  //#endregion
983
983
  //#region \0washi-browser-worker-factory
984
- function L() {
985
- let e = a("highs-worker.js"), t = typeof window.origin == "string" ? window.origin : window.location?.origin;
984
+ function z() {
985
+ let e = o("highs-worker.js"), t = typeof window.origin == "string" ? window.origin : window.location?.origin;
986
986
  if (new URL(e).origin === t) return new Worker(e, { type: "module" });
987
987
  let n = URL.createObjectURL(new Blob(["import " + JSON.stringify(e) + ";"], { type: "text/javascript" }));
988
988
  try {
@@ -994,8 +994,8 @@ function L() {
994
994
  }
995
995
  //#endregion
996
996
  //#region src/modeler/solvers/highs/worker-client.ts
997
- var R = null, z = null, B = null, V = 0, H = /* @__PURE__ */ new Map();
998
- function U(e, t) {
997
+ var B = null, V = null, H = null, U = !1, W = 0, G = /* @__PURE__ */ new Map();
998
+ function K(e, t) {
999
999
  return e ? {
1000
1000
  Status: "Interrupted",
1001
1001
  StatusCode: 17,
@@ -1019,52 +1019,55 @@ function U(e, t) {
1019
1019
  Rows: []
1020
1020
  };
1021
1021
  }
1022
- function W(e) {
1023
- let t = H.values().next().value;
1024
- if (t && !t.dispatched) {
1025
- t.dispatched = !0;
1026
- try {
1027
- t.kind === "WARMUP" ? e.postMessage({
1028
- type: "WARMUP",
1029
- id: t.id,
1030
- options: t.workerOptions
1031
- }) : e.postMessage({
1032
- type: "SOLVE",
1033
- id: t.id,
1034
- lpString: t.lpString,
1035
- options: t.workerOptions,
1036
- ...t.reportProgress ? { reportProgress: !0 } : {}
1037
- });
1038
- } catch (n) {
1039
- H.delete(t.id), t.cleanupAbort?.(), t.reject(n), W(e);
1040
- }
1022
+ function q(e) {
1023
+ let t = G.values().next().value;
1024
+ if (!t || t.dispatched) return;
1025
+ t.dispatched = !0;
1026
+ let n = {}, r = !1;
1027
+ t.embeddedWasmBinary !== null && !U && (n.embeddedWasmBinary = t.embeddedWasmBinary, r = !0);
1028
+ try {
1029
+ t.kind === "WARMUP" ? e.postMessage({
1030
+ type: "WARMUP",
1031
+ id: t.id,
1032
+ options: t.workerOptions,
1033
+ ...n
1034
+ }) : e.postMessage({
1035
+ type: "SOLVE",
1036
+ id: t.id,
1037
+ lpString: t.lpString,
1038
+ options: t.workerOptions,
1039
+ ...n,
1040
+ ...t.reportProgress ? { reportProgress: !0 } : {}
1041
+ }), r && (U = !0);
1042
+ } catch (n) {
1043
+ G.delete(t.id), t.cleanupAbort?.(), t.reject(n), q(e);
1041
1044
  }
1042
1045
  }
1043
- function G() {
1044
- let e = R;
1045
- e && (R = null, z = null, B = null, e.terminate());
1046
- for (let e of H.values()) e.dispatched = !1;
1047
- if (H.size > 0) try {
1048
- let e = q();
1049
- if (e) W(e);
1046
+ function oe() {
1047
+ let e = B;
1048
+ e && (B = null, V = null, H = null, U = !1, e.terminate());
1049
+ for (let e of G.values()) e.dispatched = !1;
1050
+ if (G.size > 0) try {
1051
+ let e = se();
1052
+ if (e) q(e);
1050
1053
  else {
1051
1054
  let e = /* @__PURE__ */ Error("[WaSHI] Failed to recreate HiGHS Worker after interruption.");
1052
- for (let t of Array.from(H.values())) H.delete(t.id), t.cleanupAbort?.(), t.reject(e);
1055
+ for (let t of Array.from(G.values())) G.delete(t.id), t.cleanupAbort?.(), t.reject(e);
1053
1056
  }
1054
1057
  } catch (e) {
1055
- for (let t of Array.from(H.values())) H.delete(t.id), t.cleanupAbort?.(), t.reject(e);
1058
+ for (let t of Array.from(G.values())) G.delete(t.id), t.cleanupAbort?.(), t.reject(e);
1056
1059
  }
1057
1060
  }
1058
- function K() {
1061
+ function J() {
1059
1062
  return typeof window < "u" && typeof Worker < "u" && typeof Worker?.prototype?.unref != "function";
1060
1063
  }
1061
- function q() {
1062
- if (!K()) return null;
1063
- if (!R) {
1064
+ function se() {
1065
+ if (!J()) return null;
1066
+ if (!B) {
1064
1067
  let e;
1065
1068
  try {
1066
- e = L(), e.onmessage = (t) => {
1067
- let { type: n, id: r, result: i, runTime: a, error: o, progress: s, incumbent: c } = t.data, l = H.get(r);
1069
+ e = z(), e.onmessage = (t) => {
1070
+ let { type: n, id: r, result: i, runTime: a, error: o, progress: s, incumbent: c } = t.data, l = G.get(r);
1068
1071
  if (l) {
1069
1072
  if (n === "SOLVE_PROGRESS") {
1070
1073
  if (l.kind === "SOLVE" && s) {
@@ -1072,10 +1075,10 @@ function q() {
1072
1075
  try {
1073
1076
  l.onProgress?.(s);
1074
1077
  } catch (e) {
1075
- let t = H.get(r);
1078
+ let t = G.get(r);
1076
1079
  if (t) {
1077
- let n = H.keys().next().value;
1078
- H.delete(r), t.cleanupAbort?.(), n === r && G(), t.reject(e);
1080
+ let n = G.keys().next().value;
1081
+ G.delete(r), t.cleanupAbort?.(), n === r && oe(), t.reject(e);
1079
1082
  }
1080
1083
  }
1081
1084
  }
@@ -1085,142 +1088,179 @@ function q() {
1085
1088
  l.kind === "SOLVE" && c && (l.lastIncumbent = c);
1086
1089
  return;
1087
1090
  }
1088
- H.delete(r), l.cleanupAbort?.(), l.kind === "WARMUP" ? n === "WARMUP_SUCCESS" ? (R === e && (z = e, B = l.wasmUrl), l.resolve()) : l.reject(Error(o || "Worker warmup failed")) : n === "SOLVE_SUCCESS" ? (R === e && (z = e, B = l.wasmUrl), l.resolve({
1091
+ G.delete(r), l.cleanupAbort?.(), l.kind === "WARMUP" ? n === "WARMUP_SUCCESS" ? (B === e && (V = e, H = l.targetKey), l.resolve()) : l.reject(Error(o || "Worker warmup failed")) : n === "SOLVE_SUCCESS" ? (B === e && (V = e, H = l.targetKey), l.resolve({
1089
1092
  result: i,
1090
1093
  runTime: a
1091
- })) : l.reject(Error(o || "Worker solve failed")), R === e && W(e);
1094
+ })) : l.reject(Error(o || "Worker solve failed")), B === e && q(e);
1092
1095
  }
1093
1096
  };
1094
1097
  let t = (t) => {
1095
- if (R === e) {
1096
- R = null, z = null, B = null, e.terminate();
1097
- for (let e of H.values()) e.cleanupAbort?.(), e.reject(t);
1098
- H.clear();
1098
+ if (B === e) {
1099
+ B = null, V = null, H = null, U = !1, e.terminate();
1100
+ for (let e of G.values()) e.cleanupAbort?.(), e.reject(t);
1101
+ G.clear();
1099
1102
  }
1100
1103
  };
1101
- e.onerror = (e) => t(/* @__PURE__ */ Error(`[WaSHI] HiGHS Worker failed to load or execute. Check Worker assets, CORS and CSP. ${e?.message || ""}`)), e.onmessageerror = () => t(/* @__PURE__ */ Error("[WaSHI] Could not deserialize the HiGHS Worker response.")), R = e;
1104
+ e.onerror = (e) => t(/* @__PURE__ */ Error(`[WaSHI] HiGHS Worker failed to load or execute. Check Worker assets, CORS and CSP. ${e?.message || ""}`)), e.onmessageerror = () => t(/* @__PURE__ */ Error("[WaSHI] Could not deserialize the HiGHS Worker response.")), B = e;
1102
1105
  } catch (e) {
1103
- throw R = null, e;
1106
+ throw B = null, e;
1104
1107
  }
1105
1108
  }
1106
- return R;
1109
+ return B;
1107
1110
  }
1108
- function J(e) {
1111
+ function ce(e) {
1109
1112
  let t = typeof window < "u" ? typeof window.origin == "string" ? window.origin : window.location?.origin : void 0;
1110
1113
  return e.useWorker ?? (typeof window < "u" && t !== "null" && !t?.startsWith("file:"));
1111
1114
  }
1112
- function Y(e) {
1113
- if (e.useWorker === !0 && !K()) throw Error("[WaSHI] Web Worker execution was requested (useWorker: true), but browser Web Workers are unavailable in this environment.");
1114
- return J(e) ? q() : null;
1115
+ function le(e) {
1116
+ if (e.useWorker === !0 && !J()) throw Error("[WaSHI] Web Worker execution was requested (useWorker: true), but browser Web Workers are unavailable in this environment.");
1117
+ return ce(e) ? se() : null;
1118
+ }
1119
+ async function Y(e, r) {
1120
+ let i = r ? v("highs") : n("highs"), a = i?.kind === "embedded" ? i.bytes : null;
1121
+ if (e.wasmUrl) {
1122
+ let n = await t(e.wasmUrl);
1123
+ return {
1124
+ wasmUrl: n,
1125
+ embeddedWasmBinary: a,
1126
+ targetKey: `url:${n}`
1127
+ };
1128
+ }
1129
+ if (d()) {
1130
+ let e = await t();
1131
+ return {
1132
+ wasmUrl: e,
1133
+ embeddedWasmBinary: a,
1134
+ targetKey: `url:${e}`
1135
+ };
1136
+ }
1137
+ if (!i) return {
1138
+ wasmUrl: null,
1139
+ embeddedWasmBinary: null,
1140
+ targetKey: null
1141
+ };
1142
+ if (i.kind === "embedded") return {
1143
+ wasmUrl: null,
1144
+ embeddedWasmBinary: a,
1145
+ targetKey: "__embedded__"
1146
+ };
1147
+ let o = await t();
1148
+ return {
1149
+ wasmUrl: o,
1150
+ embeddedWasmBinary: null,
1151
+ targetKey: `url:${o}`
1152
+ };
1115
1153
  }
1116
- function oe(e, t) {
1154
+ function ue(e, t) {
1117
1155
  let { signal: n, onProgress: r, onIncumbent: i, ...a } = e, o = {};
1118
1156
  for (let [e, t] of Object.entries(a)) {
1119
1157
  if (typeof t == "function") throw Error(`[WaSHI] HiGHS Worker option "${e}" cannot be a function (functions cannot be cloned across Web Worker boundaries).`);
1120
1158
  o[e] = t;
1121
1159
  }
1122
- return o.wasmUrl = t, o;
1160
+ return t === null ? delete o.wasmUrl : o.wasmUrl = t, o;
1123
1161
  }
1124
- async function se(e = {}) {
1125
- if (e.useWorker === !0 && !K()) return !1;
1126
- if (!J(e) || !K()) return p(e);
1127
- if (!R || !z || z !== R) return !1;
1128
- let n = await t(e.wasmUrl);
1129
- return B === n;
1162
+ async function de(e = {}) {
1163
+ if (e.useWorker === !0 && !J()) return !1;
1164
+ if (!ce(e) || !J()) return m(e);
1165
+ if (!B || !V || V !== B) return !1;
1166
+ let { targetKey: t } = await Y(e, !1);
1167
+ return t !== null && H === t;
1130
1168
  }
1131
- function ce(e, t, n) {
1169
+ function fe(e, t, n) {
1132
1170
  if (!e) return;
1133
1171
  let r = () => {
1134
- let e = H.get(t.id);
1172
+ let e = G.get(t.id);
1135
1173
  if (!e) return;
1136
- let r = H.keys().next().value;
1137
- H.delete(t.id), e.cleanupAbort?.(), r === t.id && G(), n();
1174
+ let r = G.keys().next().value;
1175
+ G.delete(t.id), e.cleanupAbort?.(), r === t.id && oe(), n();
1138
1176
  };
1139
1177
  e.addEventListener("abort", r, { once: !0 }), t.cleanupAbort = () => e.removeEventListener("abort", r);
1140
1178
  }
1141
- async function le(e = {}) {
1142
- n(e);
1143
- let { signal: r } = e;
1144
- if (r?.aborted) return { cached: !1 };
1145
- let i = await t(e.wasmUrl);
1146
- if (r?.aborted) return { cached: !1 };
1147
- let a = Y(e);
1148
- if (!a) {
1149
- let t = await p(e);
1150
- return t || r?.aborted ? { cached: t } : r ? (await new Promise((t, n) => {
1179
+ async function pe(e = {}) {
1180
+ r(e);
1181
+ let { signal: t } = e;
1182
+ if (t?.aborted) return { cached: !1 };
1183
+ let n = await Y(e, !0);
1184
+ if (t?.aborted) return { cached: !1 };
1185
+ let i = le(e);
1186
+ if (!i) {
1187
+ let n = await m(e);
1188
+ return n || t?.aborted ? { cached: n } : t ? (await new Promise((n, r) => {
1151
1189
  let i = !1, a = () => {
1152
- i || (i = !0, t());
1190
+ i || (i = !0, n());
1153
1191
  };
1154
- r.addEventListener("abort", a, { once: !0 }), h(e).then(() => {
1155
- r.removeEventListener("abort", a), i || (i = !0, t());
1192
+ t.addEventListener("abort", a, { once: !0 }), g(e).then(() => {
1193
+ t.removeEventListener("abort", a), i || (i = !0, n());
1156
1194
  }, (e) => {
1157
- r.removeEventListener("abort", a), i || (i = !0, n(e));
1195
+ t.removeEventListener("abort", a), i || (i = !0, r(e));
1158
1196
  });
1159
- }), { cached: t }) : (await h(e), { cached: t });
1197
+ }), { cached: n }) : (await g(e), { cached: n });
1160
1198
  }
1161
- if (z === a && B === i) return { cached: !0 };
1162
- let o = oe(e, i), s = `req_${++V}`;
1163
- return await new Promise((e, t) => {
1164
- let n = {
1199
+ if (V === i && H === n.targetKey) return { cached: !0 };
1200
+ let a = ue(e, n.wasmUrl), o = `req_${++W}`;
1201
+ return await new Promise((e, r) => {
1202
+ let s = {
1165
1203
  kind: "WARMUP",
1166
- id: s,
1167
- workerOptions: o,
1168
- wasmUrl: i,
1204
+ id: o,
1205
+ workerOptions: a,
1206
+ embeddedWasmBinary: n.embeddedWasmBinary,
1207
+ targetKey: n.targetKey,
1169
1208
  resolve: e,
1170
- reject: t
1209
+ reject: r
1171
1210
  };
1172
- ce(r, n, e), H.set(s, n), W(a);
1211
+ fe(t, s, e), G.set(o, s), q(i);
1173
1212
  }), { cached: !1 };
1174
1213
  }
1175
- async function ue(e, r = {}) {
1176
- if (n(r), r.signal?.aborted) return {
1177
- result: U(),
1214
+ async function me(e, t = {}) {
1215
+ if (r(t), t.signal?.aborted) return {
1216
+ result: K(),
1178
1217
  runTime: 0
1179
1218
  };
1180
- let i = await t(r.wasmUrl);
1181
- if (r.signal?.aborted) return {
1182
- result: U(),
1219
+ let n = await Y(t, !0);
1220
+ if (t.signal?.aborted) return {
1221
+ result: K(),
1183
1222
  runTime: 0
1184
1223
  };
1185
- let a = Y(r);
1186
- if (!a) return m(e, r);
1187
- let { signal: o, onProgress: s } = r, c = oe(r, i), l = !!(s || o), u = `req_${++V}`, d = performance.now();
1188
- return new Promise((t, n) => {
1189
- let r = {
1224
+ let i = le(t);
1225
+ if (!i) return h(e, t);
1226
+ let { signal: a, onProgress: o } = t, s = ue(t, n.wasmUrl), c = !!(o || a), l = `req_${++W}`, u = performance.now();
1227
+ return new Promise((t, r) => {
1228
+ let d = {
1190
1229
  kind: "SOLVE",
1191
- id: u,
1230
+ id: l,
1192
1231
  lpString: e,
1193
- workerOptions: c,
1194
- wasmUrl: i,
1195
- reportProgress: l,
1196
- startTime: d,
1197
- onProgress: s,
1232
+ workerOptions: s,
1233
+ embeddedWasmBinary: n.embeddedWasmBinary,
1234
+ targetKey: n.targetKey,
1235
+ reportProgress: c,
1236
+ startTime: u,
1237
+ onProgress: o,
1198
1238
  resolve: t,
1199
- reject: n
1239
+ reject: r
1200
1240
  };
1201
- ce(o, r, () => {
1202
- let e = (performance.now() - r.startTime) / 1e3;
1203
- r.resolve({
1204
- result: U(r.lastIncumbent, r.lastProgress),
1241
+ fe(a, d, () => {
1242
+ let e = (performance.now() - d.startTime) / 1e3;
1243
+ d.resolve({
1244
+ result: K(d.lastIncumbent, d.lastProgress),
1205
1245
  runTime: e
1206
1246
  });
1207
- }), H.set(u, r), W(a);
1247
+ }), G.set(l, d), q(i);
1208
1248
  });
1209
1249
  }
1210
1250
  //#endregion
1211
1251
  //#region src/modeler/solvers/registry.ts
1212
- var X = Symbol.for("washi.solverRegistry"), de = Symbol.for("washi.defaultSolverFactory"), Z = globalThis;
1252
+ var X = Symbol.for("washi.solverRegistry"), he = Symbol.for("washi.defaultSolverFactory"), Z = globalThis;
1213
1253
  Z[X] || (Z[X] = /* @__PURE__ */ new Map());
1214
- var fe = Z[X];
1215
- function pe(e, t) {
1216
- fe.set(e.toLowerCase(), t);
1254
+ var ge = Z[X];
1255
+ function _e(e, t) {
1256
+ ge.set(e.toLowerCase(), t);
1217
1257
  }
1218
- function me(e) {
1258
+ function ve(e) {
1219
1259
  if (typeof e == "string") {
1220
- let t = fe.get(e.toLowerCase());
1260
+ let t = ge.get(e.toLowerCase());
1221
1261
  if (!t) throw Error(`Solver '${e}' is not registered.`);
1222
- Z[de] = t;
1223
- } else Z[de] = typeof e == "function" ? e : () => e;
1262
+ Z[he] = t;
1263
+ } else Z[he] = typeof e == "function" ? e : () => e;
1224
1264
  }
1225
1265
  //#endregion
1226
1266
  //#region src/modeler/solvers/highs/solver.ts
@@ -1282,7 +1322,7 @@ function Q(e, t) {
1282
1322
  }
1283
1323
  return "Unknown";
1284
1324
  }
1285
- function he(e, t, n) {
1325
+ function ye(e, t, n) {
1286
1326
  switch (Q(e, t)) {
1287
1327
  case "Optimal": return "Optimal";
1288
1328
  case "Infeasible": return "Infeasible";
@@ -1313,16 +1353,16 @@ var $ = class e {
1313
1353
  constructor(e = {}) {
1314
1354
  this.options = e;
1315
1355
  }
1316
- async solve(e, t = {}, r = {}) {
1317
- let i = ne(t), a = i ? r : t, o = {
1356
+ async solve(e, t = {}, n = {}) {
1357
+ let i = re(t), a = i ? n : t, o = {
1318
1358
  ...this.options,
1319
1359
  ...a
1320
1360
  };
1321
- n(o);
1361
+ r(o);
1322
1362
  let s = e.objective?.constant ?? 0;
1323
1363
  if (typeof s != "number" || !Number.isFinite(s)) throw Error(`Solver "${this.name}" encountered non-finite objective constant: ${String(s)}.`);
1324
1364
  let c = s === 0 ? 0 : s;
1325
- for (let t of e.variables) E(t);
1365
+ for (let t of e.variables) O(t);
1326
1366
  let { lpString: l, nameToVar: u, nameToConstraint: d } = i ? t : ae(e, { relax: o.relax }), f = Object.create(null), p = !1, m = /* @__PURE__ */ new Set();
1327
1367
  for (let [e, t] of u.entries()) {
1328
1368
  m.add(t);
@@ -1336,16 +1376,16 @@ var $ = class e {
1336
1376
  ...c === 0 ? {} : { objectiveOffset: c },
1337
1377
  ...p ? { initialValues: f } : {}
1338
1378
  });
1339
- let { result: g, runTime: _ } = await ue(l, h), v = g?.ObjectiveOffsetApplied ? 0 : c, y = Q(g?.Status, g?.StatusCode), b = o.relax ? !1 : typeof g?.IsMip == "boolean" ? g.IsMip : e.variables.some((e) => e.type === "Integer" || e.type === "Binary"), x = g?.HasPrimalSolution === !0, S = he(g?.Status, g?.StatusCode, x), C = null;
1379
+ let { result: g, runTime: _ } = await me(l, h), v = g?.ObjectiveOffsetApplied ? 0 : c, y = Q(g?.Status, g?.StatusCode), b = o.relax ? !1 : typeof g?.IsMip == "boolean" ? g.IsMip : e.variables.some((e) => e.type === "Integer" || e.type === "Binary"), x = g?.HasPrimalSolution === !0, S = ye(g?.Status, g?.StatusCode, x), C = null;
1340
1380
  x && typeof g?.ObjectiveValue == "number" && Number.isFinite(g.ObjectiveValue) && (C = g.ObjectiveValue + v);
1341
- let w, T, D;
1342
- if (typeof g?.MipDualBound == "number" && Number.isFinite(g.MipDualBound) ? w = g.MipDualBound + v : !b && y === "Optimal" && C !== null && (w = C), C !== null && w !== void 0 && Number.isFinite(w) && (D = Math.abs(C - w)), v !== 0 && b && C !== null && w !== void 0 && D !== void 0) {
1343
- if (D === 0) T = 0;
1381
+ let w, T, E;
1382
+ if (typeof g?.MipDualBound == "number" && Number.isFinite(g.MipDualBound) ? w = g.MipDualBound + v : !b && y === "Optimal" && C !== null && (w = C), C !== null && w !== void 0 && Number.isFinite(w) && (E = Math.abs(C - w)), v !== 0 && b && C !== null && w !== void 0 && E !== void 0) {
1383
+ if (E === 0) T = 0;
1344
1384
  else if (Math.abs(C) > 0) {
1345
- let e = D / Math.abs(C);
1385
+ let e = E / Math.abs(C);
1346
1386
  T = Number.isFinite(e) ? e : void 0;
1347
1387
  } else T = void 0;
1348
- } else typeof g?.MipGap == "number" && Number.isFinite(g.MipGap) ? T = g.MipGap : b && y === "Optimal" && x && (D === void 0 || D === 0) && (T = 0);
1388
+ } else typeof g?.MipGap == "number" && Number.isFinite(g.MipGap) ? T = g.MipGap : b && y === "Optimal" && x && (E === void 0 || E === 0) && (T = 0);
1349
1389
  if (!x) return {
1350
1390
  status: S,
1351
1391
  terminationStatus: y,
@@ -1353,7 +1393,7 @@ var $ = class e {
1353
1393
  objectiveValue: null,
1354
1394
  ...w === void 0 ? {} : { objectiveBound: w },
1355
1395
  ...T === void 0 ? {} : { relativeGap: T },
1356
- ...D === void 0 ? {} : { absoluteGap: D },
1396
+ ...E === void 0 ? {} : { absoluteGap: E },
1357
1397
  values: {},
1358
1398
  reducedCosts: {},
1359
1399
  duals: {},
@@ -1361,7 +1401,7 @@ var $ = class e {
1361
1401
  runTime: _,
1362
1402
  raw: g
1363
1403
  };
1364
- let O = (e, t, n) => {
1404
+ let D = (e, t, n) => {
1365
1405
  Object.defineProperty(e, t, {
1366
1406
  value: n,
1367
1407
  enumerable: !0,
@@ -1374,18 +1414,18 @@ var $ = class e {
1374
1414
  if (n) {
1375
1415
  if (typeof t.Primal == "number" && Number.isFinite(t.Primal)) {
1376
1416
  let e = Math.abs(t.Primal) < 1e-9 ? 0 : t.Primal;
1377
- !o.relax && (n.type === "Integer" || n.type === "Binary") && Math.abs(e - Math.round(e)) <= 1e-5 && (e = Math.round(e) + 0), O(k, n.name, e);
1417
+ !o.relax && (n.type === "Integer" || n.type === "Binary") && Math.abs(e - Math.round(e)) <= 1e-5 && (e = Math.round(e) + 0), D(k, n.name, e);
1378
1418
  }
1379
- typeof t.Dual == "number" && Number.isFinite(t.Dual) && O(j, n.name, Math.abs(t.Dual) < 1e-9 ? 0 : t.Dual);
1419
+ typeof t.Dual == "number" && Number.isFinite(t.Dual) && D(j, n.name, Math.abs(t.Dual) < 1e-9 ? 0 : t.Dual);
1380
1420
  }
1381
1421
  }
1382
1422
  if (g.Rows) {
1383
1423
  let e = Array.isArray(g.Rows) ? g.Rows : Object.values(g.Rows);
1384
1424
  for (let t of e) {
1385
1425
  let e = t.Name, n = e ? d.get(e) : void 0;
1386
- if (n && (typeof t.Dual == "number" && Number.isFinite(t.Dual) && O(A, n.name, Math.abs(t.Dual) < 1e-9 ? 0 : t.Dual), typeof t.Primal == "number" && Number.isFinite(t.Primal))) {
1426
+ if (n && (typeof t.Dual == "number" && Number.isFinite(t.Dual) && D(A, n.name, Math.abs(t.Dual) < 1e-9 ? 0 : t.Dual), typeof t.Primal == "number" && Number.isFinite(t.Primal))) {
1387
1427
  let e = n.rhs - t.Primal;
1388
- O(M, n.name, Math.abs(e) < 1e-9 ? 0 : e);
1428
+ D(M, n.name, Math.abs(e) < 1e-9 ? 0 : e);
1389
1429
  }
1390
1430
  }
1391
1431
  }
@@ -1396,7 +1436,7 @@ var $ = class e {
1396
1436
  objectiveValue: C,
1397
1437
  ...w === void 0 ? {} : { objectiveBound: w },
1398
1438
  ...T === void 0 ? {} : { relativeGap: T },
1399
- ...D === void 0 ? {} : { absoluteGap: D },
1439
+ ...E === void 0 ? {} : { absoluteGap: E },
1400
1440
  values: k,
1401
1441
  reducedCosts: j,
1402
1442
  duals: A,
@@ -1405,10 +1445,10 @@ var $ = class e {
1405
1445
  raw: g
1406
1446
  };
1407
1447
  }
1408
- }, ge = $;
1409
- function _e() {
1410
- pe("highs", (e) => new $(e)), me((e) => new $(e));
1448
+ }, be = $;
1449
+ function xe() {
1450
+ _e("highs", (e) => new $(e)), ve((e) => new $(e));
1411
1451
  }
1412
- _e();
1452
+ xe();
1413
1453
  //#endregion
1414
- export { c as HIGHS_CONSTANTS, g as HIGHS_STATUS_NAMES, ge as HiGHS, r as Highs, i as HighsError, f as HighsModel, $ as HighsSolver, l as HighsUnsupportedOptionError, o as bindHighsFunctions, L as createHighsWorker, a as getAssetUrl, e as getBundledWasmUrl, h as getHighs, u as getHighsWasmUrl, p as isHighsCached, se as isHighsWarmed, s as isValidWasmHeader, he as mapHighsStatus, Q as mapHighsTerminationStatus, _e as registerHighsSolver, t as resolveBrowserWasmUrl, d as setHighsWasmUrl, ue as solveLp, m as solveLpWithHighs, n as validateHighsOptions, le as warmupHighs };
1454
+ export { l as HIGHS_CONSTANTS, _ as HIGHS_STATUS_NAMES, be as HiGHS, i as Highs, a as HighsError, p as HighsModel, $ as HighsSolver, u as HighsUnsupportedOptionError, s as bindHighsFunctions, z as createHighsWorker, o as getAssetUrl, e as getBundledWasmUrl, g as getHighs, d as getHighsWasmUrl, m as isHighsCached, de as isHighsWarmed, c as isValidWasmHeader, ye as mapHighsStatus, Q as mapHighsTerminationStatus, xe as registerHighsSolver, t as resolveBrowserWasmUrl, f as setHighsWasmUrl, me as solveLp, h as solveLpWithHighs, r as validateHighsOptions, pe as warmupHighs };