2026-07-20 16:05:17 +00:00
|
|
|
// Module ID: 1333
|
2026-07-24 07:16:23 +00:00
|
|
|
// Function ID: 15647
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: hasBit
|
2026-07-23 10:11:24 +00:00
|
|
|
// Dependencies: [2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: addBit, isSerializedUint8Array, isUint8Array, removeBit
|
|
|
|
|
|
|
|
|
|
// Module 1333 (hasBit)
|
2026-07-23 10:11:24 +00:00
|
|
|
function hasBit(dismissedContents, closure_0) {
|
2026-07-20 16:05:17 +00:00
|
|
|
let tmp = 0 !== dismissedContents.length;
|
|
|
|
|
if (tmp) {
|
|
|
|
|
const _Math = Math;
|
2026-07-23 10:11:24 +00:00
|
|
|
tmp = dismissedContents[Math.floor(Math, closure_0 / 8)] & 1 << closure_0 % 8;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
let result = require("set").fileFinishedImporting("utils/Uint8ArrayUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export { hasBit };
|
2026-07-23 10:11:24 +00:00
|
|
|
export const addBit = function addBit(dismissedContents, closure_0) {
|
|
|
|
|
const rounded = Math.floor(closure_0 / 8);
|
2026-07-20 16:05:17 +00:00
|
|
|
let tmp2 = dismissedContents;
|
|
|
|
|
if (dismissedContents.length <= rounded) {
|
|
|
|
|
const _Uint8Array = Uint8Array;
|
|
|
|
|
const uint8Array = new Uint8Array(rounded + 1);
|
|
|
|
|
const result = uint8Array.set(dismissedContents, 0);
|
|
|
|
|
tmp2 = uint8Array;
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
tmp2[rounded] = tmp2[rounded] | 1 << closure_0 % 8;
|
2026-07-20 16:05:17 +00:00
|
|
|
return tmp2;
|
|
|
|
|
};
|
2026-07-23 10:11:24 +00:00
|
|
|
export const removeBit = function removeBit(dismissedContents, closure_0) {
|
|
|
|
|
if (hasBit(dismissedContents, closure_0)) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const _Math = Math;
|
2026-07-23 10:11:24 +00:00
|
|
|
const rounded = Math.floor(closure_0 / 8);
|
|
|
|
|
dismissedContents[rounded] = dismissedContents[rounded] & ~1 << closure_0 % 8;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return dismissedContents;
|
|
|
|
|
};
|
|
|
|
|
export const isUint8Array = function isUint8Array(arg0) {
|
|
|
|
|
return arg0 instanceof Uint8Array;
|
|
|
|
|
};
|
|
|
|
|
export const isSerializedUint8Array = function isSerializedUint8Array(__tag__) {
|
|
|
|
|
let tmp = null != __tag__;
|
|
|
|
|
if (tmp) {
|
|
|
|
|
tmp = "object" === typeof __tag__;
|
|
|
|
|
}
|
|
|
|
|
if (tmp) {
|
|
|
|
|
tmp = "uint8array" === __tag__.__tag__;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|