{"version":3,"file":"js/oc.3b7272aa.js","sources":["../../frontend/src/base/components/common/inputs/MaskInput.tsx","../../frontend/src/base/components/common/inputs/SelectDropdown.tsx","../../frontend/src/base/core/CakeStore.ts","../../frontend/src/base/utils/arrayUtils.ts","../../frontend/src/base/utils/stringFormatter.ts"],"sourcesContent":["import { MAX_DECIMAL_INPUT } from \"@base/core/numericLimits\";\nimport { useOrgStore } from \"@base/hooks/useOrgStore\";\nimport { getCurrencySymbol } from \"@base/utils/stringFormatter\";\nimport { MaskitoOptions, maskitoUpdateElement } from \"@maskito/core\";\nimport {\n\tmaskitoCaretGuard,\n\tmaskitoEventHandler,\n\tmaskitoNumberOptionsGenerator,\n\tMaskitoNumberParams,\n\tmaskitoParseNumber,\n\tmaskitoStringifyNumber,\n} from \"@maskito/kit\";\nimport { useMaskito } from \"@maskito/react\";\nimport React, {\n\tforwardRef,\n\tRefCallback,\n\tuseCallback,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from \"react\";\n\nexport type MaskTypes = \"number\" | \"currency\" | \"percentage\";\n/** MaskInput emits an already-parsed value, not a DOM event; a cleared input sends null. */\nexport type MaskInputChangeHandler = (event: { target: { value: number | null } }) => void;\n\n/**\n * MaskInput's imperative handle. `valueAsNumber` is undefined when the input is empty or\n * unparseable, which is why this cannot be an HTMLInputElement (whose valueAsNumber is `number`).\n */\nexport type MaskInputRef = {\n\tvalueAsNumber: number | undefined;\n\tfocus: () => void;\n};\n\ninterface Props {\n\tmaskType: MaskTypes;\n\tonChange?: MaskInputChangeHandler;\n\tprefix?: string;\n\tsufix?: string;\n\tshowThousandSeparator?: boolean;\n\tallowDecimal?: boolean;\n\tallowNegative?: boolean;\n\tdecimalLimit?: number;\n\tintegerLimit?: number;\n\tdataTest?: string;\n\tcurrency?: string;\n\tcountry?: string;\n\tdisabled?: boolean;\n\t/** Controlled value (number) */\n\tvalue?: number | null;\n\t/** Uncontrolled initial value */\n\tdefaultValue?: number | null;\n}\n\ntype SharedMaskInputProps = Omit<React.HTMLProps<HTMLInputElement>, \"onChange\" | \"value\" | \"defaultValue\">;\n\ntype ControlledMaskInputProps = Props & {\n\tvalue: number | null;\n};\n\ntype UncontrolledMaskInputProps = Props & {\n\tvalue?: never;\n\tdefaultValue?: number | null;\n};\n\ntype MaskInputProps = (ControlledMaskInputProps | UncontrolledMaskInputProps) & SharedMaskInputProps;\n\nconst getLocaleSeparators = (country: string, currency: string) => {\n\ttry {\n\t\tconst locale = `en-${country.toUpperCase()}`;\n\t\tconst parts = new Intl.NumberFormat(locale, { style: \"currency\", currency }).formatToParts(1000.1);\n\t\treturn {\n\t\t\tdecimal: parts.find((p) => p.type === \"decimal\")?.value || \".\",\n\t\t\tthousand: parts.find((p) => p.type === \"group\")?.value || \",\",\n\t\t};\n\t} catch (e) {\n\t\tconsole.warn(\"Error determining locale separators, falling back to defaults.\", e);\n\t\treturn { decimal: \".\", thousand: \",\" };\n\t}\n};\n\nconst normalizeLeadingIntegerZeros = (display: string, prefix = \"\", postfix = \"\", decimalSeparator = \".\"): string => {\n\tconst hasPrefix = Boolean(prefix && display.startsWith(prefix));\n\tconst displayWithoutPrefix = hasPrefix ? display.slice(prefix.length) : display;\n\tconst hasPostfix = Boolean(postfix && displayWithoutPrefix.endsWith(postfix));\n\tconst displayWithoutAffixes = hasPostfix ? displayWithoutPrefix.slice(0, -postfix.length) : displayWithoutPrefix;\n\tconst sign = displayWithoutAffixes.startsWith(\"-\") ? \"-\" : \"\";\n\tconst unsignedValue = sign ? displayWithoutAffixes.slice(sign.length) : displayWithoutAffixes;\n\tconst decimalIndex = unsignedValue.indexOf(decimalSeparator);\n\tconst integerPart = decimalIndex === -1 ? unsignedValue : unsignedValue.slice(0, decimalIndex);\n\tconst fractionalPart = decimalIndex === -1 ? \"\" : unsignedValue.slice(decimalIndex);\n\n\treturn `${hasPrefix ? prefix : \"\"}${sign}${integerPart.replace(/^0+(?=\\d)/, \"\")}${fractionalPart}${hasPostfix ? postfix : \"\"}`;\n};\n\nconst MaskInput = forwardRef<MaskInputRef, MaskInputProps>(\n\t(\n\t\t{\n\t\t\tmaskType = \"number\",\n\t\t\tshowThousandSeparator = true,\n\t\t\tallowDecimal = false,\n\t\t\tallowNegative = true,\n\t\t\tdecimalLimit,\n\t\t\tintegerLimit,\n\t\t\tprefix,\n\t\t\tsufix,\n\t\t\tcurrency,\n\t\t\tcountry,\n\t\t\tdataTest,\n\t\t\tvalue: controlledValue,\n\t\t\tdefaultValue,\n\t\t\tmax,\n\t\t\tmin,\n\t\t\tonChange,\n\t\t\tonBlur: onBlurProp,\n\t\t\t...props\n\t\t}: MaskInputProps,\n\t\tref\n\t) => {\n\t\tconst orgData = useOrgStore((state) => state.organisationData);\n\n\t\tconst finalCountry = country || orgData?.country || \"US\";\n\t\tconst finalCurrency = currency || orgData?.currency || \"USD\";\n\t\tconst currencySymbol = getCurrencySymbol(finalCurrency);\n\n\t\tconst elementRef = useRef<HTMLInputElement>(null);\n\n\t\tconst isControlled = controlledValue !== undefined;\n\t\tconst localeSeparators = useMemo(\n\t\t\t() => getLocaleSeparators(finalCountry, finalCurrency),\n\t\t\t[finalCountry, finalCurrency]\n\t\t);\n\n\t\tconst maskitoConfig = useMemo(() => {\n\t\t\tconst shouldAllowDecimal = maskType === \"percentage\" || maskType === \"currency\" ? true : allowDecimal;\n\t\t\tconst calculatedDecimalLimit = maskType === \"percentage\" ? (decimalLimit ?? 2) : (decimalLimit ?? 5);\n\t\t\tconst calculatedSuffix = maskType === \"percentage\" ? \"%\" : (sufix ?? \"\");\n\t\t\tconst calculatedPrefix = maskType === \"currency\" ? currencySymbol : (prefix ?? \"\");\n\t\t\tconst calculatedIntegerLimit = maskType === \"currency\" ? 20 : (integerLimit ?? 20);\n\t\t\tconst integerLimitMax = Number(\"9\".repeat(calculatedIntegerLimit));\n\t\t\tconst calculatedMax = maskType === \"percentage\" ? 100 : Math.min(MAX_DECIMAL_INPUT, integerLimitMax);\n\t\t\tconst calculatedMin = maskType === \"percentage\" ? 0 : allowNegative ? Number.MIN_SAFE_INTEGER : 0;\n\n\t\t\tconst numberParams: MaskitoNumberParams = {\n\t\t\t\tprefix: calculatedPrefix,\n\t\t\t\tpostfix: calculatedSuffix,\n\t\t\t\tthousandSeparator: showThousandSeparator ? localeSeparators.thousand : undefined,\n\t\t\t\tmaximumFractionDigits: shouldAllowDecimal ? calculatedDecimalLimit : 0,\n\t\t\t\tdecimalSeparator: shouldAllowDecimal ? localeSeparators.decimal : undefined,\n\t\t\t\tmax: (max !== undefined && max !== null ? Number(max) : null) ?? calculatedMax,\n\t\t\t\tmin: (min !== undefined && min !== null ? Number(min) : null) ?? calculatedMin,\n\t\t\t};\n\n\t\t\tconst { plugins, ...otherOpts } = maskitoNumberOptionsGenerator(numberParams);\n\t\t\tconst maskitoOptions: MaskitoOptions = {\n\t\t\t\t...otherOpts,\n\t\t\t\tplugins: [\n\t\t\t\t\t...plugins,\n\t\t\t\t\t// Forbids caret to be placed after postfix\n\t\t\t\t\tmaskitoCaretGuard((value) => {\n\t\t\t\t\t\tif (calculatedSuffix.trim().length === 0) {\n\t\t\t\t\t\t\treturn [0, value.length];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [0, value.length - 1];\n\t\t\t\t\t}),\n\t\t\t\t\tmaskitoEventHandler(\"input\", (element) => {\n\t\t\t\t\t\tif (element.value === calculatedSuffix || element.value === calculatedPrefix) {\n\t\t\t\t\t\t\tmaskitoUpdateElement(element, \"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t],\n\t\t\t};\n\t\t\treturn { maskitoOptions, numberParams };\n\t\t}, [\n\t\t\tmaskType,\n\t\t\tshowThousandSeparator,\n\t\t\tallowDecimal,\n\t\t\tallowNegative,\n\t\t\tdecimalLimit,\n\t\t\tintegerLimit,\n\t\t\tprefix,\n\t\t\tsufix,\n\t\t\tcurrencySymbol,\n\t\t\tlocaleSeparators,\n\t\t\tmin,\n\t\t\tmax,\n\t\t]);\n\n\t\tconst normalizeDisplayValue = useCallback(\n\t\t\t(display: string): string => {\n\t\t\t\t// Percentage fields are common free-text entry points where users type either\n\t\t\t\t// separator regardless of locale. Normalize to the active locale decimal separator\n\t\t\t\t// before parsing so both \".\" and \",\" are accepted.\n\t\t\t\tif (maskType !== \"percentage\") {\n\t\t\t\t\treturn display;\n\t\t\t\t}\n\t\t\t\tconst decimal = localeSeparators.decimal;\n\t\t\t\tconst alternateDecimal = decimal === \".\" ? \",\" : \".\";\n\t\t\t\tif (!display.includes(alternateDecimal) || display.includes(decimal)) {\n\t\t\t\t\treturn display;\n\t\t\t\t}\n\t\t\t\treturn display.replaceAll(alternateDecimal, decimal);\n\t\t\t},\n\t\t\t[localeSeparators.decimal, maskType]\n\t\t);\n\n\t\t// Convert number to display string\n\t\tconst numberToDisplay = useCallback(\n\t\t\t(num: number | null | undefined): string => {\n\t\t\t\tif (num === null || num === undefined) return \"\";\n\t\t\t\treturn maskitoStringifyNumber(num, maskitoConfig.numberParams);\n\t\t\t},\n\t\t\t[maskitoConfig.numberParams]\n\t\t);\n\n\t\t// Convert display string to number\n\t\tconst displayToNumber = useCallback(\n\t\t\t(display: string): number | undefined => {\n\t\t\t\tif (!display || display.trim() === \"\") return undefined;\n\t\t\t\tconst parsed = maskitoParseNumber(display, maskitoConfig.numberParams);\n\t\t\t\treturn isNaN(parsed) ? undefined : parsed;\n\t\t\t},\n\t\t\t[maskitoConfig.numberParams]\n\t\t);\n\n\t\t// --- Display state ---\n\t\t//\n\t\t// MaskInput supports two modes:\n\t\t//  - Uncontrolled (defaultValue): display managed by internal useState.\n\t\t//  - Controlled (value prop):     display derived from numberToDisplay(value).\n\t\t//\n\t\t// Problem with controlled mode: onChange always sends *parsed* numbers. Typing\n\t\t// \"25.\" parses to 25, the parent stores 25, and numberToDisplay(25) = \"25\" —\n\t\t// the trailing decimal is lost, making it impossible to type \"25.5\".\n\t\t//\n\t\t// Fix: controlledDisplayDraft. When the raw display string can't survive a\n\t\t// number → string round-trip (e.g. trailing decimal, trailing zeros like \"25.0\"),\n\t\t// we stash it as a \"draft\" and render it instead of the derived value. The draft\n\t\t// is cleared on blur (clean display) or when the controlled value changes\n\t\t// externally (e.g. a linked amount field updates the percentage).\n\n\t\tconst [uncontrolledDisplayValue, setUncontrolledDisplayValue] = useState<string>(() =>\n\t\t\tnumberToDisplay(defaultValue ?? undefined)\n\t\t);\n\t\tconst [controlledDisplayDraft, setControlledDisplayDraft] = useState<string | null>(null);\n\t\tconst wasControlledRef = useRef(isControlled);\n\n\t\tuseLayoutEffect(() => {\n\t\t\tif (!wasControlledRef.current && isControlled) {\n\t\t\t\t// RHF controllers often start with `undefined` and then provide a value after\n\t\t\t\t// the first keystroke. Preserve the live DOM value when that happens so the\n\t\t\t\t// input does not reformat mid-typing and drop characters.\n\t\t\t\tsetControlledDisplayDraft(uncontrolledDisplayValue);\n\t\t\t}\n\t\t\twasControlledRef.current = isControlled;\n\t\t}, [isControlled, uncontrolledDisplayValue]);\n\n\t\t// Clear draft when the controlled value diverges from what the draft represents.\n\t\t// This handles external updates — e.g. when an amount input recalculates the\n\t\t// percentage, controlledValue changes to a new number and the old draft is stale.\n\t\tlet currentControlledDisplayDraft = controlledDisplayDraft;\n\t\tif (isControlled && controlledDisplayDraft != null) {\n\t\t\tconst draftNumber = displayToNumber(controlledDisplayDraft);\n\t\t\tconst controlledNumber = controlledValue ?? undefined;\n\t\t\tif (draftNumber !== controlledNumber) {\n\t\t\t\tcurrentControlledDisplayDraft = null;\n\t\t\t\tsetControlledDisplayDraft(null);\n\t\t\t}\n\t\t}\n\n\t\tconst displayValue = isControlled\n\t\t\t? (currentControlledDisplayDraft ?? numberToDisplay(controlledValue))\n\t\t\t: uncontrolledDisplayValue;\n\n\t\tconst handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst newDisplayValue = normalizeLeadingIntegerZeros(\n\t\t\t\tnormalizeDisplayValue(e.target.value),\n\t\t\t\tmaskitoConfig.numberParams.prefix,\n\t\t\t\tmaskitoConfig.numberParams.postfix,\n\t\t\t\tmaskitoConfig.numberParams.decimalSeparator\n\t\t\t);\n\t\t\tconst newNumericValue = displayToNumber(newDisplayValue);\n\n\t\t\tif (!isControlled) {\n\t\t\t\tsetUncontrolledDisplayValue(newDisplayValue);\n\t\t\t} else {\n\t\t\t\t// Keep draft when the display can't round-trip through number → string\n\t\t\t\t// without loss. Covers trailing decimals (\"25.\"), trailing zeros (\"25.0\"),\n\t\t\t\t// and any other intermediate typing state.\n\t\t\t\tconst canRoundTrip = newDisplayValue === numberToDisplay(newNumericValue ?? null);\n\t\t\t\tsetControlledDisplayDraft(canRoundTrip ? null : newDisplayValue);\n\t\t\t}\n\n\t\t\tonChange?.({ target: { value: newNumericValue ?? null } });\n\t\t};\n\n\t\t// On blur, discard the draft so the display snaps to the clean numeric\n\t\t// representation (e.g. \"25.\" → \"25\", \"25.0\" → \"25\").\n\t\tconst handleBlur = useCallback(\n\t\t\t(e: React.FocusEvent<HTMLInputElement>) => {\n\t\t\t\tsetControlledDisplayDraft(null);\n\t\t\t\tonBlurProp?.(e);\n\t\t\t},\n\t\t\t[onBlurProp]\n\t\t);\n\n\t\tconst maskitoRef = useMaskito({ options: maskitoConfig.maskitoOptions }) as RefCallback<HTMLInputElement>;\n\t\tconst setInputRef = useCallback(\n\t\t\t(node: HTMLInputElement | null) => {\n\t\t\t\telementRef.current = node;\n\t\t\t\tmaskitoRef(node);\n\t\t\t},\n\t\t\t[maskitoRef]\n\t\t);\n\n\t\tuseImperativeHandle(ref, () => ({\n\t\t\tget valueAsNumber() {\n\t\t\t\treturn displayToNumber(elementRef.current?.value ?? \"\");\n\t\t\t},\n\t\t\tfocus: () => elementRef.current?.focus(),\n\t\t}));\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\t{...props}\n\t\t\t\tref={setInputRef}\n\t\t\t\tdata-test={dataTest}\n\t\t\t\tvalue={displayValue}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tonBlur={handleBlur}\n\t\t\t\tdata-is=\"input\"\n\t\t\t/>\n\t\t);\n\t}\n);\n\nMaskInput.displayName = \"MaskInput\";\n\nexport { MaskInput };\n","import { BaseSizeList, Box, Icon, Text } from \"@base/components/common/primitives\";\nimport { DynamicIcons } from \"@base/utils/images\";\nimport { normalizeProps, Portal, useMachine } from \"@zag-js/react\";\nimport * as select from \"@zag-js/select\";\nimport clsx from \"clsx\";\nimport React, { useId, useRef } from \"react\";\nimport styles from \"./SelectDropdown.module.scss\";\n\ntype Data = {\n\tlabel: string | number;\n\tvalue: string;\n};\n\ninterface SelectDropdownProps {\n\tvariant?: \"default\" | \"cell\";\n\tdata: Array<Data>;\n\tplaceholder?: string;\n\trequired?: boolean;\n\tdisabled?: boolean;\n\tdataTest?: string;\n\tvalue?: string;\n\tdefaultValue?: string;\n\tonValueChange?: (value: select.ValueChangeDetails<Data>) => void;\n\tclassName?: string;\n\tsize?: \"small\" | \"medium\" | \"large\";\n}\n\nconst dropdownSizes = {\n\tsmall: styles.small,\n\tmedium: styles.medium,\n\tlarge: styles.large,\n};\n\nconst iconSizes = {\n\tsmall: \"4x\",\n\tmedium: \"4x\",\n\tlarge: \"5x\",\n};\n\nconst selectTextSizes = {\n\tsmall: 12,\n\tmedium: 14,\n\tlarge: 14,\n} as const;\n\nexport interface SelectRef {\n\tvalue: string;\n\treadonly selectedIndex: number;\n}\n\nconst SelectDropdown = React.forwardRef<SelectRef, SelectDropdownProps>(\n\t(\n\t\t{\n\t\t\tdata,\n\t\t\trequired,\n\t\t\tplaceholder,\n\t\t\tdisabled,\n\t\t\tdataTest,\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tonValueChange,\n\t\t\tclassName,\n\t\t\tsize = \"medium\",\n\t\t\tvariant = \"default\",\n\t\t},\n\t\tref\n\t) => {\n\t\tconst holder = useRef(document.getElementById(\"reactDropdownHolder\") as HTMLElement);\n\t\tconst cssClasses = clsx([styles[`variant-${variant}`], className]);\n\n\t\tconst service = useMachine(select.machine, {\n\t\t\tid: useId(),\n\t\t\tcollection: select.collection({\n\t\t\t\titems: data,\n\t\t\t}),\n\t\t\trequired,\n\t\t\tdisabled,\n\t\t\tvalue: value !== undefined ? [value] : undefined,\n\t\t\tdefaultValue: defaultValue !== undefined ? [defaultValue] : undefined,\n\t\t\tonValueChange,\n\t\t\tonPointerDownOutside: () => {\n\t\t\t\tapi.setOpen(false); // For Safari, we need to force to close the dropdown manually since we prevent the default behavior on outside interaction\n\t\t\t},\n\t\t\tonInteractOutside: (e: select.InteractOutsideEvent) => {\n\t\t\t\te.preventDefault(); // For Safari, when this component is inside a modal, it doesnt know how to deal with the outside click, and dismisses everything\n\t\t\t},\n\t\t});\n\n\t\tconst api = select.connect(service, normalizeProps);\n\n\t\tReact.useImperativeHandle(\n\t\t\tref,\n\t\t\t() => ({\n\t\t\t\tget value() {\n\t\t\t\t\treturn api.value?.[0] || \"\";\n\t\t\t\t},\n\t\t\t\tset value(newValue: string) {\n\t\t\t\t\tconst item = data.find((item) => item.value === newValue);\n\n\t\t\t\t\tif (item) {\n\t\t\t\t\t\tapi.setValue([newValue]);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tget selectedIndex() {\n\t\t\t\t\treturn data.findIndex((item) => item.value === api.value?.[0]);\n\t\t\t\t},\n\t\t\t}),\n\t\t\t[api, data]\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Box {...api.getRootProps()} className={cssClasses}>\n\t\t\t\t\t<Box {...api.getControlProps()} data-is=\"selectdropdown\">\n\t\t\t\t\t\t<button {...api.getTriggerProps()} data-test={dataTest} className={dropdownSizes[size]}>\n\t\t\t\t\t\t\t<Box orientation=\"horizontal\" align=\"left\" width=\"full\" gap=\"2x\" wrap=\"wrap\">\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tsize={selectTextSizes[size]}\n\t\t\t\t\t\t\t\t\tcolor={placeholder && !api.valueAsString ? \"gray-light\" : \"black\"}\n\t\t\t\t\t\t\t\t\tweight=\"regular\"\n\t\t\t\t\t\t\t\t\ttruncate>\n\t\t\t\t\t\t\t\t\t{api.valueAsString || placeholder}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tsource={DynamicIcons.caret}\n\t\t\t\t\t\t\t\trotate={api.open ? \"bottom\" : \"top\"}\n\t\t\t\t\t\t\t\tsize={iconSizes[size] as BaseSizeList}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</Box>\n\t\t\t\t\t<Portal container={holder}>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={styles.selectResultsHolder}\n\t\t\t\t\t\t\t{...api.getPositionerProps()}\n\t\t\t\t\t\t\tdata-test={`${dataTest}-results`}\n\t\t\t\t\t\t\tdata-is=\"selectdropdown-results\">\n\t\t\t\t\t\t\t<ul {...api.getContentProps()}>\n\t\t\t\t\t\t\t\t{data.length > 0 ? (\n\t\t\t\t\t\t\t\t\tdata.map((item) => (\n\t\t\t\t\t\t\t\t\t\t<li key={item.value} {...api.getItemProps({ item })}>\n\t\t\t\t\t\t\t\t\t\t\t<span {...api.getItemTextProps({ item })}>{item.label}</span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<li className=\"padding-vertical-2x padding-horizontal-3x\">\n\t\t\t\t\t\t\t\t\t\t<Text color=\"gray\">No options available</Text>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Portal>\n\t\t\t\t</Box>\n\n\t\t\t\t<select {...api.getHiddenSelectProps()}>\n\t\t\t\t\t{data.length > 0 ? (\n\t\t\t\t\t\tdata.map((option) => (\n\t\t\t\t\t\t\t<option key={option.value} value={option.value}>\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<option value=\"\" disabled>\n\t\t\t\t\t\t\tNo options available\n\t\t\t\t\t\t</option>\n\t\t\t\t\t)}\n\t\t\t\t</select>\n\t\t\t</>\n\t\t);\n\t}\n);\n\nSelectDropdown.displayName = \"SelectDropdown\";\n\nexport { SelectDropdown };\n","import { ApolloClient, HttpLink, InMemoryCache } from \"@apollo/client\";\nimport { OrganisationData, useOrgStore } from \"@base/hooks/useOrgStore\";\nimport { useServerSentEventsStore } from \"@base/hooks/useServerSentEvents\";\nimport axios from \"axios\";\nimport { create } from \"zustand\";\nimport { persist } from \"zustand/middleware\";\n\nexport enum OnboardingStatusType {\n\tNONE = \"NONE\",\n\tRETURNING_USER = \"RETURNING_USER\",\n\tNEW_USER = \"NEW_USER\",\n}\n\ninterface UserState {\n\treadonly id: string;\n\treadonly name: string;\n\treadonly first_name?: string;\n\treadonly email: string;\n\treadonly picture?: string;\n\treadonly isSupportAdmin: boolean;\n\treadonly hasCompanies: boolean;\n\treadonly onboardingStatus: OnboardingStatusType;\n\treadonly cake_finger?: string;\n\treadonly needsToAcceptNewTerms: boolean;\n\treadonly needsToDismissNewUserScreen: boolean;\n\treadonly hasVisibleValuation: boolean;\n\treadonly hasAtLeastOneVisibleValuation: boolean;\n}\n\nconst useUserProfile = create<UserState>()(() => ({\n\tid: \"\",\n\tname: \"\",\n\temail: \"\",\n\tisSupportAdmin: false,\n\thasCompanies: false,\n\tonboardingStatus: OnboardingStatusType.NONE,\n\tneedsToAcceptNewTerms: true,\n\tneedsToDismissNewUserScreen: true,\n\thasVisibleValuation: false,\n\thasAtLeastOneVisibleValuation: false,\n}));\n\ninterface AppSharedStore {\n\treadonly apolloClient?: ApolloClient;\n\treadonly csrfToken?: string;\n\treadonly paginationSize: number;\n\treadonly itemsPerLoad: number;\n}\n\ninterface Dictionary<T> {\n\t[Key: string]: T;\n}\n\ninterface BaseAppContext {\n\tCURRENCIES: Dictionary<string>;\n\tCURRENCY_SYMBOLS: Dictionary<string>;\n\tCOUNTRY_LIST: Array<Country>;\n\tUS_STATES: Array<{ code: string; name: string }>;\n\tGOOGLE_CLOUD_PLATFORM_KEY: string;\n\tSENTRY_DSN: string;\n\tAPP_ENDPOINT: string;\n\tBASE_DOMAIN_URL: string;\n\tPLATFORM_VERSION: string;\n\tSTRIPE_API_PUBLIC_KEY: string;\n\tAPP_ENVIRONMENT: string;\n\tPOSTHOG_PROJECT_TOKEN?: string;\n\tPOSTHOG_HOST?: string;\n\tSW_URL: string;\n\tAPP_SEGMENT: \"founder\" | \"employee\";\n\tSKIP_ANALYTICS: boolean;\n\tcsrf_token: string;\n\t[key: string]: unknown; // Allow additional dynamic keys safely\n}\n\ninterface FounderAppContext extends BaseAppContext {\n\tAPP_SEGMENT: \"founder\";\n\tDEFAULT_SELECTED_COMPANY_ID: string;\n\tAUTHENTICATED_USER: UserState;\n\tORG_DATA: OrganisationData | null; // Can be null for first-time setup flows\n\tCOMMAND_CENTER_FRONTEND_REFRESH_IN_MILLIS: number;\n\tSKIP_SSE_ORG_CHECK: boolean;\n\tPOSITIONS_LIST?: { position: string; description: string }[];\n\tROLES_LIST?: { role: string; description: string }[];\n\tENABLE_MASTER_BAKER: boolean;\n}\n\ntype FounderAppContextWithOrgData = FounderAppContext & {\n\tORG_DATA: OrganisationData;\n};\n\ninterface EmployeeAppContext extends BaseAppContext {\n\tAPP_SEGMENT: \"employee\";\n\tAUTHENTICATED_USER: UserState;\n\tSKIP_SSE_ORG_CHECK: boolean;\n\tWEBPUSH_VAPID_PUBLIC_KEY: string;\n}\n\ntype AppContext = FounderAppContext | EmployeeAppContext;\n\nconst OBFUSCATION_KEY = \"c0n73x7k3y\";\n\nfunction decodeXorFromHex(hex: string, key: string): string {\n\tconst bytes = hex.match(/.{1,2}/g)?.map((b) => parseInt(b, 16)) ?? [];\n\tconst decodedChars = bytes.map((byte, i) => String.fromCharCode(byte ^ key.charCodeAt(i % key.length)));\n\treturn decodedChars.join(\"\");\n}\n\nfunction loadAppContext(): AppContext | null {\n\tconst el = document.getElementById(\"initialContext\");\n\tif (!el) return null;\n\n\tconst hex = el.textContent?.trim() ?? \"\";\n\ttry {\n\t\tconst json = decodeXorFromHex(hex, OBFUSCATION_KEY);\n\t\tconst decoded = JSON.parse(json);\n\t\treturn decoded;\n\t} catch (e) {\n\t\tconsole.error(\"Failed to decode app context:\", e);\n\t\treturn null;\n\t}\n}\n\nconst useAppConfig = create<AppSharedStore>()(() => ({\n\tpaginationSize: 0,\n\titemsPerLoad: 0,\n}));\n\ninterface Country {\n\tcode: string;\n\tname: string;\n}\n\ntype SkinToneKey = \"dark\" | \"light\" | \"medium-dark\" | \"medium-light\" | \"medium\" | \"none\";\nexport enum DocumentsViewMode {\n\tFolder = \"folder\",\n\tList = \"list\",\n}\n\ninterface UserPreferences {\n\tuserCurrency: string;\n\tsetUserCurrency: (new_currency: string) => void;\n\temployeeGoalFeedbackUsage: boolean;\n\tsetEmployeeGoalFeedbackUsage: (new_value: boolean) => void;\n\tskinTone: SkinToneKey;\n\tsetSkinTone: (tone: SkinToneKey) => void;\n\tdocumentsViewMode: DocumentsViewMode;\n\tsetDocumentsViewMode: (mode: DocumentsViewMode) => void;\n}\n\nconst useUserPreferences = create<UserPreferences>()(\n\tpersist(\n\t\t(set) => ({\n\t\t\tuserCurrency: \"\",\n\t\t\tsetUserCurrency: (new_currency) => set({ userCurrency: new_currency }),\n\t\t\temployeeGoalFeedbackUsage: false,\n\t\t\tsetEmployeeGoalFeedbackUsage: (new_value) => set({ employeeGoalFeedbackUsage: new_value }),\n\t\t\tskinTone: \"none\",\n\t\t\tsetSkinTone: (tone) => set({ skinTone: tone }),\n\t\t\tdocumentsViewMode: DocumentsViewMode.Folder,\n\t\t\tsetDocumentsViewMode: (mode) => set({ documentsViewMode: mode }),\n\t\t}),\n\t\t{\n\t\t\tname: \"EMPLOYEE_APP_USER_PREFERENCES\",\n\t\t}\n\t)\n);\n\ninterface UnauthenticatedStore {\n\thideHeader: boolean;\n\tsetHideHeader: (hide: boolean) => void;\n}\n\nconst useUnauthenticatedStore = create<UnauthenticatedStore>((set) => ({\n\thideHeader: false,\n\tsetHideHeader: (hide: boolean) => set({ hideHeader: hide }),\n}));\n\nconst appContext = loadAppContext();\n\nconst getAppContext = () => {\n\tif (!appContext) {\n\t\tthrow new Error(\"App context missing. Expected #initialContext to be present.\");\n\t}\n\treturn appContext;\n};\n\nconst isFounderContext = (context: AppContext): context is FounderAppContext => context.APP_SEGMENT === \"founder\";\nconst isEmployeeContext = (context: AppContext): context is EmployeeAppContext => context.APP_SEGMENT === \"employee\";\n\nconst getFounderAppSetupContext = (): FounderAppContext => {\n\tconst context = getAppContext();\n\tif (!isFounderContext(context)) {\n\t\tthrow new Error(`Invalid app segment \"${context.APP_SEGMENT}\" for founder context.`);\n\t}\n\treturn context;\n};\n\nconst hasOrgData = (context: FounderAppContext): context is FounderAppContextWithOrgData => context.ORG_DATA !== null;\n\nfunction assertHasOrgData(context: FounderAppContext): asserts context is FounderAppContextWithOrgData {\n\tif (!hasOrgData(context)) {\n\t\tthrow new Error(\"Founder context is missing ORG_DATA.\");\n\t}\n}\n\nconst getFounderAppContext = (): FounderAppContextWithOrgData => {\n\tconst context = getFounderAppSetupContext();\n\tassertHasOrgData(context);\n\treturn context;\n};\n\nconst getEmployeeAppContext = (): EmployeeAppContext => {\n\tconst context = getAppContext();\n\tif (!isEmployeeContext(context)) {\n\t\tthrow new Error(`Invalid app segment \"${context.APP_SEGMENT}\" for employee context.`);\n\t}\n\treturn context;\n};\n\nconst initializeCakeStores = () => {\n\tif (!appContext) {\n\t\treturn;\n\t}\n\n\tconst authenticatedUser = appContext.AUTHENTICATED_USER;\n\tif (authenticatedUser) {\n\t\tuseUserProfile.setState(() => authenticatedUser, true);\n\t}\n\n\ttry {\n\t\tconst httpLink = new HttpLink({\n\t\t\theaders: {\n\t\t\t\t\"X-CSRFToken\": appContext.csrf_token,\n\t\t\t},\n\t\t\turi: \"/graphql\",\n\t\t\tfetch: async (uri, options) => {\n\t\t\t\tconst response = await fetch(uri, options);\n\t\t\t\tif (response.headers.get(\"X-Maintenance-Mode\")) {\n\t\t\t\t\tconsole.debug(\"Maintenance mode detected, reloading page\");\n\t\t\t\t\twindow.location.reload();\n\t\t\t\t\tthrow new Error(\"We're performing maintenance. We'll be right back!\");\n\t\t\t\t}\n\t\t\t\treturn response;\n\t\t\t},\n\t\t});\n\t\tconst apolloCache = new InMemoryCache({\n\t\t\ttypePolicies: {\n\t\t\t\tQuery: {\n\t\t\t\t\tfields: {\n\t\t\t\t\t\torganisation: {\n\t\t\t\t\t\t\tmerge: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tshareholderTransactions: {\n\t\t\t\t\t\t\tkeyArgs: [\"shareholderId\"],\n\t\t\t\t\t\t\tmerge: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t/*\n                    If we get EsopOffer objects with different fields from different requests,\n                    they would cache bust each other. Therefore, `keyFields: false` for those.\n                    https://www.apollographql.com/docs/react/caching/cache-configuration/#disabling-normalization\n                */\n\t\t\t\tEsopOffer: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tEssOffer: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tOrganisationRaiseOffer: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tNotesRoundOffer: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tShareTransferOfferType: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tShareholder: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tBoardApprovalType: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tEsopOfferGroup: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tBillingShareholderType: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tSharetypeHoldingType: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tStakeholderAssetsPreviewType: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tStakeholderVestablePlanHoldingsType: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tOverviewShareholderType: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t\tSharetype: {\n\t\t\t\t\tkeyFields: false,\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tconst networkStoreInitiaState: AppSharedStore = {\n\t\t\tcsrfToken: appContext.csrf_token,\n\t\t\tapolloClient: new ApolloClient({\n\t\t\t\tlink: httpLink,\n\t\t\t\tcache: apolloCache,\n\t\t\t}),\n\t\t\tpaginationSize: 24,\n\t\t\titemsPerLoad: 2,\n\t\t};\n\t\tuseAppConfig.setState(networkStoreInitiaState, true);\n\t\taxios.defaults.xsrfCookieName = \"csrftoken\";\n\t\taxios.defaults.xsrfHeaderName = \"X-CSRFToken\";\n\t\taxios.defaults.withXSRFToken = true;\n\t} catch (error) {\n\t\tconsole.error(\"Error initializing useAppConfig\", error);\n\t}\n\n\tif (isFounderContext(appContext) && appContext.ORG_DATA) {\n\t\tuseOrgStore.getState().initialize(appContext.ORG_DATA);\n\t}\n\n\tconst userId = useUserProfile.getState().id;\n\tif (userId) {\n\t\tuseServerSentEventsStore.getState().sse.initialize(userId, Boolean(appContext.SKIP_SSE_ORG_CHECK));\n\t}\n};\n\nexport {\n\tgetAppContext,\n\tgetEmployeeAppContext,\n\tgetFounderAppContext,\n\tgetFounderAppSetupContext,\n\tinitializeCakeStores,\n\tassertHasOrgData,\n\thasOrgData,\n\tisEmployeeContext,\n\tisFounderContext,\n\tuseAppConfig,\n\tuseUnauthenticatedStore,\n\tuseUserPreferences,\n\tuseUserProfile,\n\ttype AppContext,\n\ttype BaseAppContext,\n\ttype Country,\n\ttype EmployeeAppContext,\n\ttype FounderAppContext,\n\ttype FounderAppContextWithOrgData,\n};\n","export const compactNullableArray = <T>(items: ReadonlyArray<T | null | undefined> | null | undefined): T[] =>\n\t(items ?? []).filter((item) => item != null);\n\nexport type NonNullableFields<T, K extends keyof T> = T & {\n\t[P in K]-?: NonNullable<T[P]>;\n};\n\nexport const nonNullableKeys =\n\t<K extends PropertyKey>(...keys: K[]) =>\n\t<T extends Partial<Record<K, unknown>>>(item: T): item is NonNullableFields<T, K> =>\n\t\tkeys.every((key) => item[key] != null);\n","import { getAppContext } from \"@base/core/CakeStore\";\nimport { GetPeopleQuery, InternationalAddressFragment, SeEmployeeDataLevelChoices } from \"@base/core/graphql\";\nimport Decimal from \"decimal.js\";\nimport { DateTime } from \"luxon\";\nimport { formatValue } from \"react-currency-input-field\";\n\nexport const emailRegex = new RegExp(\n\t// eslint-disable-next-line max-len\n\t/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i\n);\n\nexport function formatAddress(address: InternationalAddressFragment | null | undefined) {\n\tif (address != null) {\n\t\treturn (\n\t\t\t(address.line1 || \"\") +\n\t\t\t\", \" +\n\t\t\t(address.line2 ? address.line2 + \", \" : \"\") +\n\t\t\taddress.locality +\n\t\t\t\" \" +\n\t\t\t(address.administrativeArea1 || \"\") +\n\t\t\t\" \" +\n\t\t\taddress.postcode +\n\t\t\t\", \" +\n\t\t\taddress.country // TODO(henrique) get country name instead if code\n\t\t);\n\t}\n\treturn \"-\";\n}\n\nconst roundToMaxDecimalPlaces = (n: number, maxDecimalPlaces = 5) => {\n\tconst p = Math.pow(10, maxDecimalPlaces);\n\treturn Math.round(n * p) / p;\n};\n\nexport function formatNumber(value: number | null | undefined, prefix = \"# \", suffix = \"\") {\n\tif (value === null || value === undefined) {\n\t\treturn \"\";\n\t}\n\treturn formatValue({\n\t\tvalue: `${value}`,\n\t\tdecimalScale: 0,\n\t\tgroupSeparator: \",\",\n\t\tprefix: prefix,\n\t\tsuffix: suffix,\n\t});\n}\n\nexport function formatMonetaryValue(\n\tvalue: number | Decimal | null | undefined,\n\tcurrencySymbol: string,\n\tnoDecimal = false,\n\tnoSpace = false\n) {\n\tif (value === null || value === undefined) {\n\t\treturn \"-\";\n\t}\n\n\treturn formatValue({\n\t\tvalue: `${String(value)}`,\n\t\tdecimalScale: noDecimal ? 0 : 2,\n\t\tgroupSeparator: \",\",\n\t\tdecimalSeparator: \".\",\n\t\tprefix: noSpace ? currencySymbol : currencySymbol + \" \",\n\t});\n}\n\nexport function formatPrice(value: number | null | undefined, currencySymbol: string): string {\n\tconst roundedValue = value ? roundToMaxDecimalPlaces(value) : 0;\n\treturn formatValue({\n\t\tvalue: `${roundedValue}`,\n\t\tdecimalScale: Number.isInteger(roundedValue) ? 2 : undefined, // i question this 2, why not zero? if integer why do we force .00 ?\n\t\tgroupSeparator: \",\",\n\t\tdecimalSeparator: \".\",\n\t\tprefix: currencySymbol + \" \",\n\t});\n}\n\nexport function formatPercentage(value: number, decimals: number = 5): string {\n\treturn formatValue({\n\t\tvalue: `${roundToMaxDecimalPlaces(value, decimals)}`,\n\t\tdecimalSeparator: \".\",\n\t\tsuffix: \"%\",\n\t});\n}\n\nexport function formatPercentageSane(value: number): string {\n\treturn formatValue({\n\t\tvalue: `${value}`,\n\t\tdecimalSeparator: \".\",\n\t\tsuffix: \"%\",\n\t\tdecimalScale: 0,\n\t});\n}\n\nexport const getCountryFullName = (countryCode: string): string => {\n\tif (!countryCode) return \"\";\n\tconst displayNames = new Intl.DisplayNames([\"en\"], { type: \"region\" });\n\treturn displayNames.of(countryCode) || countryCode;\n};\n\nexport function getFlagEmoji(countryCode: string | null | undefined): string {\n\tif (!countryCode) {\n\t\treturn \"\";\n\t}\n\tconst codePoints = countryCode\n\t\t.toUpperCase()\n\t\t.split(\"\")\n\t\t.map((char) => 127397 + char.charCodeAt(0));\n\treturn String.fromCodePoint(...codePoints);\n}\n\nexport const getEmployeeLevelName = (code: SeEmployeeDataLevelChoices) => {\n\treturn window?.riot?.employeeLevels.find((r) => r.code === code)?.name;\n};\n\nexport const getEmployeeRoleName = (code: string) => {\n\treturn window?.riot?.employeeRoles.find((r) => r.code === code)?.name;\n};\n\nexport const capitalizeString = (string: string) => {\n\treturn string.charAt(0).toUpperCase() + string.toLowerCase().slice(1);\n};\n\ntype AddressType = NonNullable<\n\tNonNullable<NonNullable<GetPeopleQuery[\"getPeople\"]>[\"pageData\"]>[number]\n>[\"primaryAddress\"];\nexport const formatAddressSimple = (address?: AddressType): string => {\n\tif (!address) return \"\";\n\n\treturn [address.line1, address.line2, address.line3, address.postcode, address.locality]\n\t\t.filter(Boolean) // Remove undefined or empty fields\n\t\t.join(\", \");\n};\n\nexport function formatDate(date: string | null | undefined, includeTime = false): string {\n\tif (!date) {\n\t\treturn \"-\"; // if no date, return a dash\n\t}\n\n\tconst outputFormat = includeTime ? \"dd MMM yyyy, HH:mm\" : \"dd MMM yyyy\";\n\n\tconst SUPPORTED_DATE_FORMATS = [\"yyyy-MM-dd\", \"dd-MM-yyyy\", \"dd/MM/yyyy\", \"dd MMM yyyy\", \"dd/MM/yy\"];\n\tfor (const format of SUPPORTED_DATE_FORMATS) {\n\t\tconst parsedDate = DateTime.fromFormat(date, format);\n\t\tif (parsedDate.isValid) {\n\t\t\treturn parsedDate.toFormat(outputFormat);\n\t\t}\n\t}\n\tconst ISO_DATE_REGEX = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$/;\n\tif (ISO_DATE_REGEX.test(date)) {\n\t\tconst parsedDate = DateTime.fromISO(date);\n\t\tif (parsedDate.isValid) {\n\t\t\treturn parsedDate.toFormat(outputFormat);\n\t\t}\n\t}\n\n\treturn date; // returns raw date if no format is matched\n}\n\nexport function truncate(string: string | null | undefined, maxLength: number): string {\n\tif (!string) return \"\";\n\tif (maxLength < 1) return string;\n\tif (string.length <= maxLength + 1) {\n\t\treturn string;\n\t}\n\treturn string.slice(0, maxLength).trim() + \"…\";\n}\n\nexport function truncateMiddle(string: string | null | undefined, maxLength: number): string {\n\tif (!string) return \"\";\n\tif (maxLength < 1) return string;\n\tif (string.length <= maxLength) return string;\n\tif (maxLength == 1) return string.substring(0, 1) + \"…\";\n\n\tconst midpoint = Math.ceil(string.length / 2);\n\tconst toremove = string.length - maxLength;\n\tconst lstrip = Math.ceil(toremove / 2);\n\tconst rstrip = toremove - lstrip;\n\treturn string.substring(0, midpoint - lstrip) + \"…\" + string.substring(midpoint + rstrip);\n}\n\nexport const getCurrencySymbol = (currency: string | null | undefined): string => {\n\treturn getAppContext().CURRENCY_SYMBOLS?.[currency || \"USD\"] || \"$\";\n};\n"],"names":["MaskInput","forwardRef","maskType","showThousandSeparator","allowDecimal","allowNegative","decimalLimit","integerLimit","prefix","sufix","currency","country","dataTest","controlledValue","defaultValue","max","min","onChange","onBlurProp","props","ref","orgData","useOrgStore","state","finalCountry","finalCurrency","currencySymbol","getCurrencySymbol","elementRef","useRef","isControlled","undefined","localeSeparators","useMemo","getLocaleSeparators","locale","parts","Intl","p","e","console","maskitoConfig","shouldAllowDecimal","calculatedDecimalLimit","calculatedSuffix","calculatedPrefix","calculatedIntegerLimit","integerLimitMax","Number","calculatedMax","Math","MAX_DECIMAL_INPUT","calculatedMin","numberParams","plugins","otherOpts","maskitoNumberOptionsGenerator","maskitoOptions","maskitoCaretGuard","value","maskitoEventHandler","element","maskitoUpdateElement","normalizeDisplayValue","useCallback","display","decimal","alternateDecimal","numberToDisplay","num","maskitoStringifyNumber","displayToNumber","parsed","maskitoParseNumber","isNaN","uncontrolledDisplayValue","setUncontrolledDisplayValue","useState","controlledDisplayDraft","setControlledDisplayDraft","wasControlledRef","useLayoutEffect","currentControlledDisplayDraft","displayValue","handleBlur","maskitoRef","useMaskito","setInputRef","node","useImperativeHandle","newDisplayValue","normalizeLeadingIntegerZeros","postfix","decimalSeparator","hasPrefix","Boolean","displayWithoutPrefix","hasPostfix","displayWithoutAffixes","sign","unsignedValue","decimalIndex","integerPart","fractionalPart","newNumericValue","canRoundTrip","dropdownSizes","styles","iconSizes","selectTextSizes","SelectDropdown","React","data","required","placeholder","disabled","onValueChange","className","size","variant","holder","document","cssClasses","clsx","service","useMachine","select","useId","api","normalizeProps","newValue","item","Box","Text","Icon","DynamicIcons","Portal","option","useUserProfile","create","useAppConfig","persist","set","new_currency","new_value","tone","mode","hide","appContext","loadAppContext","el","hex","key","json","decodedChars","bytes","b","parseInt","byte","i","String","JSON","getAppContext","Error","getFounderAppSetupContext","context","initializeCakeStores","authenticatedUser","httpLink","HttpLink","uri","options","response","fetch","window","apolloCache","InMemoryCache","networkStoreInitiaState","ApolloClient","axios","error","isFounderContext","userId","useServerSentEventsStore","items","RegExp","capitalizeString","string"],"mappings":"4LAmVAA,CAjPkBC,AAAAA,GAAAA,EAAAA,UAAAA,AAAAA,EACjB,CACC,CACCC,SAAAA,EAAW,QAAQ,CACnBC,sBAAAA,EAAwB,EAAI,CAC5BC,aAAAA,EAAe,EAAK,CACpBC,cAAAA,EAAgB,EAAI,CACpBC,aAAAA,CAAY,CACZC,aAAAA,CAAY,CACZC,OAAAA,CAAM,CACNC,MAAAA,CAAK,CACLC,SAAAA,CAAQ,CACRC,QAAAA,CAAO,CACPC,SAAAA,CAAQ,CACR,MAAOC,CAAe,CACtBC,aAAAA,CAAY,CACZC,IAAAA,CAAG,CACHC,IAAAA,CAAG,CACHC,SAAAA,CAAQ,CACR,OAAQC,CAAU,CAClB,GAAGC,EACa,CACjBC,KAEA,IAAMC,EAAUC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,EAAY,AAACC,GAAUA,EAAM,gBAAgB,EAEvDC,EAAeb,GAAWU,GAAS,SAAW,KAC9CI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