`;document.querySelector("#section_banner").innerHTML=b;["GREAT Protector Active","GREAT Junior Protector","GoGreat Term Life","GREAT Prime Rewards","GREAT Maid Protect","Drive and Save Plus","GREAT CareShield"].includes(i)||document.querySelector(".leo-section-banner-content").classList.add("white-product"),r("impression",("[vwo_ce_rtg] homepage banner - "+i+" - "+d+" - "+u).toLowerCase(),i.toLowerCase()),document.body.addEventListener("click",(function(e){const{target:t}=e;if(t.closest(".vwo_homepage_herobanner_cta")){r("click",("[vwo_ce_rtg] homepage banner - "+i+" - "+d+" - "+u).toLowerCase(),i.toLowerCase(),("vwohp-"+i+"-"+u).toLowerCase())}}))}};if(!document.querySelector("."+r.id))if(document.querySelector("#section_banner"))try{r.init()}catch(e){console.log("Initialization Error:",e)}else Date.now() !productsPurchasedArr.some(b => b.name === a.name)
);
// Cross check master product infos
productsViewedArr = productsViewedArr.filter(
a => productsViewedCTAArr.some(b => b.name === a.name)
);
// Reduce to the latest X array items
productsViewedArr = productsViewedArr.slice(-productsViewedMaxItems);
let lastPageVisitedInfo = getCookie(lastPageVisitedCookieName);
// If there are last products viewed, run VWO campaign
if (
productsViewedArr.length &&
window.location.pathname === '/sg/en/personal-insurance.html' &&
lastPageVisitedInfo === 'product'
) {
let productName = productsViewedArr[0].name;
let activate = false;
let impressionDataStr = getCookie(IMPRESSION_COUNT_COOKIE);
let impressionData = impressionDataStr ? JSON.parse(impressionDataStr) : null;
const MAX_IMPRESSIONS = 3;
if (!impressionData) {
activate = true;
setCookie(
IMPRESSION_COUNT_COOKIE,
JSON.stringify({ product: productName, count: 1 }),
cookieExpiryDays
);
} else {
const { product, count } = impressionData;
if (product !== productName) {
activate = true;
setCookie(
IMPRESSION_COUNT_COOKIE,
JSON.stringify({ product: productName, count: 1 }),
cookieExpiryDays
);
} else if (count < MAX_IMPRESSIONS) {
activate = true;
setCookie(
IMPRESSION_COUNT_COOKIE,
JSON.stringify({ product: productName, count: count + 1 }),
cookieExpiryDays
);
} else {
activate = false;
}
}
if (activate) {
executeTrigger();
//alert('activate')
}
}
})()
}}, C_722219_1003_1_2_7:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".leo-row--gap-xs > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(6)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-row--gap-xs > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(6)")}}, R_722219_1003_1_2_7:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","remove",".leo-row--gap-xs > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(6)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-row--gap-xs > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(6)")}}, C_722219_1003_1_2_8:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".leo-row--gap-xs > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-row--gap-xs > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)")}}, R_722219_1003_1_2_8:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","remove",".leo-row--gap-xs > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-row--gap-xs > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)")}}, C_722219_1003_1_2_9:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".leo-row--gap-xs > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-row--gap-xs > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)")}}, R_722219_1003_1_2_9:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","remove",".leo-row--gap-xs > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-row--gap-xs > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)")}}, C_722219_1003_1_2_10:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".leo-row--gap-xs > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(5)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-row--gap-xs > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(5)")}}, R_722219_1003_1_2_10:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","remove",".leo-row--gap-xs > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(5)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-row--gap-xs > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(5)")}}, C_722219_1003_1_2_11:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("editElement",".leo-shadow-4 > div:nth-of-type(2) > a:nth-of-type(2)"); vwo_debug*/(el=vwo_$(".leo-shadow-4 > div:nth-of-type(2) > a:nth-of-type(2)")).vwoAttr({href:"https://buy.greateasternlife.com/sg/en/personal-accident-insurance/200201/get-quotation.html?template=post&campCode=C8DISC"});})(".leo-shadow-4 > div:nth-of-type(2) > a:nth-of-type(2)")}}, R_722219_1003_1_2_11:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","editElement",".leo-shadow-4 > div:nth-of-type(2) > a:nth-of-type(2)"); vwo_debug*/(el=vwo_$(".leo-shadow-4 > div:nth-of-type(2) > a:nth-of-type(2)")).vwoRevertAttr();})(".leo-shadow-4 > div:nth-of-type(2) > a:nth-of-type(2)")}}, C_722219_1003_1_2_12:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("editElement","#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)"); vwo_debug*/(el=vwo_$("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")).vwoAttr({href:"https://buy.greateasternlife.com/sg/en/personal-accident-insurance/200202/get-quotation.html?template=post&campCode=C8DISC"});})("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")}}, R_722219_1003_1_2_12:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","editElement","#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)"); vwo_debug*/(el=vwo_$("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")).vwoRevertAttr();})("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")}}, C_722219_1003_1_2_13:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("editElement","#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)"); vwo_debug*/(el=vwo_$("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")).vwoAttr({href:"https://buy.greateasternlife.com/sg/en/personal-accident-insurance/200203/get-quotation.html?template=post&campCode=C8DISC"});})("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")}}, R_722219_1003_1_2_13:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","editElement","#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)"); vwo_debug*/(el=vwo_$("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")).vwoRevertAttr();})("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")}}, C_722219_1003_1_2_14:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("editElement","#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)"); vwo_debug*/(el=vwo_$("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")).vwoAttr({href:"https://buy.greateasternlife.com/sg/en/personal-accident-insurance/200204/get-quotation.html?template=post&campCode=C8DISC"});})("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")}}, R_722219_1003_1_2_14:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","editElement","#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)"); vwo_debug*/(el=vwo_$("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")).vwoRevertAttr();})("#relatedproducts_copy > div:nth-of-type(2) > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2)")}}, C_722219_763_1_2_0:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".cmp-marquee-promotion"); vwo_debug*/(el=vwo_$(".cmp-marquee-promotion")).vwoCss({display:"none !important"});})(".cmp-marquee-promotion")}}, ct_969ce375f56191050c360e633277bd5a:{ fn:function(executeTrigger, vwo_$, config) {
(function() {
if (!config || typeof config !== "object") {
return;
}
if (window.vwo_$(config.sel).length > 0) {
return executeTrigger();
}
window.VWO._.phoenixMT.once("vwo_mutObs." + config.triggerName, () => {
if (window.vwo_$(config.sel).length > 0) {
executeTrigger();
}
});
})()
}
}, ct_5215ff5c22dc94f8ba11d10604b76f9d:{ fn:function(executeTrigger, vwo_$, config) {
(function() {
if (!config || typeof config !== "object") {
return;
}
if (window.vwo_$(config.sel).length > 0) {
return executeTrigger();
}
window.VWO._.phoenixMT.once("vwo_mutObs." + config.triggerName, () => {
if (window.vwo_$(config.sel).length > 0) {
executeTrigger();
}
});
})()
}
}, C_722219_980_1_2_0:{ fn:function(log,nonce=''){return (function(x) {
try{
var _vwo_sel = vwo_$("`);
!vwo_$("head").find('#1737431535466').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)}
try{}catch(e) {console.error(e)}
try{const inputField=document.querySelectorAll(".cmp-input__inputfield"),notificationDiv=document.querySelector(".education-message-notification");var spanElement=document.querySelector(".cmp-notification__icon.cmp-notification__icon--image"),childElement=spanElement.querySelector("img");const slideAdd=document.querySelector(".vwo-slider");function updateClassC(e){console.log("NEWVALUE",e);const t=document.querySelector(".cmp-notification__text .cmp-notification__textcon");t&&("4,000"===e?(notificationDiv.classList.remove("hidden"),t.textContent="For $4,000 you can hire a trained domestic helper for caregiving and pay for rehabilitation and medical supply expenses.",childElement.src="/content/dam/gel-orion/pre-login-agency/sg/en/common-images/icons/icon-milestone-heart.png"):"4,800"===e?(notificationDiv.classList.remove("hidden"),t.textContent="$4,800 can bring you care by a loved one as well as rehabilitation and medical supplies.",childElement.src="/content/dam/gel-orion/pre-login-agency/sg/en/common-images/icons/icon-milestone-successful.png"):notificationDiv.classList.add("hidden"))}function sendValue(e){window.VWO=window.VWO||[],VWO.event=VWO.event||function(){VWO.push(["event"].concat([].slice.call(arguments)))},VWO.event("gcsSelectedRevenueAmount",{container5D41476F83DivAemCmpForm:e,gcsSlideValue2:e})}slideAdd.classList.add("slider-icons-wrapper"),inputField.forEach(e=>{const t=e.querySelector(".modelValue");if(t){const e=()=>{console.log("Current value:",t.textContent),updateClassC(t.textContent.trim()),sendValue(t.textContent.trim())};e();new MutationObserver(()=>{e()}).observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}});}catch(e) {console.error(e)}
return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_980_1_3_0:{ fn:function(log,nonce=''){return (function(x) {
try{
var _vwo_sel = vwo_$("`);
!vwo_$("head").find('#1737431535472').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)}
try{}catch(e) {console.error(e)}
try{const inputField=document.querySelectorAll(".cmp-input__inputfield"),notificationDiv=document.querySelector(".education-message-notification");var spanElement=document.querySelector(".cmp-notification__icon.cmp-notification__icon--image"),childElement=spanElement.querySelector("img");function updateClassC(e){console.log("NEWVALUE",e);document.querySelector(".cmp-notification__text .cmp-notification__textcon")&&("4,000"===e||"4,800"===e||notificationDiv.classList.add("hidden"))}function sendValue(e){window.VWO=window.VWO||[],VWO.event=VWO.event||function(){VWO.push(["event"].concat([].slice.call(arguments)))},VWO.event("gcsSelectedRevenueAmount",{container5D41476F83DivAemCmpForm:e,gcsSlideValue2:e})}notificationDiv.classList.add("hidden"),console.log("GCS test started"),inputField.forEach(e=>{const t=e.querySelector(".modelValue");if(t){const e=()=>{console.log("Current value:",t.textContent),sendValue(t.textContent.trim())};e();new MutationObserver(()=>{e()}).observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}});}catch(e) {console.error(e)}
return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_980_1_3_1:{ fn:function(log,nonce=''){return (function(x) {
try{
var _vwo_sel = vwo_$("`);
!vwo_$("head").find('#1737431535473').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)}
try{}catch(e) {console.error(e)}
try{/*
// Flag to ensure the action happens only once
let firstTime = true;
function forceClickAndChange() {
if (firstTime) {
// Simulate a click on the icon-edit element
const iconEditButton = document.querySelector('.icon-edit');
if (iconEditButton) {
iconEditButton.click();
console.log(iconEditButton);
console.log("edit clicked");
}
//attempt to change sliderinput value
const changeValue = document.getElementById('sliderinput');
if (changeValue) {
changeValue.value = 4000;
console.log("amount changed v2");
}
// Change the value of the modalvalue span
const modalValueSpan = document.querySelector(".modelValue");
if (modalValueSpan) {
modalValueSpan.textContent = 4000;
console.log("amount changed v1");
}
// Simulate a click on the icon-check element
const iconCheckButton = document.querySelector('.icon-check');
if (iconCheckButton) {
iconCheckButton.click();
console.log("edit check clicked");
// Set the flag to false to prevent future executions
}
firstTime = false;
}
}
// Call the function to initiate the process
forceClickAndChange();
*/
}catch(e) {console.error(e)}
return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_819_1_2_0:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".cmp-marquee-promotion"); vwo_debug*/(el=vwo_$(".cmp-marquee-promotion")).vwoCss({display:"none !important"});})(".cmp-marquee-promotion")}}, C_722219_819_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".header"); vwo_debug*/(el=vwo_$(".header")).vwoCss({display:"none !important"});})(".header")}}, C_722219_819_1_2_2:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".footer"); vwo_debug*/(el=vwo_$(".footer")).vwoCss({display:"none !important"});})(".footer")}}, C_722219_819_1_2_3:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)")).vwoCss({display:"none !important"});})(".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)")}}, C_722219_819_1_2_4:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove","#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)"); vwo_debug*/(el=vwo_$("#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)")).vwoCss({display:"none !important"});})("#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)")}}, C_722219_819_1_2_5:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("visibility",".announcement-blue-bg"); vwo_debug*/(el=vwo_$(".announcement-blue-bg")).vwoCss({visibility:"visible !important"});})(".announcement-blue-bg")}}, ct_cbb73702f57faed15ee0829091863373:{ fn:function(executeTrigger, vwo_$, config) {
(function() {
if (!config || typeof config !== "object") {
return;
}
if (window.vwo_$(config.sel).length > 0) {
return executeTrigger();
}
window.VWO._.phoenixMT.once("vwo_mutObs." + config.triggerName, () => {
if (window.vwo_$(config.sel).length > 0) {
executeTrigger();
}
});
})()
}
}, ct_50797db9f8236bc7d9dca0f411851f4f:{ fn:function(executeTrigger, vwo_$, config) {
(function() {
if (!config || typeof config !== "object") {
return;
}
if (window.vwo_$(config.sel).length > 0) {
return executeTrigger();
}
window.VWO._.phoenixMT.once("vwo_mutObs." + config.triggerName, () => {
if (window.vwo_$(config.sel).length > 0) {
executeTrigger();
}
});
})()
}
}, C_722219_1005_1_2_0:{ fn:function(log,nonce=''){return (function(x) {
try{
var _vwo_sel = vwo_$("`);
!vwo_$("head").find('#1739165695582').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)}
try{}catch(e) {console.error(e)}
try{const plan=document.querySelector("#selectedPlan-Gold");plan.click(),console.log("plan selected");}catch(e) {console.error(e)}
return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_1005_1_2_1:{ fn:function(log,nonce=''){return (function(x) {
try{
var _vwo_sel = vwo_$("`);
!vwo_$("head").find('#1739165695586').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)}
try{}catch(e) {console.error(e)}
try{var value;console.log("value check started");const elementlist=document.getElementsByClassName("cmp-button__button--primary");var myFunction=function(){document.querySelectorAll(".cmp-text.mb-2.color-gray-dark").forEach(e=>{const t=e.querySelector("p.font-14");if(t&&t.textContent.includes("Plan type:")){let e=t.textContent.replace("Plan type:","").trim();sendValue(value=e),console.log("value v1 check",value)}})};function sendValue(e){window.VWO=window.VWO||[],VWO.event=VWO.event||function(){VWO.push(["event"].concat([].slice.call(arguments)))},VWO.event("gtcPlanType",{gtcPlanType:e})}Array.from(elementlist).forEach((function(e){e.addEventListener("click",myFunction)}));}catch(e) {console.error(e)}
return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_985_1_2_0:{ fn:function(){return (function(x) { try{
function setCookie(e,t,o){const i=new Date;i.setTime(i.getTime()+24*o*60*60*1e3);const n="expires="+i.toUTCString();document.cookie=e+"="+t+";"+n+";path=/; domain=.greateasternlife.com"}setCookie("lastPageVisited","product",180);
return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, R_722219_1003_1_2_6:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","remove",".promotion-container"); vwo_debug*/(el=vwo_$(".promotion-container")).vwoRevertCss();})(".promotion-container")}}, C_722219_1003_1_2_6:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".promotion-container"); vwo_debug*/(el=vwo_$(".promotion-container")).vwoCss({display:"none !important"});})(".promotion-container")}}, R_722219_1003_1_2_5:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","remove",".cmp-announcement-widget-xf"); vwo_debug*/(el=vwo_$(".cmp-announcement-widget-xf")).vwoRevertCss();})(".cmp-announcement-widget-xf")}}, R_722219_889_1_2_1:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","remove",".leo-py-md"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-py-md")}}, C_722219_816_1_2_4:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove","#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)"); vwo_debug*/(el=vwo_$("#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)")).vwoCss({display:"none !important"});})("#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)")}}, C_722219_816_1_2_0:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".cmp-marquee-promotion"); vwo_debug*/(el=vwo_$(".cmp-marquee-promotion")).vwoCss({display:"none !important"});})(".cmp-marquee-promotion")}}, C_722219_816_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".header"); vwo_debug*/(el=vwo_$(".header")).vwoCss({display:"none !important"});})(".header")}}, C_722219_816_1_2_2:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".footer"); vwo_debug*/(el=vwo_$(".footer")).vwoCss({display:"none !important"});})(".footer")}}, C_722219_816_1_2_3:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)")).vwoCss({display:"none !important"});})(".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)")}}, R_722219_963_1_2_61:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","editElement","html.vwo_p_s_db54451655d6fbb590be3ae44920e36f #eppbuynow"); vwo_debug*/(el=vwo_$("html.vwo_p_s_db54451655d6fbb590be3ae44920e36f #eppbuynow")).vwoRevertAttr(),el.vwoRevertCss();})("html.vwo_p_s_db54451655d6fbb590be3ae44920e36f #eppbuynow")}}, GL_722219_963_pre:{ fn:function(VWO_CURRENT_CAMPAIGN, VWO_CURRENT_VARIATION,nonce = ""){try{;
var _vwoCurrentPageUrl = window.location.href; var matchRegex = VWO._.matchRegex;vwo_$('[vwo-widget-id]').remove();vwo_$('html').get(0).classList.forEach((cl)=>{var mpClass=cl.match(/(?:\s|^)(vwo_p_s_[0-9a-f]{32})(?:\s|$)/);mpClass && (['vwo_p_s_baf0439c6ee7eeb30695dbb63777c8a1','vwo_p_s_529d06731882814587edcdb7fcb47719','vwo_p_s_117ea7d82ad4208c01b4c082cbb1dcbe','vwo_p_s_b4e3c967173ff0c7334aa142c9f54d98','vwo_p_s_c1156e4acc492a4b12f5b24e80ca04d4','vwo_p_s_a192231b2113d157699dea212968af5a','vwo_p_s_f5e15ac35b42d3a7242aa2f738572873','vwo_p_s_db54451655d6fbb590be3ae44920e36f'].indexOf(mpClass[1])!=-1) && vwo_$('html').removeClass(mpClass[1]);});if(matchRegex(_vwoCurrentPageUrl,'^https:\/\/greateasternlife\.com\/sg\/en\/personal-insurance\/our-products\/personal-accident-insurance\/essential-protector-plus\.html\/?(?:[?#].*)?$')){vwo_$('html').addClass('vwo_p_s_baf0439c6ee7eeb30695dbb63777c8a1')} else if(matchRegex(_vwoCurrentPageUrl,'^https:\/\/greateasternlife\.com\/sg\/en\/personal-insurance\/our-products\/personal-accident-insurance\/great-golden-protector\.html\/?(?:[?#].*)?$')){vwo_$('html').addClass('vwo_p_s_529d06731882814587edcdb7fcb47719')} else if(matchRegex(_vwoCurrentPageUrl,'^https:\/\/greateasternlife\.com\/sg\/en\/personal-insurance\/our-products\/personal-accident-insurance\/great-junior-protector\.html\/?(?:[?#].*)?$')){vwo_$('html').addClass('vwo_p_s_117ea7d82ad4208c01b4c082cbb1dcbe')} else if(matchRegex(_vwoCurrentPageUrl,'^https:\/\/greateasternlife\.com\/sg\/en\/personal-insurance\/our-products\/personal-accident-insurance\.html\/?(?:[?#].*)?$')){vwo_$('html').addClass('vwo_p_s_b4e3c967173ff0c7334aa142c9f54d98')} else if(matchRegex(_vwoCurrentPageUrl,'^https:\/\/greateasternlife\.com\/sg\/en\/personal-insurance\/rewards-and-promotions\/promotions-and-events\/2024\/geapp-exclusive-deals\.html\/?(?:[?#].*)?$')){vwo_$('html').addClass('vwo_p_s_c1156e4acc492a4b12f5b24e80ca04d4')} else if(matchRegex(_vwoCurrentPageUrl,'^https:\/\/greateasternlife\.com\/sg\/en\/personal-insurance\/our-products\/personal-accident-insurance\/great-protector-active\.html\/?(?:[?#].*)?$')){vwo_$('html').addClass('vwo_p_s_a192231b2113d157699dea212968af5a')} else if(matchRegex(_vwoCurrentPageUrl,'^https:\/\/greateasternlife\.com\/sg\/en\/personal-insurance\/rewards-and-promotions\.html\/?(?:[?#].*)?$')){vwo_$('html').addClass('vwo_p_s_f5e15ac35b42d3a7242aa2f738572873')} else if(matchRegex(_vwoCurrentPageUrl,'^https:\/\/wpr-uat\.greateasternlife\.com\/sg\/en\/personal-insurance\/our-products\/personal-accident-insurance\.html\/?(?:[?#].*)?$')){vwo_$('html').addClass('vwo_p_s_db54451655d6fbb590be3ae44920e36f')}
}catch(e){}}}, GL_722219_963_post:{ fn:function(VWO_CURRENT_CAMPAIGN, VWO_CURRENT_VARIATION,nonce = ""){}}, C_722219_997_1_2_0:{ fn:function(){return (function(x) { try{
// Start variation JS
void (function loadVariation(timeInFuture) {
// Main Test object
const test = {
// Some test specific global letiables
id: "EXP-1",
// Test init
init: function () {
// Add a test specific classname to the body element
document.body.classList.add(test.id);
// Below function calls order is important
test.mainJS();
},
// Main JS
mainJS: function () {
const cookieName = "quotationData"; // cookie name
const cookieExpiryDays = 90;
const dataPopulationCookieName = "data-population-cookie";
/// *** Utility functions *** ///
// Utility function to get selected index
const getSelectedIndex = (selector, selectedClass = '-selected') => {
return [...document.querySelectorAll(selector)].findIndex(item => item.classList.contains(selectedClass));
}
// Utility function to get payment index
const getPaymentIndex = (selector, selectedClass = '-selected') => {
return [...document.querySelectorAll(selector)].findIndex(item => item.parentElement.classList.contains(selectedClass));
}
// Utility function to select an option by text content
function selectOptionByText(selector, textContent) {
document.querySelectorAll(selector).forEach(item => {
if (item.textContent.trim() === textContent) {
item.click();
}
});
}
// Utility function to set input value and dispatch event
function setInputValue(selector, value) {
const inputElement = document.querySelector(selector);
if (inputElement) {
inputElement.value = value;
inputElement.dispatchEvent(new Event('input'));
}
}
// Utility function to click a radio button by index
function clickRadioButtonByIndex(selector, index) {
const buttons = document.querySelectorAll(selector);
if (buttons[index]) {
buttons[index].click();
}
}
// function clickRadioButtonForGCS(selector, index) {
// const buttons = document.querySelectorAll(selector);
// if (buttons[index]) {
// buttons[index].parentElement.click();
// }
// }
// Utility function to click an input element by ID
function clickInputById(id) {
const inputElement = document.querySelector(`#${id}`);
if (inputElement) {
inputElement.click();
}
}
// Utility function to Function to set cookie
function setCookie(cname, cvalue, exdays) {
const d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
const expires = `expires=${d.toUTCString()}`;
document.cookie = `${cname}=${cvalue}; ${expires}; path=/; domain=.adobecqms.net`;
};
// Utility function to Function to get cookie
function getCookie(cname) {
const name = cname + "=";
const decodedCookie = decodeURIComponent(document.cookie);
const ca = decodedCookie.split(';');
for (var i = 0; i < ca.length; i++) {
let c = ca[i].trim();
if (c.indexOf(name) === 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
// // Utility function to delete cookie
// function deleteCookie(name) {
// document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.greateasternlife.com`;
// }
/// *** Utility functions *** ///
// function to set or update quotation cookie
const setOrUpdateQuoteDataInCookie = (quotationData) => {
if (!quotationData || typeof quotationData !== 'object') return;
const saveCookie = (data) => {
setCookie(cookieName, JSON.stringify(data), cookieExpiryDays);
};
const existingCookie = getCookie(cookieName);
if (!existingCookie) {
saveCookie(quotationData);
//console.log("Quotation data saved as a new cookie.");
return;
}
let existingData;
try {
existingData = JSON.parse(existingCookie);
} catch (error) {
//console.error("Failed to parse existing cookie:", error);
saveCookie(quotationData);
return;
}
if (existingData.productJourney === quotationData.productJourney) {
// Same product journey, update values
const updatedData = { ...existingData, ...quotationData };
saveCookie(updatedData);
//console.log("Updated existing quotation data.");
} else {
saveCookie(quotationData);
//console.log("Replaced quotation data with a new product journey.");
}
};
// function to set Great Protector Active quote data
function getQuoteDataGPA() {
if (window.location.pathname !== '/sg/en/personal-accident-insurance/200201/get-quotation.html') return;
let productJourney = 'GREAT Protector Active';
let insuredFor = document.querySelector('label[for="insured"] +.multiselect .multiselect-single-label')?.textContent;
let idSelector = document.querySelectorAll('label[for="thirdPartyIdType"] +.multiselect .multiselect-single-label , label[for="idType"] +.multiselect .multiselect-single-label')[0];
let idType = idSelector?.textContent;
let birthDate = document.querySelector('input#birthdayInput')?.value;
let planOptionsIndex = getSelectedIndex('.plan-options .cmp-radio');
let addOnSelection = document.querySelectorAll('.checkbox-custom .cmp-checkbox-custom.-selected').length > 0;
let paymentCycle = getPaymentIndex('#paymentFrequency-Monthly , #paymentFrequency-Annual');
// Initializing an empty object
let quotationData = {};
// Adding properties only if the values are available
if (productJourney) quotationData.productJourney = productJourney;
if (insuredFor) quotationData.insuredFor = insuredFor;
if (idType) quotationData.idType = idType;
if (birthDate) quotationData.birthDate = birthDate;
if (planOptionsIndex !== -1) quotationData.planOptionsIndex = planOptionsIndex;
if (paymentCycle !== -1 && document.querySelectorAll('.checkbox-custom .cmp-checkbox-custom.-selected').length > -1) {
//alert('check 01')
quotationData.addOnSelection = addOnSelection
}
if (paymentCycle !== -1) quotationData.paymentCycle = paymentCycle;
// Store or update quotation data in cookie
if (insuredFor && idType && birthDate) setOrUpdateQuoteDataInCookie(quotationData);
}
// get value of data population cookie to populate data
let dataPopulationCookieValue = getCookie(dataPopulationCookieName);
// set session storage based on cookie value
// if (dataPopulationCookieValue) {
// sessionStorage.setItem("data-population", "true");
// deleteCookie("data-population-cookie");
// }
// Main function to handle form data population based on the pathname
function handleDataPopulation(productData, loadAgain = false) {
const pathname = window.location.pathname;
const { productJourney } = productData;
// Actions for Great Protector Active
if (pathname === '/sg/en/personal-accident-insurance/200201/get-quotation.html' && productJourney === 'GREAT Protector Active') {
if (productData.insuredFor && loadAgain) {
selectOptionByText('label[for="insured"] + .multiselect .multiselect-option', productData.insuredFor);
}
setTimeout(function () {
if (productData.idType && loadAgain) {
selectOptionByText('label[for="thirdPartyIdType"] + .multiselect .multiselect-option , label[for="idType"] + .multiselect .multiselect-option', productData.idType);
}
if (productData.birthDate && loadAgain) {
setInputValue("#birthdayInput", productData.birthDate);
}
}, 500)
setTimeout(function () {
if (productData.planOptionsIndex > -1) {
clickRadioButtonByIndex('.plan-options .cmp-radio input', productData.planOptionsIndex);
}
if (productData.addOnSelection) {
setTimeout(function () {
clickInputById('selectedExtraPlan-undefined');
if (productData.paymentCycle > -1) {
setTimeout(function () {
if (document.querySelector('label[for="paymentFrequency-Annual"] .cmp-text.font-normal span').textContent.length > 3) {
clickRadioButtonByIndex('#paymentFrequency-Monthly , #paymentFrequency-Annual', productData.paymentCycle);
}
}, 1500);
}
}, 500)
} else {
if (productData.paymentCycle > -1) {
setTimeout(function () {
if (document.querySelector('label[for="paymentFrequency-Annual"] .cmp-text.font-normal span').textContent.length > 3) {
clickRadioButtonByIndex('#paymentFrequency-Monthly , #paymentFrequency-Annual', productData.paymentCycle);
}
}, 1500);
}
}
}, 2000)
}
}
function loadData() {
if (dataPopulationCookieValue !== 'true') return;
(function pollForFormload() {
if (
document.querySelector('input[name="agentMobileNumber"]') &&
document.querySelectorAll('#paymentFrequency-Annual , #packageItem-W05I1-annual').length > 0
) {
const existingCookie = getCookie(cookieName);
const productData = existingCookie ? JSON.parse(existingCookie) : {};
// Handle form filling based on the current page
handleDataPopulation(productData);
} else {
setTimeout(pollForFormload, 25);
}
})();
}
// function to handle click events
function eventHandler(event) {
const { target } = event;
//console.log('target:', target);
if (
window.location.pathname === '/sg/en/personal-accident-insurance/200201/get-quotation.html' &&
target.closest('.cmp-button a') &&
(
target.textContent.includes('View benefits') ||
target.closest('.cmp-button a[href*="https://buy-uat-greateasternlife.adobecqms.net/sg/en/personal-accident-insurance/200201/quick-check.html"]'))
) {
if (target.textContent.includes('View benefits')) loadData();
getQuoteDataGPA();
//alert('working GPA');
}
}
// Initialize product data from cookie
const existingCookie = getCookie(cookieName);
const productData = existingCookie ? JSON.parse(existingCookie) : {};
// Handle form data population based on the current page
if (dataPopulationCookieValue === 'true') {
handleDataPopulation(productData, true);
}
document.body.addEventListener('click', eventHandler);
},
};
// Return if the test ran already!
if (document.querySelector(`.${test.id}`)) return;
// Polling conditions
if (document.readyState === "complete") {
try {
// Activate test
test.init();
// Success log
console.log('Vertis Digital: EXP-1: V: 1:11');
} catch (error) {
// Error log
console.log(`Initialization Error:`, error);
}
} else {
Date.now() < timeInFuture
? setTimeout(loadVariation.bind({}, timeInFuture), 25)
: console.log("loadVariation timed out!");
}
})(Date.now() + 60000);
// End variation JS
return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, C_722219_657_1_2_0:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove visibility",".leo-py-xs"); vwo_debug*/(el=vwo_$(".leo-py-xs")).vwoCss({visibility:"hidden !important",display:"none !important"});})(".leo-py-xs")}}, C_722219_657_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("content",".redactor-editor"); vwo_debug*/(el=vwo_$(".redactor-editor")).replaceWith(''),el=vwo_$(".redactor-editor");})(".redactor-editor")}}, C_722219_657_1_2_2:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("content",".modal-footer"); vwo_debug*/el=vwo_$(".modal-footer"),vwo_$(".modal-footer").each((function(){vwo_$(this).vwoAttr("class","modal-footer leo-text-right "),vwo_$(this).children().eq(1).vwoAttr("class","leo-button leo-button--secondary modal-save product-save-btn-active "),vwo_$(this).children().eq(1).nonEmptyContents().eq(0).replaceWith(document.createTextNode("Apply")),vwo_$(this).children().eq(1).children().eq(0).vwoAttr("class","rippleJS focus-visible "),vwo_$(this).children().eq(1).children().eq(0).vwoAttr("data-focus-visible-added","")})),el=vwo_$(".modal-footer");})(".modal-footer")}}, C_722219_657_1_2_3:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove","#filter-search"); vwo_debug*/(el=vwo_$("#filter-search")).vwoCss({display:"none !important"});})("#filter-search")}}, C_722219_657_1_2_4:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove","#search-sb-key"); vwo_debug*/(el=vwo_$("#search-sb-key")).vwoCss({display:"none !important"});})("#search-sb-key")}}, C_722219_657_1_2_5:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove","#filter-form > span:nth-of-type(1)"); vwo_debug*/(el=vwo_$("#filter-form > span:nth-of-type(1)")).vwoCss({display:"none !important"});})("#filter-form > span:nth-of-type(1)")}}, C_722219_657_1_2_6:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".announcement-blue-bg"); vwo_debug*/(el=vwo_$(".announcement-blue-bg")).vwoCss({display:"none !important"});})(".announcement-blue-bg")}}, ct997_11fd5df3bdf6d6f8b7b1bbf21173a0ed:{ fn:function(executeTrigger, vwo_$) {
(function () {
if (location.pathname !== '/sg/en/personal-accident-insurance/200201/get-quotation.html') return;
const productsPurchasedCookieName = "personalization_products_purchased";
const quotationDataCookieName = "quotationData";
const dataPopulationCookieName = "data-population-cookie";
// Function to get cookie
function getCookie(cname) {
const name = cname + "=";
const decodedCookie = decodeURIComponent(document.cookie);
const cookies = decodedCookie.split(';');
for (const cookie of cookies) {
const c = cookie.trim();
if (c.indexOf(name) === 0) {
return c.substring(name.length);
}
}
return "";
}
const productsPurchasedStr = getCookie(productsPurchasedCookieName);
const productPurchaseData = productsPurchasedStr ? JSON.parse(productsPurchasedStr) : [];
//const quotationDataCookieValue = getCookie(quotationDataCookieName);
//const dataPopulationCookieValue = getCookie(dataPopulationCookieName);
const productsViewedCTAArr = [
{ "name": "GREAT Protector Active" }
];
// Check if any product from productsViewedCTAArr is in productPurchaseData
const hasMatchingProduct = productsViewedCTAArr.some(viewedProduct =>
productPurchaseData.some(purchasedProduct => purchasedProduct.name === viewedProduct.name)
);
// console.log('hasMatchingProduct:', hasMatchingProduct);
// console.log('quotationDataCookieValue:', quotationDataCookieValue);
// console.log('dataPopulationCookieValue:', dataPopulationCookieValue);
// Activation conditions
// const shouldActivate = (
// (!hasMatchingProduct && quotationDataCookieValue === '') ||
// (!hasMatchingProduct && quotationDataCookieValue && dataPopulationCookieValue === 'true')
// )
if (!hasMatchingProduct) {
//alert('activate');
executeTrigger();
}
})()
}}, C_722219_998_1_2_0:{ fn:function(){return (function(x) { try{
var _vwo_sel = vwo_$("");
!vwo_$("head").find("#1736837447668").length && vwo_$('head').append(_vwo_sel);
// Start variation JS
void (function loadVariation(timeInFuture) {
// Main Test object
const test = {
// Some test specific global letiables
id: "EXP-1-Home",
// Test init
init: function () {
// Add a test specific classname to the body element
document.body.classList.add(test.id);
// Below function calls order is important
test.mainJS();
},
// Main JS
mainJS: function () {
const cookieName = "quotationData";
const dataPopulationCookieName = "data-population-cookie";
// Function to get cookie
function getCookie(cname) {
const name = cname + "=";
const decodedCookie = decodeURIComponent(document.cookie);
const cookies = decodedCookie.split(';');
for (const cookie of cookies) {
const c = cookie.trim();
if (c.indexOf(name) === 0) {
return c.substring(name.length);
}
}
return "";
}
// Utility function to Function to set cookie
function setCookie(cname, cvalue, exmin) {
const d = new Date();
d.setTime(d.getTime() + (exmin * 60 * 1000));
const expires = `expires=${d.toUTCString()}`;
document.cookie = `${cname}=${cvalue}; ${expires}; path=/; domain=.greateasternlife.com`;
};
// function to trigger GA events
function gaEventTrigger(eventAction, eventLabel, eventSubCategory = '', eventJourneyCTA = '') {
dataLayer.push({
event: "vwoEvent",
eventDetails: {
category: "[vwo] floating banner - ab test - expose",
action: eventAction,
label: eventLabel
},
...(eventSubCategory ? { contentSubcategory: eventSubCategory } : {}),
...(eventJourneyCTA ? { journeyCta: eventJourneyCTA } : {})
});
};
const existingCookie = getCookie(cookieName);
const productData = existingCookie ? JSON.parse(existingCookie) : {};
const productLinks = {
'GREAT Protector Active': 'https://buy-uat-greateasternlife.adobecqms.net/sg/en/personal-accident-insurance/200201/get-quotation.html'
}
let productName = productData?.productJourney;
let productRedirect = productLinks[productData?.productJourney];
const crossIcon = `
`;
const createBanner = (productName) => (`
${crossIcon}
Ready to complete your purchase for ${productName}?
Secure your coverage now
Resume my purchase
`);
// Retrieve banner view count from localStorage or default to 0
let bannerViewCount = parseInt(localStorage.getItem('bannerViewCount') || '0', 10);
// Check session storage for the 'viewInSession' flag, defaulting to 'show'
const viewInSession = sessionStorage.getItem('viewInSession') || 'show';
// Update session storage if not already set
if (viewInSession === 'show') {
sessionStorage.setItem('viewInSession', 'show');
// Increment and update banner view count in localStorage
bannerViewCount += 1;
localStorage.setItem('bannerViewCount', bannerViewCount);
}
if (
productData &&
productData.productJourney &&
location.pathname === '/sg/en/personal-insurance.html' &&
!document.querySelector('.product-purchase-banner-section') &&
bannerViewCount <= 2 &&
viewInSession !== 'dont show'
) {
// insert the banner
document.querySelector('main .cmp-container > .aem-Grid').insertAdjacentHTML('beforeend', createBanner(productName));
// trigger impression event
let eventLabel = (`[vwo_ce_rtg] resume orion journey floating banner - ${productName}`).toLowerCase();
let eventSubCategory = productName.toLowerCase();
gaEventTrigger('impression', eventLabel, eventSubCategory);
// set banner view count to session & local storage
sessionStorage.setItem('viewInSession', 'seen');
// function for click events
function clickHander(event) {
const { target } = event;
//console.log('target: ', target);
if (target.closest('.banner-icon-section svg')) {
document.querySelector('.product-purchase-banner-section').classList.add('hide-banner');
sessionStorage.setItem('viewInSession', 'dont show');
// trigger click event to Close CTA
let eventLabel = (`[vwo_ce_rtg] resume orion journey floating banner - ${productName}`).toLowerCase();
let eventSubCategory = productName.toLowerCase();
gaEventTrigger('close', eventLabel, eventSubCategory);
}
if (target.closest('.banner-button.new-button') && productRedirect) {
// trigger click event to CTA
let eventLabel = (`[vwo_ce_rtg] resume orion journey floating banner - ${productName} - Resume my purchase`).toLowerCase();
let eventSubCategory = productName.toLowerCase();
let eventJourneyCTA = ("vworf-" + productName).toLowerCase();
gaEventTrigger('click', eventLabel, eventSubCategory, eventJourneyCTA);
setCookie(dataPopulationCookieName, "true", 15);
window.location.href = productRedirect;
}
}
// Add event listener on click event.
document.body.addEventListener('click', clickHander);
}
},
};
// Return if the test ran already!
if (document.querySelector(`.${test.id}`)) return;
// Polling conditions
if (document.querySelector('main .cmp-container > .aem-Grid')) {
try {
// Activate test
test.init();
// Success log
console.log('Vertis Digital: Home: EXP-1: V: 1:11');
} catch (error) {
// Error log
console.log(`Initialization Error:`, error);
}
} else {
Date.now() < timeInFuture
? setTimeout(loadVariation.bind({}, timeInFuture), 25)
: console.log("loadVariation timed out!");
}
})(Date.now() + 60000);
// End variation JS
return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, R_722219_998_1_2_0:{ fn:function(){return (function(x) { try{
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1736837447632"]')).remove();
var ctx=vwo_$(x),el;
/*vwo_debug log("Revert","content",""); vwo_debug*/;
el=vwo_$('[vwo-element-id="1736837447668"]');
el.revertContentOp().remove();
return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, C_722219_998_1_3_0:{ fn:function(){return (function(x) { try{
// Start variation JS
void (function loadVariation(timeInFuture) {
// Main Test object
const test = {
// Some test specific global letiables
id: "EXP-1-control",
// Test init
init: function () {
// Add a test specific classname to the body element
document.body.classList.add(test.id);
// Below function calls order is important
test.mainJS();
},
// Main JS
mainJS: function () {
const cookieName = "quotationData";
// Function to get cookie
function getCookie(cname) {
const name = cname + "=";
const decodedCookie = decodeURIComponent(document.cookie);
const cookies = decodedCookie.split(';');
for (const cookie of cookies) {
const c = cookie.trim();
if (c.indexOf(name) === 0) {
return c.substring(name.length);
}
}
return "";
}
// function to trigger GA events
function gaEventTrigger(eventAction, eventLabel, eventSubCategory = '', eventJourneyCTA = '') {
dataLayer.push({
event: "vwoEvent",
eventDetails: {
category: "[vwo] floating banner - ab test - control",
action: eventAction,
label: eventLabel
},
...(eventSubCategory ? { contentSubcategory: eventSubCategory } : {}),
...(eventJourneyCTA ? { journeyCta: eventJourneyCTA } : {})
});
};
const existingCookie = getCookie(cookieName);
const productData = existingCookie ? JSON.parse(existingCookie) : {};
let productName = productData?.productJourney;
// Retrieve banner view count from localStorage or default to 0
let bannerViewCount = parseInt(localStorage.getItem('bannerViewCount') || '0', 10);
// Check session storage for the 'viewInSession' flag, defaulting to 'show'
const viewInSession = sessionStorage.getItem('viewInSession') || 'show';
// Update session storage if not already set
if (viewInSession === 'show') {
sessionStorage.setItem('viewInSession', 'show');
// Increment and update banner view count in localStorage
bannerViewCount += 1;
localStorage.setItem('bannerViewCount', bannerViewCount);
}
if (
productData &&
productData.productJourney &&
location.pathname === '/sg/en/personal-insurance.html' &&
bannerViewCount <= 2 &&
viewInSession !== 'dont show'
) {
// trigger impression event
let eventLabel = (`[vwo_ce_rtg] resume orion journey floating banner - ${productName}`).toLowerCase();
let eventSubCategory = productName.toLowerCase();
gaEventTrigger('impression', eventLabel, eventSubCategory);
// set banner view count to session & local storage
sessionStorage.setItem('viewInSession', 'seen');
}
},
};
// Return if the test ran already!
if (document.querySelector(`.${test.id}`)) return;
// Polling conditions
if (document.readyState === 'complete') {
try {
// Activate test
test.init();
// Success log
console.log('Vertis Digital: Control: EXP-1: V: 1:01');
} catch (error) {
// Error log
console.log(`Initialization Error:`, error);
}
} else {
Date.now() < timeInFuture
? setTimeout(loadVariation.bind({}, timeInFuture), 25)
: console.log("loadVariation timed out!");
}
})(Date.now() + 60000);
// End variation JS
return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, ct998_7968865b609e3fc27b943d00b3dd1b98:{ fn:function(executeTrigger, vwo_$) {
(function () {
if (location.pathname !== '/sg/en/personal-insurance.html') return false;
const cookieName = "quotationData";
const productsPurchasedCookieName = "personalization_products_purchased";
// Function to get cookie
function getCookie(cname) {
const name = cname + "=";
const decodedCookie = decodeURIComponent(document.cookie);
const cookies = decodedCookie.split(';');
for (const cookie of cookies) {
const c = cookie.trim();
if (c.indexOf(name) === 0) {
return c.substring(name.length);
}
}
return "";
}
const existingCookie = getCookie(cookieName);
const productsPurchasedStr = getCookie(productsPurchasedCookieName);
const productData = existingCookie ? JSON.parse(existingCookie) : {};
const productPurchaseData = productsPurchasedStr ? JSON.parse(productsPurchasedStr) : [];
const productsViewedCTAArr = [
{ "name": "GREAT Protector Active" }
];
// Check if any product from productsViewedCTAArr is in productPurchaseData
const hasMatchingProduct = productsViewedCTAArr.some(viewedProduct =>
productPurchaseData.some(purchasedProduct => purchasedProduct.name === viewedProduct.name)
);
let bannerCount = localStorage.getItem('bannerViewCount');
if (
!hasMatchingProduct &&
productData &&
productData.productJourney &&
(bannerCount === null || (bannerCount && parseInt(bannerCount, 10) < 3))
) {
//alert('activate');
executeTrigger();
}
})()
}}, C_722219_889_1_2_0:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".breadcrumb > ul:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".breadcrumb > ul:nth-of-type(1)")).vwoCss({display:"none !important"});})(".breadcrumb > ul:nth-of-type(1)")}}, R_722219_889_1_2_0:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","remove",".breadcrumb > ul:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".breadcrumb > ul:nth-of-type(1)")).vwoRevertCss();})(".breadcrumb > ul:nth-of-type(1)")}}, C_722219_889_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("remove",".leo-py-md"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-py-md")}}, C_722219_736_1_2_0:{ fn:function(log,nonce=''){return (function(x) {try{!function(){var e=window.location.pathname,t=[{name:"GREAT CareShield",productCategory:"health-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/health-insurance/great-careshield.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/health-insurance/220402/get-quotation.html",bulletPoints:["Disability financial support starts from the inability to perform any ADL","Get up to 90% more in monthly benefits for caregiver's and children's expenses","Utilise your MediSave funds4 for enhanced coverage"]},{name:"GREAT Critical Cover Series",productCategory:"health-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/health-insurance/great-critical-cover.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/life-insurance/220303/get-quotation.html",bulletPoints:["100% payout for every critical illness claim","Coverage continues over and over again, even after the first critical illness claim","Flexibility in choice of coverage"]},{name:"GoGreat Term Life",productCategory:"life-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/life-insurance/gogreat-term-life.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/life-insurance/210301/get-quotation.html",bulletPoints:["Complete your protection needs from just S$0.21* a day","All-round protection till age 65","Hassle-free application"]},{name:"GREAT Protector Active",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/great-protector-active.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/personal-accident-insurance/200201/get-quotation.html",bulletPoints:["Get up to S$3 million in coverage against accidents","Boost coverage by up to 1.5 times with Benefit Booster4","High medical expenses reimbursement"]},{name:"Essential Protector Plus",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/essential-protector-plus.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/personal-accident-insurance/200204/get-quotation.html",bulletPoints:["Reimbursement of up to S$15,000 for medical expenses","Get daily income upon hospitalisation","Extra payout of up to S$8,000 for accidental injuries","Additional 20% coverage for ladies"]},{name:"GREAT Junior Protector",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/great-junior-protector.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/personal-accident-insurance/200202/get-quotation.html",bulletPoints:["Up to 3 times payout upon Accidental Death and Permanent Disablement","Daily hospital cash benefit for up to 41 Infectious Diseases","Reimbursement of up to S$9,000 for Accidental Medical Expenses"]},{name:"GREAT Prime Rewards",productCategory:"wealth-accumulation",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/wealth-accumulation/great-prime-rewards.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/life-insurance/220105/get-quotation.html",bulletPoints:["Receive regular income stream to suit your retirement needs","Boost your annual payouts by up to 1.82X†","Your capital is guaranteed1","Maximise retirement planning with SRS"]},{name:"GREAT Hospital Cash",productCategory:"health-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/health-insurance/great-hospital-cash.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/health-insurance/230401/get-quotation.html",bulletPoints:["Assurance of hospital cash payouts after 12 hours^","Enjoy up to a lifetime of hospitalisation coverage","Enjoy more discounts on your premiums","Sign up online and start your coverage with ease"]},{name:"GREAT Golden Protector",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/great-golden-protector.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/personal-accident-insurance/200203/get-quotation.html",bulletPoints:["Up to 300% payout and up to S$200 daily hospital cash benefit","Comprehensive post-accident benefits","Payouts of up to S$25,000 for fractures, dislocations or burns","Get 25% off premiums on 2nd life assured"]},{name:"PA Supreme",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/pa-supreme.html",cta2Text:"Buy now",cta2Url:"//greateasternlife.com/psu",bulletPoints:["High payout in an unfortunate event","Financial support for a swift recovery","Assurance of emergency support that counts"]}],a=`\n \n \n \n \n \n`,n='\n
Sleep apnea - An unassuming risk factor for heart disease
Don’t sleep through the (health) alarms of snoring
14 Mar 2023
Obstructive sleep apnea is a condition in which the airway is obstructed, either partially or fully, during sleep. The most common manifestation of this condition is snoring. Snoring occurs due to the stop-start nature of obstructed breathing.
If you sleep next to a partner who has obstructive sleep apnea, you might find your partner’s snoring to be annoying. However, sleep apnea is a problem that goes beyond mere inconvenience. Patients with sleep apnea often wake up feeling unrested due to the fluctuating nature of their breathing during sleep. This means less energy during the day and higher levels of irritation, depression, and fatigue.
Scientists studying obstructive sleep apnea have linked it to a number of illnesses. For example, the American Heart Association reported that obstructive sleep apnea occurs in around 40% to 80% of patients with pulmonary hypertension, hypertension, heart failure, and coronary artery disease.
The Association With Heart Disease
“Sleep apnea is highly prevalent in patients with cardiovascular disease,” scientists wrote in a study on the cardiovascular consequences of sleep apnea.
This is because the respiratory and cardiovascular systems are closely interrelated. The heart is responsible for pumping blood to the lungs, where gaseous exchange occurs. A defect in one organ will have a knock-on effect on the other.
Below is a flow diagram that demonstrates how obstructive sleep apnea pathophysiology leads to disease mechanisms that ultimately results in cardiovascular disease:
Let’s explore just one pathway from obstructive sleep apnea to cardiovascular disease: Recurrent obstruction of the airways results in hypoxemia, which means that the heart needs to work harder to ensure that the body receives adequate oxygen. This leads to hemodynamic changes, which over time can cause heart failure.
Therefore, it is imperative that you take obstructive sleep apnea seriously if you have been diagnosed with this condition by your doctor.
Treatment Options
“As the rate of obesity . . . has been steadily increasing, associated higher prevalence of sleep-disordered breathing has also been observed,” scientists wrote in a study on sleep apnea.
Obesity is a significant risk factor for obstructive sleep apnea. Hence, if you experience sleep apnea and also suffer from obesity, losing weight and committing to a more healthy lifestyle can help ease this condition.
If you have severe sleep apnea, a machine known as BiPAP can help keep your airways open. A BiPAP machine is a mask you wear while you sleep; it helps deliver both an inhalation and exhalation pressure. Many patients with sleep apnea who have used a BiPAP machine report sleeping better through the night.
Because of how closely sleep apnea is associated with heart disease, tackling sleep apnea seriously will also lower your risk of developing heart disease in its various forms. Ultimately, you’ll sleep better, snore less, and live a healthier lifestyle.
This article was contributed by Healthway Medical. Permission required for reproduction.
References
1. Yeghiazarians Y, Jneid H, Tietjens JR, et al. Obstructive Sleep Apnea and Cardiovascular Disease: A Scientific Statement From the American Heart Association [published correction appears in Circulation. 2022 Mar 22;145(12):e775]. Circulation. 2021;144(3):e56-e67. doi:10.1161/CIR.0000000000000988
2. Javaheri S, Barbe F, Campos-Rodriguez F, et al. Sleep Apnea: Types, Mechanisms, and Clinical Cardiovascular Consequences. J Am Coll Cardiol. 2017;69(7):841-858. doi:10.1016/j.jacc.2016.11.069
3. Lin J, Suurna M. Sleep Apnea and Sleep-Disordered Breathing. Otolaryngol Clin North Am. 2018;51(4):827-833. doi:10.1016/j.otc.2018.03.009
GREAT Critical Cover Series
Critical illness coverage that continues over and over again