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AOsH,aAAetH,OAAOsH,cAAgB,GAC7CtH,OAAOsH,aAAarB,QAAOsB,EAAAA,EAAA,GACpBvH,OAAOsH,aAAarB,SAAW,IAC/BD,EAAQC,SAGXjG,OAAOsH,aAAapB,YAAWqB,EAAAA,EAAA,GAC5BvH,OAAOsH,aAAapB,aAAe,IACnCF,EAAQE,aAEY,MAAMsB,EAAiB,GAC9BA,EAAe,uDAAyD,CAChFrB,EAAGA,IAAMC,EAAQ,MACjBqB,GAAI,mCAEpBzH,OAAOsH,aAAetH,OAAOsH,cAAgB,GAC7CtH,OAAOsH,aAAaE,eAAcD,EAAAA,EAAA,GACPvH,OAAOsH,aAAaE,gBAAkB,IACtCA,uBCnF3BE,EAAOC,QAAU1J,2BCAjByJ,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/actions/bedhub-footer.action.ts?7b9f","webpack://mattressfirm/./src/Utilities/get-bedhub-token.ts?632a","webpack://mattressfirm/./src/modules/mfrm-footer/mfrm-footer.tsx?733a","webpack://mattressfirm/./src/mfrm-components/mfrm-footer/footer-components/Categories.tsx?cd62","webpack://mattressfirm/./src/mfrm-components/mfrm-footer/footer-components/Socials.tsx?57ae","webpack://mattressfirm/./src/mfrm-components/mfrm-footer/footer-components/AccessibilityReader.tsx?070e","webpack://mattressfirm/./src/mfrm-components/mfrm-footer/footer-components/Disclosures.tsx?ef0b","webpack://mattressfirm/./src/mfrm-components/mfrm-footer/MFRMFooter.tsx?0fa0","webpack://mattressfirm/./src/mfrm-components/adaptor/footer/categories.ts?3979","webpack://mattressfirm/./src/mfrm-components/adaptor/footer/socials.ts?d05b","webpack://mattressfirm/./src/mfrm-components/adaptor/footer/accessibilityReader.ts?1a6e","webpack://mattressfirm/./src/mfrm-components/adaptor/footer/disclosures.ts?1e44","webpack://mattressfirm/./src/modules/mfrm-footer/mfrm-footer.view.tsx?1cd5","webpack://mattressfirm/./lib/mfrm-footer/module-registration.js?2311","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport axios from 'axios';\r\nimport { getAccessToken } from '../Utilities/get-bedhub-token';\r\n/**\r\n * BedhubFooterDataAction Input Action\r\n */\r\nexport class BedhubFooterInput implements Msdyn365.IActionInput {\r\n constructor() { }\r\n public getCacheKey = () => 'BedhubFooter';\r\n public getCacheObjectType = () => 'BedhubFooter';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\nconst createInput = (args: Msdyn365.ICreateActionContext>): Msdyn365.IActionInput => {\r\n // Ensure Bedhub API is Enable\r\n if (args.config && !args.config.bedhubDataSource) {\r\n throw new Error('Cant call BEDHUB API, as its turn off');\r\n } else {\r\n return new BedhubFooterInput();\r\n }\r\n};\r\nasync function getBedhubFooterData(input: BedhubFooterInput, ctx: Msdyn365.IActionContext): Promise {\r\n const baseURL = ctx?.requestContext?.app?.config?.bedhubBaseUrl;\r\n let token = '';\r\n try {\r\n token = await getAccessToken(baseURL, ctx.requestContext);\r\n } catch (error) {\r\n console.error('error for getting bedhub footer authorization token [getAccessToken]', error);\r\n }\r\n const graphqlURL = new URL('graphql', baseURL).href;\r\n try {\r\n // Query to get the GRAPHQL Data\r\n const query = `\r\n {\r\n ui {\r\n disclosure {\r\n maximum\r\n more {\r\n ariaLabel\r\n label\r\n }\r\n sections {\r\n html\r\n truncate\r\n }\r\n }\r\n footer {\r\n accessibilityReader {\r\n ariaLabel\r\n image {\r\n url\r\n }\r\n label\r\n openInNewTab\r\n type\r\n url\r\n }\r\n categories {\r\n items {\r\n ariaLabel\r\n label\r\n openInNewTab\r\n type\r\n url\r\n }\r\n label\r\n }\r\n socials {\r\n ariaLabel\r\n image {\r\n url\r\n }\r\n label\r\n openInNewTab\r\n type\r\n url\r\n }\r\n }\r\n }\r\n }\r\n `;\r\n const response = await axios.post(\r\n graphqlURL,\r\n JSON.stringify({\r\n query: query\r\n }),\r\n {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${token}`\r\n }\r\n }\r\n );\r\n if (response?.data) {\r\n return response.data;\r\n }\r\n return {};\r\n } catch (error) {\r\n console.error('error for bedhub footer [getBedhubFooterData]', error);\r\n return {};\r\n }\r\n}\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getBedhubFooterData,\r\n id: 'BedhubFooter',\r\n input: createInput\r\n});\r\n\r\n","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nexport async function getAccessToken(baseURL: string, ctx: Msdyn365.IRequestContext) {\r\n const clientId: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-client-id',\r\n ctx.apiSettings.baseUrl\r\n );\r\n const clientSecret: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-client-secret',\r\n ctx.apiSettings.baseUrl\r\n );\r\n const tenant: Msdyn365.ISecretValue | undefined = await Msdyn365.msdyn365Commerce.secretManager?.getSecretValue(\r\n 'bh-tenant-id',\r\n ctx.apiSettings.baseUrl\r\n );\r\n if (process.env.CURRENT_ENVIRONMENT === 'node') {\r\n const msalConfig = {\r\n auth: {\r\n authority: new URL(tenant?.value ?? '', 'https://login.microsoftonline.com').href,\r\n clientId: clientId?.value ?? '',\r\n clientSecret: clientSecret?.value ?? '',\r\n tenantId: tenant?.value ?? ''\r\n }\r\n };\r\n // eslint-disable-next-line @typescript-eslint/no-require-imports\r\n const ConfidentialClientApplication = require('@azure/msal-node').ConfidentialClientApplication;\r\n const msalInstance = new ConfidentialClientApplication(msalConfig);\r\n const token = await msalInstance.acquireTokenByClientCredential({ scopes: [new URL('.default', baseURL).href] });\r\n return token?.accessToken;\r\n }\r\n return '';\r\n }","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { IMfrmFooterData } from './mfrm-footer.data';\r\nimport { IMfrmFooterProps } from './mfrm-footer.props.autogenerated';\r\n\r\nexport interface IMfrmFooterViewProps extends IMfrmFooterProps {}\r\n\r\n/**\r\n *\r\n * MfrmFooter component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass MfrmFooter extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n return this.props.renderView(this.props);\r\n }\r\n}\r\n\r\nexport default MfrmFooter;\r\n","import Accordion from 'mfcl/Accordion';\r\nimport React from 'react';\r\n\r\n\r\nexport const Categories = (categories: any) => {\r\n\r\n const categoryElement = categories.categories.map((item:any) => {\r\n return (\r\n
\r\n

{item.title}

\r\n
    \r\n {item.items.map((item:any, i:number) => {\r\n const labels = item.label;\r\n const url = item.url;\r\n const ariaLabel = item.ariaLabel;\r\n return labels.map((label:string, i: number) => (\r\n
  • \r\n \r\n {label}\r\n \r\n
  • \r\n )\r\n );})}\r\n
\r\n
\r\n );\r\n });\r\n\r\n return (\r\n
\r\n
\r\n {categoryElement}\r\n
\r\n\r\n
\r\n {categories.categories.map((item:any) => {\r\n return (\r\n
\r\n \r\n {item.items.map((item:any, i:number) => {\r\n const labels = item.label;\r\n const url = item.url;\r\n const ariaLabel = item.ariaLabel;\r\n return labels.map((label:string, i: number) => (\r\n
  • \r\n \r\n {label}\r\n \r\n
  • \r\n )\r\n );})}\r\n \r\n }\r\n ]}\r\n />\r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n );\r\n};","import React from 'react';\r\n\r\ninterface ISocialProps {\r\n socials: any;\r\n}\r\n\r\nexport const Socials:React.FC = ({socials}) => {\r\n\r\n const socialsElement = socials.map((social: any) => {\r\n return (\r\n ) => {\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n // @ts-ignore\r\n // tslint:disable-next-line: object-literal-key-quotes max-line-length\r\n utag.link({\r\n event: 'outbound-social-link-click',\r\n event_category: 'outbound links',\r\n event_action: 'social link',\r\n event_label: `to: ${social.url}`,\r\n event_noninteraction: 'false'\r\n });\r\n }\r\n }}\r\n >\r\n \r\n {social.ariaLabel}\r\n \r\n \r\n );\r\n });\r\n\r\n if (socials) {\r\n return (\r\n
    {socialsElement}
    \r\n );\r\n } return null;\r\n};\r\n","import React from 'react';\r\n\r\nexport const AccessibilityReader = (accessibilityReader:any) => {\r\n\r\n\r\n const accessibility = accessibilityReader.accessibilityReader;\r\n\r\n if (accessibility){\r\n return (\r\n
    \r\n \r\n {accessibility.ariaLabel}\r\n \r\n
    \r\n );\r\n } return null;\r\n};","import React from 'react';\r\nimport { useState } from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nexport const Disclosures = (props: any) => {\r\n const { html, truncate } = props.disclosures;\r\n const { maxCount } = props;\r\n\r\n const filteredHtml = html.replace('&nbsp;', '\\u00A0');\r\n\r\n const truncateText = truncate || false;\r\n const [displayTruncateParagraph, setDisplayTruncateParagraph ] = useState(truncateText);\r\n const onClick = () => setDisplayTruncateParagraph(!displayTruncateParagraph);\r\n\r\n const truncateTextFunction = (inputText: string, letterLimit: number) => {\r\n let startIndex = 0;\r\n for(let i = 1; i < inputText.length; i++){\r\n if(inputText[i] === '>'){\r\n startIndex = i+1;\r\n break;\r\n }\r\n }\r\n const stack = [];\r\n let letterCount = 0;\r\n for(let i = startIndex; i < inputText.length; i++){\r\n if(letterCount === letterLimit){\r\n return inputText.slice(startIndex, i+1);\r\n }\r\n else if(inputText[i] === '<'){\r\n stack.push(inputText[i]);\r\n }\r\n else if(inputText[i] === '>'){\r\n stack.pop();\r\n }\r\n else if(stack.length === 0){\r\n letterCount++;\r\n }\r\n }\r\n return '';\r\n };\r\n\r\n const htmlToDisplay = html && truncateTextFunction(ReactHtmlParser(filteredHtml)[0]?.props?.children[0], maxCount);\r\n\r\n return(\r\n
    \r\n {(displayTruncateParagraph) ?\r\n
    \r\n

    \r\n {ReactHtmlParser(htmlToDisplay)}\r\n ...\r\n

    \r\n
    \r\n :

    {ReactHtmlParser(filteredHtml)}

    \r\n }\r\n
    \r\n );\r\n};\r\n","import React from 'react';\r\nimport { IMfrmFooterViewProps } from '../../modules/mfrm-footer/mfrm-footer';\r\nimport { bedhubToSocials, d365ToSocials } from '../adaptor/footer/socials';\r\nimport { BedhubToAccessibilityReader, d365ToAccessibilityReader } from '../adaptor/footer/accessibilityReader';\r\nimport { bedhubToCategories, d365ToCategories } from '../adaptor/footer/categories';\r\nimport { bedhubToDisclosures, d365ToDisclosures } from '../adaptor/footer/disclosures';\r\nimport { Categories } from './footer-components/Categories';\r\nimport { Socials } from './footer-components/Socials';\r\nimport { AccessibilityReader } from './footer-components/AccessibilityReader';\r\nimport { Disclosures } from './footer-components/Disclosures';\r\n\r\nexport const MFRMFooter = (props: IMfrmFooterViewProps) => {\r\n //D365 adaptor data\r\n const { categories, socials, accessibilityReader, disclosure } = props.config;\r\n const D365CategoriesData = d365ToCategories(categories);\r\n const D365SocialsData = d365ToSocials(socials);\r\n const D365AccessibilityData = d365ToAccessibilityReader(accessibilityReader);\r\n const d365DisclosuresData = d365ToDisclosures(disclosure);\r\n\r\n //bedhub adaptor data\r\n let bedhubDataSource = props.config.bedhubDataSource;\r\n\r\n const {\r\n data: {\r\n bedhubFooter: { result: bedhubFooter }\r\n }\r\n } = props;\r\n\r\n if (bedhubFooter?.data?.ui === undefined || bedhubFooter === undefined ) {\r\n bedhubDataSource = false;\r\n }\r\n\r\n //bedhub disclosures and show more logic\r\n const bedhubDisclosures = bedhubFooter?.data?.ui?.disclosure;\r\n const bedhubDisclosureData = bedhubToDisclosures(bedhubDisclosures);\r\n const disclosuresData = bedhubDataSource ? bedhubDisclosureData : d365DisclosuresData;\r\n const disclosuresContent = disclosuresData?.sections !== undefined ? disclosuresData?.sections?.map((section: any, index: number) => (\r\n \r\n )) : null;\r\n\r\n //bedhub footer data\r\n const categoriesBedhub = bedhubFooter?.data?.ui?.footer.categories;\r\n const socialsBedhub = bedhubFooter?.data?.ui?.footer.socials;\r\n const accessibilityReaderBedhub = bedhubFooter?.data?.ui?.footer.accessibilityReader;\r\n const bedhubAccessibility = BedhubToAccessibilityReader(accessibilityReaderBedhub);\r\n const bedhubCategories = bedhubToCategories(categoriesBedhub);\r\n const bedhubSocials = bedhubToSocials(socialsBedhub);\r\n\r\n //condition for which data to use\r\n const accessibilityData = bedhubDataSource ? bedhubAccessibility : D365AccessibilityData;\r\n const categoriesData = bedhubDataSource ? bedhubCategories : D365CategoriesData;\r\n const socialsData = bedhubDataSource ? bedhubSocials : D365SocialsData;\r\n\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n \r\n {disclosuresContent}\r\n
    \r\n );\r\n};\r\n\r\nexport default MFRMFooter;","import { ICategoriesData, ICategoryItemsData } from \"../../../modules/mfrm-footer/mfrm-footer.props.autogenerated\";\r\n\r\nexport interface ICategories {\r\n label: String;\r\n items: ICategoryItems[]\r\n title: String\r\n}\r\n\r\nexport interface ICategoryItems {\r\n ariaLabel: String\r\n url: String\r\n label: String\r\n openInNewTab: Boolean\r\n type: String | null\r\n}\r\n\r\n// D365 data\r\nexport const d365ToCategories = (categories: ICategoriesData | undefined) => {\r\n const d365Categories = [categories?.aboutCategory!, categories?.helpCategory!, categories?.legalCategory!];\r\n if (categories) {\r\n return d365Categories.map((category) => {\r\n return {\r\n title: category.label,\r\n items: [{\r\n ariaLabel: category.categoryItems.map((item: ICategoryItemsData) => item.ariaLabel),\r\n url:category.categoryItems.map((item: ICategoryItemsData) => item.linkUrl.destinationUrl),\r\n label: category.categoryItems.map((item: ICategoryItemsData) => item.linkText),\r\n openInNewTab: category.categoryItems.map((item:ICategoryItemsData) => item?.openInNewTab)\r\n }]\r\n };\r\n });\r\n } return null;\r\n};\r\n\r\nexport const bedhubToCategories = (categories: ICategories[] | undefined) => {\r\n if (categories !== undefined || null) {\r\n return categories?.map((category) => {\r\n return {\r\n title: category.label,\r\n items: [{\r\n ariaLabel: category.items.map((item: ICategoryItems) => item.ariaLabel),\r\n label: category.items.map((item: ICategoryItems) => item.label),\r\n openInNewTab : category.items.map((item: ICategoryItems) => item.openInNewTab),\r\n url:category.items.map((item: ICategoryItems) => item.url),\r\n type: category.items.map((item: ICategoryItems) => item.type)\r\n }]\r\n };\r\n });\r\n } return null;\r\n};","// import { ISocialsData } from \"../../../modules/mfrm-footer/mfrm-footer.props.autogenerated\";\r\n\r\nexport interface ISocials {\r\n ariaLabel: String\r\n label: String\r\n type: String\r\n url : String\r\n openInNewTab: Boolean\r\n image: {\r\n url: String\r\n altText?: String\r\n }\r\n}\r\n\r\n//d365\r\nexport const d365ToSocials = (socials: any) => {\r\n if (socials) {\r\n return socials.map((socials: any) => {\r\n return {\r\n ariaLabel: socials.altText,\r\n label: socials.title,\r\n type: null,\r\n url : socials.socialUrl.linkUrl.destinationUrl,\r\n openInNewTab: socials.socialUrl.openInNewTab,\r\n image: {\r\n url: socials.src,\r\n altText: socials.altText\r\n }\r\n };\r\n });\r\n }\r\n return null;\r\n};\r\n\r\n//bedhub ISocials ISocialsData\r\nexport const bedhubToSocials = (socials: any) => {\r\n if (socials !== undefined || null) {\r\n return socials.map((socials: any) => {\r\n return {\r\n ariaLabel: socials?.ariaLabel,\r\n label: socials?.label,\r\n type: socials.type,\r\n url : socials.url,\r\n openInNewTab: socials.openInNewTab,\r\n image: {\r\n url: socials.image.url\r\n }\r\n };\r\n });\r\n }\r\n return null;\r\n};","import { IAccessibilityReaderData } from \"../../../modules/mfrm-footer/mfrm-footer.props.autogenerated\";\r\n\r\nexport interface UIAccessibilityD365 {\r\n ariaLabel: String\r\n label: String\r\n url: String\r\n openInNewTab: Boolean\r\n image: {\r\n url: String\r\n altText: String\r\n }\r\n type: String | null\r\n }\r\n\r\n//D365\r\nexport const d365ToAccessibilityReader = (accessibilityReader: IAccessibilityReaderData | undefined) => {\r\n if (accessibilityReader) {\r\n return {\r\n ariaLabel: accessibilityReader.accessibilityReaderLink.ariaLabel,\r\n label:accessibilityReader.accessibilityReaderLink.linkText,\r\n url: accessibilityReader.accessibilityReaderLink.linkUrl.destinationUrl,\r\n openInNewTab: accessibilityReader.accessibilityReaderLink.openInNewTab,\r\n image: {\r\n url: accessibilityReader.accessibilityReaderImage.src,\r\n altText: accessibilityReader.accessibilityReaderImage.altText\r\n }\r\n };\r\n }\r\n return null;\r\n};\r\n\r\n//bedhub\r\nexport const BedhubToAccessibilityReader = (accessibilityReader: UIAccessibilityD365 | undefined) => {\r\n if (accessibilityReader !== undefined || null) {\r\n return {\r\n ariaLabel: accessibilityReader?.ariaLabel,\r\n image: {\r\n url: accessibilityReader?.image.url\r\n },\r\n label:accessibilityReader?.label,\r\n openInNewTab: accessibilityReader?.openInNewTab,\r\n type: accessibilityReader?.type,\r\n url: accessibilityReader?.url\r\n };\r\n }\r\n return null;\r\n};","import { IDisclosureData } from \"../../../modules/mfrm-footer/mfrm-footer.props.autogenerated\";\r\n\r\nexport interface IDisclosures {\r\n maximum?: Number | null;\r\n more?: {\r\n ariaLabel?: String,\r\n label?: String\r\n }\r\n sections: ISectionsData[] | undefined;\r\n}\r\n\r\nexport interface ISectionsData {\r\n html: any;\r\n truncate?: boolean;\r\n}\r\n\r\nexport const d365ToDisclosures = (disclosures: IDisclosureData | undefined): IDisclosures | null => {\r\n if (disclosures) {\r\n return {\r\n maximum: disclosures?.maximum,\r\n sections: disclosures.sections?.map(disclosure => {\r\n return {\r\n html: disclosure.html,\r\n truncate: disclosure.truncated\r\n };\r\n })\r\n };\r\n } return null;\r\n};\r\n\r\n//bedhub adaptor\r\nexport const bedhubToDisclosures = (disclosures: any) => {\r\n if (disclosures !== undefined || null) {\r\n return {\r\n maximum: disclosures?.maximum,\r\n sections: disclosures?.sections?.map((disclosure:any) => {\r\n return {\r\n html: disclosure.html,\r\n truncate: disclosure.truncate\r\n };\r\n })\r\n };\r\n } return null;\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IMfrmFooterViewProps } from './mfrm-footer';\r\nimport MFRMFooter from '../../mfrm-components/mfrm-footer/MFRMFooter';\r\n\r\nexport default (props: IMfrmFooterViewProps) => {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['mfrm-footer'] = {\n c: () => require('partner/modules/mfrm-footer/mfrm-footer.tsx'),\n $type: 'containerModule',\n da: [{name:'bedhubFooter', path:'actions/bedhub-footer.action', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-footer',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-footer'\n });\n \n\n {\n const sanitizedActionPath = 'actions/bedhub-footer.action';\n let dataAction = require('partner/actions/bedhub-footer.action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|mfrm-footer|mfrm-footer'] = {\n c: () => require('partner/modules/mfrm-footer/mfrm-footer.view.tsx'),\n cn: '__local__-__local__-mfrm-footer'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["BedhubFooterInput","constructor","getCacheKey","getCacheObjectType","dataCacheType","Msdyn365","action","async","input","ctx","_ctx$requestContext","baseURL","requestContext","app","config","bedhubBaseUrl","token","_Msdyn365$msdyn365Com","_Msdyn365$msdyn365Com2","_Msdyn365$msdyn365Com3","secretManager","getSecretValue","apiSettings","baseUrl","getAccessToken","error","console","graphqlURL","URL","href","query","response","axios","JSON","stringify","headers","Authorization","data","id","args","bedhubDataSource","Error","MfrmFooter","React","render","this","props","renderView","Categories","categories","categoryElement","map","item","className","key","title","items","i","labels","label","url","ariaLabel","target","openInNewTab","undefined","Accordion","content","Socials","_ref","socials","socialsElement","social","onClick","event","window","utag","link","event_category","event_action","event_label","event_noninteraction","src","image","alt","toLowerCase","AccessibilityReader","accessibilityReader","accessibility","Disclosures","_ReactHtmlParser$","html","truncate","disclosures","maxCount","filteredHtml","replace","truncateText","displayTruncateParagraph","setDisplayTruncateParagraph","useState","htmlToDisplay","truncateTextFunction","inputText","letterLimit","startIndex","length","stack","letterCount","slice","push","pop","ReactHtmlParser","children","_bedhubFooter$data","_bedhubFooter$data2","_disclosuresData$sect","_bedhubFooter$data3","_bedhubFooter$data4","_bedhubFooter$data5","disclosure","D365CategoriesData","d365Categories","aboutCategory","helpCategory","legalCategory","category","categoryItems","linkUrl","destinationUrl","linkText","d365ToCategories","D365SocialsData","altText","type","socialUrl","d365ToSocials","D365AccessibilityData","accessibilityReaderLink","accessibilityReaderImage","d365ToAccessibilityReader","d365DisclosuresData","maximum","sections","_disclosures$sections","truncated","bedhubFooter","result","ui","bedhubDisclosureData","_disclosures$sections2","bedhubToDisclosures","disclosuresData","disclosuresContent","section","index","categoriesBedhub","footer","socialsBedhub","bedhubAccessibility","BedhubToAccessibilityReader","bedhubCategories","bedhubToCategories","bedhubSocials","bedhubToSocials","accessibilityData","categoriesData","socialsData","MFRMFooter","Object","assign","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","__bindings__","_objectSpread","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}