@hhgtech/hhg-components 1.22.14 → 1.22.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/esm/lead.js CHANGED
@@ -1 +1 @@
1
- import{d as n,e,b as t,_ as a,a as o}from"./tslib.es6-2fa94e2c.js";import l,{createContext as i,useMemo as r,useContext as d,useState as c,useEffect as s,useRef as m}from"react";import p from"lodash/debounce";import{createPortal as u}from"react-dom";import{T as h}from"./translationsContext-e7808c8f.js";import{g,s as b}from"./cookieHelper-8c12973e.js";import{b as f,a as x}from"./utils-40d4438f.js";import{v1 as k}from"uuid";import{u as _}from"./useTranslations-b3eb31ef.js";import"dayjs";import"./screenSizeContext-ff96a3d1.js";import"./lazyLoad-59e8ff6d.js";import v from"styled-components";import"./index-2cf746a8.js";import"./isProduction-6fc0946c.js";import"./Locale-69030fff.js";import"./gAssets.js";import"string-format";import"lodash/throttle";import"vanilla-lazyload";var w=function(n){var e=n.onClose,t=n.containerClassName,a=n.svgClassName;return l.createElement("button",{onClick:e,className:"le-newbuilder-close-button js-modal__close ".concat(t||"")},l.createElement("svg",{className:"le-newbuilder-close-svg ".concat(a||""),xmlns:"http://www.w3.org/2000/svg",width:"53",height:"53",viewBox:"0 0 53 53"},l.createElement("defs",null,l.createElement("filter",{width:"53",height:"53",filterUnits:"userSpaceOnUse"},l.createElement("feGaussianBlur",{result:"blur",stdDeviation:"3"}),l.createElement("feFlood",{floodOpacity:".4"}),l.createElement("feComposite",{in2:"blur",operator:"in"}),l.createElement("feComposite",{in:"SourceGraphic"})),l.createElement("style",{dangerouslySetInnerHTML:{__html:".cls-2{fill:none;stroke:#fff;stroke-linecap:round;stroke-width:2px}"}})),l.createElement("g",{filter:"url(#Ellipse_482)"},l.createElement("circle",{cx:"17.5",cy:"17.5",r:"17.5",transform:"translate(-483.1 -671.163)translate(483.1 671.16)translate(9 9)",fill:"#005cfd"})),l.createElement("path",{d:"M19 19L34 34",className:"cls-2"}),l.createElement("path",{d:"M34 19L19 34",className:"cls-2"})))},y=function(n){var e=n.popupId,t=n.url,a=n.newTab,o=n.imageDestkop,i=n.imageMobile,r=n.onClose,d=n.onOtherSubmit;return l.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},l.createElement("div",{className:"le-center-tab-popup"},l.createElement("div",{style:{position:"relative"}},l.createElement("a",{className:"js-popup-other-submit",href:t,target:a?"blank":"_parent",onClick:d},l.createElement("img",{className:"le-only-mobile",src:i}),l.createElement("img",{className:"le-only-desktop",src:o})),l.createElement(w,{onClose:r,containerClassName:"le-abs-outer-mobile-top-right-2",svgClassName:"le-mobile-btn"}))))},E=function(n){var e=n.popupId,t=n.url,a=n.title,o=n.urlText,i=n.titleAlign,r=n.subtitle,d=n.subtitleAlign,c=n.newTab,s=n.imageDesktop,m=n.imageMobile,p=n.onClose,u=n.onOtherSubmit;return l.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},l.createElement("aside",{className:"le-only-desktop"},l.createElement("div",{className:"le-floating-desktop"},l.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},s?l.createElement("div",null,l.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:s})):null,l.createElement("div",{style:{padding:20}},l.createElement("div",{className:"le-floating-desktop-title le-text-align-".concat(i)},a),l.createElement("div",{className:"le-floating-desktop-desc le-text-align-".concat(d)},r)),l.createElement("a",{target:c?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},l.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},o)),l.createElement(w,{onClose:p,containerClassName:"le-abs-outer-top-right"})))),l.createElement("aside",{className:"le-only-mobile"},l.createElement("div",{className:"le-floating-mobile"},l.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},l.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},l.createElement("div",null,l.createElement("div",{className:"le-floating-mobile-title le-text-align-".concat(i)},a),l.createElement("div",{className:"le-floating-mobile-desc le-text-align-".concat(d)},r)),m?l.createElement("div",null,l.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:m})):null),l.createElement("div",{style:{textAlign:"center",marginTop:10}},l.createElement("a",{target:c?"blank":"_parent",href:t,style:{textDecoration:"none"}},l.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},o))),l.createElement(w,{onClose:p,containerClassName:"le-abs-outer-top-right",svgClassName:"le-mobile-btn"})))))},N=1,C=2,B="https://dev.leadgen.hellobacsi.com/",S=1,T=2,z="";B.includes("localhost")&&(B="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(z="pink");var j="https://"+location.hostname+location.pathname+location.search;j=j.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));var L={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},O=L[document.documentElement.lang]||L["vi-VN"];var P=i({}),I=function(n){var e=n.content,t=n.inlinePosition,a=r((function(){var n;if(!t)return null;var e=document.querySelector('[data-url="'.concat(location.pathname,'"] .body-content'));if(null===(n=null==e?void 0:e.childNodes)||void 0===n?void 0:n.length){var a=e.querySelectorAll("p"),o=e.querySelectorAll("h2"),l=null;switch(t){case"1th":l=a[0];break;case"2th":l=a[1];break;case"3th":l=a[2];break;case"4th":l=a[3];break;case"5th":l=a[4];break;case"6th":l=a[5];break;case"7th":l=a[6];break;case"8th":l=a[7];break;case"9th":l=a[8];break;case"10th":l=a[9];break;case"11th":l=a[10];break;case"12th":l=a[11];break;case"lastP":l=a[a.length-1];break;case"1thH2":l=o[0];break;case"2thH2":l=o[1];break;case"3thH2":l=o[2];break;case"4thH2":l=o[3];break;case"5thH2":l=o[4];break;case"6thH2":l=o[5];break;case"7thH2":l=o[6];break;case"8thH2":l=o[7];break;case"9thH2":l=o[8];break;case"10thH2":l=o[9];break;case"lastH2":l=o[o.length-1]}if(l){var i=document.createElement("div");return i.classList.add("inline-lead-wrapper"),l.nextElementSibling?e.insertBefore(i,l.nextElementSibling):e.appendChild(i),i}}}),[t]);return t&&a?u(e,a):null},A=function(n){var e=n.content,t=r((function(){var n=[];return document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar").forEach((function(e){return n.push(e)})),n}),[]);return l.createElement(l.Fragment,null,t.map((function(n){return u(e,f(n,"sidebar-lead-modal-wrapper"))})))},D=function(t){var a,o,i,m=t.popupId,p=t.extraFields,u=t.onClose,h=t.onOtherSubmit,g=t.imageMobile,b=t.imageDesktop,f=t.imageBackground,x=t.currentLayout,k=t.title,v=t.onSubmit,w=_().t,y=JSON.parse(p.listBlockAdded),E=JSON.parse(p.actionBlocks),N=JSON.parse(p.textBlocks),C=d(P).apiUrl,B=E.submitBlock.data.url,S=E.submitBlock.data.text,T=E.submitBlock.data.text2,j=E.submitBlock.data.value,L=location.pathname,D=x.includes("Inline")||"Sidebar"===x,M="Slider"===x,H=c(!0),q=H[0],V=H[1];if(window.innerWidth<769&&["Fullscreen","Slider"].includes(x))return console.log("😎 Not show fullscreen, slider on mobile "),null;s((function(){(x.includes("LightBox")||"Fullscreen"==x)&&document.body.classList.add("noscroll")}),[]);var F=function(t,a){return n(void 0,void 0,void 0,(function(){return e(this,(function(n){switch(n.label){case 0:return a.target.validity.valueMissing?(a.target.setCustomValidity(w("validator.required")),[3,5]):[3,1];case 1:return a.target.validity.valid||a.target.validity.customError?[3,2]:("tel"===t?a.target.setCustomValidity(w("validator.phone")):"date"===t?a.target.setCustomValidity(w("validator.date")):"email"===t&&a.target.setCustomValidity(w("validator.email")),[3,5]);case 2:return"tel"!==t?[3,4]:[4,require("intl-tel-input")];case 3:return n.sent().isValidNumber(String(a.target.value),O.countryCode)?a.target.setCustomValidity(""):a.target.setCustomValidity(w("validator.phone")),[3,5];case 4:a.target.setCustomValidity(""),n.label=5;case 5:return[2]}}))}))},R=r((function(){var n={TextBlock:0,NumberBlock:0,EmailBlock:0,PhoneBlock:0,DateBlock:0,CheckboxBlock:0,RadioBlock:0};return y.map((function(e,t){var a,o;if("TitleBlock"==e.name)return l.createElement("h2",{key:t,className:"lead-modal__title ".concat("le-text-align-"+((null===(a=e.data)||void 0===a?void 0:a.align)||"")," ").concat(z)},e.data.value);if("SubtitleBlock"==e.name)return l.createElement("p",{key:t,className:"lead-modal__description ".concat("le-text-align-"+((null===(o=e.data)||void 0===o?void 0:o.align)||"")," ").concat(z)},e.data.value);if("TextBlock"==e.name)return n.TextBlock+=1,l.createElement("div",{key:t},l.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},l.createElement("input",{required:!0,"data-key":e.data.value,name:"text"+(n.TextBlock>1?n.TextBlock:""),spellCheck:!1,type:"text",placeholder:e.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(n){return F("text",n)}}),l.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(C,"admin/img/builder/text.svg")})));if("NumberBlock"==e.name){var i=l.createElement("div",{key:t},l.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},l.createElement("input",{required:!0,"data-key":e.data.value,name:"number"+(n.NumberBlock?n.NumberBlock:""),spellCheck:!1,type:"number",min:"0",placeholder:e.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(n){return F("number",n)}}),l.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(C,"admin/img/builder/number.svg")})));return n.NumberBlock+=1,i}if("EmailBlock"==e.name){i=l.createElement("div",{key:t},l.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},l.createElement("input",{required:!0,"data-key":e.data.value,name:"email"+(n.EmailBlock?n.EmailBlock:""),spellCheck:!1,type:"email",placeholder:e.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(n){return F("email",n)}}),l.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(C,"admin/img/builder/email.svg")})));return n.EmailBlock+=1,i}if("PhoneBlock"==e.name){i=l.createElement("div",{key:t},l.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},l.createElement("input",{required:!0,"data-key":e.data.value,name:"tel"+(n.PhoneBlock?n.PhoneBlock:""),spellCheck:!1,type:"tel",placeholder:e.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(n){return F("tel",n)}}),l.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(C,"admin/img/builder/tel.svg")})));return n.PhoneBlock+=1,i}if("DateBlock"==e.name){i=l.createElement("div",null,l.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},l.createElement("input",{required:!0,type:"date","data-key":e.data.value,name:"date"+(n.DateBlock?n.DateBlock:""),placeholder:e.data.placeholder,onClick:function(n){n.currentTarget.classList.remove("placeholderclass")},onBlur:function(n){n.currentTarget.value||n.currentTarget.classList.add("placeholderclass")},className:"dateclass placeholderclass lead-modal__form-control width-100%",onChange:function(n){return F("date",n)}}),l.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(C,"admin/img/builder/date.svg")})));return n.DateBlock+=1,i}if("LinkButtonBlock"==e.name)return l.createElement("div",{key:t},l.createElement("a",{target:e.data.newtab?"blank":"parrent",href:e.data.url,style:{textDecoration:"none"}},l.createElement("button",{type:"button",className:"lead-modal__btn js-modal__close js-popup-other-submit ".concat(z),onClick:function(){null==u||u(),null==h||h()}},e.data.value)));if("CheckboxBlock"==e.name){var r=e.data,d=r.listQuestion,c=r.isSendMailChimp,s=void 0!==c&&c;i=l.createElement("div",{key:t,style:{margin:"5px 0"}},l.createElement("div",{className:"le-checkbox-title"},e.data.placeholder),l.createElement("div",{className:"mailchimp-".concat(e.data.value),"data-mailchimp":s}),d.map((function(t,a){return l.createElement("label",{key:a,className:"lead-checkbox-container"},l.createElement("input",{"data-key":e.data.value,name:"checkbox"+(n.CheckboxBlock?n.CheckboxBlock:"")+"[]",value:t.value,type:"checkbox",onChange:function(n){return F("checkbox",n)}}),l.createElement("span",{className:"lead-checkbox-checkmark"}),"$",t.placeholder)})));return n.CheckboxBlock+=1,i}if("RadioBlock"==e.name){d=e.data.listQuestion,i=l.createElement("div",{key:t,style:{margin:"5px 0"}},l.createElement("div",{className:"le-checkbox-title"},e.data.placeholder),d.map((function(t,a){return l.createElement("label",{className:"lead-radio-container",key:a},l.createElement("input",{"data-key":e.data.value,name:"radio"+(n.RadioBlock?n.RadioBlock:""),value:t.value,type:"radio",onChange:function(n){return F("radio",n)}}),l.createElement("span",{className:"lead-radio-checkmark"}),t.placeholder)})));return n.RadioBlock+=1,i}if("DropdownBlock"==e.name){d=e.data.listQuestion,i=l.createElement("div",{key:t,style:{margin:"5px 0"}},l.createElement("div",{className:"le-checkbox-title"},e.data.placeholder),l.createElement("div",{className:"le-newbuilder-select-wrapper"},l.createElement("select",{className:"le-newbuilder-select","data-key":e.data.value,name:"dropdown"+(n.DropdownBlock?n.DropdownBlock:"")},d.forEach((function(n,e){return l.createElement("option",{key:e,value:n.value},n.placeholder)})))));return n.DropdownBlock+=1,i}}))}),[]),W=l.createElement(l.Fragment,null,l.createElement("style",{dangerouslySetInnerHTML:{__html:".le-newbuilder-overlay {\n background: url(".concat(g,") ;\n background-repeat: no-repeat;\n background-size: cover;\n }\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(").concat(b,") ;\n background-repeat: no-repeat;\n background-size: cover;\n }\n }")}}),l.createElement("div",{id:m,"data-popup-url":L,"data-popup-type":"lightbox-inline",className:"lead-modal lead-modal-wrapper modal--animate-scale ".concat(D?"le-buider-inline":""," ").concat(M?"le-buider-slider":"")},"Fullscreen"==x?l.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:f||""}):null,l.createElement("div",{className:"lead-modal__wrapper le-newbuilder-wrap-".concat(x)},l.createElement("div",{className:"lead-modal__content le-newbuilder-".concat(x)},l.createElement("header",{className:"lead-modal__header"},["LightBoxA","InlineA","Sidebar","Slider"].includes(x)?g?l.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:g,alt:""}):null:l.createElement(l.Fragment,null,b?l.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:b,alt:""}):null,g?l.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:g,alt:""}):null)),l.createElement("div",{className:"lead-modal__body le-newbuilder-overlay"},l.createElement("form",{className:"lead-modal__form ".concat(m),onSubmit:v},l.createElement("div",{style:{marginBottom:20}},l.createElement("h2",{className:"lead-modal__title ".concat("le-text-align-"+(null===(a=N.titleBlock.data)||void 0===a?void 0:a.align)," ").concat(z)},k),l.createElement("p",{className:"lead-modal__description ".concat("le-text-align-"+(null===(o=N.titleBlock.data)||void 0===o?void 0:o.align)," ").concat(z)},N.subtitleBlock.data.value)),l.createElement("div",null,R),(null===(i=null==E?void 0:E.submitBlock)||void 0===i?void 0:i.isHide)?null:l.createElement(l.Fragment,null,l.createElement("div",{className:"lead-modal__checkbox-wrapper ".concat(z)},l.createElement("div",{className:"lead-modal__checkbox"},l.createElement("input",{id:"lead-term-checkbox",className:"lead-modal__checkbox__input ".concat(z),type:"checkbox","aria-label":"Checkbox label",checked:q,onChange:function(n){return V(n.currentTarget.checked)}}),l.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),l.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},S," ",l.createElement("span",{style:{fontWeight:"bold"}},l.createElement("a",{target:"blank",href:B||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},T)))),l.createElement("button",{id:"lead-submit",type:"submit",className:"lead-modal__btn ".concat(z),disabled:!q}," ",j))))),l.createElement("button",{className:"lead-modal__close-btn ".concat("Fullscreen"==x?"lead-fullscreen-desktop-close-btn":""," js-modal__close ").concat(z),onClick:u},l.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},l.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},l.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),l.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"})))))));return x.includes("LightBox")||"Fullscreen"==x||"Slider"==x?W:"Sidebar"==x?l.createElement(A,{content:W}):x.includes("Inline")?l.createElement(I,{content:W,inlinePosition:p.popupInlinePosition}):null},M=function(n){var e=n.popupId,t=n.link,a=n.linkText,o=n.linkNewTab,i=n.onClose,r=n.imageMobile,d=n.imageDesktop,c=n.currentLayout,s=n.onOtherSubmit,m=location.pathname;return l.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":m,"data-popup-type":"skin_ab"},"SkinA"==c?l.createElement("aside",{className:"le-only-desktop"},l.createElement("div",{className:"le-skin-a-desktop"},l.createElement("div",{style:{position:"relative"}},l.createElement("img",{src:d}),l.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:o?"blank":"_parent"},l.createElement("button",{onClick:s,className:"le-joinbow-btn js-popup-other-submit"},a)),l.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(z)},l.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},l.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},l.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),l.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))):"SkinB"==c?l.createElement("aside",{className:"le-only-desktop"},l.createElement("div",{className:""},l.createElement("div",{style:{position:"relative",zIndex:1e4}},l.createElement("img",{src:d,style:{width:"100%"}}),l.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:o?"blank":"_parent"},l.createElement("button",{onClick:s,className:"le-joinbow-btn-mobile js-popup-other-submit"},a)),l.createElement(w,{containerClassName:"le-abs-top-right",onClose:i})))):null,l.createElement("aside",{className:"le-only-mobile"},l.createElement("div",{className:"le-skin-mobile"},l.createElement("div",{style:{position:"relative"}},l.createElement("img",{src:r,style:{width:"100%"}}),l.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:o?"blank":"_parent"},l.createElement("button",{onClick:s,className:"le-joinbow-btn-mobile js-popup-other-submit"},a)),l.createElement(w,{containerClassName:"le-abs-top-right",svgClassName:"le-mobile-btn",onClose:i})))))},H=function(n){var e=n.popupId,t=n.url,a=n.newTab,o=n.image,i=n.onClose,r=n.onOtherSubmit;return l.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},l.createElement("div",{className:"le-tab-popup"},l.createElement("div",{style:{position:"relative"}},l.createElement("a",{href:t,target:a?"blank":"_parent",onClick:r},l.createElement("img",{className:"js-popup-other-submit",src:o})),l.createElement(w,{onClose:i,containerClassName:"le-abs-outer-mobile-top-right-2",svgClassName:"le-mobile-btn"}))))};var q,V=function(n){var e,t,a=n.campaign,o=n.action,i=n.onSubmit,r=n.onClose;_().t;var c=d(P),p=c.apiUrl,u=c.siteDomain;s((function(){var n=g("_ga")||null;fetch("".concat(p,"api/campaign/").concat(v,"/impression"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:o,url:location.href.toLowerCase(),title_article:document.title,cookie_id:g("hhg-id"),ga_client_id:n})})}),[]);var h=a.extra_fields,f=a.image,x=a.image_desktop,v=a.code,w=a.image_background,N=h.currentLayout,C=h.imageBlocks?JSON.parse(h.imageBlocks):{},B=JSON.parse(h.actionBlocks),S=JSON.parse(h.textBlocks),T=(null===(t=null===(e=null==S?void 0:S.titleBlock)||void 0===e?void 0:e.data)||void 0===t?void 0:t.value)||"",z={1:{},2:{},3:{}},j=m("lead-modal-"+k()),L=function(n){if(void 0===n&&(n="Xin chao {{category_2}} extra"),n.includes("{{category_")){var e="{{category_".length,t=n.search("{{category_");return+n.charAt(e+t)}return null}(T);if(L){console.log("⚡️ Has categoryLevel",L);var O=Array.from(document.getElementsByTagName("META")),I=O.find((function(n){return n.name==="content_category_".concat(L)})),A=O.find((function(n){return n.name==="content_category_en_".concat(L)}));if(!I||!A)return console.log("⚡️ No META TAG for categoryLevel, not show popup",L),null;z[L]={value:I.content,value_en:A.content},T=T.replace("{{category_".concat(L,"}}"),I.content),console.log("⚡️ Set categoryData ",L)}else console.log("⚡️ No categoryLevel",L);var q=function(){var n,e,t,o;if(console.log("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){var l=document.querySelector("#masthead");l&&(l.style.top="0px !important;")}var i=Number(null!==(e=null===(n=a.rules.find((function(n){return"days_to_show_again"==n.rule})))||void 0===n?void 0:n.value)&&void 0!==e?e:7),d=Number(null!==(o=null===(t=a.rules.find((function(n){return"show_again_after_submit"==n.rule})))||void 0===t?void 0:t.value)&&void 0!==o?o:0);0===d&&(console.log("⛔ Popup never show again!"),b("lead_submited_".concat(v),"target_".concat(h.popupVersion),{domain:"."+u,path:"/"})),1==d&&(console.log("⌛ Popup will show again after ".concat(i," days!")),b("lead_submited_".concat(v),"target_".concat(h.popupVersion),{domain:"."+u,days:i,path:"/"}));var c=g("_ga")||null,s={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:g("hhg-id"),ga_client_id:c};L&&(s.category=z[L].value_en),fetch("".concat(p,"api/campaign/").concat(v,"/lead"),{method:"POST",body:JSON.stringify(s),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((function(n){return n.json()})).then((function(n){"error"===n.status&&console.log(n)})).catch((function(n){console.error("Error:",n)})),null==r||r()};return"CenterTab"===N?l.createElement(y,{popupId:j.current,url:C.imageMobile.data.url,newTab:C.imageMobile.data.newtab,imageMobile:f,imageDestkop:x,onClose:r,onOtherSubmit:q}):"Tab"===N?l.createElement(H,{popupId:j.current,url:C.imageMobile.data.url,newTab:C.imageMobile.data.newtab,image:f,onClose:r,onOtherSubmit:q}):"Floating"===N?l.createElement(E,{popupId:j.current,title:T,titleAlign:S.titleBlock.data.align,subtitle:S.subtitleBlock.data.value,subtitleAlign:S.subtitleBlock.data.align,url:B.linkButtonBlock.data.url,urlText:B.linkButtonBlock.data.value,newTab:B.linkButtonBlock.data.newtab,imageMobile:f,imageDesktop:x,onClose:r,onOtherSubmit:q}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?l.createElement(D,{popupId:j.current,extraFields:h,onClose:r,onOtherSubmit:q,imageMobile:f,imageDesktop:x,imageBackground:w,currentLayout:N,title:T,onSubmit:function(n){return i(n,L,z,j.current)},key:N}):N.includes("Skin")?l.createElement(M,{popupId:j.current,link:B.linkButtonBlock.data.url,linkNewTab:!!B.linkButtonBlock.data.newtab,linkText:B.linkButtonBlock.data.value,onClose:r,onOtherSubmit:q,imageMobile:f,imageDesktop:x,currentLayout:N}):null},F=function(t){var a=t.campaign,o=t.action,i=t.onSubmit,r=t.onClose,m=_().t,p=c(!0),u=p[0],h=p[1];s((function(){document.body.classList.add("noscroll");var n=g("_ga")||null;fetch("".concat(C,"api/campaign/").concat(x,"/impression"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:o||"",url:location.href.toLowerCase(),title_article:document.title,cookie_id:g("hhg-id"),ga_client_id:n})})}),[]);var b=a.extra_fields,f=a.image,x=a.code,k=b.title,v=b.desc,w=b.submit,y=b.popUpTermURL,E=b.popUpTermAgreeText,N=b.popUpTermText,C=d(P).apiUrl,B=b.fields?JSON.parse(b.fields):[],S={tel:0,text:0,date:0,email:0},T=function(t,a){return n(void 0,void 0,void 0,(function(){return e(this,(function(n){switch(n.label){case 0:return a.target.validity.valueMissing?(a.target.setCustomValidity(m("validator.required")),[3,5]):[3,1];case 1:return a.target.validity.valid||a.target.validity.customError?[3,2]:("tel"===t?a.target.setCustomValidity(m("validator.phone")):"date"===t?a.target.setCustomValidity(m("validator.date")):"email"===t&&a.target.setCustomValidity(m("validator.email")),[3,5]);case 2:return"tel"!==t?[3,4]:[4,require("intl-tel-input")];case 3:return n.sent().isValidNumber(String(a.target.value),O.countryCode)?a.target.setCustomValidity(""):a.target.setCustomValidity(m("validator.phone")),[3,5];case 4:a.target.setCustomValidity(""),n.label=5;case 5:return[2]}}))}))},j=B.map((function(n,e){var t=l.createElement(l.Fragment,null);return t="date"==n.control?l.createElement("div",{key:e,className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},l.createElement("input",{required:!0,type:"date","data-key":n.listEdit[0].value,name:S.date?n.control+S.date:n.control,placeholder:n.listEdit[1].value||"...",onClick:function(n){return n.currentTarget.classList.remove("placeholderclass")},onBlur:function(n){return!n.currentTarget.value&&n.currentTarget.classList.add("placeholderclass")},className:"dateclass placeholderclass lead-modal__form-control width-100%",onChange:function(e){return T(n.control,e)}}),l.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(C,"admin/img/builder/").concat(n.name,".svg")})):l.createElement("div",{key:e,className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},l.createElement("input",{required:!0,"data-key":n.listEdit[0].value,name:S[n.control]?n.control+S[n.control]:n.control,spellCheck:!1,type:n.control,placeholder:n.listEdit[1].value||"...",className:"lead-modal__form-control width-100%",onChange:function(e){return T(n.control,e)}}),l.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(C,"admin/img/builder/").concat(n.name,".svg")})),"date"==n.control&&(S.date+=1),"text"==n.control&&(S.text+=1),"tel"==n.control&&(S.tel+=1),"email"==n.control&&(S.email+=1),t}));return l.createElement("div",{id:"lead-modal",className:"lead-modal modal--animate-scale"},l.createElement("div",{className:"lead-modal__wrapper animate__animated "},l.createElement("div",{className:"lead-modal__content"},l.createElement("header",{className:"lead-modal__header"},!!f&&l.createElement("img",{className:"lead-modal__image lead-modal-image-cover",src:f,alt:""})),l.createElement("div",{className:"lead-modal__body"},l.createElement("h2",{className:"lead-modal__title ".concat(z)},k),l.createElement("p",{className:"lead-modal__description ".concat(z)},v),l.createElement("form",{className:"lead-modal__form",onSubmit:function(n){n.preventDefault(),i(n)}},j,l.createElement("div",{className:"lead-modal__checkbox-wrapper ".concat(z)},l.createElement("div",{className:"lead-modal__checkbox"},l.createElement("input",{id:"lead-term-checkbox",className:"lead-modal__checkbox__input ".concat(z),type:"checkbox","aria-label":"Checkbox label",checked:u,onChange:function(n){return h(n.currentTarget.checked)}}),l.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),l.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},E," ",l.createElement("span",{style:{fontWeight:"bold"}},l.createElement("a",{target:"blank",href:y||"https://hellobacsi.com/chinh-sach",style:{textDecoration:"none"},rel:"noopener noreferrer"},N)))),l.createElement("button",{id:"lead-submit",type:"submit",className:"lead-modal__btn ".concat(z),disabled:!u},w)))),l.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(z),onClick:r},l.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},l.createElement("title",null,"Close modal window"),l.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},l.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),l.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))},R=function(n){var e=n.campaign,t=n.action,a=n.onSubmit,o=n.onClose;return e.extra_fields?"2.1"==e.extra_fields.popupVersion?l.createElement(V,{campaign:e,action:t,onSubmit:a,onClose:o}):l.createElement(F,{campaign:e,action:t,onSubmit:a,onClose:o}):null},W={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}."},U={"en-PH":W,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah."},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง"},"tl-PH":W},J=function(n){var e=U[n];return e||U["en-PH"]},Q=v.div(q||(q=t(["\n /* lead-modal : start */\n .lead-modal {\n font-family: 'Open sans', sans-serif !important;\n position: fixed;\n z-index: 99999;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n opacity: 1;\n visibility: visible;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n padding: 10px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n white-space: normal !important;\n }\n\n .lead-modal__wrapper {\n position: relative;\n width: 100%;\n max-width: 450px;\n background-color: #fff;\n border-radius: 6px;\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n }\n\n .lead-modal__content {\n width: inherit;\n overflow: auto;\n /* min-height: 400px; */\n max-height: calc(100vh - 125px);\n -webkit-overflow-scrolling: touch;\n }\n\n .lead-modal__header {\n padding: 0px 0px;\n }\n\n .lead-modal__image {\n display: block;\n margin: 0 auto;\n border: none !important;\n box-shadow: none !important;\n }\n .lead-modal-image-logo {\n margin-top: 15px;\n margin-bottom: 15px;\n }\n\n .lead-modal-image-cover {\n width: 100% !important;\n padding: 0 0px;\n border-top-left-radius: 4px;\n border: none !important;\n box-shadow: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n /* margin-top: 10px; */\n /* border-radius: 4px; */\n }\n\n .lead-modal__body {\n font-family: 'Open sans', sans-serif !important;\n padding: 15px 15px 25px 15px;\n }\n\n .lead-modal__title {\n font-family: 'Open sans', sans-serif !important;\n font-size: 20px !important;\n font-weight: bold !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.3 !important;\n letter-spacing: -0.4px !important;\n color: #2a4975 !important;\n box-shadow: none !important;\n padding-bottom: 0 !important;\n }\n\n .lead-modal__title.pink {\n color: #2661ad !important;\n }\n\n .lead-modal__description {\n font-family: 'Open sans', sans-serif !important;\n font-size: 13px !important;\n font-weight: normal !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.62 !important;\n letter-spacing: 0.14px !important;\n color: #2c87f3 !important;\n margin-top: 10px !important;\n }\n\n .lead-modal__description.pink {\n color: #3e3f58 !important;\n }\n\n .lead-modal__form-control-wrapper {\n margin-top: 10px;\n margin-left: 0px !important;\n position: relative;\n }\n\n .lead-modal__form-control {\n box-shadow: none !important;\n height: 40px !important;\n width: 100%;\n padding-left: calc(15px + 1.5em + 15px) !important;\n background-color: #fff !important;\n padding-top: 10px !important;\n padding-bottom: 10px !important;\n padding-right: 15px !important;\n border: solid 1px #dddddd !important;\n color: #2a4975 !important;\n line-height: 1.7em !important;\n border-radius: 0 !important;\n font-family: 'Open Sans', sans-serif !important;\n background-image: linear-gradient(transparent, transparent) !important;\n margin-left: 0px !important;\n font-size: 14px !important;\n line-height: 14px !important;\n }\n\n .lead-modal__form-control {\n &:focus {\n border-color: var(--color-primary);\n box-shadow: 0px 0px 0px 3px rgba(44, 135, 243, 0.1);\n outline: none;\n }\n\n &::-webkit-input-placeholder {\n /* Chrome, Firefox, Opera, Safari 10.1+ */\n color: #b5b5b5;\n }\n\n &::-moz-placeholder {\n color: #b5b5b5;\n }\n\n &:-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::placeholder {\n color: #b5b5b5;\n }\n }\n\n img.lead-modal__form-control-icon {\n display: inline-block !important;\n color: #b5b5b5 !important;\n fill: #b5b5b5 !important;\n line-height: 1 !important;\n flex-shrink: 0 !important;\n max-width: initial !important;\n display: block !important;\n position: absolute !important;\n pointer-events: none !important;\n left: 15px !important;\n top: 10px !important;\n height: 20px !important;\n width: 20px !important;\n border: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__checkbox-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n align-items: center;\n margin-top: 15px;\n a {\n color: #2c87f3 !important;\n text-decoration: none !important;\n }\n\n a:visited {\n color: #2c87f3 !important;\n }\n &.pink a,\n &.pink a:visited {\n color: #e55c8a !important;\n }\n }\n\n .lead-modal__checkbox {\n position: relative;\n z-index: 1;\n display: inline-block;\n font-size: 20px;\n }\n\n .lead-modal__checkbox__input {\n position: relative;\n margin: 0 !important;\n padding: 0;\n opacity: 0;\n height: 1em !important;\n width: 1em !important;\n display: block;\n z-index: 1;\n font-size: 1em !important;\n }\n\n .lead-modal__checkbox__control {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: -1;\n pointer-events: none;\n transition: transform 0.2s;\n color: #dddddd;\n &::before,\n &::after {\n content: '';\n position: absolute;\n }\n\n &::before {\n width: 120%;\n height: 120%;\n background-color: currentColor;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n opacity: 0;\n border-radius: 50%;\n will-change: transform;\n transition: transform 0.2s;\n }\n\n &::after {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #fff;\n border-radius: 6px;\n -webkit-box-shadow: inset 0 0 0 1px #dddddd;\n box-shadow: inset 0 0 0 1px #dddddd;\n }\n\n &:focus::after {\n box-shadow: inset 0 0 0 1px #2c87f3;\n }\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-color: currentColor;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 18px;\n box-shadow: none;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control {\n color: #2c87f3;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5 8 6.5 12 13.5 3' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:indeterminate ~ .lead-modal__checkbox__control {\n color: var(--custom-checkbox-color-disabled);\n }\n\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cline x1='2' y1='8' x2='14' y2='8' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:active ~ .lead-modal__checkbox__control {\n transform: scale(0.9);\n }\n\n .lead-modal__checkbox__input:checked:active ~ .lead-modal__checkbox__control,\n .lead-modal__checkbox__input:indeterminate:active\n ~ .lead-modal__checkbox__control {\n transform: scale(1);\n }\n\n .lead-modal__checkbox__input:focus ~ .lead-modal__checkbox__control::before {\n opacity: 0.2;\n transform: translate(-50%, -50%) scale(1);\n }\n\n .lead-modal__checkbox__input.pink ~ .lead-modal__checkbox__control::after {\n border-radius: 50% !important;\n }\n\n .lead-modal__checkbox__input.pink:checked ~ .lead-modal__checkbox__control {\n color: #2661ad;\n }\n\n .lead-modal__checkbox__input.pink:checked\n ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input.pink:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-size: 12px;\n }\n\n .lead-modal__checkbox__label {\n /* font-family: OpenSans; */\n font-size: 13px;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: 0.14px;\n color: #969696;\n margin-left: 10px;\n margin-bottom: 0 !important;\n }\n\n .lead-modal__btn {\n display: block;\n width: 100%;\n border: none;\n color: #fff;\n padding: 12px 10px;\n font-weight: 700;\n text-align: center;\n margin-top: 15px;\n border-radius: 4px;\n background-color: #2699fb;\n transition: all 0.2s ease-in-out;\n text-shadow: none !important;\n box-shadow: none !important;\n font-family: 'Open sans', sans-serif !important;\n font-size: 14px;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #e55c8a;\n }\n\n &.pink:hover {\n background-color: #b4466a;\n }\n }\n\n .lead-modal__close-btn {\n position: absolute;\n padding-top: 5px;\n top: -15px;\n right: -10px;\n width: 35px;\n height: 35px;\n box-shadow: -2px 4px 4px 0 rgba(191, 191, 191, 0.44) !important;\n text-shadow: none !important;\n background-color: #005cfd;\n border-radius: 50%;\n line-height: inherit;\n appearance: none;\n border: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease-in-out;\n outline: none;\n z-index: 1;\n padding: 5px 13px !important;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #fff;\n }\n\n &.pink .lead-modal__close-icon {\n color: #000;\n }\n\n &.pink:hover .lead-modal__close-icon {\n color: #e55c8a;\n transition: 0.3s all ease;\n }\n }\n\n .lead-modal__close-icon {\n display: inline-block;\n color: #fff;\n fill: #fff;\n height: 1em;\n width: 1em;\n line-height: 1;\n flex-shrink: 0;\n max-width: initial;\n transition: 0.3s all ease;\n }\n\n .lead-modal__thank-you {\n padding: 0 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n height: inherit;\n text-align: center;\n min-height: 400px;\n h1 {\n margin-top: 10px;\n font-size: 32px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.23px;\n color: #1b3250;\n }\n\n p {\n margin-top: 5px;\n font-size: 16px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.11px;\n color: #1b3250;\n }\n img {\n max-width: 100% !important;\n border: none !important;\n width: auto !important;\n margin: 0 auto !important;\n }\n\n &.hidden {\n display: none;\n }\n }\n\n /* lead-modal : end */\n\n .modal__container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 1000000000000;\n pointer-events: none;\n overflow-y: scroll;\n }\n\n .modal__content {\n position: relative;\n width: 80vw;\n margin: auto 0;\n }\n\n /* Make clicks pass-through */\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: #223bdd;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1;\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n }\n @keyframes nprogress-spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .lead-modal__btn:disabled {\n background: #d5d5d5 !important;\n }\n\n .dateclass {\n width: 100%;\n }\n\n .dateclass.placeholderclass::before {\n width: 100%;\n content: attr(placeholder);\n color: #b8b8b8;\n }\n\n .dateclass.placeholderclass:hover::before {\n width: 0%;\n content: '';\n }\n\n /* Change Autocomplete styles in Chrome*/\n .lead-modal input:-webkit-autofill,\n .lead-modal input:-webkit-autofill:hover,\n .lead-modal input:-webkit-autofill:focus,\n .lead-modal textarea:-webkit-autofill,\n .lead-modal textarea:-webkit-autofill:hover,\n .lead-modal textarea:-webkit-autofill:focus,\n .lead-modal select:-webkit-autofill,\n .lead-modal select:-webkit-autofill:hover,\n .lead-modal select:-webkit-autofill:focus {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n -webkit-text-fill-color: #2a4975;\n }\n\n .lead-modal label.error {\n font-size: 13px;\n color: #fa140f;\n margin-bottom: 0;\n margin-left: 0px !important;\n line-height: 1.65 !important;\n width: 100%;\n display: block;\n }\n\n /* === Lead gen wrapper === */\n .le-text-align-center {\n text-align: center !important;\n }\n .le-text-align-left {\n text-align: left !important;\n }\n .le-text-align-right {\n text-align: right !important;\n }\n\n .le-only-desktop {\n display: none !important;\n }\n .le-only-mobile {\n display: block !important;\n }\n\n .le-only-desktop a {\n text-decoration: none !important;\n }\n\n .le-only-mobile a {\n text-decoration: none !important;\n }\n\n @media screen and (min-width: 992px) {\n .le-newbuilder-LightBoxB,\n .le-newbuilder-InlineB {\n display: flex !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__header,\n .le-newbuilder-InlineB .lead-modal__header {\n max-width: 50%;\n }\n }\n\n @media screen and (min-width: 768px) {\n .le-only-desktop {\n display: block !important;\n }\n\n .le-only-mobile {\n display: none !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__body,\n .le-newbuilder-InlineB .lead-modal__body {\n flex: 1;\n }\n\n .le-newbuilder-wrap-LightBoxB {\n max-width: 720px !important;\n }\n .le-newbuilder-wrap-InlineB {\n max-width: 100% !important;\n }\n .le-newbuilder-LightBoxB .le-only-desktop.lead-modal-image-cover {\n max-width: 400px !important;\n }\n }\n\n .lead-modal__title {\n margin: 7px 0 !important;\n }\n\n .lead-modal__description {\n margin: 0;\n }\n\n .lead-modal-image-cover,\n .lead-modal__wrapper {\n border-radius: 0px !important;\n }\n\n .lead-modal__form {\n margin: 0;\n display: block !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n margin-top: 0px;\n }\n\n .lead-modal__thank-you {\n width: 100%;\n }\n\n /* Skins */\n .le-skin-a-desktop {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n height: 100%;\n display: flex;\n align-items: center;\n }\n\n .le-skin-b-desktop {\n }\n\n .le-join-now {\n }\n\n .le-joinbow-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 16px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n border: 1px solid transparent !important;\n cursor: pointer !important;\n }\n .le-joinbow-btn:hover {\n border: 1px solid white !important;\n }\n\n .le-joinbow-btn-mobile {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n }\n\n .le-newbuilder-close-svg {\n border-radius: 50%;\n width: 35px;\n height: 35px;\n background: #005cfd;\n cursor: pointer !important;\n }\n .le-mobile-btn {\n width: 24px;\n height: 24px;\n }\n\n .le-newbuilder-close-button {\n padding: 0;\n background: transparent;\n box-shadow: none;\n border: none;\n width: auto !important;\n cursor: pointer !important;\n }\n .le-abs-top-right {\n position: absolute;\n right: 10px;\n top: 10px;\n }\n\n .le-abs-outer-top-right {\n position: absolute;\n right: 0px;\n top: -45px;\n }\n\n /* Skin floating */\n .le-floating-desktop {\n position: fixed;\n bottom: 40px;\n left: 25px;\n z-index: 9999;\n }\n\n .le-floating-desktop-wrap {\n background: #fff;\n backdrop-filter: blur(30px);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 0px;\n padding-right: 30px;\n border-radius: 5px;\n display: flex;\n align-items: center;\n }\n\n .le-floating-desktop-title {\n font-size: 20px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n max-width: 530px;\n }\n .le-floating-desktop-desc {\n font-size: 13px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n max-width: 530px;\n }\n\n .le-joinbow-floating-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 40px;\n border: none !important;\n border: 1px solid transparent !important;\n font-weight: 500;\n cursor: pointer !important;\n }\n\n /* // Floating mobile */\n .le-floating-mobile {\n position: fixed;\n bottom: 0px;\n left: 0px;\n width: 100%;\n z-index: 9999;\n }\n .le-abs-outer-mobile-top-right {\n position: absolute;\n right: 2px;\n top: -30px;\n }\n\n .le-floating-mobile-wrap {\n background: #fff;\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 10px 15px;\n }\n .le-floating-mobile-title {\n font-size: 18px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n font-weight: 600;\n }\n .le-floating-mobile-desc {\n font-size: 12px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n }\n\n /* // Tab popup */\n .le-tab-popup {\n position: fixed;\n bottom: 15px;\n left: 15px;\n max-width: 150px;\n }\n .le-abs-outer-mobile-top-right-2 {\n position: absolute;\n right: -12px;\n top: -15px;\n }\n\n .le-center-tab-popup {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999999 !important;\n width: calc(100% - 40px);\n max-width: 400px;\n }\n\n .le-center-tab-popup img {\n max-width: 100% !important;\n }\n\n /* // Popup */\n .le-checkbox-title {\n font-size: 15px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n color: #2a4975;\n margin: 13px 0 !important;\n /* line-height: 1.65 !important; */\n }\n\n /* Checkbox */\n .lead-checkbox-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-checkbox-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 4px;\n flex: 0 0 24px;\n }\n\n .lead-checkbox-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-checkbox-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark::after {\n left: 8px;\n top: 3px;\n width: 7px;\n height: 12px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n /* End checkbox */\n\n .le-fullscreen-img {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n @media screen and (min-width: 768px) {\n .lead-fullscreen-desktop-close-btn {\n position: fixed;\n top: 27px;\n right: 23px;\n }\n }\n\n /* // Inline */\n .lead-modal.le-buider-inline {\n position: static;\n display: block;\n padding: 20px 0;\n height: initial !important;\n padding-top: 10px;\n }\n\n .lead-modal.le-buider-inline .lead-modal__wrapper {\n box-shadow: none;\n border: 1px solid #ddd;\n }\n .lead-modal.le-buider-inline .lead-modal__content {\n max-height: initial !important;\n }\n .lead-modal.le-buider-inline .lead-modal__content .lead-modal__header img {\n /* height: auto !important; */\n object-fit: fill;\n }\n\n .le-thankyou-title {\n font-size: 24px !important;\n margin-bottom: 8px !important;\n color: #2a4975 !important;\n }\n\n .le-thankyou-subtitle {\n font-size: 14px !important;\n color: #2699fb !important;\n margin: 0 !important;\n }\n\n /* Radio */\n .lead-radio-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-radio-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 50%;\n flex: 0 0 24px;\n }\n\n .lead-radio-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-radio-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark::after {\n left: 50%;\n top: 50%;\n width: 8px;\n height: 8px;\n background: #fff;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n /* End Radio */\n\n /* Dropdown */\n .le-newbuilder-select {\n width: 100%;\n padding: 12px;\n border-radius: 4px;\n border: solid 1px #d0d0d0;\n outline: none;\n appearance: none;\n font-size: 15px;\n padding-right: 35px;\n }\n .le-newbuilder-select-wrapper {\n position: relative;\n }\n .le-newbuilder-select-wrapper::after {\n content: '';\n position: absolute;\n right: 15px;\n top: 18px;\n transform: rotate(45deg);\n width: 10px;\n height: 10px;\n border: 2px solid #616060;\n border-left: transparent;\n border-top: transparent;\n }\n /* End Dropdown */\n\n .le-buider-slider {\n width: 420px;\n height: auto;\n bottom: 15px;\n top: unset;\n left: -200px;\n animation: le-builder-slide 0.5s forwards;\n }\n\n @keyframes le-builder-slide {\n 100% {\n left: 15px;\n }\n }\n\n @media screen and (max-width: 768px) {\n .le-buider-slider,\n .le-buider-fullscreen {\n display: none !important;\n }\n }\n\n .le-skin-mobile {\n margin-top: 64px;\n }\n"],["\n /* lead-modal : start */\n .lead-modal {\n font-family: 'Open sans', sans-serif !important;\n position: fixed;\n z-index: 99999;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n opacity: 1;\n visibility: visible;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n padding: 10px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n white-space: normal !important;\n }\n\n .lead-modal__wrapper {\n position: relative;\n width: 100%;\n max-width: 450px;\n background-color: #fff;\n border-radius: 6px;\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n }\n\n .lead-modal__content {\n width: inherit;\n overflow: auto;\n /* min-height: 400px; */\n max-height: calc(100vh - 125px);\n -webkit-overflow-scrolling: touch;\n }\n\n .lead-modal__header {\n padding: 0px 0px;\n }\n\n .lead-modal__image {\n display: block;\n margin: 0 auto;\n border: none !important;\n box-shadow: none !important;\n }\n .lead-modal-image-logo {\n margin-top: 15px;\n margin-bottom: 15px;\n }\n\n .lead-modal-image-cover {\n width: 100% !important;\n padding: 0 0px;\n border-top-left-radius: 4px;\n border: none !important;\n box-shadow: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n /* margin-top: 10px; */\n /* border-radius: 4px; */\n }\n\n .lead-modal__body {\n font-family: 'Open sans', sans-serif !important;\n padding: 15px 15px 25px 15px;\n }\n\n .lead-modal__title {\n font-family: 'Open sans', sans-serif !important;\n font-size: 20px !important;\n font-weight: bold !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.3 !important;\n letter-spacing: -0.4px !important;\n color: #2a4975 !important;\n box-shadow: none !important;\n padding-bottom: 0 !important;\n }\n\n .lead-modal__title.pink {\n color: #2661ad !important;\n }\n\n .lead-modal__description {\n font-family: 'Open sans', sans-serif !important;\n font-size: 13px !important;\n font-weight: normal !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.62 !important;\n letter-spacing: 0.14px !important;\n color: #2c87f3 !important;\n margin-top: 10px !important;\n }\n\n .lead-modal__description.pink {\n color: #3e3f58 !important;\n }\n\n .lead-modal__form-control-wrapper {\n margin-top: 10px;\n margin-left: 0px !important;\n position: relative;\n }\n\n .lead-modal__form-control {\n box-shadow: none !important;\n height: 40px !important;\n width: 100%;\n padding-left: calc(15px + 1.5em + 15px) !important;\n background-color: #fff !important;\n padding-top: 10px !important;\n padding-bottom: 10px !important;\n padding-right: 15px !important;\n border: solid 1px #dddddd !important;\n color: #2a4975 !important;\n line-height: 1.7em !important;\n border-radius: 0 !important;\n font-family: 'Open Sans', sans-serif !important;\n background-image: linear-gradient(transparent, transparent) !important;\n margin-left: 0px !important;\n font-size: 14px !important;\n line-height: 14px !important;\n }\n\n .lead-modal__form-control {\n &:focus {\n border-color: var(--color-primary);\n box-shadow: 0px 0px 0px 3px rgba(44, 135, 243, 0.1);\n outline: none;\n }\n\n &::-webkit-input-placeholder {\n /* Chrome, Firefox, Opera, Safari 10.1+ */\n color: #b5b5b5;\n }\n\n &::-moz-placeholder {\n color: #b5b5b5;\n }\n\n &:-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::placeholder {\n color: #b5b5b5;\n }\n }\n\n img.lead-modal__form-control-icon {\n display: inline-block !important;\n color: #b5b5b5 !important;\n fill: #b5b5b5 !important;\n line-height: 1 !important;\n flex-shrink: 0 !important;\n max-width: initial !important;\n display: block !important;\n position: absolute !important;\n pointer-events: none !important;\n left: 15px !important;\n top: 10px !important;\n height: 20px !important;\n width: 20px !important;\n border: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__checkbox-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n align-items: center;\n margin-top: 15px;\n a {\n color: #2c87f3 !important;\n text-decoration: none !important;\n }\n\n a:visited {\n color: #2c87f3 !important;\n }\n &.pink a,\n &.pink a:visited {\n color: #e55c8a !important;\n }\n }\n\n .lead-modal__checkbox {\n position: relative;\n z-index: 1;\n display: inline-block;\n font-size: 20px;\n }\n\n .lead-modal__checkbox__input {\n position: relative;\n margin: 0 !important;\n padding: 0;\n opacity: 0;\n height: 1em !important;\n width: 1em !important;\n display: block;\n z-index: 1;\n font-size: 1em !important;\n }\n\n .lead-modal__checkbox__control {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: -1;\n pointer-events: none;\n transition: transform 0.2s;\n color: #dddddd;\n &::before,\n &::after {\n content: '';\n position: absolute;\n }\n\n &::before {\n width: 120%;\n height: 120%;\n background-color: currentColor;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n opacity: 0;\n border-radius: 50%;\n will-change: transform;\n transition: transform 0.2s;\n }\n\n &::after {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #fff;\n border-radius: 6px;\n -webkit-box-shadow: inset 0 0 0 1px #dddddd;\n box-shadow: inset 0 0 0 1px #dddddd;\n }\n\n &:focus::after {\n box-shadow: inset 0 0 0 1px #2c87f3;\n }\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-color: currentColor;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 18px;\n box-shadow: none;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control {\n color: #2c87f3;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5 8 6.5 12 13.5 3' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:indeterminate ~ .lead-modal__checkbox__control {\n color: var(--custom-checkbox-color-disabled);\n }\n\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cline x1='2' y1='8' x2='14' y2='8' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:active ~ .lead-modal__checkbox__control {\n transform: scale(0.9);\n }\n\n .lead-modal__checkbox__input:checked:active ~ .lead-modal__checkbox__control,\n .lead-modal__checkbox__input:indeterminate:active\n ~ .lead-modal__checkbox__control {\n transform: scale(1);\n }\n\n .lead-modal__checkbox__input:focus ~ .lead-modal__checkbox__control::before {\n opacity: 0.2;\n transform: translate(-50%, -50%) scale(1);\n }\n\n .lead-modal__checkbox__input.pink ~ .lead-modal__checkbox__control::after {\n border-radius: 50% !important;\n }\n\n .lead-modal__checkbox__input.pink:checked ~ .lead-modal__checkbox__control {\n color: #2661ad;\n }\n\n .lead-modal__checkbox__input.pink:checked\n ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input.pink:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-size: 12px;\n }\n\n .lead-modal__checkbox__label {\n /* font-family: OpenSans; */\n font-size: 13px;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: 0.14px;\n color: #969696;\n margin-left: 10px;\n margin-bottom: 0 !important;\n }\n\n .lead-modal__btn {\n display: block;\n width: 100%;\n border: none;\n color: #fff;\n padding: 12px 10px;\n font-weight: 700;\n text-align: center;\n margin-top: 15px;\n border-radius: 4px;\n background-color: #2699fb;\n transition: all 0.2s ease-in-out;\n text-shadow: none !important;\n box-shadow: none !important;\n font-family: 'Open sans', sans-serif !important;\n font-size: 14px;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #e55c8a;\n }\n\n &.pink:hover {\n background-color: #b4466a;\n }\n }\n\n .lead-modal__close-btn {\n position: absolute;\n padding-top: 5px;\n top: -15px;\n right: -10px;\n width: 35px;\n height: 35px;\n box-shadow: -2px 4px 4px 0 rgba(191, 191, 191, 0.44) !important;\n text-shadow: none !important;\n background-color: #005cfd;\n border-radius: 50%;\n line-height: inherit;\n appearance: none;\n border: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease-in-out;\n outline: none;\n z-index: 1;\n padding: 5px 13px !important;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #fff;\n }\n\n &.pink .lead-modal__close-icon {\n color: #000;\n }\n\n &.pink:hover .lead-modal__close-icon {\n color: #e55c8a;\n transition: 0.3s all ease;\n }\n }\n\n .lead-modal__close-icon {\n display: inline-block;\n color: #fff;\n fill: #fff;\n height: 1em;\n width: 1em;\n line-height: 1;\n flex-shrink: 0;\n max-width: initial;\n transition: 0.3s all ease;\n }\n\n .lead-modal__thank-you {\n padding: 0 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n height: inherit;\n text-align: center;\n min-height: 400px;\n h1 {\n margin-top: 10px;\n font-size: 32px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.23px;\n color: #1b3250;\n }\n\n p {\n margin-top: 5px;\n font-size: 16px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.11px;\n color: #1b3250;\n }\n img {\n max-width: 100% !important;\n border: none !important;\n width: auto !important;\n margin: 0 auto !important;\n }\n\n &.hidden {\n display: none;\n }\n }\n\n /* lead-modal : end */\n\n .modal__container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 1000000000000;\n pointer-events: none;\n overflow-y: scroll;\n }\n\n .modal__content {\n position: relative;\n width: 80vw;\n margin: auto 0;\n }\n\n /* Make clicks pass-through */\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: #223bdd;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1;\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n }\n @keyframes nprogress-spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .lead-modal__btn:disabled {\n background: #d5d5d5 !important;\n }\n\n .dateclass {\n width: 100%;\n }\n\n .dateclass.placeholderclass::before {\n width: 100%;\n content: attr(placeholder);\n color: #b8b8b8;\n }\n\n .dateclass.placeholderclass:hover::before {\n width: 0%;\n content: '';\n }\n\n /* Change Autocomplete styles in Chrome*/\n .lead-modal input:-webkit-autofill,\n .lead-modal input:-webkit-autofill:hover,\n .lead-modal input:-webkit-autofill:focus,\n .lead-modal textarea:-webkit-autofill,\n .lead-modal textarea:-webkit-autofill:hover,\n .lead-modal textarea:-webkit-autofill:focus,\n .lead-modal select:-webkit-autofill,\n .lead-modal select:-webkit-autofill:hover,\n .lead-modal select:-webkit-autofill:focus {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n -webkit-text-fill-color: #2a4975;\n }\n\n .lead-modal label.error {\n font-size: 13px;\n color: #fa140f;\n margin-bottom: 0;\n margin-left: 0px !important;\n line-height: 1.65 !important;\n width: 100%;\n display: block;\n }\n\n /* === Lead gen wrapper === */\n .le-text-align-center {\n text-align: center !important;\n }\n .le-text-align-left {\n text-align: left !important;\n }\n .le-text-align-right {\n text-align: right !important;\n }\n\n .le-only-desktop {\n display: none !important;\n }\n .le-only-mobile {\n display: block !important;\n }\n\n .le-only-desktop a {\n text-decoration: none !important;\n }\n\n .le-only-mobile a {\n text-decoration: none !important;\n }\n\n @media screen and (min-width: 992px) {\n .le-newbuilder-LightBoxB,\n .le-newbuilder-InlineB {\n display: flex !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__header,\n .le-newbuilder-InlineB .lead-modal__header {\n max-width: 50%;\n }\n }\n\n @media screen and (min-width: 768px) {\n .le-only-desktop {\n display: block !important;\n }\n\n .le-only-mobile {\n display: none !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__body,\n .le-newbuilder-InlineB .lead-modal__body {\n flex: 1;\n }\n\n .le-newbuilder-wrap-LightBoxB {\n max-width: 720px !important;\n }\n .le-newbuilder-wrap-InlineB {\n max-width: 100% !important;\n }\n .le-newbuilder-LightBoxB .le-only-desktop.lead-modal-image-cover {\n max-width: 400px !important;\n }\n }\n\n .lead-modal__title {\n margin: 7px 0 !important;\n }\n\n .lead-modal__description {\n margin: 0;\n }\n\n .lead-modal-image-cover,\n .lead-modal__wrapper {\n border-radius: 0px !important;\n }\n\n .lead-modal__form {\n margin: 0;\n display: block !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n margin-top: 0px;\n }\n\n .lead-modal__thank-you {\n width: 100%;\n }\n\n /* Skins */\n .le-skin-a-desktop {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n height: 100%;\n display: flex;\n align-items: center;\n }\n\n .le-skin-b-desktop {\n }\n\n .le-join-now {\n }\n\n .le-joinbow-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 16px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n border: 1px solid transparent !important;\n cursor: pointer !important;\n }\n .le-joinbow-btn:hover {\n border: 1px solid white !important;\n }\n\n .le-joinbow-btn-mobile {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n }\n\n .le-newbuilder-close-svg {\n border-radius: 50%;\n width: 35px;\n height: 35px;\n background: #005cfd;\n cursor: pointer !important;\n }\n .le-mobile-btn {\n width: 24px;\n height: 24px;\n }\n\n .le-newbuilder-close-button {\n padding: 0;\n background: transparent;\n box-shadow: none;\n border: none;\n width: auto !important;\n cursor: pointer !important;\n }\n .le-abs-top-right {\n position: absolute;\n right: 10px;\n top: 10px;\n }\n\n .le-abs-outer-top-right {\n position: absolute;\n right: 0px;\n top: -45px;\n }\n\n /* Skin floating */\n .le-floating-desktop {\n position: fixed;\n bottom: 40px;\n left: 25px;\n z-index: 9999;\n }\n\n .le-floating-desktop-wrap {\n background: #fff;\n backdrop-filter: blur(30px);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 0px;\n padding-right: 30px;\n border-radius: 5px;\n display: flex;\n align-items: center;\n }\n\n .le-floating-desktop-title {\n font-size: 20px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n max-width: 530px;\n }\n .le-floating-desktop-desc {\n font-size: 13px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n max-width: 530px;\n }\n\n .le-joinbow-floating-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 40px;\n border: none !important;\n border: 1px solid transparent !important;\n font-weight: 500;\n cursor: pointer !important;\n }\n\n /* // Floating mobile */\n .le-floating-mobile {\n position: fixed;\n bottom: 0px;\n left: 0px;\n width: 100%;\n z-index: 9999;\n }\n .le-abs-outer-mobile-top-right {\n position: absolute;\n right: 2px;\n top: -30px;\n }\n\n .le-floating-mobile-wrap {\n background: #fff;\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 10px 15px;\n }\n .le-floating-mobile-title {\n font-size: 18px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n font-weight: 600;\n }\n .le-floating-mobile-desc {\n font-size: 12px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n }\n\n /* // Tab popup */\n .le-tab-popup {\n position: fixed;\n bottom: 15px;\n left: 15px;\n max-width: 150px;\n }\n .le-abs-outer-mobile-top-right-2 {\n position: absolute;\n right: -12px;\n top: -15px;\n }\n\n .le-center-tab-popup {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999999 !important;\n width: calc(100% - 40px);\n max-width: 400px;\n }\n\n .le-center-tab-popup img {\n max-width: 100% !important;\n }\n\n /* // Popup */\n .le-checkbox-title {\n font-size: 15px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n color: #2a4975;\n margin: 13px 0 !important;\n /* line-height: 1.65 !important; */\n }\n\n /* Checkbox */\n .lead-checkbox-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-checkbox-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 4px;\n flex: 0 0 24px;\n }\n\n .lead-checkbox-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-checkbox-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark::after {\n left: 8px;\n top: 3px;\n width: 7px;\n height: 12px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n /* End checkbox */\n\n .le-fullscreen-img {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n @media screen and (min-width: 768px) {\n .lead-fullscreen-desktop-close-btn {\n position: fixed;\n top: 27px;\n right: 23px;\n }\n }\n\n /* // Inline */\n .lead-modal.le-buider-inline {\n position: static;\n display: block;\n padding: 20px 0;\n height: initial !important;\n padding-top: 10px;\n }\n\n .lead-modal.le-buider-inline .lead-modal__wrapper {\n box-shadow: none;\n border: 1px solid #ddd;\n }\n .lead-modal.le-buider-inline .lead-modal__content {\n max-height: initial !important;\n }\n .lead-modal.le-buider-inline .lead-modal__content .lead-modal__header img {\n /* height: auto !important; */\n object-fit: fill;\n }\n\n .le-thankyou-title {\n font-size: 24px !important;\n margin-bottom: 8px !important;\n color: #2a4975 !important;\n }\n\n .le-thankyou-subtitle {\n font-size: 14px !important;\n color: #2699fb !important;\n margin: 0 !important;\n }\n\n /* Radio */\n .lead-radio-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-radio-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 50%;\n flex: 0 0 24px;\n }\n\n .lead-radio-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-radio-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark::after {\n left: 50%;\n top: 50%;\n width: 8px;\n height: 8px;\n background: #fff;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n /* End Radio */\n\n /* Dropdown */\n .le-newbuilder-select {\n width: 100%;\n padding: 12px;\n border-radius: 4px;\n border: solid 1px #d0d0d0;\n outline: none;\n appearance: none;\n font-size: 15px;\n padding-right: 35px;\n }\n .le-newbuilder-select-wrapper {\n position: relative;\n }\n .le-newbuilder-select-wrapper::after {\n content: '';\n position: absolute;\n right: 15px;\n top: 18px;\n transform: rotate(45deg);\n width: 10px;\n height: 10px;\n border: 2px solid #616060;\n border-left: transparent;\n border-top: transparent;\n }\n /* End Dropdown */\n\n .le-buider-slider {\n width: 420px;\n height: auto;\n bottom: 15px;\n top: unset;\n left: -200px;\n animation: le-builder-slide 0.5s forwards;\n }\n\n @keyframes le-builder-slide {\n 100% {\n left: 15px;\n }\n }\n\n @media screen and (max-width: 768px) {\n .le-buider-slider,\n .le-buider-fullscreen {\n display: none !important;\n }\n }\n\n .le-skin-mobile {\n margin-top: 64px;\n }\n"]))),G=function(n){var e=n.title,t=n.titleAlign,a=n.subtitle,o=n.subtitleAlign,i=n.link,r=n.linkNewTab,d=n.linkText,c=n.image,s=n.onClose;return l.createElement("div",{id:"lead-modal",className:"lead-modal modal--animate-scale"},l.createElement("div",{className:"lead-modal__wrapper animate__animated "},l.createElement("div",{className:"lead-modal__content"},l.createElement("div",{className:"lead-modal__thank-you"},l.createElement("div",{style:{width:"100%"}},l.createElement("img",{src:c,style:{maxHeight:162,objectFit:"cover"}}),e&&l.createElement("h1",{className:"le-thankyou-title le-text-align-".concat(t)}," ",e," "),a&&l.createElement("p",{className:"le-thankyou-subtitle le-text-align-".concat(o)}," ",a," "),d&&l.createElement("div",null,l.createElement("a",{href:i,target:r?"_blank":"parrent",rel:"noreferrer"},l.createElement("button",{className:"lead-modal__btn ".concat(z)},i)))))),l.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(z),onClick:s},l.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},l.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},l.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),l.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))};function K(n){var e=n.leadApi,t=n.leadSiteId,l=n.leadDomain,i=n.onShowPopup,r=("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:r,ga_client_id:g("_ga")||null})}).then((function(n){return n.json()})).then((function(n){var e,t,d;if(console.log("List campagin: ",n),j="https://"+location.hostname+location.pathname+location.search,1==n._status){var c=n._data.campaigns;g("hhg-id")||(b("hhg-id",k(),{domain:"."+l,path:"/"}),console.log("😍 Set HHG ID cookie"));var s=[];s=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?c.filter((function(n){return n.device_types.some((function(n){return n.id==S}))})):c.filter((function(n){return n.device_types.some((function(n){return n.id==T}))})),console.log("👓 campaignsDevice",s);var m=s.map((function(n,e){return n.targets.filter((function(n){return n.type==N})).map((function(n){return a(a({},n),{campaignIndex:e})}))})).flat(1);m=m.filter((function(n){var e=new URL(String(n.target).toLowerCase());return"exact_match"==n.option?Boolean(r===e.href):"start_with"==n.option?!!r.includes(String(n.target))&&!n.sub_target.filter((function(n){return"excluding"==n.option})).map((function(n){return n.value})).includes(r):void 0}));var p=Array.from(document.getElementsByTagName("META")).filter((function(n){return"article:tag"==n.getAttribute("property")})).map((function(n){return n.content})),u=[];p&&p.length&&(u=s.map((function(n,e){return n.targets.filter((function(n){return n.type==C})).map((function(n){return a(a({},n),{campaignIndex:e})}))})).flat(1).filter((function(n){return p.includes(n.target)})));var h=o(o([],m,!0),u,!0),f=document.cookie.split("; ").map((function(n){return n.split("=")[0]})),x=f.filter((function(n){return n.includes("lead_submited")}));console.log("--listCampaignCodeSubmited",x);var _=f.filter((function(n){return n.includes("lead_closed")}));console.log("--listCampaignCodeClosed",_);var v,w=o(o([],x,!0),_,!0);if(v=h.filter((function(n){return!w.some((function(e){return e.includes(s[n.campaignIndex].code)}))})).sort((function(n,e){return n.score-e.score})),console.log("--listCampaignValid : ",v),v&&v.length){var y=s[v[0].campaignIndex];console.log("CAMPAIGN_SHOW",y);var E=y.rules,B=Number(null===(e=E.find((function(n){return"time"==n.rule})))||void 0===e?void 0:e.value);console.log("timeoutRule",B);var z=Number(null===(t=E.find((function(n){return"scroll"==n.rule})))||void 0===t?void 0:t.value);console.log("scrollRule",z);var L=Number(null===(d=E.find((function(n){return"exclude_sponsored"==n.rule})))||void 0===d?void 0:d.value);console.log("excludeSponsored",L);var O=Boolean(document.querySelector(".hhg-disclaimer-text"));if(console.log("💎 LEAD current page isSponsored",O),O&&L)return;var P="TIME";if(Number.isInteger(B)&&(P="TIME",console.log("✨ SHOW AWESOME POPUP AFTER: ",B," seconds"),setTimeout((function(){null==i||i(y,P)}),1e3*B)),Number.isInteger(z)){P="SCROLL",console.log("✨ SHOW AWESOME AFTER: SCROLL",z," %");var I=document.querySelector('[data-url="'.concat(location.pathname,'"]'))||document.querySelector("body"),A=I.getBoundingClientRect().top,D=I.offsetHeight;console.log("👓 Element check scroll: ",I);var M=function(){var n=window.pageYOffset||document.documentElement.scrollTop,e=0;n>=A&&(e=Math.round((n-A)/(D-innerHeight)*100)),console.log("---Scroll",e,z),e>=z&&(window.removeEventListener("scroll",M),null==i||i(y,P))};window.addEventListener("scroll",M)}}else console.log("🚧 No lead campaigns on current URL, tags")}})).catch((function(n){console.error("Lead error: ",n)}))}var Y=function(t){var a=t.apiUrl,o=t.siteDomain,i=t.siteId,d=t.locale,f=m(),k=m(Date.now()),_=r((function(){var n=a;return n.includes("localhost")&&(n="https://dev.leadgen.hellobacsi.com/"),{apiUrl:n}}),[a,o,i]).apiUrl,v=c(null),w=v[0],y=v[1],E=c(""),N=E[0],C=E[1],B=c(null),S=B[0],T=B[1],z=function(n,e){y(n),C(e)},j=function(){var n,e;if(w){console.log("👋👋👋 CLOSE POPUP ".concat(w.code," 👋👋👋"));var t=Number(null===(n=w.rules.find((function(n){return"show_again_after_exit "==n.rule})))||void 0===n?void 0:n.value),a=Number(null===(e=w.rules.find((function(n){return"days_to_show_again"==n.rule})))||void 0===e?void 0:e.value);0==t&&b("lead_closed_".concat(w.code),"target_".concat(w.extra_fields.popupVersion),a?{domain:"."+o,days:a,path:"/"}:{domain:"."+o,path:"/"}),document.body.classList.remove("noscroll"),fetch("".concat(_,"api/campaign/").concat(w.code,"/popup_exit"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:g("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),y(null)}};s((function(){if(window.next){var n=p((function(n){console.log("--🌻 routeChangeComplete",n,Date.now());var e=location.pathname;j(),document.querySelectorAll('[data-popup-url="'.concat(e,'"]')).length||K({leadApi:_,leadDomain:o,leadSiteId:i,onShowPopup:z}),f.current&&window.removeEventListener("scroll",f.current)}),500);window.next.router.events.on("routeChangeComplete",n)}K({leadApi:_,leadDomain:o,leadSiteId:i,onShowPopup:z})}),[]);return s((function(){w&&(k.current=Date.now())}),[w]),l.createElement(P.Provider,{value:{apiUrl:_,siteDomain:o,siteId:i,locale:d}},l.createElement(h.Provider,{value:{locale:d,values:J(d)}},u(l.createElement(Q,null,w&&!S&&l.createElement(R,{campaign:w,onClose:j,onSubmit:function(t,a,l,i){return n(void 0,void 0,void 0,(function(){var n,r,d,c,s,m,p,u,h,f,x,k,v,y,E,N,C,B,S,z,L,P,I,A,D,M,H,q,V,F,R,W,U,J,Q;return e(this,(function(e){switch(e.label){case 0:return t.preventDefault(),console.log("submitHandler",a,l),n=new FormData(t.currentTarget),r={},n.forEach((function(n,e){r[e]=r[e]||[],r[e].push(n)})),d=Object.keys(r).map((function(n){return{name:n,value:r[n]}})),c=2,s=g("_ga")||null,[4,require("intl-tel-input")];case 1:return m=e.sent(),p={url:location.href.toLowerCase(),title_article:document.title,meta:d.map((function(n){var e,t,a;return{key:null===(e=document.querySelector(".lead-modal__form.".concat(i,' [name="').concat(n.name,'"]')))||void 0===e?void 0:e.getAttribute("data-key"),value:(null==O?void 0:O.countryCodeNumber)&&["tel","tel1","tel2","tel3"].includes(n.name)?m.formatNumber(String(n.value),null==O?void 0:O.countryCodeNumber,c).replace(/\s+/g,""):n.value,control:n.name.replace("1","").replace("2","").replace("3",""),is_sent_mailchimp:(null===(a=document.querySelector(".lead-modal__form.".concat(i," .mailchimp-").concat(null===(t=document.querySelector(".lead-modal__form.".concat(i,' [name="').concat(n.name,'"]')))||void 0===t?void 0:t.getAttribute("data-key"))))||void 0===a?void 0:a.getAttribute("data-mailchimp"))||"false"}})),cookie_id:g("hhg-id"),ga_client_id:s},a&&l[a].value_en&&(p.category=l[a].value_en),u=Number((null===(M=null===(D=w.rules)||void 0===D?void 0:D.find((function(n){return"days_to_show_again"===n.rule})))||void 0===M?void 0:M.value)||7),0==(h=Number((null===(q=null===(H=w.rules)||void 0===H?void 0:H.find((function(n){return"show_again_after_submit"===n.rule})))||void 0===q?void 0:q.value)||0))&&(console.log("⛔ Popup never show again!"),b("lead_submited_".concat(w.code),"target_".concat(w.extra_fields.targetType),{domain:"."+o,path:"/"})),1==h&&(console.log("⌛ Popup will show again after ".concat(u," days!")),b("lead_submited_".concat(w.code),"target_".concat(w.extra_fields.targetType),{domain:"."+o,days:u,path:"/"})),fetch("".concat(_,"api/campaign/").concat(w.code,"/lead"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}),"notshow"==w.extra_fields.popupShowThankYou?(j(),document.body.classList.remove("noscroll"),[2]):(f=!0,x=w.thank_you_image||"".concat(_,"admin/img/thanksyou.png"),k=w.extra_fields.popupThankyouTitle||"Thank you.",v=w.extra_fields.popupThankyouDesc||"We appreciate your time!",y="",E="",B="","2.1"==w.extra_fields.popupVersion&&(S=w.extra_fields,z=JSON.parse(S.listBlockThankyou),L=z.find((function(n){return"TitleBlock"==n.name})),P=z.find((function(n){return"SubtitleBlock"==n.name})),I=z.find((function(n){return"LinkButtonBlock"==n.name})),k=(null===(V=null==L?void 0:L.data)||void 0===V?void 0:V.value)||"",y=(null===(F=null==L?void 0:L.data)||void 0===F?void 0:F.align)||"",v=(null===(R=null==P?void 0:P.data)||void 0===R?void 0:R.value)||"",E=(null===(W=null==P?void 0:P.data)||void 0===W?void 0:W.align)||"",N=(null===(U=null==I?void 0:I.data)||void 0===U?void 0:U.value)||"",C=(null===(J=null==I?void 0:I.data)||void 0===J?void 0:J.newtab)||!1,B=(null===(Q=null==I?void 0:I.data)||void 0===Q?void 0:Q.url)||"",A=w.extra_fields.currentLayout,["SkinA","SkinB","Floating","Tab","CenterTab"].includes(A)&&(f=!1)),T(f?{title:k,titleAlign:y,subtitle:v,subtitleAlign:E,link:B,linkNewTab:C,linkText:N,image:x}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},d.map((function(n){var e=n.name,t=n.value;"tel"==e?window.insider_object.user.phone_number=t:"email"==e&&(window.insider_object.user.email=t)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object)),[2])}}))}))},action:N}),S&&l.createElement(G,{title:S.title,titleAlign:S.titleAlign,subtitle:S.subtitle,subtitleAlign:S.subtitleAlign,link:S.link,linkNewTab:S.linkNewTab,linkText:S.linkText,image:S.image,onClose:j})),x())))};export{Y as LeadGen};
1
+ import{a as e,d as n,e as t,_ as a}from"./tslib.es6-2fa94e2c.js";import o,{createContext as l,useMemo as i,useContext as r,useState as c,useEffect as d,useRef as s}from"react";import m from"lodash/debounce";import{createPortal as p}from"react-dom";import{T as u}from"./translationsContext-e7808c8f.js";import{g as h,s as g}from"./cookieHelper-8c12973e.js";import{b,a as f}from"./utils-40d4438f.js";import{v1 as v}from"uuid";import{u as k}from"./useTranslations-b3eb31ef.js";import"dayjs";import"./screenSizeContext-ff96a3d1.js";import"./lazyLoad-59e8ff6d.js";import"styled-components";import"./index-2cf746a8.js";import"./isProduction-6fc0946c.js";import"./Locale-69030fff.js";import"./gAssets.js";import"string-format";import"lodash/throttle";import"vanilla-lazyload";var x=function(e){var n=e.onClose,t=e.containerClassName,a=e.svgClassName;return o.createElement("button",{onClick:n,className:"le-newbuilder-close-button js-modal__close ".concat(t||"")},o.createElement("svg",{className:"le-newbuilder-close-svg ".concat(a||""),xmlns:"http://www.w3.org/2000/svg",width:"53",height:"53",viewBox:"0 0 53 53"},o.createElement("defs",null,o.createElement("filter",{width:"53",height:"53",filterUnits:"userSpaceOnUse"},o.createElement("feGaussianBlur",{result:"blur",stdDeviation:"3"}),o.createElement("feFlood",{floodOpacity:".4"}),o.createElement("feComposite",{in2:"blur",operator:"in"}),o.createElement("feComposite",{in:"SourceGraphic"})),o.createElement("style",{dangerouslySetInnerHTML:{__html:".cls-2{fill:none;stroke:#fff;stroke-linecap:round;stroke-width:2px}"}})),o.createElement("g",{filter:"url(#Ellipse_482)"},o.createElement("circle",{cx:"17.5",cy:"17.5",r:"17.5",transform:"translate(-483.1 -671.163)translate(483.1 671.16)translate(9 9)",fill:"#005cfd"})),o.createElement("path",{d:"M19 19L34 34",className:"cls-2"}),o.createElement("path",{d:"M34 19L19 34",className:"cls-2"})))},_=function(e){var n=e.popupId,t=e.url,a=e.newTab,l=e.imageDestkop,i=e.imageMobile,r=e.onClose,c=e.onOtherSubmit;return o.createElement("div",{id:n,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},o.createElement("div",{className:"le-center-tab-popup"},o.createElement("div",{style:{position:"relative"}},o.createElement("a",{className:"js-popup-other-submit",href:t,target:a?"blank":"_parent",onClick:c},o.createElement("img",{className:"le-only-mobile",src:i}),o.createElement("img",{className:"le-only-desktop",src:l})),o.createElement(x,{onClose:r,containerClassName:"le-abs-outer-mobile-top-right-2",svgClassName:"le-mobile-btn"}))))},y=function(e){var n=e.popupId,t=e.url,a=e.title,l=e.urlText,i=e.titleAlign,r=e.subtitle,c=e.subtitleAlign,d=e.newTab,s=e.imageDesktop,m=e.imageMobile,p=e.onClose,u=e.onOtherSubmit;return o.createElement("div",{id:n,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},o.createElement("aside",{className:"le-only-desktop"},o.createElement("div",{className:"le-floating-desktop"},o.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},s?o.createElement("div",null,o.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:s})):null,o.createElement("div",{style:{padding:20}},o.createElement("div",{className:"le-floating-desktop-title le-text-align-".concat(i)},a),o.createElement("div",{className:"le-floating-desktop-desc le-text-align-".concat(c)},r)),o.createElement("a",{target:d?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},o.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},l)),o.createElement(x,{onClose:p,containerClassName:"le-abs-outer-top-right"})))),o.createElement("aside",{className:"le-only-mobile"},o.createElement("div",{className:"le-floating-mobile"},o.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},o.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},o.createElement("div",null,o.createElement("div",{className:"le-floating-mobile-title le-text-align-".concat(i)},a),o.createElement("div",{className:"le-floating-mobile-desc le-text-align-".concat(c)},r)),m?o.createElement("div",null,o.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:m})):null),o.createElement("div",{style:{textAlign:"center",marginTop:10}},o.createElement("a",{target:d?"blank":"_parent",href:t,style:{textDecoration:"none"}},o.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},l))),o.createElement(x,{onClose:p,containerClassName:"le-abs-outer-top-right",svgClassName:"le-mobile-btn"})))))},w=1,E=2,N="https://dev.leadgen.hellobacsi.com/",C=1,S=2,B="";N.includes("localhost")&&(N="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(B="pink");var T="https://"+location.hostname+location.pathname+location.search;T=T.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));var j={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},L=j[document.documentElement.lang]||j["vi-VN"];var O=l({}),P=function(e){var n=e.title,t=e.titleAlign,a=e.subtitle,l=e.subtitleAlign,i=e.link,r=e.linkNewTab,c=e.linkText,d=e.image;return o.createElement("div",{className:"lead-modal__thank-you"},o.createElement("div",{style:{width:"100%"}},o.createElement("img",{src:d,style:{maxHeight:162,objectFit:"cover"}}),n&&o.createElement("h1",{className:"le-thankyou-title le-text-align-".concat(t)},n),a&&o.createElement("p",{className:"le-thankyou-subtitle le-text-align-".concat(l)},a),c&&o.createElement("div",null,o.createElement("a",{href:i,target:r?"_blank":"parrent",rel:"noreferrer"},o.createElement("button",{className:"lead-modal__btn ".concat(B)},c)))))},I=function(n){var t=n.content,a=n.inlinePosition,o=i((function(){if(!a)return null;var n=document.querySelectorAll('[data-url="'.concat(location.pathname,'"] .body-content')),t=Array.from(n).reduce((function(n,t){return e(e([],n,!0),Array.from(t.children),!0)}),[]);if(null==t?void 0:t.length){var o=t.filter((function(e){return"P"===e.nodeName})),l=t.filter((function(e){return"H2"===e.nodeName})),i=null;switch(a){case"1th":i=o[0];break;case"2th":i=o[1];break;case"3th":i=o[2];break;case"4th":i=o[3];break;case"5th":i=o[4];break;case"6th":i=o[5];break;case"7th":i=o[6];break;case"8th":i=o[7];break;case"9th":i=o[8];break;case"10th":i=o[9];break;case"11th":i=o[10];break;case"12th":i=o[11];break;case"lastP":i=o[o.length-1];break;case"1thH2":i=l[0];break;case"2thH2":i=l[1];break;case"3thH2":i=l[2];break;case"4thH2":i=l[3];break;case"5thH2":i=l[4];break;case"6thH2":i=l[5];break;case"7thH2":i=l[6];break;case"8thH2":i=l[7];break;case"9thH2":i=l[8];break;case"10thH2":i=l[9];break;case"lastH2":i=l[l.length-1]}if(i){var r=document.createElement("div");return r.classList.add("inline-lead-wrapper"),i.nextElementSibling?i.parentElement.insertBefore(r,i.nextElementSibling):i.parentElement.appendChild(r),r}}}),[a]);return a&&o?p(t,o):null},A=function(e){var n=e.content,t=i((function(){var e=[];return document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar").forEach((function(n){return e.push(n)})),e}),[]);return o.createElement(o.Fragment,null,t.map((function(e){return p(n,b(e,"sidebar-lead-modal-wrapper"))})))},z=function(e){var a,l,s,m=e.popupId,p=e.extraFields,u=e.onClose,h=e.onOtherSubmit,g=e.imageMobile,b=e.imageDesktop,f=e.imageOverlayMobile,v=e.imageOverlayDesktop,x=e.imageBackground,_=e.currentLayout,y=e.title,w=e.onSubmit,E=e.showThankyou,N=k().t,C=JSON.parse(p.listBlockAdded),S=JSON.parse(p.actionBlocks),T=JSON.parse(p.textBlocks),j=r(O).apiUrl,z=S.submitBlock.data.url,D=S.submitBlock.data.text,H=S.submitBlock.data.text2,M=S.submitBlock.data.value,q=location.pathname,V=_.includes("Inline")||"Sidebar"===_,F="Slider"===_,R=c(!0),U=R[0],W=R[1];if(window.innerWidth<769&&["Fullscreen","Slider"].includes(_))return console.log("😎 Not show fullscreen, slider on mobile "),null;d((function(){(_.includes("LightBox")||"Fullscreen"==_)&&document.body.classList.add("noscroll")}),[]);var J=function(e,a){return n(void 0,void 0,void 0,(function(){return t(this,(function(n){switch(n.label){case 0:return a.target.validity.valueMissing?(a.target.setCustomValidity(N("validator.required")),[3,6]):[3,1];case 1:return a.target.validity.valid||a.target.validity.customError?[3,2]:("tel"===e?a.target.setCustomValidity(N("validator.phone")):"date"===e?a.target.setCustomValidity(N("validator.date")):"email"===e&&a.target.setCustomValidity(N("validator.email")),[3,6]);case 2:return"tel"!==e?[3,5]:window.intlTelInputUtils?[3,4]:[4,require("intl-tel-input/build/js/utils")];case 3:n.sent(),n.label=4;case 4:return window.intlTelInputUtils.isValidNumber(String(a.target.value),L.countryCode)?a.target.setCustomValidity(""):a.target.setCustomValidity(N("validator.phone")),[3,6];case 5:a.target.setCustomValidity(""),n.label=6;case 6:return[2]}}))}))},Q=i((function(){var e={TextBlock:0,NumberBlock:0,EmailBlock:0,PhoneBlock:0,DateBlock:0,CheckboxBlock:0,RadioBlock:0};return C.map((function(n,t){var a,l;if("TitleBlock"==n.name)return o.createElement("h2",{key:t,className:"lead-modal__title ".concat("le-text-align-"+((null===(a=n.data)||void 0===a?void 0:a.align)||"")," ").concat(B)},n.data.value);if("SubtitleBlock"==n.name)return o.createElement("p",{key:t,className:"lead-modal__description ".concat("le-text-align-"+((null===(l=n.data)||void 0===l?void 0:l.align)||"")," ").concat(B)},n.data.value);if("TextBlock"==n.name)return e.TextBlock+=1,o.createElement("div",{key:t},o.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},o.createElement("input",{required:!0,"data-key":n.data.value,name:"text"+(e.TextBlock>1?e.TextBlock:""),spellCheck:!1,type:"text",placeholder:n.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(e){return J("text",e)}}),o.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(j,"admin/img/builder/text.svg")})));if("NumberBlock"==n.name){var i=o.createElement("div",{key:t},o.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},o.createElement("input",{required:!0,"data-key":n.data.value,name:"number"+(e.NumberBlock?e.NumberBlock:""),spellCheck:!1,type:"number",min:"0",placeholder:n.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(e){return J("number",e)}}),o.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(j,"admin/img/builder/number.svg")})));return e.NumberBlock+=1,i}if("EmailBlock"==n.name){i=o.createElement("div",{key:t},o.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},o.createElement("input",{required:!0,"data-key":n.data.value,name:"email"+(e.EmailBlock?e.EmailBlock:""),spellCheck:!1,type:"email",placeholder:n.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(e){return J("email",e)}}),o.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(j,"admin/img/builder/email.svg")})));return e.EmailBlock+=1,i}if("PhoneBlock"==n.name){i=o.createElement("div",{key:t},o.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},o.createElement("input",{required:!0,"data-key":n.data.value,name:"tel"+(e.PhoneBlock?e.PhoneBlock:""),spellCheck:!1,type:"tel",placeholder:n.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(e){return J("tel",e)}}),o.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(j,"admin/img/builder/tel.svg")})));return e.PhoneBlock+=1,i}if("DateBlock"==n.name){i=o.createElement("div",null,o.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},o.createElement("input",{required:!0,type:"date","data-key":n.data.value,name:"date"+(e.DateBlock?e.DateBlock:""),placeholder:n.data.placeholder,onClick:function(e){e.currentTarget.classList.remove("placeholderclass")},onBlur:function(e){e.currentTarget.value||e.currentTarget.classList.add("placeholderclass")},className:"dateclass placeholderclass lead-modal__form-control width-100%",onChange:function(e){return J("date",e)}}),o.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(j,"admin/img/builder/date.svg")})));return e.DateBlock+=1,i}if("LinkButtonBlock"==n.name)return o.createElement("div",{key:t},o.createElement("a",{target:n.data.newtab?"blank":"parrent",href:n.data.url,style:{textDecoration:"none"}},o.createElement("button",{type:"button",className:"lead-modal__btn js-modal__close js-popup-other-submit ".concat(B),onClick:function(){null==u||u(),null==h||h()}},n.data.value)));if("CheckboxBlock"==n.name){var r=n.data,c=r.listQuestion,d=r.isSendMailChimp,s=void 0!==d&&d;i=o.createElement("div",{key:t,style:{margin:"5px 0"}},o.createElement("div",{className:"le-checkbox-title"},n.data.placeholder),o.createElement("div",{className:"mailchimp-".concat(n.data.value),"data-mailchimp":s}),c.map((function(t,a){return o.createElement("label",{key:a,className:"lead-checkbox-container"},o.createElement("input",{"data-key":n.data.value,name:"checkbox"+(e.CheckboxBlock?e.CheckboxBlock:"")+"[]",value:t.value,type:"checkbox",onChange:function(e){return J("checkbox",e)}}),o.createElement("span",{className:"lead-checkbox-checkmark"}),t.placeholder)})));return e.CheckboxBlock+=1,i}if("RadioBlock"==n.name){c=n.data.listQuestion,i=o.createElement("div",{key:t,style:{margin:"5px 0"}},o.createElement("div",{className:"le-checkbox-title"},n.data.placeholder),c.map((function(t,a){return o.createElement("label",{className:"lead-radio-container",key:a},o.createElement("input",{"data-key":n.data.value,name:"radio"+(e.RadioBlock?e.RadioBlock:""),value:t.value,type:"radio",onChange:function(e){return J("radio",e)}}),o.createElement("span",{className:"lead-radio-checkmark"}),t.placeholder)})));return e.RadioBlock+=1,i}if("DropdownBlock"==n.name){c=n.data.listQuestion,i=o.createElement("div",{key:t,style:{margin:"5px 0"}},o.createElement("div",{className:"le-checkbox-title"},n.data.placeholder),o.createElement("div",{className:"le-newbuilder-select-wrapper"},o.createElement("select",{className:"le-newbuilder-select","data-key":n.data.value,name:"dropdown"+(e.DropdownBlock?e.DropdownBlock:"")},c.map((function(e,n){return o.createElement("option",{key:n,value:e.value},e.placeholder)})))));return e.DropdownBlock+=1,i}}))}),[]),G=o.createElement(o.Fragment,null,o.createElement("style",{dangerouslySetInnerHTML:{__html:".le-newbuilder-overlay {\n background: url(".concat(f,") ;\n background-repeat: no-repeat;\n background-size: cover;\n }\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(").concat(v,") ;\n background-repeat: no-repeat;\n background-size: cover;\n }\n }")}}),o.createElement("div",{id:m,"data-popup-url":q,"data-popup-type":"lightbox-inline",className:"lead-modal lead-modal-wrapper modal--animate-scale ".concat(V?"le-buider-inline":""," ").concat(F?"le-buider-slider":"")},"Fullscreen"==_?o.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:x||""}):null,o.createElement("div",{className:"lead-modal__wrapper le-newbuilder-wrap-".concat(_)},o.createElement("div",{className:"lead-modal__content le-newbuilder-".concat(_)},E?o.createElement(P,{title:E.title,titleAlign:E.titleAlign,subtitle:E.subtitle,subtitleAlign:E.subtitleAlign,link:E.link,linkNewTab:E.linkNewTab,linkText:E.linkText,image:E.image}):o.createElement(o.Fragment,null,o.createElement("header",{className:"lead-modal__header"},["LightBoxA","InlineA","Sidebar","Slider"].includes(_)?g?o.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:g,alt:""}):null:o.createElement(o.Fragment,null,b?o.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:b,alt:""}):null,g?o.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:g,alt:""}):null)),o.createElement("div",{className:"lead-modal__body le-newbuilder-overlay"},o.createElement("form",{className:"lead-modal__form ".concat(m),onSubmit:w},o.createElement("div",{style:{marginBottom:20}},o.createElement("h2",{className:"lead-modal__title ".concat("le-text-align-"+(null===(a=T.titleBlock.data)||void 0===a?void 0:a.align)," ").concat(B)},y),o.createElement("p",{className:"lead-modal__description ".concat("le-text-align-"+(null===(l=T.titleBlock.data)||void 0===l?void 0:l.align)," ").concat(B)},T.subtitleBlock.data.value)),o.createElement("div",null,Q),(null===(s=null==S?void 0:S.submitBlock)||void 0===s?void 0:s.isHide)?null:o.createElement(o.Fragment,null,o.createElement("div",{className:"lead-modal__checkbox-wrapper ".concat(B)},o.createElement("div",{className:"lead-modal__checkbox"},o.createElement("input",{id:"lead-term-checkbox",className:"lead-modal__checkbox__input ".concat(B),type:"checkbox","aria-label":"Checkbox label",checked:U,onChange:function(e){return W(e.currentTarget.checked)}}),o.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),o.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},D," ",o.createElement("span",{style:{fontWeight:"bold"}},o.createElement("a",{target:"blank",href:z||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},H)))),o.createElement("button",{id:"lead-submit",type:"submit",className:"lead-modal__btn ".concat(B),disabled:!U},M)))))),!_.includes("Inline")&&o.createElement("button",{className:"lead-modal__close-btn ".concat("Fullscreen"==_?"lead-fullscreen-desktop-close-btn":""," js-modal__close ").concat(B),onClick:u},o.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},o.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},o.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),o.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"})))))));return _.includes("LightBox")||"Fullscreen"==_||"Slider"==_?G:"Sidebar"==_?o.createElement(A,{content:G}):_.includes("Inline")?o.createElement(I,{content:G,inlinePosition:p.popupInlinePosition}):null},D=function(e){var n=e.popupId,t=e.link,a=e.linkText,l=e.linkNewTab,i=e.onClose,r=e.imageMobile,c=e.imageDesktop,d=e.currentLayout,s=e.onOtherSubmit,m=location.pathname;return o.createElement("div",{id:n,className:"lead-modal-wrapper","data-popup-url":m,"data-popup-type":"skin_ab"},"SkinA"==d?o.createElement("aside",{className:"le-only-desktop"},o.createElement("div",{className:"le-skin-a-desktop"},o.createElement("div",{style:{position:"relative"}},o.createElement("img",{src:c}),o.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:l?"blank":"_parent"},o.createElement("button",{onClick:s,className:"le-joinbow-btn js-popup-other-submit"},a)),o.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(B)},o.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},o.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},o.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),o.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))):"SkinB"==d?o.createElement("aside",{className:"le-only-desktop"},o.createElement("div",{className:""},o.createElement("div",{style:{position:"relative",zIndex:1e4}},o.createElement("img",{src:c,style:{width:"100%"}}),o.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:l?"blank":"_parent"},o.createElement("button",{onClick:s,className:"le-joinbow-btn-mobile js-popup-other-submit"},a)),o.createElement(x,{containerClassName:"le-abs-top-right",onClose:i})))):null,o.createElement("aside",{className:"le-only-mobile"},o.createElement("div",{className:"le-skin-mobile"},o.createElement("div",{style:{position:"relative"}},o.createElement("img",{src:r,style:{width:"100%"}}),o.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:l?"blank":"_parent"},o.createElement("button",{onClick:s,className:"le-joinbow-btn-mobile js-popup-other-submit"},a)),o.createElement(x,{containerClassName:"le-abs-top-right",svgClassName:"le-mobile-btn",onClose:i})))))},H=function(e){var n=e.popupId,t=e.url,a=e.newTab,l=e.image,i=e.onClose,r=e.onOtherSubmit;return o.createElement("div",{id:n,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},o.createElement("div",{className:"le-tab-popup"},o.createElement("div",{style:{position:"relative"}},o.createElement("a",{href:t,target:a?"blank":"_parent",onClick:r},o.createElement("img",{className:"js-popup-other-submit",src:l})),o.createElement(x,{onClose:i,containerClassName:"le-abs-outer-mobile-top-right-2",svgClassName:"le-mobile-btn"}))))};var M=function(e){var n,t,a=e.campaign,l=e.action,i=e.onSubmit,c=e.onClose,m=e.showThankyou;k().t;var p=r(O),u=p.apiUrl,b=p.siteDomain;d((function(){var e=h("_ga")||null;fetch("".concat(u,"api/campaign/").concat(E,"/impression"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:l,url:location.href.toLowerCase(),title_article:document.title,cookie_id:h("hhg-id"),ga_client_id:e})})}),[]);var f=a.extra_fields,x=a.image,w=a.image_desktop,E=a.code,N=a.image_background,C=a.image_overlay_mobile,S=a.image_overlay_desktop,B=f.currentLayout,T=f.imageBlocks?JSON.parse(f.imageBlocks):{},j=JSON.parse(f.actionBlocks),L=JSON.parse(f.textBlocks),P=(null===(t=null===(n=null==L?void 0:L.titleBlock)||void 0===n?void 0:n.data)||void 0===t?void 0:t.value)||"",I={1:{},2:{},3:{}},A=s("lead-modal-"+v()),M=function(e){if(void 0===e&&(e="Xin chao {{category_2}} extra"),e.includes("{{category_")){var n="{{category_".length,t=e.search("{{category_");return+e.charAt(n+t)}return null}(P);if(M){console.log("⚡️ Has categoryLevel",M);var q=Array.from(document.getElementsByTagName("META")),V=q.find((function(e){return e.name==="content_category_".concat(M)})),F=q.find((function(e){return e.name==="content_category_en_".concat(M)}));if(!V||!F)return console.log("⚡️ No META TAG for categoryLevel, not show popup",M),null;I[M]={value:V.content,value_en:F.content},P=P.replace("{{category_".concat(M,"}}"),V.content),console.log("⚡️ Set categoryData ",M)}else console.log("⚡️ No categoryLevel",M);var R=function(){var e,n,t,o;if(console.log("👌 Other submit click"),document.body.classList.remove("noscroll"),B.includes("Skin")){var l=document.querySelector("#masthead");l&&(l.style.top="0px !important;")}var i=Number(null!==(n=null===(e=a.rules.find((function(e){return"days_to_show_again"==e.rule})))||void 0===e?void 0:e.value)&&void 0!==n?n:7),r=Number(null!==(o=null===(t=a.rules.find((function(e){return"show_again_after_submit"==e.rule})))||void 0===t?void 0:t.value)&&void 0!==o?o:0);0===r&&(console.log("⛔ Popup never show again!"),g("lead_submited_".concat(E),"target_".concat(f.popupVersion),{domain:"."+b,path:"/"})),1==r&&(console.log("⌛ Popup will show again after ".concat(i," days!")),g("lead_submited_".concat(E),"target_".concat(f.popupVersion),{domain:"."+b,days:i,path:"/"}));var d=h("_ga")||null,s={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:h("hhg-id"),ga_client_id:d};M&&(s.category=I[M].value_en),fetch("".concat(u,"api/campaign/").concat(E,"/lead"),{method:"POST",body:JSON.stringify(s),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((function(e){return e.json()})).then((function(e){"error"===e.status&&console.log(e)})).catch((function(e){console.error("Error:",e)})),null==c||c()};return"CenterTab"===B?o.createElement(_,{popupId:A.current,url:T.imageMobile.data.url,newTab:T.imageMobile.data.newtab,imageMobile:x,imageDestkop:w,onClose:c,onOtherSubmit:R}):"Tab"===B?o.createElement(H,{popupId:A.current,url:T.imageMobile.data.url,newTab:T.imageMobile.data.newtab,image:x,onClose:c,onOtherSubmit:R}):"Floating"===B?o.createElement(y,{popupId:A.current,title:P,titleAlign:L.titleBlock.data.align,subtitle:L.subtitleBlock.data.value,subtitleAlign:L.subtitleBlock.data.align,url:j.linkButtonBlock.data.url,urlText:j.linkButtonBlock.data.value,newTab:j.linkButtonBlock.data.newtab,imageMobile:x,imageDesktop:w,onClose:c,onOtherSubmit:R}):B.includes("LightBox")||B.includes("Inline")||"Fullscreen"==B||"Sidebar"==B||"Slider"==B?o.createElement(z,{popupId:A.current,extraFields:f,onClose:c,onOtherSubmit:R,imageMobile:x,imageDesktop:w,imageBackground:N,currentLayout:B,title:P,onSubmit:function(e){return i(e,M,I,A.current)},key:B,imageOverlayDesktop:S,imageOverlayMobile:C,showThankyou:m}):B.includes("Skin")?o.createElement(D,{popupId:A.current,link:j.linkButtonBlock.data.url,linkNewTab:!!j.linkButtonBlock.data.newtab,linkText:j.linkButtonBlock.data.value,onClose:c,onOtherSubmit:R,imageMobile:x,imageDesktop:w,currentLayout:B}):null},q=function(e){var a=e.campaign,l=e.action,i=e.onSubmit,s=e.onClose,m=e.showThankyou,p=k().t,u=c(!0),g=u[0],b=u[1];d((function(){document.body.classList.add("noscroll");var e=h("_ga")||null;fetch("".concat(S,"api/campaign/").concat(x,"/impression"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:l||"",url:location.href.toLowerCase(),title_article:document.title,cookie_id:h("hhg-id"),ga_client_id:e})})}),[]);var f=a.extra_fields,v=a.image,x=a.code,_=f.title,y=f.desc,w=f.submit,E=f.popUpTermURL,N=f.popUpTermAgreeText,C=f.popUpTermText,S=r(O).apiUrl,T=f.fields?JSON.parse(f.fields):[],j={tel:0,text:0,date:0,email:0},I=function(e,a){return n(void 0,void 0,void 0,(function(){return t(this,(function(n){switch(n.label){case 0:return a.target.validity.valueMissing?(a.target.setCustomValidity(p("validator.required")),[3,5]):[3,1];case 1:return a.target.validity.valid||a.target.validity.customError?[3,2]:("tel"===e?a.target.setCustomValidity(p("validator.phone")):"date"===e?a.target.setCustomValidity(p("validator.date")):"email"===e&&a.target.setCustomValidity(p("validator.email")),[3,5]);case 2:return"tel"!==e?[3,4]:[4,require("intl-tel-input")];case 3:return n.sent().isValidNumber(String(a.target.value),L.countryCode)?a.target.setCustomValidity(""):a.target.setCustomValidity(p("validator.phone")),[3,5];case 4:a.target.setCustomValidity(""),n.label=5;case 5:return[2]}}))}))},A=T.map((function(e,n){var t=o.createElement(o.Fragment,null);return t="date"==e.control?o.createElement("div",{key:n,className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},o.createElement("input",{required:!0,type:"date","data-key":e.listEdit[0].value,name:j.date?e.control+j.date:e.control,placeholder:e.listEdit[1].value||"...",onClick:function(e){return e.currentTarget.classList.remove("placeholderclass")},onBlur:function(e){return!e.currentTarget.value&&e.currentTarget.classList.add("placeholderclass")},className:"dateclass placeholderclass lead-modal__form-control width-100%",onChange:function(n){return I(e.control,n)}}),o.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(S,"admin/img/builder/").concat(e.name,".svg")})):o.createElement("div",{key:n,className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},o.createElement("input",{required:!0,"data-key":e.listEdit[0].value,name:j[e.control]?e.control+j[e.control]:e.control,spellCheck:!1,type:e.control,placeholder:e.listEdit[1].value||"...",className:"lead-modal__form-control width-100%",onChange:function(n){return I(e.control,n)}}),o.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(S,"admin/img/builder/").concat(e.name,".svg")})),"date"==e.control&&(j.date+=1),"text"==e.control&&(j.text+=1),"tel"==e.control&&(j.tel+=1),"email"==e.control&&(j.email+=1),t}));return o.createElement("div",{id:"lead-modal",className:"lead-modal modal--animate-scale"},o.createElement("div",{className:"lead-modal__wrapper animate__animated "},o.createElement("div",{className:"lead-modal__content"},m?o.createElement(P,{title:m.title,titleAlign:m.titleAlign,subtitle:m.subtitle,subtitleAlign:m.subtitleAlign,link:m.link,linkNewTab:m.linkNewTab,linkText:m.linkText,image:m.image}):o.createElement(o.Fragment,null,o.createElement("header",{className:"lead-modal__header"},!!v&&o.createElement("img",{className:"lead-modal__image lead-modal-image-cover",src:v,alt:""})),o.createElement("div",{className:"lead-modal__body"},o.createElement("h2",{className:"lead-modal__title ".concat(B)},_),o.createElement("p",{className:"lead-modal__description ".concat(B)},y),o.createElement("form",{className:"lead-modal__form",onSubmit:function(e){e.preventDefault(),i(e)}},A,o.createElement("div",{className:"lead-modal__checkbox-wrapper ".concat(B)},o.createElement("div",{className:"lead-modal__checkbox"},o.createElement("input",{id:"lead-term-checkbox",className:"lead-modal__checkbox__input ".concat(B),type:"checkbox","aria-label":"Checkbox label",checked:g,onChange:function(e){return b(e.currentTarget.checked)}}),o.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),o.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},N," ",o.createElement("span",{style:{fontWeight:"bold"}},o.createElement("a",{target:"blank",href:E||"https://hellobacsi.com/chinh-sach",style:{textDecoration:"none"},rel:"noopener noreferrer"},C)))),o.createElement("button",{id:"lead-submit",type:"submit",className:"lead-modal__btn ".concat(B),disabled:!g},w))))),o.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(B),onClick:s},o.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},o.createElement("title",null,"Close modal window"),o.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},o.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),o.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))},V=function(e){var n=e.campaign,t=e.action,a=e.onSubmit,l=e.onClose,i=e.showThankyou;return n.extra_fields?"2.1"==n.extra_fields.popupVersion?o.createElement(M,{campaign:n,action:t,onSubmit:a,onClose:l,showThankyou:i}):o.createElement(q,{campaign:n,action:t,onSubmit:a,onClose:l,showThankyou:i}):null},F={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}."},R={"en-PH":F,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah."},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง"},"tl-PH":F},U=function(e){var n=R[e];return n||R["en-PH"]},W=function(){return o.createElement("style",{dangerouslySetInnerHTML:{__html:"\n /* lead-modal : start */\n .lead-modal {\n font-family: 'Open sans', sans-serif !important;\n position: fixed;\n z-index: 99999;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n opacity: 1;\n visibility: visible;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n padding: 10px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n white-space: normal !important;\n }\n\n .lead-modal__wrapper {\n position: relative;\n width: 100%;\n max-width: 450px;\n background-color: #fff;\n border-radius: 6px;\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n }\n\n .lead-modal__content {\n width: inherit;\n overflow: auto;\n /* min-height: 400px; */\n max-height: calc(100vh - 125px);\n -webkit-overflow-scrolling: touch;\n }\n\n .lead-modal__header {\n padding: 0px 0px;\n }\n\n .lead-modal__image {\n display: block;\n margin: 0 auto;\n border: none !important;\n box-shadow: none !important;\n }\n .lead-modal-image-logo {\n margin-top: 15px;\n margin-bottom: 15px;\n }\n\n .lead-modal-image-cover {\n width: 100% !important;\n padding: 0 0px;\n border-top-left-radius: 4px;\n border: none !important;\n box-shadow: none !important;\n /* margin: 0 !important; */\n }\n\n .lead-modal__image + .lead-modal__image {\n /* margin-top: 10px; */\n /* border-radius: 4px; */\n }\n\n .lead-modal__body {\n font-family: 'Open sans', sans-serif !important;\n padding: 15px 15px 25px 15px;\n }\n\n .lead-modal__title {\n font-family: 'Open sans', sans-serif !important;\n font-size: 20px !important;\n font-weight: bold !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.3 !important;\n letter-spacing: -0.4px !important;\n color: #2a4975 !important;\n box-shadow: none !important;\n padding-bottom: 0 !important;\n }\n\n .lead-modal__title.pink {\n color: #2661ad !important;\n }\n\n .lead-modal__description {\n font-family: 'Open sans', sans-serif !important;\n font-size: 13px !important;\n font-weight: normal !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.62 !important;\n letter-spacing: 0.14px !important;\n color: #2c87f3 !important;\n margin-top: 10px !important;\n }\n\n .lead-modal__description.pink {\n color: #3e3f58 !important;\n }\n\n .lead-modal__form-control-wrapper {\n margin-top: 10px;\n margin-left: 0px !important;\n position: relative;\n }\n\n .lead-modal__form-control {\n box-shadow: none !important;\n height: 40px !important;\n width: 100%;\n padding-left: calc(15px + 1.5em + 15px) !important;\n background-color: #fff !important;\n padding-top: 10px !important;\n padding-bottom: 10px !important;\n padding-right: 15px !important;\n border: solid 1px #dddddd !important;\n color: #2a4975 !important;\n line-height: 1.7em !important;\n border-radius: 0 !important;\n font-family: 'Open Sans', sans-serif !important;\n background-image: linear-gradient(transparent, transparent) !important;\n margin-left: 0px !important;\n font-size: 14px !important;\n line-height: 14px !important;\n }\n\n .lead-modal__form-control {\n &:focus {\n border-color: var(--color-primary);\n box-shadow: 0px 0px 0px 3px rgba(44, 135, 243, 0.1);\n outline: none;\n }\n\n &::-webkit-input-placeholder {\n /* Chrome, Firefox, Opera, Safari 10.1+ */\n color: #b5b5b5;\n }\n\n &::-moz-placeholder {\n color: #b5b5b5;\n }\n\n &:-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::placeholder {\n color: #b5b5b5;\n }\n }\n\n img.lead-modal__form-control-icon {\n display: inline-block !important;\n color: #b5b5b5 !important;\n fill: #b5b5b5 !important;\n line-height: 1 !important;\n flex-shrink: 0 !important;\n max-width: initial !important;\n display: block !important;\n position: absolute !important;\n pointer-events: none !important;\n left: 15px !important;\n top: 10px !important;\n height: 20px !important;\n width: 20px !important;\n border: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__checkbox-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n align-items: center;\n margin-top: 15px;\n a {\n color: #2c87f3 !important;\n text-decoration: none !important;\n }\n\n a:visited {\n color: #2c87f3 !important;\n }\n &.pink a,\n &.pink a:visited {\n color: #e55c8a !important;\n }\n }\n\n .lead-modal__checkbox {\n position: relative;\n z-index: 1;\n display: inline-block;\n font-size: 20px;\n }\n\n .lead-modal__checkbox__input {\n position: relative;\n margin: 0 !important;\n padding: 0;\n opacity: 0;\n height: 1em !important;\n width: 1em !important;\n display: block;\n z-index: 1;\n font-size: 1em !important;\n }\n\n .lead-modal__checkbox__control {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: -1;\n pointer-events: none;\n transition: transform 0.2s;\n color: #dddddd;\n &::before,\n &::after {\n content: '';\n position: absolute;\n }\n\n &::before {\n width: 120%;\n height: 120%;\n background-color: currentColor;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n opacity: 0;\n border-radius: 50%;\n will-change: transform;\n transition: transform 0.2s;\n }\n\n &::after {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #fff;\n border-radius: 6px;\n -webkit-box-shadow: inset 0 0 0 1px #dddddd;\n box-shadow: inset 0 0 0 1px #dddddd;\n }\n\n &:focus::after {\n box-shadow: inset 0 0 0 1px #2c87f3;\n }\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-color: currentColor;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 18px;\n box-shadow: none;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control {\n color: #2c87f3;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5 8 6.5 12 13.5 3' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:indeterminate ~ .lead-modal__checkbox__control {\n color: var(--custom-checkbox-color-disabled);\n }\n\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cline x1='2' y1='8' x2='14' y2='8' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:active ~ .lead-modal__checkbox__control {\n transform: scale(0.9);\n }\n\n .lead-modal__checkbox__input:checked:active ~ .lead-modal__checkbox__control,\n .lead-modal__checkbox__input:indeterminate:active\n ~ .lead-modal__checkbox__control {\n transform: scale(1);\n }\n\n .lead-modal__checkbox__input:focus ~ .lead-modal__checkbox__control::before {\n opacity: 0.2;\n transform: translate(-50%, -50%) scale(1);\n }\n\n .lead-modal__checkbox__input.pink ~ .lead-modal__checkbox__control::after {\n border-radius: 50% !important;\n }\n\n .lead-modal__checkbox__input.pink:checked ~ .lead-modal__checkbox__control {\n color: #2661ad;\n }\n\n .lead-modal__checkbox__input.pink:checked\n ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input.pink:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-size: 12px;\n }\n\n .lead-modal__checkbox__label {\n /* font-family: OpenSans; */\n font-size: 13px;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: 0.14px;\n color: #969696;\n margin-left: 10px;\n margin-bottom: 0 !important;\n }\n\n .lead-modal__btn {\n display: block;\n width: 100%;\n border: none;\n color: #fff;\n padding: 12px 10px;\n font-weight: 700;\n text-align: center;\n margin-top: 15px;\n border-radius: 4px;\n background-color: #2699fb;\n transition: all 0.2s ease-in-out;\n text-shadow: none !important;\n box-shadow: none !important;\n font-family: 'Open sans', sans-serif !important;\n font-size: 14px;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #e55c8a;\n }\n\n &.pink:hover {\n background-color: #b4466a;\n }\n }\n\n .lead-modal__close-btn {\n position: absolute;\n padding-top: 5px;\n top: -15px;\n right: -10px;\n width: 35px;\n height: 35px;\n box-shadow: -2px 4px 4px 0 rgba(191, 191, 191, 0.44) !important;\n text-shadow: none !important;\n background-color: #005cfd;\n border-radius: 50%;\n line-height: inherit;\n appearance: none;\n border: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease-in-out;\n outline: none;\n z-index: 1;\n padding: 5px 13px !important;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #fff;\n }\n\n &.pink .lead-modal__close-icon {\n color: #000;\n }\n\n &.pink:hover .lead-modal__close-icon {\n color: #e55c8a;\n transition: 0.3s all ease;\n }\n }\n\n .lead-modal__close-icon {\n display: inline-block;\n color: #fff;\n fill: #fff;\n height: 1em;\n width: 1em;\n line-height: 1;\n flex-shrink: 0;\n max-width: initial;\n transition: 0.3s all ease;\n }\n\n .lead-modal__thank-you {\n padding: 0 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n height: inherit;\n text-align: center;\n min-height: 400px;\n h1 {\n margin-top: 10px;\n font-size: 32px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.23px;\n color: #1b3250;\n }\n\n p {\n margin-top: 5px;\n font-size: 16px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.11px;\n color: #1b3250;\n }\n img {\n max-width: 100% !important;\n border: none !important;\n width: auto !important;\n margin: 0 auto !important;\n }\n\n &.hidden {\n display: none;\n }\n }\n\n /* lead-modal : end */\n\n .modal__container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 1000000000000;\n pointer-events: none;\n overflow-y: scroll;\n }\n\n .modal__content {\n position: relative;\n width: 80vw;\n margin: auto 0;\n }\n\n /* Make clicks pass-through */\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: #223bdd;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1;\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n }\n @keyframes nprogress-spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .lead-modal__btn:disabled {\n background: #d5d5d5 !important;\n }\n\n .dateclass {\n width: 100%;\n }\n\n .dateclass.placeholderclass::before {\n width: 100%;\n content: attr(placeholder);\n color: #b8b8b8;\n }\n\n .dateclass.placeholderclass:hover::before {\n width: 0%;\n content: '';\n }\n\n /* Change Autocomplete styles in Chrome*/\n .lead-modal input:-webkit-autofill,\n .lead-modal input:-webkit-autofill:hover,\n .lead-modal input:-webkit-autofill:focus,\n .lead-modal textarea:-webkit-autofill,\n .lead-modal textarea:-webkit-autofill:hover,\n .lead-modal textarea:-webkit-autofill:focus,\n .lead-modal select:-webkit-autofill,\n .lead-modal select:-webkit-autofill:hover,\n .lead-modal select:-webkit-autofill:focus {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n -webkit-text-fill-color: #2a4975;\n }\n\n .lead-modal label.error {\n font-size: 13px;\n color: #fa140f;\n margin-bottom: 0;\n margin-left: 0px !important;\n line-height: 1.65 !important;\n width: 100%;\n display: block;\n }\n\n /* === Lead gen wrapper === */\n .le-text-align-center {\n text-align: center !important;\n }\n .le-text-align-left {\n text-align: left !important;\n }\n .le-text-align-right {\n text-align: right !important;\n }\n\n .le-only-desktop {\n display: none !important;\n }\n .le-only-mobile {\n display: block !important;\n }\n\n .le-only-desktop a {\n text-decoration: none !important;\n }\n\n .le-only-mobile a {\n text-decoration: none !important;\n }\n\n @media screen and (min-width: 992px) {\n .le-newbuilder-LightBoxB,\n .le-newbuilder-InlineB {\n display: flex !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__header,\n .le-newbuilder-InlineB .lead-modal__header {\n max-width: 50%;\n }\n }\n\n @media screen and (min-width: 768px) {\n .le-only-desktop {\n display: block !important;\n }\n\n .le-only-mobile {\n display: none !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__body,\n .le-newbuilder-InlineB .lead-modal__body {\n flex: 1;\n }\n\n .le-newbuilder-wrap-LightBoxB {\n max-width: 720px !important;\n }\n .le-newbuilder-wrap-InlineB {\n max-width: 100% !important;\n }\n .le-newbuilder-LightBoxB .le-only-desktop.lead-modal-image-cover {\n max-width: 400px !important;\n }\n }\n\n .lead-modal__title {\n margin: 7px 0 !important;\n }\n\n .lead-modal__description {\n margin: 0;\n }\n\n .lead-modal-image-cover,\n .lead-modal__wrapper {\n border-radius: 0px !important;\n }\n\n .lead-modal__form {\n margin: 0;\n display: block !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n margin-top: 0px;\n }\n\n .lead-modal__thank-you {\n width: 100%;\n }\n\n /* Skins */\n .le-skin-a-desktop {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n height: 100%;\n display: flex;\n align-items: center;\n }\n\n .le-skin-b-desktop {\n }\n\n .le-join-now {\n }\n\n .le-joinbow-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 16px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n border: 1px solid transparent !important;\n cursor: pointer !important;\n }\n .le-joinbow-btn:hover {\n border: 1px solid white !important;\n }\n\n .le-joinbow-btn-mobile {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n }\n\n .le-newbuilder-close-svg {\n border-radius: 50%;\n width: 35px;\n height: 35px;\n background: #005cfd;\n cursor: pointer !important;\n }\n .le-mobile-btn {\n width: 24px;\n height: 24px;\n }\n\n .le-newbuilder-close-button {\n padding: 0;\n background: transparent;\n box-shadow: none;\n border: none;\n width: auto !important;\n cursor: pointer !important;\n }\n .le-abs-top-right {\n position: absolute;\n right: 10px;\n top: 10px;\n }\n\n .le-abs-outer-top-right {\n position: absolute;\n right: 0px;\n top: -45px;\n }\n\n /* Skin floating */\n .le-floating-desktop {\n position: fixed;\n bottom: 40px;\n left: 25px;\n z-index: 9999;\n }\n\n .le-floating-desktop-wrap {\n background: #fff;\n backdrop-filter: blur(30px);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 0px;\n padding-right: 30px;\n border-radius: 5px;\n display: flex;\n align-items: center;\n }\n\n .le-floating-desktop-title {\n font-size: 20px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n max-width: 530px;\n }\n .le-floating-desktop-desc {\n font-size: 13px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n max-width: 530px;\n }\n\n .le-joinbow-floating-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 40px;\n border: none !important;\n border: 1px solid transparent !important;\n font-weight: 500;\n cursor: pointer !important;\n }\n\n /* // Floating mobile */\n .le-floating-mobile {\n position: fixed;\n bottom: 0px;\n left: 0px;\n width: 100%;\n z-index: 9999;\n }\n .le-abs-outer-mobile-top-right {\n position: absolute;\n right: 2px;\n top: -30px;\n }\n\n .le-floating-mobile-wrap {\n background: #fff;\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 10px 15px;\n }\n .le-floating-mobile-title {\n font-size: 18px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n font-weight: 600;\n }\n .le-floating-mobile-desc {\n font-size: 12px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n }\n\n /* // Tab popup */\n .le-tab-popup {\n position: fixed;\n bottom: 15px;\n left: 15px;\n max-width: 150px;\n }\n .le-abs-outer-mobile-top-right-2 {\n position: absolute;\n right: -12px;\n top: -15px;\n }\n\n .le-center-tab-popup {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999999 !important;\n width: calc(100% - 40px);\n max-width: 400px;\n }\n\n .le-center-tab-popup img {\n max-width: 100% !important;\n }\n\n /* // Popup */\n .le-checkbox-title {\n font-size: 15px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n color: #2a4975;\n margin: 13px 0 !important;\n /* line-height: 1.65 !important; */\n }\n\n /* Checkbox */\n .lead-checkbox-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-checkbox-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 4px;\n flex: 0 0 24px;\n }\n\n .lead-checkbox-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-checkbox-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark::after {\n left: 8px;\n top: 3px;\n width: 7px;\n height: 12px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n /* End checkbox */\n\n .le-fullscreen-img {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n @media screen and (min-width: 768px) {\n .lead-fullscreen-desktop-close-btn {\n position: fixed;\n top: 27px;\n right: 23px;\n }\n }\n\n /* // Inline */\n .lead-modal.le-buider-inline {\n position: static;\n display: block;\n padding: 20px 0;\n height: initial !important;\n padding-top: 10px;\n }\n\n .lead-modal.le-buider-inline .lead-modal__wrapper {\n box-shadow: none;\n border: 1px solid #ddd;\n }\n .lead-modal.le-buider-inline .lead-modal__content {\n max-height: initial !important;\n }\n .lead-modal.le-buider-inline .lead-modal__content .lead-modal__header img {\n /* height: auto !important; */\n object-fit: fill;\n }\n\n .le-thankyou-title {\n font-size: 24px !important;\n margin-bottom: 8px !important;\n color: #2a4975 !important;\n }\n\n .le-thankyou-subtitle {\n font-size: 14px !important;\n color: #2699fb !important;\n margin: 0 !important;\n }\n\n /* Radio */\n .lead-radio-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-radio-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 50%;\n flex: 0 0 24px;\n }\n\n .lead-radio-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-radio-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark::after {\n left: 50%;\n top: 50%;\n width: 8px;\n height: 8px;\n background: #fff;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n /* End Radio */\n\n /* Dropdown */\n .le-newbuilder-select {\n width: 100%;\n padding: 12px;\n border-radius: 4px;\n border: solid 1px #d0d0d0;\n outline: none;\n appearance: none;\n font-size: 15px;\n padding-right: 35px;\n }\n .le-newbuilder-select-wrapper {\n position: relative;\n }\n .le-newbuilder-select-wrapper::after {\n content: '';\n position: absolute;\n right: 15px;\n top: 18px;\n transform: rotate(45deg);\n width: 10px;\n height: 10px;\n border: 2px solid #616060;\n border-left: transparent;\n border-top: transparent;\n }\n /* End Dropdown */\n\n .le-buider-slider {\n width: 420px;\n height: auto;\n bottom: 15px;\n top: unset;\n left: -200px;\n animation: le-builder-slide 0.5s forwards;\n }\n\n @keyframes le-builder-slide {\n 100% {\n left: 15px;\n }\n }\n\n @media screen and (max-width: 768px) {\n .le-buider-slider,\n .le-buider-fullscreen {\n display: none !important;\n }\n }\n\n .le-skin-mobile {\n margin-top: 64px;\n }\n"}})};function J(n){var t=n.leadApi,o=n.leadSiteId,l=n.leadDomain,i=n.onShowPopup,r=("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(t+"api/campaign/"+o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:r,ga_client_id:h("_ga")||null})}).then((function(e){return e.json()})).then((function(n){var t,o,c;if(console.log("List campagin: ",n),T="https://"+location.hostname+location.pathname+location.search,1==n._status){var d=n._data.campaigns;h("hhg-id")||(g("hhg-id",v(),{domain:"."+l,path:"/"}),console.log("😍 Set HHG ID cookie"));var s=[];s=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((function(e){return e.device_types.some((function(e){return e.id==C}))})):d.filter((function(e){return e.device_types.some((function(e){return e.id==S}))})),console.log("👓 campaignsDevice",s);var m=s.map((function(e,n){return e.targets.filter((function(e){return e.type==w})).map((function(e){return a(a({},e),{campaignIndex:n})}))})).flat(1);m=m.filter((function(e){var n=new URL(String(e.target).toLowerCase());return"exact_match"==e.option?Boolean(location.pathname===n.pathname):"start_with"==e.option?!!location.pathname.includes(n.pathname)&&!e.sub_target.filter((function(e){return"excluding"==e.option})).map((function(e){return e.value})).includes(r):void 0}));var p=Array.from(document.getElementsByTagName("META")).filter((function(e){return"article:tag"==e.getAttribute("property")})).map((function(e){return e.content})),u=[];p&&p.length&&(u=s.map((function(e,n){return e.targets.filter((function(e){return e.type==E})).map((function(e){return a(a({},e),{campaignIndex:n})}))})).flat(1).filter((function(e){return p.includes(e.target)})));var b=e(e([],m,!0),u,!0),f=document.cookie.split("; ").map((function(e){return e.split("=")[0]})),k=f.filter((function(e){return e.includes("lead_submited")}));console.log("--listCampaignCodeSubmited",k);var x=f.filter((function(e){return e.includes("lead_closed")}));console.log("--listCampaignCodeClosed",x);var _,y=e(e([],k,!0),x,!0);if(_=b.filter((function(e){return!y.some((function(n){return n.includes(s[e.campaignIndex].code)}))})).sort((function(e,n){return e.score-n.score})),console.log("--listCampaignValid : ",_),_&&_.length){var N=s[_[0].campaignIndex];console.log("CAMPAIGN_SHOW",N);var B=N.rules,j=Number(null===(t=B.find((function(e){return"time"==e.rule})))||void 0===t?void 0:t.value);console.log("timeoutRule",j);var L=Number(null===(o=B.find((function(e){return"scroll"==e.rule})))||void 0===o?void 0:o.value);console.log("scrollRule",L);var O=Number(null===(c=B.find((function(e){return"exclude_sponsored"==e.rule})))||void 0===c?void 0:c.value);console.log("excludeSponsored",O);var P=Boolean(document.querySelector(".hhg-disclaimer-text"));if(console.log("💎 LEAD current page isSponsored",P),P&&O)return;var I="TIME";if(Number.isInteger(j)&&(I="TIME",console.log("✨ SHOW AWESOME POPUP AFTER: ",j," seconds"),setTimeout((function(){null==i||i(N,I)}),1e3*j)),Number.isInteger(L)){I="SCROLL",console.log("✨ SHOW AWESOME AFTER: SCROLL",L," %");var A=document.querySelector('[data-url="'.concat(location.pathname,'"]'))||document.querySelector("body"),z=A.getBoundingClientRect().top,D=A.offsetHeight;console.log("👓 Element check scroll: ",A);var H=function(){var e=window.pageYOffset||document.documentElement.scrollTop,n=0;e>=z&&(n=Math.round((e-z)/(D-innerHeight)*100)),console.log("---Scroll",n,L),n>=L&&(window.removeEventListener("scroll",H),null==i||i(N,I))};window.addEventListener("scroll",H)}}else console.log("🚧 No lead campaigns on current URL, tags")}})).catch((function(e){console.error("Lead error: ",e)}))}var Q=function(e){var a=e.apiUrl,l=e.siteDomain,r=e.siteId,b=e.locale,v=s(),k=s(Date.now()),x=i((function(){var e=a;return e.includes("localhost")&&(e="https://dev.leadgen.hellobacsi.com/"),{apiUrl:e}}),[a,l,r]).apiUrl,_=c(null),y=_[0],w=_[1],E=c(""),N=E[0],C=E[1],S=c(null),B=S[0],T=S[1],j=function(e,n){w(e),C(n)},P=function(){var e,n;if(y){console.log("👋👋👋 CLOSE POPUP ".concat(y.code," 👋👋👋"));var t=Number(null===(e=y.rules.find((function(e){return"show_again_after_exit "==e.rule})))||void 0===e?void 0:e.value),a=Number(null===(n=y.rules.find((function(e){return"days_to_show_again"==e.rule})))||void 0===n?void 0:n.value);0==t&&g("lead_closed_".concat(y.code),"target_".concat(y.extra_fields.popupVersion),a?{domain:"."+l,days:a,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch("".concat(x,"api/campaign/").concat(y.code,"/popup_exit"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:h("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),w(null),T(null)}};d((function(){if(window.next){var e=m((function(e){console.log("--🌻 routeChangeComplete",e,Date.now());var n=location.pathname;P(),document.querySelectorAll('[data-popup-url="'.concat(n,'"]')).length||J({leadApi:x,leadDomain:l,leadSiteId:r,onShowPopup:j}),v.current&&window.removeEventListener("scroll",v.current)}),500);window.next.router.events.on("routeChangeComplete",e)}J({leadApi:x,leadDomain:l,leadSiteId:r,onShowPopup:j})}),[]);return d((function(){y&&(k.current=Date.now())}),[y]),o.createElement(O.Provider,{value:{apiUrl:x,siteDomain:l,siteId:r,locale:b}},o.createElement(u.Provider,{value:{locale:b,values:U(b)}},o.createElement(W,null),p(o.createElement(o.Fragment,null,y&&o.createElement(V,{campaign:y,onClose:P,onSubmit:function(e,a,o,i){return n(void 0,void 0,void 0,(function(){var n,r,c,d,s,m,p,u,b,f,v,k,_,w,E,N,C,S,B,j,O,I,A,z,D,H,M,q,V,F,R,U,W,J;return t(this,(function(t){switch(t.label){case 0:return e.preventDefault(),console.log("submitHandler",a,o),n=new FormData(e.currentTarget),r={},n.forEach((function(e,n){r[n]=r[n]||[],r[n].push(e)})),c=Object.keys(r).map((function(e){return{name:e,value:String(r[e])}})),d=2,s=h("_ga")||null,window.intlTelInputUtils?[3,2]:[4,require("intl-tel-input/build/js/utils")];case 1:t.sent(),t.label=2;case 2:return m={url:location.href.toLowerCase(),title_article:document.title,meta:c.map((function(e){var n,t,a;return{key:null===(n=document.querySelector(".lead-modal__form.".concat(i,' [name="').concat(e.name,'"]')))||void 0===n?void 0:n.getAttribute("data-key"),value:(null==L?void 0:L.countryCodeNumber)&&["tel","tel1","tel2","tel3"].includes(e.name)?window.intlTelInputUtils.formatNumber(String(e.value),null==L?void 0:L.countryCodeNumber,d).replace(/\s+/g,""):e.value,control:e.name.replace("1","").replace("2","").replace("3",""),is_sent_mailchimp:(null===(a=document.querySelector(".lead-modal__form.".concat(i," .mailchimp-").concat(null===(t=document.querySelector(".lead-modal__form.".concat(i,' [name="').concat(e.name,'"]')))||void 0===t?void 0:t.getAttribute("data-key"))))||void 0===a?void 0:a.getAttribute("data-mailchimp"))||"false"}})),cookie_id:h("hhg-id"),ga_client_id:s},a&&o[a].value_en&&(m.category=o[a].value_en),p=Number((null===(D=null===(z=y.rules)||void 0===z?void 0:z.find((function(e){return"days_to_show_again"===e.rule})))||void 0===D?void 0:D.value)||7),0==(u=Number((null===(M=null===(H=y.rules)||void 0===H?void 0:H.find((function(e){return"show_again_after_submit"===e.rule})))||void 0===M?void 0:M.value)||0))&&(console.log("⛔ Popup never show again!"),g("lead_submited_".concat(y.code),"target_".concat(y.extra_fields.targetType),{domain:"."+l,path:"/"})),1==u&&(console.log("⌛ Popup will show again after ".concat(p," days!")),g("lead_submited_".concat(y.code),"target_".concat(y.extra_fields.targetType),{domain:"."+l,days:p,path:"/"})),fetch("".concat(x,"api/campaign/").concat(y.code,"/lead"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)}),"notshow"==y.extra_fields.popupShowThankYou?(P(),document.body.classList.remove("noscroll"),[2]):(b=!0,f=y.thank_you_image||"".concat(x,"admin/img/thanksyou.png"),v=y.extra_fields.popupThankyouTitle||"Thank you.",k=y.extra_fields.popupThankyouDesc||"We appreciate your time!",_="",w="",C="","2.1"==y.extra_fields.popupVersion&&(S=y.extra_fields,B=JSON.parse(S.listBlockThankyou),j=B.find((function(e){return"TitleBlock"==e.name})),O=B.find((function(e){return"SubtitleBlock"==e.name})),I=B.find((function(e){return"LinkButtonBlock"==e.name})),v=(null===(q=null==j?void 0:j.data)||void 0===q?void 0:q.value)||"",_=(null===(V=null==j?void 0:j.data)||void 0===V?void 0:V.align)||"",k=(null===(F=null==O?void 0:O.data)||void 0===F?void 0:F.value)||"",w=(null===(R=null==O?void 0:O.data)||void 0===R?void 0:R.align)||"",E=(null===(U=null==I?void 0:I.data)||void 0===U?void 0:U.value)||"",N=(null===(W=null==I?void 0:I.data)||void 0===W?void 0:W.newtab)||!1,C=(null===(J=null==I?void 0:I.data)||void 0===J?void 0:J.url)||"",A=y.extra_fields.currentLayout,["SkinA","SkinB","Floating","Tab","CenterTab"].includes(A)&&(b=!1)),T(b?{title:v,titleAlign:_,subtitle:k,subtitleAlign:w,link:C,linkNewTab:N,linkText:E,image:f}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},c.map((function(e){var n=e.name,t=e.value;"tel"==n?window.insider_object.user.phone_number=t:"email"==n&&(window.insider_object.user.email=t)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object)),[2])}}))}))},action:N,showThankyou:B})),f())))};export{Q as LeadGen};
@@ -1,5 +1,5 @@
1
1
  import { FormEvent } from 'react';
2
- export declare const LeadCampaign: ({ campaign, action, onSubmit, onClose, }: {
2
+ export declare const LeadCampaign: ({ campaign, action, onSubmit, onClose, showThankyou, }: {
3
3
  campaign: any;
4
4
  action?: string;
5
5
  onSubmit?: (e: FormEvent<HTMLFormElement>, categoryLevel?: number, categoryData?: {
@@ -9,4 +9,14 @@ export declare const LeadCampaign: ({ campaign, action, onSubmit, onClose, }: {
9
9
  };
10
10
  }, popupId?: string) => void;
11
11
  onClose?: () => void;
12
+ showThankyou?: {
13
+ title: string;
14
+ titleAlign?: string;
15
+ subtitle: string;
16
+ subtitleAlign?: string;
17
+ link: string;
18
+ linkNewTab?: boolean;
19
+ linkText: string;
20
+ image?: string;
21
+ };
12
22
  }) => JSX.Element;
@@ -1,13 +1,25 @@
1
1
  import { FormEvent } from 'react';
2
- export declare const LightboxLayout: ({ popupId, extraFields, onClose, onOtherSubmit, imageMobile, imageDesktop, imageBackground, currentLayout, title, onSubmit, }: {
2
+ export declare const LightboxLayout: ({ popupId, extraFields, onClose, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, showThankyou, }: {
3
3
  popupId: string;
4
4
  currentLayout: string;
5
5
  extraFields: any;
6
6
  title?: string;
7
7
  imageMobile?: string;
8
8
  imageDesktop?: string;
9
+ imageOverlayMobile?: string;
10
+ imageOverlayDesktop?: string;
9
11
  imageBackground?: string;
10
12
  onClose?: () => void;
11
13
  onOtherSubmit?: () => void;
12
14
  onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
15
+ showThankyou?: {
16
+ title: string;
17
+ titleAlign?: string;
18
+ subtitle: string;
19
+ subtitleAlign?: string;
20
+ link: string;
21
+ linkNewTab?: boolean;
22
+ linkText: string;
23
+ image?: string;
24
+ };
13
25
  }) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { FormEvent } from 'react';
2
- export declare const NewLeadPopup: ({ campaign, action, onSubmit, onClose, }: {
2
+ export declare const NewLeadPopup: ({ campaign, action, onSubmit, onClose, showThankyou, }: {
3
3
  campaign: any;
4
4
  action?: string;
5
5
  onSubmit?: (e: FormEvent<HTMLFormElement>, categoryLevel?: number, categoryData?: {
@@ -9,4 +9,14 @@ export declare const NewLeadPopup: ({ campaign, action, onSubmit, onClose, }: {
9
9
  };
10
10
  }, popupId?: string) => void;
11
11
  onClose?: () => void;
12
+ showThankyou?: {
13
+ title: string;
14
+ titleAlign?: string;
15
+ subtitle: string;
16
+ subtitleAlign?: string;
17
+ link: string;
18
+ linkNewTab?: boolean;
19
+ linkText: string;
20
+ image?: string;
21
+ };
12
22
  }) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { FormEvent } from 'react';
2
- export declare const OldLeadPopup: ({ campaign, action, onSubmit, onClose, }: {
2
+ export declare const OldLeadPopup: ({ campaign, action, onSubmit, onClose, showThankyou, }: {
3
3
  campaign: any;
4
4
  action?: string;
5
5
  onSubmit?: (e: FormEvent<HTMLFormElement>, categoryLevel?: number, categoryData?: {
@@ -9,4 +9,14 @@ export declare const OldLeadPopup: ({ campaign, action, onSubmit, onClose, }: {
9
9
  };
10
10
  }, popupId?: string) => void;
11
11
  onClose?: () => void;
12
+ showThankyou?: {
13
+ title: string;
14
+ titleAlign?: string;
15
+ subtitle: string;
16
+ subtitleAlign?: string;
17
+ link: string;
18
+ linkNewTab?: boolean;
19
+ linkText: string;
20
+ image?: string;
21
+ };
12
22
  }) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const LeadStyle: () => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const ThankyouPopup: ({ title, titleAlign, subtitle, subtitleAlign, link, linkNewTab, linkText, image, onClose, }: {
2
+ export declare const ThankyouPopup: ({ title, titleAlign, subtitle, subtitleAlign, link, linkNewTab, linkText, image, }: {
3
3
  title: string;
4
4
  titleAlign?: string;
5
5
  subtitle: string;
@@ -8,5 +8,4 @@ export declare const ThankyouPopup: ({ title, titleAlign, subtitle, subtitleAlig
8
8
  linkNewTab?: boolean;
9
9
  linkText: string;
10
10
  image?: string;
11
- onClose?: () => void;
12
11
  }) => JSX.Element;
package/build/lead.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("./tslib.es6-e6f346c4.js"),e=require("react"),t=require("lodash/debounce"),a=require("react-dom"),o=require("./translationsContext-9e231a88.js"),l=require("./cookieHelper-3553173d.js"),i=require("./utils-43f2c752.js"),r=require("uuid"),d=require("./useTranslations-00120db0.js");require("dayjs"),require("./screenSizeContext-00584173.js"),require("./lazyLoad-f5c59bb0.js");var c=require("styled-components");function s(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}require("./index-04b29b8d.js"),require("./isProduction-32e6a55a.js"),require("./Locale-11b51016.js"),require("./gAssets.js"),require("string-format"),require("lodash/throttle"),require("vanilla-lazyload");var m=s(e),p=s(t),u=s(c),f=function(n){var e=n.onClose,t=n.containerClassName,a=n.svgClassName;return m.default.createElement("button",{onClick:e,className:"le-newbuilder-close-button js-modal__close ".concat(t||"")},m.default.createElement("svg",{className:"le-newbuilder-close-svg ".concat(a||""),xmlns:"http://www.w3.org/2000/svg",width:"53",height:"53",viewBox:"0 0 53 53"},m.default.createElement("defs",null,m.default.createElement("filter",{width:"53",height:"53",filterUnits:"userSpaceOnUse"},m.default.createElement("feGaussianBlur",{result:"blur",stdDeviation:"3"}),m.default.createElement("feFlood",{floodOpacity:".4"}),m.default.createElement("feComposite",{in2:"blur",operator:"in"}),m.default.createElement("feComposite",{in:"SourceGraphic"})),m.default.createElement("style",{dangerouslySetInnerHTML:{__html:".cls-2{fill:none;stroke:#fff;stroke-linecap:round;stroke-width:2px}"}})),m.default.createElement("g",{filter:"url(#Ellipse_482)"},m.default.createElement("circle",{cx:"17.5",cy:"17.5",r:"17.5",transform:"translate(-483.1 -671.163)translate(483.1 671.16)translate(9 9)",fill:"#005cfd"})),m.default.createElement("path",{d:"M19 19L34 34",className:"cls-2"}),m.default.createElement("path",{d:"M34 19L19 34",className:"cls-2"})))},h=function(n){var e=n.popupId,t=n.url,a=n.newTab,o=n.imageDestkop,l=n.imageMobile,i=n.onClose,r=n.onOtherSubmit;return m.default.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},m.default.createElement("div",{className:"le-center-tab-popup"},m.default.createElement("div",{style:{position:"relative"}},m.default.createElement("a",{className:"js-popup-other-submit",href:t,target:a?"blank":"_parent",onClick:r},m.default.createElement("img",{className:"le-only-mobile",src:l}),m.default.createElement("img",{className:"le-only-desktop",src:o})),m.default.createElement(f,{onClose:i,containerClassName:"le-abs-outer-mobile-top-right-2",svgClassName:"le-mobile-btn"}))))},g=function(n){var e=n.popupId,t=n.url,a=n.title,o=n.urlText,l=n.titleAlign,i=n.subtitle,r=n.subtitleAlign,d=n.newTab,c=n.imageDesktop,s=n.imageMobile,p=n.onClose,u=n.onOtherSubmit;return m.default.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},m.default.createElement("aside",{className:"le-only-desktop"},m.default.createElement("div",{className:"le-floating-desktop"},m.default.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},c?m.default.createElement("div",null,m.default.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:c})):null,m.default.createElement("div",{style:{padding:20}},m.default.createElement("div",{className:"le-floating-desktop-title le-text-align-".concat(l)},a),m.default.createElement("div",{className:"le-floating-desktop-desc le-text-align-".concat(r)},i)),m.default.createElement("a",{target:d?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},m.default.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},o)),m.default.createElement(f,{onClose:p,containerClassName:"le-abs-outer-top-right"})))),m.default.createElement("aside",{className:"le-only-mobile"},m.default.createElement("div",{className:"le-floating-mobile"},m.default.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},m.default.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},m.default.createElement("div",null,m.default.createElement("div",{className:"le-floating-mobile-title le-text-align-".concat(l)},a),m.default.createElement("div",{className:"le-floating-mobile-desc le-text-align-".concat(r)},i)),s?m.default.createElement("div",null,m.default.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:s})):null),m.default.createElement("div",{style:{textAlign:"center",marginTop:10}},m.default.createElement("a",{target:d?"blank":"_parent",href:t,style:{textDecoration:"none"}},m.default.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},o))),m.default.createElement(f,{onClose:p,containerClassName:"le-abs-outer-top-right",svgClassName:"le-mobile-btn"})))))},b=1,x=2,_="https://dev.leadgen.hellobacsi.com/",k=1,v=2,w="";_.includes("localhost")&&(_="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(w="pink");var y="https://"+location.hostname+location.pathname+location.search;y=y.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));var E={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},C=E[document.documentElement.lang]||E["vi-VN"];var N=e.createContext({}),B=function(n){var t=n.content,o=n.inlinePosition,l=e.useMemo((function(){var n;if(!o)return null;var e=document.querySelector('[data-url="'.concat(location.pathname,'"] .body-content'));if(null===(n=null==e?void 0:e.childNodes)||void 0===n?void 0:n.length){var t=e.querySelectorAll("p"),a=e.querySelectorAll("h2"),l=null;switch(o){case"1th":l=t[0];break;case"2th":l=t[1];break;case"3th":l=t[2];break;case"4th":l=t[3];break;case"5th":l=t[4];break;case"6th":l=t[5];break;case"7th":l=t[6];break;case"8th":l=t[7];break;case"9th":l=t[8];break;case"10th":l=t[9];break;case"11th":l=t[10];break;case"12th":l=t[11];break;case"lastP":l=t[t.length-1];break;case"1thH2":l=a[0];break;case"2thH2":l=a[1];break;case"3thH2":l=a[2];break;case"4thH2":l=a[3];break;case"5thH2":l=a[4];break;case"6thH2":l=a[5];break;case"7thH2":l=a[6];break;case"8thH2":l=a[7];break;case"9thH2":l=a[8];break;case"10thH2":l=a[9];break;case"lastH2":l=a[a.length-1]}if(l){var i=document.createElement("div");return i.classList.add("inline-lead-wrapper"),l.nextElementSibling?e.insertBefore(i,l.nextElementSibling):e.appendChild(i),i}}}),[o]);return o&&l?a.createPortal(t,l):null},S=function(n){var t=n.content,o=e.useMemo((function(){var n=[];return document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar").forEach((function(e){return n.push(e)})),n}),[]);return m.default.createElement(m.default.Fragment,null,o.map((function(n){return a.createPortal(t,i.getWrapperDomWithSelector(n,"sidebar-lead-modal-wrapper"))})))},T=function(t){var a,o,l,i=t.popupId,r=t.extraFields,c=t.onClose,s=t.onOtherSubmit,p=t.imageMobile,u=t.imageDesktop,f=t.imageBackground,h=t.currentLayout,g=t.title,b=t.onSubmit,x=d.useTranslations().t,_=JSON.parse(r.listBlockAdded),k=JSON.parse(r.actionBlocks),v=JSON.parse(r.textBlocks),y=e.useContext(N).apiUrl,E=k.submitBlock.data.url,T=k.submitBlock.data.text,j=k.submitBlock.data.text2,z=k.submitBlock.data.value,L=location.pathname,O=h.includes("Inline")||"Sidebar"===h,P="Slider"===h,q=e.useState(!0),I=q[0],A=q[1];if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;e.useEffect((function(){(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll")}),[]);var D=function(e,t){return n.__awaiter(void 0,void 0,void 0,(function(){return n.__generator(this,(function(n){switch(n.label){case 0:return t.target.validity.valueMissing?(t.target.setCustomValidity(x("validator.required")),[3,5]):[3,1];case 1:return t.target.validity.valid||t.target.validity.customError?[3,2]:("tel"===e?t.target.setCustomValidity(x("validator.phone")):"date"===e?t.target.setCustomValidity(x("validator.date")):"email"===e&&t.target.setCustomValidity(x("validator.email")),[3,5]);case 2:return"tel"!==e?[3,4]:[4,require("intl-tel-input")];case 3:return n.sent().isValidNumber(String(t.target.value),C.countryCode)?t.target.setCustomValidity(""):t.target.setCustomValidity(x("validator.phone")),[3,5];case 4:t.target.setCustomValidity(""),n.label=5;case 5:return[2]}}))}))},M=e.useMemo((function(){var n={TextBlock:0,NumberBlock:0,EmailBlock:0,PhoneBlock:0,DateBlock:0,CheckboxBlock:0,RadioBlock:0};return _.map((function(e,t){var a,o;if("TitleBlock"==e.name)return m.default.createElement("h2",{key:t,className:"lead-modal__title ".concat("le-text-align-"+((null===(a=e.data)||void 0===a?void 0:a.align)||"")," ").concat(w)},e.data.value);if("SubtitleBlock"==e.name)return m.default.createElement("p",{key:t,className:"lead-modal__description ".concat("le-text-align-"+((null===(o=e.data)||void 0===o?void 0:o.align)||"")," ").concat(w)},e.data.value);if("TextBlock"==e.name)return n.TextBlock+=1,m.default.createElement("div",{key:t},m.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},m.default.createElement("input",{required:!0,"data-key":e.data.value,name:"text"+(n.TextBlock>1?n.TextBlock:""),spellCheck:!1,type:"text",placeholder:e.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(n){return D("text",n)}}),m.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(y,"admin/img/builder/text.svg")})));if("NumberBlock"==e.name){var l=m.default.createElement("div",{key:t},m.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},m.default.createElement("input",{required:!0,"data-key":e.data.value,name:"number"+(n.NumberBlock?n.NumberBlock:""),spellCheck:!1,type:"number",min:"0",placeholder:e.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(n){return D("number",n)}}),m.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(y,"admin/img/builder/number.svg")})));return n.NumberBlock+=1,l}if("EmailBlock"==e.name){l=m.default.createElement("div",{key:t},m.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},m.default.createElement("input",{required:!0,"data-key":e.data.value,name:"email"+(n.EmailBlock?n.EmailBlock:""),spellCheck:!1,type:"email",placeholder:e.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(n){return D("email",n)}}),m.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(y,"admin/img/builder/email.svg")})));return n.EmailBlock+=1,l}if("PhoneBlock"==e.name){l=m.default.createElement("div",{key:t},m.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},m.default.createElement("input",{required:!0,"data-key":e.data.value,name:"tel"+(n.PhoneBlock?n.PhoneBlock:""),spellCheck:!1,type:"tel",placeholder:e.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(n){return D("tel",n)}}),m.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(y,"admin/img/builder/tel.svg")})));return n.PhoneBlock+=1,l}if("DateBlock"==e.name){l=m.default.createElement("div",null,m.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},m.default.createElement("input",{required:!0,type:"date","data-key":e.data.value,name:"date"+(n.DateBlock?n.DateBlock:""),placeholder:e.data.placeholder,onClick:function(n){n.currentTarget.classList.remove("placeholderclass")},onBlur:function(n){n.currentTarget.value||n.currentTarget.classList.add("placeholderclass")},className:"dateclass placeholderclass lead-modal__form-control width-100%",onChange:function(n){return D("date",n)}}),m.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(y,"admin/img/builder/date.svg")})));return n.DateBlock+=1,l}if("LinkButtonBlock"==e.name)return m.default.createElement("div",{key:t},m.default.createElement("a",{target:e.data.newtab?"blank":"parrent",href:e.data.url,style:{textDecoration:"none"}},m.default.createElement("button",{type:"button",className:"lead-modal__btn js-modal__close js-popup-other-submit ".concat(w),onClick:function(){null==c||c(),null==s||s()}},e.data.value)));if("CheckboxBlock"==e.name){var i=e.data,r=i.listQuestion,d=i.isSendMailChimp,p=void 0!==d&&d;l=m.default.createElement("div",{key:t,style:{margin:"5px 0"}},m.default.createElement("div",{className:"le-checkbox-title"},e.data.placeholder),m.default.createElement("div",{className:"mailchimp-".concat(e.data.value),"data-mailchimp":p}),r.map((function(t,a){return m.default.createElement("label",{key:a,className:"lead-checkbox-container"},m.default.createElement("input",{"data-key":e.data.value,name:"checkbox"+(n.CheckboxBlock?n.CheckboxBlock:"")+"[]",value:t.value,type:"checkbox",onChange:function(n){return D("checkbox",n)}}),m.default.createElement("span",{className:"lead-checkbox-checkmark"}),"$",t.placeholder)})));return n.CheckboxBlock+=1,l}if("RadioBlock"==e.name){r=e.data.listQuestion,l=m.default.createElement("div",{key:t,style:{margin:"5px 0"}},m.default.createElement("div",{className:"le-checkbox-title"},e.data.placeholder),r.map((function(t,a){return m.default.createElement("label",{className:"lead-radio-container",key:a},m.default.createElement("input",{"data-key":e.data.value,name:"radio"+(n.RadioBlock?n.RadioBlock:""),value:t.value,type:"radio",onChange:function(n){return D("radio",n)}}),m.default.createElement("span",{className:"lead-radio-checkmark"}),t.placeholder)})));return n.RadioBlock+=1,l}if("DropdownBlock"==e.name){r=e.data.listQuestion,l=m.default.createElement("div",{key:t,style:{margin:"5px 0"}},m.default.createElement("div",{className:"le-checkbox-title"},e.data.placeholder),m.default.createElement("div",{className:"le-newbuilder-select-wrapper"},m.default.createElement("select",{className:"le-newbuilder-select","data-key":e.data.value,name:"dropdown"+(n.DropdownBlock?n.DropdownBlock:"")},r.forEach((function(n,e){return m.default.createElement("option",{key:e,value:n.value},n.placeholder)})))));return n.DropdownBlock+=1,l}}))}),[]),H=m.default.createElement(m.default.Fragment,null,m.default.createElement("style",{dangerouslySetInnerHTML:{__html:".le-newbuilder-overlay {\n background: url(".concat(p,") ;\n background-repeat: no-repeat;\n background-size: cover;\n }\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(").concat(u,") ;\n background-repeat: no-repeat;\n background-size: cover;\n }\n }")}}),m.default.createElement("div",{id:i,"data-popup-url":L,"data-popup-type":"lightbox-inline",className:"lead-modal lead-modal-wrapper modal--animate-scale ".concat(O?"le-buider-inline":""," ").concat(P?"le-buider-slider":"")},"Fullscreen"==h?m.default.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:f||""}):null,m.default.createElement("div",{className:"lead-modal__wrapper le-newbuilder-wrap-".concat(h)},m.default.createElement("div",{className:"lead-modal__content le-newbuilder-".concat(h)},m.default.createElement("header",{className:"lead-modal__header"},["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?p?m.default.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:p,alt:""}):null:m.default.createElement(m.default.Fragment,null,u?m.default.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:u,alt:""}):null,p?m.default.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:p,alt:""}):null)),m.default.createElement("div",{className:"lead-modal__body le-newbuilder-overlay"},m.default.createElement("form",{className:"lead-modal__form ".concat(i),onSubmit:b},m.default.createElement("div",{style:{marginBottom:20}},m.default.createElement("h2",{className:"lead-modal__title ".concat("le-text-align-"+(null===(a=v.titleBlock.data)||void 0===a?void 0:a.align)," ").concat(w)},g),m.default.createElement("p",{className:"lead-modal__description ".concat("le-text-align-"+(null===(o=v.titleBlock.data)||void 0===o?void 0:o.align)," ").concat(w)},v.subtitleBlock.data.value)),m.default.createElement("div",null,M),(null===(l=null==k?void 0:k.submitBlock)||void 0===l?void 0:l.isHide)?null:m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:"lead-modal__checkbox-wrapper ".concat(w)},m.default.createElement("div",{className:"lead-modal__checkbox"},m.default.createElement("input",{id:"lead-term-checkbox",className:"lead-modal__checkbox__input ".concat(w),type:"checkbox","aria-label":"Checkbox label",checked:I,onChange:function(n){return A(n.currentTarget.checked)}}),m.default.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),m.default.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},T," ",m.default.createElement("span",{style:{fontWeight:"bold"}},m.default.createElement("a",{target:"blank",href:E||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},j)))),m.default.createElement("button",{id:"lead-submit",type:"submit",className:"lead-modal__btn ".concat(w),disabled:!I}," ",z))))),m.default.createElement("button",{className:"lead-modal__close-btn ".concat("Fullscreen"==h?"lead-fullscreen-desktop-close-btn":""," js-modal__close ").concat(w),onClick:c},m.default.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},m.default.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},m.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),m.default.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"})))))));return h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?H:"Sidebar"==h?m.default.createElement(S,{content:H}):h.includes("Inline")?m.default.createElement(B,{content:H,inlinePosition:r.popupInlinePosition}):null},j=function(n){var e=n.popupId,t=n.link,a=n.linkText,o=n.linkNewTab,l=n.onClose,i=n.imageMobile,r=n.imageDesktop,d=n.currentLayout,c=n.onOtherSubmit,s=location.pathname;return m.default.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":s,"data-popup-type":"skin_ab"},"SkinA"==d?m.default.createElement("aside",{className:"le-only-desktop"},m.default.createElement("div",{className:"le-skin-a-desktop"},m.default.createElement("div",{style:{position:"relative"}},m.default.createElement("img",{src:r}),m.default.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:o?"blank":"_parent"},m.default.createElement("button",{onClick:c,className:"le-joinbow-btn js-popup-other-submit"},a)),m.default.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(w)},m.default.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},m.default.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},m.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),m.default.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))):"SkinB"==d?m.default.createElement("aside",{className:"le-only-desktop"},m.default.createElement("div",{className:""},m.default.createElement("div",{style:{position:"relative",zIndex:1e4}},m.default.createElement("img",{src:r,style:{width:"100%"}}),m.default.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:o?"blank":"_parent"},m.default.createElement("button",{onClick:c,className:"le-joinbow-btn-mobile js-popup-other-submit"},a)),m.default.createElement(f,{containerClassName:"le-abs-top-right",onClose:l})))):null,m.default.createElement("aside",{className:"le-only-mobile"},m.default.createElement("div",{className:"le-skin-mobile"},m.default.createElement("div",{style:{position:"relative"}},m.default.createElement("img",{src:i,style:{width:"100%"}}),m.default.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:o?"blank":"_parent"},m.default.createElement("button",{onClick:c,className:"le-joinbow-btn-mobile js-popup-other-submit"},a)),m.default.createElement(f,{containerClassName:"le-abs-top-right",svgClassName:"le-mobile-btn",onClose:l})))))},z=function(n){var e=n.popupId,t=n.url,a=n.newTab,o=n.image,l=n.onClose,i=n.onOtherSubmit;return m.default.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},m.default.createElement("div",{className:"le-tab-popup"},m.default.createElement("div",{style:{position:"relative"}},m.default.createElement("a",{href:t,target:a?"blank":"_parent",onClick:i},m.default.createElement("img",{className:"js-popup-other-submit",src:o})),m.default.createElement(f,{onClose:l,containerClassName:"le-abs-outer-mobile-top-right-2",svgClassName:"le-mobile-btn"}))))};var L,O=function(n){var t,a,o=n.campaign,i=n.action,c=n.onSubmit,s=n.onClose;d.useTranslations().t;var p=e.useContext(N),u=p.apiUrl,f=p.siteDomain;e.useEffect((function(){var n=l.getCookie("_ga")||null;fetch("".concat(u,"api/campaign/").concat(k,"/impression"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:i,url:location.href.toLowerCase(),title_article:document.title,cookie_id:l.getCookie("hhg-id"),ga_client_id:n})})}),[]);var b=o.extra_fields,x=o.image,_=o.image_desktop,k=o.code,v=o.image_background,w=b.currentLayout,y=b.imageBlocks?JSON.parse(b.imageBlocks):{},E=JSON.parse(b.actionBlocks),C=JSON.parse(b.textBlocks),B=(null===(a=null===(t=null==C?void 0:C.titleBlock)||void 0===t?void 0:t.data)||void 0===a?void 0:a.value)||"",S={1:{},2:{},3:{}},L=e.useRef("lead-modal-"+r.v1()),O=function(n){if(void 0===n&&(n="Xin chao {{category_2}} extra"),n.includes("{{category_")){var e="{{category_".length,t=n.search("{{category_");return+n.charAt(e+t)}return null}(B);if(O){console.log("⚡️ Has categoryLevel",O);var P=Array.from(document.getElementsByTagName("META")),q=P.find((function(n){return n.name==="content_category_".concat(O)})),I=P.find((function(n){return n.name==="content_category_en_".concat(O)}));if(!q||!I)return console.log("⚡️ No META TAG for categoryLevel, not show popup",O),null;S[O]={value:q.content,value_en:I.content},B=B.replace("{{category_".concat(O,"}}"),q.content),console.log("⚡️ Set categoryData ",O)}else console.log("⚡️ No categoryLevel",O);var A=function(){var n,e,t,a;if(console.log("👌 Other submit click"),document.body.classList.remove("noscroll"),w.includes("Skin")){var i=document.querySelector("#masthead");i&&(i.style.top="0px !important;")}var r=Number(null!==(e=null===(n=o.rules.find((function(n){return"days_to_show_again"==n.rule})))||void 0===n?void 0:n.value)&&void 0!==e?e:7),d=Number(null!==(a=null===(t=o.rules.find((function(n){return"show_again_after_submit"==n.rule})))||void 0===t?void 0:t.value)&&void 0!==a?a:0);0===d&&(console.log("⛔ Popup never show again!"),l.setCookie("lead_submited_".concat(k),"target_".concat(b.popupVersion),{domain:"."+f,path:"/"})),1==d&&(console.log("⌛ Popup will show again after ".concat(r," days!")),l.setCookie("lead_submited_".concat(k),"target_".concat(b.popupVersion),{domain:"."+f,days:r,path:"/"}));var c=l.getCookie("_ga")||null,m={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:l.getCookie("hhg-id"),ga_client_id:c};O&&(m.category=S[O].value_en),fetch("".concat(u,"api/campaign/").concat(k,"/lead"),{method:"POST",body:JSON.stringify(m),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((function(n){return n.json()})).then((function(n){"error"===n.status&&console.log(n)})).catch((function(n){console.error("Error:",n)})),null==s||s()};return"CenterTab"===w?m.default.createElement(h,{popupId:L.current,url:y.imageMobile.data.url,newTab:y.imageMobile.data.newtab,imageMobile:x,imageDestkop:_,onClose:s,onOtherSubmit:A}):"Tab"===w?m.default.createElement(z,{popupId:L.current,url:y.imageMobile.data.url,newTab:y.imageMobile.data.newtab,image:x,onClose:s,onOtherSubmit:A}):"Floating"===w?m.default.createElement(g,{popupId:L.current,title:B,titleAlign:C.titleBlock.data.align,subtitle:C.subtitleBlock.data.value,subtitleAlign:C.subtitleBlock.data.align,url:E.linkButtonBlock.data.url,urlText:E.linkButtonBlock.data.value,newTab:E.linkButtonBlock.data.newtab,imageMobile:x,imageDesktop:_,onClose:s,onOtherSubmit:A}):w.includes("LightBox")||w.includes("Inline")||"Fullscreen"==w||"Sidebar"==w||"Slider"==w?m.default.createElement(T,{popupId:L.current,extraFields:b,onClose:s,onOtherSubmit:A,imageMobile:x,imageDesktop:_,imageBackground:v,currentLayout:w,title:B,onSubmit:function(n){return c(n,O,S,L.current)},key:w}):w.includes("Skin")?m.default.createElement(j,{popupId:L.current,link:E.linkButtonBlock.data.url,linkNewTab:!!E.linkButtonBlock.data.newtab,linkText:E.linkButtonBlock.data.value,onClose:s,onOtherSubmit:A,imageMobile:x,imageDesktop:_,currentLayout:w}):null},P=function(t){var a=t.campaign,o=t.action,i=t.onSubmit,r=t.onClose,c=d.useTranslations().t,s=e.useState(!0),p=s[0],u=s[1];e.useEffect((function(){document.body.classList.add("noscroll");var n=l.getCookie("_ga")||null;fetch("".concat(E,"api/campaign/").concat(g,"/impression"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:o||"",url:location.href.toLowerCase(),title_article:document.title,cookie_id:l.getCookie("hhg-id"),ga_client_id:n})})}),[]);var f=a.extra_fields,h=a.image,g=a.code,b=f.title,x=f.desc,_=f.submit,k=f.popUpTermURL,v=f.popUpTermAgreeText,y=f.popUpTermText,E=e.useContext(N).apiUrl,B=f.fields?JSON.parse(f.fields):[],S={tel:0,text:0,date:0,email:0},T=function(e,t){return n.__awaiter(void 0,void 0,void 0,(function(){return n.__generator(this,(function(n){switch(n.label){case 0:return t.target.validity.valueMissing?(t.target.setCustomValidity(c("validator.required")),[3,5]):[3,1];case 1:return t.target.validity.valid||t.target.validity.customError?[3,2]:("tel"===e?t.target.setCustomValidity(c("validator.phone")):"date"===e?t.target.setCustomValidity(c("validator.date")):"email"===e&&t.target.setCustomValidity(c("validator.email")),[3,5]);case 2:return"tel"!==e?[3,4]:[4,require("intl-tel-input")];case 3:return n.sent().isValidNumber(String(t.target.value),C.countryCode)?t.target.setCustomValidity(""):t.target.setCustomValidity(c("validator.phone")),[3,5];case 4:t.target.setCustomValidity(""),n.label=5;case 5:return[2]}}))}))},j=B.map((function(n,e){var t=m.default.createElement(m.default.Fragment,null);return t="date"==n.control?m.default.createElement("div",{key:e,className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},m.default.createElement("input",{required:!0,type:"date","data-key":n.listEdit[0].value,name:S.date?n.control+S.date:n.control,placeholder:n.listEdit[1].value||"...",onClick:function(n){return n.currentTarget.classList.remove("placeholderclass")},onBlur:function(n){return!n.currentTarget.value&&n.currentTarget.classList.add("placeholderclass")},className:"dateclass placeholderclass lead-modal__form-control width-100%",onChange:function(e){return T(n.control,e)}}),m.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(E,"admin/img/builder/").concat(n.name,".svg")})):m.default.createElement("div",{key:e,className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},m.default.createElement("input",{required:!0,"data-key":n.listEdit[0].value,name:S[n.control]?n.control+S[n.control]:n.control,spellCheck:!1,type:n.control,placeholder:n.listEdit[1].value||"...",className:"lead-modal__form-control width-100%",onChange:function(e){return T(n.control,e)}}),m.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(E,"admin/img/builder/").concat(n.name,".svg")})),"date"==n.control&&(S.date+=1),"text"==n.control&&(S.text+=1),"tel"==n.control&&(S.tel+=1),"email"==n.control&&(S.email+=1),t}));return m.default.createElement("div",{id:"lead-modal",className:"lead-modal modal--animate-scale"},m.default.createElement("div",{className:"lead-modal__wrapper animate__animated "},m.default.createElement("div",{className:"lead-modal__content"},m.default.createElement("header",{className:"lead-modal__header"},!!h&&m.default.createElement("img",{className:"lead-modal__image lead-modal-image-cover",src:h,alt:""})),m.default.createElement("div",{className:"lead-modal__body"},m.default.createElement("h2",{className:"lead-modal__title ".concat(w)},b),m.default.createElement("p",{className:"lead-modal__description ".concat(w)},x),m.default.createElement("form",{className:"lead-modal__form",onSubmit:function(n){n.preventDefault(),i(n)}},j,m.default.createElement("div",{className:"lead-modal__checkbox-wrapper ".concat(w)},m.default.createElement("div",{className:"lead-modal__checkbox"},m.default.createElement("input",{id:"lead-term-checkbox",className:"lead-modal__checkbox__input ".concat(w),type:"checkbox","aria-label":"Checkbox label",checked:p,onChange:function(n){return u(n.currentTarget.checked)}}),m.default.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),m.default.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},v," ",m.default.createElement("span",{style:{fontWeight:"bold"}},m.default.createElement("a",{target:"blank",href:k||"https://hellobacsi.com/chinh-sach",style:{textDecoration:"none"},rel:"noopener noreferrer"},y)))),m.default.createElement("button",{id:"lead-submit",type:"submit",className:"lead-modal__btn ".concat(w),disabled:!p},_)))),m.default.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(w),onClick:r},m.default.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},m.default.createElement("title",null,"Close modal window"),m.default.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},m.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),m.default.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))},q=function(n){var e=n.campaign,t=n.action,a=n.onSubmit,o=n.onClose;return e.extra_fields?"2.1"==e.extra_fields.popupVersion?m.default.createElement(O,{campaign:e,action:t,onSubmit:a,onClose:o}):m.default.createElement(P,{campaign:e,action:t,onSubmit:a,onClose:o}):null},I={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}."},A={"en-PH":I,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah."},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง"},"tl-PH":I},D=function(n){var e=A[n];return e||A["en-PH"]},M=u.default.div(L||(L=n.__makeTemplateObject(["\n /* lead-modal : start */\n .lead-modal {\n font-family: 'Open sans', sans-serif !important;\n position: fixed;\n z-index: 99999;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n opacity: 1;\n visibility: visible;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n padding: 10px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n white-space: normal !important;\n }\n\n .lead-modal__wrapper {\n position: relative;\n width: 100%;\n max-width: 450px;\n background-color: #fff;\n border-radius: 6px;\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n }\n\n .lead-modal__content {\n width: inherit;\n overflow: auto;\n /* min-height: 400px; */\n max-height: calc(100vh - 125px);\n -webkit-overflow-scrolling: touch;\n }\n\n .lead-modal__header {\n padding: 0px 0px;\n }\n\n .lead-modal__image {\n display: block;\n margin: 0 auto;\n border: none !important;\n box-shadow: none !important;\n }\n .lead-modal-image-logo {\n margin-top: 15px;\n margin-bottom: 15px;\n }\n\n .lead-modal-image-cover {\n width: 100% !important;\n padding: 0 0px;\n border-top-left-radius: 4px;\n border: none !important;\n box-shadow: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n /* margin-top: 10px; */\n /* border-radius: 4px; */\n }\n\n .lead-modal__body {\n font-family: 'Open sans', sans-serif !important;\n padding: 15px 15px 25px 15px;\n }\n\n .lead-modal__title {\n font-family: 'Open sans', sans-serif !important;\n font-size: 20px !important;\n font-weight: bold !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.3 !important;\n letter-spacing: -0.4px !important;\n color: #2a4975 !important;\n box-shadow: none !important;\n padding-bottom: 0 !important;\n }\n\n .lead-modal__title.pink {\n color: #2661ad !important;\n }\n\n .lead-modal__description {\n font-family: 'Open sans', sans-serif !important;\n font-size: 13px !important;\n font-weight: normal !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.62 !important;\n letter-spacing: 0.14px !important;\n color: #2c87f3 !important;\n margin-top: 10px !important;\n }\n\n .lead-modal__description.pink {\n color: #3e3f58 !important;\n }\n\n .lead-modal__form-control-wrapper {\n margin-top: 10px;\n margin-left: 0px !important;\n position: relative;\n }\n\n .lead-modal__form-control {\n box-shadow: none !important;\n height: 40px !important;\n width: 100%;\n padding-left: calc(15px + 1.5em + 15px) !important;\n background-color: #fff !important;\n padding-top: 10px !important;\n padding-bottom: 10px !important;\n padding-right: 15px !important;\n border: solid 1px #dddddd !important;\n color: #2a4975 !important;\n line-height: 1.7em !important;\n border-radius: 0 !important;\n font-family: 'Open Sans', sans-serif !important;\n background-image: linear-gradient(transparent, transparent) !important;\n margin-left: 0px !important;\n font-size: 14px !important;\n line-height: 14px !important;\n }\n\n .lead-modal__form-control {\n &:focus {\n border-color: var(--color-primary);\n box-shadow: 0px 0px 0px 3px rgba(44, 135, 243, 0.1);\n outline: none;\n }\n\n &::-webkit-input-placeholder {\n /* Chrome, Firefox, Opera, Safari 10.1+ */\n color: #b5b5b5;\n }\n\n &::-moz-placeholder {\n color: #b5b5b5;\n }\n\n &:-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::placeholder {\n color: #b5b5b5;\n }\n }\n\n img.lead-modal__form-control-icon {\n display: inline-block !important;\n color: #b5b5b5 !important;\n fill: #b5b5b5 !important;\n line-height: 1 !important;\n flex-shrink: 0 !important;\n max-width: initial !important;\n display: block !important;\n position: absolute !important;\n pointer-events: none !important;\n left: 15px !important;\n top: 10px !important;\n height: 20px !important;\n width: 20px !important;\n border: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__checkbox-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n align-items: center;\n margin-top: 15px;\n a {\n color: #2c87f3 !important;\n text-decoration: none !important;\n }\n\n a:visited {\n color: #2c87f3 !important;\n }\n &.pink a,\n &.pink a:visited {\n color: #e55c8a !important;\n }\n }\n\n .lead-modal__checkbox {\n position: relative;\n z-index: 1;\n display: inline-block;\n font-size: 20px;\n }\n\n .lead-modal__checkbox__input {\n position: relative;\n margin: 0 !important;\n padding: 0;\n opacity: 0;\n height: 1em !important;\n width: 1em !important;\n display: block;\n z-index: 1;\n font-size: 1em !important;\n }\n\n .lead-modal__checkbox__control {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: -1;\n pointer-events: none;\n transition: transform 0.2s;\n color: #dddddd;\n &::before,\n &::after {\n content: '';\n position: absolute;\n }\n\n &::before {\n width: 120%;\n height: 120%;\n background-color: currentColor;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n opacity: 0;\n border-radius: 50%;\n will-change: transform;\n transition: transform 0.2s;\n }\n\n &::after {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #fff;\n border-radius: 6px;\n -webkit-box-shadow: inset 0 0 0 1px #dddddd;\n box-shadow: inset 0 0 0 1px #dddddd;\n }\n\n &:focus::after {\n box-shadow: inset 0 0 0 1px #2c87f3;\n }\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-color: currentColor;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 18px;\n box-shadow: none;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control {\n color: #2c87f3;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5 8 6.5 12 13.5 3' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:indeterminate ~ .lead-modal__checkbox__control {\n color: var(--custom-checkbox-color-disabled);\n }\n\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cline x1='2' y1='8' x2='14' y2='8' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:active ~ .lead-modal__checkbox__control {\n transform: scale(0.9);\n }\n\n .lead-modal__checkbox__input:checked:active ~ .lead-modal__checkbox__control,\n .lead-modal__checkbox__input:indeterminate:active\n ~ .lead-modal__checkbox__control {\n transform: scale(1);\n }\n\n .lead-modal__checkbox__input:focus ~ .lead-modal__checkbox__control::before {\n opacity: 0.2;\n transform: translate(-50%, -50%) scale(1);\n }\n\n .lead-modal__checkbox__input.pink ~ .lead-modal__checkbox__control::after {\n border-radius: 50% !important;\n }\n\n .lead-modal__checkbox__input.pink:checked ~ .lead-modal__checkbox__control {\n color: #2661ad;\n }\n\n .lead-modal__checkbox__input.pink:checked\n ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input.pink:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-size: 12px;\n }\n\n .lead-modal__checkbox__label {\n /* font-family: OpenSans; */\n font-size: 13px;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: 0.14px;\n color: #969696;\n margin-left: 10px;\n margin-bottom: 0 !important;\n }\n\n .lead-modal__btn {\n display: block;\n width: 100%;\n border: none;\n color: #fff;\n padding: 12px 10px;\n font-weight: 700;\n text-align: center;\n margin-top: 15px;\n border-radius: 4px;\n background-color: #2699fb;\n transition: all 0.2s ease-in-out;\n text-shadow: none !important;\n box-shadow: none !important;\n font-family: 'Open sans', sans-serif !important;\n font-size: 14px;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #e55c8a;\n }\n\n &.pink:hover {\n background-color: #b4466a;\n }\n }\n\n .lead-modal__close-btn {\n position: absolute;\n padding-top: 5px;\n top: -15px;\n right: -10px;\n width: 35px;\n height: 35px;\n box-shadow: -2px 4px 4px 0 rgba(191, 191, 191, 0.44) !important;\n text-shadow: none !important;\n background-color: #005cfd;\n border-radius: 50%;\n line-height: inherit;\n appearance: none;\n border: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease-in-out;\n outline: none;\n z-index: 1;\n padding: 5px 13px !important;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #fff;\n }\n\n &.pink .lead-modal__close-icon {\n color: #000;\n }\n\n &.pink:hover .lead-modal__close-icon {\n color: #e55c8a;\n transition: 0.3s all ease;\n }\n }\n\n .lead-modal__close-icon {\n display: inline-block;\n color: #fff;\n fill: #fff;\n height: 1em;\n width: 1em;\n line-height: 1;\n flex-shrink: 0;\n max-width: initial;\n transition: 0.3s all ease;\n }\n\n .lead-modal__thank-you {\n padding: 0 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n height: inherit;\n text-align: center;\n min-height: 400px;\n h1 {\n margin-top: 10px;\n font-size: 32px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.23px;\n color: #1b3250;\n }\n\n p {\n margin-top: 5px;\n font-size: 16px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.11px;\n color: #1b3250;\n }\n img {\n max-width: 100% !important;\n border: none !important;\n width: auto !important;\n margin: 0 auto !important;\n }\n\n &.hidden {\n display: none;\n }\n }\n\n /* lead-modal : end */\n\n .modal__container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 1000000000000;\n pointer-events: none;\n overflow-y: scroll;\n }\n\n .modal__content {\n position: relative;\n width: 80vw;\n margin: auto 0;\n }\n\n /* Make clicks pass-through */\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: #223bdd;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1;\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n }\n @keyframes nprogress-spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .lead-modal__btn:disabled {\n background: #d5d5d5 !important;\n }\n\n .dateclass {\n width: 100%;\n }\n\n .dateclass.placeholderclass::before {\n width: 100%;\n content: attr(placeholder);\n color: #b8b8b8;\n }\n\n .dateclass.placeholderclass:hover::before {\n width: 0%;\n content: '';\n }\n\n /* Change Autocomplete styles in Chrome*/\n .lead-modal input:-webkit-autofill,\n .lead-modal input:-webkit-autofill:hover,\n .lead-modal input:-webkit-autofill:focus,\n .lead-modal textarea:-webkit-autofill,\n .lead-modal textarea:-webkit-autofill:hover,\n .lead-modal textarea:-webkit-autofill:focus,\n .lead-modal select:-webkit-autofill,\n .lead-modal select:-webkit-autofill:hover,\n .lead-modal select:-webkit-autofill:focus {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n -webkit-text-fill-color: #2a4975;\n }\n\n .lead-modal label.error {\n font-size: 13px;\n color: #fa140f;\n margin-bottom: 0;\n margin-left: 0px !important;\n line-height: 1.65 !important;\n width: 100%;\n display: block;\n }\n\n /* === Lead gen wrapper === */\n .le-text-align-center {\n text-align: center !important;\n }\n .le-text-align-left {\n text-align: left !important;\n }\n .le-text-align-right {\n text-align: right !important;\n }\n\n .le-only-desktop {\n display: none !important;\n }\n .le-only-mobile {\n display: block !important;\n }\n\n .le-only-desktop a {\n text-decoration: none !important;\n }\n\n .le-only-mobile a {\n text-decoration: none !important;\n }\n\n @media screen and (min-width: 992px) {\n .le-newbuilder-LightBoxB,\n .le-newbuilder-InlineB {\n display: flex !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__header,\n .le-newbuilder-InlineB .lead-modal__header {\n max-width: 50%;\n }\n }\n\n @media screen and (min-width: 768px) {\n .le-only-desktop {\n display: block !important;\n }\n\n .le-only-mobile {\n display: none !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__body,\n .le-newbuilder-InlineB .lead-modal__body {\n flex: 1;\n }\n\n .le-newbuilder-wrap-LightBoxB {\n max-width: 720px !important;\n }\n .le-newbuilder-wrap-InlineB {\n max-width: 100% !important;\n }\n .le-newbuilder-LightBoxB .le-only-desktop.lead-modal-image-cover {\n max-width: 400px !important;\n }\n }\n\n .lead-modal__title {\n margin: 7px 0 !important;\n }\n\n .lead-modal__description {\n margin: 0;\n }\n\n .lead-modal-image-cover,\n .lead-modal__wrapper {\n border-radius: 0px !important;\n }\n\n .lead-modal__form {\n margin: 0;\n display: block !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n margin-top: 0px;\n }\n\n .lead-modal__thank-you {\n width: 100%;\n }\n\n /* Skins */\n .le-skin-a-desktop {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n height: 100%;\n display: flex;\n align-items: center;\n }\n\n .le-skin-b-desktop {\n }\n\n .le-join-now {\n }\n\n .le-joinbow-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 16px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n border: 1px solid transparent !important;\n cursor: pointer !important;\n }\n .le-joinbow-btn:hover {\n border: 1px solid white !important;\n }\n\n .le-joinbow-btn-mobile {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n }\n\n .le-newbuilder-close-svg {\n border-radius: 50%;\n width: 35px;\n height: 35px;\n background: #005cfd;\n cursor: pointer !important;\n }\n .le-mobile-btn {\n width: 24px;\n height: 24px;\n }\n\n .le-newbuilder-close-button {\n padding: 0;\n background: transparent;\n box-shadow: none;\n border: none;\n width: auto !important;\n cursor: pointer !important;\n }\n .le-abs-top-right {\n position: absolute;\n right: 10px;\n top: 10px;\n }\n\n .le-abs-outer-top-right {\n position: absolute;\n right: 0px;\n top: -45px;\n }\n\n /* Skin floating */\n .le-floating-desktop {\n position: fixed;\n bottom: 40px;\n left: 25px;\n z-index: 9999;\n }\n\n .le-floating-desktop-wrap {\n background: #fff;\n backdrop-filter: blur(30px);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 0px;\n padding-right: 30px;\n border-radius: 5px;\n display: flex;\n align-items: center;\n }\n\n .le-floating-desktop-title {\n font-size: 20px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n max-width: 530px;\n }\n .le-floating-desktop-desc {\n font-size: 13px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n max-width: 530px;\n }\n\n .le-joinbow-floating-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 40px;\n border: none !important;\n border: 1px solid transparent !important;\n font-weight: 500;\n cursor: pointer !important;\n }\n\n /* // Floating mobile */\n .le-floating-mobile {\n position: fixed;\n bottom: 0px;\n left: 0px;\n width: 100%;\n z-index: 9999;\n }\n .le-abs-outer-mobile-top-right {\n position: absolute;\n right: 2px;\n top: -30px;\n }\n\n .le-floating-mobile-wrap {\n background: #fff;\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 10px 15px;\n }\n .le-floating-mobile-title {\n font-size: 18px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n font-weight: 600;\n }\n .le-floating-mobile-desc {\n font-size: 12px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n }\n\n /* // Tab popup */\n .le-tab-popup {\n position: fixed;\n bottom: 15px;\n left: 15px;\n max-width: 150px;\n }\n .le-abs-outer-mobile-top-right-2 {\n position: absolute;\n right: -12px;\n top: -15px;\n }\n\n .le-center-tab-popup {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999999 !important;\n width: calc(100% - 40px);\n max-width: 400px;\n }\n\n .le-center-tab-popup img {\n max-width: 100% !important;\n }\n\n /* // Popup */\n .le-checkbox-title {\n font-size: 15px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n color: #2a4975;\n margin: 13px 0 !important;\n /* line-height: 1.65 !important; */\n }\n\n /* Checkbox */\n .lead-checkbox-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-checkbox-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 4px;\n flex: 0 0 24px;\n }\n\n .lead-checkbox-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-checkbox-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark::after {\n left: 8px;\n top: 3px;\n width: 7px;\n height: 12px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n /* End checkbox */\n\n .le-fullscreen-img {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n @media screen and (min-width: 768px) {\n .lead-fullscreen-desktop-close-btn {\n position: fixed;\n top: 27px;\n right: 23px;\n }\n }\n\n /* // Inline */\n .lead-modal.le-buider-inline {\n position: static;\n display: block;\n padding: 20px 0;\n height: initial !important;\n padding-top: 10px;\n }\n\n .lead-modal.le-buider-inline .lead-modal__wrapper {\n box-shadow: none;\n border: 1px solid #ddd;\n }\n .lead-modal.le-buider-inline .lead-modal__content {\n max-height: initial !important;\n }\n .lead-modal.le-buider-inline .lead-modal__content .lead-modal__header img {\n /* height: auto !important; */\n object-fit: fill;\n }\n\n .le-thankyou-title {\n font-size: 24px !important;\n margin-bottom: 8px !important;\n color: #2a4975 !important;\n }\n\n .le-thankyou-subtitle {\n font-size: 14px !important;\n color: #2699fb !important;\n margin: 0 !important;\n }\n\n /* Radio */\n .lead-radio-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-radio-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 50%;\n flex: 0 0 24px;\n }\n\n .lead-radio-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-radio-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark::after {\n left: 50%;\n top: 50%;\n width: 8px;\n height: 8px;\n background: #fff;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n /* End Radio */\n\n /* Dropdown */\n .le-newbuilder-select {\n width: 100%;\n padding: 12px;\n border-radius: 4px;\n border: solid 1px #d0d0d0;\n outline: none;\n appearance: none;\n font-size: 15px;\n padding-right: 35px;\n }\n .le-newbuilder-select-wrapper {\n position: relative;\n }\n .le-newbuilder-select-wrapper::after {\n content: '';\n position: absolute;\n right: 15px;\n top: 18px;\n transform: rotate(45deg);\n width: 10px;\n height: 10px;\n border: 2px solid #616060;\n border-left: transparent;\n border-top: transparent;\n }\n /* End Dropdown */\n\n .le-buider-slider {\n width: 420px;\n height: auto;\n bottom: 15px;\n top: unset;\n left: -200px;\n animation: le-builder-slide 0.5s forwards;\n }\n\n @keyframes le-builder-slide {\n 100% {\n left: 15px;\n }\n }\n\n @media screen and (max-width: 768px) {\n .le-buider-slider,\n .le-buider-fullscreen {\n display: none !important;\n }\n }\n\n .le-skin-mobile {\n margin-top: 64px;\n }\n"],["\n /* lead-modal : start */\n .lead-modal {\n font-family: 'Open sans', sans-serif !important;\n position: fixed;\n z-index: 99999;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n opacity: 1;\n visibility: visible;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n padding: 10px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n white-space: normal !important;\n }\n\n .lead-modal__wrapper {\n position: relative;\n width: 100%;\n max-width: 450px;\n background-color: #fff;\n border-radius: 6px;\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n }\n\n .lead-modal__content {\n width: inherit;\n overflow: auto;\n /* min-height: 400px; */\n max-height: calc(100vh - 125px);\n -webkit-overflow-scrolling: touch;\n }\n\n .lead-modal__header {\n padding: 0px 0px;\n }\n\n .lead-modal__image {\n display: block;\n margin: 0 auto;\n border: none !important;\n box-shadow: none !important;\n }\n .lead-modal-image-logo {\n margin-top: 15px;\n margin-bottom: 15px;\n }\n\n .lead-modal-image-cover {\n width: 100% !important;\n padding: 0 0px;\n border-top-left-radius: 4px;\n border: none !important;\n box-shadow: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n /* margin-top: 10px; */\n /* border-radius: 4px; */\n }\n\n .lead-modal__body {\n font-family: 'Open sans', sans-serif !important;\n padding: 15px 15px 25px 15px;\n }\n\n .lead-modal__title {\n font-family: 'Open sans', sans-serif !important;\n font-size: 20px !important;\n font-weight: bold !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.3 !important;\n letter-spacing: -0.4px !important;\n color: #2a4975 !important;\n box-shadow: none !important;\n padding-bottom: 0 !important;\n }\n\n .lead-modal__title.pink {\n color: #2661ad !important;\n }\n\n .lead-modal__description {\n font-family: 'Open sans', sans-serif !important;\n font-size: 13px !important;\n font-weight: normal !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.62 !important;\n letter-spacing: 0.14px !important;\n color: #2c87f3 !important;\n margin-top: 10px !important;\n }\n\n .lead-modal__description.pink {\n color: #3e3f58 !important;\n }\n\n .lead-modal__form-control-wrapper {\n margin-top: 10px;\n margin-left: 0px !important;\n position: relative;\n }\n\n .lead-modal__form-control {\n box-shadow: none !important;\n height: 40px !important;\n width: 100%;\n padding-left: calc(15px + 1.5em + 15px) !important;\n background-color: #fff !important;\n padding-top: 10px !important;\n padding-bottom: 10px !important;\n padding-right: 15px !important;\n border: solid 1px #dddddd !important;\n color: #2a4975 !important;\n line-height: 1.7em !important;\n border-radius: 0 !important;\n font-family: 'Open Sans', sans-serif !important;\n background-image: linear-gradient(transparent, transparent) !important;\n margin-left: 0px !important;\n font-size: 14px !important;\n line-height: 14px !important;\n }\n\n .lead-modal__form-control {\n &:focus {\n border-color: var(--color-primary);\n box-shadow: 0px 0px 0px 3px rgba(44, 135, 243, 0.1);\n outline: none;\n }\n\n &::-webkit-input-placeholder {\n /* Chrome, Firefox, Opera, Safari 10.1+ */\n color: #b5b5b5;\n }\n\n &::-moz-placeholder {\n color: #b5b5b5;\n }\n\n &:-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::placeholder {\n color: #b5b5b5;\n }\n }\n\n img.lead-modal__form-control-icon {\n display: inline-block !important;\n color: #b5b5b5 !important;\n fill: #b5b5b5 !important;\n line-height: 1 !important;\n flex-shrink: 0 !important;\n max-width: initial !important;\n display: block !important;\n position: absolute !important;\n pointer-events: none !important;\n left: 15px !important;\n top: 10px !important;\n height: 20px !important;\n width: 20px !important;\n border: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__checkbox-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n align-items: center;\n margin-top: 15px;\n a {\n color: #2c87f3 !important;\n text-decoration: none !important;\n }\n\n a:visited {\n color: #2c87f3 !important;\n }\n &.pink a,\n &.pink a:visited {\n color: #e55c8a !important;\n }\n }\n\n .lead-modal__checkbox {\n position: relative;\n z-index: 1;\n display: inline-block;\n font-size: 20px;\n }\n\n .lead-modal__checkbox__input {\n position: relative;\n margin: 0 !important;\n padding: 0;\n opacity: 0;\n height: 1em !important;\n width: 1em !important;\n display: block;\n z-index: 1;\n font-size: 1em !important;\n }\n\n .lead-modal__checkbox__control {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: -1;\n pointer-events: none;\n transition: transform 0.2s;\n color: #dddddd;\n &::before,\n &::after {\n content: '';\n position: absolute;\n }\n\n &::before {\n width: 120%;\n height: 120%;\n background-color: currentColor;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n opacity: 0;\n border-radius: 50%;\n will-change: transform;\n transition: transform 0.2s;\n }\n\n &::after {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #fff;\n border-radius: 6px;\n -webkit-box-shadow: inset 0 0 0 1px #dddddd;\n box-shadow: inset 0 0 0 1px #dddddd;\n }\n\n &:focus::after {\n box-shadow: inset 0 0 0 1px #2c87f3;\n }\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-color: currentColor;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 18px;\n box-shadow: none;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control {\n color: #2c87f3;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5 8 6.5 12 13.5 3' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:indeterminate ~ .lead-modal__checkbox__control {\n color: var(--custom-checkbox-color-disabled);\n }\n\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cline x1='2' y1='8' x2='14' y2='8' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:active ~ .lead-modal__checkbox__control {\n transform: scale(0.9);\n }\n\n .lead-modal__checkbox__input:checked:active ~ .lead-modal__checkbox__control,\n .lead-modal__checkbox__input:indeterminate:active\n ~ .lead-modal__checkbox__control {\n transform: scale(1);\n }\n\n .lead-modal__checkbox__input:focus ~ .lead-modal__checkbox__control::before {\n opacity: 0.2;\n transform: translate(-50%, -50%) scale(1);\n }\n\n .lead-modal__checkbox__input.pink ~ .lead-modal__checkbox__control::after {\n border-radius: 50% !important;\n }\n\n .lead-modal__checkbox__input.pink:checked ~ .lead-modal__checkbox__control {\n color: #2661ad;\n }\n\n .lead-modal__checkbox__input.pink:checked\n ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input.pink:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-size: 12px;\n }\n\n .lead-modal__checkbox__label {\n /* font-family: OpenSans; */\n font-size: 13px;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: 0.14px;\n color: #969696;\n margin-left: 10px;\n margin-bottom: 0 !important;\n }\n\n .lead-modal__btn {\n display: block;\n width: 100%;\n border: none;\n color: #fff;\n padding: 12px 10px;\n font-weight: 700;\n text-align: center;\n margin-top: 15px;\n border-radius: 4px;\n background-color: #2699fb;\n transition: all 0.2s ease-in-out;\n text-shadow: none !important;\n box-shadow: none !important;\n font-family: 'Open sans', sans-serif !important;\n font-size: 14px;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #e55c8a;\n }\n\n &.pink:hover {\n background-color: #b4466a;\n }\n }\n\n .lead-modal__close-btn {\n position: absolute;\n padding-top: 5px;\n top: -15px;\n right: -10px;\n width: 35px;\n height: 35px;\n box-shadow: -2px 4px 4px 0 rgba(191, 191, 191, 0.44) !important;\n text-shadow: none !important;\n background-color: #005cfd;\n border-radius: 50%;\n line-height: inherit;\n appearance: none;\n border: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease-in-out;\n outline: none;\n z-index: 1;\n padding: 5px 13px !important;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #fff;\n }\n\n &.pink .lead-modal__close-icon {\n color: #000;\n }\n\n &.pink:hover .lead-modal__close-icon {\n color: #e55c8a;\n transition: 0.3s all ease;\n }\n }\n\n .lead-modal__close-icon {\n display: inline-block;\n color: #fff;\n fill: #fff;\n height: 1em;\n width: 1em;\n line-height: 1;\n flex-shrink: 0;\n max-width: initial;\n transition: 0.3s all ease;\n }\n\n .lead-modal__thank-you {\n padding: 0 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n height: inherit;\n text-align: center;\n min-height: 400px;\n h1 {\n margin-top: 10px;\n font-size: 32px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.23px;\n color: #1b3250;\n }\n\n p {\n margin-top: 5px;\n font-size: 16px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.11px;\n color: #1b3250;\n }\n img {\n max-width: 100% !important;\n border: none !important;\n width: auto !important;\n margin: 0 auto !important;\n }\n\n &.hidden {\n display: none;\n }\n }\n\n /* lead-modal : end */\n\n .modal__container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 1000000000000;\n pointer-events: none;\n overflow-y: scroll;\n }\n\n .modal__content {\n position: relative;\n width: 80vw;\n margin: auto 0;\n }\n\n /* Make clicks pass-through */\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: #223bdd;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1;\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n }\n @keyframes nprogress-spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .lead-modal__btn:disabled {\n background: #d5d5d5 !important;\n }\n\n .dateclass {\n width: 100%;\n }\n\n .dateclass.placeholderclass::before {\n width: 100%;\n content: attr(placeholder);\n color: #b8b8b8;\n }\n\n .dateclass.placeholderclass:hover::before {\n width: 0%;\n content: '';\n }\n\n /* Change Autocomplete styles in Chrome*/\n .lead-modal input:-webkit-autofill,\n .lead-modal input:-webkit-autofill:hover,\n .lead-modal input:-webkit-autofill:focus,\n .lead-modal textarea:-webkit-autofill,\n .lead-modal textarea:-webkit-autofill:hover,\n .lead-modal textarea:-webkit-autofill:focus,\n .lead-modal select:-webkit-autofill,\n .lead-modal select:-webkit-autofill:hover,\n .lead-modal select:-webkit-autofill:focus {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n -webkit-text-fill-color: #2a4975;\n }\n\n .lead-modal label.error {\n font-size: 13px;\n color: #fa140f;\n margin-bottom: 0;\n margin-left: 0px !important;\n line-height: 1.65 !important;\n width: 100%;\n display: block;\n }\n\n /* === Lead gen wrapper === */\n .le-text-align-center {\n text-align: center !important;\n }\n .le-text-align-left {\n text-align: left !important;\n }\n .le-text-align-right {\n text-align: right !important;\n }\n\n .le-only-desktop {\n display: none !important;\n }\n .le-only-mobile {\n display: block !important;\n }\n\n .le-only-desktop a {\n text-decoration: none !important;\n }\n\n .le-only-mobile a {\n text-decoration: none !important;\n }\n\n @media screen and (min-width: 992px) {\n .le-newbuilder-LightBoxB,\n .le-newbuilder-InlineB {\n display: flex !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__header,\n .le-newbuilder-InlineB .lead-modal__header {\n max-width: 50%;\n }\n }\n\n @media screen and (min-width: 768px) {\n .le-only-desktop {\n display: block !important;\n }\n\n .le-only-mobile {\n display: none !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__body,\n .le-newbuilder-InlineB .lead-modal__body {\n flex: 1;\n }\n\n .le-newbuilder-wrap-LightBoxB {\n max-width: 720px !important;\n }\n .le-newbuilder-wrap-InlineB {\n max-width: 100% !important;\n }\n .le-newbuilder-LightBoxB .le-only-desktop.lead-modal-image-cover {\n max-width: 400px !important;\n }\n }\n\n .lead-modal__title {\n margin: 7px 0 !important;\n }\n\n .lead-modal__description {\n margin: 0;\n }\n\n .lead-modal-image-cover,\n .lead-modal__wrapper {\n border-radius: 0px !important;\n }\n\n .lead-modal__form {\n margin: 0;\n display: block !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n margin-top: 0px;\n }\n\n .lead-modal__thank-you {\n width: 100%;\n }\n\n /* Skins */\n .le-skin-a-desktop {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n height: 100%;\n display: flex;\n align-items: center;\n }\n\n .le-skin-b-desktop {\n }\n\n .le-join-now {\n }\n\n .le-joinbow-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 16px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n border: 1px solid transparent !important;\n cursor: pointer !important;\n }\n .le-joinbow-btn:hover {\n border: 1px solid white !important;\n }\n\n .le-joinbow-btn-mobile {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n }\n\n .le-newbuilder-close-svg {\n border-radius: 50%;\n width: 35px;\n height: 35px;\n background: #005cfd;\n cursor: pointer !important;\n }\n .le-mobile-btn {\n width: 24px;\n height: 24px;\n }\n\n .le-newbuilder-close-button {\n padding: 0;\n background: transparent;\n box-shadow: none;\n border: none;\n width: auto !important;\n cursor: pointer !important;\n }\n .le-abs-top-right {\n position: absolute;\n right: 10px;\n top: 10px;\n }\n\n .le-abs-outer-top-right {\n position: absolute;\n right: 0px;\n top: -45px;\n }\n\n /* Skin floating */\n .le-floating-desktop {\n position: fixed;\n bottom: 40px;\n left: 25px;\n z-index: 9999;\n }\n\n .le-floating-desktop-wrap {\n background: #fff;\n backdrop-filter: blur(30px);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 0px;\n padding-right: 30px;\n border-radius: 5px;\n display: flex;\n align-items: center;\n }\n\n .le-floating-desktop-title {\n font-size: 20px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n max-width: 530px;\n }\n .le-floating-desktop-desc {\n font-size: 13px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n max-width: 530px;\n }\n\n .le-joinbow-floating-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 40px;\n border: none !important;\n border: 1px solid transparent !important;\n font-weight: 500;\n cursor: pointer !important;\n }\n\n /* // Floating mobile */\n .le-floating-mobile {\n position: fixed;\n bottom: 0px;\n left: 0px;\n width: 100%;\n z-index: 9999;\n }\n .le-abs-outer-mobile-top-right {\n position: absolute;\n right: 2px;\n top: -30px;\n }\n\n .le-floating-mobile-wrap {\n background: #fff;\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 10px 15px;\n }\n .le-floating-mobile-title {\n font-size: 18px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n font-weight: 600;\n }\n .le-floating-mobile-desc {\n font-size: 12px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n }\n\n /* // Tab popup */\n .le-tab-popup {\n position: fixed;\n bottom: 15px;\n left: 15px;\n max-width: 150px;\n }\n .le-abs-outer-mobile-top-right-2 {\n position: absolute;\n right: -12px;\n top: -15px;\n }\n\n .le-center-tab-popup {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999999 !important;\n width: calc(100% - 40px);\n max-width: 400px;\n }\n\n .le-center-tab-popup img {\n max-width: 100% !important;\n }\n\n /* // Popup */\n .le-checkbox-title {\n font-size: 15px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n color: #2a4975;\n margin: 13px 0 !important;\n /* line-height: 1.65 !important; */\n }\n\n /* Checkbox */\n .lead-checkbox-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-checkbox-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 4px;\n flex: 0 0 24px;\n }\n\n .lead-checkbox-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-checkbox-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark::after {\n left: 8px;\n top: 3px;\n width: 7px;\n height: 12px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n /* End checkbox */\n\n .le-fullscreen-img {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n @media screen and (min-width: 768px) {\n .lead-fullscreen-desktop-close-btn {\n position: fixed;\n top: 27px;\n right: 23px;\n }\n }\n\n /* // Inline */\n .lead-modal.le-buider-inline {\n position: static;\n display: block;\n padding: 20px 0;\n height: initial !important;\n padding-top: 10px;\n }\n\n .lead-modal.le-buider-inline .lead-modal__wrapper {\n box-shadow: none;\n border: 1px solid #ddd;\n }\n .lead-modal.le-buider-inline .lead-modal__content {\n max-height: initial !important;\n }\n .lead-modal.le-buider-inline .lead-modal__content .lead-modal__header img {\n /* height: auto !important; */\n object-fit: fill;\n }\n\n .le-thankyou-title {\n font-size: 24px !important;\n margin-bottom: 8px !important;\n color: #2a4975 !important;\n }\n\n .le-thankyou-subtitle {\n font-size: 14px !important;\n color: #2699fb !important;\n margin: 0 !important;\n }\n\n /* Radio */\n .lead-radio-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-radio-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 50%;\n flex: 0 0 24px;\n }\n\n .lead-radio-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-radio-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark::after {\n left: 50%;\n top: 50%;\n width: 8px;\n height: 8px;\n background: #fff;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n /* End Radio */\n\n /* Dropdown */\n .le-newbuilder-select {\n width: 100%;\n padding: 12px;\n border-radius: 4px;\n border: solid 1px #d0d0d0;\n outline: none;\n appearance: none;\n font-size: 15px;\n padding-right: 35px;\n }\n .le-newbuilder-select-wrapper {\n position: relative;\n }\n .le-newbuilder-select-wrapper::after {\n content: '';\n position: absolute;\n right: 15px;\n top: 18px;\n transform: rotate(45deg);\n width: 10px;\n height: 10px;\n border: 2px solid #616060;\n border-left: transparent;\n border-top: transparent;\n }\n /* End Dropdown */\n\n .le-buider-slider {\n width: 420px;\n height: auto;\n bottom: 15px;\n top: unset;\n left: -200px;\n animation: le-builder-slide 0.5s forwards;\n }\n\n @keyframes le-builder-slide {\n 100% {\n left: 15px;\n }\n }\n\n @media screen and (max-width: 768px) {\n .le-buider-slider,\n .le-buider-fullscreen {\n display: none !important;\n }\n }\n\n .le-skin-mobile {\n margin-top: 64px;\n }\n"]))),H=function(n){var e=n.title,t=n.titleAlign,a=n.subtitle,o=n.subtitleAlign,l=n.link,i=n.linkNewTab,r=n.linkText,d=n.image,c=n.onClose;return m.default.createElement("div",{id:"lead-modal",className:"lead-modal modal--animate-scale"},m.default.createElement("div",{className:"lead-modal__wrapper animate__animated "},m.default.createElement("div",{className:"lead-modal__content"},m.default.createElement("div",{className:"lead-modal__thank-you"},m.default.createElement("div",{style:{width:"100%"}},m.default.createElement("img",{src:d,style:{maxHeight:162,objectFit:"cover"}}),e&&m.default.createElement("h1",{className:"le-thankyou-title le-text-align-".concat(t)}," ",e," "),a&&m.default.createElement("p",{className:"le-thankyou-subtitle le-text-align-".concat(o)}," ",a," "),r&&m.default.createElement("div",null,m.default.createElement("a",{href:l,target:i?"_blank":"parrent",rel:"noreferrer"},m.default.createElement("button",{className:"lead-modal__btn ".concat(w)},l)))))),m.default.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(w),onClick:c},m.default.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},m.default.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},m.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),m.default.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))};function V(e){var t=e.leadApi,a=e.leadSiteId,o=e.leadDomain,i=e.onShowPopup,d=("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(t+"api/campaign/"+a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:d,ga_client_id:l.getCookie("_ga")||null})}).then((function(n){return n.json()})).then((function(e){var t,a,c;if(console.log("List campagin: ",e),y="https://"+location.hostname+location.pathname+location.search,1==e._status){var s=e._data.campaigns;l.getCookie("hhg-id")||(l.setCookie("hhg-id",r.v1(),{domain:"."+o,path:"/"}),console.log("😍 Set HHG ID cookie"));var m=[];m=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?s.filter((function(n){return n.device_types.some((function(n){return n.id==k}))})):s.filter((function(n){return n.device_types.some((function(n){return n.id==v}))})),console.log("👓 campaignsDevice",m);var p=m.map((function(e,t){return e.targets.filter((function(n){return n.type==b})).map((function(e){return n.__assign(n.__assign({},e),{campaignIndex:t})}))})).flat(1);p=p.filter((function(n){var e=new URL(String(n.target).toLowerCase());return"exact_match"==n.option?Boolean(d===e.href):"start_with"==n.option?!!d.includes(String(n.target))&&!n.sub_target.filter((function(n){return"excluding"==n.option})).map((function(n){return n.value})).includes(d):void 0}));var u=Array.from(document.getElementsByTagName("META")).filter((function(n){return"article:tag"==n.getAttribute("property")})).map((function(n){return n.content})),f=[];u&&u.length&&(f=m.map((function(e,t){return e.targets.filter((function(n){return n.type==x})).map((function(e){return n.__assign(n.__assign({},e),{campaignIndex:t})}))})).flat(1).filter((function(n){return u.includes(n.target)})));var h=n.__spreadArray(n.__spreadArray([],p,!0),f,!0),g=document.cookie.split("; ").map((function(n){return n.split("=")[0]})),_=g.filter((function(n){return n.includes("lead_submited")}));console.log("--listCampaignCodeSubmited",_);var w=g.filter((function(n){return n.includes("lead_closed")}));console.log("--listCampaignCodeClosed",w);var E,C=n.__spreadArray(n.__spreadArray([],_,!0),w,!0);if(E=h.filter((function(n){return!C.some((function(e){return e.includes(m[n.campaignIndex].code)}))})).sort((function(n,e){return n.score-e.score})),console.log("--listCampaignValid : ",E),E&&E.length){var N=m[E[0].campaignIndex];console.log("CAMPAIGN_SHOW",N);var B=N.rules,S=Number(null===(t=B.find((function(n){return"time"==n.rule})))||void 0===t?void 0:t.value);console.log("timeoutRule",S);var T=Number(null===(a=B.find((function(n){return"scroll"==n.rule})))||void 0===a?void 0:a.value);console.log("scrollRule",T);var j=Number(null===(c=B.find((function(n){return"exclude_sponsored"==n.rule})))||void 0===c?void 0:c.value);console.log("excludeSponsored",j);var z=Boolean(document.querySelector(".hhg-disclaimer-text"));if(console.log("💎 LEAD current page isSponsored",z),z&&j)return;var L="TIME";if(Number.isInteger(S)&&(L="TIME",console.log("✨ SHOW AWESOME POPUP AFTER: ",S," seconds"),setTimeout((function(){null==i||i(N,L)}),1e3*S)),Number.isInteger(T)){L="SCROLL",console.log("✨ SHOW AWESOME AFTER: SCROLL",T," %");var O=document.querySelector('[data-url="'.concat(location.pathname,'"]'))||document.querySelector("body"),P=O.getBoundingClientRect().top,q=O.offsetHeight;console.log("👓 Element check scroll: ",O);var I=function(){var n=window.pageYOffset||document.documentElement.scrollTop,e=0;n>=P&&(e=Math.round((n-P)/(q-innerHeight)*100)),console.log("---Scroll",e,T),e>=T&&(window.removeEventListener("scroll",I),null==i||i(N,L))};window.addEventListener("scroll",I)}}else console.log("🚧 No lead campaigns on current URL, tags")}})).catch((function(n){console.error("Lead error: ",n)}))}exports.LeadGen=function(t){var r=t.apiUrl,d=t.siteDomain,c=t.siteId,s=t.locale,u=e.useRef(),f=e.useRef(Date.now()),h=e.useMemo((function(){var n=r;return n.includes("localhost")&&(n="https://dev.leadgen.hellobacsi.com/"),{apiUrl:n}}),[r,d,c]).apiUrl,g=e.useState(null),b=g[0],x=g[1],_=e.useState(""),k=_[0],v=_[1],w=e.useState(null),y=w[0],E=w[1],B=function(n,e){x(n),v(e)},S=function(){var n,e;if(b){console.log("👋👋👋 CLOSE POPUP ".concat(b.code," 👋👋👋"));var t=Number(null===(n=b.rules.find((function(n){return"show_again_after_exit "==n.rule})))||void 0===n?void 0:n.value),a=Number(null===(e=b.rules.find((function(n){return"days_to_show_again"==n.rule})))||void 0===e?void 0:e.value);0==t&&(a?l.setCookie("lead_closed_".concat(b.code),"target_".concat(b.extra_fields.popupVersion),{domain:"."+d,days:a,path:"/"}):l.setCookie("lead_closed_".concat(b.code),"target_".concat(b.extra_fields.popupVersion),{domain:"."+d,path:"/"})),document.body.classList.remove("noscroll"),fetch("".concat(h,"api/campaign/").concat(b.code,"/popup_exit"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:l.getCookie("hhg-id"),duration:Math.ceil((Date.now()-f.current)/1e3)})}),x(null)}};e.useEffect((function(){if(window.next){var n=p.default((function(n){console.log("--🌻 routeChangeComplete",n,Date.now());var e=location.pathname;S(),document.querySelectorAll('[data-popup-url="'.concat(e,'"]')).length||V({leadApi:h,leadDomain:d,leadSiteId:c,onShowPopup:B}),u.current&&window.removeEventListener("scroll",u.current)}),500);window.next.router.events.on("routeChangeComplete",n)}V({leadApi:h,leadDomain:d,leadSiteId:c,onShowPopup:B})}),[]);return e.useEffect((function(){b&&(f.current=Date.now())}),[b]),m.default.createElement(N.Provider,{value:{apiUrl:h,siteDomain:d,siteId:c,locale:s}},m.default.createElement(o.TranslationsContext.Provider,{value:{locale:s,values:D(s)}},a.createPortal(m.default.createElement(M,null,b&&!y&&m.default.createElement(q,{campaign:b,onClose:S,onSubmit:function(e,t,a,o){return n.__awaiter(void 0,void 0,void 0,(function(){var i,r,c,s,m,p,u,f,g,x,_,k,v,w,y,N,B,T,j,z,L,O,P,q,I,A,D,M,H,V,R,F,W,U,J;return n.__generator(this,(function(n){switch(n.label){case 0:return e.preventDefault(),console.log("submitHandler",t,a),i=new FormData(e.currentTarget),r={},i.forEach((function(n,e){r[e]=r[e]||[],r[e].push(n)})),c=Object.keys(r).map((function(n){return{name:n,value:r[n]}})),s=2,m=l.getCookie("_ga")||null,[4,require("intl-tel-input")];case 1:return p=n.sent(),u={url:location.href.toLowerCase(),title_article:document.title,meta:c.map((function(n){var e,t,a;return{key:null===(e=document.querySelector(".lead-modal__form.".concat(o,' [name="').concat(n.name,'"]')))||void 0===e?void 0:e.getAttribute("data-key"),value:(null==C?void 0:C.countryCodeNumber)&&["tel","tel1","tel2","tel3"].includes(n.name)?p.formatNumber(String(n.value),null==C?void 0:C.countryCodeNumber,s).replace(/\s+/g,""):n.value,control:n.name.replace("1","").replace("2","").replace("3",""),is_sent_mailchimp:(null===(a=document.querySelector(".lead-modal__form.".concat(o," .mailchimp-").concat(null===(t=document.querySelector(".lead-modal__form.".concat(o,' [name="').concat(n.name,'"]')))||void 0===t?void 0:t.getAttribute("data-key"))))||void 0===a?void 0:a.getAttribute("data-mailchimp"))||"false"}})),cookie_id:l.getCookie("hhg-id"),ga_client_id:m},t&&a[t].value_en&&(u.category=a[t].value_en),f=Number((null===(A=null===(I=b.rules)||void 0===I?void 0:I.find((function(n){return"days_to_show_again"===n.rule})))||void 0===A?void 0:A.value)||7),0==(g=Number((null===(M=null===(D=b.rules)||void 0===D?void 0:D.find((function(n){return"show_again_after_submit"===n.rule})))||void 0===M?void 0:M.value)||0))&&(console.log("⛔ Popup never show again!"),l.setCookie("lead_submited_".concat(b.code),"target_".concat(b.extra_fields.targetType),{domain:"."+d,path:"/"})),1==g&&(console.log("⌛ Popup will show again after ".concat(f," days!")),l.setCookie("lead_submited_".concat(b.code),"target_".concat(b.extra_fields.targetType),{domain:"."+d,days:f,path:"/"})),fetch("".concat(h,"api/campaign/").concat(b.code,"/lead"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}),"notshow"==b.extra_fields.popupShowThankYou?(S(),document.body.classList.remove("noscroll"),[2]):(x=!0,_=b.thank_you_image||"".concat(h,"admin/img/thanksyou.png"),k=b.extra_fields.popupThankyouTitle||"Thank you.",v=b.extra_fields.popupThankyouDesc||"We appreciate your time!",w="",y="",T="","2.1"==b.extra_fields.popupVersion&&(j=b.extra_fields,z=JSON.parse(j.listBlockThankyou),L=z.find((function(n){return"TitleBlock"==n.name})),O=z.find((function(n){return"SubtitleBlock"==n.name})),P=z.find((function(n){return"LinkButtonBlock"==n.name})),k=(null===(H=null==L?void 0:L.data)||void 0===H?void 0:H.value)||"",w=(null===(V=null==L?void 0:L.data)||void 0===V?void 0:V.align)||"",v=(null===(R=null==O?void 0:O.data)||void 0===R?void 0:R.value)||"",y=(null===(F=null==O?void 0:O.data)||void 0===F?void 0:F.align)||"",N=(null===(W=null==P?void 0:P.data)||void 0===W?void 0:W.value)||"",B=(null===(U=null==P?void 0:P.data)||void 0===U?void 0:U.newtab)||!1,T=(null===(J=null==P?void 0:P.data)||void 0===J?void 0:J.url)||"",q=b.extra_fields.currentLayout,["SkinA","SkinB","Floating","Tab","CenterTab"].includes(q)&&(x=!1)),E(x?{title:k,titleAlign:w,subtitle:v,subtitleAlign:y,link:T,linkNewTab:B,linkText:N,image:_}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},c.map((function(n){var e=n.name,t=n.value;"tel"==e?window.insider_object.user.phone_number=t:"email"==e&&(window.insider_object.user.email=t)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object)),[2])}}))}))},action:k}),y&&m.default.createElement(H,{title:y.title,titleAlign:y.titleAlign,subtitle:y.subtitle,subtitleAlign:y.subtitleAlign,link:y.link,linkNewTab:y.linkNewTab,linkText:y.linkText,image:y.image,onClose:S})),i.getPopupWrapperDom())))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-e6f346c4.js"),n=require("react"),t=require("lodash/debounce"),a=require("react-dom"),l=require("./translationsContext-9e231a88.js"),o=require("./cookieHelper-3553173d.js"),i=require("./utils-43f2c752.js"),r=require("uuid"),d=require("./useTranslations-00120db0.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("dayjs"),require("./screenSizeContext-00584173.js"),require("./lazyLoad-f5c59bb0.js"),require("styled-components"),require("./index-04b29b8d.js"),require("./isProduction-32e6a55a.js"),require("./Locale-11b51016.js"),require("./gAssets.js"),require("string-format"),require("lodash/throttle"),require("vanilla-lazyload");var s=c(n),m=c(t),u=function(e){var n=e.onClose,t=e.containerClassName,a=e.svgClassName;return s.default.createElement("button",{onClick:n,className:"le-newbuilder-close-button js-modal__close ".concat(t||"")},s.default.createElement("svg",{className:"le-newbuilder-close-svg ".concat(a||""),xmlns:"http://www.w3.org/2000/svg",width:"53",height:"53",viewBox:"0 0 53 53"},s.default.createElement("defs",null,s.default.createElement("filter",{width:"53",height:"53",filterUnits:"userSpaceOnUse"},s.default.createElement("feGaussianBlur",{result:"blur",stdDeviation:"3"}),s.default.createElement("feFlood",{floodOpacity:".4"}),s.default.createElement("feComposite",{in2:"blur",operator:"in"}),s.default.createElement("feComposite",{in:"SourceGraphic"})),s.default.createElement("style",{dangerouslySetInnerHTML:{__html:".cls-2{fill:none;stroke:#fff;stroke-linecap:round;stroke-width:2px}"}})),s.default.createElement("g",{filter:"url(#Ellipse_482)"},s.default.createElement("circle",{cx:"17.5",cy:"17.5",r:"17.5",transform:"translate(-483.1 -671.163)translate(483.1 671.16)translate(9 9)",fill:"#005cfd"})),s.default.createElement("path",{d:"M19 19L34 34",className:"cls-2"}),s.default.createElement("path",{d:"M34 19L19 34",className:"cls-2"})))},p=function(e){var n=e.popupId,t=e.url,a=e.newTab,l=e.imageDestkop,o=e.imageMobile,i=e.onClose,r=e.onOtherSubmit;return s.default.createElement("div",{id:n,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},s.default.createElement("div",{className:"le-center-tab-popup"},s.default.createElement("div",{style:{position:"relative"}},s.default.createElement("a",{className:"js-popup-other-submit",href:t,target:a?"blank":"_parent",onClick:r},s.default.createElement("img",{className:"le-only-mobile",src:o}),s.default.createElement("img",{className:"le-only-desktop",src:l})),s.default.createElement(u,{onClose:i,containerClassName:"le-abs-outer-mobile-top-right-2",svgClassName:"le-mobile-btn"}))))},f=function(e){var n=e.popupId,t=e.url,a=e.title,l=e.urlText,o=e.titleAlign,i=e.subtitle,r=e.subtitleAlign,d=e.newTab,c=e.imageDesktop,m=e.imageMobile,p=e.onClose,f=e.onOtherSubmit;return s.default.createElement("div",{id:n,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},s.default.createElement("aside",{className:"le-only-desktop"},s.default.createElement("div",{className:"le-floating-desktop"},s.default.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},c?s.default.createElement("div",null,s.default.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:c})):null,s.default.createElement("div",{style:{padding:20}},s.default.createElement("div",{className:"le-floating-desktop-title le-text-align-".concat(o)},a),s.default.createElement("div",{className:"le-floating-desktop-desc le-text-align-".concat(r)},i)),s.default.createElement("a",{target:d?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},s.default.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:f},l)),s.default.createElement(u,{onClose:p,containerClassName:"le-abs-outer-top-right"})))),s.default.createElement("aside",{className:"le-only-mobile"},s.default.createElement("div",{className:"le-floating-mobile"},s.default.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},s.default.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},s.default.createElement("div",null,s.default.createElement("div",{className:"le-floating-mobile-title le-text-align-".concat(o)},a),s.default.createElement("div",{className:"le-floating-mobile-desc le-text-align-".concat(r)},i)),m?s.default.createElement("div",null,s.default.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:m})):null),s.default.createElement("div",{style:{textAlign:"center",marginTop:10}},s.default.createElement("a",{target:d?"blank":"_parent",href:t,style:{textDecoration:"none"}},s.default.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:f},l))),s.default.createElement(u,{onClose:p,containerClassName:"le-abs-outer-top-right",svgClassName:"le-mobile-btn"})))))},g=1,h=2,b="https://dev.leadgen.hellobacsi.com/",k=1,v=2,_="";b.includes("localhost")&&(b="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(_="pink");var x="https://"+location.hostname+location.pathname+location.search;x=x.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));var y={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},w=y[document.documentElement.lang]||y["vi-VN"];var E=n.createContext({}),N=function(e){var n=e.title,t=e.titleAlign,a=e.subtitle,l=e.subtitleAlign,o=e.link,i=e.linkNewTab,r=e.linkText,d=e.image;return s.default.createElement("div",{className:"lead-modal__thank-you"},s.default.createElement("div",{style:{width:"100%"}},s.default.createElement("img",{src:d,style:{maxHeight:162,objectFit:"cover"}}),n&&s.default.createElement("h1",{className:"le-thankyou-title le-text-align-".concat(t)},n),a&&s.default.createElement("p",{className:"le-thankyou-subtitle le-text-align-".concat(l)},a),r&&s.default.createElement("div",null,s.default.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},s.default.createElement("button",{className:"lead-modal__btn ".concat(_)},r)))))},C=function(t){var l=t.content,o=t.inlinePosition,i=n.useMemo((function(){if(!o)return null;var n=document.querySelectorAll('[data-url="'.concat(location.pathname,'"] .body-content')),t=Array.from(n).reduce((function(n,t){return e.__spreadArray(e.__spreadArray([],n,!0),Array.from(t.children),!0)}),[]);if(null==t?void 0:t.length){var a=t.filter((function(e){return"P"===e.nodeName})),l=t.filter((function(e){return"H2"===e.nodeName})),i=null;switch(o){case"1th":i=a[0];break;case"2th":i=a[1];break;case"3th":i=a[2];break;case"4th":i=a[3];break;case"5th":i=a[4];break;case"6th":i=a[5];break;case"7th":i=a[6];break;case"8th":i=a[7];break;case"9th":i=a[8];break;case"10th":i=a[9];break;case"11th":i=a[10];break;case"12th":i=a[11];break;case"lastP":i=a[a.length-1];break;case"1thH2":i=l[0];break;case"2thH2":i=l[1];break;case"3thH2":i=l[2];break;case"4thH2":i=l[3];break;case"5thH2":i=l[4];break;case"6thH2":i=l[5];break;case"7thH2":i=l[6];break;case"8thH2":i=l[7];break;case"9thH2":i=l[8];break;case"10thH2":i=l[9];break;case"lastH2":i=l[l.length-1]}if(i){var r=document.createElement("div");return r.classList.add("inline-lead-wrapper"),i.nextElementSibling?i.parentElement.insertBefore(r,i.nextElementSibling):i.parentElement.appendChild(r),r}}}),[o]);return o&&i?a.createPortal(l,i):null},S=function(e){var t=e.content,l=n.useMemo((function(){var e=[];return document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar").forEach((function(n){return e.push(n)})),e}),[]);return s.default.createElement(s.default.Fragment,null,l.map((function(e){return a.createPortal(t,i.getWrapperDomWithSelector(e,"sidebar-lead-modal-wrapper"))})))},B=function(t){var a,l,o,i=t.popupId,r=t.extraFields,c=t.onClose,m=t.onOtherSubmit,u=t.imageMobile,p=t.imageDesktop,f=t.imageOverlayMobile,g=t.imageOverlayDesktop,h=t.imageBackground,b=t.currentLayout,k=t.title,v=t.onSubmit,x=t.showThankyou,y=d.useTranslations().t,B=JSON.parse(r.listBlockAdded),T=JSON.parse(r.actionBlocks),j=JSON.parse(r.textBlocks),L=n.useContext(E).apiUrl,O=T.submitBlock.data.url,P=T.submitBlock.data.text,A=T.submitBlock.data.text2,I=T.submitBlock.data.value,q=location.pathname,M=b.includes("Inline")||"Sidebar"===b,z="Slider"===b,D=n.useState(!0),H=D[0],V=D[1];if(window.innerWidth<769&&["Fullscreen","Slider"].includes(b))return console.log("😎 Not show fullscreen, slider on mobile "),null;n.useEffect((function(){(b.includes("LightBox")||"Fullscreen"==b)&&document.body.classList.add("noscroll")}),[]);var F=function(n,t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return t.target.validity.valueMissing?(t.target.setCustomValidity(y("validator.required")),[3,6]):[3,1];case 1:return t.target.validity.valid||t.target.validity.customError?[3,2]:("tel"===n?t.target.setCustomValidity(y("validator.phone")):"date"===n?t.target.setCustomValidity(y("validator.date")):"email"===n&&t.target.setCustomValidity(y("validator.email")),[3,6]);case 2:return"tel"!==n?[3,5]:window.intlTelInputUtils?[3,4]:[4,require("intl-tel-input/build/js/utils")];case 3:e.sent(),e.label=4;case 4:return window.intlTelInputUtils.isValidNumber(String(t.target.value),w.countryCode)?t.target.setCustomValidity(""):t.target.setCustomValidity(y("validator.phone")),[3,6];case 5:t.target.setCustomValidity(""),e.label=6;case 6:return[2]}}))}))},R=n.useMemo((function(){var e={TextBlock:0,NumberBlock:0,EmailBlock:0,PhoneBlock:0,DateBlock:0,CheckboxBlock:0,RadioBlock:0};return B.map((function(n,t){var a,l;if("TitleBlock"==n.name)return s.default.createElement("h2",{key:t,className:"lead-modal__title ".concat("le-text-align-"+((null===(a=n.data)||void 0===a?void 0:a.align)||"")," ").concat(_)},n.data.value);if("SubtitleBlock"==n.name)return s.default.createElement("p",{key:t,className:"lead-modal__description ".concat("le-text-align-"+((null===(l=n.data)||void 0===l?void 0:l.align)||"")," ").concat(_)},n.data.value);if("TextBlock"==n.name)return e.TextBlock+=1,s.default.createElement("div",{key:t},s.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},s.default.createElement("input",{required:!0,"data-key":n.data.value,name:"text"+(e.TextBlock>1?e.TextBlock:""),spellCheck:!1,type:"text",placeholder:n.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(e){return F("text",e)}}),s.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(L,"admin/img/builder/text.svg")})));if("NumberBlock"==n.name){var o=s.default.createElement("div",{key:t},s.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},s.default.createElement("input",{required:!0,"data-key":n.data.value,name:"number"+(e.NumberBlock?e.NumberBlock:""),spellCheck:!1,type:"number",min:"0",placeholder:n.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(e){return F("number",e)}}),s.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(L,"admin/img/builder/number.svg")})));return e.NumberBlock+=1,o}if("EmailBlock"==n.name){o=s.default.createElement("div",{key:t},s.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},s.default.createElement("input",{required:!0,"data-key":n.data.value,name:"email"+(e.EmailBlock?e.EmailBlock:""),spellCheck:!1,type:"email",placeholder:n.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(e){return F("email",e)}}),s.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(L,"admin/img/builder/email.svg")})));return e.EmailBlock+=1,o}if("PhoneBlock"==n.name){o=s.default.createElement("div",{key:t},s.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},s.default.createElement("input",{required:!0,"data-key":n.data.value,name:"tel"+(e.PhoneBlock?e.PhoneBlock:""),spellCheck:!1,type:"tel",placeholder:n.data.placeholder,className:"lead-modal__form-control width-100%",onChange:function(e){return F("tel",e)}}),s.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(L,"admin/img/builder/tel.svg")})));return e.PhoneBlock+=1,o}if("DateBlock"==n.name){o=s.default.createElement("div",null,s.default.createElement("div",{className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},s.default.createElement("input",{required:!0,type:"date","data-key":n.data.value,name:"date"+(e.DateBlock?e.DateBlock:""),placeholder:n.data.placeholder,onClick:function(e){e.currentTarget.classList.remove("placeholderclass")},onBlur:function(e){e.currentTarget.value||e.currentTarget.classList.add("placeholderclass")},className:"dateclass placeholderclass lead-modal__form-control width-100%",onChange:function(e){return F("date",e)}}),s.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(L,"admin/img/builder/date.svg")})));return e.DateBlock+=1,o}if("LinkButtonBlock"==n.name)return s.default.createElement("div",{key:t},s.default.createElement("a",{target:n.data.newtab?"blank":"parrent",href:n.data.url,style:{textDecoration:"none"}},s.default.createElement("button",{type:"button",className:"lead-modal__btn js-modal__close js-popup-other-submit ".concat(_),onClick:function(){null==c||c(),null==m||m()}},n.data.value)));if("CheckboxBlock"==n.name){var i=n.data,r=i.listQuestion,d=i.isSendMailChimp,u=void 0!==d&&d;o=s.default.createElement("div",{key:t,style:{margin:"5px 0"}},s.default.createElement("div",{className:"le-checkbox-title"},n.data.placeholder),s.default.createElement("div",{className:"mailchimp-".concat(n.data.value),"data-mailchimp":u}),r.map((function(t,a){return s.default.createElement("label",{key:a,className:"lead-checkbox-container"},s.default.createElement("input",{"data-key":n.data.value,name:"checkbox"+(e.CheckboxBlock?e.CheckboxBlock:"")+"[]",value:t.value,type:"checkbox",onChange:function(e){return F("checkbox",e)}}),s.default.createElement("span",{className:"lead-checkbox-checkmark"}),t.placeholder)})));return e.CheckboxBlock+=1,o}if("RadioBlock"==n.name){r=n.data.listQuestion,o=s.default.createElement("div",{key:t,style:{margin:"5px 0"}},s.default.createElement("div",{className:"le-checkbox-title"},n.data.placeholder),r.map((function(t,a){return s.default.createElement("label",{className:"lead-radio-container",key:a},s.default.createElement("input",{"data-key":n.data.value,name:"radio"+(e.RadioBlock?e.RadioBlock:""),value:t.value,type:"radio",onChange:function(e){return F("radio",e)}}),s.default.createElement("span",{className:"lead-radio-checkmark"}),t.placeholder)})));return e.RadioBlock+=1,o}if("DropdownBlock"==n.name){r=n.data.listQuestion,o=s.default.createElement("div",{key:t,style:{margin:"5px 0"}},s.default.createElement("div",{className:"le-checkbox-title"},n.data.placeholder),s.default.createElement("div",{className:"le-newbuilder-select-wrapper"},s.default.createElement("select",{className:"le-newbuilder-select","data-key":n.data.value,name:"dropdown"+(e.DropdownBlock?e.DropdownBlock:"")},r.map((function(e,n){return s.default.createElement("option",{key:n,value:e.value},e.placeholder)})))));return e.DropdownBlock+=1,o}}))}),[]),U=s.default.createElement(s.default.Fragment,null,s.default.createElement("style",{dangerouslySetInnerHTML:{__html:".le-newbuilder-overlay {\n background: url(".concat(f,") ;\n background-repeat: no-repeat;\n background-size: cover;\n }\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(").concat(g,") ;\n background-repeat: no-repeat;\n background-size: cover;\n }\n }")}}),s.default.createElement("div",{id:i,"data-popup-url":q,"data-popup-type":"lightbox-inline",className:"lead-modal lead-modal-wrapper modal--animate-scale ".concat(M?"le-buider-inline":""," ").concat(z?"le-buider-slider":"")},"Fullscreen"==b?s.default.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:h||""}):null,s.default.createElement("div",{className:"lead-modal__wrapper le-newbuilder-wrap-".concat(b)},s.default.createElement("div",{className:"lead-modal__content le-newbuilder-".concat(b)},x?s.default.createElement(N,{title:x.title,titleAlign:x.titleAlign,subtitle:x.subtitle,subtitleAlign:x.subtitleAlign,link:x.link,linkNewTab:x.linkNewTab,linkText:x.linkText,image:x.image}):s.default.createElement(s.default.Fragment,null,s.default.createElement("header",{className:"lead-modal__header"},["LightBoxA","InlineA","Sidebar","Slider"].includes(b)?u?s.default.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:u,alt:""}):null:s.default.createElement(s.default.Fragment,null,p?s.default.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:p,alt:""}):null,u?s.default.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:u,alt:""}):null)),s.default.createElement("div",{className:"lead-modal__body le-newbuilder-overlay"},s.default.createElement("form",{className:"lead-modal__form ".concat(i),onSubmit:v},s.default.createElement("div",{style:{marginBottom:20}},s.default.createElement("h2",{className:"lead-modal__title ".concat("le-text-align-"+(null===(a=j.titleBlock.data)||void 0===a?void 0:a.align)," ").concat(_)},k),s.default.createElement("p",{className:"lead-modal__description ".concat("le-text-align-"+(null===(l=j.titleBlock.data)||void 0===l?void 0:l.align)," ").concat(_)},j.subtitleBlock.data.value)),s.default.createElement("div",null,R),(null===(o=null==T?void 0:T.submitBlock)||void 0===o?void 0:o.isHide)?null:s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:"lead-modal__checkbox-wrapper ".concat(_)},s.default.createElement("div",{className:"lead-modal__checkbox"},s.default.createElement("input",{id:"lead-term-checkbox",className:"lead-modal__checkbox__input ".concat(_),type:"checkbox","aria-label":"Checkbox label",checked:H,onChange:function(e){return V(e.currentTarget.checked)}}),s.default.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),s.default.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},P," ",s.default.createElement("span",{style:{fontWeight:"bold"}},s.default.createElement("a",{target:"blank",href:O||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},A)))),s.default.createElement("button",{id:"lead-submit",type:"submit",className:"lead-modal__btn ".concat(_),disabled:!H},I)))))),!b.includes("Inline")&&s.default.createElement("button",{className:"lead-modal__close-btn ".concat("Fullscreen"==b?"lead-fullscreen-desktop-close-btn":""," js-modal__close ").concat(_),onClick:c},s.default.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},s.default.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},s.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),s.default.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"})))))));return b.includes("LightBox")||"Fullscreen"==b||"Slider"==b?U:"Sidebar"==b?s.default.createElement(S,{content:U}):b.includes("Inline")?s.default.createElement(C,{content:U,inlinePosition:r.popupInlinePosition}):null},T=function(e){var n=e.popupId,t=e.link,a=e.linkText,l=e.linkNewTab,o=e.onClose,i=e.imageMobile,r=e.imageDesktop,d=e.currentLayout,c=e.onOtherSubmit,m=location.pathname;return s.default.createElement("div",{id:n,className:"lead-modal-wrapper","data-popup-url":m,"data-popup-type":"skin_ab"},"SkinA"==d?s.default.createElement("aside",{className:"le-only-desktop"},s.default.createElement("div",{className:"le-skin-a-desktop"},s.default.createElement("div",{style:{position:"relative"}},s.default.createElement("img",{src:r}),s.default.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:l?"blank":"_parent"},s.default.createElement("button",{onClick:c,className:"le-joinbow-btn js-popup-other-submit"},a)),s.default.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(_)},s.default.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},s.default.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},s.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),s.default.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))):"SkinB"==d?s.default.createElement("aside",{className:"le-only-desktop"},s.default.createElement("div",{className:""},s.default.createElement("div",{style:{position:"relative",zIndex:1e4}},s.default.createElement("img",{src:r,style:{width:"100%"}}),s.default.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:l?"blank":"_parent"},s.default.createElement("button",{onClick:c,className:"le-joinbow-btn-mobile js-popup-other-submit"},a)),s.default.createElement(u,{containerClassName:"le-abs-top-right",onClose:o})))):null,s.default.createElement("aside",{className:"le-only-mobile"},s.default.createElement("div",{className:"le-skin-mobile"},s.default.createElement("div",{style:{position:"relative"}},s.default.createElement("img",{src:i,style:{width:"100%"}}),s.default.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:l?"blank":"_parent"},s.default.createElement("button",{onClick:c,className:"le-joinbow-btn-mobile js-popup-other-submit"},a)),s.default.createElement(u,{containerClassName:"le-abs-top-right",svgClassName:"le-mobile-btn",onClose:o})))))},j=function(e){var n=e.popupId,t=e.url,a=e.newTab,l=e.image,o=e.onClose,i=e.onOtherSubmit;return s.default.createElement("div",{id:n,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},s.default.createElement("div",{className:"le-tab-popup"},s.default.createElement("div",{style:{position:"relative"}},s.default.createElement("a",{href:t,target:a?"blank":"_parent",onClick:i},s.default.createElement("img",{className:"js-popup-other-submit",src:l})),s.default.createElement(u,{onClose:o,containerClassName:"le-abs-outer-mobile-top-right-2",svgClassName:"le-mobile-btn"}))))};var L=function(e){var t,a,l=e.campaign,i=e.action,c=e.onSubmit,m=e.onClose,u=e.showThankyou;d.useTranslations().t;var g=n.useContext(E),h=g.apiUrl,b=g.siteDomain;n.useEffect((function(){var e=o.getCookie("_ga")||null;fetch("".concat(h,"api/campaign/").concat(x,"/impression"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:i,url:location.href.toLowerCase(),title_article:document.title,cookie_id:o.getCookie("hhg-id"),ga_client_id:e})})}),[]);var k=l.extra_fields,v=l.image,_=l.image_desktop,x=l.code,y=l.image_background,w=l.image_overlay_mobile,N=l.image_overlay_desktop,C=k.currentLayout,S=k.imageBlocks?JSON.parse(k.imageBlocks):{},L=JSON.parse(k.actionBlocks),O=JSON.parse(k.textBlocks),P=(null===(a=null===(t=null==O?void 0:O.titleBlock)||void 0===t?void 0:t.data)||void 0===a?void 0:a.value)||"",A={1:{},2:{},3:{}},I=n.useRef("lead-modal-"+r.v1()),q=function(e){if(void 0===e&&(e="Xin chao {{category_2}} extra"),e.includes("{{category_")){var n="{{category_".length,t=e.search("{{category_");return+e.charAt(n+t)}return null}(P);if(q){console.log("⚡️ Has categoryLevel",q);var M=Array.from(document.getElementsByTagName("META")),z=M.find((function(e){return e.name==="content_category_".concat(q)})),D=M.find((function(e){return e.name==="content_category_en_".concat(q)}));if(!z||!D)return console.log("⚡️ No META TAG for categoryLevel, not show popup",q),null;A[q]={value:z.content,value_en:D.content},P=P.replace("{{category_".concat(q,"}}"),z.content),console.log("⚡️ Set categoryData ",q)}else console.log("⚡️ No categoryLevel",q);var H=function(){var e,n,t,a;if(console.log("👌 Other submit click"),document.body.classList.remove("noscroll"),C.includes("Skin")){var i=document.querySelector("#masthead");i&&(i.style.top="0px !important;")}var r=Number(null!==(n=null===(e=l.rules.find((function(e){return"days_to_show_again"==e.rule})))||void 0===e?void 0:e.value)&&void 0!==n?n:7),d=Number(null!==(a=null===(t=l.rules.find((function(e){return"show_again_after_submit"==e.rule})))||void 0===t?void 0:t.value)&&void 0!==a?a:0);0===d&&(console.log("⛔ Popup never show again!"),o.setCookie("lead_submited_".concat(x),"target_".concat(k.popupVersion),{domain:"."+b,path:"/"})),1==d&&(console.log("⌛ Popup will show again after ".concat(r," days!")),o.setCookie("lead_submited_".concat(x),"target_".concat(k.popupVersion),{domain:"."+b,days:r,path:"/"}));var c=o.getCookie("_ga")||null,s={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:o.getCookie("hhg-id"),ga_client_id:c};q&&(s.category=A[q].value_en),fetch("".concat(h,"api/campaign/").concat(x,"/lead"),{method:"POST",body:JSON.stringify(s),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((function(e){return e.json()})).then((function(e){"error"===e.status&&console.log(e)})).catch((function(e){console.error("Error:",e)})),null==m||m()};return"CenterTab"===C?s.default.createElement(p,{popupId:I.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:v,imageDestkop:_,onClose:m,onOtherSubmit:H}):"Tab"===C?s.default.createElement(j,{popupId:I.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:v,onClose:m,onOtherSubmit:H}):"Floating"===C?s.default.createElement(f,{popupId:I.current,title:P,titleAlign:O.titleBlock.data.align,subtitle:O.subtitleBlock.data.value,subtitleAlign:O.subtitleBlock.data.align,url:L.linkButtonBlock.data.url,urlText:L.linkButtonBlock.data.value,newTab:L.linkButtonBlock.data.newtab,imageMobile:v,imageDesktop:_,onClose:m,onOtherSubmit:H}):C.includes("LightBox")||C.includes("Inline")||"Fullscreen"==C||"Sidebar"==C||"Slider"==C?s.default.createElement(B,{popupId:I.current,extraFields:k,onClose:m,onOtherSubmit:H,imageMobile:v,imageDesktop:_,imageBackground:y,currentLayout:C,title:P,onSubmit:function(e){return c(e,q,A,I.current)},key:C,imageOverlayDesktop:N,imageOverlayMobile:w,showThankyou:u}):C.includes("Skin")?s.default.createElement(T,{popupId:I.current,link:L.linkButtonBlock.data.url,linkNewTab:!!L.linkButtonBlock.data.newtab,linkText:L.linkButtonBlock.data.value,onClose:m,onOtherSubmit:H,imageMobile:v,imageDesktop:_,currentLayout:C}):null},O=function(t){var a=t.campaign,l=t.action,i=t.onSubmit,r=t.onClose,c=t.showThankyou,m=d.useTranslations().t,u=n.useState(!0),p=u[0],f=u[1];n.useEffect((function(){document.body.classList.add("noscroll");var e=o.getCookie("_ga")||null;fetch("".concat(B,"api/campaign/").concat(b,"/impression"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:l||"",url:location.href.toLowerCase(),title_article:document.title,cookie_id:o.getCookie("hhg-id"),ga_client_id:e})})}),[]);var g=a.extra_fields,h=a.image,b=a.code,k=g.title,v=g.desc,x=g.submit,y=g.popUpTermURL,C=g.popUpTermAgreeText,S=g.popUpTermText,B=n.useContext(E).apiUrl,T=g.fields?JSON.parse(g.fields):[],j={tel:0,text:0,date:0,email:0},L=function(n,t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return t.target.validity.valueMissing?(t.target.setCustomValidity(m("validator.required")),[3,5]):[3,1];case 1:return t.target.validity.valid||t.target.validity.customError?[3,2]:("tel"===n?t.target.setCustomValidity(m("validator.phone")):"date"===n?t.target.setCustomValidity(m("validator.date")):"email"===n&&t.target.setCustomValidity(m("validator.email")),[3,5]);case 2:return"tel"!==n?[3,4]:[4,require("intl-tel-input")];case 3:return e.sent().isValidNumber(String(t.target.value),w.countryCode)?t.target.setCustomValidity(""):t.target.setCustomValidity(m("validator.phone")),[3,5];case 4:t.target.setCustomValidity(""),e.label=5;case 5:return[2]}}))}))},O=T.map((function(e,n){var t=s.default.createElement(s.default.Fragment,null);return t="date"==e.control?s.default.createElement("div",{key:n,className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},s.default.createElement("input",{required:!0,type:"date","data-key":e.listEdit[0].value,name:j.date?e.control+j.date:e.control,placeholder:e.listEdit[1].value||"...",onClick:function(e){return e.currentTarget.classList.remove("placeholderclass")},onBlur:function(e){return!e.currentTarget.value&&e.currentTarget.classList.add("placeholderclass")},className:"dateclass placeholderclass lead-modal__form-control width-100%",onChange:function(n){return L(e.control,n)}}),s.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(B,"admin/img/builder/").concat(e.name,".svg")})):s.default.createElement("div",{key:n,className:"lead-modal__form-control-wrapper form-control-wrapper--icon-left"},s.default.createElement("input",{required:!0,"data-key":e.listEdit[0].value,name:j[e.control]?e.control+j[e.control]:e.control,spellCheck:!1,type:e.control,placeholder:e.listEdit[1].value||"...",className:"lead-modal__form-control width-100%",onChange:function(n){return L(e.control,n)}}),s.default.createElement("img",{className:"lead-modal__form-control-icon",src:"".concat(B,"admin/img/builder/").concat(e.name,".svg")})),"date"==e.control&&(j.date+=1),"text"==e.control&&(j.text+=1),"tel"==e.control&&(j.tel+=1),"email"==e.control&&(j.email+=1),t}));return s.default.createElement("div",{id:"lead-modal",className:"lead-modal modal--animate-scale"},s.default.createElement("div",{className:"lead-modal__wrapper animate__animated "},s.default.createElement("div",{className:"lead-modal__content"},c?s.default.createElement(N,{title:c.title,titleAlign:c.titleAlign,subtitle:c.subtitle,subtitleAlign:c.subtitleAlign,link:c.link,linkNewTab:c.linkNewTab,linkText:c.linkText,image:c.image}):s.default.createElement(s.default.Fragment,null,s.default.createElement("header",{className:"lead-modal__header"},!!h&&s.default.createElement("img",{className:"lead-modal__image lead-modal-image-cover",src:h,alt:""})),s.default.createElement("div",{className:"lead-modal__body"},s.default.createElement("h2",{className:"lead-modal__title ".concat(_)},k),s.default.createElement("p",{className:"lead-modal__description ".concat(_)},v),s.default.createElement("form",{className:"lead-modal__form",onSubmit:function(e){e.preventDefault(),i(e)}},O,s.default.createElement("div",{className:"lead-modal__checkbox-wrapper ".concat(_)},s.default.createElement("div",{className:"lead-modal__checkbox"},s.default.createElement("input",{id:"lead-term-checkbox",className:"lead-modal__checkbox__input ".concat(_),type:"checkbox","aria-label":"Checkbox label",checked:p,onChange:function(e){return f(e.currentTarget.checked)}}),s.default.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),s.default.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},C," ",s.default.createElement("span",{style:{fontWeight:"bold"}},s.default.createElement("a",{target:"blank",href:y||"https://hellobacsi.com/chinh-sach",style:{textDecoration:"none"},rel:"noopener noreferrer"},S)))),s.default.createElement("button",{id:"lead-submit",type:"submit",className:"lead-modal__btn ".concat(_),disabled:!p},x))))),s.default.createElement("button",{className:"lead-modal__close-btn js-modal__close ".concat(_),onClick:r},s.default.createElement("svg",{className:"lead-modal__close-icon",viewBox:"0 0 24 24"},s.default.createElement("title",null,"Close modal window"),s.default.createElement("g",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"},s.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}),s.default.createElement("line",{x1:"21",y1:"3",x2:"3",y2:"21"}))))))},P=function(e){var n=e.campaign,t=e.action,a=e.onSubmit,l=e.onClose,o=e.showThankyou;return n.extra_fields?"2.1"==n.extra_fields.popupVersion?s.default.createElement(L,{campaign:n,action:t,onSubmit:a,onClose:l,showThankyou:o}):s.default.createElement(O,{campaign:n,action:t,onSubmit:a,onClose:l,showThankyou:o}):null},A={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}."},I={"en-PH":A,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah."},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง"},"tl-PH":A},q=function(e){var n=I[e];return n||I["en-PH"]},M=function(){return s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"\n /* lead-modal : start */\n .lead-modal {\n font-family: 'Open sans', sans-serif !important;\n position: fixed;\n z-index: 99999;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n opacity: 1;\n visibility: visible;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n padding: 10px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n white-space: normal !important;\n }\n\n .lead-modal__wrapper {\n position: relative;\n width: 100%;\n max-width: 450px;\n background-color: #fff;\n border-radius: 6px;\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n }\n\n .lead-modal__content {\n width: inherit;\n overflow: auto;\n /* min-height: 400px; */\n max-height: calc(100vh - 125px);\n -webkit-overflow-scrolling: touch;\n }\n\n .lead-modal__header {\n padding: 0px 0px;\n }\n\n .lead-modal__image {\n display: block;\n margin: 0 auto;\n border: none !important;\n box-shadow: none !important;\n }\n .lead-modal-image-logo {\n margin-top: 15px;\n margin-bottom: 15px;\n }\n\n .lead-modal-image-cover {\n width: 100% !important;\n padding: 0 0px;\n border-top-left-radius: 4px;\n border: none !important;\n box-shadow: none !important;\n /* margin: 0 !important; */\n }\n\n .lead-modal__image + .lead-modal__image {\n /* margin-top: 10px; */\n /* border-radius: 4px; */\n }\n\n .lead-modal__body {\n font-family: 'Open sans', sans-serif !important;\n padding: 15px 15px 25px 15px;\n }\n\n .lead-modal__title {\n font-family: 'Open sans', sans-serif !important;\n font-size: 20px !important;\n font-weight: bold !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.3 !important;\n letter-spacing: -0.4px !important;\n color: #2a4975 !important;\n box-shadow: none !important;\n padding-bottom: 0 !important;\n }\n\n .lead-modal__title.pink {\n color: #2661ad !important;\n }\n\n .lead-modal__description {\n font-family: 'Open sans', sans-serif !important;\n font-size: 13px !important;\n font-weight: normal !important;\n font-stretch: normal !important;\n font-style: normal !important;\n line-height: 1.62 !important;\n letter-spacing: 0.14px !important;\n color: #2c87f3 !important;\n margin-top: 10px !important;\n }\n\n .lead-modal__description.pink {\n color: #3e3f58 !important;\n }\n\n .lead-modal__form-control-wrapper {\n margin-top: 10px;\n margin-left: 0px !important;\n position: relative;\n }\n\n .lead-modal__form-control {\n box-shadow: none !important;\n height: 40px !important;\n width: 100%;\n padding-left: calc(15px + 1.5em + 15px) !important;\n background-color: #fff !important;\n padding-top: 10px !important;\n padding-bottom: 10px !important;\n padding-right: 15px !important;\n border: solid 1px #dddddd !important;\n color: #2a4975 !important;\n line-height: 1.7em !important;\n border-radius: 0 !important;\n font-family: 'Open Sans', sans-serif !important;\n background-image: linear-gradient(transparent, transparent) !important;\n margin-left: 0px !important;\n font-size: 14px !important;\n line-height: 14px !important;\n }\n\n .lead-modal__form-control {\n &:focus {\n border-color: var(--color-primary);\n box-shadow: 0px 0px 0px 3px rgba(44, 135, 243, 0.1);\n outline: none;\n }\n\n &::-webkit-input-placeholder {\n /* Chrome, Firefox, Opera, Safari 10.1+ */\n color: #b5b5b5;\n }\n\n &::-moz-placeholder {\n color: #b5b5b5;\n }\n\n &:-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::-ms-input-placeholder {\n color: #b5b5b5;\n }\n\n &::placeholder {\n color: #b5b5b5;\n }\n }\n\n img.lead-modal__form-control-icon {\n display: inline-block !important;\n color: #b5b5b5 !important;\n fill: #b5b5b5 !important;\n line-height: 1 !important;\n flex-shrink: 0 !important;\n max-width: initial !important;\n display: block !important;\n position: absolute !important;\n pointer-events: none !important;\n left: 15px !important;\n top: 10px !important;\n height: 20px !important;\n width: 20px !important;\n border: none !important;\n margin: 0 !important;\n }\n\n .lead-modal__checkbox-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n align-items: center;\n margin-top: 15px;\n a {\n color: #2c87f3 !important;\n text-decoration: none !important;\n }\n\n a:visited {\n color: #2c87f3 !important;\n }\n &.pink a,\n &.pink a:visited {\n color: #e55c8a !important;\n }\n }\n\n .lead-modal__checkbox {\n position: relative;\n z-index: 1;\n display: inline-block;\n font-size: 20px;\n }\n\n .lead-modal__checkbox__input {\n position: relative;\n margin: 0 !important;\n padding: 0;\n opacity: 0;\n height: 1em !important;\n width: 1em !important;\n display: block;\n z-index: 1;\n font-size: 1em !important;\n }\n\n .lead-modal__checkbox__control {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: -1;\n pointer-events: none;\n transition: transform 0.2s;\n color: #dddddd;\n &::before,\n &::after {\n content: '';\n position: absolute;\n }\n\n &::before {\n width: 120%;\n height: 120%;\n background-color: currentColor;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n opacity: 0;\n border-radius: 50%;\n will-change: transform;\n transition: transform 0.2s;\n }\n\n &::after {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #fff;\n border-radius: 6px;\n -webkit-box-shadow: inset 0 0 0 1px #dddddd;\n box-shadow: inset 0 0 0 1px #dddddd;\n }\n\n &:focus::after {\n box-shadow: inset 0 0 0 1px #2c87f3;\n }\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-color: currentColor;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 18px;\n box-shadow: none;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control {\n color: #2c87f3;\n }\n\n .lead-modal__checkbox__input:checked ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5 8 6.5 12 13.5 3' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:indeterminate ~ .lead-modal__checkbox__control {\n color: var(--custom-checkbox-color-disabled);\n }\n\n .lead-modal__checkbox__input:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cline x1='2' y1='8' x2='14' y2='8' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\");\n }\n\n .lead-modal__checkbox__input:active ~ .lead-modal__checkbox__control {\n transform: scale(0.9);\n }\n\n .lead-modal__checkbox__input:checked:active ~ .lead-modal__checkbox__control,\n .lead-modal__checkbox__input:indeterminate:active\n ~ .lead-modal__checkbox__control {\n transform: scale(1);\n }\n\n .lead-modal__checkbox__input:focus ~ .lead-modal__checkbox__control::before {\n opacity: 0.2;\n transform: translate(-50%, -50%) scale(1);\n }\n\n .lead-modal__checkbox__input.pink ~ .lead-modal__checkbox__control::after {\n border-radius: 50% !important;\n }\n\n .lead-modal__checkbox__input.pink:checked ~ .lead-modal__checkbox__control {\n color: #2661ad;\n }\n\n .lead-modal__checkbox__input.pink:checked\n ~ .lead-modal__checkbox__control::after,\n .lead-modal__checkbox__input.pink:indeterminate\n ~ .lead-modal__checkbox__control::after {\n background-size: 12px;\n }\n\n .lead-modal__checkbox__label {\n /* font-family: OpenSans; */\n font-size: 13px;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: 0.14px;\n color: #969696;\n margin-left: 10px;\n margin-bottom: 0 !important;\n }\n\n .lead-modal__btn {\n display: block;\n width: 100%;\n border: none;\n color: #fff;\n padding: 12px 10px;\n font-weight: 700;\n text-align: center;\n margin-top: 15px;\n border-radius: 4px;\n background-color: #2699fb;\n transition: all 0.2s ease-in-out;\n text-shadow: none !important;\n box-shadow: none !important;\n font-family: 'Open sans', sans-serif !important;\n font-size: 14px;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #e55c8a;\n }\n\n &.pink:hover {\n background-color: #b4466a;\n }\n }\n\n .lead-modal__close-btn {\n position: absolute;\n padding-top: 5px;\n top: -15px;\n right: -10px;\n width: 35px;\n height: 35px;\n box-shadow: -2px 4px 4px 0 rgba(191, 191, 191, 0.44) !important;\n text-shadow: none !important;\n background-color: #005cfd;\n border-radius: 50%;\n line-height: inherit;\n appearance: none;\n border: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease-in-out;\n outline: none;\n z-index: 1;\n padding: 5px 13px !important;\n cursor: pointer !important;\n &:hover,\n &:active {\n background-color: #337eff;\n }\n\n &.pink {\n background-color: #fff;\n }\n\n &.pink .lead-modal__close-icon {\n color: #000;\n }\n\n &.pink:hover .lead-modal__close-icon {\n color: #e55c8a;\n transition: 0.3s all ease;\n }\n }\n\n .lead-modal__close-icon {\n display: inline-block;\n color: #fff;\n fill: #fff;\n height: 1em;\n width: 1em;\n line-height: 1;\n flex-shrink: 0;\n max-width: initial;\n transition: 0.3s all ease;\n }\n\n .lead-modal__thank-you {\n padding: 0 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n height: inherit;\n text-align: center;\n min-height: 400px;\n h1 {\n margin-top: 10px;\n font-size: 32px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.23px;\n color: #1b3250;\n }\n\n p {\n margin-top: 5px;\n font-size: 16px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.11px;\n color: #1b3250;\n }\n img {\n max-width: 100% !important;\n border: none !important;\n width: auto !important;\n margin: 0 auto !important;\n }\n\n &.hidden {\n display: none;\n }\n }\n\n /* lead-modal : end */\n\n .modal__container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 1000000000000;\n pointer-events: none;\n overflow-y: scroll;\n }\n\n .modal__content {\n position: relative;\n width: 80vw;\n margin: auto 0;\n }\n\n /* Make clicks pass-through */\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: #223bdd;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1;\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n }\n @keyframes nprogress-spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .lead-modal__btn:disabled {\n background: #d5d5d5 !important;\n }\n\n .dateclass {\n width: 100%;\n }\n\n .dateclass.placeholderclass::before {\n width: 100%;\n content: attr(placeholder);\n color: #b8b8b8;\n }\n\n .dateclass.placeholderclass:hover::before {\n width: 0%;\n content: '';\n }\n\n /* Change Autocomplete styles in Chrome*/\n .lead-modal input:-webkit-autofill,\n .lead-modal input:-webkit-autofill:hover,\n .lead-modal input:-webkit-autofill:focus,\n .lead-modal textarea:-webkit-autofill,\n .lead-modal textarea:-webkit-autofill:hover,\n .lead-modal textarea:-webkit-autofill:focus,\n .lead-modal select:-webkit-autofill,\n .lead-modal select:-webkit-autofill:hover,\n .lead-modal select:-webkit-autofill:focus {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n -webkit-text-fill-color: #2a4975;\n }\n\n .lead-modal label.error {\n font-size: 13px;\n color: #fa140f;\n margin-bottom: 0;\n margin-left: 0px !important;\n line-height: 1.65 !important;\n width: 100%;\n display: block;\n }\n\n /* === Lead gen wrapper === */\n .le-text-align-center {\n text-align: center !important;\n }\n .le-text-align-left {\n text-align: left !important;\n }\n .le-text-align-right {\n text-align: right !important;\n }\n\n .le-only-desktop {\n display: none !important;\n }\n .le-only-mobile {\n display: block !important;\n }\n\n .le-only-desktop a {\n text-decoration: none !important;\n }\n\n .le-only-mobile a {\n text-decoration: none !important;\n }\n\n @media screen and (min-width: 992px) {\n .le-newbuilder-LightBoxB,\n .le-newbuilder-InlineB {\n display: flex !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__header,\n .le-newbuilder-InlineB .lead-modal__header {\n max-width: 50%;\n }\n }\n\n @media screen and (min-width: 768px) {\n .le-only-desktop {\n display: block !important;\n }\n\n .le-only-mobile {\n display: none !important;\n }\n\n .le-newbuilder-LightBoxB .lead-modal__body,\n .le-newbuilder-InlineB .lead-modal__body {\n flex: 1;\n }\n\n .le-newbuilder-wrap-LightBoxB {\n max-width: 720px !important;\n }\n .le-newbuilder-wrap-InlineB {\n max-width: 100% !important;\n }\n .le-newbuilder-LightBoxB .le-only-desktop.lead-modal-image-cover {\n max-width: 400px !important;\n }\n }\n\n .lead-modal__title {\n margin: 7px 0 !important;\n }\n\n .lead-modal__description {\n margin: 0;\n }\n\n .lead-modal-image-cover,\n .lead-modal__wrapper {\n border-radius: 0px !important;\n }\n\n .lead-modal__form {\n margin: 0;\n display: block !important;\n }\n\n .lead-modal__image + .lead-modal__image {\n margin-top: 0px;\n }\n\n .lead-modal__thank-you {\n width: 100%;\n }\n\n /* Skins */\n .le-skin-a-desktop {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n height: 100%;\n display: flex;\n align-items: center;\n }\n\n .le-skin-b-desktop {\n }\n\n .le-join-now {\n }\n\n .le-joinbow-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 16px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n border: 1px solid transparent !important;\n cursor: pointer !important;\n }\n .le-joinbow-btn:hover {\n border: 1px solid white !important;\n }\n\n .le-joinbow-btn-mobile {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 30px;\n border: none !important;\n }\n\n .le-newbuilder-close-svg {\n border-radius: 50%;\n width: 35px;\n height: 35px;\n background: #005cfd;\n cursor: pointer !important;\n }\n .le-mobile-btn {\n width: 24px;\n height: 24px;\n }\n\n .le-newbuilder-close-button {\n padding: 0;\n background: transparent;\n box-shadow: none;\n border: none;\n width: auto !important;\n cursor: pointer !important;\n }\n .le-abs-top-right {\n position: absolute;\n right: 10px;\n top: 10px;\n }\n\n .le-abs-outer-top-right {\n position: absolute;\n right: 0px;\n top: -45px;\n }\n\n /* Skin floating */\n .le-floating-desktop {\n position: fixed;\n bottom: 40px;\n left: 25px;\n z-index: 9999;\n }\n\n .le-floating-desktop-wrap {\n background: #fff;\n backdrop-filter: blur(30px);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 0px;\n padding-right: 30px;\n border-radius: 5px;\n display: flex;\n align-items: center;\n }\n\n .le-floating-desktop-title {\n font-size: 20px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n max-width: 530px;\n }\n .le-floating-desktop-desc {\n font-size: 13px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n max-width: 530px;\n }\n\n .le-joinbow-floating-btn {\n background: #2c87f3;\n color: #ffffff;\n font-size: 14px;\n text-align: center;\n outline: none !important;\n box-shadow: none !important;\n padding: 12px 40px;\n border: none !important;\n border: 1px solid transparent !important;\n font-weight: 500;\n cursor: pointer !important;\n }\n\n /* // Floating mobile */\n .le-floating-mobile {\n position: fixed;\n bottom: 0px;\n left: 0px;\n width: 100%;\n z-index: 9999;\n }\n .le-abs-outer-mobile-top-right {\n position: absolute;\n right: 2px;\n top: -30px;\n }\n\n .le-floating-mobile-wrap {\n background: #fff;\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);\n padding: 10px 15px;\n }\n .le-floating-mobile-title {\n font-size: 18px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n color: #2a4975;\n font-weight: 600;\n }\n .le-floating-mobile-desc {\n font-size: 12px;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.65;\n letter-spacing: normal;\n color: #2699fb;\n }\n\n /* // Tab popup */\n .le-tab-popup {\n position: fixed;\n bottom: 15px;\n left: 15px;\n max-width: 150px;\n }\n .le-abs-outer-mobile-top-right-2 {\n position: absolute;\n right: -12px;\n top: -15px;\n }\n\n .le-center-tab-popup {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999999 !important;\n width: calc(100% - 40px);\n max-width: 400px;\n }\n\n .le-center-tab-popup img {\n max-width: 100% !important;\n }\n\n /* // Popup */\n .le-checkbox-title {\n font-size: 15px;\n font-weight: bold;\n font-stretch: normal;\n font-style: normal;\n color: #2a4975;\n margin: 13px 0 !important;\n /* line-height: 1.65 !important; */\n }\n\n /* Checkbox */\n .lead-checkbox-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-checkbox-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 4px;\n flex: 0 0 24px;\n }\n\n .lead-checkbox-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-checkbox-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-checkbox-container input:checked ~ .lead-checkbox-checkmark::after {\n left: 8px;\n top: 3px;\n width: 7px;\n height: 12px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n /* End checkbox */\n\n .le-fullscreen-img {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n @media screen and (min-width: 768px) {\n .lead-fullscreen-desktop-close-btn {\n position: fixed;\n top: 27px;\n right: 23px;\n }\n }\n\n /* // Inline */\n .lead-modal.le-buider-inline {\n position: static;\n display: block;\n padding: 20px 0;\n height: initial !important;\n padding-top: 10px;\n }\n\n .lead-modal.le-buider-inline .lead-modal__wrapper {\n box-shadow: none;\n border: 1px solid #ddd;\n }\n .lead-modal.le-buider-inline .lead-modal__content {\n max-height: initial !important;\n }\n .lead-modal.le-buider-inline .lead-modal__content .lead-modal__header img {\n /* height: auto !important; */\n object-fit: fill;\n }\n\n .le-thankyou-title {\n font-size: 24px !important;\n margin-bottom: 8px !important;\n color: #2a4975 !important;\n }\n\n .le-thankyou-subtitle {\n font-size: 14px !important;\n color: #2699fb !important;\n margin: 0 !important;\n }\n\n /* Radio */\n .lead-radio-container {\n position: relative;\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 14px;\n line-height: 1.65;\n margin: 10px 0;\n }\n\n .lead-radio-checkmark {\n display: inline-block;\n height: 24px;\n border: solid 1px #d0d0d0;\n vertical-align: middle;\n margin-right: 8px;\n position: relative;\n border-radius: 50%;\n flex: 0 0 24px;\n }\n\n .lead-radio-container input {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n }\n\n .lead-radio-checkmark::after {\n position: absolute;\n content: '';\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark {\n background: #337eff;\n border: solid 1px #337eff;\n }\n\n .lead-radio-container input:checked ~ .lead-radio-checkmark::after {\n left: 50%;\n top: 50%;\n width: 8px;\n height: 8px;\n background: #fff;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n /* End Radio */\n\n /* Dropdown */\n .le-newbuilder-select {\n width: 100%;\n padding: 12px;\n border-radius: 4px;\n border: solid 1px #d0d0d0;\n outline: none;\n appearance: none;\n font-size: 15px;\n padding-right: 35px;\n }\n .le-newbuilder-select-wrapper {\n position: relative;\n }\n .le-newbuilder-select-wrapper::after {\n content: '';\n position: absolute;\n right: 15px;\n top: 18px;\n transform: rotate(45deg);\n width: 10px;\n height: 10px;\n border: 2px solid #616060;\n border-left: transparent;\n border-top: transparent;\n }\n /* End Dropdown */\n\n .le-buider-slider {\n width: 420px;\n height: auto;\n bottom: 15px;\n top: unset;\n left: -200px;\n animation: le-builder-slide 0.5s forwards;\n }\n\n @keyframes le-builder-slide {\n 100% {\n left: 15px;\n }\n }\n\n @media screen and (max-width: 768px) {\n .le-buider-slider,\n .le-buider-fullscreen {\n display: none !important;\n }\n }\n\n .le-skin-mobile {\n margin-top: 64px;\n }\n"}})};function z(n){var t=n.leadApi,a=n.leadSiteId,l=n.leadDomain,i=n.onShowPopup,d=("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(t+"api/campaign/"+a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:d,ga_client_id:o.getCookie("_ga")||null})}).then((function(e){return e.json()})).then((function(n){var t,a,c;if(console.log("List campagin: ",n),x="https://"+location.hostname+location.pathname+location.search,1==n._status){var s=n._data.campaigns;o.getCookie("hhg-id")||(o.setCookie("hhg-id",r.v1(),{domain:"."+l,path:"/"}),console.log("😍 Set HHG ID cookie"));var m=[];m=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?s.filter((function(e){return e.device_types.some((function(e){return e.id==k}))})):s.filter((function(e){return e.device_types.some((function(e){return e.id==v}))})),console.log("👓 campaignsDevice",m);var u=m.map((function(n,t){return n.targets.filter((function(e){return e.type==g})).map((function(n){return e.__assign(e.__assign({},n),{campaignIndex:t})}))})).flat(1);u=u.filter((function(e){var n=new URL(String(e.target).toLowerCase());return"exact_match"==e.option?Boolean(location.pathname===n.pathname):"start_with"==e.option?!!location.pathname.includes(n.pathname)&&!e.sub_target.filter((function(e){return"excluding"==e.option})).map((function(e){return e.value})).includes(d):void 0}));var p=Array.from(document.getElementsByTagName("META")).filter((function(e){return"article:tag"==e.getAttribute("property")})).map((function(e){return e.content})),f=[];p&&p.length&&(f=m.map((function(n,t){return n.targets.filter((function(e){return e.type==h})).map((function(n){return e.__assign(e.__assign({},n),{campaignIndex:t})}))})).flat(1).filter((function(e){return p.includes(e.target)})));var b=e.__spreadArray(e.__spreadArray([],u,!0),f,!0),_=document.cookie.split("; ").map((function(e){return e.split("=")[0]})),y=_.filter((function(e){return e.includes("lead_submited")}));console.log("--listCampaignCodeSubmited",y);var w=_.filter((function(e){return e.includes("lead_closed")}));console.log("--listCampaignCodeClosed",w);var E,N=e.__spreadArray(e.__spreadArray([],y,!0),w,!0);if(E=b.filter((function(e){return!N.some((function(n){return n.includes(m[e.campaignIndex].code)}))})).sort((function(e,n){return e.score-n.score})),console.log("--listCampaignValid : ",E),E&&E.length){var C=m[E[0].campaignIndex];console.log("CAMPAIGN_SHOW",C);var S=C.rules,B=Number(null===(t=S.find((function(e){return"time"==e.rule})))||void 0===t?void 0:t.value);console.log("timeoutRule",B);var T=Number(null===(a=S.find((function(e){return"scroll"==e.rule})))||void 0===a?void 0:a.value);console.log("scrollRule",T);var j=Number(null===(c=S.find((function(e){return"exclude_sponsored"==e.rule})))||void 0===c?void 0:c.value);console.log("excludeSponsored",j);var L=Boolean(document.querySelector(".hhg-disclaimer-text"));if(console.log("💎 LEAD current page isSponsored",L),L&&j)return;var O="TIME";if(Number.isInteger(B)&&(O="TIME",console.log("✨ SHOW AWESOME POPUP AFTER: ",B," seconds"),setTimeout((function(){null==i||i(C,O)}),1e3*B)),Number.isInteger(T)){O="SCROLL",console.log("✨ SHOW AWESOME AFTER: SCROLL",T," %");var P=document.querySelector('[data-url="'.concat(location.pathname,'"]'))||document.querySelector("body"),A=P.getBoundingClientRect().top,I=P.offsetHeight;console.log("👓 Element check scroll: ",P);var q=function(){var e=window.pageYOffset||document.documentElement.scrollTop,n=0;e>=A&&(n=Math.round((e-A)/(I-innerHeight)*100)),console.log("---Scroll",n,T),n>=T&&(window.removeEventListener("scroll",q),null==i||i(C,O))};window.addEventListener("scroll",q)}}else console.log("🚧 No lead campaigns on current URL, tags")}})).catch((function(e){console.error("Lead error: ",e)}))}exports.LeadGen=function(t){var r=t.apiUrl,d=t.siteDomain,c=t.siteId,u=t.locale,p=n.useRef(),f=n.useRef(Date.now()),g=n.useMemo((function(){var e=r;return e.includes("localhost")&&(e="https://dev.leadgen.hellobacsi.com/"),{apiUrl:e}}),[r,d,c]).apiUrl,h=n.useState(null),b=h[0],k=h[1],v=n.useState(""),_=v[0],x=v[1],y=n.useState(null),N=y[0],C=y[1],S=function(e,n){k(e),x(n)},B=function(){var e,n;if(b){console.log("👋👋👋 CLOSE POPUP ".concat(b.code," 👋👋👋"));var t=Number(null===(e=b.rules.find((function(e){return"show_again_after_exit "==e.rule})))||void 0===e?void 0:e.value),a=Number(null===(n=b.rules.find((function(e){return"days_to_show_again"==e.rule})))||void 0===n?void 0:n.value);0==t&&(a?o.setCookie("lead_closed_".concat(b.code),"target_".concat(b.extra_fields.popupVersion),{domain:"."+d,days:a,path:"/"}):o.setCookie("lead_closed_".concat(b.code),"target_".concat(b.extra_fields.popupVersion),{domain:"."+d,path:"/"})),document.body.classList.remove("noscroll"),fetch("".concat(g,"api/campaign/").concat(b.code,"/popup_exit"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:o.getCookie("hhg-id"),duration:Math.ceil((Date.now()-f.current)/1e3)})}),k(null),C(null)}};n.useEffect((function(){if(window.next){var e=m.default((function(e){console.log("--🌻 routeChangeComplete",e,Date.now());var n=location.pathname;B(),document.querySelectorAll('[data-popup-url="'.concat(n,'"]')).length||z({leadApi:g,leadDomain:d,leadSiteId:c,onShowPopup:S}),p.current&&window.removeEventListener("scroll",p.current)}),500);window.next.router.events.on("routeChangeComplete",e)}z({leadApi:g,leadDomain:d,leadSiteId:c,onShowPopup:S})}),[]);return n.useEffect((function(){b&&(f.current=Date.now())}),[b]),s.default.createElement(E.Provider,{value:{apiUrl:g,siteDomain:d,siteId:c,locale:u}},s.default.createElement(l.TranslationsContext.Provider,{value:{locale:u,values:q(u)}},s.default.createElement(M,null),a.createPortal(s.default.createElement(s.default.Fragment,null,b&&s.default.createElement(P,{campaign:b,onClose:B,onSubmit:function(n,t,a,l){return e.__awaiter(void 0,void 0,void 0,(function(){var i,r,c,s,m,u,p,f,h,k,v,_,x,y,E,N,S,T,j,L,O,P,A,I,q,M,z,D,H,V,F,R,U,W;return e.__generator(this,(function(e){switch(e.label){case 0:return n.preventDefault(),console.log("submitHandler",t,a),i=new FormData(n.currentTarget),r={},i.forEach((function(e,n){r[n]=r[n]||[],r[n].push(e)})),c=Object.keys(r).map((function(e){return{name:e,value:String(r[e])}})),s=2,m=o.getCookie("_ga")||null,window.intlTelInputUtils?[3,2]:[4,require("intl-tel-input/build/js/utils")];case 1:e.sent(),e.label=2;case 2:return u={url:location.href.toLowerCase(),title_article:document.title,meta:c.map((function(e){var n,t,a;return{key:null===(n=document.querySelector(".lead-modal__form.".concat(l,' [name="').concat(e.name,'"]')))||void 0===n?void 0:n.getAttribute("data-key"),value:(null==w?void 0:w.countryCodeNumber)&&["tel","tel1","tel2","tel3"].includes(e.name)?window.intlTelInputUtils.formatNumber(String(e.value),null==w?void 0:w.countryCodeNumber,s).replace(/\s+/g,""):e.value,control:e.name.replace("1","").replace("2","").replace("3",""),is_sent_mailchimp:(null===(a=document.querySelector(".lead-modal__form.".concat(l," .mailchimp-").concat(null===(t=document.querySelector(".lead-modal__form.".concat(l,' [name="').concat(e.name,'"]')))||void 0===t?void 0:t.getAttribute("data-key"))))||void 0===a?void 0:a.getAttribute("data-mailchimp"))||"false"}})),cookie_id:o.getCookie("hhg-id"),ga_client_id:m},t&&a[t].value_en&&(u.category=a[t].value_en),p=Number((null===(q=null===(I=b.rules)||void 0===I?void 0:I.find((function(e){return"days_to_show_again"===e.rule})))||void 0===q?void 0:q.value)||7),0==(f=Number((null===(z=null===(M=b.rules)||void 0===M?void 0:M.find((function(e){return"show_again_after_submit"===e.rule})))||void 0===z?void 0:z.value)||0))&&(console.log("⛔ Popup never show again!"),o.setCookie("lead_submited_".concat(b.code),"target_".concat(b.extra_fields.targetType),{domain:"."+d,path:"/"})),1==f&&(console.log("⌛ Popup will show again after ".concat(p," days!")),o.setCookie("lead_submited_".concat(b.code),"target_".concat(b.extra_fields.targetType),{domain:"."+d,days:p,path:"/"})),fetch("".concat(g,"api/campaign/").concat(b.code,"/lead"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}),"notshow"==b.extra_fields.popupShowThankYou?(B(),document.body.classList.remove("noscroll"),[2]):(h=!0,k=b.thank_you_image||"".concat(g,"admin/img/thanksyou.png"),v=b.extra_fields.popupThankyouTitle||"Thank you.",_=b.extra_fields.popupThankyouDesc||"We appreciate your time!",x="",y="",S="","2.1"==b.extra_fields.popupVersion&&(T=b.extra_fields,j=JSON.parse(T.listBlockThankyou),L=j.find((function(e){return"TitleBlock"==e.name})),O=j.find((function(e){return"SubtitleBlock"==e.name})),P=j.find((function(e){return"LinkButtonBlock"==e.name})),v=(null===(D=null==L?void 0:L.data)||void 0===D?void 0:D.value)||"",x=(null===(H=null==L?void 0:L.data)||void 0===H?void 0:H.align)||"",_=(null===(V=null==O?void 0:O.data)||void 0===V?void 0:V.value)||"",y=(null===(F=null==O?void 0:O.data)||void 0===F?void 0:F.align)||"",E=(null===(R=null==P?void 0:P.data)||void 0===R?void 0:R.value)||"",N=(null===(U=null==P?void 0:P.data)||void 0===U?void 0:U.newtab)||!1,S=(null===(W=null==P?void 0:P.data)||void 0===W?void 0:W.url)||"",A=b.extra_fields.currentLayout,["SkinA","SkinB","Floating","Tab","CenterTab"].includes(A)&&(h=!1)),C(h?{title:v,titleAlign:x,subtitle:_,subtitleAlign:y,link:S,linkNewTab:N,linkText:E,image:k}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},c.map((function(e){var n=e.name,t=e.value;"tel"==n?window.insider_object.user.phone_number=t:"email"==n&&(window.insider_object.user.email=t)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object)),[2])}}))}))},action:_,showThankyou:N})),i.getPopupWrapperDom())))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hhgtech/hhg-components",
3
- "version": "1.22.14",
3
+ "version": "1.22.15",
4
4
  "main": "build/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "files": [
@@ -1 +0,0 @@
1
- export declare const LeadWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;