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AAIpD,KACzDoD,SACG,oCACA,IAAM,IAAIlD,KAEbkD,SAAS,kCAA2C,IAAM,IAAI/C,KAC9D+C,SACG,8CACA,IAAM,IAAIpB,KAEboB,SACG,YACA,IACI,IAAI,EAAAU,UAAU,CACV9I,YAAa,GACbC,eAAgB,OAIhC,MAAM,WAAE8I,KAAe,OAAc7I,G","sources":["webpack://elc-service-content/./src/internal/constants/VtoFoundationOverlay.ts","webpack://elc-service-content/./src/internal/constants/VtoFoundationQrCodeOverlay.ts","webpack://elc-service-content/./src/api/ContentApiSdk.ts","webpack://elc-service-content/./src/service-setup/ConfigStore.tsx","webpack://elc-service-content/./src/internal/use-cases/LoadContentUseCase.ts","webpack://elc-service-content/./src/service-setup/ServiceBusController.ts","webpack://elc-service-content/./src/internal/controllers/ContentBlockViewController.ts","webpack://elc-service-content/./src/internal/use-cases/ToutLinkClickedUseCase.ts","webpack://elc-service-content/./src/internal/controllers/BasicToutViewController.ts","webpack://elc-service-content/./src/internal/controllers/VtoBaseViewController.ts","webpack://elc-service-content/./src/internal/utils/getSearchParam.ts","webpack://elc-service-content/./src/internal/utils/getProductIdFromUrl.ts","webpack://elc-service-content/./src/internal/controllers/VtoFoundationOverlayViewController.ts","webpack://elc-service-content/./src/internal/controllers/VideoToutViewController.ts","webpack://elc-service-content/./src/internal/controllers/VideoToutYoutubeViewController.ts","webpack://elc-service-content/./src/internal/use-cases/FindationButtonClickedUseCase.ts","webpack://elc-service-content/./src/internal/controllers/ThirdPartyToutViewController.ts","webpack://elc-service-content/./src/internal/domain/entities/Node.ts","webpack://elc-service-content/./src/internal/repositories/ContentRepository.ts","webpack://elc-service-content/./src/internal/repositories/ProductRepository.ts","webpack://elc-service-content/./src/internal/controllers/VtoFoundationQrCodeOverlayViewController.ts","webpack://elc-service-content/./src/service-setup/diContainer.tsx"],"sourcesContent":["export const VTO_BEST_SHADE_HEX_VALUE = 'vto-best-shade-hex-value';\nexport const VTO_BEST_SHADE_NAME = 'vto-best-shade-name';\nexport const VTO_DISCLOSE_PARAM = 'vto_disclose';\nexport const VTO_FOUNDATION = 'Foundation';\nexport const VTO_FOUNDATION_OVERLAY_CLOSE = 'vto-foundation-overlay-close';\nexport const VTO_FOUNDATION_START_NOW_BUTTON = 'vto-foundation-start-now-button';\n","export const VTO_FOUNDATION_QR_CODE_OVERLAY_DISCLAIMER =\n    'vto-foundation-qr-code-overlay-disclaimer';\nexport const VTO_FOUNDATION_QR_CODE_OVERLAY_DETAIL = 'vto-foundation-qr-code-overlay-detail';\nexport const VTO_FOUNDATION_QR_CODE_OVERLAY_SUBTITLE = 'vto-foundation-qr-code-overlay-subtitle';\nexport const VTO_FOUNDATION_QR_CODE_OVERLAY_TITLE = 'vto-foundation-qr-code-overlay-title';\n\nexport const VTO_OPEN_QUERY_PARAM = 'vto_open';\nexport const VTO_OPEN_QUERY_VALUE = '1';\n","import { DrupalApi } from '@estee/elc-drupal-api';\nimport { IConfig } from '@estee/elc-service';\nimport { INodeData } from '~domain/entities/Node';\n\nexport interface INodeTemplateFields {\n    data: INodeData;\n    layout: string;\n}\n\nexport interface INodeTemplate {\n    [key: string]: {\n        template_fields: INodeTemplateFields;\n    };\n}\nexport interface INodeTemplateError {\n    [key: string]: {\n        error: {\n            code: string;\n            message: string;\n        };\n    };\n}\nconst { name, version } = __serviceInfo__;\n\nexport class ContentApiSdk extends DrupalApi {\n    private contentApiBasePath: string = 'elc_api/node';\n\n    constructor(config: IConfig) {\n        super(config, name, version);\n    }\n\n    public getContent = async (nid: number) => {\n        const url = this.getApiUrl(nid);\n\n        const response = await this.fetch<INodeTemplate | INodeTemplateError>({\n            url\n        });\n\n        return response.data;\n    };\n\n    private getApiUrl(nid: number): string {\n        const base = this.apiHost;\n        const args = [base, this.contentApiBasePath, nid, 'all', 'api'];\n\n        return args.join('/');\n    }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { observable, action } from 'mobx';\n\nexport class ConfigStore {\n    @observable public config: any;\n\n    constructor(config: any) {\n        this.updateConfig(config);\n    }\n\n    @action\n    public updateConfig(config: any) {\n        this.config = { ...config };\n    }\n}\n","import { diContainer } from '~setup/diContainer';\nimport serviceNames from '~setup/ContentService';\nimport { ContentRepository } from '~repositories/ContentRepository';\nimport { ContentState } from '~exported/content-block/ContentBlock';\nimport { ELCLogger, TriggerType } from '@estee/elc-logging';\n\nconst { name, version } = __serviceInfo__;\n\nexport class LoadContentUseCase {\n    private nid: number;\n    private contentRepository: ContentRepository;\n    private logger: ELCLogger;\n    private state?: ContentState;\n\n    constructor(nid: number, state?: ContentState) {\n        this.nid = nid;\n        this.state = state;\n        this.contentRepository = diContainer.get(serviceNames.contentRepository);\n        this.logger = diContainer.get(serviceNames.logger);\n    }\n\n    public execute = async () => {\n        try {\n            const content = this.state && this.state.content.get(this.nid);\n            content\n                ? this.contentRepository.setContent(content)\n                : await this.contentRepository.loadContentData(this.nid);\n        } catch (error) {\n            this.logger.error({\n                triggerType: TriggerType.render,\n                message: error.message,\n                payload: {\n                    error,\n                    serviceName: name,\n                    serviceVersion: version\n                }\n            });\n        }\n    };\n}\n","import { ContentRepository } from '../internal/repositories/ContentRepository';\nimport { LoadContentUseCase } from '../internal/use-cases/LoadContentUseCase';\n\nexport class ServiceBusController {\n    private contentRepository: ContentRepository;\n\n    constructor(contentRepository: ContentRepository) {\n        this.contentRepository = contentRepository;\n    }\n\n    public getServices = async ({ nodeId }: { nodeId: number }) => {\n        await new LoadContentUseCase(nodeId).execute();\n        const templates = this.contentRepository.nodes.get(nodeId);\n\n        return templates ? templates.data : [];\n    };\n}\n","import { observable, action, computed } from 'mobx';\nimport { ViewController } from '@estee/elc-service';\nimport { LoadContentUseCase } from '../use-cases/LoadContentUseCase';\nimport { ContentRepository } from '../repositories/ContentRepository';\nimport { diContainer } from '../../service-setup/diContainer';\nimport serviceNames from '~setup/ContentService';\nimport { INodeContent } from '~domain/entities/Node';\nimport { IContentBlock } from '../../exported/content-block/ContentBlock';\n\nexport class ContentBlockViewController extends ViewController {\n    @observable private contentRepository: ContentRepository;\n\n    constructor() {\n        super();\n        this.contentRepository = diContainer.get(serviceNames.contentRepository);\n    }\n\n    @action\n    public loaded = async (props: IContentBlock) => {\n        const { nid } = props.config;\n        this.isLoading = true;\n        const loadContentUseCase = new LoadContentUseCase(nid, props.state);\n        await loadContentUseCase.execute();\n\n        this.isLoading = false;\n    };\n\n    @computed\n    get data() {\n        return {\n            content: this.contentRepository.nodes\n        };\n    }\n\n    public getContent(nid: number) {\n        return <INodeContent | undefined>this.contentRepository.getContent(nid);\n    }\n}\n","import { emit, events } from '@estee/elc-service-bus';\n\nexport class ToutLinkClickedUseCase {\n    private siteUrl: string;\n\n    constructor(siteUrl: string) {\n        this.siteUrl = siteUrl;\n    }\n\n    public execute = async () => {\n        emit(events.CHANGE_LOCATION, {\n            // @TODO update this to use the plugin's output rather than hardcoding the protocol check\n            redirectUrl:\n                this.siteUrl.startsWith('http') || this.siteUrl.startsWith('/')\n                    ? this.siteUrl\n                    : `/${this.siteUrl}`\n        });\n    };\n}\n","import { action, observable, computed } from 'mobx';\nimport { IBasicToutProps } from '~exported/basic-tout/BasicTout';\nimport { ViewController } from '@estee/elc-service';\nimport { emit, events } from '@estee/elc-service-bus';\nimport { INodeContent } from '~domain/entities/Node';\nimport { ToutLinkClickedUseCase } from '~use-cases/ToutLinkClickedUseCase';\n\nexport class BasicToutViewController extends ViewController {\n    @observable public _content: Map<number, INodeContent>;\n\n    constructor() {\n        super();\n        this._content = new Map();\n    }\n\n    @action\n    public loaded = async (props: IBasicToutProps) => {\n        this.isLoading = true;\n        const { nid, layout, data } = props.config;\n        this.content = {\n            nid,\n            layout,\n            data\n        };\n\n        emit(events.BASIC_TOUT_LOADED, {});\n\n        this.isLoading = false;\n    };\n\n    public redirectToSiteUrl = (siteUrl: string) => {\n        const toutLinkClickedUseCase = new ToutLinkClickedUseCase(siteUrl);\n        toutLinkClickedUseCase.execute();\n    };\n\n    @computed\n    get data() {\n        return {\n            content: this._content\n        };\n    }\n\n    public getContent(nid: number) {\n        return this._content.get(nid);\n    }\n\n    public set content(input: INodeContent) {\n        const { nid } = input;\n        this._content.set(nid, { ...input });\n    }\n}\n","import { action, observable } from 'mobx';\nimport { ViewController } from '@estee/elc-service';\nimport { emit, events, query, serviceQueries } from '@estee/elc-service-bus';\nimport { ProductRepository } from '../repositories/ProductRepository';\nimport { getProductIdFromUrl } from '../utils/getProductIdFromUrl';\nimport { getSearchParam } from '../utils/getSearchParam';\nimport { VTO_DISCLOSE_PARAM, VTO_FOUNDATION } from '../constants/VtoFoundationOverlay';\nimport { diContainer } from '../../service-setup/diContainer';\nimport serviceNames from '~setup/ContentService';\n\ninterface IBestMatch {\n    hexVal: string;\n    name: string;\n}\n\ninterface IVtoFoundationPayload {\n    vtoType: string;\n}\n\nexport class VtoBaseViewController extends ViewController {\n    @observable public bestMatch: IBestMatch;\n    @observable public isVtoDisclosed: boolean = false;\n    @observable public isLoading: boolean = true;\n    private productRepository: ProductRepository;\n    private vtoFoundationPayload: IVtoFoundationPayload = { vtoType: VTO_FOUNDATION };\n\n    constructor() {\n        super();\n        this.productRepository = diContainer.get(serviceNames.productRepository);\n    }\n\n    @action\n    public setIsVtoDisclosed = () => {\n        const vtoDiscloseParam = getSearchParam(VTO_DISCLOSE_PARAM);\n        this.isVtoDisclosed = vtoDiscloseParam !== null;\n    };\n\n    @action\n    public setBestMatch = async () => {\n        const bestMatchSkuId = await this.getBestMatchSkuId();\n\n        if (!bestMatchSkuId) {\n            return;\n        }\n\n        const bestMatch = await this.getShadeData(bestMatchSkuId);\n\n        if (bestMatch?.name) {\n            const { name, hexVal } = bestMatch;\n            this.bestMatch = { name, hexVal };\n\n            emit(events.VTO_SHADE_REMINDER_OVERLAY_OPENED, this.vtoFoundationPayload);\n        }\n    };\n\n    public closeShadeReminderOverlay = () => {\n        emit(events.VTO_SHADE_REMINDER_OVERLAY_CLOSED, this.vtoFoundationPayload);\n    };\n\n    public retainShadeReminderOverlay = () => {\n        emit(events.VTO_SHADE_REMINDER_OVERLAY_RETAINED, this.vtoFoundationPayload);\n    };\n\n    public retakeVtoShadeReminder = () => {\n        emit(events.VTO_SHADE_REMINDER_OVERLAY_RETAKEN, this.vtoFoundationPayload);\n    };\n\n    private async getBestMatchSkuId() {\n        const productId = getProductIdFromUrl();\n\n        if (!productId) {\n            return;\n        }\n\n        return query(serviceQueries.GET_BEST_MATCH_SKU_ID, { productId });\n    }\n\n    private async getShadeData(skuId: string) {\n        const sku = await this.productRepository.getSkuById(skuId);\n\n        if (sku && sku.shades.length > 0) {\n            return sku.shades[0];\n        }\n    }\n}\n","import { root } from '@estee/elc-universal-utils';\n\nexport const getSearchParam = (searchKey: string) => {\n    const search = (<Location>root.location).search;\n    const searchParams = new URLSearchParams(search);\n\n    return searchParams.get(searchKey);\n};\n","import { root } from '@estee/elc-universal-utils';\n\nconst PRODUCT_ID_POSITION = 2;\n\nexport const getProductIdFromUrl = () => {\n    const path = root.location.pathname;\n    const splitPath = path.split('/');\n    const productIndex = splitPath.indexOf('product');\n\n    if (productIndex > 0) {\n        return splitPath[productIndex + PRODUCT_ID_POSITION];\n    }\n};\n","import { action, observable, computed } from 'mobx';\nimport {\n    IVtoFoundationOverlayProps,\n    IVtoFoundationOverlayNodeContent,\n    IVtoFoundationOverlayNodeData\n} from '~exported/vto-foundation-overlay/VtoFoundationOverlay';\nimport { VtoBaseViewController } from './VtoBaseViewController';\nimport { emit, events } from '@estee/elc-service-bus';\n\nexport interface IProductVtoWindow extends Window {\n    YMK: {\n        open(\n            loadLiveCam: boolean,\n            imageObject: Record<string, unknown> | null,\n            detectSkin: boolean\n        ): void;\n    };\n}\n\ndeclare let window: IProductVtoWindow;\nexport class VtoFoundationOverlayViewController extends VtoBaseViewController {\n    @observable public _content: Map<number, IVtoFoundationOverlayNodeContent>;\n    @observable public overlayData = {} as IVtoFoundationOverlayNodeData;\n    @observable private _isDisclaimerChecked = false;\n\n    constructor() {\n        super();\n        this._content = new Map();\n        this.setIsVtoDisclosed();\n    }\n\n    @action\n    public loaded = async (props: IVtoFoundationOverlayProps) => {\n        const { nid, layout, data = [] } = props.config;\n        this.content = {\n            nid,\n            layout,\n            data\n        };\n\n        const [overlayData] = data;\n        this.overlayData = overlayData || this.overlayData;\n\n        this.isLoading = true;\n\n        if (this.overlayData.showShadeReminderScreen) {\n            await this.setBestMatch();\n        }\n\n        this.isLoading = false;\n    };\n\n    @computed\n    get data() {\n        return {\n            bestMatch: this.bestMatch,\n            content: this._content,\n            isVtoDisclosed: this.isVtoDisclosed,\n            isBestMatch: this.isBestMatch,\n            isLoading: this.isLoading,\n            title: this.title,\n            subtitle: this.subtitle,\n            isDisclaimerChecked: this.isDisclaimerChecked\n        };\n    }\n\n    @action\n    public toggleDisclaimerCheck = () => {\n        this._isDisclaimerChecked = !this._isDisclaimerChecked;\n    };\n\n    public getContent(nid: number) {\n        return this._content.get(nid);\n    }\n\n    public set content(input: IVtoFoundationOverlayNodeContent) {\n        const { nid } = input;\n        this._content.set(nid, { ...input });\n    }\n\n    public openFoundationVto = () => {\n        const loadLiveCam = true;\n        const imageObject = null;\n        const detectSkin = true;\n        if (typeof window.YMK === 'object') {\n            window.YMK.open(loadLiveCam, imageObject, detectSkin);\n        }\n\n        if (this.isBestMatch) {\n            this.retakeVtoShadeReminder();\n        }\n    };\n\n    public selectShade = () => {\n        emit(events.PRODUCT_SHADE_SELECTED, { shadeName: this.bestMatch.name });\n        emit(events.VTO_FOUNDATION_OVERLAY_TOGGLED, { isOverlayOpened: false });\n        this.retainShadeReminderOverlay();\n    };\n\n    public closeOverlay = () => {\n        if (this.isBestMatch) {\n            this.closeShadeReminderOverlay();\n        }\n\n        emit(events.VTO_FOUNDATION_OVERLAY_TOGGLED, { isOverlayOpened: false });\n    };\n\n    @computed\n    get isBestMatch() {\n        return !!this.bestMatch;\n    }\n\n    @computed\n    get title() {\n        const { title, bestMatchTitle } = this.overlayData;\n\n        return this.isBestMatch ? bestMatchTitle : title;\n    }\n\n    @computed\n    get subtitle() {\n        const { copy: subtitle, bestMatchSubtitle } = this.overlayData;\n\n        return this.isBestMatch ? bestMatchSubtitle : subtitle;\n    }\n\n    @computed\n    public get isDisclaimerChecked() {\n        return this._isDisclaimerChecked;\n    }\n}\n","import { action, observable, computed } from 'mobx';\nimport { ViewController } from '@estee/elc-service';\nimport { INodeContent } from '../domain/entities/Node';\nimport { IVideoToutProps } from '~exported/video-tout/VideoTout';\n\nexport class VideoToutViewController extends ViewController {\n    @observable public _content: Map<number, INodeContent>;\n\n    constructor() {\n        super();\n        this._content = new Map();\n    }\n\n    @action\n    public initialize = async (props: IVideoToutProps) => {\n        this.isLoading = true;\n        const { nid, layout, data } = props.config;\n        this.content = {\n            nid,\n            layout,\n            data\n        };\n\n        this.isLoading = false;\n    };\n\n    @computed\n    get data() {\n        return {\n            content: this._content\n        };\n    }\n\n    public getContent(nid: number) {\n        return this._content.get(nid);\n    }\n\n    public set content(input: INodeContent) {\n        const { nid } = input;\n        this._content.set(nid, { ...input });\n    }\n}\n","import { action, observable, computed } from 'mobx';\nimport { IVideoToutYoutubeProps } from '~exported/video-tout-youtube/VideoToutYoutube';\nimport { ViewController } from '@estee/elc-service';\nimport { INodeContent } from '~domain/entities/Node';\n\nexport class VideoToutYoutubeViewController extends ViewController {\n    @observable public _content: Map<number, INodeContent>;\n\n    constructor() {\n        super();\n        this._content = new Map();\n    }\n\n    @action\n    public initialize = async (props: IVideoToutYoutubeProps) => {\n        this.isLoading = true;\n        const { nid, layout, data } = props.config;\n        this.content = {\n            nid,\n            layout,\n            data\n        };\n\n        this.isLoading = false;\n    };\n\n    @computed\n    get data() {\n        return {\n            content: this._content\n        };\n    }\n\n    public getContent(nid: number) {\n        return this._content.get(nid);\n    }\n\n    public set content(input: INodeContent) {\n        const { nid } = input;\n        this._content.set(nid, { ...input });\n    }\n}\n","import { emit, events } from '@estee/elc-service-bus';\n\nexport class FindationButtonClickedUseCase {\n    private findationKey: string;\n\n    constructor(findationKey: string) {\n        this.findationKey = findationKey;\n    }\n\n    public execute = async () => {\n        emit(events.FINDATION_BUTTON_CLICKED, {\n            findationKey: this.findationKey\n        });\n    };\n}\n","import { action, observable, computed } from 'mobx';\nimport { IThirdPartyToutNodeContent } from '~exported/third-party-tout/ThirdPartyTout';\nimport { ViewController } from '@estee/elc-service';\nimport { INodeContent } from '~domain/entities/Node';\nimport { FindationButtonClickedUseCase } from '~use-cases/FindationButtonClickedUseCase';\n\nexport class ThirdPartyToutViewController extends ViewController {\n    @observable public _content: Map<number, INodeContent>;\n\n    constructor() {\n        super();\n        this._content = new Map();\n    }\n\n    @action\n    public initialize = (props: IThirdPartyToutNodeContent) => {\n        this.isLoading = true;\n        const { nid, layout, data } = props;\n        this.content = {\n            nid,\n            layout,\n            data\n        };\n\n        this.isLoading = false;\n    };\n\n    public openFindationPopup = (findationKey: string) => {\n        const findationButtonClickedUseCase = new FindationButtonClickedUseCase(findationKey);\n        findationButtonClickedUseCase.execute();\n    };\n\n    @computed\n    get data() {\n        return {\n            content: this._content\n        };\n    }\n\n    public getContent(nid: number) {\n        return this._content.get(nid);\n    }\n\n    public set content(input: INodeContent) {\n        const { nid } = input;\n        this._content.set(nid, { ...input });\n    }\n}\n","import { observable, set } from 'mobx';\n\nexport interface INodeData {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    [key: string]: string | any;\n}\n\nexport interface INodeContent {\n    nid: number;\n    layout: string;\n    data: INodeData[];\n}\n\nexport interface IMantleMedia {\n    src: string;\n    alt: string;\n    device_mp4_url: string;\n    hex: string;\n    background_color_fallback: string;\n    html: string;\n}\n\nexport interface IMantleRichText {\n    html_tag: string;\n    font_classes: string;\n    text_content: string;\n    html: string;\n}\n\nexport interface IMantleCtaButton {\n    href: string;\n    text: string;\n    classname: string;\n    color_vals: boolean;\n    bgcolor: string;\n    textcolor: string;\n    bordercolor: string;\n    trigger_type: string;\n    open_new_window: boolean;\n}\n\nexport interface IImage {\n    src: string;\n    alt: string;\n    html: string;\n}\n\nexport interface IHexColor {\n    hex: string;\n}\n\nexport class Node {\n    @observable public nid: number;\n    @observable public layout: string;\n    @observable public data: INodeData[] = [];\n\n    public static fromJson(data: INodeContent): INodeContent {\n        const node = new Node();\n        set(node, data);\n\n        node.nid = data.nid;\n        node.layout = data.layout;\n        node.data = data.data;\n\n        return node;\n    }\n}\n","import { observable, action } from 'mobx';\nimport { ContentApiSdk, INodeTemplate, INodeTemplateError } from '~api/ContentApiSdk';\nimport { diContainer } from '~setup/diContainer';\nimport serviceNames from '~setup/ContentService';\nimport { Node, INodeContent } from '~domain/entities/Node';\n\nexport class ContentRepository {\n    private contentApiSdk: ContentApiSdk;\n    @observable private _nodes: Map<number, INodeContent>;\n\n    constructor() {\n        this.contentApiSdk = diContainer.get(serviceNames.contentApiSdk);\n        this._nodes = new Map();\n    }\n\n    @action\n    public loadContentData = async (nid: number): Promise<void | null> => {\n        const cached = this.getContent(nid);\n        if (cached) {\n            return;\n        }\n\n        const apiResponse = await this.contentApiSdk.getContent(nid);\n\n        if (nid in apiResponse) {\n            const templateFields = (<INodeTemplate>apiResponse)[nid].template_fields || {\n                layout: '',\n                data: []\n            };\n\n            const templateNodes = Array.isArray(templateFields) ? templateFields : [templateFields];\n\n            const { layout } = <INodeContent>templateNodes[0];\n            const data = templateNodes.map((item) => item.data);\n\n            this.setContent({\n                nid,\n                layout,\n                data\n            });\n\n            const error = (<INodeTemplateError>apiResponse)[nid].error;\n\n            if (error) {\n                throw new Error(`code error: ${error.code}, message: ${error.message}`);\n            }\n        }\n    };\n\n    @action\n    public setContent(content: INodeContent): void {\n        const { nid } = content;\n        this._nodes.set(nid, Node.fromJson(content));\n    }\n\n    public getContent(nid: number): INodeContent | undefined {\n        return <INodeContent | undefined>this._nodes.get(nid);\n    }\n\n    get nodes() {\n        return this._nodes;\n    }\n}\n","import { query, serviceQueries } from '@estee/elc-service-bus';\n\ninterface IShade {\n    hexVal: string;\n    name: string;\n}\n\ninterface ISku {\n    shades: IShade[];\n    skuId: string;\n}\n\ninterface IProduct {\n    skus: ISku[];\n    productId: string;\n}\n\nexport class ProductRepository {\n    private skus: ISku[] = [];\n\n    public getSkuById = async (skuId: string) => {\n        const sku = this.findSkuById(skuId);\n        if (sku) {\n            return sku;\n        }\n\n        const product = await this.getProductBySkuId(skuId);\n\n        if (product) {\n            this.skus = [...this.skus, ...product.skus];\n\n            return this.findSkuById(skuId);\n        }\n    };\n\n    private async getProductBySkuId(skuId: string) {\n        const productData = <IProduct[]>await query(serviceQueries.GET_PRODUCT_DATA, {\n            filterBy: { skus: { skuIds: [skuId] } }\n        });\n\n        if (productData?.length > 0) {\n            return productData[0];\n        }\n    }\n\n    private findSkuById(skuId: string) {\n        return this.skus.find((sku) => sku.skuId === skuId);\n    }\n}\n","import { action, observable, computed } from 'mobx';\nimport { root } from '@estee/elc-universal-utils';\nimport { IVtoFoundationQrCodeOverlayNodeData } from '~exported//vto-foundation-qr-code-overlay/VtoFoundationQrCodeOverlay';\nimport { emit, events } from '@estee/elc-service-bus';\nimport {\n    VTO_OPEN_QUERY_PARAM,\n    VTO_OPEN_QUERY_VALUE\n} from '../constants/VtoFoundationQrCodeOverlay';\nimport { VtoBaseViewController } from './VtoBaseViewController';\nimport { VTO_FOUNDATION } from '../constants/VtoFoundationOverlay';\n\nexport interface IVtoFoundationQrCodeOverlayViewController {\n    nodeData: IVtoFoundationQrCodeOverlayNodeData[];\n}\n\nexport class VtoFoundationQrCodeOverlayViewController extends VtoBaseViewController {\n    @observable public qrCodeUrl: string;\n    @observable public isQrCodeVisible: boolean = false;\n    @observable public overlayData = {} as IVtoFoundationQrCodeOverlayNodeData;\n\n    constructor() {\n        super();\n        this.setIsVtoDisclosed();\n    }\n\n    @action\n    public loaded = async (props: IVtoFoundationQrCodeOverlayViewController) => {\n        const { nodeData: [overlayData] = [] } = props;\n\n        this.overlayData = overlayData || this.overlayData;\n\n        this.isLoading = true;\n\n        this.setQrCodeUrl();\n\n        this.setIsQrCodeVisible(false);\n\n        if (this.overlayData.showShadeReminderScreen) {\n            await this.setBestMatch();\n        }\n\n        this.isLoading = false;\n    };\n\n    @computed\n    get data() {\n        return {\n            qrCodeUrl: this.qrCodeUrl,\n            isVtoDisclosed: this.isVtoDisclosed,\n            isLoading: this.isLoading,\n            isBestMatch: this.isBestMatch,\n            bestMatch: this.bestMatch,\n            title: this.title,\n            subtitle: this.subtitle\n        };\n    }\n\n    public closeOverlay = () => {\n        if (this.isBestMatch) {\n            this.closeShadeReminderOverlay();\n        }\n\n        emit(events.VTO_FOUNDATION_QR_CODE_OVERLAY_CLOSED, { vtoType: VTO_FOUNDATION });\n    };\n\n    public selectShade = () => {\n        emit(events.PRODUCT_SHADE_SELECTED, { shadeName: this.bestMatch.name });\n        this.closeOverlay();\n        this.retainShadeReminderOverlay();\n    };\n\n    @action\n    public setIsQrCodeVisible = (isVisible: boolean) => {\n        this.isQrCodeVisible = isVisible;\n    };\n\n    public findDifferentShade = () => {\n        this.setIsQrCodeVisible(true);\n        this.retakeVtoShadeReminder();\n    };\n\n    @computed\n    get isBestMatch() {\n        return !!this.bestMatch && !this.isQrCodeVisible;\n    }\n\n    @computed\n    get title() {\n        const { title, bestMatchTitle } = this.overlayData;\n\n        return this.isBestMatch ? bestMatchTitle : title;\n    }\n\n    @computed\n    get subtitle() {\n        const { subtitle, bestMatchSubtitle } = this.overlayData;\n\n        return this.isBestMatch ? bestMatchSubtitle : subtitle;\n    }\n\n    @action\n    private setQrCodeUrl() {\n        const currentLocation = new URL(root.location.toString());\n        currentLocation.search = this.getQueryString(currentLocation);\n        this.qrCodeUrl = currentLocation.toString();\n    }\n\n    private getQueryString(currentLocation: URL) {\n        const search = new URLSearchParams(currentLocation.search);\n\n        const { qrCodeQueryParams } = this.overlayData;\n\n        const qrCodeQuerySearch = qrCodeQueryParams && new URLSearchParams(qrCodeQueryParams);\n\n        const qrCodeParams = new URLSearchParams({\n            ...Object.fromEntries(search),\n            ...(qrCodeQuerySearch && Object.fromEntries(qrCodeQuerySearch))\n        });\n\n        qrCodeParams.set(VTO_OPEN_QUERY_PARAM, VTO_OPEN_QUERY_VALUE);\n\n        return qrCodeParams.toString();\n    }\n}\n","import { Container } from 'hypo-container';\nimport { getDecorators } from '@estee/elc-service';\nimport { HttpTransport } from '@estee/elc-http-transport';\nimport { ContentApiSdk } from '~api/ContentApiSdk';\nimport { ConfigStore } from '~setup/ConfigStore';\nimport { ContentService } from './ContentService';\nimport { ServiceBusController } from './ServiceBusController';\nimport { ContentBlockViewController } from '~controllers/ContentBlockViewController';\nimport { BasicToutViewController } from '~controllers/BasicToutViewController';\nimport { VtoFoundationOverlayViewController } from '~controllers/VtoFoundationOverlayViewController';\nimport { VideoToutViewController } from '~controllers/VideoToutViewController';\nimport { VideoToutYoutubeViewController } from '~controllers/VideoToutYoutubeViewController';\nimport { ThirdPartyToutViewController } from '~controllers/ThirdPartyToutViewController';\nimport { ContentRepository } from '~repositories/ContentRepository';\nimport { ProductRepository } from '~repositories/ProductRepository';\nimport { Node } from '~domain/entities/Node';\nimport { VtoFoundationQrCodeOverlayViewController } from '~controllers/VtoFoundationQrCodeOverlayViewController';\nimport type { IAppConfig } from '@estee/elc-universal-utils';\nimport serviceNames from '~setup/ContentService';\nimport { ELCLogger } from '@estee/elc-logging';\n\nexport const diContainer = new Container();\n\nexport const setConfig = (configJSON: IAppConfig) => {\n    diContainer.config = configJSON;\n};\n\nconst { name, version } = __serviceInfo__;\n\ndiContainer\n    .register(\n        serviceNames.configStore,\n        diContainer.factory((c) => new ConfigStore(c.config))\n    )\n    .register(serviceNames.httpTransport, (c) => {\n        const configStore = c.get(serviceNames.configStore);\n        const httpTransport = new HttpTransport();\n        httpTransport.setBaseUrl(configStore.baseUrl);\n\n        return httpTransport;\n    })\n    .register(serviceNames.contentApiSdk, (c) => {\n        const configStore = c.get(serviceNames.configStore);\n        const httpTransport = c.get(serviceNames.httpTransport);\n        const config = {\n            businessUnitId: configStore.config.businessUnitId,\n            httpTransport\n        };\n\n        return new ContentApiSdk(config);\n    })\n    .register(\n        serviceNames.serviceBusController,\n        (c) => new ServiceBusController(c.get(serviceNames.contentRepository))\n    )\n    .register(\n        serviceNames.contentService,\n        (c) =>\n            new ContentService((config: IAppConfig) => {\n                setConfig(config);\n\n                c.get(serviceNames.serviceBusController);\n            })\n    )\n    .register(serviceNames.contentBlockViewController, () => new ContentBlockViewController())\n    .register(serviceNames.contentRepository, () => new ContentRepository())\n    .register(serviceNames.productRepository, () => new ProductRepository())\n    .register(serviceNames.contentNode, () => new Node())\n    .register(serviceNames.basicToutViewController, () => new BasicToutViewController())\n    .register(\n        serviceNames.vtoFoundationOverlayViewController,\n        () => new VtoFoundationOverlayViewController()\n    )\n    .register(serviceNames.videoToutViewController, () => new VideoToutViewController())\n    .register(\n        serviceNames.videoToutYoutubeViewController,\n        () => new VideoToutYoutubeViewController()\n    )\n    .register(serviceNames.thirdPartyToutViewController, () => new ThirdPartyToutViewController())\n    .register(\n        serviceNames.vtoFoundationQrCodeOverlayViewController,\n        () => new VtoFoundationQrCodeOverlayViewController()\n    )\n    .register(\n        serviceNames.logger,\n        () =>\n            new ELCLogger({\n                serviceName: name,\n                serviceVersion: version\n            })\n    );\n\nconst { lazyInject } = getDecorators(diContainer);\nexport { lazyInject };\n"],"names":["VTO_BEST_SHADE_HEX_VALUE","VTO_BEST_SHADE_NAME","VTO_DISCLOSE_PARAM","VTO_FOUNDATION","VTO_FOUNDATION_START_NOW_BUTTON","VTO_FOUNDATION_QR_CODE_OVERLAY_DISCLAIMER","VTO_FOUNDATION_QR_CODE_OVERLAY_DETAIL","VTO_FOUNDATION_QR_CODE_OVERLAY_SUBTITLE","VTO_FOUNDATION_QR_CODE_OVERLAY_TITLE","VTO_OPEN_QUERY_PARAM","VTO_OPEN_QUERY_VALUE","name","version","ContentApiSdk","DrupalApi","constructor","config","super","contentApiBasePath","getContent","nid","url","this","getApiUrl","fetch","data","apiHost","join","ConfigStore","updateConfig","LoadContentUseCase","state","execute","content","get","contentRepository","setContent","loadContentData","error","logger","triggerType","TriggerType","message","payload","serviceName","serviceVersion","diContainer","ServiceBusController","getServices","nodeId","templates","nodes","ContentBlockViewController","ViewController","loaded","props","isLoading","loadContentUseCase","ToutLinkClickedUseCase","siteUrl","emit","events","redirectUrl","startsWith","BasicToutViewController","layout","redirectToSiteUrl","_content","Map","input","set","VtoBaseViewController","isVtoDisclosed","vtoFoundationPayload","vtoType","setIsVtoDisclosed","vtoDiscloseParam","searchKey","search","URLSearchParams","getSearchParam","setBestMatch","bestMatchSkuId","getBestMatchSkuId","bestMatch","getShadeData","hexVal","closeShadeReminderOverlay","retainShadeReminderOverlay","retakeVtoShadeReminder","productRepository","productId","splitPath","split","productIndex","indexOf","getProductIdFromUrl","query","serviceQueries","skuId","sku","getSkuById","shades","length","VtoFoundationOverlayViewController","overlayData","_isDisclaimerChecked","showShadeReminderScreen","toggleDisclaimerCheck","openFoundationVto","window","YMK","open","isBestMatch","selectShade","shadeName","isOverlayOpened","closeOverlay","title","subtitle","isDisclaimerChecked","bestMatchTitle","copy","bestMatchSubtitle","VideoToutViewController","initialize","VideoToutYoutubeViewController","FindationButtonClickedUseCase","findationKey","ThirdPartyToutViewController","openFindationPopup","fromJson","node","Node","ContentRepository","apiResponse","contentApiSdk","templateFields","template_fields","templateNodes","Array","isArray","map","item","Error","code","_nodes","ProductRepository","skus","findSkuById","product","getProductBySkuId","productData","filterBy","skuIds","find","VtoFoundationQrCodeOverlayViewController","isQrCodeVisible","nodeData","setQrCodeUrl","setIsQrCodeVisible","isVisible","findDifferentShade","qrCodeUrl","currentLocation","URL","getQueryString","toString","qrCodeQueryParams","qrCodeQuerySearch","qrCodeParams","Object","fromEntries","Container","setConfig","configJSON","register","factory","c","configStore","httpTransport","HttpTransport","setBaseUrl","baseUrl","businessUnitId","ContentService","ELCLogger","lazyInject"],"sourceRoot":""}