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AAU,4BAA4BG,ymBCXvD,MAAME,EAAU,CAAEC,QAAS,GAAIC,YAAa,IAwCvCF,EAAQC,QAAQ,mCAAqC,CAClDE,EAAGA,IAAMC,EAAQ,MACjBC,MAAO,gBACPC,GAAI,CAAC,CAACC,KAAK,UAAYC,KAAK,0EAA2EC,MAAO,IAE9GC,KAAK,EACLC,GAAI,YACJC,EAAG,kCACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,+CAlC4BC,EAACC,EAAqBC,KAUlD,GADAlB,EAAQE,YAAYe,GAAuBC,GACtClB,EAAQE,YAAYe,GAAqBE,QAC1C,MAAM,IAAIC,MAAM,oBAAsBH,EAAsB,mCAEhEjB,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUC,eAAiBL,EACxEjB,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUzB,KAC3DI,EAAQE,YAAYF,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUzB,IAAMqB,IA0BzFD,CAF4B,0EACXZ,EAAQ,KAMjCmB,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAavB,QAAOwB,EAAAA,EAAA,GACpBF,OAAOC,aAAavB,SAAW,IAC/BD,EAAQC,SAGXsB,OAAOC,aAAatB,YAAWuB,EAAAA,EAAA,GAC5BF,OAAOC,aAAatB,aAAe,IACnCF,EAAQE,aAEY,MAAMwB,EAAiB,GAC9BA,EAAe,+FAAiG,CACxHvB,EAAGA,IAAMC,EAAQ,MACjBuB,GAAI,uDAEpBJ,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaE,eAAcD,EAAAA,EAAA,GACPF,OAAOC,aAAaE,gBAAkB,IACtCA,UCnF3BE,EAAOC,QAAUjD,cCAjBgD,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/modules/mfrm-bazaarvoice-hosted-display/mfrm-bazaarvoice-hosted-display.tsx?5561","webpack://mattressfirm/./src/modules/mfrm-bazaarvoice-hosted-display/mfrm-bazaarvoice-hosted-display.view.tsx?32f3","webpack://mattressfirm/./lib/mfrm-bazaarvoice-hosted-display/module-registration.js?5a5e","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { HtmlHeadInclude } from '@msdyn365-commerce/core-internal';\r\nimport * as React from 'react';\r\nimport { IMfrmBazaarvoiceHostedDisplayData } from './mfrm-bazaarvoice-hosted-display.data';\r\nimport { IMfrmBazaarvoiceHostedDisplayProps } from './mfrm-bazaarvoice-hosted-display.props.autogenerated';\r\n\r\nexport interface IMfrmBazaarvoiceHostedDisplayViewProps extends IMfrmBazaarvoiceHostedDisplayProps {\r\n productId: number;\r\n bvRatingsAndReviews: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * MfrmBazaarvoiceHostedDisplay component\r\n * @extends {React.PureComponent>}\r\n */\r\n\r\nconst MfrmBazaarvoiceHostedDisplay: React.FC> = props => {\r\n const {\r\n config: {\r\n disableTrimmedItemId\r\n },\r\n data: {\r\n product: { result: product }\r\n }\r\n } = props;\r\n const [bvProductId, setbvProductId] = React.useState('');\r\n const [ratingsHeader] = React.useState(props.config.ratingsHeader.trim());\r\n const [clientName] = React.useState(props.config.clientName.trim().toLowerCase());\r\n const [deploymentZone] = React.useState(props.config.deploymentZone.trim().toLowerCase());\r\n const [environment] = React.useState(props.config.environment.trim().toLowerCase());\r\n const [languageLocale] = React.useState(props.config.languageLocale.trim());\r\n React.useEffect(() => {\r\n const trimmedId = product?.ItemId?.slice(0, -1)|| '';\r\n const itemID = disableTrimmedItemId ? product?.ItemId! : trimmedId;\r\n setbvProductId(itemID);\r\n }, []);\r\n return (\r\n <>\r\n \r\n \r\n \r\n {bvProductId ? (\r\n // VSI Customization - START\r\n
\r\n
\r\n

{ratingsHeader}

\r\n
\r\n {/* VSI Customization - END */}\r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nexport default MfrmBazaarvoiceHostedDisplay;\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 { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IMfrmBazaarvoiceHostedDisplayViewProps } from './mfrm-bazaarvoice-hosted-display';\r\n\r\nexport default (props: IMfrmBazaarvoiceHostedDisplayViewProps) => {\r\n const { bvRatingsAndReviews } = props;\r\n return {bvRatingsAndReviews};\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-bazaarvoice-hosted-display'] = {\n c: () => require('partner/modules/mfrm-bazaarvoice-hosted-display/mfrm-bazaarvoice-hosted-display.tsx'),\n $type: 'contentModule',\n da: [{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-bazaarvoice-hosted-display',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-bazaarvoice-hosted-display'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant');\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-bazaarvoice-hosted-display|mfrm-bazaarvoice-hosted-display'] = {\n c: () => require('partner/modules/mfrm-bazaarvoice-hosted-display/mfrm-bazaarvoice-hosted-display.view.tsx'),\n cn: '__local__-__local__-mfrm-bazaarvoice-hosted-display'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["props","config","disableTrimmedItemId","data","product","result","bvProductId","setbvProductId","React","ratingsHeader","trim","clientName","toLowerCase","deploymentZone","environment","languageLocale","_product$ItemId","trimmedId","ItemId","slice","itemID","HtmlHeadInclude","type","className","id","tabIndex","bvRatingsAndReviews","Node","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","window","__bindings__","_objectSpread","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}