Files
headroom/frontend/node_modules/effect/dist/esm/internal/runtimeFlagsPatch.js
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

38 lines
1.7 KiB
JavaScript

import { dual } from "../Function.js";
/** @internal */
const BIT_MASK = 0xff;
/** @internal */
const BIT_SHIFT = 0x08;
/** @internal */
export const active = patch => patch & BIT_MASK;
/** @internal */
export const enabled = patch => patch >> BIT_SHIFT & BIT_MASK;
/** @internal */
export const make = (active, enabled) => (active & BIT_MASK) + ((enabled & active & BIT_MASK) << BIT_SHIFT);
/** @internal */
export const empty = /*#__PURE__*/make(0, 0);
/** @internal */
export const enable = flag => make(flag, flag);
/** @internal */
export const disable = flag => make(flag, 0);
/** @internal */
export const isEmpty = patch => patch === 0;
/** @internal */
export const isActive = /*#__PURE__*/dual(2, (self, flag) => (active(self) & flag) !== 0);
/** @internal */
export const isEnabled = /*#__PURE__*/dual(2, (self, flag) => (enabled(self) & flag) !== 0);
/** @internal */
export const isDisabled = /*#__PURE__*/dual(2, (self, flag) => (active(self) & flag) !== 0 && (enabled(self) & flag) === 0);
/** @internal */
export const exclude = /*#__PURE__*/dual(2, (self, flag) => make(active(self) & ~flag, enabled(self)));
/** @internal */
export const both = /*#__PURE__*/dual(2, (self, that) => make(active(self) | active(that), enabled(self) & enabled(that)));
/** @internal */
export const either = /*#__PURE__*/dual(2, (self, that) => make(active(self) | active(that), enabled(self) | enabled(that)));
/** @internal */
export const andThen = /*#__PURE__*/dual(2, (self, that) => self | that);
/** @internal */
export const inverse = patch => make(enabled(patch), invert(active(patch)));
/** @internal */
export const invert = n => ~n >>> 0 & BIT_MASK;
//# sourceMappingURL=runtimeFlagsPatch.js.map