{
  "version": 3,
  "sources": ["../../../../packages/util-core/util-typescript-type-guards/lib/primitive-types.js", "../../../../packages/util-core/util-typescript-type-guards/lib/array-checks.js", "../../../../packages/util-core/util-typescript-type-guards/lib/strings.js", "../../../../packages/util-core/util-typescript-type-guards/lib/tuple-array-utils/excludeFromTuple.js", "../../../../packages/util-core/util-typescript-type-guards/lib/html-elements.js", "../../../../packages/util-core/util-typescript-type-guards/lib/utils.js", "../../../../packages/util-core/util-typescript-type-guards/lib/nested-props.js", "../../../../packages/util-core/util-typescript-type-guards/lib/tuple-array-utils/mapArrayToProp.js", "../../../../packages/util-core/util-typescript-type-guards/lib/tuple-array-utils/uniqueTupleValues.js", "../../../../packages/util-core/util-typescript-type-guards/lib/tuple-array-utils/convertArrayToPropIndexedObj.js", "../../../../src/assets/mcui-js/utils/check-local-storage-available.ts", "../../../../src/assets/mcui-js/utils/Logger/LoggerTags.ts", "../../../../src/assets/mcui-js/utils/Logger/WindowConsole.ts", "../../../../src/assets/mcui-js/utils/Logger/LoggerStyles.ts", "../../../../src/assets/mcui-js/utils/Logger/LoggerBinding.ts", "../../../../src/assets/mcui-js/utils/Logger/Logger.ts", "../../../../src/assets/mcui-js/marketo/base-form-logger.ts", "../../../../src/assets/mcui-js/marketo/types/definitions/gating/gating-level.ts", "../../../../src/assets/mcui-js/marketo/types/definitions/gating/gating-state.ts", "../../../../src/assets/mcui-js/marketo/form-settings/marketo-form/enabled-fields.ts", "../../../../src/assets/mcui-js/marketo/form-settings/marketo-form/marketo-form-setting.ts", "../../../../src/assets/mcui-js/marketo/form-settings/form-experience/create-experience-settings.ts", "../../../../src/assets/mcui-js/marketo/form-settings/form-experience/form-experience-settings.ts"],
  "sourcesContent": ["// The type definitions for this file are purposefully updated by hand in types.d.ts\n\nlet objToString = (value) => {\n    return Object.prototype.toString.call(value);\n};\n\nexport function isNull (value) {\n    return value === null;\n}\n\nexport function isUndefined(value) {\n    return value === undefined;\n}\n\nexport function isNil (value) {\n    return value == null;\n}\n\nexport function isNotNil(value) {\n    return value != null;\n}\n\nexport function isString (value) {\n    return typeof value === 'string';\n}\n\nexport function isSymbol(value) {\n    return typeof value === \"symbol\";\n}\n\nexport function isObject (value) {\n    return value != null && (typeof value === 'object');\n}\n\nexport function isDate (value){\n    return isObject(value) && value instanceof Date;\n}\n\nexport function isFunction(value) {\n    return typeof value === 'function';\n}\n\nexport function isRegExp (value) {\n    return isObject(value) && (objToString(value) === '[object RegExp]' || (value instanceof RegExp));\n}\n\nexport function isBoolean (value) {\n    return value === true || value === false;\n}\n\nexport function isNumber(value) {\n    return typeof value === 'number';\n}\n\nexport function isInt (value) {\n    return isNumber(value) && (value % 1) === 0;\n}\n\nexport function isUint (value) {\n    return isInt(value) && value > -1;\n}\n\n\nexport function hasPropertyWithType(value, prop, typeCheckFn) {\n    return isObject(value) && (prop in value) && typeCheckFn(value[prop]);\n}\n\n\nexport function isPropertyKey(value) {\n    return isString(value) || isUint(value) || isSymbol(value);\n}", "import { isString } from \"./primitive-types.js\";\n\n// The type definitions for this file are purposefully updated by hand in types.d.ts\n\nexport function isArray(value) {\n    return Array.isArray(value);\n}\n\nexport function isNotArray(value) {\n    return isArray(value) === false;\n}\n\nexport function isSingleItemArray(value) {\n    return isArray(value) && value.length === 1;\n}\n\nexport function isMultiItemArray(value) {\n    return isArray(value) && value.length > 1;\n}\n\nexport function isArrayOfType(value, typeCheckFunc) {\n    return isArray(value) && value.every(typeCheckFunc) === true;\n}\nexport function isStringArray(value) {\n    return isArrayOfType(value, isString);\n}", "import { isArray } from \"./array-checks.js\";\nimport { isNil, isString } from \"./primitive-types.js\";\n\nexport function convertCamelToKebabCase(str) {\n  return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (x, sep) => (sep ? \"-\" : \"\") + x.toLowerCase());\n}\n\nexport function convertKebabToCamelCase(str) {\n  return str.replace(/-./g, (x) => x[1].toUpperCase());\n}\n\nexport function convertToPascalCase(str) {\n  return str\n    .replace(/[ _-]([^ _-])/g, x => x[1].toUpperCase()) // Capitalize char after space, -, or _\n    .replace(/[^.]/, x => x[0].toUpperCase()); // Capitalize first char\n}\n\nexport function isEmptyString(value) {\n  return value === \"\";\n}\n\nexport function isNilOrEmptyString(value) {\n  return isNil(value) || isEmptyString(value);\n}\n\nexport function isStringLiteralOfType(value, possibleValues) {\n  return isArray(possibleValues) && isString(value) && possibleValues.includes(value);\n}", "\nexport function excludeFrom(arr, ...exclusions) {\n  const result = arr.filter((a) => !exclusions.includes(a));\n  return Object.isFrozen(arr) ? Object.freeze(result) : result;\n}", "import { isObject } from \"./primitive-types.js\";\n\nexport function isAnyHTMLInputElementType(value) {\n  return isObject(value) && (\n    (value instanceof HTMLButtonElement) ||\n    (value instanceof HTMLInputElement) ||\n    (value instanceof HTMLSelectElement) ||\n    (value instanceof HTMLTextAreaElement));\n}", "import { numbersFromZeroToMaxTuple } from \"./numbersFromZeroToMax.js\";\nimport { isFunction, isNil, isObject, isPropertyKey, isString } from \"./primitive-types.js\";\nimport { convertKebabToCamelCase, isEmptyString } from \"./strings.js\";\n\n\nexport function fromEntriesTyped(entries) {\n  return Object.fromEntries(entries);\n}\n\n\n/**\n * @param {unknown} value \n * @returns {[...number[]]}\n */\nexport function getTupleIndicesTuple(value) {\n  if (value && typeof value === \"object\" && \"length\" in value && typeof value.length === \"number\") {\n    return numbersFromZeroToMaxTuple(value.length);\n  }\n  return [];\n}\n\n/** @type {reverseObjectMapOfArrayIndices} */\nexport function reverseObjectMapOfArrayIndices(value) {\n  const tupleIndices = getTupleIndicesTuple(value);\n  const reversedKeyObj = tupleIndices.reduce((result, idx) => {\n    const valAtIdx = value[idx];\n    if (!isPropertyKey(valAtIdx)) {\n      throw new Error(`Value at index is not a valid property key: ${valAtIdx ?? ''}`);\n    }\n    result[valAtIdx] = idx;\n    return result;\n  }, {});\n  return reversedKeyObj;\n}\nexport function createReverseObjectMap(value) {\n  if (isObject(value)) {\n    const keys = Object.keys(value);\n    return Object.fromEntries(\n      keys.map(k => {\n        const val = value[k];\n        return [val, k];\n      })\n    );\n  }\n  throw new Error(\"Parameter 'value' is not an object\");\n}\n\nexport function exhaustiveGuard(value, message = \"ERROR! Reached forbidden guard function with unexpected value\") {\n  throw new Error(`${message}: ${JSON.stringify(value)}`);\n}\n\nexport function createEnumFromKeys(keys, camelCaseProps = true) {\n  camelCaseProps ??= true;\n  return keys.reduce((result, key) => {\n    const k = (camelCaseProps ? convertKebabToCamelCase(key) : key);\n    result[k] = key;\n    return result;\n  }, {});\n}\n\nexport function getTypedObjectKeys(obj) {\n  return Object.keys(obj);\n}\n\n\nfunction checkIsNilOrWhitespaceAfterTrim(value) {\n  return (isNil(value) || (isString(value) && isEmptyString(value.trim())));\n}\nexport function defaultIfNilOrWhiteSpace(value, ...options) {\n  if (checkIsNilOrWhitespaceAfterTrim(value) === false) {\n    return value;\n  }\n  const numDefaults = options.length;\n  // eslint-disable-next-line no-undef-init\n  let returnVal = undefined;\n  for (let i = 0; i < numDefaults; i++){\n    let curOptions = options[i];\n    let { getter, defaultValue } = curOptions;\n    returnVal = isFunction(getter) ? getter() : defaultValue; \n    if (checkIsNilOrWhitespaceAfterTrim(returnVal) === false) {\n      break;\n    }\n  }\n  return returnVal;\n}\n\n", "\n\n\nexport function getValueFromPropsPath(item, path, valueIfPathInvalid) {\n  let curValue = item;\n  for (const prop of path) {\n    if (prop in curValue) {\n      curValue = item[prop];\n    }\n    else {\n      return valueIfPathInvalid;\n    }\n  }\n  return curValue;\n}", "import { getValueFromPropsPath } from \"../nested-props.js\";\n\nexport function mapArrayToProp(array, prop) {\n  return array.map((el) => {\n    return el[prop];\n  });\n}\n\nexport function flatMapArrayToProp(array, prop) {\n  return array.flatMap((el) => {\n    return el[prop];\n  });\n}\n\nexport function mapArrayToNestedProp(array, path, defaultIfNever) {\n  return array.map((el) => {\n    return getValueFromPropsPath(el, path, defaultIfNever);\n  });\n}\n\nexport function flatMapArrayToNestedProp(array, path, defaultIfNever) {\n  return array.flatMap((el) => {\n    return getValueFromPropsPath(el, path, defaultIfNever);\n  });\n}", "\nexport function uniqueTupleValues(array) {\n  return array.filter((v, i) => {\n    return i === array.indexOf(v);\n  });\n}", "import { getValueFromPropsPath } from \"../nested-props.js\";\n\nexport function convertArrayToPropIndexedObject (array, indexBy) {\n  const propIndexedObj = array.reduce((result, item) => {\n    const propValue = item[indexBy];\n    return Object.assign(result, { [propValue]: item });\n  }, {});\n  return propIndexedObj;\n}\n\n\nexport function convertArrayToDeepPropIndexedObject(array, indexByPath) {\n  return array.reduce((result, item) => {\n    const propValue = getValueFromPropsPath(item, indexByPath, []);\n    if (Array.isArray(propValue)) {\n      return Object.assign(result, propValue.reduce((innerResult, key) => {\n        return Object.assign(innerResult, { [key]: item });\n      }, {}));\n    }\n    else {\n      return Object.assign(result, { [propValue]: item });\n    }\n  }, {});\n}", "import type { Nil } from \"@mcwd/typescript-type-guards\";\r\n\r\nexport function checkLocalStorageAvailable() {\r\n  let storage: typeof window[\"localStorage\"] | Nil = null;\r\n  try {\r\n    storage = window.localStorage;\r\n    const x = \"__storage_test__\";\r\n    storage.setItem(x, x);\r\n    storage.removeItem(x);\r\n    return true;\r\n  } catch (e) {\r\n    return (\r\n      e instanceof DOMException &&\r\n      // everything except Firefox\r\n      (e.code === 22 ||\r\n        // Firefox\r\n        e.code === 1014 ||\r\n        // test name field too, because code might not be present\r\n        // everything except Firefox\r\n        e.name === \"QuotaExceededError\" ||\r\n        // Firefox\r\n        e.name === \"NS_ERROR_DOM_QUOTA_REACHED\") &&\r\n      // acknowledge QuotaExceededError only if there's something already stored\r\n      storage &&\r\n      storage.length !== 0\r\n    );\r\n  }\r\n}", "import { isNil, isNull, isUndefined, isObject, isString, isStringArray, type Nil } from \"@mcwd/typescript-type-guards\";\r\nimport type { ILogger } from \"./ILogger.js\";\r\nimport { checkLocalStorageAvailable } from \"../check-local-storage-available.js\";\r\n\r\n\r\nexport type TagsRecord<T extends (string | string[] | null) = string[]> = Record<string, T>;\r\n\r\nfunction parseTagsObjFromLocalStorage(propName: string, localStorageTagsString: string): TagsRecord<string[] | null> | Nil  {\r\n    try {\r\n        const localStorageTags = JSON.parse(localStorageTagsString) as unknown;\r\n        if (isObject(localStorageTags)) {\r\n            const localStorageTagKeys = Object.keys(localStorageTags);\r\n            if (localStorageTagKeys.length > 0 && localStorageTagKeys.every(k => (isStringArray(localStorageTags[k]) || isNull(localStorageTags[k])))) {\r\n                return (localStorageTags as TagsRecord<string[] | null>);\r\n            }\r\n        }\r\n    }\r\n    catch {\r\n        window.localStorage.removeItem(propName);\r\n    }\r\n    return null;\r\n}\r\nfunction readPropFromLocalStorage(propName: string): TagsRecord<string[] | null> | Nil {\r\n    try {\r\n        if (checkLocalStorageAvailable()) {\r\n            const localStorageTagsString = window.localStorage.getItem(propName);\r\n            if (isString(localStorageTagsString)) {\r\n                return parseTagsObjFromLocalStorage(propName, localStorageTagsString);\r\n            }\r\n        }\r\n    }\r\n    catch { return null; }\r\n    return null;\r\n}\r\n\r\nfunction saveValueToLocalStorage(propName: string, value: TagsRecord<string[] | null>, saveToLocalStorage: boolean) {\r\n    try {\r\n        if (saveToLocalStorage && Object.keys(value).length > 0 && checkLocalStorageAvailable()) {\r\n            window.localStorage.setItem(propName, JSON.stringify(value));\r\n        }\r\n    }\r\n    // eslint-disable-next-line no-empty\r\n    catch { }\r\n}\r\n\r\nfunction removeValueFromLocalStorage(propName: string) {\r\n    try {\r\n        if (checkLocalStorageAvailable()) {\r\n            window.localStorage.removeItem(propName);\r\n        }\r\n    }\r\n    // eslint-disable-next-line no-empty\r\n    catch { }\r\n}\r\n\r\ntype MergeTagsFunction<T extends string[] | string | null> = (key: string, valOne: T | undefined, valTwo: T | undefined) => T | undefined;\r\nfunction mergeTagsObjects<T extends string[] | string | null>(tagsObjOne: TagsRecord<T>, tagsObjTwo: TagsRecord<T>, mergeFunc: MergeTagsFunction<T>) {\r\n    const allKeys = [... new Set([...Object.keys(tagsObjOne), ...Object.keys(tagsObjTwo)])];\r\n    if (allKeys.length > 0) {\r\n        const newTagsObj: TagsRecord<T> = {};\r\n        for (const key of allKeys) {\r\n            const propMergeRes = mergeFunc(key, tagsObjOne[key], tagsObjTwo[key]);\r\n            if (isUndefined(propMergeRes) === false) {\r\n                newTagsObj[key] = propMergeRes as Exclude<T, undefined>;\r\n            }\r\n        }\r\n        return newTagsObj;\r\n    }\r\n    return {};\r\n}\r\n\r\nfunction mergeInitialWithLocalStorageValue(initialValue: TagsRecord<string[]>, localStorageVal: TagsRecord<string[] | null>, removeExtraTagsFromInitial: boolean) {\r\n    return mergeTagsObjects<string[] | null>(initialValue, localStorageVal, (key, valOne, valTwo) => {\r\n        if (isUndefined(valTwo) === false) {\r\n            if (isStringArray(valOne) && isStringArray(valTwo)) {\r\n                if (removeExtraTagsFromInitial) {\r\n                    return valOne.filter(el => valTwo.includes(el));\r\n                }\r\n                else {\r\n                    return [... new Set([...valOne, ...valTwo])];\r\n                }\r\n            }\r\n            return valTwo as string[] | null;\r\n        }\r\n        return valOne as undefined | string[];\r\n    });\r\n}\r\n\r\nfunction definePropOnWindow(propName: string, removeExtraTagsFromInitial: boolean) {\r\n    const propDescriptor = Object.getOwnPropertyDescriptor(window, propName);\r\n    const initialValue = ((isObject(propDescriptor) && propDescriptor.writable)\r\n        ? window[propName]\r\n        : {}) as TagsRecord<string[]>;\r\n\r\n    if (isNil(propDescriptor) || propDescriptor.writable) {\r\n        const localStorageVal = readPropFromLocalStorage(propName);\r\n        const mergedValue: TagsRecord<string[] | null> = isObject(localStorageVal)\r\n            ? mergeInitialWithLocalStorageValue(initialValue, localStorageVal, removeExtraTagsFromInitial)\r\n            : initialValue;\r\n        Object.defineProperty(window, propName, {\r\n            value: { ...mergedValue },\r\n            writable: false,\r\n            configurable: false,\r\n            enumerable: true\r\n        });\r\n    }\r\n}\r\n\r\ndefinePropOnWindow(\"__loggerFilteredTags\", false);\r\ndefinePropOnWindow(\"__loggerFilteredTagsOverride\", true);\r\n\r\ntype WindowWithLoggerFilters = typeof window & {\r\n    __loggerFilteredTags: TagsRecord<string[] | null>,\r\n    __loggerFilteredTagsOverride: TagsRecord<string[] | null>,\r\n    __loggerFilter: {\r\n        getLoggerFilter: typeof getLoggerFilter,\r\n        addLoggerFilter: typeof addLoggerFilter,\r\n        removeLoggerFilter: typeof removeLoggerFilter\r\n        getLoggerFilterOverride: typeof getLoggerFilterOverride,\r\n        addLoggerFilterOverride: typeof addLoggerFilterOverride,\r\n        removeLoggerFilterOverride: typeof removeLoggerFilterOverride\r\n    }\r\n}\r\n\r\nfunction parseTagsObj<T extends string | string[] | null>(obj: TagsRecord<T>): TagsRecord<string[] | null> {\r\n    const objKeys = Object.keys(obj);\r\n    for (const k of objKeys) {\r\n        if (isString(obj[k])) {\r\n            obj[k] = [obj[k]] as T;\r\n        }\r\n        if ((isStringArray(obj[k]) || isNull(obj[k])) === false) {\r\n            console.error(`Tags obj array for prop \"${k}\" is not null or a string array! Removing values!`, obj[k]);\r\n            delete obj[k];\r\n        }\r\n    }\r\n    return obj as TagsRecord<string[] | null>;\r\n}\r\n\r\nfunction addTagsToTagsObj(obj: TagsRecord<string | string[] | null>, newTags: TagsRecord<string | string[] | null>) {\r\n    const newKeys = Object.keys(newTags);\r\n    for (const k of newKeys) {\r\n        if (isString(newTags[k])) {\r\n            newTags[k] = [newTags[k]] as string[];\r\n        }\r\n        if (newTags[k] === null) {\r\n            obj[k] = null;\r\n        }\r\n        else {\r\n            if (isString(obj[k])) {\r\n                obj[k] = [obj[k]] as string[];\r\n            }\r\n            obj[k] ??= [];\r\n            const tagsToAdd = (newTags[k] as string[]).filter(t => (obj[k] as string[]).includes(t) === false);\r\n            obj[k] = [...(obj[k] as string[]), ...tagsToAdd];\r\n        }\r\n    }\r\n}\r\n\r\nfunction removeTagsFromTagsObj(obj: TagsRecord<null | string | string[]>, tagsToRemove: string | TagsRecord<null | string | string[]>) {\r\n    if (isString(tagsToRemove)) {\r\n        delete obj[tagsToRemove];\r\n    }\r\n    else {\r\n        const keys = Object.keys(tagsToRemove);\r\n        for (const k of keys) {\r\n            const tagsToRemoveVal = [tagsToRemove[k]].flat();\r\n            if (isString(obj[k])) {\r\n                obj[k] = [obj[k] as string];\r\n            }\r\n            if (isNull(obj[k])) {\r\n                if (isNull(tagsToRemove[k])) {\r\n                    delete obj[k];\r\n                }\r\n                continue;\r\n            }\r\n            obj[k] = (obj[k] as string[]).filter(item => (tagsToRemoveVal.includes(item) === false));\r\n        }\r\n    }\r\n}\r\n\r\nexport function getLoggerFilter(): TagsRecord<string[] | null> {\r\n    const dTags = (window as WindowWithLoggerFilters).__loggerFilteredTags;\r\n    return { ...parseTagsObj(dTags) };\r\n}\r\n\r\nexport function addLoggerFilter(filteredTags: TagsRecord<null | string | string[]>, saveToLocalStorage: boolean) {\r\n    const dTags = (window as WindowWithLoggerFilters).__loggerFilteredTags;\r\n    addTagsToTagsObj(dTags, filteredTags);\r\n    saveValueToLocalStorage(\"__loggerFilteredTags\", dTags, saveToLocalStorage);\r\n}\r\n\r\nexport function removeLoggerFilter(tagName: string): void;\r\nexport function removeLoggerFilter(tagsToRemove: TagsRecord<string | string[] | null>): void;\r\nexport function removeLoggerFilter(tagsToRemove: string | TagsRecord<string | string[] | null>): void;\r\nexport function removeLoggerFilter(tagsToRemove: string | TagsRecord<string | string[] | null>): void {\r\n    const dTags = (window as WindowWithLoggerFilters).__loggerFilteredTags;\r\n    removeTagsFromTagsObj(dTags, tagsToRemove);\r\n    saveValueToLocalStorage(\"__loggerFilteredTags\", dTags, true);\r\n}\r\n\r\nexport function getLoggerFilterOverride(): TagsRecord<string[] | null> {\r\n    const overrides = (window as WindowWithLoggerFilters).__loggerFilteredTagsOverride;\r\n    return { ...parseTagsObj(overrides) } as TagsRecord<string[] | null>;\r\n}\r\n\r\nexport function addLoggerFilterOverride(filteredTagsOverride: TagsRecord<string | string[] | null>, saveToLocalStorage: boolean) {\r\n    const overrides = (window as WindowWithLoggerFilters).__loggerFilteredTagsOverride;\r\n    addTagsToTagsObj(overrides, filteredTagsOverride);\r\n    saveValueToLocalStorage(\"__loggerFilteredTagsOverride\", overrides, saveToLocalStorage);\r\n}\r\n\r\nexport function removeLoggerFilterOverride(tagName: string);\r\nexport function removeLoggerFilterOverride(tagsToRemove: TagsRecord<string | string[] | null>);\r\nexport function removeLoggerFilterOverride(tagsToRemove: string | TagsRecord<string | string[] | null>);\r\nexport function removeLoggerFilterOverride(tagsToRemove: string | TagsRecord<string | string[] | null>) {\r\n    const overrides = (window as WindowWithLoggerFilters).__loggerFilteredTagsOverride;\r\n    removeTagsFromTagsObj(overrides, tagsToRemove);\r\n    saveValueToLocalStorage(\"__loggerFilteredTagsOverride\", overrides, true);\r\n}\r\n\r\nexport function resetLoggerFilter() {\r\n    const dTags = (window as WindowWithLoggerFilters).__loggerFilteredTags;\r\n    const keys = Object.keys(dTags);\r\n\r\n    for (const k of keys) {\r\n        delete dTags[k];\r\n    }\r\n    removeValueFromLocalStorage(\"__loggerFilteredTags\");\r\n\r\n    const overrides = (window as WindowWithLoggerFilters).__loggerFilteredTagsOverride;\r\n    const oKeys = Object.keys(overrides);\r\n    for (const k of oKeys) {\r\n        delete overrides[k];\r\n    }\r\n    removeValueFromLocalStorage(\"__loggerFilteredTagsOverride\");\r\n}\r\n\r\nexport function checkLoggerIsFiltered(logger: ILogger):boolean {\r\n    const tags = logger.tags;\r\n    const filteredTags = getLoggerFilter();\r\n    const overrides = getLoggerFilterOverride();\r\n    return Object.keys(tags).some(k => {\r\n        const tagVal: string[] = [tags[k]].flat();\r\n        const filteredVal: string[] = filteredTags[k] ?? [];\r\n        const overrideVal: string[] = (overrides[k]) ?? [];\r\n        if (overrideVal.includes(\"*\") || tagVal.some(t => overrideVal.includes(t))) {\r\n            return false;\r\n        }\r\n        return filteredVal.includes(\"*\") || tagVal.some(t => filteredVal.includes(t));\r\n    });\r\n}\r\n\r\n(window as WindowWithLoggerFilters).__loggerFilter = Object.freeze({\r\n    getLoggerFilter,\r\n    addLoggerFilter: (filteredTags: TagsRecord<null | string | string[]>, saveToLocalStorage = true) => addLoggerFilter(filteredTags, saveToLocalStorage),\r\n    removeLoggerFilter,\r\n    getLoggerFilterOverride,\r\n    addLoggerFilterOverride: (filteredTagsOverride: TagsRecord<null | string | string[]>, saveToLocalStorage = true) => addLoggerFilterOverride(filteredTagsOverride, saveToLocalStorage),\r\n    removeLoggerFilterOverride\r\n});", "export const WindowConsole = window.console;\r\nexport type WindowConsole = typeof WindowConsole;\r\n\r\nexport type WindowConsoleFunctionKeys = {\r\n    [K in keyof WindowConsole]: (WindowConsole[K] extends (...args: any[]) => any ? K : never);\r\n}[keyof WindowConsole];\r\n\r\nexport const ConsoleLoggingLevels = [\"debug\", \"info\", \"warn\", \"error\"] as const;\r\nexport type ConsoleLoggingLevels = typeof ConsoleLoggingLevels[number];\r\n\r\nexport const BasicConsoleFnKeys = [\"debug\", \"dirxml\", \"error\", \"group\", \"groupCollapsed\", \"info\", \"log\", \"trace\", \"warn\"] as const;\r\nexport type BasicConsoleFnKeys = typeof BasicConsoleFnKeys[number];", "import { isNotNil, isObject, isString } from \"@mcwd/typescript-type-guards\";\r\nimport type { LoggerCss } from \"./LoggerCss.js\";\r\nimport { ConsoleLoggingLevels } from \"./WindowConsole.js\";\r\n\r\nexport function getStringFromStyleObject(stylesObj: LoggerCss) {\r\n    let cssStyles = \"\";\r\n\r\n    for (const styleProp of Object.keys(stylesObj)) {\r\n        cssStyles += `${styleProp}: ${stylesObj[styleProp] as string};`;\r\n    }\r\n    return cssStyles;\r\n}\r\n\r\nexport const BasicButtonLabelStyle = Object.freeze({\r\n    color: \"white\",\r\n    \"font-size\": \"10px\",\r\n    \"line-height\": \"10px\",\r\n    \"font-family\": \"'Helvetica', 'Arial', sans-serif\",\r\n    padding: \"3px\",\r\n    \"margin-right\": \"5px\",\r\n    \"border-radius\": \"3px\",\r\n    border: \"1px solid black\",\r\n} as const) satisfies LoggerCss;\r\n\r\nconst LoggerLevelColors = {\r\n    info: \"#40F99B\",\r\n    debug: \"#6EF9F5\",\r\n    warn: \"#FBB13C\",\r\n    error: \"#D64933\"\r\n}  as const satisfies Record<ConsoleLoggingLevels, string>;\r\n\r\nconst LoggerLevelLabelStyle: LoggerCss = Object.freeze({\r\n    \"border-radius\": \"3px\",\r\n    \"background\": \"#282828\",\r\n    \"font-family\": `\"Courier New\", Courier, \"Lucida Sans Typewriter\", \"Lucida Typewriter\", monospace`,\r\n    \"font-size\": \"10px\",\r\n    \"padding\": \"2px\",\r\n    \"margin-right\": \"5px\"\r\n});\r\n\r\nexport function getLevelLabelStyle(level: ConsoleLoggingLevels): string {\r\n    const color = LoggerLevelColors[level] ?? \"white\";\r\n    return getStringFromStyleObject({ ... LoggerLevelLabelStyle, color });\r\n}\r\n\r\nexport function getStyledMessageArgs({ level, messages, styles, formattingSuffix }: {\r\n    level: ConsoleLoggingLevels,\r\n    messages: string[],\r\n    styles: LoggerCss[],\r\n    formattingSuffix?: string | undefined\r\n}): string[]\r\n{\r\n    formattingSuffix ??= \"\";\r\n    let firstArg = \"\";\r\n    const remainingArgsArr: string[] = [];\r\n\r\n    if (ConsoleLoggingLevels.includes(level)) {\r\n        firstArg += \"%c%s\";\r\n        remainingArgsArr.push(getLevelLabelStyle(level));\r\n        remainingArgsArr.push(level);\r\n    }\r\n\r\n    const argLengthDifference = messages.length - styles.length;\r\n    if (argLengthDifference < -1) {\r\n        throw new Error(\"Too many LoggerCss objects provided\");\r\n    }\r\n    \r\n    const maxMessagesOrStyles = Math.max(messages.length, styles.length);\r\n    for (let i = 0; i < maxMessagesOrStyles; i++) {\r\n        const msg = (messages.length >= i) ? messages[i] : null;\r\n        const styleObj = (styles.length >= i) ? styles[i] : null;\r\n        const styleCss = isObject(styleObj) ? getStringFromStyleObject(styleObj) : null;\r\n        if (isNotNil(styleCss)) {\r\n            firstArg += \"%c\";\r\n            remainingArgsArr.push(styleCss);\r\n        }\r\n        if (isString(msg)) {\r\n            firstArg += \"%s\";\r\n            remainingArgsArr.push(msg);\r\n        }\r\n    }\r\n    return [firstArg + formattingSuffix, ...remainingArgsArr];\r\n}", "import type { ILogger } from \"./ILogger.js\";\r\nimport { getStyledMessageArgs } from \"./LoggerStyles.js\";\r\nimport { WindowConsole, type ConsoleLoggingLevels, type WindowConsoleFunctionKeys } from \"./WindowConsole.js\";\r\n\r\nexport function getLoggerPrefixArgs(logger: ILogger, level: ConsoleLoggingLevels): string[] {\r\n    return getStyledMessageArgs({ level, messages: [... logger.prefixes], styles: [... logger.prefixStyles] });\r\n}\r\n\r\nexport function getConsoleFn<TFnName extends WindowConsoleFunctionKeys>(fnName: TFnName): WindowConsole[TFnName] {\r\n    if (fnName in WindowConsole) {\r\n        return WindowConsole[fnName];\r\n    }\r\n    else {\r\n        throw new Error(`${fnName} is NOT a function`);\r\n    }\r\n}\r\n\r\nexport function getBoundConsoleFn<TFnName extends WindowConsoleFunctionKeys>(fnName: TFnName, ...args: any[]): WindowConsole[TFnName] {\r\n    return getConsoleFn(fnName).bind(WindowConsole, ...args);\r\n}", "import type { LoggerCss } from \"./LoggerCss.js\";\r\nimport { addLoggerFilter, checkLoggerIsFiltered, getLoggerFilter, getLoggerFilterOverride, addLoggerFilterOverride, resetLoggerFilter, removeLoggerFilter, type TagsRecord } from \"./LoggerTags.js\";\r\nimport type { LoggerTags } from \"./LoggerTagsType.js\";\r\nimport type { ILogger } from \"./ILogger.js\";\r\nimport type { LoggerFnBindArgs } from \"./LoggerBindingTypes.js\";\r\nimport { getBoundConsoleFn, getLoggerPrefixArgs } from \"./LoggerBinding.js\";\r\nimport { isObject, isString } from \"@mcwd/typescript-type-guards\";\r\nimport { ConsoleLoggingLevels, BasicConsoleFnKeys, WindowConsole, type WindowConsoleFunctionKeys } from \"./WindowConsole.js\";\r\nimport { BasicButtonLabelStyle, getStyledMessageArgs } from \"./LoggerStyles.js\";\r\n\r\nfunction getBoundLoggerFnOrNoop<TFnName extends WindowConsoleFunctionKeys>(logger: ILogger, fnName: TFnName, ...args: any[]) {\r\n    if ((BasicConsoleFnKeys as readonly string[]).includes(fnName)) {\r\n        const level = ConsoleLoggingLevels.includes(fnName as ConsoleLoggingLevels) ? fnName as ConsoleLoggingLevels : \"info\";\r\n        logger = logger.withTags({ level, logFn: fnName });\r\n    }\r\n    else {\r\n        logger = logger.withTags({ logFn: fnName });\r\n    }\r\n    \r\n    if (logger.checkLoggerIsFiltered()) {\r\n        return (() => {});\r\n    }\r\n    return getBoundConsoleFn(fnName, ...args);\r\n}\r\n\r\nfunction getBoundLoggerFnFromPrefixArgs<TFnName extends BasicConsoleFnKeys>(logger: ILogger, fnName: TFnName) {\r\n    const level = (ConsoleLoggingLevels as readonly string[]).includes(fnName) ? fnName as ConsoleLoggingLevels : \"info\";\r\n    return getBoundLoggerFnOrNoop(logger, fnName, ... getLoggerPrefixArgs(logger, level));\r\n}\r\n\r\nexport class Logger implements ILogger {\r\n    #prefixes: string[];\r\n    #prefixStyles: LoggerCss[];\r\n    #tags: LoggerTags;\r\n\r\n    static #allUsedTags: TagsRecord<string[]> = {};\r\n    \r\n    static #addToUsedTags(tags: LoggerTags) {\r\n        for (const k of Object.keys(tags)) {\r\n            if (!(k in this.#allUsedTags)) {\r\n                Logger.#allUsedTags[k] = [];\r\n            }\r\n            tags[k] = (isString(tags[k]) ? [tags[k]] : tags[k]) as string[];\r\n            for (const item of tags[k]){\r\n                if (Logger.#allUsedTags[k].includes(item) === false) {\r\n                    Logger.#allUsedTags[k].push(item);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    static get allUsedTags() {\r\n        return Logger.#allUsedTags;\r\n    }\r\n\r\n    constructor({ tags, prefixStrings, prefixStyles }: { tags: LoggerTags, prefixStrings?: string[], prefixStyles?: LoggerCss[] }) {\r\n        this.#tags = { ...tags };\r\n        this.#prefixes = prefixStrings ?? [];\r\n        this.#prefixStyles = prefixStyles ?? [];\r\n        Logger.#addToUsedTags(tags);\r\n    }\r\n\r\n    /** Used to toggle loggers on and off globally when any of the tag values matches what is enabled/disabled globally */\r\n    get tags(): LoggerTags {\r\n        return { ... this.#tags };\r\n    }\r\n\r\n    get prefixes() {\r\n        return Object.freeze([... this.#prefixes]);\r\n    }\r\n\r\n    get prefixStyles() {\r\n        return Object.freeze([... this.#prefixStyles]);\r\n    }\r\n\r\n    static getFilters(): TagsRecord<string | string[] | null> {\r\n        return getLoggerFilter();\r\n    }\r\n\r\n    static addFilters(filteredTags: TagsRecord<string | string[] | null>) {\r\n        addLoggerFilter(filteredTags, true);\r\n    }\r\n\r\n    static removeFilters(tagsToRemove: string | TagsRecord<string | string[] | null>) {\r\n        removeLoggerFilter(tagsToRemove);\r\n    }\r\n\r\n    /**\r\n     * filtered tag overrides are used to remove specific tags from the logger filters when a wildcard is used\r\n     */\r\n    static getFilterOverrides(): TagsRecord<string[] | null> {\r\n        return getLoggerFilterOverride();\r\n    }\r\n\r\n    /**\r\n     * filtered tag overrides are used to remove specific tags from the logger filters when a wildcard is used\r\n     */\r\n    static setFilterOverrides(filteredTagsOverride: TagsRecord<string | string[] | null>) {\r\n        addLoggerFilterOverride(filteredTagsOverride, true);\r\n    }\r\n\r\n    checkLoggerIsFiltered() {\r\n        return checkLoggerIsFiltered(this);\r\n    }\r\n\r\n    static resetLoggerFilter() {\r\n        resetLoggerFilter();\r\n    }\r\n\r\n    withTags(tags: Record<string, string>) {\r\n        return new Logger({\r\n            tags: { ...this.tags, ...tags },\r\n            prefixStrings: [...this.prefixes],\r\n            prefixStyles: [...this.prefixStyles]\r\n        });\r\n    }\r\n\r\n    getChildLogger({ tags, prefixStrings, prefixStyles }: { tags?: Record<string, string>, prefixStrings?: string[], prefixStyles?: LoggerCss[] } = {}) {\r\n        return new Logger({\r\n            tags: { ...this.tags, ...(tags ?? {}) },\r\n            prefixStrings: [...this.#prefixes, ... (prefixStrings ?? [])],\r\n            prefixStyles: [...this.#prefixStyles, ...(prefixStyles ?? [])]\r\n        });\r\n    }\r\n\r\n    #getFnWithBoundArgs<TFnName extends BasicConsoleFnKeys>(\r\n        { fnName, style = \"reset\", formatString: formattingSuffix }: { fnName: TFnName } & LoggerFnBindArgs\r\n    ): ILogger[TFnName] {\r\n        const styles = [...this.#prefixStyles];\r\n        if (isObject(style)) {\r\n            styles.push(style);\r\n        }\r\n        // If style === 'reset': reset the log css (this is only needed if a format string is provided)\r\n        else if (style === \"reset\" && isString(formattingSuffix) && formattingSuffix.trim() !== \"\") {\r\n            // Add empty log style object which adds an empty string to the log parameters to set the css placeholder to nothing.\r\n            styles.push({});\r\n        }\r\n        // All function names that don't match a log level, will log at the \"info\" level\r\n        const level = ConsoleLoggingLevels.includes(fnName as ConsoleLoggingLevels)\r\n            ? fnName as ConsoleLoggingLevels\r\n            : \"info\";\r\n\r\n        const logFnBoundArgs = getStyledMessageArgs({ level, messages: this.#prefixes, styles, formattingSuffix });\r\n        return getBoundLoggerFnOrNoop(this, fnName, ...logFnBoundArgs);\r\n    }\r\n\r\n    bindDebugOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"debug\", ...opts }); }\r\n    bindDirxmlOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"dirxml\", ...opts }); }\r\n    bindErrorOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"error\", ...opts }); }\r\n    bindGroupOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"group\", ...opts }); }\r\n    bindGroupCollapsedOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"groupCollapsed\", ...opts }); }\r\n    bindInfoOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"info\", ...opts }); }\r\n    bindLogOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"log\", ...opts }); }\r\n    bindTraceOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"trace\", ...opts }); }\r\n    bindWarnOptions(opts: LoggerFnBindArgs) { return this.#getFnWithBoundArgs({ fnName: \"warn\", ...opts }); }\r\n\r\n    get assert() { return getBoundLoggerFnOrNoop(this, \"assert\"); }\r\n    get clear() { return getBoundLoggerFnOrNoop(this,\"clear\"); }\r\n    get count() { return getBoundLoggerFnOrNoop(this,\"count\"); }\r\n    get countReset() { return getBoundLoggerFnOrNoop(this,\"countReset\"); }\r\n    get dir() { return getBoundLoggerFnOrNoop(this,\"dir\"); }\r\n    get groupEnd() { return getBoundLoggerFnOrNoop(this,\"groupEnd\"); }\r\n    get table() { return getBoundLoggerFnOrNoop(this,\"table\"); }\r\n    get time() { return getBoundLoggerFnOrNoop(this,\"time\"); }\r\n    get timeEnd() { return getBoundLoggerFnOrNoop(this,\"timeEnd\"); }\r\n    get timeLog() { return getBoundLoggerFnOrNoop(this,\"timeLog\"); }\r\n    get timeStamp() { return getBoundLoggerFnOrNoop(this,\"timeStamp\"); }\r\n\r\n    get debug(): WindowConsole[\"debug\"] { return getBoundLoggerFnFromPrefixArgs(this, \"debug\"); }\r\n    get dirxml(): WindowConsole[\"dirxml\"] { return getBoundLoggerFnFromPrefixArgs(this, \"dirxml\"); }\r\n    get error(): WindowConsole[\"error\"] { return getBoundLoggerFnFromPrefixArgs(this, \"error\"); }\r\n    get group(): WindowConsole[\"group\"] { return getBoundLoggerFnFromPrefixArgs(this, \"group\"); }\r\n    get groupCollapsed(): WindowConsole[\"groupCollapsed\"] { return getBoundLoggerFnFromPrefixArgs(this, \"groupCollapsed\"); }\r\n    get info(): WindowConsole[\"info\"] { return getBoundLoggerFnFromPrefixArgs(this, \"info\"); }\r\n    get log(): WindowConsole[\"log\"] { return getBoundLoggerFnFromPrefixArgs(this, \"log\"); }\r\n    get trace(): WindowConsole[\"trace\"] { return getBoundLoggerFnFromPrefixArgs(this, \"trace\"); }\r\n    get warn(): WindowConsole[\"warn\"] { return getBoundLoggerFnFromPrefixArgs(this, \"warn\"); }\r\n\r\n    static #stylePresets = Object.freeze({\r\n        ButtonLabel(styles?: LoggerCss) {\r\n            return Object.freeze({\r\n                ...BasicButtonLabelStyle,\r\n                ...(styles ?? {})\r\n            });\r\n        }\r\n    }) satisfies Record<string, (styles?: LoggerCss) => LoggerCss>;\r\n\r\n    static get StylePresets() {\r\n        return this.#stylePresets;\r\n    }\r\n}\r\n\r\naddLoggerFilter({\r\n    verboseDebug: [\"*\"],\r\n    logFn: [\"time\", \"timeEnd\"]\r\n}, false);\r\n\r\n\r\n(window as any).McLogger = Logger;", "import { Logger } from \"../utils/Logger/Logger.js\";\r\n\r\nexport const BaseFormLogger = new Logger({\r\n    tags: { category: \"Forms\" },\r\n    prefixStrings: [\"Form\"],\r\n    prefixStyles: [Logger.StylePresets.ButtonLabel({ 'background-color': \"#639FAB\" })]\r\n});\r\n\r\nexport const SecondButtonDefaultStyle = Logger.StylePresets.ButtonLabel({ 'background-color': \"#575761\" });", "\r\n\r\n/**\r\n * Gating Level Values:\r\n * Contains possible gating level values.\r\n * The gating level is the initial gating value, but does not take into account other application states like user cookies, or known visitor status.\r\n * Use the GatingState module instead if you need to take application state into account.\r\n * The gating level values are slightly different in different areas of the application.\r\n * - GatingLevel.UserCookie: possible gating levels when writing the user gating cookie.\r\n * - GatingLevel.MarketoForm: possible gating levels for marketo form components.\r\n * - GatingLevel.Resource: possible gating levels for gated resources\r\n */\r\n\r\nexport namespace GatingLevel {\r\n  /** Gating level values for Marketo forms */\r\n  export const MarketoForm = Object.freeze([\"FullGate\", \"PartialGate\"] as const);\r\n  export type MarketoForm = typeof MarketoForm[number];\r\n\r\n  /** Gating level values for form experiences, includes \"NoGate\" where GatingLevel.MarketoForm does not, since a form will never display when the state is \"NoGate\" */\r\n  export const FormExperience = Object.freeze([...GatingLevel.MarketoForm, \"NoGate\"] as const);\r\n  export type FormExperience = typeof FormExperience[number];\r\n\r\n  /** Gating level values for gated resources */\r\n  export namespace Resource {\r\n    /** The actual value stored in the resource `gatingLevel` field. The \"Ungated\" value here is the same as the \"NoGate\" experience, which is what the value is after parsing. */\r\n    export const Raw = Object.freeze([\"Full Gate\", \"Partial Gate\", \"Ungated\"] as const);\r\n    export type Raw = typeof Raw[number];\r\n\r\n    /** The gating level value returned after parsing the resources in a form experience */\r\n    export const Parsed = GatingLevel.FormExperience;\r\n    export type Parsed = typeof Parsed[number];\r\n  }\r\n\r\n  /** Gating Level values that can be stored on the user gating cookie */\r\n  export const UserCookie = GatingLevel.MarketoForm;\r\n  export type UserCookie = GatingLevel.MarketoForm;\r\n}\r\n\r\nexport type GatingLevelFor<TFormOrExperience extends \"MarketoForm\" | \"FormExperience\"> =\r\n  TFormOrExperience extends \"MarketoForm\"\r\n    ? GatingLevel.MarketoForm\r\n    :\r\n  TFormOrExperience extends \"FormExperience\"\r\n    ? GatingLevel.FormExperience\r\n    : never;", "import { GatingLevel } from \"./gating-level.js\";\r\n\r\n/**\r\n * Gating State Values: \r\n * Similar to the GatingLevel values, but adds also account for application state based on cookies, known visitor status, etc.\r\n */\r\nexport namespace GatingState {\r\n  /** Gating States for marketo form components. This includes GatingLevel.MarketoForm values plus any dynamically determined states */\r\n  export const MarketoForm = Object.freeze([...GatingLevel.MarketoForm, \"BlindSubmit\"] as const);\r\n  export type MarketoForm = typeof MarketoForm[number];\r\n\r\n  /** Gating State values for Form Experiences. This includes GatingLevel.FormExperience values plus any dynamically determined states */\r\n  export const FormExperience = Object.freeze([... GatingLevel.FormExperience, \"BlindSubmit\"] as const);\r\n  export type FormExperience = typeof FormExperience[number];\r\n  \r\n  /** Gating State values returned after reading the user cookie.  \"NeedsForm\" indicates the cookie was not set. */\r\n  export const UserCookie = Object.freeze([...GatingLevel.MarketoForm, \"NeedsForm\"] as const);\r\n  export type UserCookie = typeof UserCookie[number];\r\n\r\n  export namespace PossibleValues {\r\n    /** Get a GatingState type for Marketo forms, only including the allowed gating states.  */\r\n    export type forMarketoForm<TAllowedGatingState extends GatingState.MarketoForm> = TAllowedGatingState;\r\n\r\n    /** Get a GatingState type for form experiences, only including the allowed gating states.  */\r\n    export type forFormExperience<TAllowedGatingState extends GatingState.FormExperience> = TAllowedGatingState;\r\n  }\r\n}\r\n\r\nexport type GatingStateFor<TFormOrExperience extends \"MarketoForm\" | \"FormExperience\"> =\r\n  TFormOrExperience extends \"MarketoForm\"\r\n    ? GatingState.MarketoForm\r\n    :\r\n  TFormOrExperience extends \"FormExperience\"\r\n    ? GatingState.FormExperience\r\n    : never;", "import { excludeFrom, isArray, type Nil } from \"@mcwd/typescript-type-guards\";\r\nimport type { AnyMarketoInputName, HiddenMarketoInputName, UserMarketoInputName } from \"../../types/definitions/inputs/marketo-input-names-and-values.js\";\r\n\r\nnamespace AllForms {\r\n  export const Hidden = [\r\n    \"SiteLanguageCode\",\r\n    \"FormName\",\r\n    \"source\",\r\n    \"Source_String__c\",\r\n    \"Source_Website\",\r\n    \"Medium__c\",\r\n    \"Campaign__c\",\r\n    \"Source__c\",\r\n    \"Last_Offer_Campaign__c\",\r\n    \"Last_Offer_Name__c\",\r\n    \"Website_Language_Code__c\",\r\n    \"GCLID__c\",\r\n    \"Mobile__c\",\r\n    \"experienceGatingState\",\r\n    \"formGatingState\",\r\n    \"initialFormGatingLevel\",\r\n    \"initialFormExperienceGatingLevel\",\r\n  ] as const satisfies readonly HiddenMarketoInputName[];\r\n}\r\n\r\nnamespace EnabledFieldsInstance {\r\n  interface HiddenOnly {\r\n    Hidden: readonly [... HiddenMarketoInputName[]]\r\n  }\r\n\r\n  interface PartialOnly {\r\n    Partial: readonly [...(HiddenMarketoInputName | AnyMarketoInputName)[]]\r\n  }\r\n\r\n  interface FullOnly {\r\n    Full: readonly [...(HiddenMarketoInputName | AnyMarketoInputName)[]]\r\n  }\r\n\r\n  interface HiddenAndFull extends HiddenOnly, FullOnly { }\r\n  interface HiddenAndPartial extends HiddenOnly, PartialOnly { }\r\n  interface All extends HiddenOnly, PartialOnly, FullOnly { }\r\n\r\n  export type AnyValid = HiddenAndFull | HiddenAndPartial | All; \r\n}\r\n\r\n// Overload without Partial\r\nfunction createEnabledFieldsInstance<\r\n  const THiddenFields extends readonly [...HiddenMarketoInputName[]],\r\n  const TFullFields extends readonly [...AnyMarketoInputName[]]\r\n>({ Hidden, Full }: { Hidden: THiddenFields, Full: TFullFields }): { Hidden: THiddenFields, Full: readonly [...THiddenFields, ...TFullFields] };\r\n\r\n// Overload with all gating levels\r\nfunction createEnabledFieldsInstance<\r\n  const THiddenFields extends readonly [...HiddenMarketoInputName[]],\r\n  const TFullFields extends readonly [...AnyMarketoInputName[]],\r\n  const TPartialFields extends (readonly [...AnyMarketoInputName[]])\r\n>({ Hidden, Partial, Full }: { Hidden: THiddenFields, Partial: TPartialFields, Full: TFullFields })\r\n  : { Hidden: THiddenFields, Partial: readonly [...THiddenFields, ...TPartialFields], Full: readonly [...THiddenFields, ...TPartialFields, ...TFullFields] };\r\n\r\n// Implementation function\r\nfunction createEnabledFieldsInstance<\r\n  const THiddenFields extends readonly [...HiddenMarketoInputName[]],\r\n  const TFullFields extends readonly [...AnyMarketoInputName[]],\r\n  const TPartialFields extends (readonly[...AnyMarketoInputName[]]) | Nil\r\n>({ Hidden, Partial, Full }: { Hidden: THiddenFields, Partial?: TPartialFields, Full: TFullFields })\r\n{\r\n  if (isArray(Partial)) {\r\n    // Add \"Partial\" if it is included in args\r\n    const enabledFields = {\r\n      Hidden,\r\n      Partial: [...Hidden, ...Partial] as const, \r\n      Full: [...Hidden, ...Partial, ...Full] as const\r\n    } as const;\r\n    Object.freeze(enabledFields);\r\n    return enabledFields;\r\n  }\r\n  else {\r\n    const enabledFields = {\r\n      Hidden,\r\n      Full: [...Hidden, ...Full] as const\r\n    } as const;\r\n    Object.freeze(enabledFields);\r\n    return enabledFields;\r\n  }\r\n}\r\n\r\ntype EnabledFieldsObject = {\r\n  [key: string]: EnabledFieldsInstance.AnyValid\r\n}\r\n\r\nconst ContactForm_FullGate = [\r\n  \"FirstName\",\r\n  \"LastName\",\r\n  \"Email\",\r\n  \"Company\",\r\n  \"Country\",\r\n  \"State\",\r\n  \"Phone\",\r\n  \"Tier__c\",\r\n  \"Industry\",\r\n  // \"Department__c\",\r\n  \"Email_Opt_In__c\",\r\n  \"Webform_Comments_recent_value__c\",\r\n  \"Latest_Solution_Interest__c\",\r\n] as const satisfies readonly UserMarketoInputName[];\r\n\r\n\r\nexport const EnabledFields = {\r\n  Contact: createEnabledFieldsInstance({\r\n    Hidden: AllForms.Hidden,\r\n    Full: ContactForm_FullGate\r\n  }),\r\n  Resource: createEnabledFieldsInstance({\r\n    Hidden: [\r\n      ...AllForms.Hidden,\r\n      \"documentDownloadURL\",\r\n      \"multiDocSelectorFormFill\"\r\n    ],\r\n    Partial: [\r\n      \"FirstName\",\r\n      \"LastName\",\r\n      \"Email\",\r\n      \"Company\",\r\n      \"Email_Opt_In__c\"\r\n    ],\r\n    Full: [\r\n      \"Country\",\r\n      \"State\",\r\n      \"Phone\",\r\n      \"Tier__c\",\r\n      \"Industry\",\r\n      // \"Department__c\",\r\n    ]\r\n  }),\r\n  DemoRequest: createEnabledFieldsInstance({\r\n    Hidden: AllForms.Hidden,\r\n    Full: excludeFrom(ContactForm_FullGate, \"Latest_Solution_Interest__c\")\r\n  }),\r\n  Roi: createEnabledFieldsInstance({\r\n    Hidden: [\r\n      ...AllForms.Hidden,\r\n      \"roi_querystring__c_contact\"\r\n    ],\r\n    Full: excludeFrom(ContactForm_FullGate, \"Latest_Solution_Interest__c\")\r\n  }),\r\n  Partner: createEnabledFieldsInstance({\r\n    Hidden: AllForms.Hidden,\r\n    Full: excludeFrom(ContactForm_FullGate, \"Tier__c\", \"Industry\", \"Webform_Comments_recent_value__c\", \"Latest_Solution_Interest__c\")\r\n  }),\r\n  TradeShow: createEnabledFieldsInstance({\r\n    Hidden: AllForms.Hidden,\r\n    Full: excludeFrom(ContactForm_FullGate, \"Latest_Solution_Interest__c\")\r\n  }),\r\n  Pricing: createEnabledFieldsInstance({\r\n    Hidden: AllForms.Hidden,\r\n    Full: excludeFrom(ContactForm_FullGate, \"Webform_Comments_recent_value__c\", \"Latest_Solution_Interest__c\")\r\n  }),\r\n  Subscription: createEnabledFieldsInstance({\r\n    Hidden: AllForms.Hidden,\r\n    Full: [\r\n      \"FirstName\",\r\n      \"LastName\",\r\n      \"Email\",\r\n      \"Email_Opt_In__c\",\r\n    ]\r\n  }),\r\n  Subprocessor: createEnabledFieldsInstance({\r\n    Hidden: AllForms.Hidden,\r\n    Full: [\"Email\", \"Company\"]\r\n  }),\r\n  EventRegistration: createEnabledFieldsInstance({\r\n    Hidden: AllForms.Hidden,\r\n    Full: [\r\n      ...excludeFrom(ContactForm_FullGate, \"Webform_Comments_recent_value__c\", \"Latest_Solution_Interest__c\"),\r\n      \"Partner_Opt_in_Processing__c\",\r\n    ]\r\n  })\r\n} as const satisfies EnabledFieldsObject;\r\n", "import type { GatingCookiePermissions } from \"../../types/definitions/gating/gating-cookie-permissions.js\";\r\nimport type { GatingState } from \"../../types/definitions/gating/gating-state.js\";\r\nimport { type AnyMarketoInputName } from \"../../types/definitions/inputs/marketo-input-names-and-values.js\";\r\nimport { EnabledFields } from \"./enabled-fields.js\";\r\n\r\ninterface MarketoFormSettingsInstance<AllowedGatingState extends GatingState.MarketoForm = GatingState.MarketoForm> {\r\n  marketoFormSettingsKey: string;\r\n  formId: number;\r\n  hasRecaptcha: boolean;\r\n  gatingCookiePermissions: GatingCookiePermissions;\r\n  marketoAllowedGatingStates: readonly AllowedGatingState[];\r\n  enabledFields: {\r\n    [Key in AllowedGatingState]?: readonly AnyMarketoInputName[]\r\n  }\r\n}\r\n\r\nexport const MarketoFormSettingsObject = {\r\n  contact: {\r\n    marketoFormSettingsKey: \"contact\",\r\n    formId: 1027,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.Contact.Full\r\n    }\r\n  },\r\n  resource: {\r\n    marketoFormSettingsKey: \"resource\",\r\n    formId: 1001,\r\n    gatingCookiePermissions: {\r\n      allowRead: true,\r\n      allowWrite: true,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"BlindSubmit\", \"PartialGate\", \"FullGate\"],\r\n    enabledFields: {\r\n      BlindSubmit: EnabledFields.Resource.Hidden,\r\n      PartialGate: EnabledFields.Resource.Partial,\r\n      FullGate: EnabledFields.Resource.Full\r\n    }\r\n  },\r\n\r\n  \"custom-resource\": {\r\n    marketoFormSettingsKey: \"custom-resource\",\r\n    formId: 1001,\r\n    gatingCookiePermissions: {\r\n      allowRead: true,\r\n      allowWrite: true,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"BlindSubmit\", \"PartialGate\", \"FullGate\"],\r\n    enabledFields: {\r\n      BlindSubmit: EnabledFields.Resource.Hidden,\r\n      PartialGate: EnabledFields.Resource.Partial,\r\n      FullGate: EnabledFields.Resource.Full\r\n    }\r\n  },\r\n  roi: {\r\n    marketoFormSettingsKey: \"roi\",\r\n    formId: 1016,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.Roi.Full\r\n    }\r\n  },\r\n  spark: {\r\n    marketoFormSettingsKey: \"spark\",\r\n    formId: 1026,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.Contact.Full\r\n    }\r\n  },\r\n  pricing: {\r\n    marketoFormSettingsKey: \"pricing\",\r\n    formId: 1028,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.Pricing.Full\r\n    }\r\n  },\r\n  subscription: {\r\n    marketoFormSettingsKey: \"subscription\",\r\n    formId: 1029,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.Subscription.Full\r\n    }\r\n  },\r\n  partner: {\r\n    marketoFormSettingsKey: \"partner\",\r\n    formId: 1024,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.Partner.Full\r\n    }\r\n  },\r\n  \"case-study\": {\r\n    marketoFormSettingsKey: \"case-study\",\r\n    formId: 1012,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"PartialGate\", \"BlindSubmit\"],\r\n    enabledFields: {\r\n      BlindSubmit: EnabledFields.Resource.Hidden,\r\n      PartialGate: EnabledFields.Resource.Partial\r\n    }\r\n  },\r\n  \"demo-request\": {\r\n    marketoFormSettingsKey: \"demo-request\",\r\n    formId: 1014,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.DemoRequest.Full\r\n    }\r\n  },\r\n  \"tradeshow-giveaway\": {\r\n    marketoFormSettingsKey: \"tradeshow-giveaway\",\r\n    formId: 1006,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.TradeShow.Full\r\n    }\r\n  },\r\n  \"event-registration\": {\r\n    marketoFormSettingsKey: \"event-registration\",\r\n    formId: 1159,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.EventRegistration.Full\r\n    }\r\n  },\r\n  \"subprocessor-update-notification\": {\r\n    marketoFormSettingsKey: \"subprocessor-update-notification\",\r\n    formId: 1211,\r\n    gatingCookiePermissions: {\r\n      allowRead: false,\r\n      allowWrite: false,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\"],\r\n    enabledFields:  {\r\n      FullGate: EnabledFields.Subprocessor.Full\r\n    }\r\n  },\r\n  \"maturity-assessment\": {\r\n    marketoFormSettingsKey: \"maturity-assessment\", //resource\r\n    formId: 1001, //resourceFormID\r\n    gatingCookiePermissions: {\r\n      allowRead: true,\r\n      allowWrite: true,\r\n    } as GatingCookiePermissions,\r\n    hasRecaptcha: true,\r\n    marketoAllowedGatingStates: [\"FullGate\", \"BlindSubmit\"],\r\n    enabledFields: {\r\n      FullGate: EnabledFields.Resource.Full\r\n    }\r\n  }\r\n} as const satisfies { [marketoFormSettingsKey: string]: MarketoFormSettingsInstance; };\r\n\r\nexport type MarketoFormSettingsObject = typeof MarketoFormSettingsObject;\r\n\r\nconst _marketoFormSettingsArray = Object.values(MarketoFormSettingsObject);\r\n\r\nexport type MarketoFormSettingsKey = (typeof _marketoFormSettingsArray)[number][\"marketoFormSettingsKey\"];\r\nexport const MarketoFormSettingsKey = Object.freeze(_marketoFormSettingsArray.map(f => f.marketoFormSettingsKey));\r\n\r\nexport type MarketoFormId = (typeof _marketoFormSettingsArray)[number][\"formId\"];\r\nexport const MarketoFormId = Object.freeze(_marketoFormSettingsArray.map((f) => f.formId));\r\n\r\n\r\ntype GetMktoFormSettings<TMktoKey extends MarketoFormSettingsKey> =\r\n  MarketoFormSettingsObject[ TMktoKey ];\r\n\r\nexport type AllowedGatingStatesForMktoForm<TMktoKey extends MarketoFormSettingsKey> =\r\n  GetMktoFormSettings<TMktoKey>[ \"marketoAllowedGatingStates\" ][ number ];\r\n\r\nexport interface MarketoFormSettings<\r\n  TAllowedGatingState extends GatingState.MarketoForm = GatingState.MarketoForm\r\n> {\r\n  readonly marketoFormSettingsKey: MarketoFormSettingsKey;\r\n  readonly formId: MarketoFormId;\r\n  readonly hasRecaptcha: boolean;\r\n  readonly gatingCookiePermissions: GatingCookiePermissions;\r\n  readonly marketoAllowedGatingStates: readonly TAllowedGatingState[];\r\n  readonly enabledFields: {\r\n    [Key in TAllowedGatingState]: readonly AnyMarketoInputName[];\r\n  };\r\n}", "import { isNil, isNotNil } from \"@mcwd/typescript-type-guards\";\r\nimport type { GateLevelSource } from \"../../types/definitions/gating/gating-level-source.js\";\r\nimport { MarketoFormSettingsObject, type AllowedGatingStatesForMktoForm, type MarketoFormSettingsKey } from \"../marketo-form/marketo-form-setting.js\";\r\nimport type { AnyFormSettingsKey } from \"./form-settings-keys.js\";\r\n\r\ntype AllowedGatingStates_w_NoGate<TMktoForm extends MarketoFormSettingsKey> = AllowedGatingStatesForMktoForm<TMktoForm> | \"NoGate\";\r\n\r\nfunction getDefaultGateLevelFromAllowedGatingStates<\r\n  const TMktoForm extends MarketoFormSettingsKey,\r\n  const TGateLevelSources extends readonly [GateLevelSource, ...GateLevelSource[]],\r\n  const TAllowedGatingStates extends readonly [AllowedGatingStates_w_NoGate<TMktoForm>, ...AllowedGatingStates_w_NoGate<TMktoForm>[]],\r\n>({\r\n  formSettingsKey,\r\n  mktoKey: _mktoKey,\r\n  gateLevelSource,\r\n  allowedGatingStates\r\n}: {\r\n  formSettingsKey: AnyFormSettingsKey,\r\n  mktoKey: TMktoForm,\r\n  gateLevelSource: TGateLevelSources,\r\n  allowedGatingStates: TAllowedGatingStates\r\n}) {\r\n  const glsLen = gateLevelSource.length;\r\n  const gls0 = gateLevelSource[0];\r\n  const agsLen = allowedGatingStates.length;\r\n  if (glsLen === 1 && gls0 === \"Self\") {\r\n    if (agsLen > 2) {\r\n      throw new Error(`There cannot be more than 2 values in the 'allowedGatingStates' array when the 'gateLevelSource' property array contains only 'Self'. If more gating states have been added this logic may need to be updated.`);\r\n    }\r\n    const requiredStateIdx = allowedGatingStates.findIndex(a => (a === \"FullGate\" || a === \"PartialGate\"));\r\n    const ags0 = allowedGatingStates[0];\r\n    const ags1 = allowedGatingStates[1];\r\n    if (requiredStateIdx === 0) {\r\n      if (agsLen === 2 && ags1 !== \"BlindSubmit\") {\r\n        throw new Error(`Invalid 'allowedGatingStates' setting for formSettingsKey '${formSettingsKey}'. allowedGatingStates[1] contains an invalid gating state value '${ags1}' that cannot happen due to the 'gateLevelSource' property value of ['Self'] which allows only a single default GatingLevel`);\r\n      }\r\n      return ags0 as \"FullGate\" | \"PartialGate\";\r\n    }\r\n    else if (requiredStateIdx === 1) {\r\n      if (agsLen === 2 && ags0 !== \"BlindSubmit\") {\r\n        throw new Error(`Invalid 'allowedGatingStates' setting for formSettingsKey '${formSettingsKey}'. allowedGatingStates[0] contains an invalid gating state value '${ags0}' that cannot happen due to the 'gateLevelSource' property value of ['Self'] which allows only a single default GatingLevel`);\r\n      }\r\n      return ags1 as \"FullGate\" | \"PartialGate\";\r\n    }\r\n    else if (requiredStateIdx < 0) {\r\n      if (agsLen === 1) {\r\n        throw new Error(`Invalid 'allowedGatingStates' setting for formSettingsKey '${formSettingsKey}' with only one gating type specified '${ags0}' which is invalid as a default value when 'gateLevelSource' is set to ['Self']`);\r\n      }\r\n      else {\r\n        throw new Error(`Invalid 'allowedGatingStates' setting for formSettingsKey '${formSettingsKey}' with value ['${ags0}', '${ags1}'] which are both invalid as a default value when 'gateLevelSource' is set to ['Self']`);\r\n      }\r\n    }\r\n  }\r\n  return null;\r\n}\r\n\r\nexport function createExperienceSettings<\r\n  const TFormExp extends AnyFormSettingsKey,\r\n  const TMktoForm extends MarketoFormSettingsKey,\r\n  const TFormTrackingName extends string,\r\n  const TCanUseModal extends boolean,\r\n  const TGateLevelSources extends readonly [\"Self\"],\r\n  const TAllowedGatingStates extends readonly AllowedGatingStatesForMktoForm<TMktoForm>[]\r\n  & (\r\n    | (readonly [AllowedGatingStatesForMktoForm<TMktoForm>, AllowedGatingStatesForMktoForm<TMktoForm>] & (readonly (\"FullGate\" | \"BlindSubmit\")[] | readonly (\"PartialGate\" | \"BlindSubmit\")[]))\r\n    | (readonly [AllowedGatingStatesForMktoForm<TMktoForm>] & (readonly [\"FullGate\"] | readonly [\"PartialGate\"])) \r\n  )\r\n>({\r\n  formSettingsKey,\r\n  mktoKey,\r\n  formTrackingName,\r\n  canUseModal,\r\n  gateLevelSource,\r\n  allowedGatingStates\r\n}: {\r\n  formSettingsKey: TFormExp,\r\n  mktoKey: TMktoForm,\r\n  formTrackingName: TFormTrackingName,\r\n  canUseModal: TCanUseModal,\r\n  gateLevelSource: TGateLevelSources,\r\n  allowedGatingStates: TAllowedGatingStates\r\n}): MarketoFormSettingsObject[TMktoForm] & {\r\n  readonly formSettingsKey: TFormExp,\r\n  readonly formTrackingName: TFormTrackingName,\r\n  readonly canUseModal: TCanUseModal,\r\n  readonly gateLevelSource: TGateLevelSources,\r\n  readonly allowedGatingStates: TAllowedGatingStates,\r\n  readonly defaultGateLevel: Exclude<TAllowedGatingStates[number], \"BlindSubmit\">\r\n}\r\n\r\nexport function createExperienceSettings<\r\n  const TFormExp extends AnyFormSettingsKey,\r\n  const TMktoForm extends MarketoFormSettingsKey,\r\n  const TFormTrackingName extends string,\r\n  const TCanUseModal extends boolean,\r\n  const TGateLevelSources extends readonly [\"Self\", Exclude<GateLevelSource, \"Self\">, ...Exclude<GateLevelSource, \"Self\">[]],\r\n  const TAllowedGatingStates extends readonly AllowedGatingStates_w_NoGate<TMktoForm>[]\r\n    & readonly [AllowedGatingStates_w_NoGate<TMktoForm>, AllowedGatingStates_w_NoGate<TMktoForm>, ...AllowedGatingStates_w_NoGate<TMktoForm>[]],\r\n  const TDefaultGateLevel extends TAllowedGatingStates[number] & (\"FullGate\" | \"PartialGate\")\r\n>({\r\n  formSettingsKey,\r\n  mktoKey,\r\n  formTrackingName,\r\n  canUseModal,\r\n  gateLevelSource,\r\n  allowedGatingStates,\r\n  defaultGateLevel\r\n}: {\r\n  formSettingsKey: TFormExp,\r\n  mktoKey: TMktoForm,\r\n  formTrackingName: TFormTrackingName,\r\n  canUseModal: TCanUseModal,\r\n  gateLevelSource: TGateLevelSources,\r\n  allowedGatingStates: TAllowedGatingStates,\r\n  defaultGateLevel: TDefaultGateLevel\r\n}): MarketoFormSettingsObject[TMktoForm] & {\r\n  readonly formSettingsKey: TFormExp,\r\n  readonly formTrackingName: TFormTrackingName,\r\n  readonly canUseModal: TCanUseModal,\r\n  readonly gateLevelSource: TGateLevelSources,\r\n  readonly allowedGatingStates: TAllowedGatingStates,\r\n  readonly defaultGateLevel: TDefaultGateLevel\r\n}\r\n\r\nexport function createExperienceSettings<\r\n  const TFormExp extends AnyFormSettingsKey,\r\n  const TMktoForm extends MarketoFormSettingsKey,\r\n  const TFormTrackingName extends string,\r\n  const TCanUseModal extends boolean,\r\n  const TGateLevelSources extends (readonly [Exclude<GateLevelSource, \"Self\">]) | (readonly [Exclude<GateLevelSource, \"Self\">, Exclude<GateLevelSource, \"Self\">, ...Exclude<GateLevelSource, \"Self\">[]]),\r\n  const TAllowedGatingStates extends readonly AllowedGatingStates_w_NoGate<TMktoForm>[]\r\n    & readonly [AllowedGatingStates_w_NoGate<TMktoForm>, AllowedGatingStates_w_NoGate<TMktoForm>, ...AllowedGatingStates_w_NoGate<TMktoForm>[]],\r\n>({\r\n  formSettingsKey,\r\n  mktoKey,\r\n  formTrackingName,\r\n  canUseModal,\r\n  gateLevelSource,\r\n  allowedGatingStates\r\n}: {\r\n  formSettingsKey: TFormExp,\r\n  mktoKey: TMktoForm,\r\n  formTrackingName: TFormTrackingName,\r\n  canUseModal: TCanUseModal,\r\n  gateLevelSource: TGateLevelSources,\r\n  allowedGatingStates: TAllowedGatingStates,\r\n}): MarketoFormSettingsObject[TMktoForm] & {\r\n  readonly formSettingsKey: TFormExp,\r\n  readonly formTrackingName: TFormTrackingName,\r\n  readonly canUseModal: TCanUseModal,\r\n  readonly gateLevelSource: TGateLevelSources,\r\n  readonly allowedGatingStates: TAllowedGatingStates,\r\n}\r\n\r\nexport function createExperienceSettings<\r\n  const TFormExp extends AnyFormSettingsKey,\r\n  const TMktoForm extends MarketoFormSettingsKey,\r\n  const TFormTrackingName extends string,\r\n  const TCanUseModal extends boolean,\r\n  const TGateLevelSources extends readonly [GateLevelSource, ...GateLevelSource[]],\r\n  const TAllowedGatingStates extends readonly [AllowedGatingStates_w_NoGate<TMktoForm>, ...AllowedGatingStates_w_NoGate<TMktoForm>[]],\r\n>({\r\n  formSettingsKey,\r\n  mktoKey,\r\n  formTrackingName,\r\n  canUseModal,\r\n  gateLevelSource,\r\n  allowedGatingStates,\r\n  defaultGateLevel\r\n}: MarketoFormSettingsObject[TMktoForm] & {\r\n  readonly formSettingsKey: TFormExp,\r\n  readonly mktoKey: TMktoForm,\r\n  readonly formTrackingName: TFormTrackingName,\r\n  readonly canUseModal: TCanUseModal,\r\n  readonly gateLevelSource: [...TGateLevelSources],\r\n  readonly allowedGatingStates: TAllowedGatingStates,\r\n  readonly defaultGateLevel?: TAllowedGatingStates[number],\r\n}) {\r\n  if (gateLevelSource.length === 0) {\r\n    throw new Error(`gateLevelSource is not allowed to be of length 0. formSettingsKey: '${formSettingsKey}'`);\r\n  }\r\n  if (allowedGatingStates.length === 0) {\r\n    throw new Error(`allowedGatingStates is not allowed to be of length 0. formSettingsKey: '${formSettingsKey}'`);\r\n  }\r\n  \r\n  let defaultGateLevelObj: { defaultGateLevel: TAllowedGatingStates[number] } | Record<string, never> = {};\r\n  if (isNil(defaultGateLevel)) {\r\n    const gateLevelForSelfSourceFromAllowedGatingStates = getDefaultGateLevelFromAllowedGatingStates({ allowedGatingStates, formSettingsKey, gateLevelSource, mktoKey });\r\n    if (isNotNil(gateLevelForSelfSourceFromAllowedGatingStates)) {\r\n      defaultGateLevelObj = { defaultGateLevel: gateLevelForSelfSourceFromAllowedGatingStates };\r\n    }\r\n  }\r\n  else {\r\n    defaultGateLevelObj = { defaultGateLevel };\r\n  }\r\n\r\n  if (\"defaultGateLevel\" in defaultGateLevelObj) {\r\n    if (allowedGatingStates.includes(defaultGateLevelObj.defaultGateLevel) === false) {\r\n      throw new Error(`The value for property 'defaultGateLevel' must be contained in the 'allowedGatingStates' array property.`);\r\n    }\r\n    if (defaultGateLevelObj.defaultGateLevel !== \"FullGate\" && defaultGateLevelObj.defaultGateLevel !== \"PartialGate\") {\r\n      throw new Error(`The value for property 'defaultGateLevel' must be either \"FullGate\" or \"PartialGate\"`);\r\n    }\r\n  }\r\n  else if (gateLevelSource.includes(\"Self\")) {\r\n    throw new Error(`Property 'defaultGateLevel' is required when providing more than one 'gateLevelSource' item where one of those values is 'Self'`);\r\n  }\r\n\r\n  const expSettings = {\r\n    formSettingsKey: formSettingsKey,\r\n    formTrackingName,\r\n    canUseModal,\r\n    gateLevelSource,\r\n    allowedGatingStates,\r\n    ...defaultGateLevelObj,\r\n    ...MarketoFormSettingsObject[mktoKey],\r\n  } as const;\r\n  Object.freeze(expSettings);\r\n  return expSettings;\r\n}", "import type { GateLevelSource } from \"../../types/definitions/gating/gating-level-source.js\";\r\nimport { GatingState } from \"../../types/definitions/gating/gating-state.js\";\r\nimport { GatingLevel } from \"../../types/definitions/gating/gating-level.js\";\r\nimport { type MarketoFormSettings } from \"../marketo-form/marketo-form-setting.js\";\r\nimport type { AnyFormSettingsKey } from \"./form-settings-keys.js\";\r\nimport { createExperienceSettings } from \"./create-experience-settings.js\";\r\nimport { excludeFrom } from \"@mcwd/typescript-type-guards\";\r\n\r\nconst NoBlindSubmit = excludeFrom(GatingState.FormExperience, \"BlindSubmit\");\r\n\r\nexport const FormExperienceSettingsObject = {\r\n  contact: createExperienceSettings({\r\n    formSettingsKey: \"contact\",\r\n    mktoKey: \"contact\",\r\n    formTrackingName: \"Contact Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  document: createExperienceSettings({\r\n    formSettingsKey: \"document\",\r\n    mktoKey: \"resource\",\r\n    formTrackingName: \"Document Request Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Document\"],\r\n    allowedGatingStates: NoBlindSubmit\r\n  }),\r\n  video: createExperienceSettings({\r\n    formSettingsKey: \"video\",\r\n    mktoKey: \"resource\",\r\n    formTrackingName: \"Video Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Document\"],\r\n    allowedGatingStates: NoBlindSubmit\r\n  }),\r\n  \"document-landing-page\": createExperienceSettings({\r\n    formSettingsKey: \"document-landing-page\",\r\n    mktoKey: \"resource\",\r\n    formTrackingName: \"Document Landing Page Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Document\"],\r\n    allowedGatingStates: NoBlindSubmit\r\n  }),\r\n  \"video-landing-page\": createExperienceSettings({\r\n    formSettingsKey: \"video-landing-page\",\r\n    mktoKey: \"resource\",\r\n    formTrackingName: \"Video Landing Page Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Video\"],\r\n    allowedGatingStates: NoBlindSubmit\r\n  }),\r\n  \"video-gated\": createExperienceSettings({\r\n    formSettingsKey: \"video-gated\",\r\n    mktoKey: \"resource\",\r\n    formTrackingName: \"Video Gated Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Video\"],\r\n    allowedGatingStates: NoBlindSubmit\r\n  }),\r\n  \"qx-demo-video\": createExperienceSettings({\r\n    formSettingsKey: \"qx-demo-video\",\r\n    mktoKey: \"custom-resource\",\r\n    formTrackingName: \"Qx Demo Video Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  \"post-event-assets\": createExperienceSettings({\r\n    formSettingsKey: \"post-event-assets\",\r\n    mktoKey: \"resource\",\r\n    formTrackingName: \"Post-Event Assets Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Document\", \"Video\", \"WidgetDataSetup\"],\r\n    allowedGatingStates: excludeFrom(NoBlindSubmit, \"NoGate\")\r\n  }),\r\n  ppc: createExperienceSettings({\r\n    formSettingsKey: \"ppc\",\r\n    mktoKey: \"resource\",\r\n    formTrackingName: \"Single Asset Download Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Document\"],\r\n    allowedGatingStates: NoBlindSubmit,\r\n  }),\r\n  \"ppc-contact\": createExperienceSettings({\r\n    formSettingsKey: \"ppc-contact\",\r\n    mktoKey: \"contact\",\r\n    formTrackingName: \"PPC Contact Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  \"ppc-video\": createExperienceSettings({\r\n    formSettingsKey: \"ppc-video\",\r\n    mktoKey: \"resource\",\r\n    formTrackingName: \"PPC Video Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Video\"],\r\n    allowedGatingStates: excludeFrom(NoBlindSubmit, \"NoGate\"),\r\n  }),\r\n  \"qx-roi\": createExperienceSettings({\r\n    formSettingsKey: \"qx-roi\",\r\n    mktoKey: \"roi\",\r\n    formTrackingName: \"Qx ROI Calculator Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  \"mx-roi\": createExperienceSettings({\r\n    formSettingsKey: \"mx-roi\",\r\n    mktoKey: \"roi\",\r\n    formTrackingName: \"Mx ROI Calculator Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  spark: createExperienceSettings({\r\n    formSettingsKey: \"spark\",\r\n    mktoKey: \"spark\",\r\n    formTrackingName: \"Spark Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  pricing: createExperienceSettings({\r\n    formSettingsKey: \"pricing\",\r\n    mktoKey: \"pricing\",\r\n    formTrackingName: \"Large Pricing Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  subscription: createExperienceSettings({\r\n    formSettingsKey: \"subscription\",\r\n    mktoKey: \"subscription\",\r\n    formTrackingName: \"Newsletter Subscription Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  partner: createExperienceSettings({\r\n    formSettingsKey: \"partner\",\r\n    mktoKey: \"partner\",\r\n    formTrackingName: \"Partner Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  \"case-study\": createExperienceSettings({\r\n    formSettingsKey: \"case-study\",\r\n    mktoKey: \"case-study\",\r\n    formTrackingName: \"Case Study Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"PartialGate\"]\r\n  }),\r\n  \"demo-request\": createExperienceSettings({\r\n    formSettingsKey: \"demo-request\",\r\n    mktoKey: \"demo-request\",\r\n    formTrackingName: \"Manufacturing Demo Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  \"tradeshow-giveaway\": createExperienceSettings({\r\n    formSettingsKey: \"tradeshow-giveaway\",\r\n    mktoKey: \"tradeshow-giveaway\",\r\n    formTrackingName: \"Tradeshow Giveaway Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  \"event-registration\": createExperienceSettings({\r\n    formSettingsKey: \"event-registration\",\r\n    mktoKey: \"event-registration\",\r\n    formTrackingName: \"Event Registration Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  \"subprocessor-update-notification\": createExperienceSettings({\r\n    formSettingsKey: \"subprocessor-update-notification\",\r\n    mktoKey: \"subprocessor-update-notification\",\r\n    formTrackingName: \"Sub-Processor Update Notification Form\",\r\n    canUseModal: false,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n  \"digital-maturity-assessment\": createExperienceSettings({\r\n    formSettingsKey: \"digital-maturity-assessment\",\r\n    mktoKey: \"maturity-assessment\",\r\n    formTrackingName: \"Digital Maturity Form\",\r\n    canUseModal: true,\r\n    gateLevelSource: [\"Self\"],\r\n    allowedGatingStates: [\"FullGate\"]\r\n  }),\r\n} as const;\r\nexport type FormExperienceSettingsObject = typeof FormExperienceSettingsObject;\r\n\r\nconst _formExperienceSettingsArray = Object.freeze(Object.values(FormExperienceSettingsObject));\r\n\r\nexport type FormTrackingName = (typeof _formExperienceSettingsArray)[number][\"formTrackingName\"];\r\nconst FormTrackingName: FormTrackingName[] = _formExperienceSettingsArray.map(s => s.formTrackingName);\r\n\r\n\r\nexport interface FormExperienceSettings<TAllowedGatingState extends GatingState.FormExperience = GatingState.FormExperience> extends MarketoFormSettings<GatingLevel.MarketoForm> {\r\n  readonly formSettingsKey: AnyFormSettingsKey,\r\n  readonly formTrackingName: FormTrackingName,\r\n  readonly canUseModal: boolean,\r\n  readonly gateLevelSource: GateLevelSource[]\r\n  readonly allowedGatingStates: readonly TAllowedGatingState[];\r\n  readonly defaultGateLevel?: (TAllowedGatingState & (\"FullGate\" | \"PartialGate\"));\r\n}\r\n\r\nexport const FormExperienceSettings = _formExperienceSettingsArray as unknown as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AClB,YAAa,GACb,gBAAiB,CAAC,MAAM,EACxB,oBAAqB,CAAC,UAAU,CAClC,CAAC,EACD,mCAAoCA,EAAyB,CAC3D,gBAAiB,mCACjB,QAAS,mCACT,iBAAkB,yCAClB,YAAa,GACb,gBAAiB,CAAC,MAAM,EACxB,oBAAqB,CAAC,UAAU,CAClC,CAAC,EACD,8BAA+BA,EAAyB,CACtD,gBAAiB,8BACjB,QAAS,sBACT,iBAAkB,wBAClB,YAAa,GACb,gBAAiB,CAAC,MAAM,EACxB,oBAAqB,CAAC,UAAU,CAClC,CAAC,CACH,EAGMC,GAA+B,OAAO,OAAO,OAAO,OAAOF,EAA4B,CAAC,EAGxFG,GAAuCD,GAA6B,IAAIE,GAAKA,EAAE,gBAAgB",
  "names": ["isNull", "value", "isUndefined", "isNil", "isNotNil", "isString", "isSymbol", "isObject", "isFunction", "value", "isBoolean", "value", "isNumber", "isArray", "value", "isArrayOfType", "value", "typeCheckFunc", "isArray", "isStringArray", "isString", "convertKebabToCamelCase", "str", "x", "isEmptyString", "value", "isStringLiteralOfType", "value", "possibleValues", "isArray", "isString", "excludeFrom", "arr", "exclusions", "result", "a", "isAnyHTMLInputElementType", "value", "isObject", "createReverseObjectMap", "value", "isObject", "keys", "k", "exhaustiveGuard", "message", "createEnumFromKeys", "camelCaseProps", "result", "key", "convertKebabToCamelCase", "getTypedObjectKeys", "obj", "checkIsNilOrWhitespaceAfterTrim", "isNil", "isString", "isEmptyString", "defaultIfNilOrWhiteSpace", "options", "numDefaults", "returnVal", "i", "curOptions", "getter", "defaultValue", "isFunction", "getValueFromPropsPath", "item", "path", "valueIfPathInvalid", "curValue", "prop", "mapArrayToProp", "array", "prop", "el", "flatMapArrayToNestedProp", "array", "path", "defaultIfNever", "el", "getValueFromPropsPath", "uniqueTupleValues", "array", "v", "i", "convertArrayToPropIndexedObject", "array", "indexBy", "result", "item", "propValue", "checkLocalStorageAvailable", "storage", "x", "e", "parseTagsObjFromLocalStorage", "propName", "localStorageTagsString", "localStorageTags", "isObject", "localStorageTagKeys", "k", "isStringArray", "isNull", "readPropFromLocalStorage", "checkLocalStorageAvailable", "isString", "saveValueToLocalStorage", "value", "saveToLocalStorage", "removeValueFromLocalStorage", "mergeTagsObjects", "tagsObjOne", "tagsObjTwo", "mergeFunc", "allKeys", "newTagsObj", "key", "propMergeRes", "isUndefined", "mergeInitialWithLocalStorageValue", "initialValue", "localStorageVal", "removeExtraTagsFromInitial", "valOne", "valTwo", "el", "definePropOnWindow", "propDescriptor", "isNil", "mergedValue", "parseTagsObj", "obj", "objKeys", "addTagsToTagsObj", "newTags", "newKeys", "tagsToAdd", "t", "removeTagsFromTagsObj", "tagsToRemove", "keys", "tagsToRemoveVal", "item", "getLoggerFilter", "dTags", "addLoggerFilter", "filteredTags", "removeLoggerFilter", "getLoggerFilterOverride", "overrides", "addLoggerFilterOverride", "filteredTagsOverride", "removeLoggerFilterOverride", "resetLoggerFilter", "oKeys", "checkLoggerIsFiltered", "logger", "tags", "tagVal", "filteredVal", "overrideVal", "WindowConsole", "ConsoleLoggingLevels", "BasicConsoleFnKeys", "getStringFromStyleObject", "stylesObj", "cssStyles", "styleProp", "BasicButtonLabelStyle", "LoggerLevelColors", "LoggerLevelLabelStyle", "getLevelLabelStyle", "level", "color", "getStyledMessageArgs", "messages", "styles", "formattingSuffix", "firstArg", "remainingArgsArr", "ConsoleLoggingLevels", "maxMessagesOrStyles", "i", "msg", "styleObj", "styleCss", "isObject", "isNotNil", "isString", "getLoggerPrefixArgs", "logger", "level", "getStyledMessageArgs", "getConsoleFn", "fnName", "WindowConsole", "getBoundConsoleFn", "args", "getBoundLoggerFnOrNoop", "logger", "fnName", "args", "BasicConsoleFnKeys", "level", "ConsoleLoggingLevels", "getBoundConsoleFn", "getBoundLoggerFnFromPrefixArgs", "getLoggerPrefixArgs", "Logger", "_Logger", "#prefixes", "#prefixStyles", "#tags", "#allUsedTags", "#addToUsedTags", "tags", "k", "isString", "item", "prefixStrings", "prefixStyles", "getLoggerFilter", "filteredTags", "addLoggerFilter", "tagsToRemove", "removeLoggerFilter", "getLoggerFilterOverride", "filteredTagsOverride", "addLoggerFilterOverride", "checkLoggerIsFiltered", "resetLoggerFilter", "#getFnWithBoundArgs", "style", "formattingSuffix", "styles", "isObject", "logFnBoundArgs", "getStyledMessageArgs", "opts", "#stylePresets", "BasicButtonLabelStyle", "BaseFormLogger", "Logger", "SecondButtonDefaultStyle", "GatingLevel", "Resource", "GatingState", "GatingLevel", "AllForms", "createEnabledFieldsInstance", "Hidden", "Partial", "Full", "isArray", "enabledFields", "ContactForm_FullGate", "EnabledFields", "excludeFrom", "MarketoFormSettingsObject", "EnabledFields", "_marketoFormSettingsArray", "MarketoFormSettingsKey", "f", "MarketoFormId", "getDefaultGateLevelFromAllowedGatingStates", "formSettingsKey", "_mktoKey", "gateLevelSource", "allowedGatingStates", "glsLen", "gls0", "agsLen", "requiredStateIdx", "a", "ags0", "ags1", "createExperienceSettings", "mktoKey", "formTrackingName", "canUseModal", "defaultGateLevel", "defaultGateLevelObj", "isNil", "gateLevelForSelfSourceFromAllowedGatingStates", "isNotNil", "expSettings", "MarketoFormSettingsObject", "NoBlindSubmit", "excludeFrom", "GatingState", "FormExperienceSettingsObject", "createExperienceSettings", "_formExperienceSettingsArray", "FormTrackingName", "s"]
}