PageSourceSearch

https://www.dettol.co.za/289-5a385075772e07b4031e.js

js dettol.co.za collected 2026-10-03 22:35:41 UTC 14,394 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkhusky_site=self.webpackChunkhusky_site||[]).push([[289],{5214:function(e,t,n){t.b=void 0;var i=n(74150);const s=(e,t)=>({userAuthService:{Class:i.FirebaseUserAuthService,params:{firebaseOptions:{apiKey:{}.GATSBY_FIREBASE_AUTH_API_KEY,authDomain:{}.GATSBY_FIREBASE_AUTH_DOMAIN,projectId:{}.GATSBY_FIREBASE_AUTH_PROJECT_ID,appId:{}.GATSBY_FIREBASE_AUTH_APP_ID},userAttrCollectionName:{}.GATSBY_FIREBASE_AUTH_DATABASE_USER_ATTR_COLLECTION_NAME,hasFacebookSignIn:"true"==={}.GATSBY_FIREBASE_AUTH_FACEBOOK_ENABLED,hasGoogleSignIn:"true"==={}.GATSBY_FIREBASE_AUTH_GOOGLE_ENABLED,rememberMeConfig:{defaultValue:t.rememberMeDefaultValue,show:t.showRememberMe}}},ldsService:{Class:i.DefaultLdsService,params:{system:i.LdsSystem.Health,legals:e}}});t.b=(e,t,n,i)=>({config:{fieldsSetup:t,translations:n},services:s(e,i)})},55289:function(e,t,n){n.r(t),n.d(t,{default:function(){return O}});var i=n(63322),s=n(74848),a=n(74150),l=n(52563),d=n(51404),o=n(99746),c=n(97459),r=n(41791),u=n(57590),m=n(29070);const p=()=>{const e=(0,m.A)();return{validate:e.validate,updateUserLegals:e.updateUserLegals,getLegalsFields:e.getLegalsFields,getAcceptedLegals:e.getAcceptedLegals,dispatchEventIfLegalsUpdated:e.dispatchEventIfLegalsUpdated}};var g=n(71156),b=n(32485),f=n.n(b),h=n(96540);function v(e,t,n,i){return new(n||(n=Promise))(function(s,a){function l(e){try{o(i.next(e))}catch(t){a(t)}}function d(e){try{o(i.throw(e))}catch(t){a(t)}}function o(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(l,d)}o((i=i.apply(e,t||[])).next())})}var I="confirm-lds-module_confirmLds__iqUAb",x="confirm-lds-module_button__wMSAY",B="confirm-lds-module_text__3-rb4",F="confirm-lds-module_actionButtons__8kKaU",_="confirm-lds-module_list__83uLQ",y="confirm-lds-module_link__cKYpv";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}(".confirm-lds-module_confirmLds__iqUAb {\n  display: flex;\n  align-items: center;\n  flex-direction: column;\n  font-family: var(--phx-fontFamily, Lato, sans-serif);\n  width: 100%;\n  padding: var(--phx-ldsConfirmModalPadding, 36px 40px 14px);\n}\n\n@media screen and (min-width: 576px) {\n  .confirm-lds-module_confirmLds__iqUAb {\n    width: var(--phx-ldsConfirmModal, 360px);\n  }\n}\n\n[dir=ltr] .confirm-lds-module_button__wMSAY {\n  margin-right: 25px !important;\n}\n\n[dir=rtl] .confirm-lds-module_button__wMSAY {\n  margin-left: 25px !important;\n}\n\n.confirm-lds-module_text__3-rb4 {\n  width: 100%;\n  font-size: var(--phx-fontSizeMedium, 1.25rem);\n  color: var(--phx-secondaryTextColor, #4a4a4a);\n}\n\n[dir=ltr] .confirm-lds-module_text__3-rb4 {\n  padding: 7px 8px 10px 0px;\n}\n\n[dir=rtl] .confirm-lds-module_text__3-rb4 {\n  padding: 7px 0px 10px 8px;\n}\n\n.confirm-lds-module_logo__vP5zC {\n  padding-bottom: 16px;\n}\n\n.confirm-lds-module_actionButtons__8kKaU {\n  display: flex;\n  margin-top: 10px;\n  justify-content: center;\n  width: 100%;\n}\n\n[dir=ltr] .confirm-lds-module_list__83uLQ {\n  padding-left: 20px;\n}\n\n[dir=rtl] .confirm-lds-module_list__83uLQ {\n  padding-right: 20px;\n}\n\n.confirm-lds-module_link__cKYpv {\n  text-decoration: under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4IDQwcHggMTRweCk7XG59XG5AbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA1NzZweCkge1xuICAuY29uZmlybUxkcyB7XG4gICAgd2lkdGg6IHZhcigtLXBoeC1sZHNDb25maXJtTW9kYWwsIDM2MHB4KTtcbiAgfVxufVxuXG4uYnV0dG9uIHtcbiAgbWFyZ2luLXJpZ2h0OiAyNXB4ICFpbXBvcnRhbnQ7XG59XG5cbi50ZXh0IHtcbiAgcGFkZGluZzogN3B4IDhweCAxMHB4IDBweDtcbiAgd2lkdGg6IDEwMCU7XG4gIGZvbnQtc2l6ZTogdmFyKC0tcGh4LWZvbnRTaXplTWVkaXVtLCAxLjI1cmVtKTtcbiAgY29sb3I6IHZhcigtLXBoeC1zZWNvbmRhcnlUZXh0Q29sb3IsICM0YTRhNGEpO1xufVxuXG4ubG9nbyB7XG4gIHBhZGRpbmctYm90dG9tOiAxNnB4O1xufVxuXG4uYWN0aW9uQnV0dG9ucyB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1hcmdpbi10b3A6IDEwcHg7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICB3aWR0aDogMTAwJTtcbn1cblxuLmxpc3Qge1xuICBwYWRkaW5nLWxlZnQ6IDIwcHg7XG59XG5cbi5saW5rIHtcbiAgdGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmU7XG4gIGN1cnNvcjogcG9pbnRlcjtcbn0iXX0= */");const U=()=>{const{translate:e}=(0,g.c)(),{updateUserLegals:t,getLegalsFields:n}=p(),[i,m]=(0,h.useState)([]),[b,U]=(0,h.useState)(!0),[Q,L]=(0,h.useState)(""),[k,C]=(0,h.useState)(!1),E=(e=!1)=>{(0,d.u2)(a.Events.onLdsConfirmation,{visible:!1,shouldUpdateProfile:e})};(0,h.useEffect)(()=>{v(void 0,void 0,void 0,function*(){try{const{legals:e}=yield n("SocialSignIn",!0);m((e=>{if(!(null==e?void 0:e.options))return[];const t=e=>null==e?void 0:e.find(e=>"function"==typeof e.onClick);return e.options.filter(e=>t(e.labels)).map(e=>{const n=t(e.labels);return{onClick:n.onClick,value:n.value,key:e.key}})})(e)),U(!1)}catch(e){L(e),U(!1)}})},[]);return(0,s.jsx)(r.a,Object.assign({isShowing:!0,close:()=>E()},{children:(0,s.jsxs)("div",Object.assign({className:f()(I,"auth-confirm-lds")},{children:[(0,s.jsx)(l.$,Object.assign({variant:"close",onClick:()=>E(),type:"button"},{children:(0,s.jsx)(o.U,{})})),(0,s.jsx)(u.o,Object.assign({variant:"title"},{children:e("confirmLdsTitle")})),b?(0,s.jsx)(c.a,{}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",Object.assign({className:f()(B,"auth-confirm-lds__text")},{children:[e("confirmLdsInfo"),(0,s.jsx)("ul",Object.assign({className:f()(_,"auth-confirm-lds__list")},{children:i.map(({key:e,onClick:t,value:n})=>(0,s.jsx)("li",{children:(0,s.jsx)("span",Object.assign({role:"button",tabIndex:0,onClick:t,className:y,onKeyDown:t},{children:n}))},e))}))]})),Q&&(0,s.jsx)(u.o,Object.assign({variant:"error",className:"auth-confirm-lds__error"},{children:Q}
1)),(0,s.jsxs)("div",Object.assign({className:f()(F,"auth-confirm-lds__action-buttons")},{children:[(0,s.jsx)(l.$,Object.assign({variant:"secondary",type:"button",className:f()("auth-confirm-lds__secondary-button",x),onClick:()=>{E()},"data-translate-key":"confirmLdsCloseButton"},{children:e("confirmLdsCloseButton")})),(0,s.jsx)(l.$,Object.assign({variant:"primary",type:"button",className:"auth-confirm-lds__button",disabled:k,"data-translate-key":"confirmLdsCloseSubmit",onClick:()=>v(void 0,void 0,void 0,function*(){const e=i.map(e=>e.key);C(!0);try{yield t({legals:e},!0),C(!1),E(!0)}catch(n){L(n),C(!1)}})},{children:e("confirmLdsCloseSubmit")}))]}))]})]}))}))};var Q=n(29935),L=n(34212),k=n(34434);function C(e,t,n,i){return new(n||(n=Promise))(function(s,a){function l(e){try{o(i.next(e))}catch(t){a(t)}}function d(e){try{o(i.throw(e))}catch(t){a(t)}}function o(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(l,d)}o((i=i.apply(e,t||[])).next())})}var E="updated-lds-module_updatedLds__NSH-f";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}(".updated-lds-module_updatedLds__NSH-f {\n  display: flex;\n  align-items: center;\n  flex-direction: column;\n  font-family: var(--phx-fontFamily, Lato, sans-serif);\n  width: var(--phx-updatedLdsModalWidth, 400px);\n  padding: var(--phx-updatedLdsPadding, 36px 40px 30px);\n}\n\n.updated-lds-module_updatedLds__NSH-f header > label + div {\n  margin: 0;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVwZGF0ZWQtbGRzLm1vZHVsZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBYTtFQUNiLG1CQUFtQjtFQUNuQixzQkFBc0I7RUFDdEIsb0RBQW9EO0VBQ3BELDZDQUE2QztFQUM3QyxxREFBcUQ7QUFDdkQ7O0FBQ0E7RUFDRSxTQUFTO0FBQ1giLCJmaWxlIjoidXBkYXRlZC1sZHMubW9kdWxlLnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIudXBkYXRlZExkcyB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gIGZvbnQtZmFtaWx5OiB2YXIoLS1waHgtZm9udEZhbWlseSwgTGF0bywgc2Fucy1zZXJpZik7XG4gIHdpZHRoOiB2YXIoLS1waHgtdXBkYXRlZExkc01vZGFsV2lkdGgsIDQwMHB4KTtcbiAgcGFkZGluZzogdmFyKC0tcGh4LXVwZGF0ZWRMZHNQYWRkaW5nLCAzNnB4IDQwcHggMzBweCk7XG59XG4udXBkYXRlZExkcyBoZWFkZXIgPiBsYWJlbCArIGRpdiB7XG4gIG1hcmdpbjogMDtcbn0iXX0= */");const G=({updatedLds:e})=>{var t,n;const{updateUserLegals:i,getLegalsFields:o,validate:m,getAcceptedLegals:b}=p(),[v,I]=(0,h.useState)(""),{translate:x}=(0,g.c)(),[B,F]=(0,h.useState)(),[_,y]=(0,h.useState)(!0),[U,Q]=(0,h.useState)(!1);(0,h.useEffect)(()=>{C(void 0,void 0,void 0,function*(){var t,n;try{const i=e.map(({businessId:e})=>e),s=yield b(),a=yield o("HasChanged");F(Object.assign(Object.assign({},a.legals),{options:null===(t=a.legals.options)||void 0===t?void 0:t.filter(({key:e})=>i.includes(e)||!Object.keys(s).includes(e)),defaultValue:null===(n=a.legals.options)||void 0===n?void 0:n.filter(({key:e,hideCheckbox:t})=>!i.includes(e)&&Object.keys(s).includes(e)||t).map(({key:e})=>e)})),y(!1)}catch(i){y(!1)}})},[]);const{values:G,errors:R,handleChange:S,handleSubmit:Z}=(0,k.m)({initialValues:{legals:""},callback:e=>C(void 0,void 0,void 0,function*(){Q(!0),I("");const t=yield i({legals:[...e.legals,...(null==B?void 0:B.defaultValue)||[]]});(0,a.isErrorResult)(t)?I(t.message||"defaultErrorMessage"):((e=!1)=>{(0,d.u2)(a.Events.onTermsChanged,{visible:!1,shouldUpdateProfile:e})})(!0),Q(!1)}),validate:m,validateOnChange:!0});return(0,s.jsx)(r.a,Object.assign({isShowing:!0},{children:(0,s.jsxs)("div",Object.assign({className:f()(E,"auth-updated-lds")},{children:[(0,s.jsx)(u.o,Object.assign({variant:"title"},{children:x("updatedLdsTitle")})),_||!B?(0,s.jsx)(c.a,{}):(0,s.jsxs)("form",Object.assign({onSubmit:Z},{children:[(0,s.jsx)(L.D,{id:"legals",defaultValue:B.defaultValue,label:B.label,name:"legals",type:L.P[B.type],options:B.options,value:G.legals,onChange:S,errorMessage:null===(n=null===(t=R.validation)||void 0===t?void 0:t.legals)||void 0===n?void 0:n.message}),(0,s.jsx)(l.$,Object.assign({variant:"primary",type:"submit",disabled:U,"data-translate-key":"updatedLdsSubmitButton"},{children:x("updatedLdsSubmitButton")}))]})),v&&(0,s.jsx)(u.o,Object.assign({variant:"error"},{children:v}))]}))}))},R=({onDeleteAccount:e})=>{const[t,n]=(0,h.useState)(!1),[i,l]=(0,h.useState)(),[d,o]=(0,h.useState)(!1),c=[{event:a.Events.onTermsChanged,callback:e=>{l(e.detail)}},{event:a.Events.onLdsConfirmation,callback:e=>{n(e.detail.visible)}},{event:a.Events.onDeleteAccount,callback:()=>{o(!0)}}];return(0,h.useEffect)(()=>(c.forEach(({event:e,callback:t})=>{window.addEventListener(e,t)}
1),()=>{c.forEach(({event:e,callback:t})=>{window.removeEventListener(e,t)})}),[]),(0,s.jsxs)(s.Fragment,{children:[t&&(0,s.jsx)(U,{}),(null==i?void 0:i.visible)&&(null==i?void 0:i.updatedLds)&&(0,s.jsx)(G,{updatedLds:i.updatedLds}),d&&(0,s.jsx)(Q.D1,{visible:!0,onClose:()=>{o(!1),e()}})]})};var S=n(55268),Z=n(84058),A=n.n(Z),w=n(5214),j=n(72121),X=n(73601);const O=e=>{var t;let{children:n}=e;const{currentLang:{locale:s}}=(0,j.F)(),{allContentstackLdsData:{nodes:l},allContentstackAuthSettings:{nodes:d},allContentstackLdsPage:{nodes:o}}=(0,S.useStaticQuery)("1348142863"),c=o.filter(e=>{let{tags:t,publishDetails:{locale:n}}=e;return t.includes("dettol-za")&&n===s}),r=d.find(e=>{let{tags:t,publishDetails:{locale:n}}=e;return t.includes("dettol-za")&&n===s});if(!r)throw new Error("Auth Settings not exist");const u=r.agreementsSettings.map(e=>{let{isRequired:t,agreementLabel:n,checkboxHidden:i,lds:[{uri:s}]}=e;const a=l.find(e=>e.uri===s),d=c.find(e=>{let{lds:[{uri:t}]}=e;return t===s});return a&&d?{isRequired:t,customLabel:n,hideCheckbox:i,validFrom:new Date(a.validFrom),validTo:new Date(a.validTo),businessId:s,socialTerm:!1,versionId:a.versionId,key:a.versionId,description:a.documentType,onLegalLinkClickAction:()=>window.open(d.fields.fullPath,"_blank")}:null}).filter(Boolean),m=r.fieldsSettings.map(e=>{const{field:t,showInSignUp:n,showInProfile:i,showInSignIn:s,isRequired:l,showInEdit:d,showInPreview:o,orderSignin:c,orderSignup:r,orderProfile:u,isRequiredInEdit:m}=e,p=c||r||u?{order:{...c&&{signIn:Number(c)},...r&&{signUp:Number(r)},...u&&{profile:Number(u)}}}:null;if(t===a.InputType.custom){const{customFieldName:t,customFieldType:n,customFieldValidationRegex:i,customFieldDefaultValue:s,...l}=e,d=A()(null==t?void 0:t.toLowerCase()),o={...l,customField:!0,category:a.FieldCategory.UserDetails,id:d,name:d,type:n,regex:i?new RegExp(i):void 0,...p};return[a.InputType.select,a.InputType.radio,a.InputType.checkbox].includes(n)&&s&&(o.options=s.split(";").filter(Boolean).map(e=>({key:e.trim(),translationKey:e.trim()}))),o}return{name:t,field:t,showInSignUp:n,showInProfile:i,showInSignIn:s,isRequired:l,showInEdit:d,showInPreview:o,isRequiredInEdit:m,...p}}),p=null==r||null===(t=r.translations)||void 0===t?void 0:t.customTranslations,g=null==r?void 0:r.loginSettings;if(p&&!(0,X.A)(p))throw new Error("Please provide translations in correct json format");const b=p?JSON.parse(p):null;return h.createElement(i.h,{defaultValue:(0,w.b)(u,m,b,g)},n,h.createElement(R,{onDeleteAccount:()=>(0,S.navigate)("/")}))}},73601:function(e,t){t.A=void 0;var n=e=>{try{const t=JSON.parse(e);return"object"==typeof t&&null!==t}catch(t){return!1}};t.A=n}}]);
2//# sourceMappingURL=289-5a385075772e07b4031e.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.