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AAA,CAAAC,YAAA,WAAAxJ,GAAAiF,OAAAoE,QAAA,CAAAI,IAAA,CAAAzJ,CAAA","sources":["webpack://_N_E/./adapters/model/service/api/svc.js","webpack://_N_E/./components/Janrain/helpers/localstorage.helpers.js","webpack://_N_E/./components/Janrain/helpers/redirect.helpers.js","webpack://_N_E/"],"sourcesContent":["import { SvcApiConstants, WarrantyExtensionConstants } from '../../../helpers/Constants';\nimport {\n deleteJanrainCaptureProfileDataFromLocalStorage,\n getJanrainCaptureTokenFromLocalStorage\n} from '../../../../components/Janrain/helpers/localstorage.helpers';\nimport {getJanrainCaptureProfileDataFromLocalStorage} from '../../../../components/Janrain/helpers/localstorage.helpers';\nimport {redirectTo} from '../../../../components/Janrain/helpers/redirect.helpers';\nimport { customJsonstringify, customSuperJsonParse } from '../../../helpers/Utils';\n\nexport function generateHeader(token) {\n let header = new Headers();\n header.append(SvcApiConstants.contentType, 'application/x-www-form-urlencoded');\n header.append(SvcApiConstants.ciamInstanceId, process.env.SVC_API_CIAM_INSTANCE_ID);\n\n const Authorization = 'Bearer ' + token;\n\n header.append('Authorization', Authorization);\n header.append('Cache-Control', 'no-cache');\n\n return header;\n}\n\nexport const postReplaceEntity = (object, newJanrainProduct, onSuccess = function(){}, onFailure = function(){}, registerData = {}, newJanrinComboProduct) => {\n const orderId = registerData?.orderId\n const productData = registerData?.data;\n // set order id has productId for the new product -\n // with the orderProductId value to find the traitproduct while delate time\n newJanrainProduct.productId = `${orderId}${WarrantyExtensionConstants.janrinProductIdDelimiter}${productData[WarrantyExtensionConstants.primaryProductIndex]?.orderProductId}`;\n object.traitProductType.push(newJanrainProduct);\n if(newJanrinComboProduct) {\n newJanrinComboProduct.productId = `${orderId}${WarrantyExtensionConstants.janrinProductIdDelimiter}${productData[WarrantyExtensionConstants.comboProductIndex]?.orderProductId}`;\n object.traitProductType.push(newJanrinComboProduct);\n }\n\n const token = getJanrainCaptureTokenFromLocalStorage();\n\n const header = generateHeader(token);\n var params = {\n attributes: customJsonstringify(object),\n type_name: process.env.SVC_API_TYPE_NAME\n };\n\n const searchParams = new URLSearchParams();\n for (const prop in params) {\n searchParams.set(prop, params[prop]);\n }\n\n const requestOptions = {\n method: 'POST',\n headers: header,\n body: searchParams\n };\n\n fetch(process.env.SVC_API_URL_REPLACE, requestOptions)\n .then(response => response.json())\n .then(data => {\n if(data.stat) {\n if(data.stat === 'ok') {\n onSuccess(orderId);\n } else if (data.stat === 'error') {\n console.error('API entity.replace error:',data.error_description);\n onFailure(orderId);\n if(data.error_description === 'unknown access token') {\n logout();\n }\n } else {\n onFailure(orderId);\n if(data?.error_description) {\n console.error('API entity.replace error:',data.error_description);\n }\n }\n }\n });\n\n}\n\nexport const postReplaceEntityUpdate = (object, onSuccess = function(){}, onFailure = function(){}) => {\n const token = getJanrainCaptureTokenFromLocalStorage();\n\n const header = generateHeader(token);\n var params = {\n attributes: customJsonstringify(object),\n type_name: process.env.SVC_API_TYPE_NAME\n };\n\n const searchParams = new URLSearchParams();\n for (const prop in params) {\n searchParams.set(prop, params[prop]);\n }\n\n const requestOptions = {\n method: 'POST',\n headers: header,\n body: searchParams\n };\n\n fetch(process.env.SVC_API_URL_REPLACE, requestOptions)\n .then(response => response.json())\n .then(data => {\n if(data.stat) {\n if(data.stat === 'ok') {\n refreshEntity(onSuccess);\n } else if (data.stat === 'error') {\n console.error('API entity.replace error:',data.error_description);\n onFailure();\n if(data.error_description === 'unknown access token') {\n logout();\n }\n } else {\n onFailure();\n if(data?.error_description) {\n console.error('API entity.replace error:',data.error_description);\n }\n }\n }\n });\n\n}\n\nexport const postReplaceGoals = (object, onSuccess = function(){}, onFailure = function(){}) => {\n const token = getJanrainCaptureTokenFromLocalStorage();\n\n const header = generateHeader(token);\n var params = {\n attributes: customJsonstringify(object),\n type_name: process.env.SVC_API_TYPE_NAME\n };\n\n const searchParams = new URLSearchParams();\n for (const prop in params) {\n searchParams.set(prop, params[prop]);\n }\n\n const requestOptions = {\n method: 'POST',\n headers: header,\n body: searchParams\n };\n\n fetch(process.env.SVC_API_URL_REPLACE, requestOptions)\n .then(response => response.json())\n .then(data => {\n if(data.stat) {\n if(data.stat === 'ok') {\n console.info('replaceEntity');\n onSuccess();\n } else if (data.stat === 'error') {\n console.error('API entity.replace error:',data.error_description);\n onFailure();\n if(data.error_description === SvcApiConstants.unknownAccessToken) {\n logout();\n }\n } else {\n onFailure();\n console.error('API entity.replace error:',data?.error_description);\n }\n }\n });\n};\n\nexport const postReplaceBenefitPreferences = (object, onSuccess = function(){}, onFailure = function(){}) => {\n const token = getJanrainCaptureTokenFromLocalStorage();\n\n const header = generateHeader(token);\n var params = {\n attributes: customJsonstringify(object),\n type_name: process.env.SVC_API_TYPE_NAME\n };\n\n const searchParams = new URLSearchParams();\n for (const prop in params) {\n searchParams.set(prop, params[prop]);\n }\n\n const requestOptions = {\n method: 'POST',\n headers: header,\n body: searchParams\n };\n\n fetch(process.env.SVC_API_URL_REPLACE, requestOptions)\n .then(response => response.json())\n .then(data => {\n if(data.stat) {\n if(data.stat === 'ok') {\n console.info('replaceEntity');\n onSuccess();\n } else if (data.stat === 'error') {\n console.error('API entity.replace error:',data.error_description);\n onFailure();\n if(data.error_description === 'unknown access token') {\n logout();\n }\n } else {\n onFailure();\n console.error('API entity.replace error:',data.error_description);\n }\n }\n refreshEntity();\n });\n\n}\n\n// Refresh janrainCaptureProfileData localStorage data,\n// we need to do this operation because the svc api do not refresh the state of the widget\nexport const refreshEntity = (onSuccess = function(){}, onFailure = function(){}) => {\n const token = getJanrainCaptureTokenFromLocalStorage();\n\n const header = generateHeader(token);\n\n const requestOptions = {\n method: 'POST',\n headers: header\n };\n let userData = {};\n fetch(process.env.SVC_API_URL_ENTITY, requestOptions)\n .then(response => response.json())\n .then(data => {\n if(data.stat) {\n if(data.stat === 'error') {\n console.error('API entity error:',data.error_description);\n if(data.error_description === 'unknown access token') {\n logout();\n } else {\n onFailure();\n }\n } else {\n userData = data.result;\n localStorage.setItem('janrainCaptureProfileData', customJsonstringify(userData));\n onSuccess();\n }\n }\n }).catch(error => {\n console.error(error);\n onFailure();\n });\n\n}\n\n// The is an issue an janrain side where the consumerID creation is delayed by around 15 sec.\n// we have to wait for the consumerID before we can allow the user to register a product.\nexport const waitConsumerID = (successRedirectPath) => {\n let janrainProfile = customSuperJsonParse(getJanrainCaptureProfileDataFromLocalStorage());\n let consumerID = janrainProfile.consumerID;\n let attempThreshold = parseInt(process.env.WARRANTY_API_CONSUMER_ID_ATTEMP_TRESHOLD);\n let attempNumber = 0;\n\n // declare recursive function\n function recursiveUserEntityRefresh(consumerID, attempNumber, attempThreshold) {\n refreshEntity();\n janrainProfile = customSuperJsonParse(getJanrainCaptureProfileDataFromLocalStorage());\n if (janrainProfile.consumerID) {\n consumerID = janrainProfile.consumerID;\n }\n attempNumber = attempNumber + 1;\n // time out, we wait\n if (!consumerID && attempNumber < attempThreshold) {\n setTimeout(function() { recursiveUserEntityRefresh(consumerID, attempNumber, attempThreshold) },\n parseInt(process.env.WARRANTY_API_CONSUMER_ID_RECURSIVE_TIMEOUT_TIME));\n } else {\n if (consumerID) {\n redirectTo(successRedirectPath);\n } else {\n // invalidate session\n if (window?.janrain?.capture?.ui?.endCaptureSession) {\n window.janrain.capture.ui.endCaptureSession();\n } else {\n deleteJanrainCaptureProfileDataFromLocalStorage();\n }\n redirectTo(process.env.JANRAIN_LOGIN_PATH);\n }\n }\n }\n\n // call recursive function if consumerID is empty\n if (!consumerID) {\n recursiveUserEntityRefresh(consumerID, attempNumber, attempThreshold);\n } else {\n redirectTo(successRedirectPath);\n }\n}\n\nexport const getPostReplaceEntityObject = (janrainProfileData) => {\n let postObject = {}\n\n // plural\n let traitProductTypeValue = removePluralListId(janrainProfileData?.traitProductType);\n postObject['traitProductType'] = traitProductTypeValue;\n\n let traitBenefitPreferencesValue = removePluralListId(janrainProfileData?.traitBenefitPreferences);\n postObject['traitBenefitPreferences'] = traitBenefitPreferencesValue;\n\n let optInsValue = removePluralListId(janrainProfileData?.optIns);\n postObject['optIns'] = optInsValue;\n\n // string or object\n postObject['traitBrushHeadReminderOptInFlag'] = janrainProfileData?.traitBrushHeadReminderOptInFlag;\n postObject['traitBrushheadReminderDate'] = janrainProfileData?.traitBrushheadReminderDate;\n postObject['primaryProduct'] = janrainProfileData?.primaryProduct;\n postObject['traitPrimaryBrush'] = janrainProfileData?.traitPrimaryBrush;\n\n return postObject;\n}\n\nexport const removePluralListId = (pluralList) => {\n if(pluralList) {\n pluralList.forEach(object => {\n delete object.id;\n });\n }\n return pluralList;\n}\n\nexport const logout = () => {\n if (window?.janrain?.capture?.ui?.endCaptureSession) {\n window.janrain.capture.ui.endCaptureSession();\n redirectTo(process.env.JANRAIN_LOGIN_PATH);\n } else {\n deleteJanrainCaptureProfileDataFromLocalStorage();\n redirectTo(process.env.JANRAIN_LOGIN_PATH);\n }\n}\n\nexport const sendEmailVerification = (email, onSuccess = function(){}, onFailure = function(){}) => {\n let header = new Headers();\n header.append(SvcApiConstants.contentType, 'application/x-www-form-urlencoded');\n header.append(SvcApiConstants.ciamInstanceId, process.env.SVC_API_CIAM_INSTANCE_ID);\n\n var params = {\n flow: process.env.JANRAIN_CAPTURE_FLOW_NAME,\n flow_version: process.env.JANRAIN_CAPTURE_FLOW_VERSION,\n locale: process.env.JANRAIN_CAPTURE_LOCALE,\n form: SvcApiConstants.resendVerificationForm,\n signInEmailAddress: email,\n client_id: process.env.JANRAIN_CAPTURE_CIENT_ID,\n // this redirect is not used in the implementation we are doing.\n // It fails if empty so we are letting the default value from documentation\n redirect_uri: 'http://localhost'\n };\n\n const searchParams = new URLSearchParams();\n for (const prop in params) {\n searchParams.set(prop, params[prop]);\n }\n\n const requestOptions = {\n method: 'POST',\n headers: header,\n body: searchParams\n };\n\n fetch(process.env.SVC_API_URL_SEND_VERIFICATION_EMAIL, requestOptions)\n .then(response => response.json())\n .then(data => {\n if(data?.stat === 'ok') {\n onSuccess();\n } else {\n console.error('Double optIn verification email not sent:', data);\n onFailure();\n }\n }).catch(error => {\n console.log('Double optIn verification email not sent:', error);\n onFailure();\n });\n\n}\n\nexport const setEntityOptInStatus = (status, token, onSuccess = function(){}, onFailure = function(){}) => {\n\n // Step 1 get entity with token\n const headerEntity = generateHeader(token);\n\n const requestOptionsEntity = {\n method: 'POST',\n headers: headerEntity\n };\n let userData = {};\n fetch(process.env.SVC_API_URL_ENTITY, requestOptionsEntity)\n .then(response => response.json())\n .then(data => {\n if (data.stat) {\n if (data.stat === 'error') {\n console.error('API entity error:', data.error_description);\n if (data.error_description === 'unknown access token') {\n logout();\n }\n } else {\n userData = data.result;\n localStorage.setItem('janrainCaptureProfileData', customJsonstringify(userData));\n // Step 2: post replace entity call to update optStatus to true\n let postObject = getPostReplaceEntityObject(userData);\n\n // make sure we have one optins\n if (postObject['optIns'][0]) {\n postObject['optIns'][0].optStatus = true; \n if(userData && userData.emailVerified){\n postObject['optIns'][0].choiceDate = userData.emailVerified;\n }\n }\n postEntityOptStatus(postObject, token, onSuccess, onFailure);\n }\n }\n });\n\n}\n\n// We have 3 post replace entity method which are very similar except their callback\n// Might be optimizable to have only one method\nexport const postEntityOptStatus = (postObject, token, onSuccess = function(){}, onFailure = function(){}) => {\n const header = generateHeader(token);\n var params = {\n attributes: customJsonstringify(postObject),\n type_name: process.env.SVC_API_TYPE_NAME\n };\n\n const searchParams = new URLSearchParams();\n for (const prop in params) {\n searchParams.set(prop, params[prop]);\n }\n\n const requestOptions = {\n method: 'POST',\n headers: header,\n body: searchParams\n };\n\n fetch(process.env.SVC_API_URL_REPLACE, requestOptions)\n .then(response => response.json())\n .then(data => {\n if(data.stat) {\n if(data.stat === 'ok') {\n onSuccess();\n refreshEntity();\n } else if (data.stat === 'error') {\n console.error('API entity.replace error:',data.error_description);\n onFailure();\n if(data.error_description === 'unknown access token') {\n logout();\n }\n } else {\n onFailure();\n if(data?.error_description) {\n console.error('API entity.replace error:',data.error_description);\n }\n }\n }\n });\n\n}\n\n","/*\n* A common place to set, get and delete local storage items used in the login/register/profile process\n* This reduces the risk of misspelling strings and making other mistakes\n*/\n\nimport {JanrainConstants} from '../../../adapters/helpers/Constants';\nimport {redirectTo} from './redirect.helpers';\nimport { customSuperJsonParse } from '../../../adapters/helpers/Utils';\n\nexport const setProfileData = () =>{\n let userData = localStorage.getItem('janrainCaptureProfileData');\n if(userData) {\n const profileData = JSON.customSuperJsonParse(userData);\n // Hardcoding value of marketingProgramNbr for Italy \n const profileObject = {\n id:profileData.consumerID || profileData.uuid,\n marketingProgramNbr: process.env.MARKET && process.env.MARKET.trim() =='it-it' ? process.env.PG_DATA_LAYER_USER_MARKETING_PROGRAM_NBR :profileData.marketingProgramNbr,\n sourceID: process.env.PG_DATA_LAYER_USER_SOURCE_ID,\n type:'member'\n }\n if(window.PGdataLayer && !window.PGdataLayer.user){\n window.PGdataLayer.user = {}\n }\n if (typeof Object.assign != 'function') {\n Object.assign = function(target) {\n 'use strict';\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n \n target = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source != null) {\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n } else {\n Object.assign(window.PGdataLayer.user,profileObject)\n }\n } else {\n const profileObject = {\n marketingProgramNbr: process.env.PG_DATA_LAYER_USER_MARKETING_PROGRAM_NBR || '',\n sourceID: process.env.PG_DATA_LAYER_USER_SOURCE_ID,\n type:'anonymous'\n }\n if(window.PGdataLayer && !window.PGdataLayer.user){\n window.PGdataLayer.user = {}\n }\n if (typeof Object.assign != 'function') {\n Object.assign = function(target) {\n 'use strict';\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n \n target = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source != null) {\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n } else {\n Object.assign(window.PGdataLayer.user,profileObject)\n }\n\n }\n}\n\nconst triggerEvent = (\n eventCategory,\n eventAction,\n eventLabel = '',\n callback,\n ) => {\n window.dataLayer.push({\n event: 'customEvent',\n GAeventCategory: eventCategory,\n GAeventAction: eventAction,\n GAeventLabel: eventLabel,\n GAeventValue: 0,\n GAeventNonInteraction: false,\n eventCallback: callback,\n })\n }\n\nexport const triggerLoginEvent = () => {\n // eslint-disable-next-line no-console\n try {\n triggerEvent(\n 'event_crm_action',\n 'event_profile_login_complete',\n 'oralb_successful_login',\n )\n } catch (error) {\n console.error('GA is not loaded...')\n }\n }\n\nexport const triggerRegisiterEvent = () => {\n // eslint-disable-next-line no-console\n try {\n /** Promise to make sure Login is called only after registration\n * dont use EventCallout\n */\n new Promise((resolve) => triggerEvent(\n 'event_crm_action',\n 'event_profile_register_complete',\n 'oralb_successful_register',\n resolve(),\n )).then(() => {\n triggerEvent(\n 'event_crm_action',\n 'event_profile_login_complete',\n 'oralb_successful_login',\n )\n })\n } catch (error) {\n console.error('GA is not loaded...')\n }\n }\n \nexport const triggerLogoutEvent = () => {\n if (!(window.PGdataLayer && window.PGdataLayer.user)) return\n if (!window.PGdataLayer.user.id) return\n // eslint-disable-next-line no-console\n try {\n triggerEvent(\n 'event_crm_action',\n 'event_profile_logout',\n 'oralb_successful_logout',\n )\n } catch (error) {\n console.error('GA is not loaded...')\n }\n }\nexport const getOralbProductListFromLocalStorage = (uuid) => {\n let key = JanrainConstants.productListLocalStorageKeyPrefix + uuid;\n return localStorage.getItem(key) || '[]';\n};\n\nexport const setOralbProductListToLocalStorage = (productList, uuid) => {\n let key = JanrainConstants.productListLocalStorageKeyPrefix + uuid;\n localStorage.setItem(key, productList);\n};\n\nexport const getOralbBenefitPreferenceListFromLocalStorage = (uuid) => {\n let key = JanrainConstants.benefitListLocalStorageKeyPrefix + uuid;\n return localStorage.getItem(key) || '[]';\n};\n\nexport const setOralbBenefitPreferenceListToLocalStorage = (benefitPreferenceList, uuid) => {\n let key = JanrainConstants.benefitListLocalStorageKeyPrefix + uuid;\n localStorage.setItem(key, benefitPreferenceList);\n};\n\nexport const getIsCreatingAccountFromLocalStorage = () => {\n return localStorage.getItem('isCreatingAccount') || '';\n};\n\nexport const setIsCreatingAccountToLocalStorage = value => {\n localStorage.setItem('isCreatingAccount', value);\n};\n\nexport const deleteIsCreatingAccountFromLocalStorage = () => {\n localStorage.removeItem('isCreatingAccount');\n};\n\nexport const getJanrainCaptureProfileDataFromLocalStorage = () => {\n return localStorage.getItem('janrainCaptureProfileData') || '{}';\n};\n\nexport const getJanrainCaptureTokenExpiresFromLocalStorage = () => {\n return localStorage.getItem('janrainCaptureToken_Expires') || '';\n};\n\nexport const getJanrainCaptureTokenFromLocalStorage = () => {\n return localStorage.getItem('janrainCaptureToken') || '';\n};\n\nexport const deleteJanrainCaptureProfileDataFromLocalStorage = () => {\n localStorage.removeItem('janrainCaptureToken');\n localStorage.removeItem('janrainFailedLogins');\n localStorage.removeItem('janrainCaptureReturnExperienceData');\n localStorage.removeItem('janrainCaptureProfileData');\n localStorage.removeItem('janrainCaptureToken_Expires');\n localStorage.removeItem('janrainCaptureReturnExperienceData_Expires');\n localStorage.removeItem('janrainCaptureProfileData_Expires');\n localStorage.removeItem('janrainSessionTimeoutDate');\n};\n\nexport const setSessionTimeoutFromLocalStorage = () => {\n let timeoutDate = addMinutes(new Date(), parseInt(process.env.JANRAIN_SESSION_TIMOUT_MIN));\n localStorage.setItem('janrainSessionTimeoutDate', timeoutDate);\n};\n\nexport const removeSessionTimeoutFromLocalStorage = () => {\n localStorage.removeItem('janrainSessionTimeoutDate');\n};\n\n// session timeout layer added to invalidate janrain session if user is pass this timeout\nexport const validateCustomSessionTimeoutActive = () => {\n let sessionTimeout = localStorage.getItem('janrainSessionTimeoutDate');\n if(sessionTimeout) {\n let sessionTimeoutDate = new Date(sessionTimeout);\n if(!(sessionTimeoutDate > new Date())) {\n if (window?.janrain?.capture?.ui?.endCaptureSession) {\n window.janrain.capture.ui.endCaptureSession();\n redirectTo(process.env.JANRAIN_LOGIN_PATH);\n } else {\n deleteJanrainCaptureProfileDataFromLocalStorage();\n window.location.reload();\n }\n }\n }\n};\n\nfunction addMinutes(date, minutes) {\n return new Date(date.getTime() + minutes*60000);\n}\n","export const redirectTo = (url) => {\n window.history.replaceState(null, null, url)\n window.location.href = url\n}\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4521],{54521:function(e,n,r){r.d(n,{AO:function(){return f},Es:function(){return s},HA:function(){return l},_U:function(){return v},ef:function(){return d},ll:function(){return _},nQ:function(){return h},w$:function(){return I}});var t=r(24036),o=r(90318),i=r(58391),a=r(8996),c=r(34155);function u(e){var n=new Headers;n.append(t.iH.contentType,\"application/x-www-form-urlencoded\"),n.append(t.iH.ciamInstanceId,c.env.SVC_API_CIAM_INSTANCE_ID);var r=\"Bearer \"+e;return n.append(\"Authorization\",r),n.append(\"Cache-Control\",\"no-cache\"),n}var l=function(e,n){var r,i,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},f=arguments.length>5?arguments[5]:void 0,v=null==d?void 0:d.orderId,_=null==d?void 0:d.data;(n.productId=\"\".concat(v).concat(t.X.janrinProductIdDelimiter).concat(null==(r=_[t.X.primaryProductIndex])?void 0:r.orderProductId),e.traitProductType.push(n),f)&&(f.productId=\"\".concat(v).concat(t.X.janrinProductIdDelimiter).concat(null==(i=_[t.X.comboProductIndex])?void 0:i.orderProductId),e.traitProductType.push(f));var p=(0,o.Fi)(),I=u(p),h={attributes:(0,a.Zl)(e),type_name:c.env.SVC_API_TYPE_NAME},P=new URLSearchParams;for(var A in h)P.set(A,h[A]);var g={method:\"POST\",headers:I,body:P};fetch(c.env.SVC_API_URL_REPLACE,g).then((function(e){return e.json()})).then((function(e){e.stat&&(\"ok\"===e.stat?l(v):\"error\"===e.stat?(console.error(\"API entity.replace error:\",e.error_description),s(v),\"unknown access token\"===e.error_description&&m()):(s(v),(null==e?void 0:e.error_description)&&console.error(\"API entity.replace error:\",e.error_description)))}))},s=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},t=(0,o.Fi)(),i=u(t),l={attributes:(0,a.Zl)(e),type_name:c.env.SVC_API_TYPE_NAME},s=new URLSearchParams;for(var d in l)s.set(d,l[d]);var f={method:\"POST\",headers:i,body:s};fetch(c.env.SVC_API_URL_REPLACE,f).then((function(e){return e.json()})).then((function(e){e.stat&&(\"ok\"===e.stat?v(n):\"error\"===e.stat?(console.error(\"API entity.replace error:\",e.error_description),r(),\"unknown access token\"===e.error_description&&m()):(r(),(null==e?void 0:e.error_description)&&console.error(\"API entity.replace error:\",e.error_description)))}))},d=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=(0,o.Fi)(),l=u(i),s={attributes:(0,a.Zl)(e),type_name:c.env.SVC_API_TYPE_NAME},d=new URLSearchParams;for(var f in s)d.set(f,s[f]);var v={method:\"POST\",headers:l,body:d};fetch(c.env.SVC_API_URL_REPLACE,v).then((function(e){return e.json()})).then((function(e){e.stat&&(\"ok\"===e.stat?(console.info(\"replaceEntity\"),n()):\"error\"===e.stat?(console.error(\"API entity.replace error:\",e.error_description),r(),e.error_description===t.iH.unknownAccessToken&&m()):(r(),console.error(\"API entity.replace error:\",null==e?void 0:e.error_description)))}))},f=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},t=(0,o.Fi)(),i=u(t),l={attributes:(0,a.Zl)(e),type_name:c.env.SVC_API_TYPE_NAME},s=new URLSearchParams;for(var d in l)s.set(d,l[d]);var f={method:\"POST\",headers:i,body:s};fetch(c.env.SVC_API_URL_REPLACE,f).then((function(e){return e.json()})).then((function(e){e.stat&&(\"ok\"===e.stat?(console.info(\"replaceEntity\"),n()):\"error\"===e.stat?(console.error(\"API entity.replace error:\",e.error_description),r(),\"unknown access token\"===e.error_description&&m()):(r(),console.error(\"API entity.replace error:\",e.error_description))),v()}))},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=(0,o.Fi)(),t=u(r),i={method:\"POST\",headers:t},l={};fetch(c.env.SVC_API_URL_ENTITY,i).then((function(e){return e.json()})).then((function(r){r.stat&&(\"error\"===r.stat?(console.error(\"API entity error:\",r.error_description),\"unknown access token\"===r.error_description?m():n()):(l=r.result,localStorage.setItem(\"janrainCaptureProfileData\",(0,a.Zl)(l)),e()))})).catch((function(e){console.error(e),n()}))},_=function(e){var n={},r=p(null==e?void 0:e.traitProductType);n.traitProductType=r;var t=p(null==e?void 0:e.traitBenefitPreferences);n.traitBenefitPreferences=t;var o=p(null==e?void 0:e.optIns);return n.optIns=o,n.traitBrushHeadReminderOptInFlag=null==e?void 0:e.traitBrushHeadReminderOptInFlag,n.traitBrushheadReminderDate=null==e?void 0:e.traitBrushheadReminderDate,n.primaryProduct=null==e?void 0:e.primaryProduct,n.traitPrimaryBrush=null==e?void 0:e.traitPrimaryBrush,n},p=function(e){return e&&e.forEach((function(e){delete e.id})),e},m=function(){var e,n,r,t;(null==(e=window)||null==(n=e.janrain)||null==(r=n.capture)||null==(t=r.ui)?void 0:t.endCaptureSession)?(window.janrain.capture.ui.endCaptureSession(),(0,i.g)(c.env.JANRAIN_LOGIN_PATH)):((0,o.Ag)(),(0,i.g)(c.env.JANRAIN_LOGIN_PATH))},I=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=new Headers;o.append(t.iH.contentType,\"application/x-www-form-urlencoded\"),o.append(t.iH.ciamInstanceId,c.env.SVC_API_CIAM_INSTANCE_ID);var i={flow:c.env.JANRAIN_CAPTURE_FLOW_NAME,flow_version:c.env.JANRAIN_CAPTURE_FLOW_VERSION,locale:c.env.JANRAIN_CAPTURE_LOCALE,form:t.iH.resendVerificationForm,signInEmailAddress:e,client_id:c.env.JANRAIN_CAPTURE_CIENT_ID,redirect_uri:\"http://localhost\"},a=new URLSearchParams;for(var u in i)a.set(u,i[u]);var l={method:\"POST\",headers:o,body:a};fetch(c.env.SVC_API_URL_SEND_VERIFICATION_EMAIL,l).then((function(e){return e.json()})).then((function(e){\"ok\"===(null==e?void 0:e.stat)?n():(console.error(\"Double optIn verification email not sent:\",e),r())})).catch((function(e){console.log(\"Double optIn verification email not sent:\",e),r()}))},h=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=u(n),i={method:\"POST\",headers:o},l={};fetch(c.env.SVC_API_URL_ENTITY,i).then((function(e){return e.json()})).then((function(e){if(e.stat)if(\"error\"===e.stat)console.error(\"API entity error:\",e.error_description),\"unknown access token\"===e.error_description&&m();else{l=e.result,localStorage.setItem(\"janrainCaptureProfileData\",(0,a.Zl)(l));var o=_(l);o.optIns[0]&&(o.optIns[0].optStatus=!0,l&&l.emailVerified&&(o.optIns[0].choiceDate=l.emailVerified)),P(o,n,r,t)}}))},P=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=u(n),i={attributes:(0,a.Zl)(e),type_name:c.env.SVC_API_TYPE_NAME},l=new URLSearchParams;for(var s in i)l.set(s,i[s]);var d={method:\"POST\",headers:o,body:l};fetch(c.env.SVC_API_URL_REPLACE,d).then((function(e){return e.json()})).then((function(e){e.stat&&(\"ok\"===e.stat?(r(),v()):\"error\"===e.stat?(console.error(\"API entity.replace error:\",e.error_description),t(),\"unknown access token\"===e.error_description&&m()):(t(),(null==e?void 0:e.error_description)&&console.error(\"API entity.replace error:\",e.error_description)))}))}},90318:function(e,n,r){r.d(n,{Ag:function(){return m},Fi:function(){return p},NN:function(){return P},QB:function(){return f},QR:function(){return h},Sm:function(){return I},WZ:function(){return c},_J:function(){return i},cO:function(){return u},mF:function(){return _},n_:function(){return v},s8:function(){return l},sv:function(){return d},xO:function(){return s}});r(24036);var t=r(58391),o=(r(8996),r(34155)),i=function(){var e=localStorage.getItem(\"janrainCaptureProfileData\");if(e){var n=JSON.customSuperJsonParse(e),r={id:n.consumerID||n.uuid,marketingProgramNbr:o.env.MARKET&&\"it-it\"==o.env.MARKET.trim()?\"empty\":n.marketingProgramNbr,sourceID:\"empty\",type:\"member\"};window.PGdataLayer&&!window.PGdataLayer.user&&(window.PGdataLayer.user={}),\"function\"!=typeof Object.assign?Object.assign=function(e){if(null==e)throw new TypeError(\"Cannot convert undefined or null to object\");e=Object(e);for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:\"\",t=arguments.length>3?arguments[3]:void 0;window.dataLayer.push({event:\"customEvent\",GAeventCategory:e,GAeventAction:n,GAeventLabel:r,GAeventValue:0,GAeventNonInteraction:!1,eventCallback:t})},c=function(){try{a(\"event_crm_action\",\"event_profile_login_complete\",\"oralb_successful_login\")}catch(e){console.error(\"GA is not loaded...\")}},u=function(){try{new Promise((function(e){return a(\"event_crm_action\",\"event_profile_register_complete\",\"oralb_successful_register\",e())})).then((function(){a(\"event_crm_action\",\"event_profile_login_complete\",\"oralb_successful_login\")}))}catch(e){console.error(\"GA is not loaded...\")}},l=function(){if(window.PGdataLayer&&window.PGdataLayer.user&&window.PGdataLayer.user.id)try{a(\"event_crm_action\",\"event_profile_logout\",\"oralb_successful_logout\")}catch(e){console.error(\"GA is not loaded...\")}},s=function(){return localStorage.getItem(\"isCreatingAccount\")||\"\"},d=function(e){localStorage.setItem(\"isCreatingAccount\",e)},f=function(){localStorage.removeItem(\"isCreatingAccount\")},v=function(){return localStorage.getItem(\"janrainCaptureProfileData\")||\"{}\"},_=function(){return localStorage.getItem(\"janrainCaptureToken_Expires\")||\"\"},p=function(){return localStorage.getItem(\"janrainCaptureToken\")||\"\"},m=function(){localStorage.removeItem(\"janrainCaptureToken\"),localStorage.removeItem(\"janrainFailedLogins\"),localStorage.removeItem(\"janrainCaptureReturnExperienceData\"),localStorage.removeItem(\"janrainCaptureProfileData\"),localStorage.removeItem(\"janrainCaptureToken_Expires\"),localStorage.removeItem(\"janrainCaptureReturnExperienceData_Expires\"),localStorage.removeItem(\"janrainCaptureProfileData_Expires\"),localStorage.removeItem(\"janrainSessionTimeoutDate\")},I=function(){var e,n,r=(e=new Date,n=parseInt(o.env.JANRAIN_SESSION_TIMOUT_MIN),new Date(e.getTime()+6e4*n));localStorage.setItem(\"janrainSessionTimeoutDate\",r)},h=function(){localStorage.removeItem(\"janrainSessionTimeoutDate\")},P=function(){var e,n,r,i,a=localStorage.getItem(\"janrainSessionTimeoutDate\");a&&(new Date(a)>new Date||((null==(e=window)||null==(n=e.janrain)||null==(r=n.capture)||null==(i=r.ui)?void 0:i.endCaptureSession)?(window.janrain.capture.ui.endCaptureSession(),(0,t.g)(o.env.JANRAIN_LOGIN_PATH)):(m(),window.location.reload())))}},58391:function(e,n,r){r.d(n,{g:function(){return t}});var t=function(e){window.history.replaceState(null,null,e),window.location.href=e}}}]);"],"names":["self","webpackChunk_N_E","push","e","n","r","d","AO","f","Es","s","HA","l","_U","v","ef","ll","_","nQ","h","w$","I","t","o","i","a","c","u","Headers","append","iH","contentType","ciamInstanceId","env","SVC_API_CIAM_INSTANCE_ID","arguments","length","orderId","data","productId","concat","X","janrinProductIdDelimiter","primaryProductIndex","orderProductId","traitProductType","comboProductIndex","Fi","attributes","Zl","type_name","SVC_API_TYPE_NAME","P","URLSearchParams","A","set","fetch","SVC_API_URL_REPLACE","method","headers","body","then","json","stat","console","error","error_description","m","info","unknownAccessToken","SVC_API_URL_ENTITY","result","localStorage","setItem","catch","p","traitBenefitPreferences","optIns","traitBrushHeadReminderOptInFlag","traitBrushheadReminderDate","primaryProduct","traitPrimaryBrush","forEach","id","window","janrain","capture","ui","endCaptureSession","g","JANRAIN_LOGIN_PATH","Ag","flow","JANRAIN_CAPTURE_FLOW_NAME","flow_version","JANRAIN_CAPTURE_FLOW_VERSION","locale","JANRAIN_CAPTURE_LOCALE","form","resendVerificationForm","signInEmailAddress","client_id","JANRAIN_CAPTURE_CIENT_ID","redirect_uri","SVC_API_URL_SEND_VERIFICATION_EMAIL","log","optStatus","emailVerified","choiceDate","NN","QB","QR","Sm","WZ","_J","cO","mF","n_","s8","sv","xO","getItem","JSON","customSuperJsonParse","consumerID","uuid","marketingProgramNbr","MARKET","trim","sourceID","type","PGdataLayer","user","Object","assign","prototype","hasOwnProperty","call","dataLayer","event","GAeventCategory","GAeventAction","GAeventLabel","GAeventValue","GAeventNonInteraction","eventCallback","Promise","removeItem","Date","parseInt","JANRAIN_SESSION_TIMOUT_MIN","getTime","location","reload","history","replaceState","href"],"sourceRoot":""}