@adyen/adyen-platform-experience-web
Version:

31 lines (30 loc) • 841 B
JavaScript
import { TimeFlag as s } from "../../types.js";
import { struct as u, withFreezeProxyHandlers as c } from "../../../../../../utils/struct/main.js";
import { isString as l } from "../../../../../../utils/value/is.js";
const d = (() => {
const r = {}, n = Object.keys(s).filter((e) => isNaN(+e)), i = (e) => e !== "ALL" && l(e) && n.includes(e);
return (e) => {
const t = e & s.ALL;
return r[t] || (r[t] = new Proxy(
u({
valueOf: { value: () => t }
}),
c({
get: (o, a) => {
switch (a) {
case "valueOf":
return o.valueOf;
case Symbol.toStringTag:
return "_";
default:
if (!i(a)) return;
}
return t & s[a] ? 1 : void 0;
}
})
)), r[t];
};
})();
export {
d as default
};