@kosdev-code/kos-dispense-sdk 2.0.40 → 2.1.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 (41) hide show
  1. package/control-pour-extension-Byiwjyzw.js +1547 -0
  2. package/control-pour-extension-Byiwjyzw.js.map +1 -0
  3. package/control-pour-extension-DGztqLxi.cjs +2 -0
  4. package/control-pour-extension-DGztqLxi.cjs.map +1 -0
  5. package/dispense-registration-manager-DauhdXxX.cjs +2 -0
  6. package/dispense-registration-manager-DauhdXxX.cjs.map +1 -0
  7. package/{dispense-registration-manager-eOOE05xT.js → dispense-registration-manager-pB5e_YT1.js} +584 -615
  8. package/dispense-registration-manager-pB5e_YT1.js.map +1 -0
  9. package/{extension-utils-DcOOx69a.cjs → extension-utils-BcdtSKJM.cjs} +2 -2
  10. package/{extension-utils-DcOOx69a.cjs.map → extension-utils-BcdtSKJM.cjs.map} +1 -1
  11. package/{extension-utils-B9gziKDQ.js → extension-utils-siWT4ZuD.js} +2 -2
  12. package/{extension-utils-B9gziKDQ.js.map → extension-utils-siWT4ZuD.js.map} +1 -1
  13. package/extensions/control-pour-extension.d.ts +80 -0
  14. package/extensions/control-pour-extension.d.ts.map +1 -0
  15. package/extensions/index.d.ts +2 -0
  16. package/extensions/index.d.ts.map +1 -0
  17. package/index.cjs +1 -1
  18. package/index.d.ts +1 -0
  19. package/index.d.ts.map +1 -1
  20. package/index.js +97 -94
  21. package/index.js.map +1 -1
  22. package/models/models/holder/holder-model.d.ts.map +1 -1
  23. package/models/models/pump/pump-model.d.ts.map +1 -1
  24. package/models/models/pump/types/index.d.ts +3 -2
  25. package/models/utils/dispense-registration-manager.d.ts +2 -2
  26. package/models/utils/service.d.ts +8 -8
  27. package/models.cjs +1 -1
  28. package/models.js +2 -2
  29. package/package.json +3 -3
  30. package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts +1 -0
  31. package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts.map +1 -1
  32. package/ui.cjs +1 -1
  33. package/ui.js +67 -66
  34. package/ui.js.map +1 -1
  35. package/dispense-registration-manager-BZeOXyYn.cjs +0 -2
  36. package/dispense-registration-manager-BZeOXyYn.cjs.map +0 -1
  37. package/dispense-registration-manager-eOOE05xT.js.map +0 -1
  38. package/pump-provider--hQGuh_w.js +0 -1239
  39. package/pump-provider--hQGuh_w.js.map +0 -1
  40. package/pump-provider-5w04Zi8j.cjs +0 -2
  41. package/pump-provider-5w04Zi8j.cjs.map +0 -1
@@ -1,1239 +0,0 @@
1
- var at = Object.defineProperty;
2
- var ot = (e, t, r) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var J = (e, t, r) => (ot(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { jsx as m } from "@emotion/react/jsx-runtime";
5
- import { A as Ie, b as Ae, e as ct, d as xe, N as dt, f as ke, H as ut, g as Ee, I as Se, h as Ne, G as lt, P as He } from "./dispense-registration-manager-eOOE05xT.js";
6
- import { useKosModel as H, getKosCompanionModel as fe, kosAutoEffect as Re, KosLog as P, usePressGesture as be, EventBus as g, TimerManager as Be } from "@kosdev-code/kos-ui-sdk";
7
- import mt, { createContext as L, useMemo as A, useContext as K, useState as N, useCallback as o, useEffect as O, useRef as Ce } from "react";
8
- const ye = () => {
9
- const e = Ie.type;
10
- return H({
11
- modelId: e,
12
- modelType: Ie.type,
13
- options: {}
14
- });
15
- };
16
- function Dt(e) {
17
- return (t) => {
18
- const { model: r, status: n, KosModelLoader: s } = ye();
19
- return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, assembly: r }) });
20
- };
21
- }
22
- const De = () => {
23
- const e = Ae.type;
24
- return H({
25
- modelId: e,
26
- modelType: Ae.type,
27
- options: {}
28
- });
29
- };
30
- function Mt(e) {
31
- return (t) => {
32
- const { model: r, status: n, KosModelLoader: s } = De();
33
- return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, beverage: r }) });
34
- };
35
- }
36
- const Me = (e) => H({
37
- modelId: e,
38
- modelType: ct.type,
39
- options: {}
40
- });
41
- function Ot(e) {
42
- return (t) => (r) => {
43
- const { model: n, status: s, KosModelLoader: i } = Me(t);
44
- return /* @__PURE__ */ m(i, { ...s, children: /* @__PURE__ */ m(e, { ...r, board: n }) });
45
- };
46
- }
47
- const Oe = () => {
48
- const e = xe.type;
49
- return H({
50
- modelId: e,
51
- modelType: xe.type,
52
- options: {}
53
- });
54
- };
55
- function Yt(e) {
56
- return (t) => {
57
- const { model: r, status: n, KosModelLoader: s } = Oe();
58
- return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, boardContainer: r }) });
59
- };
60
- }
61
- const Ye = (e) => H({
62
- modelId: e,
63
- modelType: dt.type,
64
- options: {
65
- path: e
66
- }
67
- }), _e = L(void 0), pt = ({ children: e, path: t }) => {
68
- const { model: r, ready: n } = Ye(t), s = A(() => n && r ? { model: r } : {}, [n, r]);
69
- return /* @__PURE__ */ m(_e.Provider, { value: s, children: e });
70
- }, D = () => {
71
- const e = K(_e);
72
- if (!e)
73
- throw new Error("useNozzleContext must be used within a NozzleProvider");
74
- return e;
75
- }, ht = ({
76
- onBeverageSelected: e,
77
- onClearBeverage: t,
78
- companionType: r
79
- }) => {
80
- const { model: n } = D(), [s, i] = N([]), [u, l] = N(null), f = A(() => r ? s.map(
81
- (d) => fe(d, r)
82
- ) : [], [s, r]), h = o(
83
- async (d) => {
84
- l(d), await (n == null ? void 0 : n.setSelectedPourable({ beverage: d })), e == null || e(d);
85
- },
86
- [n, e]
87
- ), c = o(async () => {
88
- l(null), await (n == null ? void 0 : n.setSelectedPourable({ beverage: void 0 })), t == null || t();
89
- }, [n, t]);
90
- return O(() => {
91
- const d = Re(() => {
92
- if (!n)
93
- return;
94
- const $ = n.selectedBrand;
95
- if (!$) {
96
- const b = n.getGroupAvailabilityItems("beverages").filter((v) => v.visible);
97
- i(b ?? []);
98
- return;
99
- }
100
- const x = n.getAvailabilityByParent($.id).filter((b) => b.visible);
101
- i(x ?? []);
102
- });
103
- return () => {
104
- d();
105
- };
106
- }, [n]), {
107
- beverages: s,
108
- beverageCompanions: f,
109
- selectBeverage: h,
110
- selectedBeverage: u,
111
- clearBeverage: c
112
- };
113
- }, ft = ({
114
- onBrandSelected: e,
115
- onBrandCleared: t,
116
- companionType: r
117
- }) => {
118
- const { model: n } = D(), [s, i] = N(null), [u, l] = N([]), f = A(() => r ? u.map((d) => fe(d, r)) : [], [u, r]), h = o(
119
- async (d) => {
120
- i(d), n == null || n.setSelectedBrand(d), e == null || e(d);
121
- },
122
- [n, e]
123
- ), c = o(() => {
124
- i(null), n == null || n.setSelectedBrand(void 0), t == null || t();
125
- }, [n, t]);
126
- return O(() => {
127
- const d = Re(() => {
128
- n && l(n.visibleBrands);
129
- });
130
- return () => {
131
- d();
132
- };
133
- }, [n]), {
134
- brands: u,
135
- brandCompanions: f,
136
- selectedBrand: s,
137
- selectBrand: h,
138
- clearBrand: c
139
- };
140
- }, bt = P.createLogger({
141
- name: "HoldToPourStrategy",
142
- group: "kos-hooks"
143
- }), Ge = {
144
- name: "HoldToPourStrategy",
145
- async initiate(e) {
146
- if (!(e != null && e.canPour)) {
147
- bt.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
148
- return;
149
- }
150
- await (e == null ? void 0 : e.pour());
151
- },
152
- async initiateEnded(e) {
153
- await (e == null ? void 0 : e.cancelPour());
154
- }
155
- }, re = P.createLogger({
156
- name: "useNozzlePour",
157
- group: "kos-hooks"
158
- }), vt = ({
159
- onPour: e,
160
- onPourCancel: t,
161
- onBeforePour: r,
162
- onBeforePourRejected: n,
163
- strategy: s = Ge
164
- }) => {
165
- const { model: i } = D(), u = o(async () => {
166
- (r ? await (r == null ? void 0 : r()) : !0) ? (re.debug(
167
- `[${s == null ? void 0 : s.name}] - Pour initiated for nozzle ${i == null ? void 0 : i.id}.`
168
- ), s == null || s.initiate(i), e == null || e()) : (re.debug(
169
- `[${s == null ? void 0 : s.name}] - Did not pass onBeforePour gate for nozzle ${i == null ? void 0 : i.id}. Cancelling pour.`
170
- ), n == null || n());
171
- }, [e, i, s, r, t]), l = o(() => {
172
- var c;
173
- re.debug(
174
- `[${s == null ? void 0 : s.name}] - Pour initiate ended called for nozzle ${i == null ? void 0 : i.id}.`
175
- ), (c = s == null ? void 0 : s.initiateEnded) == null || c.call(s, i), t == null || t();
176
- }, [t, i, s]), f = o(() => {
177
- re.debug(`Force cancelling pour for nozzle ${i == null ? void 0 : i.id}.`), i == null || i.cancelPour(), t == null || t();
178
- }, [t, i]);
179
- return {
180
- handlers: be({
181
- onPressed: u,
182
- onRelease: l
183
- }).dom,
184
- cancel: f,
185
- status: i
186
- };
187
- }, $t = ({
188
- onFlavorSelected: e,
189
- onFlavorCleared: t,
190
- companionType: r
191
- }) => {
192
- const { model: n } = D(), s = A(
193
- () => (n == null ? void 0 : n.getGroupAvailabilityItems("flavors").filter((c) => c.visible)) ?? [],
194
- [n]
195
- ), i = A(() => r ? s.map(
196
- (c) => fe(c, r)
197
- ) : [], [s, r]), [u, l] = N([]), f = o(
198
- async (c) => {
199
- if (l(
200
- (d) => d != null && d.includes(c) ? [...d.filter(($) => $ !== c)] : [...d ?? [], c]
201
- ), n != null && n.selectedPourable) {
202
- const { beverage: d } = n.selectedPourable;
203
- await n.setSelectedPourable({
204
- beverage: d,
205
- additional: u ?? []
206
- });
207
- }
208
- e == null || e(c, u ?? []);
209
- },
210
- [n, e, u]
211
- ), h = o(async () => {
212
- if (l([]), n != null && n.selectedPourable) {
213
- const { beverage: c } = n.selectedPourable;
214
- n.setSelectedPourable({ beverage: c }), t == null || t();
215
- }
216
- }, [n, t]);
217
- return {
218
- flavors: s,
219
- flavorCompanions: i,
220
- selectFlavor: f,
221
- selectedFlavors: u,
222
- clearFlavors: h
223
- };
224
- }, Q = "brands", ne = "beverages", X = "flavors", M = P.createLogger({ name: "use-cui-kit" }), gt = ({
225
- initialGroup: e = Q,
226
- options: t = {}
227
- }) => {
228
- var ee, te, se;
229
- const [r, n] = N(e), { model: s } = D(), i = Ce([]), u = o(
230
- (p) => {
231
- n(X);
232
- const C = `/kos/dispense/${s == null ? void 0 : s.path}/brand/selected/`;
233
- g.publish(C, p);
234
- },
235
- [s == null ? void 0 : s.path]
236
- ), l = o(() => {
237
- const p = `/kos/dispense/${s == null ? void 0 : s.path}/brand/cleared/`;
238
- g.publish(p, {});
239
- }, [s == null ? void 0 : s.path]), f = o(
240
- (p) => {
241
- n(X);
242
- const C = `/kos/dispense/${s == null ? void 0 : s.path}/beverage/selected/`;
243
- g.publish(C, p);
244
- },
245
- [s == null ? void 0 : s.path]
246
- ), h = o(() => {
247
- const p = `/kos/dispense/${s == null ? void 0 : s.path}/beverage/cleared/`;
248
- g.publish(p, {});
249
- }, [s == null ? void 0 : s.path]), c = o(
250
- (p) => {
251
- const C = `/kos/dispense/${s == null ? void 0 : s.path}/flavor/selected/`;
252
- g.publish(C, p);
253
- },
254
- [s == null ? void 0 : s.path]
255
- ), d = o(() => {
256
- const p = `/kos/dispense/${s == null ? void 0 : s.path}/flavor/cleared/`;
257
- g.publish(p, {});
258
- }, [s == null ? void 0 : s.path]), $ = o(() => {
259
- const p = `/kos/dispense/${s == null ? void 0 : s.path}/pour/`;
260
- g.publish(p, {});
261
- }, [s == null ? void 0 : s.path]), x = o(async () => {
262
- const p = `/kos/dispense/${s == null ? void 0 : s.path}/pre/pour/`;
263
- return g.publish(p, {}), await (k == null ? void 0 : k()) || !0;
264
- }, [s == null ? void 0 : s.path]), b = o(async () => {
265
- const p = `/kos/dispense/${s == null ? void 0 : s.path}/pre/pour/rejected/`;
266
- g.publish(p, {});
267
- }, [s == null ? void 0 : s.path]), v = o(() => {
268
- const p = `/kos/dispense/${s == null ? void 0 : s.path}/pour/cancel/`;
269
- g.publish(p, {});
270
- }, [s == null ? void 0 : s.path]), { brands: a, selectBrand: G, selectedBrand: R, clearBrand: w, brandCompanions: W } = ft({
271
- companionType: (ee = t.companionTypes) == null ? void 0 : ee.brand,
272
- onBrandSelected: u,
273
- onBrandCleared: l
274
- }), {
275
- beverages: ae,
276
- selectBeverage: oe,
277
- selectedBeverage: ce,
278
- clearBeverage: T,
279
- beverageCompanions: B
280
- } = ht({
281
- companionType: (te = t.companionTypes) == null ? void 0 : te.beverage,
282
- onBeverageSelected: f,
283
- onClearBeverage: h
284
- }), {
285
- clearFlavors: ve,
286
- flavors: q,
287
- selectFlavor: de,
288
- selectedFlavors: F,
289
- flavorCompanions: I
290
- } = $t({
291
- companionType: (se = t.companionTypes) == null ? void 0 : se.flavor,
292
- onFlavorSelected: c,
293
- onFlavorCleared: d
294
- }), [k, U] = N(), E = o((p) => {
295
- U(() => p);
296
- }, []), Y = vt({
297
- onPour: $,
298
- onPourCancel: v,
299
- onBeforePour: x,
300
- onBeforePourRejected: b
301
- }), j = o(() => {
302
- switch (M.debug(`Navigating back from group: ${r}`), r) {
303
- case Q:
304
- T(), w();
305
- break;
306
- case ne:
307
- case X:
308
- n(e), T(), w();
309
- break;
310
- }
311
- }, [T, w, r, e]), V = o(() => {
312
- const p = `/kos/dispense/${s == null ? void 0 : s.path}/home/`;
313
- g.publish(p, {}), n(e), e === Q && (T(), w()), e === ne && T();
314
- }, [T, w, e]), ue = o(() => {
315
- if (i.current.length === 0) {
316
- M.debug("No timers to pause.");
317
- return;
318
- }
319
- M.debug(`Pausing ${i.current.length} timers.`), i.current.forEach((p) => {
320
- M.debug(`Pausing timer with id ${p.id}.`), p.pause();
321
- });
322
- }, []), le = o(() => {
323
- if (i.current.length === 0) {
324
- M.debug("No timers to restart.");
325
- return;
326
- }
327
- M.debug(`Restarting ${i.current.length} timers.`), i.current.forEach((p) => {
328
- M.debug(`Restarting timer with id ${p.id}.`), p.restart();
329
- });
330
- }, []);
331
- return {
332
- timers: {
333
- add: o((p) => {
334
- if (p) {
335
- if (i.current.some((C) => C.id === p.id)) {
336
- M.debug(`Timer with id ${p.id} already exists.`);
337
- return;
338
- }
339
- i.current.push(p);
340
- }
341
- }, []),
342
- pause: ue,
343
- restart: le
344
- },
345
- nav: {
346
- currentGroup: r,
347
- back: j,
348
- home: V
349
- },
350
- pour: Y,
351
- updateOnBeforePour: E,
352
- selections: {
353
- [Q]: R,
354
- [ne]: ce,
355
- [X]: F
356
- },
357
- [Q]: {
358
- models: a,
359
- companions: W,
360
- clear: w,
361
- handlers: {
362
- onSelected: G
363
- }
364
- },
365
- [ne]: {
366
- models: ae,
367
- companions: B,
368
- clear: T,
369
- handlers: {
370
- onSelected: oe
371
- }
372
- },
373
- [X]: {
374
- models: q,
375
- companions: I,
376
- clear: ve,
377
- handlers: {
378
- onSelected: de
379
- }
380
- }
381
- };
382
- }, wt = (e) => {
383
- const { model: t } = D(), [r, n] = N(null), {
384
- onAmbientTimer: s,
385
- onAttractTimer: i,
386
- onResetAttractTimer: u,
387
- onResumeAttractTimer: l,
388
- defaultAttractTime: f,
389
- defaultAmbientTime: h
390
- } = e, c = o(() => {
391
- s && (P.info("Ambient timer expired. Calling callback"), s == null || s());
392
- }, [s]), d = o(() => {
393
- i && (P.info("Attract timer expired. Calling callback"), i == null || i());
394
- }, [i]), $ = o(() => {
395
- r && (r.restart(), u == null || u());
396
- }, [r, u]), x = o(() => {
397
- r && (r.reset(), u == null || u());
398
- }, [r, u]), b = o(() => {
399
- r && (r.pause(), l == null || l());
400
- }, [r, l]);
401
- return O(() => {
402
- if (t && f) {
403
- P.info("Nozzle is available. Creating timers");
404
- const v = Be.createTimer(
405
- "attract-timer-" + t.path,
406
- f
407
- );
408
- return f && (v == null || v.addTimeoutAction({
409
- name: "attract-timer",
410
- remainingTime: 0,
411
- action: d
412
- })), h && (v == null || v.addTimeoutAction({
413
- name: "ambient-timer",
414
- remainingTime: h,
415
- action: c
416
- })), f && (v == null || v.start()), n(v ?? null), () => {
417
- v == null || v.reset(), n(null);
418
- };
419
- }
420
- return () => {
421
- P.info("Nozzle is not available. No timers to clear");
422
- };
423
- }, [
424
- h,
425
- f,
426
- c,
427
- d,
428
- t
429
- ]), {
430
- attractTimer: r,
431
- restart: $,
432
- pause: x,
433
- resume: b
434
- };
435
- }, Tt = (e, t) => {
436
- if (t)
437
- return g.subscribe(e, t).unsubscribe;
438
- }, Pt = ({
439
- onInit: e,
440
- onBrandSelected: t,
441
- onBrandCleared: r,
442
- onBeverageCleared: n,
443
- onBeverageSelected: s,
444
- onFlavorCleared: i,
445
- onFlavorSelected: u,
446
- onReturnToHome: l,
447
- onPour: f,
448
- onPourCancel: h,
449
- onBeforePourRejected: c,
450
- onAmbientTimer: d,
451
- onAttractTimer: $,
452
- onResumeAttractTimer: x,
453
- onIdleTimeout: b,
454
- onAreYouThereTimeout: v
455
- }) => {
456
- const { model: a } = D();
457
- O(() => {
458
- const R = [
459
- {
460
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/brand/selected/`,
461
- callback: t
462
- },
463
- {
464
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/brand/cleared/`,
465
- callback: r
466
- },
467
- {
468
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/beverage/selected/`,
469
- callback: s
470
- },
471
- {
472
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/beverage/cleared/`,
473
- callback: n
474
- },
475
- {
476
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/flavor/selected/`,
477
- callback: u
478
- },
479
- {
480
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/flavor/cleared/`,
481
- callback: i
482
- },
483
- { topic: `/kos/dispense/${a == null ? void 0 : a.path}/pour/`, callback: f },
484
- {
485
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/pour/cancel/`,
486
- callback: h
487
- },
488
- {
489
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/pre/pour/rejected/`,
490
- callback: c
491
- },
492
- {
493
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/ambient/start/`,
494
- callback: d
495
- },
496
- {
497
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/attract/start/`,
498
- callback: $
499
- },
500
- {
501
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/attract/resume/`,
502
- callback: x
503
- },
504
- {
505
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/idle/timeout/`,
506
- callback: b
507
- },
508
- {
509
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/are-you-there/timeout/`,
510
- callback: v
511
- },
512
- {
513
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/init/`,
514
- callback: e
515
- },
516
- {
517
- topic: `/kos/dispense/${a == null ? void 0 : a.path}/home/`,
518
- callback: l
519
- }
520
- ].map(
521
- ({ topic: w, callback: W }) => Tt(w, W)
522
- );
523
- return () => {
524
- R.forEach((w) => w == null ? void 0 : w());
525
- };
526
- }, [
527
- a == null ? void 0 : a.path,
528
- d,
529
- $,
530
- n,
531
- s,
532
- r,
533
- t,
534
- i,
535
- u,
536
- f,
537
- h,
538
- x,
539
- b,
540
- v,
541
- e,
542
- l
543
- ]);
544
- }, y = P.createLogger({ name: "useCuiKitTimers" }), Ke = (e) => {
545
- const { model: t } = D(), [r, n] = N(null), {
546
- onAreYouThereTimer: s,
547
- onIdleTimer: i,
548
- onResetIdleTimer: u,
549
- defaultAreYouThereTime: l = 10,
550
- defaultIdleTime: f = 20
551
- } = e, h = Ce(!1), c = o(() => {
552
- !h.current && s && (P.info("Are you there timer expired. Calling callback"), h.current = !0, s == null || s());
553
- }, [s]), d = o(() => {
554
- y.debug(
555
- "handleIdleTimer called in useCuiKitTimers, onIdleTimer exists:",
556
- !!i
557
- ), i ? (y.debug("Idle timer expired. Calling callback"), i == null || i()) : y.debug("No onIdleTimer callback provided!");
558
- }, [i]), $ = o(() => {
559
- y.debug(`TIMER RESTART called for ${e.prefix ?? ""}timer`), r && (r.restart(), h.current = !1, u == null || u());
560
- }, [r, u, e.prefix]), x = o(() => {
561
- y.debug(`TIMER PAUSE/RESET called for ${e.prefix ?? ""}timer`), r && (r.reset(), h.current = !1, u == null || u());
562
- }, [r, u, e.prefix]);
563
- return O(() => {
564
- if (y.debug(
565
- `useCuiKitTimers effect triggered - nozzle: ${!!t}, path: ${t == null ? void 0 : t.path}, callbacks: handleIdle=${!!d}, handleAreYouThere=${!!c}`
566
- ), t) {
567
- y.info("Nozzle is available. Creating timers");
568
- const b = Be.createTimer(
569
- `${e.prefix ?? ""}idle-timer-${t.path}`,
570
- f
571
- );
572
- return y.debug(
573
- `Adding idle timer action for ${e.prefix ?? ""}idle-timer-${t.path} with callback:`,
574
- !!d
575
- ), b == null || b.addTimeoutAction({
576
- name: "idle-timer",
577
- remainingTime: 0,
578
- action: d
579
- }), b == null || b.addTimeoutAction({
580
- name: "are-you-there-timer",
581
- remainingTime: l,
582
- action: c
583
- }), n(b ?? null), () => {
584
- b == null || b.reset(), n(null);
585
- };
586
- }
587
- return () => {
588
- y.info("Nozzle is not available. No timers to clear");
589
- };
590
- }, [
591
- l,
592
- f,
593
- c,
594
- d,
595
- t,
596
- e.prefix
597
- ]), {
598
- idleTimer: r,
599
- restart: $,
600
- pause: x
601
- };
602
- }, _ = P.createLogger({ name: "useDefaultCuiKitLifecycle" }), _t = ({
603
- kit: e,
604
- inactivity: t,
605
- pour: r,
606
- screens: n,
607
- onBeforeAreYouThereTimer: s,
608
- areYouThereRejectionPolicy: i = "pause"
609
- }) => {
610
- var ge, we, Te, Pe;
611
- const [u, l] = N(!1), [f, h] = N(!1), { model: c } = D(), [d, $] = N(!1), x = (t == null ? void 0 : t.idleTimeout) ?? 15, b = (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 10, v = (r == null ? void 0 : r.idleTimeout) ?? (t == null ? void 0 : t.idleTimeout) ?? 10, a = (r == null ? void 0 : r.areYouThereTimeoutOffset) ?? (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 5, G = n == null ? void 0 : n.ambientTimeoutOffset, R = n == null ? void 0 : n.attractTimeout, w = o(() => {
612
- if (_.info("handleIdleTimeout called - navigating home and publishing event"), F(!1), e == null || e.nav.home(), c) {
613
- const S = `/kos/dispense/${c.path}/idle/timeout/`;
614
- g.publish(S, {});
615
- }
616
- }, [(ge = e == null ? void 0 : e.nav) == null ? void 0 : ge.home, c]), W = o(() => {
617
- _.info("handleResetIdleTimer called - resetting idle timer"), F(!1);
618
- }, []), ae = o(() => {
619
- if (G && (l(!0), h(!1), c)) {
620
- const S = `/kos/dispense/${c.path}/ambient/start/`;
621
- g.publish(S, {});
622
- }
623
- }, [G, c]), oe = o(() => {
624
- if (R && (h(!0), l(!1), c)) {
625
- const S = `/kos/dispense/${c.path}/attract/start/`;
626
- g.publish(S, {});
627
- }
628
- }, [R, c]), ce = o(() => {
629
- if (R && (h(!1), l(!1), e == null || e.nav.home(), c)) {
630
- const S = `/kos/dispense/${c.path}/attract/resume/`;
631
- g.publish(S, {});
632
- }
633
- }, [e == null ? void 0 : e.nav, R, c]), {
634
- pause: T,
635
- restart: B,
636
- resume: ve,
637
- attractTimer: q
638
- } = wt({
639
- defaultAmbientTime: G,
640
- defaultAttractTime: R,
641
- onAmbientTimer: ae,
642
- onAttractTimer: oe,
643
- onResumeAttractTimer: ce
644
- });
645
- (we = e == null ? void 0 : e.timers) == null || we.add(q);
646
- const [de, F] = N(!1);
647
- _.info(
648
- "Creating idle timer with timeout:",
649
- x,
650
- "seconds and callback:",
651
- !!w
652
- );
653
- const { pause: I, restart: k, idleTimer: U } = Ke({
654
- defaultAreYouThereTime: b,
655
- defaultIdleTime: x,
656
- onIdleTimer: w,
657
- onResetIdleTimer: W
658
- });
659
- _.info(
660
- `Creating pour timer with timeout: ${v} seconds and callback: ${!!w}`
661
- );
662
- const {
663
- pause: E,
664
- restart: Y,
665
- idleTimer: j
666
- } = Ke({
667
- defaultAreYouThereTime: a,
668
- defaultIdleTime: v,
669
- onIdleTimer: w,
670
- prefix: "pour-"
671
- }), V = o(async () => {
672
- let S = !0;
673
- if (s)
674
- try {
675
- S = await s();
676
- } catch (me) {
677
- _.error(`onBeforeAreYouThereTimer callback failed: ${me}`), S = !1;
678
- }
679
- if (S) {
680
- if (c) {
681
- const me = `/kos/dispense/${c.path}/are-you-there/timeout/`;
682
- g.publish(me, {});
683
- }
684
- F(!0), d ? E() : I();
685
- } else
686
- switch (i) {
687
- case "pause":
688
- d ? E() : I();
689
- break;
690
- case "restart":
691
- d ? Y() : k();
692
- break;
693
- }
694
- }, [s, c, i, d]), ue = o(() => {
695
- F(!1), T(), d ? (Y(), I()) : (k(), E());
696
- }, [d, I, E, k, Y]);
697
- O(() => {
698
- U && U.addTimeoutAction({
699
- name: "are-you-there-timer",
700
- remainingTime: b,
701
- action: V
702
- });
703
- }, [U, b, V]), O(() => {
704
- j && j.addTimeoutAction({
705
- name: "pour-are-you-there-timer",
706
- remainingTime: a,
707
- action: V
708
- });
709
- }, [j, a, V]), (Te = e == null ? void 0 : e.timers) == null || Te.add(U), (Pe = e == null ? void 0 : e.timers) == null || Pe.add(j);
710
- const le = o(() => {
711
- $(!1), E(), I(), T();
712
- }, [I, E]), $e = o(() => {
713
- $(!0), _.info("restarting pour timer"), Y(), T(), I();
714
- }, [I, Y]), ee = o(() => {
715
- $(!1), _.info("restarting pour timer on before pour rejected"), E(), k();
716
- }, []), te = o(() => {
717
- T(), h(!1), l(!1), k();
718
- }, [T, k]), se = o(() => {
719
- h(!1), l(!1), $(!1), E(), B();
720
- }, [B, E]), p = o(() => {
721
- h(!1), l(!1), $(!1), T(), k();
722
- }, [T, k]), C = o(() => {
723
- h(!1), l(!1), $(!1), B(), I(), E();
724
- }, [B, I, E]), nt = o(() => {
725
- h(!1), l(!1), B(), I();
726
- }, [B, I]);
727
- Pt({
728
- onBrandSelected: te,
729
- onBrandCleared: se,
730
- onBeverageSelected: p,
731
- onBeverageCleared: C,
732
- onPour: le,
733
- onPourCancel: $e,
734
- onBeforePourRejected: ee,
735
- onInit: nt
736
- // Note: Timer-related handlers (onIdleTimeout, onAmbientTimer, onAttractTimer,
737
- // onResumeAttractTimer, onAreYouThereTimeout) are NOT included here since this
738
- // component's own timer hooks call those handlers directly. Including them would
739
- // create circular event loops.
740
- });
741
- const it = d ? a : b;
742
- return O(() => {
743
- if (c && q) {
744
- const S = `/kos/dispense/${c == null ? void 0 : c.path}/init/`;
745
- g.publish(S, {});
746
- }
747
- }, [c, q]), {
748
- showAreYouThere: de,
749
- clearAreYouThere: ue,
750
- pauseIdleTimer: I,
751
- restartIdleTimer: k,
752
- areYouThereCountdown: it,
753
- showAmbientScreen: u,
754
- showAttractScreen: f,
755
- pauseScreenTimer: T,
756
- restartScreenTimer: B
757
- };
758
- }, Fe = () => {
759
- const e = ke.type;
760
- return H({
761
- modelId: e,
762
- modelType: ke.type,
763
- options: {}
764
- });
765
- };
766
- function Gt(e) {
767
- return (t) => {
768
- const { model: r, status: n, KosModelLoader: s } = Fe();
769
- return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, deviceAssembly: r }) });
770
- };
771
- }
772
- const Ue = (e) => H({
773
- modelId: e,
774
- modelType: ut.type,
775
- options: {}
776
- });
777
- function Ft(e, t) {
778
- return (r) => {
779
- const { model: n, status: s, KosModelLoader: i } = Ue(e);
780
- return /* @__PURE__ */ m(i, { ...s, children: /* @__PURE__ */ m(t, { ...r, holder: n }) });
781
- };
782
- }
783
- const je = () => {
784
- const e = Ee.type;
785
- return H({
786
- modelId: e,
787
- modelType: Ee.type,
788
- options: {}
789
- });
790
- };
791
- function Ut(e) {
792
- return (t) => {
793
- const { model: r, status: n, KosModelLoader: s } = je();
794
- return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, holderContainer: r }) });
795
- };
796
- }
797
- const Ve = () => {
798
- const e = Se.type;
799
- return H({
800
- modelId: e,
801
- modelType: Se.type,
802
- options: {}
803
- });
804
- }, pe = P.createLogger({
805
- name: "HoldToPourIntentStrategy",
806
- group: "kos-hooks"
807
- }), It = {
808
- name: "HoldToPourIntentStrategy",
809
- async initiate(e, t) {
810
- if (!(e != null && e.canPour)) {
811
- pe.debug(`${e == null ? void 0 : e.id} cannot pour. Returning early.`);
812
- return;
813
- }
814
- t ? (pe.debug(`performing intent: ${t}`), await (e == null ? void 0 : e.performIntent(t))) : pe.debug("no intent provided. Returning early.");
815
- },
816
- async initiateEnded(e) {
817
- await (e == null ? void 0 : e.cancelPour());
818
- }
819
- }, he = P.createLogger({
820
- name: "useNozzlePour",
821
- group: "kos-hooks"
822
- }), jt = ({
823
- onPour: e,
824
- onPourCancel: t,
825
- intentContainer: r,
826
- strategy: n = It
827
- }) => {
828
- const s = o(() => {
829
- he.debug(
830
- `[${n == null ? void 0 : n.name}] - Pour initiated for model ${r == null ? void 0 : r.id}.`
831
- ), n == null || n.initiate(r), e == null || e();
832
- }, [e, r, n]), i = o(() => {
833
- var f;
834
- he.debug(
835
- `[${n == null ? void 0 : n.name}] - Pour initiate ended called for nozzle ${r == null ? void 0 : r.id}.`
836
- ), (f = n == null ? void 0 : n.initiateEnded) == null || f.call(n, r), t == null || t();
837
- }, [t, r, n]), u = o(() => {
838
- he.debug(`Force cancelling pour for nozzle ${r == null ? void 0 : r.id}.`), r == null || r.cancelPour(), t == null || t();
839
- }, [t, r]);
840
- return {
841
- handlers: be({
842
- onPressed: s,
843
- onRelease: i
844
- }).dom,
845
- cancel: u,
846
- status: r
847
- };
848
- };
849
- function Vt(e) {
850
- return (t) => {
851
- const { model: r, status: n, KosModelLoader: s } = Ve();
852
- return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, ingredient: r }) });
853
- };
854
- }
855
- const We = () => {
856
- const e = Ne.type;
857
- return H({
858
- modelId: e,
859
- modelType: Ne.type,
860
- options: {}
861
- });
862
- };
863
- function Wt(e) {
864
- return (t) => {
865
- const { model: r, status: n, KosModelLoader: s } = We();
866
- return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, ingredientContainer: r }) });
867
- };
868
- }
869
- function qt(e, t) {
870
- return (r) => {
871
- const { model: n, status: s, KosModelLoader: i } = Ye(e);
872
- return /* @__PURE__ */ m(i, { ...s, children: /* @__PURE__ */ m(t, { ...r, nozzle: n }) });
873
- };
874
- }
875
- const Z = P.createLogger({
876
- name: "usePour",
877
- group: "kos-hooks"
878
- }), Jt = ({
879
- onBeforePour: e,
880
- onPour: t,
881
- onPourCancel: r,
882
- onPourAbort: n,
883
- pourTarget: s,
884
- strategy: i = Ge
885
- }) => {
886
- const u = o(async () => {
887
- Z.debug(
888
- `[${i == null ? void 0 : i.name}] - calling before pour for pour target ${s == null ? void 0 : s.id}.`
889
- ), (e ? await (e == null ? void 0 : e()) : !0) ? (Z.debug(
890
- `[${i == null ? void 0 : i.name}] - Pour initiated for pour target ${s == null ? void 0 : s.id}.`
891
- ), await (i == null ? void 0 : i.initiate(s)), t == null || t(), s != null && s.isPouring || n == null || n()) : (Z.debug(
892
- `[${i == null ? void 0 : i.name}] - Pour cancelled for pour target ${s == null ? void 0 : s.id}.`
893
- ), r == null || r());
894
- }, [t, s, i]), l = o(async () => {
895
- var d;
896
- Z.debug(
897
- `[${i == null ? void 0 : i.name}] - Pour initiate ended called for pour target ${s == null ? void 0 : s.id}.`
898
- ), await ((d = i == null ? void 0 : i.initiateEnded) == null ? void 0 : d.call(i, s)) || r == null || r();
899
- }, [r, s, i]), f = o(async () => {
900
- Z.debug(`Force cancelling pour for pour target ${s == null ? void 0 : s.id}.`), await (s == null ? void 0 : s.cancelPour()), r == null || r();
901
- }, [r, s]);
902
- return {
903
- handlers: be({
904
- onPressed: u,
905
- onRelease: l
906
- }).dom,
907
- cancel: f,
908
- status: s
909
- };
910
- }, z = P.createLogger({
911
- name: "TapOrHoldIntentStrategy",
912
- group: "kos-hooks"
913
- });
914
- class Qt {
915
- constructor(t) {
916
- J(this, "intent");
917
- J(this, "name", "TapOrHoldIntentStrategy");
918
- J(this, "isHold", !1);
919
- J(this, "disposer", null);
920
- this.intent = t;
921
- }
922
- async initiate(t, r) {
923
- if (this.disposer = setTimeout(() => {
924
- this.isHold = !0;
925
- }, 250), t != null && t.isPouring && !this.isHold) {
926
- z.debug("additional tap detected. cancelling pour"), await t.cancelPour();
927
- return;
928
- }
929
- if (!(t != null && t.canPour)) {
930
- z.debug(`${t == null ? void 0 : t.id} cannot pour. Returning early.`);
931
- return;
932
- }
933
- r ? (z.debug(`performing intent: ${r}`), await (t == null ? void 0 : t.performIntent(r))) : z.debug("no intent provided. Returning early.");
934
- }
935
- async initiateEnded(t) {
936
- return this.disposer && clearTimeout(this.disposer), this.disposer = null, this.isHold ? (await (t == null ? void 0 : t.cancelPour()), !1) : (z.debug("Tap detected. don't cancel and return."), !0);
937
- }
938
- }
939
- const ie = P.createLogger({
940
- name: "TapToPourIntentStrategy",
941
- group: "kos-hooks"
942
- }), Xt = {
943
- name: "TapToPourIntentStrategy",
944
- async initiate(e, t) {
945
- if (e != null && e.isPouring) {
946
- ie.debug(`Nozzle ${e == null ? void 0 : e.id} is already pouring. cancelling pour`), await e.cancelPour();
947
- return;
948
- }
949
- if (!(e != null && e.canPour)) {
950
- ie.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
951
- return;
952
- }
953
- t ? (ie.debug(`performing intent: ${t}`), await (e == null ? void 0 : e.performIntent(t))) : ie.debug("no intent provided. Returning early.");
954
- },
955
- async initiateEnded(e) {
956
- return !0;
957
- }
958
- }, Le = P.createLogger({
959
- name: "HoldToPourStrategy",
960
- group: "kos-hooks"
961
- }), Zt = {
962
- name: "TapToPourStrategy",
963
- async initiate(e) {
964
- if (e != null && e.isPouring) {
965
- Le.debug(`Nozzle ${e == null ? void 0 : e.id} is already pouring. cancelling pour`), await e.cancelPour();
966
- return;
967
- }
968
- if (!(e != null && e.canPour)) {
969
- Le.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
970
- return;
971
- }
972
- await (e == null ? void 0 : e.pour());
973
- },
974
- async initiateEnded(e) {
975
- return !0;
976
- }
977
- }, At = (e, t, r) => H({
978
- modelId: e,
979
- modelType: lt.type,
980
- options: {
981
- servicePathFactory: t,
982
- selectedId: r
983
- }
984
- });
985
- function zt(e) {
986
- return (t) => {
987
- const { model: r, status: n, KosModelLoader: s } = At(
988
- t.id,
989
- t.servicePathFactory,
990
- t.itemId
991
- );
992
- return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, genericPour: r }) });
993
- };
994
- }
995
- const qe = L(void 0), es = ({ children: e }) => {
996
- const { model: t, ready: r } = ye(), n = A(() => r && t ? { model: t } : {}, [r, t]);
997
- return /* @__PURE__ */ m(qe.Provider, { value: n, children: e });
998
- }, ts = () => {
999
- const e = K(
1000
- qe
1001
- );
1002
- if (!e)
1003
- throw new Error(
1004
- "useAssemblyContext must be used within a AssemblyProvider"
1005
- );
1006
- return e;
1007
- }, Je = L(void 0), ss = ({ children: e }) => {
1008
- const { model: t, ready: r } = De(), n = A(() => r && t ? { model: t } : {}, [r, t]);
1009
- return /* @__PURE__ */ m(Je.Provider, { value: n, children: e });
1010
- }, rs = () => {
1011
- const e = K(Je);
1012
- if (!e)
1013
- throw new Error(
1014
- "useAvailabilityContext must be used within a AvailabilityProvider"
1015
- );
1016
- return e;
1017
- }, Qe = L(void 0), ns = ({ children: e, id: t }) => {
1018
- const { model: r, ready: n } = Me(t), s = A(() => n && r ? { model: r } : {}, [n, r]);
1019
- return /* @__PURE__ */ m(Qe.Provider, { value: s, children: e });
1020
- }, is = () => {
1021
- const e = K(Qe);
1022
- if (!e)
1023
- throw new Error("useBoardContext must be used within a BoardProvider");
1024
- return e;
1025
- }, Xe = L(void 0), as = ({ children: e }) => {
1026
- const { model: t, ready: r } = Oe(), n = A(() => r && t ? { model: t } : {}, [r, t]);
1027
- return /* @__PURE__ */ m(Xe.Provider, { value: n, children: e });
1028
- }, os = () => {
1029
- const e = K(Xe);
1030
- if (!e)
1031
- throw new Error(
1032
- "useBoardContainerContext must be used within a BoardContainerProvider"
1033
- );
1034
- return e;
1035
- }, Ze = L(
1036
- void 0
1037
- ), xt = ({ children: e }) => {
1038
- const { model: t, ready: r } = Fe(), n = A(() => {
1039
- if (r && t) {
1040
- const i = t.nozzlePaths;
1041
- return { model: t, nozzlePaths: i };
1042
- }
1043
- return {};
1044
- }, [r, t]), s = r && t ? e : null;
1045
- return /* @__PURE__ */ m(Ze.Provider, { value: n, children: s });
1046
- }, kt = () => {
1047
- const e = K(Ze);
1048
- if (!e)
1049
- throw new Error(
1050
- "useDeviceAssemblyContext must be used within a DeviceAssemblyProvider"
1051
- );
1052
- return e;
1053
- };
1054
- function Et() {
1055
- const e = mt.createContext(null);
1056
- return [() => {
1057
- const r = K(e);
1058
- if (r === void 0)
1059
- throw new Error("useDispenseKitContext must be used within a Provider");
1060
- return r;
1061
- }, e.Provider];
1062
- }
1063
- function St({
1064
- children: e,
1065
- provider: t,
1066
- props: r,
1067
- nozzleProps: n
1068
- }) {
1069
- const s = gt(r);
1070
- return /* @__PURE__ */ m(t, { value: s, children: e(n || {}) });
1071
- }
1072
- function Nt({
1073
- children: e,
1074
- provider: t,
1075
- props: r
1076
- }) {
1077
- const { nozzlePaths: n } = kt(), s = (n == null ? void 0 : n.length) || 0;
1078
- return (n == null ? void 0 : n.map((u, l) => /* @__PURE__ */ m(pt, { path: u, children: /* @__PURE__ */ m(
1079
- St,
1080
- {
1081
- provider: t,
1082
- props: r,
1083
- nozzleProps: {
1084
- nozzleIndex: l,
1085
- nozzlePath: u,
1086
- totalNozzles: s,
1087
- isFirstNozzle: l === 0,
1088
- isLastNozzle: l === s - 1
1089
- },
1090
- children: e
1091
- }
1092
- ) }, u))) || [];
1093
- }
1094
- function Ht({
1095
- provider: e,
1096
- props: t
1097
- }) {
1098
- return ({ children: r }) => e ? /* @__PURE__ */ m(xt, { children: /* @__PURE__ */ m(
1099
- Nt,
1100
- {
1101
- provider: e,
1102
- props: t,
1103
- children: r
1104
- }
1105
- ) }) : null;
1106
- }
1107
- function cs(e) {
1108
- const [t, r] = Et();
1109
- return [
1110
- t,
1111
- Ht({ provider: r, props: e })
1112
- ];
1113
- }
1114
- const ze = L(void 0), ds = ({ children: e, id: t }) => {
1115
- const { model: r, ready: n } = Ue(t || ""), s = A(() => n && r ? { model: r } : {}, [n, r]);
1116
- return /* @__PURE__ */ m(ze.Provider, { value: s, children: e });
1117
- }, us = () => {
1118
- const e = K(ze);
1119
- if (!e)
1120
- throw new Error("useHolderContext must be used within a HolderProvider");
1121
- return e;
1122
- }, et = L(
1123
- void 0
1124
- ), ls = ({ children: e }) => {
1125
- const { model: t, ready: r } = je(), n = A(() => r && t ? { model: t } : {}, [r, t]);
1126
- return /* @__PURE__ */ m(et.Provider, { value: n, children: e });
1127
- }, ms = () => {
1128
- const e = K(et);
1129
- if (!e)
1130
- throw new Error(
1131
- "useHolderContainerContext must be used within a HolderContainerProvider"
1132
- );
1133
- return e;
1134
- }, tt = L(void 0), ps = ({ children: e }) => {
1135
- const { model: t, ready: r } = Ve(), n = A(() => r && t ? { model: t } : {}, [r, t]);
1136
- return /* @__PURE__ */ m(tt.Provider, { value: n, children: e });
1137
- }, hs = () => {
1138
- const e = K(tt);
1139
- if (!e)
1140
- throw new Error(
1141
- "useIngredientContext must be used within a IngredientProvider"
1142
- );
1143
- return e;
1144
- }, st = L(
1145
- void 0
1146
- ), fs = ({ children: e }) => {
1147
- const { model: t, ready: r } = We(), n = A(() => r && t ? { model: t } : {}, [r, t]);
1148
- return /* @__PURE__ */ m(st.Provider, { value: n, children: e });
1149
- }, bs = () => {
1150
- const e = K(st);
1151
- if (!e)
1152
- throw new Error(
1153
- "useIngredientContainerContext must be used within a IngredientContainerProvider"
1154
- );
1155
- return e;
1156
- }, Kt = () => {
1157
- const e = He.type;
1158
- return H({
1159
- modelId: e,
1160
- modelType: He.type,
1161
- options: {}
1162
- });
1163
- }, rt = L(void 0), vs = ({ children: e }) => {
1164
- const { model: t, ready: r } = Kt(), n = A(() => r && t ? { model: t } : {}, [r, t]);
1165
- return /* @__PURE__ */ m(rt.Provider, { value: n, children: e });
1166
- }, $s = () => {
1167
- const e = K(rt);
1168
- if (!e)
1169
- throw new Error("usePumpContext must be used within a PumpProvider");
1170
- return e;
1171
- };
1172
- export {
1173
- Wt as $,
1174
- es as A,
1175
- ns as B,
1176
- St as C,
1177
- xt as D,
1178
- ft as E,
1179
- Q as F,
1180
- ne as G,
1181
- ds as H,
1182
- ps as I,
1183
- X as J,
1184
- gt as K,
1185
- _t as L,
1186
- Pt as M,
1187
- pt as N,
1188
- Ke as O,
1189
- vs as P,
1190
- $t as Q,
1191
- Fe as R,
1192
- Gt as S,
1193
- Ue as T,
1194
- Ft as U,
1195
- je as V,
1196
- Ut as W,
1197
- Ve as X,
1198
- jt as Y,
1199
- Vt as Z,
1200
- We as _,
1201
- ss as a,
1202
- Ye as a0,
1203
- qt as a1,
1204
- vt as a2,
1205
- Jt as a3,
1206
- It as a4,
1207
- Ge as a5,
1208
- Qt as a6,
1209
- Xt as a7,
1210
- Zt as a8,
1211
- At as a9,
1212
- zt as aa,
1213
- rs as b,
1214
- is as c,
1215
- as as d,
1216
- os as e,
1217
- Ht as f,
1218
- kt as g,
1219
- us as h,
1220
- cs as i,
1221
- ls as j,
1222
- ms as k,
1223
- hs as l,
1224
- fs as m,
1225
- bs as n,
1226
- D as o,
1227
- $s as p,
1228
- ye as q,
1229
- De as r,
1230
- Mt as s,
1231
- Me as t,
1232
- ts as u,
1233
- Ot as v,
1234
- Dt as w,
1235
- Oe as x,
1236
- Yt as y,
1237
- ht as z
1238
- };
1239
- //# sourceMappingURL=pump-provider--hQGuh_w.js.map