Versie 0.2.0

This commit is contained in:
Atreides Assets committed 2026-10-29 11:57:29 +01:00
commit e77d8fd373
495 files changed
+81026

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
// Generated, do not edit. sha256:5d115259dddad7958f7f0a20af1477db47898da5fb7fe4a5f958f0a3bc9b0df0
import { isAiRawAllowed } from './gate.js';
import { getPref } from '../data/preferences.js';
function bucketing(key) {
try { return getPref('ai', key) !== 0; }
catch { return true; }
}
export function precisionSettings() {
if (isAiRawAllowed()) {
return Object.freeze({
rawValues: true,
bucketShares: false,
bucketTotals: false,
bucketAmounts: false,
bucketQuantities: false,
});
}
return Object.freeze({
rawValues: false,
bucketShares: bucketing('bucket_shares'),
bucketTotals: bucketing('bucket_totals'),
bucketAmounts: bucketing('bucket_amounts'),
bucketQuantities: bucketing('bucket_quantities'),
});
}
export function shareDisclosure(precision) {
const p = precision ?? {};
if (p.rawValues) return 'exact';
if (!p.bucketAmounts) return 'exact';
if (p.bucketShares) return 'bucketed';
if (p.bucketTotals) return 'exact';
return 'omit';
}
export function precisionKey(precision) {
const p = precision ?? {};
return Object.keys(p).sort().map(k => `${k}=${String(p[k])}`).join(',') || 'leeg';
}