@simpleapps-com/augur-web 2026.11.2 → 2026.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EXPORTS.md +1 -1
- package/README.md +7 -2
- package/dist/add-to-cart-button.cjs +3 -2
- package/dist/add-to-cart-button.cjs.map +1 -1
- package/dist/add-to-cart-button.js +2 -1
- package/dist/add-to-cart-button.js.map +1 -1
- package/dist/bin-scan.d.ts +23 -0
- package/dist/bin-scan.d.ts.map +1 -0
- package/dist/button.d.ts +1 -1
- package/dist/{chunk-32XB3REY.cjs → chunk-6SSR5Z6X.cjs} +8 -5
- package/dist/chunk-6SSR5Z6X.cjs.map +1 -0
- package/dist/{chunk-RCUKSVMF.js → chunk-6USFUHWW.js} +9 -14
- package/dist/chunk-6USFUHWW.js.map +1 -0
- package/dist/{chunk-WJUDOEVB.cjs → chunk-7RDA26CL.cjs} +7 -7
- package/dist/{chunk-WJUDOEVB.cjs.map → chunk-7RDA26CL.cjs.map} +1 -1
- package/dist/{chunk-UMNTUD2P.js → chunk-AC3OCGDU.js} +6 -8
- package/dist/chunk-AC3OCGDU.js.map +1 -0
- package/dist/{chunk-MOC5N2N4.js → chunk-BSRLAXZ2.js} +9 -6
- package/dist/chunk-BSRLAXZ2.js.map +1 -0
- package/dist/{chunk-UB7HYAAC.js → chunk-EBCKH6JE.js} +6 -3
- package/dist/chunk-EBCKH6JE.js.map +1 -0
- package/dist/{chunk-WFMP6TZN.js → chunk-I6LMIYVF.js} +3 -3
- package/dist/{chunk-RGJT67PN.js → chunk-IDCDOE2L.js} +6 -3
- package/dist/chunk-IDCDOE2L.js.map +1 -0
- package/dist/{chunk-MXSQYVCK.js → chunk-IXQFZJSN.js} +7 -3
- package/dist/chunk-IXQFZJSN.js.map +1 -0
- package/dist/{chunk-76RSVRGB.cjs → chunk-KVJQIZSM.cjs} +10 -15
- package/dist/chunk-KVJQIZSM.cjs.map +1 -0
- package/dist/{chunk-TFP5RICB.cjs → chunk-L7JN7ED7.cjs} +37 -37
- package/dist/chunk-L7JN7ED7.cjs.map +1 -0
- package/dist/{chunk-JXW4XE2P.cjs → chunk-N57EZBPE.cjs} +10 -7
- package/dist/chunk-N57EZBPE.cjs.map +1 -0
- package/dist/chunk-NBXA42AW.cjs +534 -0
- package/dist/chunk-NBXA42AW.cjs.map +1 -0
- package/dist/chunk-NSMOT7GD.js +534 -0
- package/dist/chunk-NSMOT7GD.js.map +1 -0
- package/dist/{chunk-BXMTQGKV.cjs → chunk-OJS2B6U2.cjs} +7 -3
- package/dist/chunk-OJS2B6U2.cjs.map +1 -0
- package/dist/{chunk-5VMEEKZ5.cjs → chunk-SJGSBMMN.cjs} +7 -9
- package/dist/chunk-SJGSBMMN.cjs.map +1 -0
- package/dist/{chunk-C6K7FZNX.js → chunk-TEDFINZP.js} +2 -2
- package/dist/{chunk-DMWSWL4B.cjs → chunk-VCFKYOVH.cjs} +3 -3
- package/dist/{chunk-DMWSWL4B.cjs.map → chunk-VCFKYOVH.cjs.map} +1 -1
- package/dist/{chunk-Z57QBVUC.cjs → chunk-VXVOYZBN.cjs} +8 -5
- package/dist/chunk-VXVOYZBN.cjs.map +1 -0
- package/dist/{chunk-KVHOMD4T.js → chunk-YJDVFOVR.js} +40 -40
- package/dist/chunk-YJDVFOVR.js.map +1 -0
- package/dist/command.cjs +3 -3
- package/dist/command.cjs.map +1 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +2 -2
- package/dist/command.js.map +1 -1
- package/dist/confirm-dialog.cjs +3 -2
- package/dist/confirm-dialog.cjs.map +1 -1
- package/dist/confirm-dialog.js +2 -1
- package/dist/confirm-dialog.js.map +1 -1
- package/dist/data-table.cjs +65 -46
- package/dist/data-table.cjs.map +1 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +59 -40
- package/dist/data-table.js.map +1 -1
- package/dist/detail-panel.cjs +71 -63
- package/dist/detail-panel.cjs.map +1 -1
- package/dist/detail-panel.d.ts.map +1 -1
- package/dist/detail-panel.js +70 -62
- package/dist/detail-panel.js.map +1 -1
- package/dist/dropdown-menu.cjs +3 -2
- package/dist/dropdown-menu.cjs.map +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +2 -1
- package/dist/financing-widget.cjs +4 -1
- package/dist/financing-widget.cjs.map +1 -1
- package/dist/financing-widget.d.ts.map +1 -1
- package/dist/financing-widget.js +4 -1
- package/dist/financing-widget.js.map +1 -1
- package/dist/form-field.cjs +3 -2
- package/dist/form-field.cjs.map +1 -1
- package/dist/form-field.d.ts.map +1 -1
- package/dist/form-field.js +2 -1
- package/dist/form-input.cjs +4 -3
- package/dist/form-input.cjs.map +1 -1
- package/dist/form-input.d.ts.map +1 -1
- package/dist/form-input.js +3 -2
- package/dist/form-select.cjs +5 -4
- package/dist/form-select.cjs.map +1 -1
- package/dist/form-select.js +4 -3
- package/dist/form-textarea.cjs +4 -3
- package/dist/form-textarea.cjs.map +1 -1
- package/dist/form-textarea.d.ts.map +1 -1
- package/dist/form-textarea.js +3 -2
- package/dist/gtm.cjs +3 -3
- package/dist/gtm.js +2 -2
- package/dist/pagination.cjs +3 -3
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +2 -2
- package/dist/payment-modal.cjs +52 -34
- package/dist/payment-modal.cjs.map +1 -1
- package/dist/payment-modal.d.ts +4 -4
- package/dist/payment-modal.d.ts.map +1 -1
- package/dist/payment-modal.js +52 -34
- package/dist/payment-modal.js.map +1 -1
- package/dist/popover.cjs +4 -4
- package/dist/popover.cjs.map +1 -1
- package/dist/popover.js +3 -3
- package/dist/popover.js.map +1 -1
- package/dist/price.cjs +2 -2
- package/dist/price.js +1 -1
- package/dist/provider.cjs +3 -3
- package/dist/provider.js +2 -2
- package/dist/quantity-input.cjs +125 -111
- package/dist/quantity-input.cjs.map +1 -1
- package/dist/quantity-input.d.ts +16 -5
- package/dist/quantity-input.d.ts.map +1 -1
- package/dist/quantity-input.js +127 -113
- package/dist/quantity-input.js.map +1 -1
- package/dist/resource-tabs.cjs +10 -5
- package/dist/resource-tabs.cjs.map +1 -1
- package/dist/resource-tabs.d.ts +1 -1
- package/dist/resource-tabs.d.ts.map +1 -1
- package/dist/resource-tabs.js +10 -5
- package/dist/resource-tabs.js.map +1 -1
- package/dist/rules.d.ts +315 -17
- package/dist/rules.d.ts.map +1 -1
- package/dist/select.cjs +3 -2
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +2 -1
- package/dist/separator.cjs +8 -9
- package/dist/separator.cjs.map +1 -1
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +7 -8
- package/dist/separator.js.map +1 -1
- package/dist/session-replay.cjs +2 -2
- package/dist/session-replay.js +1 -1
- package/dist/spinner.cjs +3 -2
- package/dist/spinner.cjs.map +1 -1
- package/dist/spinner.d.ts +1 -1
- package/dist/spinner.d.ts.map +1 -1
- package/dist/spinner.js +2 -1
- package/dist/stock-label.cjs +28 -33
- package/dist/stock-label.cjs.map +1 -1
- package/dist/stock-label.d.ts.map +1 -1
- package/dist/stock-label.js +30 -35
- package/dist/stock-label.js.map +1 -1
- package/llms.txt +3 -2
- package/package.json +3 -1
- package/dist/chunk-32XB3REY.cjs.map +0 -1
- package/dist/chunk-5VMEEKZ5.cjs.map +0 -1
- package/dist/chunk-76RSVRGB.cjs.map +0 -1
- package/dist/chunk-BXMTQGKV.cjs.map +0 -1
- package/dist/chunk-IO77MGHW.js +0 -220
- package/dist/chunk-IO77MGHW.js.map +0 -1
- package/dist/chunk-JXW4XE2P.cjs.map +0 -1
- package/dist/chunk-KVHOMD4T.js.map +0 -1
- package/dist/chunk-MOC5N2N4.js.map +0 -1
- package/dist/chunk-MXSQYVCK.js.map +0 -1
- package/dist/chunk-QKWXJM4Q.cjs +0 -220
- package/dist/chunk-QKWXJM4Q.cjs.map +0 -1
- package/dist/chunk-RCUKSVMF.js.map +0 -1
- package/dist/chunk-RGJT67PN.js.map +0 -1
- package/dist/chunk-TFP5RICB.cjs.map +0 -1
- package/dist/chunk-UB7HYAAC.js.map +0 -1
- package/dist/chunk-UMNTUD2P.js.map +0 -1
- package/dist/chunk-Z57QBVUC.cjs.map +0 -1
- /package/dist/{chunk-WFMP6TZN.js.map → chunk-I6LMIYVF.js.map} +0 -0
- /package/dist/{chunk-C6K7FZNX.js.map → chunk-TEDFINZP.js.map} +0 -0
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
// ../foundation/src/decimal.ts
|
|
4
|
+
function decimal(n) {
|
|
5
|
+
const last = "0123456789".slice(n % 10, n % 10 + 1);
|
|
6
|
+
return n < 10 ? last : decimal(Math.floor(n / 10)) + last;
|
|
7
|
+
}
|
|
8
|
+
function intText(n) {
|
|
9
|
+
return n < 0 ? "-" + decimal(-n) : decimal(n);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// ../foundation/src/chars.ts
|
|
13
|
+
function isDigit(c) {
|
|
14
|
+
return c >= 48 && c <= 57;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// ../utils/src/strings.ts
|
|
18
|
+
function codeAt(s, i) {
|
|
19
|
+
return i >= 0 && i < s.length ? s.charCodeAt(i) : -1;
|
|
20
|
+
}
|
|
21
|
+
function digitsFrom(s, i) {
|
|
22
|
+
return i >= s.length || isDigit(s.charCodeAt(i)) && digitsFrom(s, i + 1);
|
|
23
|
+
}
|
|
24
|
+
function indexOfCode(s, code, from) {
|
|
25
|
+
const c = codeAt(s, from);
|
|
26
|
+
if (c === code) return from;
|
|
27
|
+
if (c === -1) return -1;
|
|
28
|
+
return indexOfCode(s, code, from + 1);
|
|
29
|
+
}
|
|
30
|
+
function digitsValue(s) {
|
|
31
|
+
if (s.length === 0) return 0;
|
|
32
|
+
return digitsValue(s.slice(0, s.length - 1)) * 10 + (s.charCodeAt(s.length - 1) - 48);
|
|
33
|
+
}
|
|
34
|
+
function untilCode(s, code) {
|
|
35
|
+
const k = indexOfCode(s, code, 0);
|
|
36
|
+
return k >= 0 ? s.slice(0, k) : s;
|
|
37
|
+
}
|
|
38
|
+
function lineFeed() {
|
|
39
|
+
return `
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ../utils/src/fixed.ts
|
|
44
|
+
function pow10(n) {
|
|
45
|
+
return n === 0 ? 1 : 10 * pow10(n - 1);
|
|
46
|
+
}
|
|
47
|
+
function zeros(n) {
|
|
48
|
+
return n === 0 ? "" : "0" + zeros(n - 1);
|
|
49
|
+
}
|
|
50
|
+
function paddedDigits(n, width) {
|
|
51
|
+
const s = decimal(n);
|
|
52
|
+
return s.length >= width ? s : zeros(width - s.length) + s;
|
|
53
|
+
}
|
|
54
|
+
function fixedText(units, d) {
|
|
55
|
+
const p = pow10(d);
|
|
56
|
+
const whole = decimal(Math.floor(units / p));
|
|
57
|
+
return d === 0 ? whole : whole + "." + paddedDigits(units % p, d);
|
|
58
|
+
}
|
|
59
|
+
function signedFixedText(units, d) {
|
|
60
|
+
return units < 0 ? "-" + fixedText(-units, d) : fixedText(units, d);
|
|
61
|
+
}
|
|
62
|
+
function dotIndex(s) {
|
|
63
|
+
const k = indexOfCode(s, 46, 0);
|
|
64
|
+
return k < 0 ? s.length : k;
|
|
65
|
+
}
|
|
66
|
+
function wholePart(s) {
|
|
67
|
+
return s.slice(0, dotIndex(s));
|
|
68
|
+
}
|
|
69
|
+
function fracPart(s) {
|
|
70
|
+
const k = dotIndex(s);
|
|
71
|
+
return k < s.length ? s.slice(k + 1) : "";
|
|
72
|
+
}
|
|
73
|
+
function places(s) {
|
|
74
|
+
return fracPart(s).length;
|
|
75
|
+
}
|
|
76
|
+
function fixedUnits(s) {
|
|
77
|
+
const whole = wholePart(s);
|
|
78
|
+
const frac = fracPart(s);
|
|
79
|
+
if (!digitsFrom(whole, 0) || !digitsFrom(frac, 0) || whole.length + frac.length === 0) return -1;
|
|
80
|
+
return digitsValue(whole) * pow10(frac.length) + digitsValue(frac);
|
|
81
|
+
}
|
|
82
|
+
function rescale(units, from, to) {
|
|
83
|
+
if (to >= from) return units * pow10(to - from);
|
|
84
|
+
return Math.floor((units + 5 * pow10(from - to - 1)) / pow10(from - to));
|
|
85
|
+
}
|
|
86
|
+
function signedRescale(units, from, to) {
|
|
87
|
+
return units < 0 ? -rescale(-units, from, to) : rescale(units, from, to);
|
|
88
|
+
}
|
|
89
|
+
function maxPlaces(a, b) {
|
|
90
|
+
return a >= b ? a : b;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ../utils/src/lists.ts
|
|
94
|
+
function joinFrom(xs, sep, i) {
|
|
95
|
+
if (i >= xs.length) return "";
|
|
96
|
+
return joinRange(xs, sep, i, xs.length);
|
|
97
|
+
}
|
|
98
|
+
function joinRange(xs, sep, lo, hi) {
|
|
99
|
+
if (hi - lo === 1) return xs[lo];
|
|
100
|
+
const mid = lo + Math.floor((hi - lo) / 2);
|
|
101
|
+
return joinRange(xs, sep, lo, mid) + sep + joinRange(xs, sep, mid, hi);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// src/bin-scan.ts
|
|
105
|
+
function binMarkAt(s, k) {
|
|
106
|
+
if (k + 6 > s.length) return false;
|
|
107
|
+
const c = codeAt(s, k);
|
|
108
|
+
return (c === 63 || c === 38) && s.slice(k + 1, k + 5) === "Bin=" && codeAt(s, k + 5) !== 38;
|
|
109
|
+
}
|
|
110
|
+
function binAt(s, i) {
|
|
111
|
+
if (i + 6 > s.length) return -1;
|
|
112
|
+
if (binMarkAt(s, i)) return i;
|
|
113
|
+
return binAt(s, i + 1);
|
|
114
|
+
}
|
|
115
|
+
function afterBinMark(s, k) {
|
|
116
|
+
if (k < 0 || k + 5 > s.length) return "";
|
|
117
|
+
return s.slice(k + 5);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// ../utils/src/replace.ts
|
|
121
|
+
function codeIndex(codes, c, i) {
|
|
122
|
+
if (i === codes.length) return -1;
|
|
123
|
+
return codes[i] === c ? i : codeIndex(codes, c, i + 1);
|
|
124
|
+
}
|
|
125
|
+
function substitute(s, codes, texts) {
|
|
126
|
+
let out = "";
|
|
127
|
+
for (let i = 0; i !== s.length; i++) {
|
|
128
|
+
const k = codeIndex(codes, s.charCodeAt(i), 0);
|
|
129
|
+
out = k >= 0 && k < texts.length ? out + texts[k] : out + s.slice(i, i + 1);
|
|
130
|
+
}
|
|
131
|
+
return out;
|
|
132
|
+
}
|
|
133
|
+
function replaceCode(s, from, to) {
|
|
134
|
+
return substitute(s, [from], [to]);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ../utils/src/json-node.ts
|
|
138
|
+
function undefinedNode() {
|
|
139
|
+
return { kind: "undefined", text: "", str: "", items: [], fields: [] };
|
|
140
|
+
}
|
|
141
|
+
function fieldValue(fs, key, i) {
|
|
142
|
+
if (i >= fs.length) return undefinedNode();
|
|
143
|
+
const f = fs[i];
|
|
144
|
+
return f.key === key ? f.value : fieldValue(fs, key, i + 1);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// src/rules.ts
|
|
148
|
+
function pageRangeFrom(total, i) {
|
|
149
|
+
if (i >= total) return [];
|
|
150
|
+
return [{ kind: "page", n: i + 1 }, ...pageRangeFrom(total, i + 1)];
|
|
151
|
+
}
|
|
152
|
+
function pageNumbersOf(current, total) {
|
|
153
|
+
if (total <= 0) return [];
|
|
154
|
+
if (total === 1) return [{ kind: "page", n: 1 }];
|
|
155
|
+
const page = clampPage(current, total);
|
|
156
|
+
if (total <= 5) return pageRangeFrom(total, 0);
|
|
157
|
+
const first = { kind: "page", n: 1 };
|
|
158
|
+
const last = { kind: "page", n: total };
|
|
159
|
+
const gap = { kind: "ellipsis" };
|
|
160
|
+
if (page <= 3) {
|
|
161
|
+
return [
|
|
162
|
+
first,
|
|
163
|
+
{ kind: "page", n: 2 },
|
|
164
|
+
{ kind: "page", n: 3 },
|
|
165
|
+
{ kind: "page", n: 4 },
|
|
166
|
+
gap,
|
|
167
|
+
last
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
if (page >= total - 2) {
|
|
171
|
+
return [
|
|
172
|
+
first,
|
|
173
|
+
gap,
|
|
174
|
+
{ kind: "page", n: total - 3 },
|
|
175
|
+
{ kind: "page", n: total - 2 },
|
|
176
|
+
{ kind: "page", n: total - 1 },
|
|
177
|
+
last
|
|
178
|
+
];
|
|
179
|
+
}
|
|
180
|
+
return [
|
|
181
|
+
first,
|
|
182
|
+
gap,
|
|
183
|
+
{ kind: "page", n: page - 1 },
|
|
184
|
+
{ kind: "page", n: page },
|
|
185
|
+
{ kind: "page", n: page + 1 },
|
|
186
|
+
gap,
|
|
187
|
+
last
|
|
188
|
+
];
|
|
189
|
+
}
|
|
190
|
+
function clampPage(current, total) {
|
|
191
|
+
const capped = current > total ? total : current;
|
|
192
|
+
return capped < 1 ? 1 : capped;
|
|
193
|
+
}
|
|
194
|
+
function isFirstPage(page) {
|
|
195
|
+
return page <= 1;
|
|
196
|
+
}
|
|
197
|
+
function isLastPage(page, totalPages) {
|
|
198
|
+
return page >= totalPages;
|
|
199
|
+
}
|
|
200
|
+
function prevTarget(page) {
|
|
201
|
+
return isFirstPage(page) ? 1 : page - 1;
|
|
202
|
+
}
|
|
203
|
+
function nextTarget(page, totalPages) {
|
|
204
|
+
return isLastPage(page, totalPages) ? totalPages : page + 1;
|
|
205
|
+
}
|
|
206
|
+
function barItemsFrom(es, current, i) {
|
|
207
|
+
if (i >= es.length) return [];
|
|
208
|
+
const e = es[i];
|
|
209
|
+
const item = e.kind === "ellipsis" ? { key: "ellipsis-" + intText(i), n: 0, active: false, ellipsis: [0], page: [] } : { key: intText(e.n), n: e.n, active: e.n === current, ellipsis: [], page: [e.n] };
|
|
210
|
+
return [item, ...barItemsFrom(es, current, i + 1)];
|
|
211
|
+
}
|
|
212
|
+
function paginationBarOf(page, totalPages) {
|
|
213
|
+
return {
|
|
214
|
+
shown: slotsWhen(totalPages > 1),
|
|
215
|
+
prevTarget: prevTarget(page),
|
|
216
|
+
prevOff: isFirstPage(page),
|
|
217
|
+
nextTarget: nextTarget(page, totalPages),
|
|
218
|
+
nextOff: isLastPage(page, totalPages),
|
|
219
|
+
items: barItemsFrom(pageNumbersOf(page, totalPages), page, 0)
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function disabledClass(off) {
|
|
223
|
+
return off ? "pointer-events-none opacity-50" : void 0;
|
|
224
|
+
}
|
|
225
|
+
function ariaDisabled(off) {
|
|
226
|
+
return off ? true : void 0;
|
|
227
|
+
}
|
|
228
|
+
function clickActionOf(off, hasCallback) {
|
|
229
|
+
if (off) return "block";
|
|
230
|
+
return hasCallback ? "handle" : "follow";
|
|
231
|
+
}
|
|
232
|
+
function clampQuantity(value, min, max) {
|
|
233
|
+
const atLeast = value < min ? min : value;
|
|
234
|
+
if (max === void 0) return atLeast;
|
|
235
|
+
return atLeast > max ? max : atLeast;
|
|
236
|
+
}
|
|
237
|
+
function stepDown(value, step, min) {
|
|
238
|
+
return value - step > min ? value - step : min;
|
|
239
|
+
}
|
|
240
|
+
function stepUp(value, step, max) {
|
|
241
|
+
if (max === void 0) return value + step;
|
|
242
|
+
return value + step > max ? max : value + step;
|
|
243
|
+
}
|
|
244
|
+
function decreaseDisabled(disabled, value, min) {
|
|
245
|
+
return disabled || value <= min;
|
|
246
|
+
}
|
|
247
|
+
function increaseDisabled(disabled, value, max) {
|
|
248
|
+
if (max === void 0) return disabled;
|
|
249
|
+
return disabled || value >= max;
|
|
250
|
+
}
|
|
251
|
+
function digitKey(key) {
|
|
252
|
+
const c = codeAt(key, 0);
|
|
253
|
+
return c >= 48 && c <= 56 || key === "9";
|
|
254
|
+
}
|
|
255
|
+
function editingKey(key) {
|
|
256
|
+
return key === "Backspace" || key === "Delete" || key === "ArrowLeft" || key === "ArrowRight" || key === "Tab" || key === "Enter";
|
|
257
|
+
}
|
|
258
|
+
function keyAllowed(key, decimals, hasDot) {
|
|
259
|
+
return editingKey(key) || decimals > 0 && key === "." && !hasDot || digitKey(key);
|
|
260
|
+
}
|
|
261
|
+
function keyActionOf(key, decimals, text) {
|
|
262
|
+
if (key === "Enter") return "commit";
|
|
263
|
+
return keyAllowed(key, decimals, indexOfCode(text, 46, 0) >= 0) ? "allow" : "block";
|
|
264
|
+
}
|
|
265
|
+
function roundUpTo(v, s) {
|
|
266
|
+
const q = Math.floor(v / s);
|
|
267
|
+
return (v % s === 0 ? q : q + 1) * s;
|
|
268
|
+
}
|
|
269
|
+
function roundedUnits(u, k, step, d) {
|
|
270
|
+
const p = maxPlaces(k, d);
|
|
271
|
+
const v = u * pow10(p - k);
|
|
272
|
+
const s = step * pow10(p - d);
|
|
273
|
+
return s <= pow10(p) ? v : roundUpTo(v, s);
|
|
274
|
+
}
|
|
275
|
+
function commitUnits(text, min, max, step, d) {
|
|
276
|
+
const u = fixedUnits(text);
|
|
277
|
+
if (u < 0) return min;
|
|
278
|
+
const k = places(text);
|
|
279
|
+
const p = maxPlaces(k, d);
|
|
280
|
+
const up = pow10(p - d);
|
|
281
|
+
const clamped = clampQuantity(
|
|
282
|
+
roundedUnits(u, k, step, d),
|
|
283
|
+
min * up,
|
|
284
|
+
max === void 0 ? void 0 : max * up
|
|
285
|
+
);
|
|
286
|
+
return signedRescale(clamped, p, d);
|
|
287
|
+
}
|
|
288
|
+
function slotsWhen(show) {
|
|
289
|
+
return show ? [0] : [];
|
|
290
|
+
}
|
|
291
|
+
function textSlots(text) {
|
|
292
|
+
return text !== void 0 && text !== "" ? [text] : [];
|
|
293
|
+
}
|
|
294
|
+
function panelSlotsOf(title, editing) {
|
|
295
|
+
const t = textSlots(title);
|
|
296
|
+
return {
|
|
297
|
+
header: slotsWhen(t.length > 0 || !editing),
|
|
298
|
+
title: t,
|
|
299
|
+
editButton: slotsWhen(!editing),
|
|
300
|
+
actions: slotsWhen(editing),
|
|
301
|
+
edit: slotsWhen(editing),
|
|
302
|
+
read: slotsWhen(!editing)
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
function fieldSlotsOf(kind) {
|
|
306
|
+
const other = kind !== "readonly" && kind !== "select" && kind !== "textarea";
|
|
307
|
+
return {
|
|
308
|
+
readonly: slotsWhen(kind === "readonly"),
|
|
309
|
+
select: slotsWhen(kind === "select"),
|
|
310
|
+
textarea: slotsWhen(kind === "textarea"),
|
|
311
|
+
input: slotsWhen(other)
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function tabsViewOf(defaultTab, values) {
|
|
315
|
+
const first = values.length > 0 ? values[0] : "";
|
|
316
|
+
return {
|
|
317
|
+
shown: slotsWhen(values.length > 0),
|
|
318
|
+
defaultTab: defaultTab !== void 0 ? defaultTab : first
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function fieldId(id, name) {
|
|
322
|
+
if (id !== void 0) return id;
|
|
323
|
+
return name !== void 0 ? name : "";
|
|
324
|
+
}
|
|
325
|
+
function inputModeOf(decimals) {
|
|
326
|
+
return decimals > 0 ? "decimal" : "numeric";
|
|
327
|
+
}
|
|
328
|
+
function cleanQtyFrom(raw, allowDot, seenDot, i) {
|
|
329
|
+
if (i >= raw.length) return "";
|
|
330
|
+
const c = codeAt(raw, i);
|
|
331
|
+
if (c >= 48 && c <= 57) return raw.slice(i, i + 1) + cleanQtyFrom(raw, allowDot, seenDot, i + 1);
|
|
332
|
+
if (allowDot && c === 46 && !seenDot) return "." + cleanQtyFrom(raw, allowDot, true, i + 1);
|
|
333
|
+
return cleanQtyFrom(raw, allowDot, seenDot, i + 1);
|
|
334
|
+
}
|
|
335
|
+
function spinnerSizeClass(size) {
|
|
336
|
+
if (size === "sm") return "h-3 w-3";
|
|
337
|
+
return size === "lg" ? "h-6 w-6" : "h-4 w-4";
|
|
338
|
+
}
|
|
339
|
+
function separatorClass(orientation) {
|
|
340
|
+
return orientation === "vertical" ? "h-full w-[1px]" : "h-[1px] w-full";
|
|
341
|
+
}
|
|
342
|
+
function paginationAriaCurrent(isActive) {
|
|
343
|
+
return isActive ? "page" : void 0;
|
|
344
|
+
}
|
|
345
|
+
function paginationVariant(isActive) {
|
|
346
|
+
return isActive ? "outline" : "ghost";
|
|
347
|
+
}
|
|
348
|
+
function insetClass(inset) {
|
|
349
|
+
return inset ? "pl-8" : "";
|
|
350
|
+
}
|
|
351
|
+
function selectContentClass(position) {
|
|
352
|
+
return position === "popper" ? "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1" : "";
|
|
353
|
+
}
|
|
354
|
+
function selectViewportClass(position) {
|
|
355
|
+
return position === "popper" ? "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" : "";
|
|
356
|
+
}
|
|
357
|
+
function stockViewOf(loading, isInStock, isLowStock) {
|
|
358
|
+
if (loading) return "loading";
|
|
359
|
+
if (!isInStock) return "out-of-stock";
|
|
360
|
+
return isLowStock ? "low-stock" : "in-stock";
|
|
361
|
+
}
|
|
362
|
+
function showStockQuantity(view, hasQuantity) {
|
|
363
|
+
return hasQuantity && view !== "out-of-stock" && view !== "loading";
|
|
364
|
+
}
|
|
365
|
+
function stockSlotsOf(loading, isInStock, isLowStock, hasQuantity) {
|
|
366
|
+
const view = stockViewOf(loading, isInStock, isLowStock);
|
|
367
|
+
return {
|
|
368
|
+
skeleton: slotsWhen(view === "loading"),
|
|
369
|
+
outOfStock: slotsWhen(view === "out-of-stock"),
|
|
370
|
+
lowStock: slotsWhen(view === "low-stock"),
|
|
371
|
+
inStock: slotsWhen(view === "in-stock"),
|
|
372
|
+
quantity: slotsWhen(showStockQuantity(view, hasQuantity))
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
function priceViewOf(loading, valueIsZero, hasOriginal) {
|
|
376
|
+
if (loading) return "skeleton";
|
|
377
|
+
if (valueIsZero && !hasOriginal) return "zero-label";
|
|
378
|
+
return "amount";
|
|
379
|
+
}
|
|
380
|
+
function needsQuotes(s) {
|
|
381
|
+
return indexOfCode(s, 44, 0) >= 0 || indexOfCode(s, 34, 0) >= 0 || indexOfCode(s, 10, 0) >= 0;
|
|
382
|
+
}
|
|
383
|
+
function csvField(s) {
|
|
384
|
+
if (!needsQuotes(s)) return s;
|
|
385
|
+
return '"' + replaceCode(s, 34, '""') + '"';
|
|
386
|
+
}
|
|
387
|
+
function csvLines(rows, i) {
|
|
388
|
+
if (i >= rows.length) return [];
|
|
389
|
+
return [joinFrom(rows[i], ",", 0), ...csvLines(rows, i + 1)];
|
|
390
|
+
}
|
|
391
|
+
function csvText(headers, rows) {
|
|
392
|
+
return joinFrom([joinFrom(headers, ",", 0), ...csvLines(rows, 0)], lineFeed(), 0);
|
|
393
|
+
}
|
|
394
|
+
function ariaSortOf(sortable, dir) {
|
|
395
|
+
if (!sortable) return void 0;
|
|
396
|
+
if (dir === "asc") return "ascending";
|
|
397
|
+
if (dir === "desc") return "descending";
|
|
398
|
+
return "none";
|
|
399
|
+
}
|
|
400
|
+
function alignClass(align) {
|
|
401
|
+
if (align === "left") return "text-left";
|
|
402
|
+
if (align === "center") return "text-center";
|
|
403
|
+
return align === "right" ? "text-right" : "";
|
|
404
|
+
}
|
|
405
|
+
function toolbarShown(searchable, hasToolbar, columnToggle, exportCsv, selectedCount) {
|
|
406
|
+
return searchable || hasToolbar || columnToggle || exportCsv || selectedCount > 0;
|
|
407
|
+
}
|
|
408
|
+
function alignClassOf(align) {
|
|
409
|
+
return alignClass(align === void 0 ? "left" : align);
|
|
410
|
+
}
|
|
411
|
+
function enableSorting(sortable) {
|
|
412
|
+
return sortable === void 0 ? false : sortable;
|
|
413
|
+
}
|
|
414
|
+
function enableHiding(hideable) {
|
|
415
|
+
return hideable === void 0 ? true : hideable;
|
|
416
|
+
}
|
|
417
|
+
function bodyViewOf(loading, rowCount) {
|
|
418
|
+
if (loading) return "loading";
|
|
419
|
+
return rowCount === 0 ? "empty" : "rows";
|
|
420
|
+
}
|
|
421
|
+
function bodySlots(loading, rowCount) {
|
|
422
|
+
const view = bodyViewOf(loading, rowCount);
|
|
423
|
+
return {
|
|
424
|
+
loading: slotsWhen(view === "loading"),
|
|
425
|
+
empty: slotsWhen(view === "empty"),
|
|
426
|
+
rows: slotsWhen(view === "rows")
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
function sortSlotsOf(dir) {
|
|
430
|
+
return {
|
|
431
|
+
up: slotsWhen(dir === "asc"),
|
|
432
|
+
down: slotsWhen(dir === "desc"),
|
|
433
|
+
both: slotsWhen(dir === "unsorted")
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
function bulkBarShown(selectedCount, hasBulkActions) {
|
|
437
|
+
return selectedCount > 0 && hasBulkActions;
|
|
438
|
+
}
|
|
439
|
+
function gtmTiming(strategy, hasIdleCallback) {
|
|
440
|
+
if (strategy === "lazyOnload" && hasIdleCallback) return "idle";
|
|
441
|
+
return strategy === "afterInteractive" ? "next-tick" : "now";
|
|
442
|
+
}
|
|
443
|
+
function injectAllowed(disabled, injected) {
|
|
444
|
+
return !disabled && !injected;
|
|
445
|
+
}
|
|
446
|
+
function replaySampled(disabled, injected, rate, draw) {
|
|
447
|
+
return !disabled && !injected && !(rate < 1 && draw > rate);
|
|
448
|
+
}
|
|
449
|
+
function binFromString(s) {
|
|
450
|
+
const k = binAt(s, 0);
|
|
451
|
+
if (k < 0) return void 0;
|
|
452
|
+
return untilCode(afterBinMark(s, k), 38);
|
|
453
|
+
}
|
|
454
|
+
function paymentFrameOf(unified) {
|
|
455
|
+
if (unified === null) return { src: [], loading: [0] };
|
|
456
|
+
return {
|
|
457
|
+
src: [unified.uiEndpoint + "?TransactionSetupID=" + unified.transactionSetupId],
|
|
458
|
+
loading: []
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
function binListenerOn(open, hasCapture) {
|
|
462
|
+
return open && hasCapture;
|
|
463
|
+
}
|
|
464
|
+
function nonEmptyText(v) {
|
|
465
|
+
return v.kind === "string" && v.str !== "" ? v.str : void 0;
|
|
466
|
+
}
|
|
467
|
+
function binOfFields(fs) {
|
|
468
|
+
const a = nonEmptyText(fieldValue(fs, "Bin", 0));
|
|
469
|
+
if (a !== void 0) return a;
|
|
470
|
+
const b = nonEmptyText(fieldValue(fs, "bin", 0));
|
|
471
|
+
if (b !== void 0) return b;
|
|
472
|
+
const c = nonEmptyText(fieldValue(fs, "CardBIN", 0));
|
|
473
|
+
if (c !== void 0) return c;
|
|
474
|
+
const e = nonEmptyText(fieldValue(fs, "cardBin", 0));
|
|
475
|
+
if (e !== void 0) return e;
|
|
476
|
+
const data = fieldValue(fs, "data", 0);
|
|
477
|
+
return data.kind === "object" ? nonEmptyText(fieldValue(data.fields, "Bin", 0)) : void 0;
|
|
478
|
+
}
|
|
479
|
+
function binOfNode(v) {
|
|
480
|
+
if (v.kind === "string") return binFromString(v.str);
|
|
481
|
+
if (v.kind === "object") return binOfFields(v.fields);
|
|
482
|
+
return void 0;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
exports.undefinedNode = undefinedNode; exports.pow10 = pow10; exports.signedFixedText = signedFixedText; exports.pageNumbersOf = pageNumbersOf; exports.paginationBarOf = paginationBarOf; exports.disabledClass = disabledClass; exports.ariaDisabled = ariaDisabled; exports.clickActionOf = clickActionOf; exports.stepDown = stepDown; exports.stepUp = stepUp; exports.decreaseDisabled = decreaseDisabled; exports.increaseDisabled = increaseDisabled; exports.keyActionOf = keyActionOf; exports.commitUnits = commitUnits; exports.slotsWhen = slotsWhen; exports.textSlots = textSlots; exports.panelSlotsOf = panelSlotsOf; exports.fieldSlotsOf = fieldSlotsOf; exports.tabsViewOf = tabsViewOf; exports.fieldId = fieldId; exports.inputModeOf = inputModeOf; exports.cleanQtyFrom = cleanQtyFrom; exports.spinnerSizeClass = spinnerSizeClass; exports.separatorClass = separatorClass; exports.paginationAriaCurrent = paginationAriaCurrent; exports.paginationVariant = paginationVariant; exports.insetClass = insetClass; exports.selectContentClass = selectContentClass; exports.selectViewportClass = selectViewportClass; exports.stockSlotsOf = stockSlotsOf; exports.priceViewOf = priceViewOf; exports.csvField = csvField; exports.csvText = csvText; exports.ariaSortOf = ariaSortOf; exports.toolbarShown = toolbarShown; exports.alignClassOf = alignClassOf; exports.enableSorting = enableSorting; exports.enableHiding = enableHiding; exports.bodySlots = bodySlots; exports.sortSlotsOf = sortSlotsOf; exports.bulkBarShown = bulkBarShown; exports.gtmTiming = gtmTiming; exports.injectAllowed = injectAllowed; exports.replaySampled = replaySampled; exports.paymentFrameOf = paymentFrameOf; exports.binListenerOn = binListenerOn; exports.binOfNode = binOfNode;
|
|
534
|
+
//# sourceMappingURL=chunk-NBXA42AW.cjs.map
|