@happyvertical/smrt-commerce 0.55.13 → 0.55.15
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/AGENTS.md +8 -0
- package/README.md +36 -0
- package/agents/cost-billing.md +41 -0
- package/agents/payment-allocations.md +45 -0
- package/agents/purchasing-ui.md +27 -0
- package/dist/allocation-integrity.d.ts +13 -0
- package/dist/allocation-integrity.d.ts.map +1 -0
- package/dist/billing/payment-attempts.d.ts.map +1 -1
- package/dist/chunks/money-DfrRxrel.js +50 -0
- package/dist/chunks/money-DfrRxrel.js.map +1 -0
- package/dist/chunks/{types-CRnln577.js → types-zVnIjSOk.js} +29 -2
- package/dist/chunks/{types-CRnln577.js.map → types-zVnIjSOk.js.map} +1 -1
- package/dist/collections/PaymentAllocationCollection.d.ts +14 -0
- package/dist/collections/PaymentAllocationCollection.d.ts.map +1 -1
- package/dist/cost-billing.d.ts +58 -0
- package/dist/cost-billing.d.ts.map +1 -0
- package/dist/cost-billing.js +126 -0
- package/dist/cost-billing.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +175 -93
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +43 -2
- package/dist/models/Contract.d.ts +7 -1
- package/dist/models/Contract.d.ts.map +1 -1
- package/dist/models/Invoice.d.ts.map +1 -1
- package/dist/models/Payment.d.ts +2 -0
- package/dist/models/Payment.d.ts.map +1 -1
- package/dist/models/PaymentAllocation.d.ts +7 -33
- package/dist/models/PaymentAllocation.d.ts.map +1 -1
- package/dist/playground.js +23 -0
- package/dist/playground.js.map +1 -1
- package/dist/smrt-knowledge.json +86 -8
- package/dist/svelte/components/PurchaseOrderHeaderForm.svelte +106 -0
- package/dist/svelte/components/PurchaseOrderHeaderForm.svelte.d.ts +49 -0
- package/dist/svelte/components/PurchaseOrderHeaderForm.svelte.d.ts.map +1 -0
- package/dist/svelte/index.d.ts +4 -0
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +3 -0
- package/dist/svelte/playground.d.ts +93 -0
- package/dist/svelte/playground.d.ts.map +1 -1
- package/dist/svelte/playground.js +20 -0
- package/dist/svelte/purchasing-i18n.d.ts +9 -0
- package/dist/svelte/purchasing-i18n.d.ts.map +1 -1
- package/dist/svelte/purchasing-i18n.js +9 -0
- package/dist/svelte/purchasing-types.d.ts +13 -0
- package/dist/svelte/purchasing-types.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +9 -0
- package/dist/ui.js.map +1 -1
- package/package.json +16 -12
- package/dist/chunks/money-WSMvSgWq.js +0 -8
- package/dist/chunks/money-WSMvSgWq.js.map +0 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
//#region src/cost-billing.ts
|
|
2
|
+
var SCALE = 1000000n;
|
|
3
|
+
var DENOMINATOR = 100n * SCALE;
|
|
4
|
+
var LIMIT = BigInt(Number.MAX_SAFE_INTEGER);
|
|
5
|
+
function percentUnits(value) {
|
|
6
|
+
if (typeof value !== "string" || !/^(0|[1-9]\d{0,5})(\.\d{1,6})?$/.test(value)) throw new TypeError("Percent must be an exact decimal string with at most six decimal places");
|
|
7
|
+
const [whole, fraction = ""] = value.split(".");
|
|
8
|
+
const units = BigInt(whole) * SCALE + BigInt(fraction.padEnd(6, "0"));
|
|
9
|
+
if (units > 100000n * SCALE) throw new RangeError("Percent exceeds 100000");
|
|
10
|
+
return units;
|
|
11
|
+
}
|
|
12
|
+
function money(value) {
|
|
13
|
+
if (!Number.isSafeInteger(value)) throw new RangeError("Money must be safe integer minor units");
|
|
14
|
+
return BigInt(value);
|
|
15
|
+
}
|
|
16
|
+
function safe(value) {
|
|
17
|
+
if (value > LIMIT || value < -LIMIT) throw new RangeError("Calculated money exceeds safe integer minor units");
|
|
18
|
+
return Number(value);
|
|
19
|
+
}
|
|
20
|
+
function rounded(numerator) {
|
|
21
|
+
const result = ((numerator < 0n ? -numerator : numerator) + DENOMINATOR / 2n) / DENOMINATOR;
|
|
22
|
+
return numerator < 0n ? -result : result;
|
|
23
|
+
}
|
|
24
|
+
function identifier(value) {
|
|
25
|
+
if (typeof value !== "string" || value.trim().length === 0) throw new TypeError("Identifiers must be nonempty strings");
|
|
26
|
+
}
|
|
27
|
+
function resolveCostMarkup(overrides) {
|
|
28
|
+
let selectedIndex = -1;
|
|
29
|
+
const copy = overrides.map((override, index) => {
|
|
30
|
+
identifier(override.source);
|
|
31
|
+
if (override.policy !== void 0) identifier(override.policy);
|
|
32
|
+
if (override.version !== void 0) identifier(override.version);
|
|
33
|
+
if (override.percent !== void 0) {
|
|
34
|
+
percentUnits(override.percent);
|
|
35
|
+
if (selectedIndex === -1) selectedIndex = index;
|
|
36
|
+
}
|
|
37
|
+
return { ...override };
|
|
38
|
+
});
|
|
39
|
+
if (selectedIndex === -1) throw new TypeError("An explicit markup percent is required");
|
|
40
|
+
return {
|
|
41
|
+
percent: copy[selectedIndex].percent,
|
|
42
|
+
selectedIndex,
|
|
43
|
+
overrides: copy
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function calculateCostBilling(input) {
|
|
47
|
+
const basis = money(input.basisMinor);
|
|
48
|
+
const markup = resolveCostMarkup(input.markup.overrides);
|
|
49
|
+
if (markup.percent !== input.markup.percent || markup.selectedIndex !== input.markup.selectedIndex) throw new TypeError("Resolved markup does not match its provenance");
|
|
50
|
+
let principal = 0n;
|
|
51
|
+
let fee = 0n;
|
|
52
|
+
switch (input.mode) {
|
|
53
|
+
case "reimbursement-plus-fee":
|
|
54
|
+
principal = basis;
|
|
55
|
+
fee = rounded(basis * percentUnits(markup.percent));
|
|
56
|
+
break;
|
|
57
|
+
case "fee-only":
|
|
58
|
+
fee = rounded(basis * percentUnits(markup.percent));
|
|
59
|
+
break;
|
|
60
|
+
case "nonbillable":
|
|
61
|
+
case "fixed-contract": break;
|
|
62
|
+
default: throw new TypeError("Unknown cost billing mode");
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
principalMinor: safe(principal),
|
|
66
|
+
feeMinor: safe(fee),
|
|
67
|
+
totalMinor: safe(principal + fee),
|
|
68
|
+
markup
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function calculateCostBillingTax(input) {
|
|
72
|
+
if (input.roundingScope !== "line" && input.roundingScope !== "invoice") throw new TypeError("Unknown tax rounding scope");
|
|
73
|
+
const categories = /* @__PURE__ */ new Map();
|
|
74
|
+
const rates = /* @__PURE__ */ new Map();
|
|
75
|
+
const totals = /* @__PURE__ */ new Map();
|
|
76
|
+
for (const rule of input.rules) {
|
|
77
|
+
identifier(rule.category);
|
|
78
|
+
if (categories.has(rule.category)) throw new TypeError("Duplicate tax category");
|
|
79
|
+
const seen = /* @__PURE__ */ new Set();
|
|
80
|
+
const components2 = rule.components.map((component) => {
|
|
81
|
+
identifier(component.id);
|
|
82
|
+
const rate = percentUnits(component.percent);
|
|
83
|
+
if (seen.has(component.id)) throw new TypeError("Duplicate tax component");
|
|
84
|
+
if (rates.has(component.id) && rates.get(component.id) !== rate) throw new TypeError("Conflicting tax component rate");
|
|
85
|
+
seen.add(component.id);
|
|
86
|
+
rates.set(component.id, rate);
|
|
87
|
+
return {
|
|
88
|
+
id: component.id,
|
|
89
|
+
rate
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
categories.set(rule.category, components2);
|
|
93
|
+
}
|
|
94
|
+
const ids = /* @__PURE__ */ new Set();
|
|
95
|
+
for (const line of input.lines) {
|
|
96
|
+
identifier(line.id);
|
|
97
|
+
identifier(line.category);
|
|
98
|
+
if (ids.has(line.id)) throw new TypeError("Duplicate tax line");
|
|
99
|
+
ids.add(line.id);
|
|
100
|
+
const amount = money(line.amountMinor);
|
|
101
|
+
const components2 = categories.get(line.category);
|
|
102
|
+
if (!components2) throw new TypeError("Missing explicit tax category mapping");
|
|
103
|
+
for (const component of components2) {
|
|
104
|
+
const numerator = amount * component.rate;
|
|
105
|
+
const tax = input.roundingScope === "line" ? rounded(numerator) : numerator;
|
|
106
|
+
totals.set(component.id, (totals.get(component.id) ?? 0n) + tax);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
let total = 0n;
|
|
110
|
+
const components = Array.from(totals, ([id, value]) => {
|
|
111
|
+
const tax = input.roundingScope === "invoice" ? rounded(value) : value;
|
|
112
|
+
total += tax;
|
|
113
|
+
return {
|
|
114
|
+
id,
|
|
115
|
+
taxMinor: safe(tax)
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
return {
|
|
119
|
+
taxMinor: safe(total),
|
|
120
|
+
components
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { calculateCostBilling, calculateCostBillingTax, resolveCostMarkup };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=cost-billing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cost-billing.js","names":["components"],"sources":["../src/cost-billing.ts"],"sourcesContent":["/** Exact, transport-neutral cost pricing. All money is signed integer minor units. */\nexport type CostBillingMode =\n | 'reimbursement-plus-fee'\n | 'fee-only'\n | 'nonbillable'\n | 'fixed-contract';\n\n/** Caller-defined precedence, most specific first. No industry hierarchy is assumed. */\nexport interface CostMarkupOverride {\n source: string;\n policy?: string;\n version?: string;\n /** Exact percent in [0, 100000], with at most six decimal places. */\n percent?: string;\n}\n\n/** Detached provenance suitable for the caller's accepted pricing snapshot. */\nexport interface ResolvedCostMarkup {\n percent: string;\n selectedIndex: number;\n overrides: CostMarkupOverride[];\n}\n\nconst SCALE = 1000000n;\nconst DENOMINATOR = 100n * SCALE;\nconst LIMIT = BigInt(Number.MAX_SAFE_INTEGER);\n\nfunction percentUnits(value: string): bigint {\n if (\n typeof value !== 'string' ||\n !/^(0|[1-9]\\d{0,5})(\\.\\d{1,6})?$/.test(value)\n ) {\n throw new TypeError(\n 'Percent must be an exact decimal string with at most six decimal places',\n );\n }\n const [whole, fraction = ''] = value.split('.');\n const units = BigInt(whole) * SCALE + BigInt(fraction.padEnd(6, '0'));\n if (units > 100000n * SCALE) throw new RangeError('Percent exceeds 100000');\n return units;\n}\n\nfunction money(value: number): bigint {\n if (!Number.isSafeInteger(value))\n throw new RangeError('Money must be safe integer minor units');\n return BigInt(value);\n}\n\nfunction safe(value: bigint): number {\n if (value > LIMIT || value < -LIMIT)\n throw new RangeError('Calculated money exceeds safe integer minor units');\n return Number(value);\n}\n\nfunction rounded(numerator: bigint): bigint {\n const magnitude = numerator < 0n ? -numerator : numerator;\n const result = (magnitude + DENOMINATOR / 2n) / DENOMINATOR;\n return numerator < 0n ? -result : result;\n}\n\nfunction identifier(value: string): void {\n if (typeof value !== 'string' || value.trim().length === 0)\n throw new TypeError('Identifiers must be nonempty strings');\n}\n\n/** Select the first supplied percent, validating even shadowed overrides. */\nexport function resolveCostMarkup(\n overrides: readonly CostMarkupOverride[],\n): ResolvedCostMarkup {\n let selectedIndex = -1;\n const copy = overrides.map((override, index) => {\n identifier(override.source);\n if (override.policy !== undefined) identifier(override.policy);\n if (override.version !== undefined) identifier(override.version);\n if (override.percent !== undefined) {\n percentUnits(override.percent);\n if (selectedIndex === -1) selectedIndex = index;\n }\n return { ...override };\n });\n if (selectedIndex === -1)\n throw new TypeError('An explicit markup percent is required');\n return {\n percent: copy[selectedIndex].percent as string,\n selectedIndex,\n overrides: copy,\n };\n}\n\n/** Calculate an explicitly supplied basis; this never reprices persisted snapshots. */\nexport function calculateCostBilling(input: {\n basisMinor: number;\n mode: CostBillingMode;\n markup: ResolvedCostMarkup;\n}): {\n principalMinor: number;\n feeMinor: number;\n totalMinor: number;\n markup: ResolvedCostMarkup;\n} {\n const basis = money(input.basisMinor);\n const markup = resolveCostMarkup(input.markup.overrides);\n if (\n markup.percent !== input.markup.percent ||\n markup.selectedIndex !== input.markup.selectedIndex\n ) {\n throw new TypeError('Resolved markup does not match its provenance');\n }\n let principal = 0n;\n let fee = 0n;\n switch (input.mode) {\n case 'reimbursement-plus-fee':\n principal = basis;\n fee = rounded(basis * percentUnits(markup.percent));\n break;\n case 'fee-only':\n fee = rounded(basis * percentUnits(markup.percent));\n break;\n case 'nonbillable':\n case 'fixed-contract':\n break;\n default:\n throw new TypeError('Unknown cost billing mode');\n }\n return {\n principalMinor: safe(principal),\n feeMinor: safe(fee),\n totalMinor: safe(principal + fee),\n markup,\n };\n}\n\n/** Explicit noncompounding tax components; an empty array means tax exempt. */\nexport interface CostBillingTaxRule {\n category: string;\n components: readonly { id: string; percent: string }[];\n}\n\n/**\n * Tax signed amounts with half-away-from-zero rounding. Invoice scope rounds each\n * component once after aggregation; line scope rounds each line/component pair.\n * A shared component ID must have the same exact rate across categories.\n */\nexport function calculateCostBillingTax(input: {\n lines: readonly { id: string; amountMinor: number; category: string }[];\n rules: readonly CostBillingTaxRule[];\n roundingScope: 'line' | 'invoice';\n}): { taxMinor: number; components: { id: string; taxMinor: number }[] } {\n if (input.roundingScope !== 'line' && input.roundingScope !== 'invoice') {\n throw new TypeError('Unknown tax rounding scope');\n }\n const categories = new Map<string, { id: string; rate: bigint }[]>();\n const rates = new Map<string, bigint>();\n const totals = new Map<string, bigint>();\n for (const rule of input.rules) {\n identifier(rule.category);\n if (categories.has(rule.category))\n throw new TypeError('Duplicate tax category');\n const seen = new Set<string>();\n const components = rule.components.map((component) => {\n identifier(component.id);\n const rate = percentUnits(component.percent);\n if (seen.has(component.id))\n throw new TypeError('Duplicate tax component');\n if (rates.has(component.id) && rates.get(component.id) !== rate)\n throw new TypeError('Conflicting tax component rate');\n seen.add(component.id);\n rates.set(component.id, rate);\n return { id: component.id, rate };\n });\n categories.set(rule.category, components);\n }\n const ids = new Set<string>();\n for (const line of input.lines) {\n identifier(line.id);\n identifier(line.category);\n if (ids.has(line.id)) throw new TypeError('Duplicate tax line');\n ids.add(line.id);\n const amount = money(line.amountMinor);\n const components = categories.get(line.category);\n if (!components)\n throw new TypeError('Missing explicit tax category mapping');\n for (const component of components) {\n const numerator = amount * component.rate;\n const tax =\n input.roundingScope === 'line' ? rounded(numerator) : numerator;\n totals.set(component.id, (totals.get(component.id) ?? 0n) + tax);\n }\n }\n let total = 0n;\n const components = Array.from(totals, ([id, value]) => {\n const tax = input.roundingScope === 'invoice' ? rounded(value) : value;\n total += tax;\n return { id, taxMinor: safe(tax) };\n });\n return { taxMinor: safe(total), components };\n}\n"],"mappings":";AAuBA,IAAM,QAAQ;AACd,IAAM,cAAc,OAAO;AAC3B,IAAM,QAAQ,OAAO,OAAO,gBAAgB;AAE5C,SAAS,aAAa,OAAuB;CAC3C,IACE,OAAO,UAAU,YACjB,CAAC,iCAAiC,KAAK,KAAK,GAE5C,MAAM,IAAI,UACR,yEACF;CAEF,MAAM,CAAC,OAAO,WAAW,MAAM,MAAM,MAAM,GAAG;CAC9C,MAAM,QAAQ,OAAO,KAAK,IAAI,QAAQ,OAAO,SAAS,OAAO,GAAG,GAAG,CAAC;CACpE,IAAI,QAAQ,UAAU,OAAO,MAAM,IAAI,WAAW,wBAAwB;CAC1E,OAAO;AACT;AAEA,SAAS,MAAM,OAAuB;CACpC,IAAI,CAAC,OAAO,cAAc,KAAK,GAC7B,MAAM,IAAI,WAAW,wCAAwC;CAC/D,OAAO,OAAO,KAAK;AACrB;AAEA,SAAS,KAAK,OAAuB;CACnC,IAAI,QAAQ,SAAS,QAAQ,CAAC,OAC5B,MAAM,IAAI,WAAW,mDAAmD;CAC1E,OAAO,OAAO,KAAK;AACrB;AAEA,SAAS,QAAQ,WAA2B;CAE1C,MAAM,WADY,YAAY,KAAK,CAAC,YAAY,aACpB,cAAc,MAAM;CAChD,OAAO,YAAY,KAAK,CAAC,SAAS;AACpC;AAEA,SAAS,WAAW,OAAqB;CACvC,IAAI,OAAO,UAAU,YAAY,MAAM,KAAK,CAAA,CAAE,WAAW,GACvD,MAAM,IAAI,UAAU,sCAAsC;AAC9D;AAGO,SAAS,kBACd,WACoB;CACpB,IAAI,gBAAgB;CACpB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AI,WAAW;EACrD,MAAM,MAAM,MAAM,kBAAkB,YAAY,QAAQ,KAAK,IAAI;EACjE,SAAS;EACT,OAAO;GAAE;GAAI,UAAU,KAAK,GAAG;EAAE;CACnC,CAAC;CACD,OAAO;EAAE,UAAU,KAAK,KAAK;EAAG;CAAW;AAC7C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,6 @@ export { COMMERCE_MONEY_COLUMNS, COMMERCE_MONEY_MINOR_UNITS_BACKFILL, COMMERCE_N
|
|
|
68
68
|
export { Agreement, BillingAccount, type BillingCloseKind, BillingLineSource, type BillingLineSourceType, BillingPaymentAttempt, type BillingPaymentAttemptFlag, type BillingPaymentAttemptPurpose, type BillingPaymentAttemptTransition, BillingPeriodClose, type BillingPeriodCloseStatus, type BillingStanding, Cart, Contract, ContractLineItem, Customer, Estimate, Fulfillment, FulfillmentLineItem, Invoice, InvoiceLineItem, Lease, type LicenseRightsSnapshot, LicenseSale, Order, Payment, PaymentAllocation, PaymentInstrument, PaymentIntent, Payout, ProductionOrder, PurchaseOrder, Vendor, WholesaleOrder, } from './models/index.js';
|
|
69
69
|
export { assertIntegerMinorUnits } from './money.js';
|
|
70
70
|
export { AgreementsRecipe, CustomersRecipe, EstimatesRecipe, FulfillmentRecipe, InvoicingRecipe, LeasesRecipe, LicensesRecipe, PurchasesRecipe, SalesRecipe, VendorsRecipe, WholesaleRecipe, } from './recipes.js';
|
|
71
|
-
export { type Address, ContractStatus, ContractType, CustomerStatus, CustomerType, FulfillmentStatus, FulfillmentType, type InvoiceCollectionMethod, InvoiceStatus, PaymentInstrumentStatus, PaymentIntentStatus, PaymentMethod, type PaymentOption, PaymentStatus, PayoutStatus, type RecognizeRevenueOptions, type RecordPaymentOptions, VendorStatus, } from './types/index.js';
|
|
71
|
+
export { type Address, ContractStatus, ContractType, CustomerStatus, CustomerType, FulfillmentStatus, FulfillmentType, type InvoiceCollectionMethod, InvoiceStatus, PaymentInstrumentStatus, PaymentIntentStatus, PaymentMethod, type PaymentOption, PaymentStatus, PayoutStatus, type PurchaseOrderOptions, type RecognizeRevenueOptions, type RecordPaymentOptions, VendorStatus, } from './types/index.js';
|
|
72
72
|
export { COMMERCE_MODULE_META, COMMERCE_UI_SLOTS } from './ui.js';
|
|
73
73
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAKH,OAAO,wBAAwB,CAAC;AAGhC,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,2BAA2B,EAChC,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,uBAAuB,EACvB,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,6BAA6B,EAClC,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,SAAS,EACT,cAAc,EACd,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK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