PageSourceSearch

https://hellosayarwon.com/_next/static/chunks/d307192a-889792d451f6ebfd.js

js hellosayarwon.com collected 2026-09-25 06:25:08 UTC 239,331 bytes, 2,832 lines download raw bytes

1"use strict";(self.webpackChunkhhgDiscoverV1=self.webpackChunkhhgDiscoverV1||[]).push([[3734],{EE8p:function(e,t,n){n.r(t),n.d(t,{KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD:function(){return eN},Markdown:function(){return Markdown},PATHS:function(){return ey},SubotInline:function(){return SubotInline},SubotInlineIntentBase:function(){return e4},SubotInlineIntentBaseTarget:function(){return e5},SubotInlineRevampWithTheme:function(){return SubotInlineRevampWithTheme},SubotInlineVoucherLeftUI:function(){return SubotInlineVoucherLeftUI},TIME_RESET_RESEND_OTP:function(){return M.T},UserInfoForm:function(){return UserInfoForm},checkMobile:function(){return M.h},checkSyncDataOnFrisoCampaign:function(){return checkSyncDataOnFrisoCampaign},checkUntilFinished:function(){return M.c},clickAndOpenInNewTab:function(){return M.i},computeExtraSettingsForBot:function(){return computeExtraSettingsForBot$1},default:function(){return ContainerWithProvider},detectToSkipNodeStart:function(){return detectToSkipNodeStart},extractUnifiedAnswers:function(){return extractUnifiedAnswers},extractVoucherAnswers:function(){return extractVoucherAnswers},formatUrlWithEncrypedGa:function(){return M.j},getColorWithOpacity:function(){return getColorWithOpacity},getCurrentTotalDynamicScore:function(){return getCurrentTotalDynamicScore},getDynamicScore:function(){return getDynamicScore},getHelloSitesUrl:function(){return M.g},getHhgIdFromCookie:function(){return M.l},getPreviousStateFromStorage:function(){return getPreviousStateFromStorage},getSubotApiPath:function(){return getSubotApiPath},getSubotCookieId:function(){return M.d},getSubotInlineLogs:function(){return getSubotInlineLogs},getUserIdFromCookie:function(){return M.b},getUserInfoFromCookie:function(){return M.e},getWindowId:function(){return M.f},handleFrisoRedirecition:function(){return handleFrisoRedirecition},hexRgb:function(){return hexRgb},isFakeEmail:function(){return M.k},overrideParamsByQuery:function(){return M.o},replaceTextWithVariables:function(){return replaceTextWithVariables},saveSubotInlineLogs:function(){return saveSubotInlineLogs},ssoIntents:function(){return M.s},subotInlineClick:function(){return subotInlineClick$1},subotInlineFirstNode:function(){return subotInlineFirstNode$1},subotInlineImpression:function(){return subotInlineImpression$1},subotInlineMessage:function(){return subotInlineMessage$1}});var i,l,o,a,r,s,d,c,u,m,p,v,g,b,f,h=n("+OUp"),_=n.n(h),E=n("88Tq"),x=n("mup0"),y=n("9VLu"),w=n("JIJ2"),I=n("Sn6X"),S=n.n(I),C=n("KYiY"),O=n.n(C),k=n("h7dN"),N=n("gY0P"),T=n.n(N),M=n("LFwL"),A=n("8BcA"),$=n.n(A),P=n("xrdX"),B=n("vH4S"),L=n("xXM3"),j=n.n(L),U=n("SXHf"),R=n("ogwB"),D=n("O1Tr"),F=n("rBCA"),G=n("Xp1P"),H=n("YtXE"),z=n("h4z8"),V=n("VLUI"),q=n("O/o9"),W=n("5GB8"),Y=n("s3Wo"),X=n.n(Y),K=n("nozM"),J=n("hHL7"),Z=n("E13D"),Q=n("iBNF"),ee=n("GOBr"),et=n("Bril"),en=n("E+oP"),ei=n.n(en),el=n("wUmw"),eo=n("A9bs"),ea=n("GcSG"),er=n("99ux"),es=n("gEnE"),ed=n("11Kd"),ec=n("jvfN"),eu=n("K5rT"),em=n("HtuZ"),ep=n("c5l1"),ev=n("3yHj"),eg=n("nVj7"),eb=n("oOSY"),ef=n("YHQg"),eh=n("v+NT"),e_=n("MzRI");n("NmYn");var eE=n("yNk5");let ex=S().extend(O()),ey={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LA
1NDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},ew={cached:{},clearCached:e=>{console.log(ew.cached),Object.keys(ew.cached).filter(t=>t.startsWith(e)).forEach(e=>{console.log(e),ew.cached[e]=void 0})},withCached:(e,t)=>(0,x._)(void 0,void 0,void 0,function*(){if("waitingTheFirstResponse"===ew.cached[e])return new Promise(t=>{let n=new Date().getTime(),i=setInterval(()=>{let l=new Date().getTime();l-n>3e3&&clearInterval(i),"object"==typeof ew.cached[e]&&(t(ew.cached[e]),clearInterval(i))},100)});if("object"==typeof ew.cached[e])return ew.cached[e];ew.cached[e]="waitingTheFirstResponse";try{let n=yield t();return ew.cached[e]=n,setTimeout(()=>{ew.cached[e]=void 0},18e5),n}catch(t){return ew.cached[e]=void 0,Promise.reject(t)}})},getSubotApiPath=(e,t)=>{let{subotApiUrl:n}=null===k.G||void 0===k.G?void 0:k.G.env,i=n.endsWith("frontend/api/")?n:n+"frontend/api/";return i+T()(e,Object.assign({},t))},subotInlineMessage$1=e=>(0,x._)(void 0,void 0,void 0,function*(){try{return yield(0,k.c)(getSubotApiPath(ey.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}}),computeExtraSettingsForBot$1=e=>{var t;if((null==e?void 0:e._status)===1&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{let t=JSON.parse(e._data.extra_settings);"object"==typeof t?e._data.extra_settings=t:e._data.extra_settings={sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},subotInlineFirstNode$1=e=>(0,x._)(void 0,void 0,void 0,function*(){try{let t=yield ew.withCached("SubotInlineFirstNode/"+e,()=>(0,x._)(void 0,void 0,void 0,function*(){let t=yield(0,k.c)(getSubotApiPath(ey.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return computeExtraSettingsForBot$1(t),t}));return t}catch(e){return null}}),subotInlineClick$1=e=>(0,x._)(void 0,void 0,void 0,function*(){try{return yield(0,k.c)(getSubotApiPath(ey.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}}),subotInlineImpression$1=e=>(0,x._)(void 0,void 0,void 0,function*(){try{return yield(0,k.c)(getSubotApiPath(ey.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}}),calcAge=e=>{let t=$()(e),n=$()();return{birthDate:t,today:n,age:n.diff(t,"year")}},validateAge=(e,t,n)=>{let{birthDate:i,today:l}=calcAge(e);
1if(!n||!n.length)return!0;let o=l.diff(i,"M")/12;if(o<0||0===o&&l.date()<i.date())return t;let a=!1;if(Array.isArray(n))for(let e of n){let{from:t,to:n}=e||{};if(!t&&!n)break;if(t<=o&&o<=n||t<=o&&null===n||null===t&&n<=o){a=!0;break}}return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug")&&console.log("Log __DOB__ : ",{conditions:n,isValid:a,diff:o}),a||t},getDynamicScore=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},getCurrentTotalDynamicScore=(e,t,n,i)=>{let l=getDynamicScore(e[0]);if(!t)return{};let o=e.findIndex(e=>e.id==t),a=e.reduce((e,a,r)=>{var s,d;if(r>o)return e;let c=n&&a.id===t?{action_id:n}:a._message,u=0,m=null===(s=a.actions)||void 0===s?void 0:s.find(e=>e.id===(null==c?void 0:c.action_id));u+=(null==m?void 0:m.score)||0;let p=void 0!==l[a.id],v=n&&a.id===t?i:null==c?void 0:c.form_submit_meta;if(p&&a.type===E.d.FORM&&v){let e=l[a.id].action_ids.map(e=>e.id),t=l[a.id].action_ids.map(e=>e.variableName),n=l[a.id].formula,i=null===(d=a.actions)||void 0===d?void 0:d.filter(t=>e.includes(t.id)),o=v.filter(e=>i.find(t=>t.key===e.key)&&(e.control===E.E[E.f.USER_SUBMIT_NUMBER]||e.control===E.E[E.f.USER_SUBMIT_DOB])),r=t.map((t,n)=>{let l=e[n],a=i.find(e=>e.id===l),r=o.find(e=>(null==a?void 0:a.key)===e.key&&(e.control===E.E[E.f.USER_SUBMIT_NUMBER]||e.control===E.E[E.f.USER_SUBMIT_DOB]));if(!r)return"";if(r.control===E.E[E.f.USER_SUBMIT_DOB]){let{age:e}=calcAge($()(r.value).toDate());return`var ${t} = ${e};`}return`var ${t} = ${r.value};`}).join("");try{let e=Function(`${r} return ${n}`)();isNaN(e)||(u+=Math.round(e))}catch(e){}}return e+u},0);return{current_total_dynamic_score:a}},replaceTextWithVariables=(e,t)=>{let n=getDynamicScore(t[0]);try{let i=t.filter(e=>e.type===E.d.FORM);Object.keys(n).forEach(t=>{var l,o,a;let r=i.find(e=>e.id===t),s=n[t].action_ids.map(e=>e.id),d=n[t].action_ids.map(e=>e.variableName),c=n[t].formula,u=null===(l=null==r?void 0:r.actions)||void 0===l?void 0:l.filter(e=>s.includes(e.id)),m=null===(a=null===(o=null==r?void 0:r._message)||void 0===o?void 0:o.form_submit_meta)||void 0===a?void 0:a.filter(e=>u.find(t=>t.key===e.key)&&(e.control===E.E[E.f.USER_SUBMIT_NUMBER]||e.control===E.E[E.f.USER_SUBMIT_DOB]));if(n[t].formula&&n[t].formula_result_name&&(null==m?void 0:m.length)){let i=d.map((e,t)=>{let n=s[t],i=u.find(e=>e.id===n),l=m.find(e=>(null==i?void 0:i.key)===e.key&&(e.control===E.E[E.f.USER_SUBMIT_NUMBER]||e.control===E.E[E.f.USER_SUBMIT_DOB]));return l?`var ${e} = ${l.value};`:""}).join(""),l=Function(`${i} return ${c}`)(),o=n[t].formula_result_name;if(!isNaN(l)&&e.includes(`{{var:${o}}}`)){let t=RegExp(`{{var:${o}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}}),i.map(t=>{var n,i;null===(i=null===(n=t._message)||void 0===n?void 0:n.form_submit_meta)||void 0===i||i.map(t=>{let n=t.key,i=t.value,l=RegExp(`{{var:${n}}}`,"g");e=e.replace(l,i)})})}catch(e){console.log("[replaceTextWithVariables]",e)}return e},eI="a-f\\d",eS=`#?[${eI}]{3}[${eI}]?`,eC=`#?[${eI}]{6}([${eI}]{2})?`,eO=RegExp(`[^#${eI}]`,"gi"),ek=RegExp(`^${eS}$|^${eC}$`,"i");function hexRgb(e,t){if("string"!=typeof e||eO.test(e)||!ek.test(e))throw TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;8===e.length&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),4===e.length&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let i=Number.parseInt(e,16),l="number"==typeof t.alpha?t.alpha:n;return[i>>16,i>>8&255,255&i,l]}let eN="other",eT="stateInlineSSO",getPreviousStateFromStorage=(e,{getParams:t})=>{try{if(!(0,M.b)())return null;let n=JSON.parse(localStorage.getItem(eT)||"");if((null==n?void 0:n.botId)===e&&n.listNodes&&n.activeId&&n.createdAt+18e5>Date.now()){localStorage.removeItem(eT);let e=n.listNodes.slice(-1)[0].position===E.c.SSO;if(e)return{listNodes:n.listNodes,activeId:n.activeId,params:Object.assign(Object.assign(Object.assign({},t()),n.params),{account_id:(0,M.b)()||null,cookie_id:(0,M.d)(n.params.cookie_id)})}}return null}catch(e){return null}},getSubotInlineLogs=e=>(0,x._)(void 0,void 0,void 0,function*(){var t,n;try{if(!e)return null;let i=yield(0,k.c)(getSubotApiPath(ey.GET_SUBOT_LOG,{botId:e.id,cookieId:(0,M.d)(),accountId:(0,M.b)()||"",type:"inline"}),"GET");if(!(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.data)||(null===(n=null==i?void 0:i._data)||void 0===n?void 0:n.type)!=="inline")return null;let l=JSON.parse(i._data.data),o=l.nodes,a="in_progress"===i._data.status,r="complete"===i._data.status;if(a||r)return{nodes:[e,...o],activeId:l.activeId,params:Object.assign(Object.assign({},l.params),{account_id:(0,M.b)()||l.params.account_id||null})};return null}catch(e){return null}}),getExtraLogsWithCarePath=()=>{try{let e=window.next,t=e.router.components["/[...slug]"].props.pageProps,n="services-connection"===t.template;if(!n)return{};return{project_id:"care-path",user_funnel:t.spotlight.additionalSlugActive||"",audience_name:t.spotlight.groupIdActive||""}}catch(e){return{}}},extractUnifiedAnswers=e=>{let t=e.filter(e=>"Unified Questions"===e.name),n=t.reduce((e,t)=>
1{var n,i,l,o,a,r,s,d,c,u,m,p,v,g,b,f,h,_,x,y,w;if(t.actions&&(null===(n=t._message)||void 0===n?void 0:n.action_id)&&(null===(i=t._message)||void 0===i?void 0:i.action_value)){let n=t._message.action_value;if(t.type===E.d.FORM){let n=["address","province","district","commune"],i=((null===(l=t._message)||void 0===l?void 0:l.form_submit_meta)||[]).filter(e=>!n.includes(e.control)),m=((null===(o=t._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter(e=>n.includes(e.control)).reduce((e,t)=>(e[t.control]=t,e),{}),p=[null===(a=m.address)||void 0===a?void 0:a.value,null===(r=m.commune)||void 0===r?void 0:r.value,null===(s=m.district)||void 0===s?void 0:s.value,null===(d=m.province)||void 0===d?void 0:d.value].filter(Boolean).join(", ");p&&m.address?e.push({attribute:m.address.key,value:p,label_question:(null===(u=null===(c=t.intents)||void 0===c?void 0:c[0])||void 0===u?void 0:u.label)||""}):i.forEach(n=>{var i,l;e.push({attribute:n.key,value:n.value,label_question:(null===(l=null===(i=t.intents)||void 0===i?void 0:i[0])||void 0===l?void 0:l.label)||""})})}if(t.type===E.d.TEXT){if(t.is_multi_select){let n=Object.keys(t._message.selected_actions||{}),i=t.actions.filter(e=>e.label&&n.includes(e.id)).map(e=>e.label);n.length&&e.push({attribute:t.actions[0].key||"",value:i,label_question:(null===(p=null===(m=t.intents)||void 0===m?void 0:m[0])||void 0===p?void 0:p.label)||""})}else{let i=t._message.action_id,l=t.actions.find(e=>e.id===i),o=null==l?void 0:l.label,a=null===(b=null===(g=null===(v=t._message)||void 0===v?void 0:v.form_submit_meta)||void 0===g?void 0:g.find(e=>e.key===eN))||void 0===b?void 0:b.value,r=(null==l?void 0:l.type)===E.f.USER_CHOICE_TEXT_BY_INPUT;o&&i&&e.push({attribute:n,value:r&&a?a:o,label_question:(null===(h=null===(f=t.intents)||void 0===f?void 0:f[0])||void 0===h?void 0:h.label)||""})}}if(t.type===E.d.POLL){let n=t.id,i=(null===(x=null===(_=t._message)||void 0===_?void 0:_.current_polls)||void 0===x?void 0:x[n])||[],l=t.actions.filter(e=>e.label&&i.includes(e.id)).map(e=>e.label);i.length&&e.push({attribute:t.actions[0].key||"",value:l,label_question:(null===(w=null===(y=t.intents)||void 0===y?void 0:y[0])||void 0===w?void 0:w.label)||""})}}return e},[]);return n},extractVoucherAnswers=(e,t)=>{var n;try{if((null===(n=t.extra_settings)||void 0===n?void 0:n.subot_type)!=="ACUVUE")return;let i="",l="",o="",a="",r="",s={},d=(0,M.e)().email;if((e||[]).forEach(e=>{var t,n,c,u,m,p,v,g;let b=e._message;if(!b)return;let f=null===(t=e.actions)||void 0===t?void 0:t.find(e=>e.id===b.action_id);if("voucher_product"===b.action_value?i=(null==f?void 0:f.label)||"":"voucher_color"===b.action_value&&(l=(null==f?void 0:f.label)||""),e.type===E.d.FORM){let logicFind=e=>t=>t.key===e,e=null===(n=b.form_submit_meta)||void 0===n?void 0:n.find(logicFind("voucher_size")),t=null===(c=b.form_submit_meta)||void 0===c?void 0:c.find(logicFind("voucher_location")),f=null===(u=b.form_submit_meta)||void 0===u?void 0:u.find(logicFind("voucher_product")),h=null===(m=b.form_submit_meta)||void 0===m?void 0:m.find(logicFind("voucher_color")),_=null===(p=b.form_submit_meta)||void 0===p?void 0:p.find(e=>"email"===e.control),E=null===(v=b.form_submit_meta)||void 0===v?void 0:v.find(e=>"tel"===e.control);e&&(o=e.value),t&&(a=t.value),f&&(i=f.value),h&&(l=h.value),_&&(d=_.value),E&&(r=E.value),null===(g=b.form_submit_meta)||void 0===g||g.filter(e=>!["voucher_size","voucher_location","voucher_product","voucher_color","email","tel"].includes(e.control)).forEach(e=>{s[e.key]=e.value})}}),d)return Object.assign(Object.assign({},s),{email:d,voucherName:"ACUVUE\xae OASYS (1-DAY) WITH HYDRALUXE\xae"===i?i:i&&l&&o?`${i}|${l}|${o}`:"N/A",voucher_product:i||"N/A",voucher_location:a,voucher_size:o||"N/A",voucher_color:l||"N/A",phone:r})}catch(e){console.log("ExtractVoucherAnswer",e)}},saveSubotInlineLogs=({nodes:e,activeId:t,params:n,accountIdFromLogs:i})=>(0,x._)(void 0,void 0,void 0,function*(){try{let l="in_progress",o=e[e.length-1];(null==o?void 0:o.type)&&E.e.includes(o.type)&&(l="complete");let a=e.slice(1),r={activeId:t,params:n,nodes:a,tracking:Object.assign(Object.assign({},getExtraLogsWithCarePath()),{full_url:window.location.href}),unifiedAnswers:extractUnifiedAnswers(a),voucherAnswers:extractVoucherAnswers(a,e[0])};console.log("data.voucherAnswers",r.voucherAnswers);let s={cookie_id:(0,M.d)(),account_id:i||(0,M.b)()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(r),status:l,type:"inline",market:P.H[k.u]};yield(0,k.c)(getSubotApiPath(ey.POST_SUBOT_CREATE_LOG),"POST",{data:s})}catch(e){}}),getColorWithOpacity=(e,t)=>
1{try{let[n,i,l]=hexRgb(e,{format:"array"});return`rgba(${n}, ${i}, ${l}, ${t})`}catch(e){return}},detectToSkipNodeStart=(e,t,n)=>{if(!(null==e?void 0:e.subot_field_type))return[t,n];let i=n.find(e=>e.id==t),l=i&&i.hasOwnProperty("first_node");return l&&n.length>1?[n[1].id,n]:[t,n]},eM=(0,h.createContext)({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),SubotInlineProvider=({children:e,articleLink:t,subotId:n,isFullContainer:i,bgColor:l,primaryColor:o,textColor:a,textButtonColor:r,bgContentColor:s,bgImgFullContainer:d,isDisabledAnimationOnMobile:c,onCloseMobile:u,userInfo:m,typeFormProps:p,customUrl:v,isMobile:g,locale:b})=>{let{formatMessage:f,action:{pushNotifications:E}}=(0,h.useContext)(k.T),I=(0,h.useRef)(null),S=(0,h.useRef)(null),[C,O]=(0,h.useState)(!0),[N,T]=(0,h.useState)(""),[A,$]=(0,h.useState)([]),[P,B]=(0,h.useState)(!1),[L,j]=(0,h.useState)({});(0,h.useEffect)(()=>{let e=l||"#e3f2ff",t=o||"#2d87f3",n=new Date().getTime(),i=setInterval(()=>{let l=I.current,o=new Date().getTime();l&&(ex.mutate(()=>{l.style.setProperty("--subot-inline-bg-color",e),l.style.setProperty("--subot-inline-primary-color",t),l.style.setProperty("--subot-inline-primary-color-hover",getColorWithOpacity(t,.9)||t),l.style.setProperty("--subot-inline-primary-color-100",getColorWithOpacity(t,.1)||"#e3f2ff"),l.style.setProperty("--subot-inline-primary-color-300",getColorWithOpacity(t,.3)||"#bcdeff"),a&&l.style.setProperty("--subot-inline-text-color",a),r&&l.style.setProperty("--subot-inline-text-button-color",r),s&&l.style.setProperty("--subot-inline-bg-content-color",s)}),clearInterval(i)),o-n>18e4&&clearInterval(i)},100);return()=>{clearInterval(i)}},[l,o,a,r,s]);let U=(0,h.useCallback)(()=>{let e=window.gaData,i=(v||window.location.origin+y.b)+((null===k.G||void 0===k.G?void 0:k.G.locale)==="tl-PH"?t.replace("fil/",""):t),l={bot_id:n,account_id:(0,M.b)()||null,action_id:"",action_value:"",cookie_id:(0,M.d)(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:w.A.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:i.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:(0,M.f)()};return(0,M.o)(l,null===k.G||void 0===k.G?void 0:k.G.router.query)},[]),R=(0,h.useCallback)(()=>{var e;null===(e=I.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})},[]),D=(0,h.useCallback)((e,t=!0)=>(0,x._)(void 0,void 0,void 0,function*(){var n;if(!e||!e.url||!e.bot_id)return;let i="",l=[];O(!0);let o=yield subotInlineFirstNode$1(e.bot_id);(null==o?void 0:o._status)===1&&(i=null==o?void 0:o._data.id.toString(),l.push(null==o?void 0:o._data,null==o?void 0:o._data.first_node));let a=t?yield getSubotInlineLogs(l[0]):null;a&&(l=a.nodes,i=a.activeId,S.current=(null===(n=a.params)||void 0===n?void 0:n.account_id)||0);let r=getPreviousStateFromStorage(e.bot_id,{getParams:U});if(r&&r.params.action_id&&r.params.action_value){let e=yield subotInlineMessage$1(r.params);(null==e?void 0:e._status)===1&&(null==e?void 0:e._data.node)&&(i=null==e?void 0:e._data.node.id,(l=r.listNodes)[l.length-1]=null==e?void 0:e._data.node,saveSubotInlineLogs({nodes:l,activeId:i,params:r.params,accountIdFromLogs:S.current}),setTimeout(()=>{R()},100))}let s=(null==r?void 0:r.params)||(null==a?void 0:a.params)||e,[d,c]=detectToSkipNodeStart(l[0],i,l);O(!1),T(d),$(c),j(Object.assign(Object.assign({},e),s))}),[]),F=(0,h.useCallback)((e,t)=>{let i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${n}"]`);i&&i.click();let l=N,o=[...A];if(null==t?void 0:t.node_id){let e=o.findIndex(({id:e})=>e==t.node_id);-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(O(!0),e){let t=o.findIndex(({id:t})=>t==(null==e?void 0:e.id));if(-1===t)o=[...o,Object.assign({},e)];else{let n=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},n),...o.slice(t+1)]}l=e.id}setTimeout(()=>{$(o),T(l),O(!1),saveSubotInlineLogs({nodes:o,activeId:l,params:L,accountIdFromLogs:S.current})},250)},[A,N]),G=(0,h.useCallback)(e=>(0,x._)(void 0,void 0,void 0,function*(){if(null==e?void 0:e.node_id){let t=Object.assign(Object.assign({},e),getCurrentTotalDynamicScore(A,N,e.action_id)),n=yield subotInlineMessage$1(t);if(O(!1),(null==n?void 0:n._status)===1){let e=null==n?void 0:n._data,{node:i}=e,l=(0,x.a)(e,["node"]),o=Object.assign(Object.assign({},i),{_message:Object.assign(Object.assign({},l),{node_id:i.id})});A.findIndex(e=>e.id===o.id),F(o,t);return}E({title:f({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}let t=A.find(e=>e.id==N),n=t&&t.hasOwnProperty("first_node");n&&(T(A[1].id.toString()),saveSubotInlineLogs({nodes:A,activeId:A[1].id.toString(),params:U(),accountIdFromLogs:S.current}))}),[F,A]),H=(0,h.useCallback)(()=>{let e=A.findIndex(({id:e})=>e==N);if(e&&-1!==e&&e>1){let t=A[e-1];T(t.id),saveSubotInlineLogs({nodes:A,activeId:t.id,params:L,accountIdFromLogs:S.current})}},[A,N]),z=(0,h.useCallback)(()=>{let e=U();D(e,!1);let t=A[0],n=A[1];saveSubotInlineLogs({nodes:[t,n],activeId:String(t.id),params:e,accountIdFromLogs:S.current})},[U,D,A]),V=(0,h.useCallback)(e=>{$(t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==N?t.map(t=>
1t.id===N?Object.assign(Object.assign({},t),{_message:t._message?Object.assign(Object.assign({},t._message),e):e}):t):t)},[N]);(0,h.useEffect)(()=>{if(w.A.get(y.G)){let e=U();D(e)}else(0,M.c)({condition:()=>!!w.A.get(y.G),finished:()=>{let e=U();D(e)}})},[]),(0,h.useEffect)(()=>{if(!A.length)return;let e=A.find(e=>e.id==N);e&&N||T(n+"")},[N,A]);let q=(0,h.useMemo)(()=>({activeId:N,params:L,listNodes:A,loading:C,setLoading:O,getParams:U,onNext:G,onPrev:H,onSubmit:F,onStartOver:z,onChange:V,isShowFooter:P,setIsShowFooter:B,isFullContainer:i,bgImgFullContainer:d,isDisabledAnimationOnMobile:c,onCloseMobile:u,userInfo:m,typeFormProps:p,isMobile:g,locale:b}),[N,G,H,F,V,z,P,L,A,C,O,U,i,c,u,m,d,p,g,b]);return A.length?_().createElement(eM.Provider,{value:q},_().createElement("div",{ref:I},e)):null},Close=e=>_().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M5.991 4.99a1 1 0 0 0-.697 1.717L10.587 12l-5.293 5.293a1 1 0 1 0 1.414 1.415L12 13.415l5.293 5.293a1 1 0 1 0 1.414-1.415L13.415 12l5.293-5.293a1 1 0 1 0-1.414-1.414L12 10.586 6.708 5.293a1 1 0 0 0-.717-.302",fill:"#595959"})),eA="480px",e$=F.A.div`
2  position: relative;
3
4  .si-inline-revamp-container {
5    height: 80vh;
6    max-height: ${eA};
7    display: flex;
8    flex-direction: column;
9    padding: 12px 8px 12px 12px;
10    border-radius: 12px;
11    background-size: cover;
12    position: relative;
13    border: 1px solid var(--subot-inline-primary-color-300);
14    justify-content: center;
15    background-color: var(--subot-inline-bg-content-color, #fff);
16    position: absolute;
17    top: 0;
18    left: 0;
19    right: 0;
20    bottom: 0;
21    &.si-typeform {
22      display: block;
23      padding: 0;
24      border: 0;
25      background: #fff !important;
26
27      ${G.M.mbDown} {
28        max-height: none;
29        height: auto;
30      }
31    }
32  }
33
34  .si-container-placeholder {
35    width: 100%;
36    height: 80vh;
37    max-height: ${eA};
38    pointer-events: none;
39  }
40
41  ${G.M.mbUp} {
42    .si-inline-revamp-container {
43      padding-right: 12px;
44    }
45  }
46
47  .subot-inline-revamp-container {
48    width: 100%;
49    max-height: 100%;
50    overflow-y: auto;
51    padding-right: 8px;
52    padding-bottom: 16px;
53    position: relative;
54    .si-voucher-left-ui {
55      width: 100%;
56    }
57    .si-loading {
58      position: absolute;
59      top: 50%;
60      left: 50%;
61      z-index: 2;
62      transform: translate(-50%, -50%);
63    }
64
65    &[data-show-footer='true'] {
66      height: calc(100% - 72px);
67    }
68
69    ${G.M.mbUp} {
70      &[data-show-footer='true'] {
71        height: calc(100% - 56px);
72      }
73    }
74
75    &::-webkit-scrollbar {
76      width: 4px;
77      height: 4px;
78    }
79
80    &::-webkit-scrollbar-track {
81      background-color: transparent;
82    }
83
84    &::-webkit-scrollbar-thumb {
85      background-color: var(--subot-inline-text-color, #8c8c8c);
86      border-radius: 2px;
87      outline: none;
88    }
89  }
90
91  ${G.M.mbUp} {
92    .si-container-placeholder {
93      height: 550px;
94      max-height: 550px;
95      max-width: 100%;
96    }
97    .si-inline-revamp-container {
98      height: 550px;
99      max-height: 550px;
100      max-width: 100%;
101      padding: 48px;
102      border-radius: 20px;
103
104      &.si-full-container-config {
105        &:not(.si-typeform) {
106          height: 654px;
107          max-height: 654px;
108
109          & + .si-container-placeholder {
110            height: 654px;
111            max-height: 654px;
112          }
113        }
114      }
115    }
116    .si-close-btn {
117      display: none !important;
118    }
119  }
120
121  ${G.M.mbDown} {
122    .si-container-open {
123      position: fixed;
124      width: auto;
125      height: auto;
126      max-width: 100%;
127      max-height: 100%;
128      z-index: 999;
129      border-radius: 0;
130      padding-top: 60px;
131    }
132
133    .si-close-btn {
134      top: 16px;
135      right: 16px;
136      position: absolute;
137      border: 1px solid #e4e8ec;
138      border-radius: 50%;
139      width: 32px;
140      height: 32px;
141      padding: 3px;
142      color: var(--subot-inline-text-color, rgb(89, 89, 89));
143
144      svg {
145        display: block;
146      }
147
148      path {
149        fill: currentColor;
150      }
151    }
152  }
153`,eP=F.A.div`
154  background-color: var(--subot-inline-bg-color);
155  padding: 40px 0;
156  font-family: Inter;
157
158  ${G.M.mbUp} {
159    padding: 80px 0;
160  }
161
162  .si-container {
163    display: flex;
164    align-items: stretch;
165    gap: 16px;
166    margin: 0 auto;
167    flex-direction: column;
168
169    ${G.M.mbUp} {
170      flex-direction: row;
171      gap: 30px;
172    }
173
174    &.si-no-left-info {
175      ${G.M.mbUp} {
176        flex-direction: column;
177        align-items: flex-end;
178
179        .si-revamp-right {
180          max-width: 720px;
181          min-width: 0;
182          width: 100%;
183        }
184
185        .disclaimer-bottom.subot-form {
186          display: block;
187          width: 100%;
188          max-width: 720px;
189        }
190      }
191    }
192
193    &.si-typeform-container {
194      flex-direction: column;
195      .si-revamp-left,
196      .si-revamp-right {
197        max-width: none;
198      }
199      ${G.M.mbDown} {
200        .si-revamp-right {
201          height: 80vh;
202          margin-left: -16px;
203          margin-right: -16px;
204          div,
205          iframe {
206            height: 100%;
207            border-radius: 0;
208          }
209        }
210      }
211    }
212  }
213
214  .disclaimer-top {
215    &.type-form {
216      display: none;
217    }
218    ${G.M.mbDown} {
219      &.subot-form {
220        display: none;
221      }
222    }
223  }
224  .disclaimer-bottom {
225    ${G.M.mbUp} {
226      &.subot-form {
227        display: none;
228      }
229    }
230  }
231
232  .si-revamp-right {
233    max-width: 100%;
234
235    .markdown {
236      min-width: 0;
237      word-break: break-word;
238
239      a {
240        color: var(--subot-inline-primary-color);
241
242        &:hover {
243          text-decoration: underline;
244        }
245      }
246    }
247
248    ${G.M.mbUp} {
249      max-width: ${eA};
250      min-width: ${eA};
251    }
252
253    ${G.M.tdUp} {
254      max-width: 720px;
255      min-width: 720px;
256    }
257  }
258
259  .si-revamp-left {
260    display: flex;
261    gap: 24px;
262    flex-direction: column;
263    max-width: 490px;
264
265    ${G.M.mbUp} {
266      padding-top: 48px;
267    }
268
269    .si-image {
270      width: 64px;
271      flex-shrink: 0;
272    }
273
274    .si-headline {
275      color: var(--subot-inline-text-color, #262626);
276      font-size: 28px;
277      font-style: normal;
278      font-weight: 400;
279      line-height: 1.2;
280      letter-spacing: -0.616px;
281
282      ${G.M.mbUp} {
283        font-size: 40px;
284        line-height: 48px;
285        letter-spacing: -0.88px;
286      }
287
288      strong,
289      b {
290        font-weight: 600;
291      }
292    }
293  }
294`,eB=F.A.div`
295  margin-top: auto;
296
297  .si-disclaimer {
298    gap: 8px;
299    display: inline-flex;
300    align-items: center;
301    cursor: pointer;
302  }
303  .si-disclaimer-desc {
304    /* color: #262626; */
305    color: var(--subot-inline-text-color, #262626);
306    font-size: 14px;
307    font-weight: 600;
308    line-height: 150%;
309    letter-spacing: -0.07px;
310  }
311  .si-disclaimer-down {
312    /* color: black; */
313    color: var(--subot-inline-text-color, black);
314  }
315
316  .si-disclaimer-expanded {
317    font-size: 12px;
318    /* color: #595959; */
319    color: var(--subot-inline-text-color, #595959);
320    line-height: 1.4;
321    padding-top: 8px;
322    overflow: hidden;
323  }
324`,ChevronDown=e=>_().createElement("svg",Object.assign({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M8 9.416 4.584 5.999A.73.73 0 0 0 3.52 6a.73.73 0 0 0 .007 1.07l3.953 3.95q.113.105.244.156a.8.8 0 0 0 .281.053q.15 0 .282-.053a.7.7 0 0 0 .235-.156l3.951-3.951a.73.73 0 0 0 .237-.528.72.72 0 0 0-.23-.52.73.73 0 0 0-1.062 0z",fill:"
324currentColor"})),Info=e=>_().createElement("svg",Object.assign({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M9.996 14.5q.316 0 .535-.216a.72.72 0 0 0 .219-.534v-3.5a.73.73 0 0 0-.214-.534.72.72 0 0 0-.532-.216.73.73 0 0 0-.535.216.72.72 0 0 0-.219.534v3.5q0 .319.214.534a.72.72 0 0 0 .532.216m0-6.5q.316 0 .535-.214a.7.7 0 0 0 .219-.532.74.74 0 0 0-.214-.535.7.7 0 0 0-.532-.219.74.74 0 0 0-.535.214.7.7 0 0 0-.219.532q0 .316.214.535T9.996 8m.01 10.5a7.8 7.8 0 0 1-3.11-.625 8.1 8.1 0 0 1-2.552-1.719 8.1 8.1 0 0 1-1.719-2.551A7.8 7.8 0 0 1 2 10.491q0-1.657.625-3.106a8.07 8.07 0 0 1 4.27-4.26 7.8 7.8 0 0 1 3.114-.625 7.75 7.75 0 0 1 3.106.625q1.447.625 2.541 1.719a8.1 8.1 0 0 1 1.719 2.546A7.8 7.8 0 0 1 18 10.494a7.8 7.8 0 0 1-.625 3.11 8.1 8.1 0 0 1-1.719 2.552 8.1 8.1 0 0 1-2.546 1.719 7.8 7.8 0 0 1-3.104.625M10 17q2.709 0 4.604-1.896T16.5 10.5t-1.896-4.604T10 4Q7.291 4 5.396 5.896T3.5 10.5t1.896 4.604T10 17",fill:"#FE921D"})),Container$v=({className:e})=>{let[t,n]=(0,h.useState)(!1),{formatMessage:i}=(0,h.useContext)(k.T);return _().createElement(eB,{className:e},_().createElement("div",{className:"si-disclaimer",onClick:()=>n(!t)},_().createElement(Info,{className:"si-disclaimer-info-svg"}),_().createElement("span",{className:"si-disclaimer-desc"},i({id:"tools.disclaimer",defaultMessage:"Miễn trừ tr\xe1ch nhiệm"})),_().createElement(ChevronDown,{className:"si-disclaimer-down"})),_().createElement(D.P.div,{className:"si-disclaimer-expanded",animate:t?{height:"auto"}:{height:0},transition:{duration:.3}},i({id:"tool.subot.inline.disclaimer.content",defaultMessage:"C\xf4ng cụ n\xe0y kh\xf4ng cung cấp lời khuy\xean y tế m\xe0 chỉ d\xf9ng để cung cấp th\xf4ng tin. N\xf3 kh\xf4ng thay thế cho lời khuy\xean, chẩn đo\xe1n hoặc điều trị y tế chuy\xean nghiệp từ b\xe1c sĩ. Nếu bạn đang t\xecm phương ph\xe1p điều trị hay đang điều trị, đừng bỏ qua lời khuy\xean y tế từ b\xe1c sĩ chỉ v\xec một số th\xf4ng tin bạn đ\xe3 đọc tr\xean website của ch\xfang t\xf4i. Nếu bạn nghĩ rằng m\xecnh đang trong t\xecnh trạng khẩn cấp, h\xe3y li\xean hệ với b\xe1c sĩ ngay lập tức."})))};Container$v.displayName="SubotInlineDisclaimer";let useCurrentUrl=()=>{let{data:{locale:e,router:t}}=(0,h.useContext)(k.T),{asPath:n}=t||{},[i,l]=(0,h.useState)(()=>`${(0,M.g)(e,!1)}${y.b}${n}`);return(0,h.useEffect)(()=>
324{l(window.location.href)},[n]),i},useValidationMultiOption=()=>{let{formatMessage:e,action:{pushNotifications:t}}=(0,h.useContext)(k.T);return{validateSelectActions:(n,i,l)=>{if((null==i?void 0:i.multi_select_option)===E.g.EXACT_NUMBER&&n.length!==(null==i?void 0:i.from)){t({message:e({id:"multiSelectError.exactNumber",defaultMessage:"You must choose {from} answers."},{from:i.from}),type:"warning"});return}if((null==i?void 0:i.multi_select_option)===E.g.RANGE&&(n.length<(null==i?void 0:i.from)||n.length>(null==i?void 0:i.to))){t({title:"",message:e({id:"multiSelectError.range",defaultMessage:"You must choose from {from} to {to} answers (Ex: You must choose from 3 to 5 answers)"},{from:i.from,to:i.to}),type:"warning"});return}if(n.length)l();else{t({title:"",message:e({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"});return}}}},eL=F.A.div`
325  display: flex;
326  margin-top: auto;
327  flex-direction: row;
328  justify-content: space-between;
329
330  .si-footer-start-over {
331    display: flex;
332    gap: 8px;
333    align-items: center;
334    height: 40px;
335    font-weight: 600;
336    font-size: 14px;
337    color: var(--subot-inline-text-color, #595959);
338    cursor: pointer;
339    transition: all 0.3s ease;
340    text-align: left;
341
342    :disabled {
343      opacity: 0.6;
344      pointer-events: none;
345    }
346
347    &:not(:disabled):hover {
348      color: var(--subot-inline-primary-color);
349    }
350  }
351
352  .si-footer-actions {
353    gap: 16px;
354    display: flex;
355  }
356
357  ${G.M.mbDown} {
358    &[data-show-action='false'] {
359      justify-content: center;
360      padding: 12px 0;
361      background-color: var(--subot-inline-bg-content-color, #f8f8f8);
362      margin-left: -11px;
363      margin-right: -7px;
364      position: relative;
365      bottom: -11px;
366      border-bottom-left-radius: 12px;
367      border-bottom-right-radius: 12px;
368    }
369
370    .si-footer-actions {
371      button {
372        font-size: 0;
373        width: 40px;
374        height: 40px;
375        border-radius: 50%;
376        padding: 0;
377
378        .mantine-Button-icon {
379          margin: 0;
380          position: absolute;
381        }
382
383        svg {
384          margin-left: 0 !important;
385          margin-right: 0 !important;
386        }
387      }
388    }
389  }
390`,ChevronLeft=e=>_().createElement("svg",Object.assign({width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"m7.988 8 3.417 3.417a.73.73 0 0 1 0 1.063.73.73 0 0 1-1.07-.007L6.385 8.52a.76.76 0 0 1-.208-.525q-.001-.15.05-.28a.7.7 0 0 1 .157-.236l3.951-3.951a.73.73 0 0 1 .528-.237q.292 0 .521.23a.73.73 0 0 1 0 1.062z",fill:"currentColor"})),ChevronRight$1=e=>_().createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M8.917 8 5.5 4.582a.73.73 0 0 1 0-1.063.73.73 0 0 1 1.07.007l3.95 3.954q.105.113.156.243a.8.8 0 0 1 .053.282q0 .15-.053.28a.7.7 0 0 1-.156.236l-3.95 3.951a.73.73 0 0 1-.528.236.72.72 0 0 1-.52-.23.73.73 0 0 1 0-1.062z",fill:"currentColor"})),ChevronRight=e=>_().createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M5.5 10q0 .25.031.5t.073.479a1 1 0 0 1-.052.583.66.66 0 0 1-.406.396.72.72 0 0 1-.573-.032.66.66 0 0 1-.365-.427 5 5 0 0 1-.156-.729A6 6 0 0 1 4 10q0-2.522 1.77-4.292 1.772-1.77 4.355-1.709l-.667-.666a.73.73 0 0 1 0-1.063.73.73 0 0 1 1.063 0l1.958 1.959q.23.228.23.52a.72.72 0 0 1-.23.521l-1.958 1.96a.68.68 0 0 1-.521.218.76.76 0 0 1-.52-.24.73.73 0 0 1 0-1.062l.645-.646q-1.959-.041-3.292 1.292T5.5 9.999m9 0q0-.25-.031-.5a9 9 0 0 0-.073-.48 1 1 0 0 1 .052-.594.73.73 0 0 1 .406-.406.66.66 0 0 1 .563 0q.27.125.354.417.105.375.166.76Q16 9.583 16 10q0 2.5-1.77 4.282-1.772 1.78-4.355 1.718l.667.667a.73.73 0 0 1 0 1.063.73.73 0 0 1-1.063 0l-1.958-1.96a.72.72 0 0 1-.23-.52q0-.293.23-.521l1.958-1.959a.73.73 0 0 1 1.063 0 .73.73 0 0 1 0 1.063l-.667.666q1.959.042 3.292-1.291Q14.5 11.873 14.5 9.999",fill:"currentColor"})),ej=_().createContext({value:{},setValue:()=>null}),NodeContextProvider=({children:e})=>{let[t,n]=(0,h.useState)({}),i=(0,h.useMemo)(()=>({value:t,setValue:n}),[t,n]);return _().createElement(ej.Provider,{value:i},e)},eU=[E.d.FORM],eR=[E.c.SSO],eD=[E.d.FINAL,E.d.FINAL_THANK_YOU,E.d.FINAL_STANDARD],Container$u=()=>{var e,t,n;let{formatMessage:i,action:{pushNotifications:l}}=(0,h.useContext)(k.T),o=useCurrentUrl(),{listNodes:a,activeId:r,isShowFooter:s,onNext:d,onPrev:c,params:u,onStartOver:m,loading:p}=(0,h.useContext)(eM),{value:v}=(0,h.useContext)(ej),g=useValidationMultiOption(),b=a[0],f=a.find(e=>e.id==r),x=null===(e=null==f?void 0:f.actions)||void 0===e?void 0:e.find(e=>e.type===E.f.USER_CHOICE_NEXT),y=null===(t=null==f?void 0:f.actions)||void 0===t?void 0:t.find(({type:e})=>e==E.f.POLL_BUTTON),w=null===(n=null==f?void 0:f.actions)||void 0===n?void 0:n.find(({type:e})=>e==E.f.ACTION_MULTIPLE_BUTTON),handleNextChoice=()=>{let e={node_id:f.id,action_id:null==x?void 0:x.id,action_value:null==x?void 0:x.key};d(Object.assign(Object.assign(Object.assign({},u),null==f?void 0:f._message),e))},handlePollSubmit=()=>{var e;let t={},n=(null===(e=null==v?void 0:v.form_submit_meta)||void 0===e?void 0:e.map(({action_id:e})=>e))||[];v.form_submit_meta&&v.form_submit_meta.length&&(t[f.id]=v.form_submit_meta.map(e=>e.action_id));let i=Object.assign(Object.assign({},v),{current_polls:t});g.validateSelectActions(n,f,()=>{d&&d(Object.assign(Object.assign(Object.assign({},u),null==f?void 0:f._message),i))})},handleMultipleSubmit=()=>{g.validateSelectActions(Object.keys((null==v?void 0:v.selected_actions)||{}),f,()=>{d&&d(Object.assign(Object.assign(Object.assign({},u),null==f?void 0:f._message),v))})};if(!s)return null;let I=a.find(e=>e.id==r),S=eU.includes((null==I?void 0:I.type)||"")||eR.includes((null==I?void 0:I.position)||""),C=!eD.includes((null==I?void 0:I.type)||"");return _().createElement(eL,{"data-show-action":C},_().createElement("button",{onClick:m,"data-event-category":"Service Connection","data-event-action":"Risk Screening Start Over","data-event-label":o,"data-bot-id":u.bot_id,className:"si-footer-start-over",disabled:!!((null==b?void 0:b.subot_field_type)&&r==(null==a?void 0:a[1].id))},_().createElement(ChevronRight,null)," ",_().createElement("span",null,i({id:"tool.subot.inline.start.over",defaultMessage:"Start over"}))),C&&_().createElement("div",{className:"si-footer-actions"},_().createElement(H.B,{size:"md",variant:"tertiary",onClick:c,"data-event-category":"Service Connection","data-event-action":"Risk Screening Back","data-event-label":o,"data-bot-id":u.bot_id,sx:{paddingLeft:16,paddingRight:16,borderRadius:8},styles:{root:{":not(:disabled)":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"var(--subot-inline-text-button-color, #f7f9fc) !important"},color:"var(--subot-inline-text-color, #262626) !important"}}}},_().createElement(ChevronLeft,{style:{marginRight:10}}),i({id:"riskScreener.back",defaultMessage:"Back"})),_().createElement(H.B,{size:"md",onClick:()=>{var e;if((null==x?void 0:x.id)&&(null==x?void 0:x.key)){handleNextChoice();return}if(w){handleMultipleSubmit();return}if(y){handlePollSubmit();return}(null==f?void 0:f._message)&&(null===(e=f._message)||void 0===e?void 0:e.action_id)?d(Object.assign(Object.assign(Object.assign({},u),null==f?void 0:f._message),v)):l({title:"",message:i({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"})},loading:!S&&p,disabled:S,"data-event-category":"Service Connection","data-event-action":"Risk Screening Continue","data-event-label":o,"data-bot-id":u.bot_id,sx:{paddingLeft:16,paddingRight:16,borderRadius:8},styles:{root:{":not(:disabled)":{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"},color:"var(--subot-inline-text-button-color, #fff) !important"}}}},i({id:"riskScreener.next",defaultMessage:"Next"}),_().createElement(ChevronRight$1,{style:{marginLeft:10}}
390))))};Container$u.displayName="SubotInlineFooterContainer";let eF=F.A.div`
391  sup {
392    position: relative;
393    top: -0.5em;
394    font-size: 0.7em;
395  }
396  sub {
397    position: relative;
398    bottom: -0.5em;
399    font-size: 0.7em;
400  }
401  ul {
402    padding-left: 1.2em;
403    list-style: inherit;
404  }
405  ol {
406    padding-left: 1.2em;
407  }
408
409  img {
410    display: block;
411    max-width: 100%;
412    margin: 1rem auto;
413  }
414`,getMDInstance=()=>new z.F("full",{html:!0,linkTarget:"_blank"}),Markdown=e=>{var{children:t,className:n}=e,i=(0,x.a)(e,["children","className"]);let l=(0,h.useMemo)(()=>getMDInstance(),[]),o=j()(n,"markdown"),a=(0,h.useMemo)(()=>{let e=Object.assign({},i);return"string"==typeof t?e.dangerouslySetInnerHTML={__html:l.render(t)}:e.children=t,e},[t]);return _().createElement(eF,Object.assign({},a,{className:o}))},eG=F.A.div`
415  display: flex;
416  gap: 24px;
417`,eH=F.A.div`
418  display: flex;
419  gap: 24px;
420
421  .si-review-by {
422    gap: 12px;
423    display: flex;
424    color: var(--subot-inline-text-color, #595959);
425    font-style: normal;
426    font-weight: 400;
427  }
428
429  .si-review-by-avatar {
430    width: 40px;
431    max-width: 40px;
432    height: 40px;
433
434    img {
435      width: 100%;
436      height: 100%;
437      border-radius: 100%;
438    }
439  }
440
441  .si-review-by-name {
442    font-size: 14px;
443    line-height: 150%;
444    letter-spacing: -0.07px;
445
446    strong,
447    b {
448      font-weight: 600;
449    }
450
451    a {
452      color: inherit;
453
454      &:hover {
455        color: var(--subot-inline-primary-color);
456      }
457    }
458  }
459
460  .si-review-by-branch {
461    font-size: 12px;
462    font-style: normal;
463    font-weight: 400;
464    line-height: 140%;
465    margin-top: 4px;
466
467    span + span {
468      &:before {
469        content: ' · ';
470      }
471    }
472  }
473  &[data-layout='horizontal'] {
474    flex-wrap: wrap;
475    gap: 0;
476    .si-headline {
477      width: calc(100% - 64px - 24px);
478      padding-left: 24px;
479    }
480    .si-image {
481      width: 64px;
482      height: 64px;
483    }
484    .si-review-by {
485      width: calc(100% - 88px);
486      margin-left: 88px;
487    }
488    ${G.M.mbDown} {
489      gap: 8px;
490      .si-image {
491        width: 48px;
492        height: 48px;
493      }
494      .si-headline {
495        width: calc(100% - 48px - 16px);
496        padding-left: 8px;
497        font-size: 26px;
498        line-height: 34px;
499      }
500      .si-review-by {
501        width: calc(100% - 20px);
502        margin-left: 20px;
503        .si-review-by-avatar {
504          width: 32px;
505          height: 32px;
506          flex-shrink: 0;
507        }
508      }
509    }
510  }
511  &[data-layout='vertical'] {
512    flex-direction: column;
513  }
514`,hasSubotLeftInfo=e=>!!((null==e?void 0:e.inlineImage)||(null==e?void 0:e.inilneHeadline)||(null==e?void 0:e.reviewByAvatar)&&(null==e?void 0:e.reviewByName)),Container$t=({subotSettingData:e,layout:t="vertical"})=>{let n=e.reviewByAvatar&&e.reviewByName;return hasSubotLeftInfo(e)?_().createElement(eG,null,_().createElement(eH,{"data-layout":t},e.inlineImage&&_().createElement("img",{loading:"lazy",alt:"Inline heading",className:"si-image",src:e.inlineImage}),e.inilneHeadline&&_().createElement("h2",{className:"si-headline"},_().createElement(Markdown,null,e.inilneHeadline)),n&&_().createElement("div",{className:"si-review-by"},_().createElement("div",{className:"si-review-by-avatar"},_().createElement("img",{loading:"lazy",src:e.reviewByAvatar,alt:e.reviewByName})),_().createElement("div",{className:"si-review-by-info"},_().createElement(Markdown,{className:"si-review-by-name"},e.reviewByName),_().createElement("p",{className:"si-review-by-branch"},[e.reviewBySpecialty,e.reviewByHospital].filter(Boolean).map((e,t)=>_().createElement("span",{key:t},e))))))):null};Container$t.displayName="SubotInlineInfoSection";let ez=F.A.div`
515  display: flex;
516  align-items: flex-start;
517  flex-direction: column;
518  gap: 16px;
519
520  > h2 {
521    font-size: 20px;
522    font-weight: 600;
523    line-height: 150%;
524    letter-spacing: -0.3px;
525    /* color: #262626; */
526    color: var(--subot-inline-text-color, #262626);
527
528    ${G.M.mbUp} {
529      font-size: 24px;
530      line-height: 130%;
531      letter-spacing: -0.432px;
532    }
533  }
534
535  .si-node-start-desc {
536    /* color: #595959; */
537    color: var(--subot-inline-text-color, #595959);
538    font-size: 16px;
539    line-height: 24px;
540    font-weight: 400;
541
542    ${G.M.mbUp} {
543      letter-spacing: -0.16px;
544    }
545  }
546
547  &.si-acuvue-wrap {
548    align-items: center;
549    text-align: center;
550  }
551`,eV=F.A.div`
552  position: relative;
553
554  .si-voucher-item {
555    max-width: 150px;
556    max-height: fit-content;
557    margin: 0 auto;
558    display: block;
559    position: relative;
560  }
561
562  .si-voucher-in-stock {
563    display: flex;
564    flex-direction: row;
565    justify-content: center;
566    align-items: center;
567    gap: 8px;
568    position: relative;
569
570    h3 {
571      font-size: 48px;
572      font-weight: 700;
573      color: #2d87f3;
574      line-height: 1.1;
575    }
576
577    img {
578      width: 32px;
579      max-height: fit-content;
580      position: relative;
581      top: 3px;
582    }
583  }
584
585  .si-voucher-bg {
586    pointer-events: none;
587    position: absolute;
588    width: 100%;
589    height: auto;
590    max-height: none;
591    bottom: 0;
592    left: 0;
593    right: 0;
594  }
595
596  .si-voucher-total {
597    color: #595959;
598    font-size: 16px;
599    line-height: 1.5;
600    text-align: center;
601  }
602
603  .si-voucher-progress {
604    width: 260px;
605    background-color: #bcdeff;
606    border-radius: 9px;
607    padding: 1px;
608    margin: 0 auto;
609    margin-top: 30px;
610
611    .si-voucher-progress--inner {
612      height: 6px;
613      border-radius: 8px;
614      background-color: #2d87f3;
615    }
616  }
617`,SubotInlineVoucherLeftUI=({clientId:e,voucherAnswers:t})=>{let[n,i]=(0,h.useState)(0),[l,o]=(0,h.useState)(0);(0,h.useEffect)(()=>{(0,k.c)(getSubotApiPath(ey.GET_VOUCHER_QUANTITY,{search:(null==t?void 0:t.voucherName.split("|")[0])||"",clientId:e}),"GET").then(e=>{let t=null==e?void 0:e._data[0];t.total_quantity&&(i(t.total_quantity),o(t.total_in_stock))})},[null==t?void 0:t.voucherName]);let a=n?l/n*100:0;return n?_().createElement(eV,{className:"si-voucher-left-ui"},_().createElement("img",{src:W.C.getAssetPath("subot/voucher_bg.png"),alt:"",loading:"eager",className:"si-voucher-bg"}),_().createElement("img",{src:W.C.getAssetPath("subot/voucher_icon.png"),alt:"",loading:"eager",className:"si-voucher-item"}),_().createElement(B.Box,{className:"si-voucher-in-stock"},_().createElement("h3",null,l),_().createElement("img",{src:W.C.getAssetPath("subot/voucher_icon_small.png"),alt:"",loading:"eager"})),_().createElement(B.Box,{className:"si-voucher-progress"},_().createElement(B.Box,{className:"si-voucher-progress--inner",style:{width:`${a}%`}}))):null},Container$s=({node:e,onClickStart:t})=>{var n,i;let l=(0,h.useRef)(!1),{ref:o,inView:a}=(0,q.Wx)(),r=useCurrentUrl(),{params:s,getParams:d,onNext:c,setIsShowFooter:u,listNodes:m}=(0,h.useContext)(eM),p=m[0],v=null===(n=null==p?void 0:p.extra_settings)||void 0===n?void 0:n.subot_type;return(0,h.useMemo)(()=>{u(!1)},[]),(0,h.useEffect)(()=>{a&&!l.current&&(subotInlineImpression$1(d()),l.current=!0)},[a]),_().createElement(ez,{ref:o,className:j()({"si-acuvue-wrap":"ACUVUE"===v})},_().createElement("h2",null,e.inline_title),_().createElement("div",{className:"si-node-start-desc"},_().createElement(Markdown,null,e.inline_description)),"ACUVUE"===v&&_().createElement(SubotInlineVoucherLeftUI,{clientId:null===(i=p.extra_settings)||void 0===i?void 0:i.client_id,voucherAnswers:{email:"",voucherName:""}}),_().createElement(H.B,{onClick:()=>{let e=d();e.device_id=(0,M.h)(window.navigator.userAgent)?2:1,subotInlineClick$1(e),c(),null==t||t()},"data-event-category":"Service Connection","data-event-action":"Risk Screening Start","data-event-label":r,"data-bot-id":s.bot_id,rightIcon:_().createElement(V.A,{color:"var(--subot-inline-text-button-color, #fff)"}),styles:{root:{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"},color:"var(--subot-inline-text-button-color, #fff) !important"}}},e.inline_start_button))};Container$s.displayName="SubotInlineNodeStartContainer";let eq=F.A.div``,eW=F.A.div`
618  .si-intent-list {
619    display: flex;
620    gap: 12px;
621    flex-direction: column;
622  }
623
624  &[data-intent-count='1'] {
625    .si-bot-title {
626      margin-bottom: 0;
627    }
628  }
629`,eY=F.A.div`
630  .si-bot-title {
631    gap: 6px;
632    display: flex;
633    align-items: flex-start;
634    color: var(--subot-inline-text-color, #262626);
635    font-weight: 600;
636    margin-bottom: 24px;
637    font-size: 18px;
638    line-height: 28px;
639    letter-spacing: -0.4px;
640
641    img {
642      display: block;
643    }
644
645    ${G.M.mbUp} {
646      font-size: 22px;
647      line-height: 32px;
648      letter-spacing: -0.6px;
649    }
650  }
651
652  &#si-intent-bot-title {
653    ~ div {
654      .si-bot-title {
655        margin-bottom: 0;
656      }
657    }
658  }
659`,eX=F.A.div`
660  text-align: center;
661
662  button {
663    min-width: 230px;
664  }
665
666  .si-button-svg-icon {
667    margin-right: 3px;
668  }
669`,Download=e=>_().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("g",{clipPath:"url(#clip0_608_1578)"},_().createElement("path",{d:"M19.5 18V21H4.5V18H3V21C3 21.3978 3.15804 21.7794 3.43934 22.0607C3.72064 22.342 4.10218 22.5 4.5 22.5H19.5C19.8978 22.5 20.2794 22.342 20.5607 22.0607C20.842 21.7794 21 21.3978 21 21V18H19.5Z",fill:"currentColor"}),_().createElement("path",{d:"M19.5 10.5L18.4425 9.4425L12.75 15.1275V1.5H11.25V15.1275L5.5575 9.4425L4.5 10.5L12 18L19.5 10.5
669Z",fill:"currentColor"})),_().createElement("defs",null,_().createElement("clipPath",{id:"clip0_608_1578"},_().createElement("rect",{width:"24",height:"24",fill:"white"})))),getLeadPath=(e,t)=>{let{leadApiUrl:n}=null===k.G||void 0===k.G?void 0:k.G.env;return n+T()(e,Object.assign({},t))},callApiWithLead=(e,t,n)=>(0,x._)(void 0,void 0,void 0,function*(){if(null==n?void 0:n.data){let e=w.A.get(K.d),t=w.A.get(y.G);if(!e){let t=(0,J.A)();e=t,w.A.set(K.d,t)}n.data.cookie_id=e,n.data.ga_client_id=t||""}return(0,k.c)(e,t,n)});$().extend(X());let saveLeadApi=e=>(0,x._)(void 0,void 0,void 0,function*(){let{first_name:t,last_name:n,address:i,dob:l,email:o,phone:a}=e||{};return yield callApiWithLead(getLeadPath("campaign/{campaignCode}/lead",{campaignCode:eE.env.NEXT_PUBLIC_FRISO_COMPAIGN_CODE||"wufl4mh2vunsklq"}),"POST",{data:{url:window.location.href,title_article:document.title,referrer:"hlbs",meta:[{key:"first_name",value:t||"",control:"text"},{key:"last_name",value:n||"",control:"text"},{key:"due_date_dob",value:l,control:"due_date_dob"},{key:"province",value:((null==i?void 0:i.selectedProvince)||"").replace("Tỉnh ","").replace("Th\xe0nh phố ",""),control:"province"},{key:"email",value:o||"",control:"email"},{key:"phone",value:a||"",control:"tel"},{key:"address",value:i?[(null==i?void 0:i.selectedProvince)||"",(null==i?void 0:i.selectedDistrict)||"",(null==i?void 0:i.selectedWard)||"",(null==i?void 0:i.extraInfo)||""].join("; "):"",control:"text"}]}})}),checkSyncDataOnFrisoCampaign=(e,t)=>{var n,i,l,o,a,r,s,d,c;try{if(!(null===(n=e.extra_settings)||void 0===n?void 0:n.sync_data_friso_campaign)||!t)return;let u=E.E[E.f.USER_SUBMIT_NAME],m=E.E[E.f.USER_SUBMIT_EMAIL],p=E.E[E.f.USER_SUBMIT_DATE],v=E.E[E.f.USER_SUBMIT_OTP],g=E.E[E.f.USER_SUBMIT_PHONE],b=E.E[E.f.USER_SUBMIT_ADDRESS_PROVINCE],f=E.E[E.f.USER_SUBMIT_ADDRESS_DISTRICT],h=E.E[E.f.USER_SUBMIT_ADDRESS_COMMUNE],_=E.E[E.f.USER_SUBMIT_ADDRESS],x=(null===(i=t.find(e=>e.control===u))||void 0===i?void 0:i.value)||"",y=(null===(l=t.find(e=>e.control===m))||void 0===l?void 0:l.value)||"",w=(null===(o=t.find(e=>e.control===p))||void 0===o?void 0:o.value)||"",I=(null===(a=t.find(e=>e.control===v||e.control===g))||void 0===a?void 0:a.value)||"",S={selectedProvince:(null===(r=t.find(e=>e.control===b))||void 0===r?void 0:r.value)||"",selectedDistrict:(null===(s=t.find(e=>e.control===f))||void 0===s?void 0:s.value)||"",selectedWard:(null===(d=t.find(e=>e.control===h))||void 0===d?void 0:d.value)||"",extraInfo:(null===(c=t.find(e=>e.control===_))||void 0===c?void 0:c.value)||""};if(!x||!y||!w||!I||!S.selectedProvince||!S.selectedDistrict||!S.selectedWard||!S.extraInfo)return;let C=x.split(" "),O=C[C.length-1];C.pop();let k=C.join(" ");saveLeadApi({last_name:O,first_name:k,phone:I.replace("+84","0"),email:y,address:S,dob:w,term:!0})}catch(e){}},foundNodeFrisoForm=e=>{let t="",n="";return e.forEach(e=>{var i,l,o,a,r,s;let d=(null===(o=null===(l=null===(i=null==e?void 0:e._message)||void 0===i?void 0:i.form_submit_meta)||void 0===l?void 0:l.find(e=>e.control===E.E[E.f.USER_SUBMIT_OTP]||e.control===E.E[E.f.USER_SUBMIT_PHONE]))||void 0===o?void 0:o.value)||"",c=(null===(s=null===(r=null===(a=null==e?void 0:e._message)||void 0===a?void 0:a.form_submit_meta)||void 0===r?void 0:r.find(e=>e.control===E.E[E.f.USER_SUBMIT_DATE]))||void 0===s?void 0:s.value)||"";d&&c&&(t=d,n=c)}),{foundPhone:t,foundDate:n}},handleFrisoRedirecition=e=>{let{foundPhone:t,foundDate:n}=foundNodeFrisoForm(e);if(!t||!n)return;let i=$()(n),l=t.replace("+84","0"),o=i.isSameOrBefore($()()),a=i.format("YYYY-MM-DD");window.location.href=T()(eE.env.NEXT_PUBLIC_FRISO_MINI_GAME_URL||"",Object.assign({phone:l},o?{dob:a}:{edd:a}))},Container$r=({intent:e})=>{var t;let{listNodes:n}=(0,h.useContext)(eM),i=(0,h.useMemo)(()=>e.url&&e.label&&(null==e?void 0:e.type)===E.N.BOT_MAIN_BUTTON?{"data-event-category":"Service Connection","data-event-action":`Risk Screening - ${e.label}`,"data-event-label":e.url}:{},[e]);if(!(null==e?void 0:e.label))return null;let l=null===(t=e.label)||void 0===t?void 0:t.startsWith(":download:");return _().createElement(eX,null,_().createElement(H.B,Object.assign({size:"md",color:"primary",onClick:()=>{var t;if(null===(t=e.url)||void 0===t?void 0:t.includes("{{.frisoRedirectUrl}}")){handleFrisoRedirecition(n);return}e.url&&(0,M.i)(e.url)}},i,{styles:{root:{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"},color:"var(--subot-inline-text-button-color, #fff) !important"}}}),l&&_().createElement(Download,{width:"1em",height:"1em",className:"si-button-svg-icon"}),_().createElement(Markdown,null,e.label.replace(":download:",""))))};
669Container$r.displayName="SubotInlineIntentBotButton";let eK=F.A.div`
670  img {
671    display: block;
672    width: auto;
673    max-width: 100%;
674    margin: 0 auto;
675  }
676`,Container$q=({intent:e})=>e.url?_().createElement(eK,null,_().createElement("img",{loading:"lazy",src:e.url,alt:e.label})):null;Container$q.displayName="SubotInlineIntentBotImage";let Container$p=({intent:e,indexNumber:t})=>{let{listNodes:n}=(0,h.useContext)(eM),i=![E.N.SSO_INTENT].includes(null==e?void 0:e.type),l=[E.N.BOT_TEXT,E.N.BOT_MAIN_TITLE].includes(null==e?void 0:e.type),o=[E.N.BOT_BUTTON,E.N.BOT_RECALCULATE].includes(null==e?void 0:e.type),a=[E.N.BOT_IMAGE,E.N.BOT_MAIN_IMAGE].includes(null==e?void 0:e.type),r=(null==e?void 0:e.type)===E.N.BOT_MAIN_TITLE;return o?_().createElement(Container$r,{intent:e}):e?_().createElement(eY,{id:"si-intent-bot-title"},_().createElement("h3",{className:"si-bot-title","data-image":a},t&&_().createElement("span",{className:"si-bot-title-number"},t,"."),i&&l&&_().createElement(Markdown,null,r?replaceTextWithVariables(e.label||"",n):e.label),a&&_().createElement(Container$q,{intent:e}))):null};Container$p.displayName="SubotInlineIntentBotTitle";let Container$o=({intent:e})=>{let t=useCurrentUrl(),{listNodes:n,activeId:i,params:l}=(0,h.useContext)(eM),o=n.find(e=>e.id==i);if(!e.label||!o)return null;let a={"data-event-category":"Service Connection","data-event-action":e.label,"data-event-label":t,"data-bot-id":l.bot_id,"data-question-id":o.id};return _().createElement(B.Box,{style:{position:"absolute",zIndex:-1}},_().createElement("button",Object.assign({className:"si-revamp-event-submission"},a)))};Container$o.displayName="SubotInlineIntentBotEventSubmission";let eJ=F.A.div`
677  display: flex;
678  padding: 8px 0;
679
680  .si-related-article-category {
681    font-weight: 700;
682    font-size: 0.875em;
683    line-height: 1.375em;
684    letter-spacing: 0;
685    color: #404040;
686    margin-bottom: 4px;
687    a {
688      color: inherit;
689      text-decoration: none;
690    }
691  }
692
693  .si-related-article-thumbnail {
694    height: 100px;
695    margin: 0 16px 0 0;
696    max-width: 100px;
697    min-width: 100px;
698
699    a,
700    img {
701      width: 100px;
702      height: 100px;
703      display: block;
704      object-fit: cover;
705      border-radius: 6px;
706    }
707  }
708
709  .si-related-article-content {
710    flex: 1;
711
712    h3,
713    h3 a {
714      /* color: #262626 */
715      color: var(--subot-inline-text-color, #262626);
716      font-size: 16px;
717      letter-spacing: -0.2px;
718      line-height: 24px;
719      text-decoration: none;
720    }
721  }
722
723  .si-related-article-review-by {
724    display: flex;
725    align-items: center;
726    margin-top: 8px;
727    a {
728      display: block;
729    }
730  }
731
732  .si-related-article-review-by-avatar {
733    max-width: 24px;
734    min-width: 24px;
735    margin-right: 8px;
736
737    img {
738      height: 24px;
739      width: 24px;
740      border-radius: 100%;
741      display: block;
742    }
743  }
744
745  .si-related-article-review-by-name {
746    p {
747      color: #404040;
748      margin: 0;
749      font-size: 0.875em;
750      line-height: 1.375em;
751      letter-spacing: -0.2px;
752    }
753  }
754`,articleDataComputed=e=>{try{if(e.label&&e.label.includes("{")){let t=JSON.parse(e.label);if(t.meta){let e={};t.meta.map(({key:t,value:n})=>{t&&n&&(e[t]=n)}),t.meta=Object.assign({},e)}return Object.assign({},t)}return{}}catch(e){return{}}},Container$n=({intent:e})=>{var t,n,i,l;let o=(0,h.useMemo)(()=>articleDataComputed(e),[e,null==e?void 0:e.label]),{formatMessage:a}=(0,h.useContext)(k.T);return _().createElement(_().Fragment,null,!!(null==o?void 0:o.title)&&!!(null==o?void 0:o.thumbnail)&&!!(null==o?void 0:o.url)&&_().createElement(eJ,null,_().createElement("div",{className:"si-related-article-thumbnail"},_().createElement("a",{href:o.url,target:"_blank","data-event-category":"Service Connection","data-event-action":"Risk Screening - Article Click","data-event-label":o.url,rel:"noreferrer"},_().createElement("img",{src:o.thumbnail,alt:o.title,loading:"lazy"}))),_().createElement("div",{className:"si-related-article-content"},(null===(t=o.meta)||void 0===t?void 0:t.category_name)&&_().createElement("p",{className:"si-related-article-category",style:{color:null===(n=o.meta)||void 0===n?void 0:n.category_text_color}},_().createElement("a",{href:o.meta.category_url,target:"_blank",rel:"noreferrer"},o.meta.category_name)),_().createElement("h3",null,_().createElement("a",{href:o.url,target:"_blank","data-event-category":"Service Connection","data-event-action":"Risk Screening - Article Click","data-event-label":o.url,rel:"noreferrer"},o.title)),(null===(i=o.meta)||void 0===i?void 0:i.reviewed_avatar_thumbnail)&&(null===(l=o.meta)||void 0===l?void 0:l.reviewed_display_name)&&_().createElement("div",{className:"si-related-article-review-by"},_().createElement("div",{className:"si-related-article-review-by-avatar"}
754,_().createElement("a",{href:o.meta.reviewed_url,target:"_blank",rel:"noreferrer"},_().createElement("img",{src:o.meta.reviewed_avatar_thumbnail,alt:o.meta.reviewed_display_name}))),_().createElement("div",{className:"si-related-article-review-by-name"},_().createElement("p",null,a({id:"articleAuthor.title.medical",defaultMessage:"Medically reviewed by"})," ",_().createElement("strong",null,o.meta.reviewed_display_name)))))))};Container$n.displayName="SubotInlineIntentBotImage";let eZ=F.A.div`
755  padding: 16px 0;
756
757  & > .si-list-services {
758    display: flex;
759    gap: 8px;
760    overflow: auto;
761  }
762
763  .si-title {
764    margin-bottom: 24px;
765  }
766  .si-service-title {
767    text-align: center;
768    padding: 2px;
769  }
770  .image-wrapper {
771    cursor: pointer;
772    flex: 0 0 184px;
773
774    > * {
775      pointer-events: none;
776    }
777  }
778  img {
779    display: block;
780    width: auto;
781    max-width: 100%;
782    cursor: pointer;
783    height: auto;
784  }
785
786  .aspect-square {
787    position: relative;
788
789    &::before {
790      content: '';
791      display: block;
792      padding-top: 120%;
793    }
794
795    > * {
796      position: absolute;
797      top: 0;
798      left: 0;
799      width: 100%;
800      height: 100%;
801      object-fit: cover;
802    }
803  }
804`,eQ=F.A.div`
805  margin-top: auto;
806  border-radius: 12px;
807  padding: 12px 16px;
808  background-color: #fff8e2;
809  margin-top: 24px;
810
811  .si-disclaimer {
812    gap: 8px;
813    display: inline-flex;
814    align-items: center;
815    cursor: pointer;
816  }
817  .si-disclaimer-desc {
818    color: #262626;
819    /* color: var(--subot-inline-text-color, #262626); */
820    font-size: 16px;
821    font-weight: 600;
822    line-height: 150%;
823    letter-spacing: -0.07px;
824  }
825  .si-disclaimer-down {
826    color: black;
827  }
828
829  .si-disclaimer-expanded {
830    font-size: 16px;
831    color: #262626;
832    /* color: var(--subot-inline-text-color, #262626); */
833    line-height: 1.4;
834    overflow: hidden;
835    padding-left: 32px;
836    margin-top: 4px;
837  }
838`,Container$m=({text:e})=>{let[t,n]=(0,h.useState)(!1),{formatMessage:i}=(0,h.useContext)(k.T);return e?_().createElement(eQ,null,_().createElement("div",{className:"si-disclaimer",onClick:()=>n(!t)},_().createElement(Info,{className:"si-disclaimer-info-svg"}),_().createElement("span",{className:"si-disclaimer-desc"},i({id:"tools.disclaimer",defaultMessage:"Miễn trừ tr\xe1ch nhiệm"})),_().createElement(ChevronDown,{className:"si-disclaimer-down"})),_().createElement(D.P.div,{className:"si-disclaimer-expanded",animate:t?{height:"auto"}:{height:0},transition:{duration:.3}},e)):null};Container$m.displayName="SubotInlineDisclaimer";let Container$l=({intent:e})=>{var t,n,i;let{formatMessage:l}=(0,h.useContext)(k.T),{encodedGaId:o}=function(){let[e,t]=(0,h.useState)(""),[n,i]=(0,h.useState)("");return(0,h.useEffect)(()=>{if(w.A.get(y.G)){let e=w.A.get(y.G);if(e){let n=btoa(e);t(n),i(e)}}else(0,M.c)({condition:()=>!!w.A.get(y.G),finished:()=>{let e=w.A.get(y.G);if(e){let n=btoa(e);t(n),i(e)}}})},[]),{encodedGaId:e,gaId:n}}(),handleOnClick=e=>{if(!e.url)return;let t=(0,M.j)(e.url,o);e.url&&(0,M.i)(t)},a=(0,h.useMemo)(()=>{try{return JSON.parse(e.label||"")||[]}catch(e){return[]}},[null==e?void 0:e.label]);if(!e.label||!a.length)return null;let r=null===(t=a[0])||void 0===t?void 0:t.disclaimer,s=null===(n=a[0])||void 0===n?void 0:n.sectionTitle;return _().createElement(eZ,null,_().createElement(Z.T,{size:"lg",weight:"semiBold",className:"si-title",color:"var(--subot-inline-text-color, #262626)"},(null===(i=null==s?void 0:s.trim)||void 0===i?void 0:i.call(s))||l({id:"tools.suggestedServices",defaultMessage:"Suggested services"}
838)+":"),_().createElement("div",{className:"si-list-services"},a.map((e,t)=>_().createElement("div",{onClick:()=>handleOnClick(e),key:t,className:"image-wrapper",role:"presentation","data-event-category":"Service Connection","data-event-action":"Risk Screener Result Recommended Services","data-event-label":(0,M.j)((null==e?void 0:e.url)||"",o)},_().createElement(B.Box,{className:"aspect-square"},_().createElement("img",{loading:"lazy",src:e.feature,alt:e.feature,key:t})),e.title&&_().createElement(Z.T,{size:"p2",className:"si-service-title",color:"var(--subot-inline-text-color, #262626)"},e.title)))),r&&_().createElement(Container$m,{text:r}))};Container$l.displayName="SubotInlineIntentBotSuggestedService";let e0=F.A.div`
839  font-size: 16px;
840  line-height: 24px;
841  color: var(--subot-inline-text-color, #595959);
842  font-weight: 400;
843
844  ul,
845  ol {
846    li + li {
847      margin-top: 12px;
848    }
849  }
850`,Container$k=({intent:e})=>{let{listNodes:t}=(0,h.useContext)(eM);if(!(null==e?void 0:e.label))return null;let n=(null==e?void 0:e.type)===E.N.BOT_MAIN_BODY;return _().createElement(e0,{className:"si-bot-text"},_().createElement(Markdown,null,n?replaceTextWithVariables(e.label,t):null==e?void 0:e.label))};Container$k.displayName="SubotInlineIntentBotText";let e1=F.A.div`
851  gap: 16px;
852  display: flex;
853  /* color: #262626; */
854  color: var(--subot-inline-text-color, #262626);
855  max-width: 500px;
856  margin: 0 auto;
857  margin-top: 16px;
858
859  img {
860    width: 54px;
861    min-width: 54px;
862    height: 54px;
863  }
864
865  .si-sso-title {
866    font-size: 16px;
867    font-weight: 600;
868    margin-bottom: 4px;
869  }
870
871  .si-sso-description {
872    flex: 1;
873    font-size: 14px;
874    /* color: #595959; */
875    color: var(--subot-inline-text-color, #595959);
876    line-height: 1.5;
877  }
878`,Container$j=({intent:e})=>{let t=(()=>{try{return(null==e?void 0:e.label)?JSON.parse(null==e?void 0:e.label):{}}catch(e){return{}}})();return t&&t.title?_().createElement(e1,{id:"si-intent-sso"},_().createElement("img",{loading:"lazy",src:null==e?void 0:e.url,className:"icon",alt:""}),_().createElement("div",{className:"si-sso-content"},_().createElement("h3",{className:"si-sso-title"},t.title),_().createElement("div",{className:"si-sso-description"},t.description))):null};Container$j.displayName="SubotInlineIntentSSO";let e2=F.A.div`
879  width: ${({width:e})=>e||"100%"};
880  padding: 4px;
881  ${G.M.mbDown} {
882    width: 100%;
883  }
884`,e6=F.A.div`
885  display: flex;
886  .feature {
887    width: 30%;
888    .feature-wrapper {
889      position: relative;
890      display: block;
891      overflow: hidden;
892      width: 100%;
893      padding-top: 66%;
894      border-radius: ${Q.w.borderRadius};
895      .feature-img {
896        position: absolute;
897        top: 50%;
898        left: 50%;
899        width: 100%;
900        min-width: 100%;
901        height: auto;
902        min-height: 100%;
903        transform: translate(-50%, -50%);
904      }
905    }
906  }
907  .body {
908    flex: 1;
909    margin-left: 10px;
910    line-height: 1.5;
911    a {
912      color: ${(null===(l=null===Q.w||void 0===Q.w?void 0:Q.w.colors)||void 0===l?void 0:l.gray800)||"#262626"};
913      text-decoration: none;
914    }
915  }
916`,Container$i=({intent:e})=>{let t=(0,h.useMemo)(()=>e.label.includes("{")?JSON.parse(e.label):{},[e.label]);return _().createElement(_().Fragment,null,!!Object.keys(t).length&&_().createElement(e2,null,_().createElement(e6,null,_().createElement("div",{className:"feature"},_().createElement("a",{href:null==t?void 0:t.url,className:"feature-wrapper"},_().createElement("img",{loading:"lazy",src:null==t?void 0:t.thumbnail,alt:null==t?void 0:t.title,className:"feature-img"}))),_().createElement("div",{className:"body"},_().createElement("a",{href:null==t?void 0:t.url},_().createElement("h5",{className:"title"},_().createElement(Markdown,null,null==t?void 0:t.title)))))))};Container$i.displayName="SubotInlineIntentUrl";let e5={[E.N.BOT_TEXT]:Container$k,[E.N.BOT_IMAGE]:Container$q,[E.N.BOT_BUTTON]:Container$r,[E.N.BOT_URL]:Container$i,[E.N.BOT_RECALCULATE]:Container$r,[E.N.BOT_MAIN_TITLE]:Container$p,[E.N.BOT_MAIN_IMAGE]:Container$q,[E.N.BOT_MAIN_BODY]:Container$k,[E.N.BOT_MAIN_BUTTON]:Container$r,[E.N.BOT_SUB_TITLE]:Container$k,[E.N.BOT_SUB_BODY]:Container$k,[E.N.BOT_RELATED_ARTICLE]:Container$n,[E.N.THANK_YOU_IMAGE]:Container$q,[E.N.THANK_YOU_TITLE]:Container$k,[E.N.THANK_YOU_BODY]:Container$k,[E.N.BOT_SUGGESTED_SERVICE]:Container$l,[E.N.BOT_BOOKING]:Container$r,[E.N.BOT_EVENT_SUBMISSION]:Container$o,[E.N.SSO_INTENT]:Container$j},e4=new Proxy(e5,{get:(e,t)=>e5[t]||(()=>ee.K?null:_().createElement("p",null,"SubotInlineIntentBase ",t))}),e3=[E.N.BOT_SUBMISSION,E.N.BOT_BACKGROUND_IMAGE],Container$h=({intents:e,indexNumber:t})=>{let n=e.filter(e=>!e3.includes(e.type||"")),i=n.find(e=>e.type===E.N.BOT_MAIN_TITLE),l=n.filter(e=>e.type!==E.N.BOT_MAIN_TITLE);return _().createElement(eW,{"data-intent-count":l.length+1},i&&_().createElement(Container$p,{intent:i,indexNumber:t}),!!l.length&&_().createElement("div",{className:"si-intent-list"},l.map(e=>{let t=(null==e?void 0:e.type)||"";if(e3.includes(t))return null;let n=e4[t];return n&&_().createElement(n,{key:e.id,intent:e})})))};Container$h.displayName="SubotInlineIntent";let Container$g=({node:e})=>{var t,n;let{setIsShowFooter:i,listNodes:l}=(0,h.useContext)(eM),o=l[0];if((0,h.useMemo)(()=>{i(!0)},[]),!e||!o)return null;let a=null===(t=o.extra_settings)||void 0===t?void 0:t.subot_type;return _().createElement(eq,{id:"si-node-final"},_().createElement(Container$h,{intents:e.intents||[]}),"ACUVUE"===a&&_().createElement(SubotInlineVoucherLeftUI,{clientId:null===(n=o.extra_settings)||void 0===n?void 0:n.client_id,voucherAnswers:extractVoucherAnswers(l,o)}))};Container$g.displayName="SubotinlineNodeFinal";let e7=0;function sendCompleteFlowEvent(e={}){let t=window.location.search.includes("itemId"),n=window.location.search.includes("resultId");n||t||function trackCustomEvent(e,t={}){let n=window.fbq;n?n("trackCustom",e,t):e7<3?(setTimeout(()=>trackCustomEvent(e,t),1e3),e7++):console.log("Unable to load Facebook Pixel")}("CompleteFlow",Object.assign({status:!0},e))}let e8=F.A.div`
917  .wrap-main-intent {
918    overflow: hidden;
919    position: relative;
920
921    &[data-hide='true'] {
922      &::before {
923        content: '';
924        position: absolute;
925        bottom: 0;
926        right: 0;
927        display: block;
928        width: 100%;
929        height: 100px;
930        background-image: linear-gradient(to bottom, transparent, white);
931        cursor: pointer;
932      }
933    }
934  }
935
936  .wrap-main-button-intent {
937    padding-top: 20px;
938    padding-bottom: 0;
939    display: flex;
940    gap: 16px;
941    justify-content: center;
942    flex-wrap: wrap;
943  }
944
945  .see-more-intent {
946    /* color: #6cbef0; */
947    color: var(--subot-inline-text-color, #6cbef0);
948    font-size: 16px;
949    line-height: 24px;
950    font-weight: 600;
951    padding-top: 12px;
952    cursor: pointer;
953    display: block;
954  }
955`;F.A.div`
956  margin-top: 24px;
957  border: 1px solid #ffecb6;
958  border-radius: 16px;
959
960  ${G.M.mbUp} {
961    padding: 0 0 24px 0;
962  }
963
964  & > div {
965    scale: 0.9;
966
967    [data-tag='h5']::before {
968      content: none;
969    }
970  }
971`;let e9=F.A.div`
972  margin-top: 24px;
973  padding: 12px 16px;
974  border: 1px solid #e4e8ec;
975  border-radius: 12px;
976  background-color: #f7f9fc;
977  padding-bottom: 8px;
978
979  .si-sub-intent-expand {
980    overflow: hidden;
981    font-size: 12px;
982    line-height: 18px; /* 150% */
983    margin-top: 8px;
984
985    a,
986    h1,
987    h2,
988    h3,
989    h4,
990    h5,
991    h6,
992    ul,
993    ol,
994    li {
995      font-size: 12px;
996      line-height: 18px; /* 150% */
997    }
998
999    ul li + li,
1000    ol li + li {
1001      margin-top: 8px;
1002    }
1003
1004    ol {
1005      list-style-type: decimal;
1006    }
1007
1008    .si-bot-text {
1009      color: #595959;
1010    }
1011  }
1012
1013  .si-sub-intent-title {
1014    color: #262626;
1015    /* color: var(--subot-inline-text-color, #262626); */
1016    font-size: 16px;
1017    line-height: 24px;
1018    font-weight: 600;
1019    display: flex;
1020    align-items: center;
1021    gap: 8px;
1022    cursor: pointer;
1023  }
1024  /* > div:first-child {
1025    font-size: 16px;
1026    font-weight: 600;
1027
1028    + div {
1029      margin-top: 16px;
1030
1031      ${G.M.mbUp} {
1032        margin-top: 24px;
1033      }
1034    }
1035
1036    ${G.M.mbUp} {
1037      font-size: 18px;
1038    }
1039  } */
1040`,References=e=>_().createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("mask",{id:"mask0_2159_150362",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},_().createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),_().createElement("g",{mask:"url(#mask0_2159_150362)"},_().createElement("path",{d:"M13.878 16.25a.35.35 0 0 0 .258-.11.35.35 0 0 0 .11-.259v-2.18a.35.35 0 0 0-.11-.257.35.35 0 0 0-.258-.111.35.35 0 0 0-.258.11.35.35 0 0 0-.111.259v2.179q0 .147.11.258.111.11.258.11m0-3.678q.15.008.26-.105a.37.37 0 0 0-.003-.523.36.36 0 0 0-.517 0 .35.35 0 0 0-.11.256.36.36 0 0 0 .112.259.35.35 0 0 0 .258.113M4.166 3.333v5.152-.024 8.205zm2.5 8.125h2.277q.182-.36.407-.668.226-.308.497-.582H6.666a.6.6 0 0 0-.445.18.6.6 0 0 0-.18.445q0 .266.18.445.18.18.445.18m0 3.333h1.69a4.7 4.7 0 0 1-.017-1.25H6.666a.6.6 0 0 0-.445.18.6.6 0 0 0-.18.446q0 .265.18.445t.445.18m-2.242 3.125q-.633 0-1.07-.437a1.45 1.45 0 0 1-.438-1.07V3.59q0-.63.438-1.068a1.45 1.45 0 0 1 1.068-.438h5.996q.305 0 .58.117a1.5 1.5 0 0 1 .482.322l3.497 3.497a1.5 1.5 0 0 1 .439 1.062V8.68a4 4 0 0 0-.608-.14 5 5 0 0 0-.642-.054V7.083h-3a.73.73 0 0 1-.534-.216.73.73 0 0 1-.216-.534v-3H4.422a.25.25 0 0 0-.176.08.25.25 0 0 0-.08.176v12.82q0 .097.08.177t.176.08h4.545q.182.36.411.668.23.308.51.582zm9.453-7.628q1.561 0 2.656 1.095t1.095 2.655-1.095 2.656-2.656 1.094-2.655-1.094-1.094-2.656 1.094-2.655 2.656-1.095",fill:"#6CBEF0"}))),SubInlineIntent=({subIntents:e})=>{let[t,n]=(0,h.useState)(!1),[i,...l]=e;return i?_().createElement(e9,null,_().createElement("div",{className:"si-sub-intent-title",onClick:()=>n(!t)},_().createElement(References,null),_().createElement("span",null,i.label),_().createElement(ChevronDown,{className:"si-chevron-down"})),_().createElement(D.P.div,{className:"si-sub-intent-expand",animate:t?{height:"auto"}:{height:0},transition:{duration:.3},"data-show":t},l.map(e=>{let t=(null==e?void 0:e.type)||"",n=e4[t];return n&&_().createElement(n,{key:e.id,intent:e})}))):null},Container$f=({node:e})=>{let t=(0,h.useRef)(null),{formatMessage:n}=(0,h.useContext)(k.T),{setIsShowFooter:i,listNodes:l}=(0,h.useContext)(eM),[o,a]=(0,h.useState)(!1);(0,h.useEffect)(()=>{var e;(null===(e=t.current)||void 0===e?void 0:e.offsetHeight)&&t.current.offsetHeight<=300&&a(!0)},[]);let r=l[0];console.log("botItem",typeof r);let s=e.intents||[],{mainIntents:d,subIntents:c,mainButtonIntents:u,bookingButtonIntents:m,relatedArticleIntents:p,suggestedServiceIntents:v,botSubmissionIntent:g}=(0,h.useMemo)(()=>{let e;let t=[],n=[],i=[],l=[],o=[],a=[],r=[];
1040return s.forEach(s=>{switch(null==s?void 0:s.type){case E.N.BOT_MAIN_IMAGE:case E.N.BOT_MAIN_TITLE:case E.N.BOT_MAIN_BODY:t.push(s);break;case E.N.BOT_SUGGESTED_SERVICE:r.push(s);break;case E.N.BOT_MAIN_BUTTON:n.push(s);break;case E.N.BOT_BOOKING:i.push(s);break;case E.N.BOT_RECALCULATE:break;case E.N.BOT_SUB_TITLE:case E.N.BOT_SUB_BODY:l.push(s);break;case E.N.BOT_RELATED_ARTICLE:a.push(s);break;case E.N.BOT_RISK_SCREEN:o.push(s);break;case E.N.BOT_SUBMISSION:e=s}}),{mainIntents:t,subIntents:l,mainButtonIntents:n,bookingButtonIntents:i,screenerIntents:o,relatedArticleIntents:a.filter(e=>{var t;return null===(t=articleDataComputed(e))||void 0===t?void 0:t.title}),botSubmissionIntent:e,suggestedServiceIntents:r}},[]);return((0,h.useMemo)(()=>{i(!0)},[]),(0,h.useEffect)(()=>{(null==g?void 0:g.label)?sendCompleteFlowEvent({risk_level:g.label}):sendCompleteFlowEvent()},[]),e)?_().createElement(e8,{id:"si-node-final"},_().createElement(D.P.div,{ref:t,animate:o?{height:"auto"}:{height:300},transition:{duration:.3},className:"wrap-main-intent","data-hide":!o},_().createElement(Container$h,{intents:d})),!o&&_().createElement("span",{role:"presentation",className:"see-more-intent",onClick:()=>a(!0)},n({id:"articlePage.careEmbedding.seeMore",defaultMessage:"See more"})),_().createElement("div",{className:"wrap-main-button-intent"},[...u,...m].map(e=>{let t=e4[e.type||""];return t&&_().createElement(t,{key:e.id,intent:e})})),(null==v?void 0:v.length)>0&&_().createElement("div",null,v.map(e=>{let t=e4[e.type||""];return t&&_().createElement(t,{key:e.id,intent:e})})),(null==p?void 0:p.length)>0&&_().createElement("div",{style:{marginTop:24}},_().createElement(Z.T,{size:"lg",weight:"semiBold",color:"var(--subot-inline-text-color, #262626)"},n({id:"articlePage.relatedPostsSectionTitle",defaultMessage:"Related Articles"})),_().createElement("div",{style:{padding:"8px 0"}},p.map(e=>{let t=e4[e.type||""];return t&&_().createElement(t,{key:e.id,intent:e})}))),_().createElement(SubInlineIntent,{subIntents:c})):null};Container$f.displayName="SubotinlineNodeFinalStandard";let te=F.A.div`
1041  .si-final-thank-action {
1042    text-align: center;
1043  }
1044`,Container$e=({node:e})=>{let{params:t,onNext:n,setIsShowFooter:i}=(0,h.useContext)(eM);(0,h.useMemo)(()=>{i(!0)},[]);let l=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e===E.f.RESULT_BUTTON);return n||null},[null==e?void 0:e.actions]),o=(0,h.useCallback)(()=>{n&&n(Object.assign(Object.assign(Object.assign({},t),null==e?void 0:e._message),{action_id:null==l?void 0:l.id,action_value:null==l?void 0:l.key}))},[l]);return e?_().createElement(te,{id:"si-node-final-thank-you"},_().createElement(Container$h,{intents:e.intents||[]}),l&&_().createElement("div",{className:"si-final-thank-action"},_().createElement(H.B,{size:"md",onClick:o},l.label))):null};Container$e.displayName="SubotinlineNodeFinal";var tt={vn:[{name:"vn",child:"City"},{name:"City",child:"District"},{name:"District",child:"Ward"},{name:"Ward",child:"Postcode"},{name:"Postcode",child:""}],id:[{name:"id",child:"Province"},{name:"Province",child:"City"},{name:"City",child:"District"},{name:"District",child:"Village"},{name:"Village",child:"Postcode"},{name:"Postcode",child:""}],th:[{name:"th",child:"Province"},{name:"Province",child:"District"},{name:"District",child:"Sub-district"},{name:"Sub-district",child:"Postcode"},{name:"Postcode",child:""}],mm:[{name:"mm",child:"City"},{name:"City",child:"Postcode"},{name:"Postcode",child:""}],tw:[{name:"tw",child:"Country"},{name:"Country",child:"City"},{name:"City",child:"Postcode"},{name:"Postcode",child:""}],ph:[{name:"ph",child:"Region"},{name:"Region",child:"Province"},{name:"Province",child:"City"},{name:"City",child:"Barangay"},{name:"Barangay",child:"Postcode"},{name:"Postcode",child:""}],kh:[{name:"kh",child:"Province"},{name:"Province",child:"District"},{name:"District",child:"Sub-district"},{name:"Sub-district",child:"Postcode"},{name:"Postcode",child:""}],my:[{name:"my",child:"State"},{name:"State",child:"Sub-district"},{name:"Sub-district",child:"Location"},{name:"Location",child:"Postcode"},{name:"Postcode",child:""}],in:[{name:"in",child:"State"},{name:"State",child:"Sub-district"},{name:"Sub-district",child:"Location"},{name:"Location",child:"Postcode"},{name:"Postcode",child:""}]};let tn=(0,M.g)(k.u);function getLevelKey(e,t){return tt[e][t-1].child||tt.vn[t-1].child}function getDataFromLevelKey(e,t,n,i){let l={},o=[];fetch(tn+`/countries/${e}.json`).then(e=>e.json()).then(a=>{let r=a[e];
1044r.forEach(e=>{let i="";e[t]&&!l[e[t]]&&(n&&n.key?e[n.key]===n.value&&(i=e[t]):i=e[t],i&&(l[e[t]]=!0,o.push(e[t])))}),i&&i(o)}).catch(e=>{console.log(e),i&&i([])})}let fnLogicSort=(e,t)=>{let n=e.replace("Tỉnh ","").replace("Th\xe0nh phố ","").replace("Quận ","").replace("Huyện ","").replace("Phường ","").replace("Thị x\xe3 ","").replace("Thị trấn ","").replace("X\xe3 ",""),i=t.replace("Tỉnh ","").replace("Th\xe0nh phố ","").replace("Quận ","").replace("Huyện ","").replace("Phường ","").replace("Thị x\xe3 ","").replace("Thị trấn ","").replace("X\xe3 ","");return n.localeCompare(i)},useAddressMultipleLevelData=e=>{let t=(e||"vn").toLowerCase(),n=getLevelKey(t,1),i=getLevelKey(t,2),l=getLevelKey(t,3),[o,a]=(0,h.useState)([]),[r,s]=(0,h.useState)([]),[d,c]=(0,h.useState)([]),[u,m]=(0,h.useState)(""),[p,v]=(0,h.useState)(""),[g,b]=(0,h.useState)("");return(0,h.useEffect)(()=>{getDataFromLevelKey(t,n,void 0,e=>{a(e.sort(fnLogicSort))})},[t,n]),(0,h.useEffect)(()=>{i&&getDataFromLevelKey(t,i,{key:n,value:u},e=>{s(e.sort(fnLogicSort))})},[t,n,i,u]),(0,h.useEffect)(()=>{l&&getDataFromLevelKey(t,l,{key:i,value:p},e=>{c(e.sort(fnLogicSort))})},[t,i,l,p]),{level1:o,level2:r,level3:d,setSelectedLevel1:m,setSelectedLevel2:v,setSelectedLevel3:b,selectedLevel1:u,selectedLevel2:p,selectedLevel3:g}},CheckCircleGreen=e=>_().createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.333 8A6.67 6.67 0 0 1 8 1.333 6.67 6.67 0 0 1 14.667 8 6.67 6.67 0 0 1 8 14.667 6.67 6.67 0 0 1 1.333 8m2.467.467 2.393 2.393c.26.26.687.26.94 0l5.06-5.06a.664.664 0 1 0-.94-.94L6.667 9.447 4.74 7.527a.664.664 0 1 0-.94.94",fill:"#00B16A"})),IconEdit=e=>_().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M19.1719 2C18.4481 2 17.7244 2.27562 17.1719 2.82812L16 4L20 8L21.1719 6.82812C22.2759 5.72412 22.2759 3.93313 21.1719 2.82812C20.6194 2.27562 19.8956 2 19.1719 2ZM14.5 5.5L3 17V21H7L18.5 9.5L14.5 5.5Z",fill:"#2685F1"})),InfoError=e=>_().createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1.333A6.67 6.67 0 0 0 1.333 8 6.67 6.67 0 0 0 8 14.667 6.67 6.67 0 0 0 14.667 8 6.67 6.67 0 0 0 8 1.333m0 7.334A.67.67 0 0 1 7.333 8V5.333c0-.366.3-.666.667-.666s.667.3.667.666V8c0 .367-.3.667-.667.667M7.333 10v1.333h1.334V10z",fill:"#F44D2C"}));var ti=(0,h.forwardRef)(({onFinish:e,onClick:t,isFinished:n,resendLabel:i,className:l},o)=>{let[a,r]=(0,h.useState)(M.T),s=(0,h.useRef)(),d=(0,h.useRef)(),{formatMessage:c}=(0,h.useContext)(k.T);d.current=e;let u=(0,h.useCallback)(()=>{let e=M.T;r(e),clearInterval(s.current),s.current=setInterval(()=>{var t;r(e-=1),0===e&&(null===(t=d.current)||void 0===t||t.call(d,!0),clearInterval(s.current))},1e3)},[]),m=(0,h.useCallback)(()=>{r(0),clearInterval(s.current)},[]);return(0,h.useImperativeHandle)(o,()=>({reset:u,cancel:m,isFinished:0===a})),(0,h.useEffect)(()=>(u(),()=>{clearInterval(s.current)}),[]),_().createElement("div",{className:l,onClick:t},i||c({id:"subot.resendOTP.button",defaultMessage:"Resend"}),a>0&&!n&&` (${a}s)`)});let tl=F.A.div`
1045  margin: 0 auto;
1046  background: #f7f9fc;
1047  border-radius: ${Q.w.borderRadius};
1048  ${G.M.mbDown} {
1049    padding: 16px;
1050  }
1051  ${G.M.tdDown} {
1052    padding: 24px;
1053  }
1054  ${G.M.mbUp} {
1055    padding: 32px;
1056  }
1057  .user-info-form {
1058    .input-row {
1059      ${G.M.mbDown} {
1060        margin-bottom: 16px;
1061      }
1062      ${G.M.tdDown} {
1063        margin-bottom: 18px;
1064      }
1065      ${G.M.mbUp} {
1066        margin-bottom: 20px;
1067      }
1068      .address-dropdown > ul {
1069        z-index: 20000;
1070        max-height: 250px;
1071        overflow-y: auto;
1072      }
1073
1074      &.error {
1075        margin-bottom: 0;
1076      }
1077    }
1078    label {
1079      display: block;
1080      margin-bottom: 6px;
1081      color: ${Q.w.colors.gray600};
1082      font-size: 13px;
1083      font-weight: bold;
1084    }
1085    input[type='tel'],
1086    input[type='number'] {
1087      width: 100%;
1088      padding: 12px 16px;
1089      border: solid 1px ${Q.w.colors.gray200};
1090      background: #fff;
1091      border-radius: ${Q.w.borderRadius};
1092
1093      &[disabled] {
1094        background-color: ${Q.w.colors.gray100};
1095      }
1096    }
1097    input[type='number']::-webkit-inner-spin-button,
1098    input[type='number']::-webkit-outer-spin-button {
1099      -webkit-appearance: none;
1100      -moz-appearance: none;
1101      appearance: none;
1102    }
1103    button {
1104      width: 100%;
1105    }
1106    .error-message {
1107      display: block;
1108      padding-bottom: 20px;
1109      color: ${Q.w.colors.red700};
1110      font-weight: ${Q.w.sizes.fwRegular};
1111    }
1112    .submit-btn {
1113      padding: 12px 24px;
1114      background-color: ${Q.w.colors.primaryBase};
1115      border-radius: ${Q.w.borderRadius};
1116      color: #fff;
1117      cursor: pointer;
1118      font-size: 16px;
1119      font-weight: 700;
1120      line-height: 24px;
1121      transition: background-color 0.3s, border-color 0.3s;
1122      display: flex;
1123      justify-content: center;
1124      &:hover {
1125        background-color: ${Q.w.colors.primaryHover};
1126      }
1127      &[disabled] {
1128        background-color: ${Q.w.colors.gray200};
1129        color: #bfbfbf;
1130        cursor: not-allowed;
1131      }
1132
1133      .spinner {
1134        margin-right: 20px;
1135      }
1136    }
1137    .submit-btn-row {
1138      ${G.M.mbUp} {
1139        margin-bottom: 16px;
1140      }
1141      ${G.M.tdDown} {
1142        margin-bottom: 14px;
1143      }
1144      ${G.M.mbDown} {
1145        margin-bottom: 12px;
1146      }
1147      .subot-checkbox {
1148        display: flex;
1149        align-items: flex-start;
1150        margin: 0;
1151        cursor: pointer;
1152        &__input {
1153          position: relative;
1154          display: block;
1155          overflow: hidden;
1156          width: 18px;
1157          height: 18px;
1158          box-sizing: border-box;
1159          padding: 0;
1160          margin-right: 10px;
1161          &:before {
1162            position: absolute;
1163            top: 0;
1164            right: 0;
1165            bottom: 0;
1166            left: 0;
1167            display: flex;
1168            background-color: ${Q.w.colors.primaryBase};
1169            background-image: url('data:image/svg+xml,<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11 21C16.5228 21 21 16.5228 21 11C21 5.47715 16.5228 1 11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21Z" fill="%232D87F3" stroke="%232D87F3" stroke-width="2"/><path d="M15.5714 8L9.67857 14L7 11.2727" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
1170            background-position: center;
1171            background-repeat: no-repeat;
1172            background-size: 120%;
1173            content: '';
1174            opacity: 0;
1175            transition: 0.3s all ease;
1176          }
1177          &:checked:before {
1178            opacity: 1;
1179            transition: 0.3s all ease;
1180          }
1181        }
1182        &__label {
1183          flex: 1;
1184          font-weight: 400;
1185          line-height: 1.4;
1186        }
1187      }
1188    }
1189  }
1190`,to=F.A.div`
1191  position: relative;
1192
1193  .PhoneInputCountry {
1194    background-color: #f2f2f2;
1195
1196    .PhoneInputCountrySelectArrow {
1197      display: none !important;
1198    }
1199  }
1200
1201  .icon-edit-phone {
1202    width: 1em;
1203    height: 1em;
1204    position: absolute;
1205    right: 16px;
1206    top: 17px;
1207    cursor: pointer;
1208
1209    path {
1210      fill: ${Q.w.colors.gray600};
1211    }
1212  }
1213`,Location=e=>_().createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.167 7.72A5.83 5.83 0 0 1 10 1.889a5.83 5.83 0 0 1 5.833 5.833c0 3.475-3.683 8.267-5.191 10.092-.334.4-.942.4-1.275 0-1.517-1.825-5.2-6.617-5.2-10.092m3.75 0a2.084 2.084 0 1 0 4.168 0 2.084 2.084 0 0 0-4.168 0",fill:"#ADB3BC"})),ta=F.A.div`
1214  display: flex;
1215  gap: 13px;
1216
1217  svg {
1218    position: relative;
1219    top: 2px;
1220    min-width: 20px;
1221  }
1222`,tr=(0,h.forwardRef)(function(e,t){var{label:n}=e,i=(0,x.a)(e,["label"]);return _().createElement(ta,Object.assign({ref:t},i),_().createElement(Location,null),_().createElement("span",null,n))}),DeleteSvg=e=>_().createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16M4.293 4.293a1 1 0 0 1 1.414 0L8 6.586l2.293-2.293a1 1 0 1 1 1.414 1.414L9.414 8l2.293 2.293a1 1 0 0 1-1.414 1.414L8 9.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L6.586 8 4.293 5.707a1 1 0 0 1 0-1.414",fill:"#BFBFBF"})),ts=["places"];(i=o||(o={})).HELLO_BAC_SI="VN",i.MARRY_BABY="VN",i.HELLO_SEHAT="ID",i.HELLO_KHUNMOR="TH",i.HELLO_DOKTOR="MY",i.HELLO_YISHI="TW",i.HELLO_KRUPET="KH",i.HELLO_SAYARWON="MM",i.HELLO_SWATHYA="IN",i.HELLO_DOCTOR="PH",i.HELLO_DOCTOR_FIL="PH";let td={streetNumber:"street_number",street:"route",ward:"sublocality_level_1",district:"administrative_area_level_2",city:"locality",province:"administrative_area_level_1"},tc=Object.keys(td).concat(["address"]);var tu=(0,h.memo)(function({action:e,formError:t,control:n,initValue:i,onChange:l}){let o=null===k.G||void 0===k.G?void 0:k.G.locale,a=o.split("-")[1],{formatMessage:r}=(0,h.useContext)(k.T),[s,d]=(0,h.useState)(""),c=(0,h.useRef)(null),u=(0,h.useRef)(null),{predictions:m}=(0,er.u)(s,a);(0,h.useEffect)(()=>{c.current=document.createElement("div")},[]),(0,h.useEffect)(()=>{(null==i?void 0:i.address)&&d(i.address)},[]);let p=(0,h.useMemo)(()=>{let e=m.map(e=>({value:e.description,label:e.description,placeId:e.placeId}));return e},[m]),separateAddress=e=>{var t,n,i,l,o,a,r;let s=(null===(t=e.find(e=>e.types.includes(td.streetNumber)))||void 0===t?void 0:t.long_name)||"",d=(null===(n=e.find(e=>e.types.includes(td.street)))||void 0===n?void 0:n.long_name)||"",c=(null===(i=e.find(e=>e.types.includes(td.ward)))||void 0===i?void 0:i.long_name)||"",u=(null===(l=e.find(e=>e.types.includes(td.district)))||void 0===l?void 0:l.long_name)||"",m=(null===(o=e.find(e=>e.types.includes(td.city)))||void 0===o?void 0:o.long_name)||"",p="";return m?p=(null===(r=e.find(e=>e.types.includes(td.province)))||void 0===r?void 0:r.long_name)||"":m=(null===(a=e.find(e=>e.types.includes(td.province)))||void 0===a?void 0:a.long_name)||"",{street:s.concat(" ",d),ward:c,district:u,city:m,province:p}},handleSelectAddress=(t,n)=>{if(n){let i=new window.google.maps.places.PlacesService(c.current);i.getDetails({placeId:n,language:er.a[a]},function(n,i){if((null==e?void 0:e.key)&&i===window.google.maps.places.PlacesServiceStatus.OK){let{city:i,district:o,province:a,street:r,ward:s}=separateAddress(n.address_components);l(e.key,{address:t,city:i,district:o,province:a,street:r,ward:s})}else console.error("Get place details failed")})}};return e.key?_().createElement("div",{className:"input-row input-google-address-row",ref:u},_().createElement(ea.LoadScript,{googleMapsApiKey:er.G,libraries:ts,loadingElement:_().createElement(_().Fragment,null)}),_().createElement("label",{htmlFor:e.key},e.label),_().createElement(el.xI,{name:e.key,control:n,rules:{required:!0},render:t=>{let{address:n=""}=t.field.value||{};return console.log("props",t),_().createElement(et.S,{data:p,icon:_().createElement(Location,null),itemComponent:tr,filter:()=>!0,searchable:!0,className:j()({isEmpty:0===p.length||1===p.length&&p[0].label===n}),onChange:t=>{console.log("newAddress",t);let n=p.find(e=>e.value===t);l(e.key,{address:t}),n&&t&&handleSelectAddress(t,n.placeId)},clearable:!0,styles:()=>({item:{"&":{paddingLeft:"16px"},"&[data-selected], &[data-selected]:hover":{color:"#262626",backgroundColor:"#f8f9fc"},"&:first-child":{display:"none"}},icon:{"&":{width:"auto",paddingLeft:"16px",paddingRight:"13px",zIndex:0}},input:{"&":{height:"50px",paddingLeft:"45px!important",paddingRight:"32px!important"}},itemsWrapper:{"&":{padding:"0"}},rightSection:{pointerEvents:"auto"}}),value:n,rightSection:n?_().createElement(DeleteSvg,{style:{cursor:"pointer"},className:"delete-icon",onClick:()=>{l(e.key,void 0),setTimeout(()=>{var e;let t=null===(e=u.current)||void 0===e?void 0:e.querySelector(".mantine-Select-input");null==t||t.focus()},200)}}):_().createElement(_().Fragment,null),placeholder:e.label,searchValue:s,onSearchChange:t=>{d(t),t||l(e.key,void 0)}})}}),t&&_().createElement("p",{className:"error-message"},r({id:"validation.error.requiredField",defaultMessage:"This field is required"}))):null});let tm=(0,es.s)(F.A.div`
1223    position: relative;
1224    .input-date {
1225      display: none;
1226    }
1227  `,"hhgcomp-subot-datepickerinput"),tp=F.A.div`
1228  margin: 0 auto;
1229  background: #f7f9fc;
1230  border-radius: ${Q.w.borderRadius};
1231  ${G.M.mbDown} {
1232    padding: 16px;
1233  }
1234  ${G.M.tdDown} {
1235    padding: 24px;
1236  }
1237  ${G.M.mbUp} {
1238    padding: 32px;
1239  }
1240  .user-info-form {
1241    .input-google-address-row {
1242      .isEmpty {
1243        .mantine-Select-dropdown {
1244          display: none !important;
1245        }
1246      }
1247
1248      .mantine-Select-dropdown {
1249        z-index: 1;
1250      }
1251    }
1252    .input-row {
1253      ${G.M.mbDown} {
1254        margin-bottom: 16px;
1255      }
1256      ${G.M.tdDown} {
1257        margin-bottom: 18px;
1258      }
1259      ${G.M.mbUp} {
1260        margin-bottom: 20px;
1261      }
1262      .address-dropdown > ul {
1263        z-index: 20000;
1264        max-height: 250px;
1265        overflow-y: auto;
1266      }
1267
1268      &.input-row--otp {
1269        .PhoneInput {
1270          .PhoneInputCountry {
1271            background-color: #f2f2f2;
1272          }
1273          &.PhoneInput--readOnly {
1274            .PhoneInputInput {
1275              background-color: #f2f2f2;
1276            }
1277          }
1278        }
1279        .PhoneInputInput {
1280          padding: 12px 16px;
1281          border-left: 1px solid #d9d9d9;
1282
1283          &[disabled] {
1284            background-color: ${Q.w.colors.gray100};
1285          }
1286        }
1287        & > .error-message {
1288          top: -1em;
1289          position: relative;
1290          padding-top: 0;
1291        }
1292      }
1293      &.input-row--verify {
1294        &.verified-otp {
1295          input {
1296            margin-bottom: 0;
1297
1298            :disabled {
1299              background-color: #f2f2f2;
1300            }
1301          }
1302        }
1303        &.error-verify-otp {
1304          input {
1305            margin-bottom: 0;
1306            border: 1px solid #e64728;
1307          }
1308        }
1309        .verify-success {
1310          display: flex;
1311          margin-top: 5px;
1312          align-items: center;
1313          svg {
1314            margin-right: 5px;
1315          }
1316          &-label {
1317            font-weight: 400;
1318            font-size: 14px;
1319            line-height: 22px;
1320            color: #009e5c;
1321          }
1322        }
1323        input {
1324          margin-bottom: 20px;
1325        }
1326        .error-message {
1327          margin-bottom: 20px;
1328        }
1329      }
1330    }
1331    label {
1332      display: block;
1333      margin-bottom: 6px;
1334      color: var(--subot-inline-text-color, ${Q.w.colors.gray600});
1335      font-size: 13px;
1336      font-weight: bold;
1337    }
1338
1339    input:not([type='checkbox']),
1340    input:not([type='radio']) {
1341      width: 100%;
1342      padding: 12px 16px;
1343      border: solid 1px ${Q.w.colors.gray200};
1344      background: #fff;
1345      border-radius: ${Q.w.borderRadius};
1346    }
1347    .mantine-Select-input {
1348      line-height: 1;
1349      height: auto !important;
1350      padding-right: 30px !important;
1351    }
1352    input[type='radio'] {
1353      position: relative;
1354      display: flex;
1355      width: 20px;
1356      height: 20px;
1357      align-items: center;
1358      justify-content: center;
1359      padding: 0;
1360      border-width: 2px;
1361      border-radius: 50%;
1362    }
1363    input[type='radio']:before {
1364      position: absolute;
1365      top: 50%;
1366      left: 50%;
1367      display: block;
1368      width: 10px;
1369      height: 10px;
1370      background-color: ${Q.w.colors.primaryBase};
1371      border-radius: 50%;
1372      content: '';
1373      opacity: 0;
1374      transform: translate(-50%, -50%);
1375      transition: 0.3s all ease;
1376    }
1377    input[type='checkbox']:checked,
1378    input[type='radio']:checked {
1379      border-color: ${Q.w.colors.primaryBase};
1380      transition: 0.3s all ease;
1381    }
1382    input[type='checkbox']:checked:before,
1383    input[type='radio']:checked:before {
1384      opacity: 1;
1385      transition: 0.3s all ease;
1386    }
1387    ${tm.classSelector} {
1388      input {
1389        background-image: url(/svg/calendar.svg);
1390        background-position: right 14px center;
1391        background-repeat: no-repeat;
1392      }
1393    }
1394    button {
1395      width: 100%;
1396    }
1397    .radio-label {
1398      display: flex;
1399      align-items: center;
1400      justify-content: flex-start;
1401      margin-bottom: 0;
1402      cursor: pointer;
1403      input[type='radio'] {
1404        margin-right: 8px;
1405      }
1406    }
1407    .radio-group {
1408      display: flex;
1409      flex-wrap: wrap;
1410      align-items: flex-start;
1411      justify-content: flex-start;
1412      margin: -4px -16px;
1413      .radio-label {
1414        padding: 4px 16px;
1415        font-size: 14px;
1416        font-weight: 400;
1417      }
1418    }
1419    .error-message {
1420      display: block;
1421      padding-top: 10px;
1422      font-size: 14px;
1423      display: flex;
1424      align-items: center;
1425      color: ${Q.w.colors.red700};
1426      font-weight: ${Q.w.sizes.fwRegular};
1427
1428      svg {
1429        margin-right: 5px;
1430      }
1431    }
1432    .submit-btn {
1433      padding: 12px 24px;
1434      background-color: ${Q.w.colors.primaryBase};
1435      border-radius: ${Q.w.borderRadius};
1436      color: #fff;
1437      cursor: pointer;
1438      font-size: 16px;
1439      font-weight: 700;
1440      line-height: 24px;
1441      transition: background-color 0.3s, border-color 0.3s;
1442      &:hover {
1443        background-color: ${Q.w.colors.primaryHover};
1444      }
1445      &[disabled] {
1446        font-weight: ${Q.w.sizes.fwSemiBold};
1447        background-color: rgb(242, 242, 242);
1448        color: rgb(140, 140, 140);
1449      }
1450    }
1451    .submit-btn-row {
1452      ${G.M.mbUp} {
1453        margin-bottom: 16px;
1454      }
1455      ${G.M.tdDown} {
1456        margin-bottom: 14px;
1457      }
1458      ${G.M.mbDown} {
1459        margin-bottom: 12px;
1460      }
1461      .subot-checkbox {
1462        display: flex;
1463        align-items: flex-start;
1464        margin: 0;
1465        cursor: pointer;
1466
1467        &__label {
1468          flex: 1;
1469          font-weight: 400;
1470          line-height: 20px;
1471          padding-left: 28px;
1472          position: relative;
1473
1474          &:before {
1475            position: absolute;
1476            top: 0;
1477            left: 0;
1478            width: 20px;
1479            height: 20px;
1480            border: 2px solid #8c8c8c;
1481            border-radius: 50%;
1482            content: '';
1483            transition: 0.25s all linear;
1484          }
1485          &:after {
1486            content: '';
1487            position: absolute;
1488            top: 5px;
1489            left: 5px;
1490            width: 10px;
1491            height: 10px;
1492            background-color: #2685f1;
1493            border-radius: 50%;
1494            opacity: 0;
1495            transition: 0.25s all linear;
1496          }
1497        }
1498
1499        &__input {
1500          display: none;
1501
1502          &:checked + .subot-checkbox__label {
1503            &:before {
1504              border-color: #2685f1;
1505            }
1506
1507            &:after {
1508              opacity: 1;
1509            }
1510          }
1511        }
1512      }
1513    }
1514    .PhoneInput {
1515      .PhoneInputCountry {
1516        padding: 8px 15px;
1517        border: solid 1px ${Q.w.colors.gray200};
1518        border-right: none;
1519        margin: 0;
1520        background-color: #fff;
1521        border-bottom-left-radius: 6px;
1522        border-top-left-radius: 6px;
1523      }
1524      .PhoneInputInput {
1525        padding-left: 0;
1526        border: solid 1px ${Q.w.colors.gray200};
1527        border-left: none;
1528        margin: 0;
1529        border-bottom-left-radius: 0 !important;
1530        border-bottom-right-radius: 6px !important;
1531        border-top-left-radius: 0 !important;
1532        border-top-right-radius: 6px !important;
1533      }
1534    }
1535    .form-terms {
1536      margin-top: 20px;
1537      font-size: 13px;
1538      line-height: 1.4;
1539      color: var(--subot-inline-text-color, #595959);
1540      p {
1541        text-align: center;
1542      }
1543      a {
1544        color: var(--subot-inline-primary-color);
1545        text-align: center;
1546        text-decoration: none;
1547      }
1548    }
1549
1550    .subot_input_date {
1551      --input-height: 46px;
1552      --input-max-width: 100%;
1553      input[type='text'] {
1554        padding: 0 !important;
1555        background-color: transparent !important;
1556        background-image: none !important;
1557        border: none !important;
1558        line-height: 0.5;
1559      }
1560
1561      .input_date-input_container {
1562        background-color: #fff;
1563
1564        &:focus-within,
1565        &.input_date-input_shrink {
1566          --input-padding-y: 5px;
1567        }
1568      }
1569    }
1570  }
1571
1572  &.si-form-revamp {
1573    width: 100%;
1574    border-radius: 12px;
1575    background: var(--subot-inline-bg-content-color, #f7f9fc);
1576    padding: 24px !important;
1577
1578    .user-info-form {
1579      .submit-btn {
1580        font-size: 14px;
1581        border-radius: 8px;
1582        padding: 8px 16px;
1583
1584        &:not(:disabled) {
1585          color: var(--subot-inline-text-button-color, #fff);
1586          background-color: var(--subot-inline-primary-color);
1587        }
1588
1589        &:not(:disabled):hover {
1590          background-color: var(--subot-inline-primary-color-hover);
1591        }
1592      }
1593      .submit-btn-row .subot-checkbox__label:after {
1594        background-color: var(--subot-inline-primary-color);
1595      }
1596      .submit-btn-row
1597        .subot-checkbox__input:checked
1598        + .subot-checkbox__label:before {
1599        border-color: var(--subot-inline-primary-color);
1600      }
1601      .address-dropdown {
1602        --dropdown-padding: 8px 18px 8px 16px;
1603      }
1604      button.btn-send-otp:not(:disabled) {
1605        color: var(--subot-inline-primary-color);
1606
1607        &:hover {
1608          background-color: var(--subot-inline-primary-color-100);
1609        }
1610      }
1611      .address-dropdown {
1612        --dropdown-padding: 8px 18px 8px 16px;
1613      }
1614    }
1615  }
1616`,tv=F.A.div`
1617  .wrapper-address-lever {
1618    display: flex;
1619    gap: 16px;
1620    justify-content: space-between;
1621
1622    ${G.M.mbDown} {
1623      flex-direction: column;
1624      gap: 0;
1625    }
1626
1627    .input-row {
1628      flex: 1;
1629      min-width: 0;
1630
1631      .hide-label {
1632        display: none;
1633      }
1634
1635      .address-dropdown > div {
1636        overflow: hidden;
1637        text-overflow: ellipsis;
1638      }
1639
1640      .address-input {
1641        white-space: nowrap;
1642      }
1643
1644      .show-placeholder {
1645        > div {
1646          span {
1647            color: ${Q.w.colors.gray400};
1648            font-size: 16px;
1649            font-weight: 400;
1650            line-height: 24px;
1651          }
1652        }
1653      }
1654    }
1655  }
1656`,getActionEmail=e=>e.find(({type:e})=>e===E.f.USER_SUBMIT_EMAIL),getActionName=e=>e.find(({type:e})=>e===E.f.USER_SUBMIT_NAME),getActionPhone=e=>e.find(({type:e})=>e===E.f.USER_SUBMIT_PHONE),getActionOtp=e=>e.find(({type:e})=>e===E.f.USER_SUBMIT_OTP),getActionOtpWhatsApp=e=>e.find(({type:e})=>e===E.f.USER_SUBMIT_WHATSAPP),getActionConfirm=e=>e.find(({type:e})=>
1656e===E.f.USER_SUBMIT_CONFIRM),isControlOtp=e=>e===E.E[E.f.USER_SUBMIT_OTP]||e===E.E[E.f.USER_SUBMIT_WHATSAPP],isActionTypeOtp=e=>e===E.f.USER_SUBMIT_OTP||e===E.f.USER_SUBMIT_WHATSAPP,getTranslateVerifiedOtpMessages=()=>{let e=new Map;return e.set(ed.L.Vietnam,"Số điện thoại n\xe0y đ\xe3 được x\xe1c minh."),e.set(ed.L.PhilippinesEnglish,"This phone number has been verified."),e.set(ed.L.Cambodia,"លេខទូរស័ព្ទនេះត្រូវបានផ្ទៀងផ្ទាត់។"),e.set(ed.L.India,"इस फ़ोन नंबर की पुष्टि कर दी गई है."),e.set(ed.L.Indonesia,"Nomor telepon ini telah diverifikasi."),e.set(ed.L.Malaysia,"Nombor telefon ini telah disahkan."),e.set(ed.L.Myanmar,"ဤဖုန်းနံပါတ်ကို စစ်ဆေးပြီးပါပြီ။"),e.set(ed.L.Taiwan,"該電話號碼已經過驗證。"),e.set(ed.L.Thailand,"หมายเลขโทรศัพท์นี้ได้รับการตรวจสอบแล้ว"),e.set(ed.L.PhilippinesTagalog,"Na-verify na ang numero ng teleponong ito."),e},getTransPleaseVerifiedOtp=()=>{let e=new Map;return e.set(ed.L.Vietnam,"Vui l\xf2ng x\xe1c minh số điện thoại"),e.set(ed.L.PhilippinesEnglish,"Please verify your phone number"),e.set(ed.L.Cambodia,"សូមផ្ទៀងផ្ទាត់លេខទូរស័ព្ទរបស់អ្នក។"),e.set(ed.L.India,"कृपया अपना फ़ोन नंबर सत्यापित करें"),e.set(ed.L.Indonesia,"Harap verifikasi nomor telepon AndaNomor telepon ini telah diverifikasi."),e.set(ed.L.Malaysia,"Sila sahkan nombor telefon anda"),e.set(ed.L.Myanmar,"သင့်ဖုန်းနံပါတ်ကို အတည်ပြုပါ။"),e.set(ed.L.Taiwan,"請驗證您的電話號碼"),e.set(ed.L.Thailand,"กรุณาตรวจสอบหมายเลขโทรศัพท์ของคุณ"),e.set(ed.L.PhilippinesTagalog,"Paki-verify ang iyong numero ng telepono"),e},validateDateField=(e,t,n,i)=>{let l=n({id:"error.day.invalid",defaultMessage:"This date is not valid, please update."});if(!e)return n({id:"validation.error.requiredField",defaultMessage:"This field is required"});if("string"==typeof e){let n=e.split("/");return 3===n.length?l:!t||l}let o=$()(e);return o.isValid()?!i||i(e):l},tg={ERR_PHONE_VERIFIED:{id:"common.phone_verified",defaultMessage:"This phone number was verified"},ERR_OTP_EXPIRED:{id:"common.otp_expired",defaultMessage:"Your OTP has expired. Please request a new OTP."},ERR_INVALID_PHONE_NUMBER:{id:"common.phone_invalid",defaultMessage:"Invalid phone number"}
1656,ERR_OTP_INVALID:{id:"common.otp_invalid",defaultMessage:"Invalid OTP"},ERR_UNKNOWN:{id:"common.otp_unknow",defaultMessage:"Unknown error"}},tb=F.A.div`
1657  display: flex;
1658  align-items: center;
1659  > svg,
1660  > img {
1661    width: 24px;
1662    height: 24px;
1663    margin-right: 5px;
1664    border-radius: 2px;
1665  }
1666  > div {
1667    color: ${(null===(a=Q.w.colors)||void 0===a?void 0:a.gray800)||""};
1668    white-space: nowrap;
1669  }
1670`;(0,F.A)(eo.default)`
1671  display: flex;
1672  border: 1px solid ${(null===(r=Q.w.colors)||void 0===r?void 0:r.gray200)||""};
1673  border-radius: ${null===Q.w||void 0===Q.w?void 0:Q.w.borderRadius};
1674  .PhoneInputCountry {
1675    position: relative;
1676    padding: 12px 8px 12px 16px;
1677    border-right: 1px solid ${(null===(s=Q.w.colors)||void 0===s?void 0:s.gray200)||""};
1678    background-color: ${(null===(d=Q.w.colors)||void 0===d?void 0:d.gray100)||""};
1679    border-radius: 6px 0 0 6px;
1680    color: ${(null===(c=Q.w.colors)||void 0===c?void 0:c.gray800)||""};
1681    .PhoneInputCountrySelect {
1682      position: absolute;
1683      top: 0;
1684      right: 0;
1685      bottom: 0;
1686      left: 0;
1687      opacity: 0;
1688      pointer-events: none;
1689    }
1690    .PhoneInputCountryIconImg {
1691      width: 24px;
1692      height: 16px;
1693      border-radius: 2px;
1694      object-fit: cover;
1695      object-position: center;
1696    }
1697  }
1698  .PhoneInputInput {
1699    padding: 0 16px;
1700  }
1701
1702  &.has--error {
1703    border-color: ${Q.w.colors.red700||""};
1704  }
1705  &.PhoneInput--focus {
1706    border-color: ${Q.w.colors.primaryBase||""};
1707    box-shadow: 0px 0px 2px 2px #91caff;
1708  }
1709`;let tf=(0,F.A)(eo.default)`
1710  &.PhoneInput {
1711    .PhoneInputCountry {
1712      padding: 10px;
1713      border: solid 1px ${Q.w.colors.gray200};
1714      border-right: none;
1715      margin: 0;
1716      background-color: #f2f2f2;
1717      border-bottom-left-radius: 6px;
1718      border-top-left-radius: 6px;
1719      padding: 0 15px;
1720
1721      .PhoneInputCountrySelectArrow {
1722        transform: rotate(0deg);
1723        display: flex;
1724        align-items: center;
1725        border: none;
1726        margin-left: 10px;
1727        width: auto;
1728      }
1729    }
1730    .PhoneInputInput {
1731      padding-left: 10px;
1732      border: solid 1px ${Q.w.colors.gray200};
1733      margin: 0;
1734      width: 100%;
1735      padding: 12px 16px;
1736      background: #fff;
1737      border-bottom-left-radius: 0 !important;
1738      border-bottom-right-radius: 6px !important;
1739      border-top-left-radius: 0 !important;
1740      border-top-right-radius: 6px !important;
1741    }
1742    .PhoneInputCountrySelect {
1743      + .PhoneInputCountryIcon--border {
1744        border: none;
1745        box-shadow: none;
1746      }
1747    }
1748    &.PhoneInput--readOnly {
1749      .PhoneInputCountrySelect {
1750        pointer-events: none;
1751      }
1752    }
1753  }
1754  .PhoneInputCountryIcon {
1755    width: auto;
1756    height: auto;
1757    box-shadow: none;
1758    background-color: transparent;
1759
1760    .PhoneInputCountryIconImg {
1761      width: 24px;
1762      height: 24px;
1763    }
1764  }
1765`,FlagComponent=e=>{var t;let n="+("+(0,eo.getCountryCallingCode)(e.country)+")",i=null===(t=e.flagUrl)||void 0===t?void 0:t.replace("{XX}",e.country);return _().createElement(tb,null,_().createElement("img",{className:"PhoneInputCountryIconImg",alt:e.countryName,src:i,loading:"lazy"}),_().createElement("div",null,n))},PhoneInputWithCode=e=>_().createElement(tf,Object.assign({},e,{flagComponent:FlagComponent})),DOB=({action:e,trigger:t,control:n,locale:i,labelTuples:l,isSubmitting:o})=>{let{id:a,key:r,label:s,validated_message:d,validated_conditions:c}=null!=e?e:{},u=i||(null===k.G||void 0===k.G?void 0:k.G.locale),{formatMessage:m}=(0,h.useContext)(k.T);return _().createElement("div",{className:"input-row",key:a},_().createElement("label",{htmlFor:r},s),_().createElement(el.xI,{name:e.key,control:n,rules:{required:{value:!0,message:m({id:"validation.error.requiredField",defaultMessage:"This field is required"})},validate:{ageRange:e=>validateDateField(e,o,m,e=>validateAge(e,d||m({id:"validation.error.requiredAgeGroup",defaultMessage:"Sorry, your child is not in the required Age Group."}),(()=>{try{return JSON.parse(c)}catch(e){return[]}})()))}},render:({field:e,fieldState:n})=>{let{value:i,name:o,onChange:a}=e,r=(0,x.a)(e,["value","name","onChange"]),{error:s}=n,d=!!s;return _().createElement("div",null,_().createElement(tm,null,_().createElement(ec.I,Object.assign({},r,{defaultValue:i,onChange:e=>{a(e),t(o)},labelTuples:l,locale:u,error:d,className:"subot_input subot_input_date"}))),d&&_().createElement("p",{className:"error-message"},null==s?void 0:s.message))}}))},UserInfoForm=({className:e,style:t,actions:n,countryCode:i,callBack:l,formSubmitMeta:o,isFormRevamp:a,botId:r,nodeId:s,trackingSubmitBtn:d})=>{let c=(0,h.useRef)(),u=null===k.G||void 0===k.G?void 0:k.G.userInfo,m=null===k.G||void 0===k.G?void 0:k.G.locale,p=useCurrentUrl(),{formatMessage:v,action:{pushNotifications:g}}=(0,h.useContext)(k.T),b=useAddressMultipleLevelData(i),f=(0,h.useMemo)(()=>b.level1.map(e=>({label:e,value:e})),[b.level1]),w=(0,h.useMemo)(()=>b.level2.map(e=>({label:e,value:e})),[b.level2]),I=(0,h.useMemo)(()=>b.level3.map(e=>({label:e,value:e})),[b.level3]),[S,C]=(0,h.useState)(!1),[O,N]=(0,h.useState)(!1),[T,A]=(0,h.useState)(!1),[P,B]=(0,h.useState)(!1),[L,U]=(0,h.useState)(!1),R=getActionConfirm(n),D=getActionEmail(n),F=getActionName(n),G=getActionPhone(n),z=getActionOtpWhatsApp(n),V=getActionOtp(n)||z,q=!!R,W=!!(V||z),Y=(0,h.useMemo)(()=>{let e={},t=(0,M.e)();return(null==D?void 0:D.key)&&t.email&&!(0,M.k)(t.email)&&(e[D.key]=t.email),(null==F?void 0:F.key)&&(null==u?void 0:u.name)&&(e[F.key]=u.name),(null==G?void 0:G.key)&&(null==u?void 0:u.phone)&&(null==u?void 0:u.area_code)&&(e[G.key]=(null==u?void 0:u.area_code)+u.phone),(null==V?void 0:V.key)&&(null==u?void 0:u.phone)&&(e[V.key]=u.area_code+u.phone,e.otpPhoneNumber=u.area_code+u.phone),null==o||o.forEach(t=>{if(W&&isControlOtp(t.control)){e.otpPhoneNumber=t.value;return}e[t.key]=t.value,[E.E[E.f.USER_SUBMIT_DATE],E.E[E.f.USER_SUBMIT_DOB]].includes(t.control)&&(e[t.key]=$()(t.value,y.A).toDate())}),e.otpPhoneNumber&&U(!0),e},[]),X=(0,h.useMemo)(()=>r&&s?{"data-event-category":"Service Connection","data-event-action":"Risk Screening Send OTP","data-event-label":p,"data-bot-id":r,"data-question-id":s}:{},[r,s]),K=(0,h.useMemo)(()=>r&&s?{"data-event-category":"Service Connection","data-event-action":"Risk Screening Verify OTP","data-event-label":p,"data-bot-id":r,"data-question-id":s}:{},[r,s]),J=(0,h.useMemo)(()=>d||(r&&s?{"data-event-category":"Service Connection","data-event-action":"Risk Screening User Info Submit","data-event-label":p,"data-bot-id":r,"data-question-id":s}:{}),[r,s,JSON.stringify(d)]),Z=(0,h.useMemo)(()=>n.findIndex(e=>E.F.includes(e.type)),[n]),Q=(0,h.useMemo)(()=>n.find(e=>E.f.USER_SUBMIT_ADDRESS===e.type),[n]),ee=(0,h.useMemo)(()=>n.find(e=>E.f.USER_SUBMIT_ADDRESS_PROVINCE===e.type),[n]),en=(0,h.useMemo)(()=>n.find(e=>E.f.USER_SUBMIT_ADDRESS_DISTRICT===e.type),[n]),ea=(0,h.useMemo)(()=>n.find(e=>E.f.USER_SUBMIT_ADDRESS_COMMUNE===e.type),[n]),{labelInputDate:er}=(0,h.useMemo)(()=>{let{dateFormat:e}=(null===y.I||void 0===y.I?void 0:y.I[m])||y.I["vi-VN"];return{dateFormat:e,labelInputDate:e.split("/").map(e=>v(null===E.C||void 0===E.C?void 0:E.C[e]))}},[m,v]),es=E.E,{register:ep,handleSubmit:ev,watch:eg,formState:{errors:eb,isSubmitting:ef},control:eh,setValue:e_,setError:eE,clearErrors:ex,getValues:ew,trigger:eI}=(0,el.mN)({defaultValues:Y}),setSubmitData=e=>{let t=[];for(let i of n)if(i.key&&i.type!==E.f.USER_SUBMIT_CONFIRM&&i.type!==E.f.USER_SUBMIT_TERMS){if(i.type===E.f.USER_SUBMIT_GOOGLE_API_ADDRESS){let n=e[i.key];
1765tc.forEach(e=>{n[e]&&t.push({key:i.key,control:e,value:n[e]})})}else if(i.type===E.f.USER_SUBMIT_ADDRESS_PROVINCE||i.type===E.f.USER_SUBMIT_ADDRESS_DISTRICT||i.type===E.f.USER_SUBMIT_ADDRESS_COMMUNE)t.push({key:i.key,control:es[i.type]||"",value:e[i.key].label||""});else if(i.type===E.f.USER_SUBMIT_DOB||i.type===E.f.USER_SUBMIT_DATE){let n=e[i.key]||"",l=$()(n);l.isValid()&&t.push({key:i.key,control:es[i.type]||"",value:l.format(y.A)})}else isActionTypeOtp(i.type)?t.push({key:i.key,control:E.E[E.f.USER_SUBMIT_OTP],value:e.otpPhoneNumber}):i.type&&"bmi"===es[i.type]?t.push({key:i.key,control:"bmi-weight",value:e[`${i.key}-weight`]||""},{key:i.key,control:"bmi-height",value:e[`${i.key}-height`]||""}):t.push({key:i.key,control:es[i.type]||"",value:e[i.key]||""})}let i=n.filter(e=>e.type===E.f.USER_SUBMIT_SEND),o={action_id:i[0].id,action_value:i[0].key,form_submit_meta:t.filter(({control:e})=>{switch(e){case"confirm":case"submit":case"terms":case"":return!1;default:return!0}})};l(o)},eS=eg("confirm",!0),eC=eg("otpPhoneNumber",""),handleSelectedProvince=e=>(0,x._)(void 0,void 0,void 0,function*(){e&&e.value&&""!==e.value&&(b.setSelectedLevel1(e.value),e_("district",""),e_("commune",""))}),handleSelectedDistrict=e=>(0,x._)(void 0,void 0,void 0,function*(){e&&e.value&&""!==e.value&&(b.setSelectedLevel2(e.value),e_("commune",""))}),handleSendOTP=e=>(0,x._)(void 0,void 0,void 0,function*(){var t,i;e.preventDefault();let l=ew(),o=(0,eo.parsePhoneNumber)(l.otpPhoneNumber);if((null==o?void 0:o.nationalNumber)&&(null==o?void 0:o.countryCallingCode)){C(!0);try{let e=yield(0,k.c)(getSubotApiPath(z?ey.POST_SEND_OTP_WHATSAPP:ey.POST_SEND_OTP),"POST",{data:z?{phone_number:`+${o.countryCallingCode}${o.nationalNumber}`}:{phone_number:o.nationalNumber,area_code:`+${o.countryCallingCode}`}});C(!1);let{_status:l,_errorCode:a}=e;if(1===l){P&&(A(!1),c.current.reset()),B(!0),setTimeout(()=>{let e=document.querySelector(".input-otp-code");e&&(e.focus(),e.scrollIntoView({block:"center"}))},100);return}if(0===l){let e=getTranslateVerifiedOtpMessages();g({title:"",message:v(null==tg?void 0:tg[a])||e.get(m)||e.get(ed.L.PhilippinesEnglish),type:"success"}),ex((null===(t=getActionOtp(n))||void 0===t?void 0:t.key)||(null===(i=getActionOtpWhatsApp(n))||void 0===i?void 0:i.key)),ex("otpPhoneNumber"),U(!0);return}if((null==e?void 0:e._status)===-1){let{_messages:t}=e;c.current&&c.current.cancel(),g({title:"",message:t[0],type:"warning"});return}if(!e||(null==e?void 0:e._status)===0){c.current&&c.current.cancel(),showMessageSomethingWrong();return}}catch(e){C(!1),c.current&&c.current.cancel(),showMessageSomethingWrong()}}}),handleVerifyOTP=(e,t)=>(0,x._)(void 0,void 0,void 0,function*(){e.preventDefault(),N(!0);let n=ew(),i=(0,eo.parsePhoneNumber)(n.otpPhoneNumber);if(t.key&&i){try{let e=yield(0,k.c)(getSubotApiPath(z?ey.POST_VERIFY_OTP_WHATSAPP:ey.POST_VERIFY_OTP),"POST",{data:z?{code:n.otpCode,phone_number:`+${i.countryCallingCode}${i.nationalNumber}`}:{code:n.otpCode,phone_number:i.nationalNumber,area_code:`+${i.countryCallingCode}`}}),{_status:t,_messages:l}=e;if(1===t){g({title:"",message:l[0],type:"success"}),ex("otpCode"),U(!0),N(!1);return}throw Error(JSON.stringify(e))}catch(i){let e=JSON.parse(i.message),{_errorCode:t}=e||{},n=v(null==tg?void 0:tg[t])||v({id:"validation.error.validOTP"});g({title:"",message:n,type:"danger"}),eE("otpCode",{type:"custom",message:n})}N(!1)}}),showMessageSomethingWrong=()=>{g({title:"",message:v({id:"notification.comment.somethingWrong"}),type:"danger"})},renderFullAddressInput=()=>_().createElement(tv,null,Q&&_().createElement("div",{className:"input-row",key:Q.id},_().createElement("label",{htmlFor:Q.key},Q.label),_().createElement("input",Object.assign({id:Q.id,placeholder:Q.label},ep((null==Q?void 0:Q.key)||"",{required:!0}))),eb[(null==Q?void 0:Q.key)||""]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"}))),_().createElement("div",{className:"wrapper-address-lever"},ee&&_().createElement("div",{className:"input-row",key:ee.id},_().createElement("label",{htmlFor:ee.key,className:Q?"hide-label":""},ee.label),_().createElement("div",{style:{background:"#fff"},className:"address-input"},_().createElement(el.xI,{name:ee.key||"",control:eh,rules:{required:!0},render:e=>{var t;return _().createElement(em.D,{id:ee.id,options:f,onChange:t=>{e.field.onChange(t),handleSelectedProvince(t)},value:e.field.value,placeholder:(null==ee?void 0:ee.label)||"",className:`address-dropdown ${(null===(t=e.field.value)||void 0===t?void 0:t.value)?"":"show-placeholder"}`})}})),eb[ee.key||""]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"}))),en&&_().createElement("div",{className:"input-row",key:en.id},_().createElement("label",{htmlFor:en.key,className:Q?"hide-label":""},en.label),_().createElement("div",{style:{background:"#fff"},className:"address-input"}
1765,_().createElement(el.xI,{name:en.key||"",control:eh,rules:{required:!0},render:e=>{var t;return _().createElement(em.D,{id:en.id,options:w,onChange:t=>{e.field.onChange(t),handleSelectedDistrict(t)},value:e.field.value,placeholder:(null==en?void 0:en.label)||"",className:`address-dropdown ${(null===(t=e.field.value)||void 0===t?void 0:t.value)?"":"show-placeholder"}`})}})),eb[(null==en?void 0:en.key)||""]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"}))),ea&&_().createElement("div",{className:"input-row",key:ea.id},_().createElement("label",{htmlFor:ea.key,className:Q?"hide-label":""},ea.label),_().createElement("div",{style:{background:"#fff"},className:"address-input"},_().createElement(el.xI,{name:ea.key||"",control:eh,rules:{required:!0},render:e=>{var t;return _().createElement(em.D,{id:ea.id,options:I,onChange:t=>{e.field.onChange(t)},value:e.field.value,placeholder:(null==ea?void 0:ea.label)||"",className:`address-dropdown ${(null===(t=e.field.value)||void 0===t?void 0:t.value)?"":"show-placeholder"}`})}})),eb[ea.key||""]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"}))))),renderFormInput=(e,t)=>{var n;if(!e.key)return null;if(Z===t)return renderFullAddressInput();switch(e.type){case E.f.USER_SUBMIT_DROPDOWN:let l=e.url?e.url.split("\n"):[];return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement(el.xI,{key:e.key,control:eh,name:e.key,rules:{required:!0},render:({field:t})=>_().createElement(et.S,Object.assign({searchable:!0,data:l,placeholder:e.label},t,{withinPortal:!0,zIndex:1e3}))}),eb[e.key]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"})));case E.f.USER_SUBMIT_EMAIL:return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement("input",Object.assign({id:e.id,placeholder:e.label},ep(e.key,{required:!0,pattern:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}))),eb[e.key]&&_().createElement("p",{className:"error-message"},v((null===(n=eb[e.key])||void 0===n?void 0:n.type)!=="pattern"?{id:"validation.error.requiredField",defaultMessage:"This field is required"}:{id:"validation.error.validEmail",defaultMessage:"Please enter a valid email address."})));case E.f.USER_SUBMIT_NAME:return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement("input",Object.assign({id:e.id,placeholder:e.label},ep(e.key,{required:!0}))),eb[e.key]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"})));case E.f.USER_SUBMIT_PHONE:return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement(el.xI,{name:e.key,control:eh,rules:{required:!0,validate:e=>(0,eo.isPossiblePhoneNumber)(e)},render:({field:{onChange:t,value:n}})=>_().createElement(eo.default,{value:n,onChange:t,defaultCountry:i,id:e.id})}),eb[e.key]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.validNumber",defaultMessage:"Please enter a valid number."})));case E.f.USER_SUBMIT_NUMBER:return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement("input",Object.assign({type:"number",id:e.id},ep(e.key,{required:!0}))),eb[e.key]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"})));case E.f.USER_SUBMIT_DATE:return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement(el.xI,{name:e.key,control:eh,rules:{required:{value:!0,message:v({id:"validation.error.requiredField",defaultMessage:"This field is required"})},validate:{ageRange:e=>validateDateField(e,ef,v)}},render:({field:e,fieldState:t})=>{let{value:n,name:i,onChange:l}=e,o=(0,x.a)(e,["value","name","onChange"]),{error:a}=t,r=!!a;return _().createElement("div",null,_().createElement(tm,null,_().createElement(ec.I,Object.assign({},o,{defaultValue:n,onChange:e=>{l(e),eI(i)},labelTuples:er,locale:m,error:r,className:"subot_input subot_input_date"}))),r&&_().createElement("p",{className:"error-message"},null==a?void 0:a.message))}}));case E.f.USER_SUBMIT_BMI:return _().createElement("div",{key:e.id},_().createElement("div",{className:"input-row",key:`${e.id}-height`},_().createElement("label",{htmlFor:`${e.key}-height`},v({id:"home.bmi.input.height",defaultMessage:"Height"})),_().createElement("input",Object.assign({type:"number",id:`${e.id}-height`},ep(`${e.key}-height`,{required:!0}))),eb[`${e.key}
1765-height`]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"}))),_().createElement("div",{className:"input-row",key:`${e.id}-weight`},_().createElement("label",{htmlFor:`${e.key}-weight`},v({id:"home.bmi.input.weight",defaultMessage:"Weight"})),_().createElement("input",Object.assign({type:"number",id:`${e.id}-weight`},ep(`${e.key}-weight`,{required:!0}))),eb[`${e.key}-weight`]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"}))));case E.f.USER_SUBMIT_GENDER:return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",null,e.label),_().createElement("div",{className:"radio-group"},_().createElement("label",{className:"radio-label"},_().createElement("input",Object.assign({},ep(e.key,{required:!0}),{value:"female",id:`${e.id}-female`,type:"radio"})),_().createElement("span",null,v({id:"gender.female",defaultMessage:"Female"}))),_().createElement("label",{className:"radio-label"},_().createElement("input",Object.assign({},ep(e.key,{required:!0}),{value:"male",id:`${e.id}-male`,type:"radio"})),_().createElement("span",null,v({id:"gender.male",defaultMessage:"Male"})))),eb[e.key]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"})));case E.f.USER_SUBMIT_TEXT:return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement("input",Object.assign({id:e.id,placeholder:e.label},ep(e.key,{required:!0}))),eb[e.key]&&_().createElement("p",{className:"error-message"},v({id:"validation.error.requiredField",defaultMessage:"This field is required"})));case E.f.USER_SUBMIT_OTP:case E.f.USER_SUBMIT_WHATSAPP:return _().createElement("div",null,_().createElement("div",{className:"input-row input-row--otp"},_().createElement("label",{htmlFor:"otpPhoneNumber"},e.label),_().createElement(el.xI,{name:"otpPhoneNumber",control:eh,rules:{required:!0,validate:{valid:e=>(0,eo.isPossiblePhoneNumber)(e),notClickSentOTP:e=>(0,eo.isPossiblePhoneNumber)(e)&&L}},render:({field:{onChange:t,value:n}})=>{let l=!T&&P||S||L;return _().createElement(to,null,_().createElement(PhoneInputWithCode,{value:n,onChange:t,defaultCountry:i,className:`input-row ${e.id}`,name:"otpPhoneNumber",disabled:l,placeholder:e.label,flagComponent:FlagComponent}),l&&_().createElement(IconEdit,{viewBox:"0 0 24 24",className:"icon-edit-phone",onClick:()=>{var e;e_("otpPhoneNumber",""),e_("otpCode",""),B(!1),U(!1),null===(e=c.current)||void 0===e||e.cancel()}}))}}),eb.otpPhoneNumber&&("notClickSentOTP"===eb.otpPhoneNumber.type?_().createElement("p",{className:"error-message"},getTransPleaseVerifiedOtp().get(m)):_().createElement("p",{className:"error-message"},v({id:"validation.error.validNumber",defaultMessage:"Please enter a valid number."}))),L?"":_().createElement(H.B,Object.assign({size:"sm",loading:S,disabled:!T&&P||S||!(0,eo.isPossiblePhoneNumber)(eC||""),onClick:handleSendOTP,variant:"ghost",className:"btn-send-otp"},X),P?_().createElement(ti,{ref:c,isFinished:T,onFinish:A}):_().createElement("span",null,v({id:"subot.sendOTP.button",defaultMessage:"Send OTP"})))),P&&_().createElement("div",{className:j()("input-row input-row--verify",{"verified-otp":L,"error-verify-otp":eb.otpCode})},_().createElement("label",{htmlFor:"otpCode"},"M\xe3 OTP"),_().createElement(el.xI,{name:"otpCode",control:eh,rules:{required:!0,pattern:/^[0-9]{0,6}$/},render:({field:{onChange:e,value:t}})=>_().createElement("input",{onChange:e,value:t,type:"tel",disabled:L,className:"input-otp-code"})}),(null==eb?void 0:eb.otpCode)&&_().createElement("p",{className:"error-message"},_().createElement(InfoError,null),eb.otpCode.message),L?_().createElement("div",{className:"verify-success"},_().createElement(CheckCircleGreen,null),_().createElement("span",{className:"verify-success-label"},v({id:"subot.verifyOTP.success.message",defaultMessage:"Verified successful"}))):_().createElement(eu.B,Object.assign({className:"submit-btn",size:a?"md":"lg",isLoading:O,isDisabled:!P,onClick:t=>handleVerifyOTP(t,e)},K),v({id:"subot.verifyOTP.button",defaultMessage:"Verify OTP"}))));case E.f.USER_SUBMIT_GOOGLE_API_ADDRESS:return _().createElement(tu,{action:e,control:eh,formError:eb[e.key],key:e.id,initValue:null==Y?void 0:Y[e.key],onChange:e_});case E.f.USER_SUBMIT_DOB:return _().createElement(DOB,{key:e.key,action:e,trigger:eI,control:eh,locale:m,labelTuples:er,isSubmitting:ef});default:return""}},renderFormSubmitAndTerms=e=>{switch(e.type){case E.f.USER_SUBMIT_CONFIRM:return _().createElement("div",{className:"submit-btn-row",key:e.id},_().createElement("label",{className:"subot-checkbox"},_().createElement("input",Object.assign({},ep("confirm"),{type:"checkbox",defaultChecked:!0,className:"subot-checkbox__input"})),_().createElement("span",{className:"subot-checkbox__label"},_().createElement(Markdown,null,e.label))));case E.f.USER_SUBMIT_SEND:return _().createElement("div",{className:"submit-btn-row",key:e.id},_().createElement("button",Object.assign({id:e.id,className:"submit-btn",type:"submit",disabled:!!q&&!eS},J,{"data-response-id":e.id}),e.label));case E.f.USER_SUBMIT_TERMS:return _().createElement("div",{className:"form-terms",key:e.id},_().createElement(Markdown,null,e.label));default:return""}};return _().createElement(tp,{className:e,style:t},_().createElement("form",{onSubmit:ev(e=>{(!W||L)&&(null==e||delete e.confirm,ei()(eb)&&setSubmitData(e))}),onFocus:e=>{let t=e.target;t&&t.scrollIntoView({block:"center",inline:"nearest",behavior:"auto"})},className:"user-info-form"},n.map((e,t)=>renderFormInput(e,t)),n.map(e=>renderFormSubmitAndTerms(e))))},th=F.A.div`
1766  display: flex;
1767  flex-direction: column;
1768  gap: 24px;
1769`,Container$d=({node:e,indexNumber:t})=>{var n;let i=null===k.G||void 0===k.G?void 0:k.G.locale,{params:l,listNodes:o,activeId:a,onSubmit:r,setIsShowFooter:s}=(0,h.useContext)(eM);return((0,h.useMemo)(()=>{s(!0)},[]),e)?_().createElement(th,{id:"si-node-form"},_().createElement(Container$h,{intents:e.intents||[],indexNumber:t}),_().createElement(UserInfoForm,{isFormRevamp:!0,className:"si-form-revamp",actions:(null==e?void 0:e.actions)||[],formSubmitMeta:(null===(n=null==e?void 0:e._message)||void 0===n?void 0:n.form_submit_meta)||null,callBack:t=>(0,x._)(void 0,void 0,void 0,function*(){checkSyncDataOnFrisoCampaign(o[0],t.form_submit_meta);let n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l),e._message),t),getCurrentTotalDynamicScore(o,a,t.action_id,t.form_submit_meta)),{node_id:e.id}),i=yield subotInlineMessage$1(n);if((null==i?void 0:i._status)===1){let e=null==i?void 0:i._data,{node:l}=e,o=(0,x.a)(e,["node"]),a=Object.assign(Object.assign({},l),{_message:Object.assign(Object.assign({},o),{node_id:l.id})});r&&r(a,Object.assign(Object.assign({},n),t))}}),countryCode:(null==i?void 0:i.split("-")[1])||"PH",botId:l.bot_id,nodeId:null==e?void 0:e.id})):null};Container$d.displayName="subotInlineNodeForm";let t_=F.A.div``,tE=F.A.div`
1770  display: flex;
1771  gap: 12px;
1772  flex-direction: column;
1773
1774  &.si-two-columns {
1775    flex-wrap: wrap;
1776    gap: 16px;
1777    flex-direction: row;
1778    justify-content: center;
1779    margin-top: 24px;
1780
1781    .si-action-img-choice {
1782      width: calc(50% - 8px);
1783    }
1784
1785    ${G.M.mbUp} {
1786      gap: 32px;
1787      padding: 0 16px;
1788
1789      .si-action-img-choice {
1790        width: calc(50% - 16px);
1791      }
1792    }
1793  }
1794`,Checkbox=e=>_().createElement("svg",Object.assign({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M11 21c5.523 0 10-4.477 10-10S16.523 1 11 1 1 5.477 1 11s4.477 10 10 10Z",fill:"#2D87F3",stroke:"#2D87F3"}),_().createElement("path",{d:"M15.571 8 9.68 14 7 11.273",stroke:"#fff"})),tx=(0,es.s)(F.A.div`
1795    position: relative;
1796    z-index: 1;
1797    display: flex;
1798    width: 20px;
1799    height: 20px;
1800    align-items: center;
1801    justify-content: center;
1802    padding: 1px;
1803    transition: 0.2s linear all;
1804    .icon-checkbox {
1805      width: 20px;
1806      height: 20px;
1807      opacity: 0;
1808      ${({active:e})=>e&&"opacity: 1"};
1809      transition: 0.25s all linear;
1810      position: absolute;
1811      top: 50%;
1812      left: 50%;
1813      transform: translate(-50%, -50%);
1814    }
1815    &:before {
1816      position: absolute;
1817      top: 50%;
1818      left: 50%;
1819      width: 20px;
1820      height: 20px;
1821      border: 2px solid
1822        ${({active:e})=>{var t;return e?"var(--subot-inline-primary-color)":`var(--subot-inline-text-color, ${(null===(t=null===Q.w||void 0===Q.w?void 0:Q.w.colors)||void 0===t?void 0:t.gray600)||"#8C8C8C"})`}};
1823      border-radius: 50%;
1824      content: '';
1825      transform: translate(-50%, -50%);
1826      transition: 0.25s all linear;
1827    }
1828    &:after {
1829      position: absolute;
1830      z-index: -1;
1831      top: 50%;
1832      left: 50%;
1833      width: 10px;
1834      height: 10px;
1835      background-color: var(--subot-inline-primary-color);
1836      border-radius: 50%;
1837      content: '';
1838      opacity: 0;
1839      ${({active:e})=>e&&"opacity: 1"};
1840      transform: translate(-50%, -50%);
1841      transition: 0.25s all linear;
1842    }
1843  `,"hhgcomp-subot-radioIcon"),ty=F.A.div`
1844  text-align: center;
1845  padding: 12px;
1846  border-radius: 8px;
1847  border: 1px solid #e4e8ec;
1848  position: relative;
1849  transition: all 0.3s ease;
1850  cursor: pointer;
1851  background-color: #fff;
1852
1853  ${({active:e})=>e?"border-bottom: 3px solid var(--subot-inline-primary-color);":""};
1854
1855  &:hover {
1856    border-color: var(--subot-inline-primary-color);
1857  }
1858
1859  ${tx.classSelector} {
1860    position: absolute;
1861    top: 16px;
1862    right: 16px;
1863  }
1864
1865  .si-action-image-wrap {
1866    position: relative;
1867    width: 100%;
1868    padding-top: 67%;
1869    img {
1870      position: absolute;
1871      top: 0;
1872      left: 0;
1873      width: 100%;
1874      height: 100%;
1875      object-fit: cover;
1876      border-radius: 8px;
1877    }
1878    &::before {
1879      content: '';
1880      position: absolute;
1881      width: 28px;
1882      height: 28px;
1883      background-color: #fff;
1884      top: 0;
1885      right: 0;
1886      pointer-events: none;
1887      z-index: 1;
1888      border-bottom-left-radius: 8px;
1889    }
1890  }
1891
1892  .si-label {
1893    padding-top: 12px;
1894    position: relative;
1895  }
1896`,Container$c=({action:e,active:t,onChange:n,htmlType:i})=>{let l=useCurrentUrl(),{params:o}=(0,h.useContext)(eM);return _().createElement(ty,{className:"si-action-img-choice",onClick:()=>n&&n(e),active:!!t,"data-event-category":"Service Connection","data-event-action":"Risk Screening Answer Click","data-event-label":l,"data-bot-id":o.bot_id},_().createElement("div",{className:"si-action-image-wrap"},_().createElement("img",{loading:"lazy",src:null==e?void 0:e.url,alt:null==e?void 0:e.label})),(null==e?void 0:e.label)&&_().createElement("div",{className:"si-label"},_().createElement(Markdown,null,null==e?void 0:e.label)),_().createElement(tx,{active:!!t},"checkbox"===i&&_().createElement(Checkbox,{className:"icon-checkbox",viewBox:"0 0 22 22"})))};Container$c.displayName="SubotInlineActionImageChoice";let tw=F.A.div`
1897  text-align: center;
1898  margin-top: 24px;
1899`,Container$b=({action:e,onChange:t})=>{let n=useCurrentUrl(),{params:i,activeId:l}=(0,h.useContext)(eM);return _().createElement(tw,null,_().createElement(H.B,{onClick:()=>t&&t(e),size:"lg","data-event-category":"Service Connection","data-event-action":"Risk Screening Sign Up for Result","data-event-label":n,"data-bot-id":i.bot_id,"data-event-question-id":l,styles:{root:{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"},color:"var(--subot-inline-text-button-color, #fff) !important"}}},_().createElement(Markdown,null,null==e?void 0:e.label)))};Container$b.displayName="SubotInlineActionSSO";let tI=F.A.div`
1900  width: 100%;
1901  padding: 12px 16px;
1902  border-radius: 8px;
1903  /* border: 1px solid #e4e8ec; */
1904  border: 1px solid var(--subot-inline-text-color, #e4e8ec);
1905  display: flex;
1906  align-items: center;
1907  cursor: pointer;
1908  gap: 12px;
1909  transition: all 0.3s ease;
1910
1911  ${({active:e})=>e?`
1912        border-bottom: 3px solid var(--subot-inline-primary-color);
1913        background-color: var(--subot-inline-primary-color-100);
1914      `:""};
1915
1916  &:hover {
1917    background-color: var(--subot-inline-primary-color-100);
1918    border-bottom: 3px solid var(--subot-inline-primary-color);
1919  }
1920
1921  .label {
1922    flex: 1;
1923    font-size: 16px;
1924    font-style: normal;
1925    font-weight: 400;
1926    line-height: 24px;
1927    letter-spacing: -0.16px;
1928    color: var(--subot-inline-text-color, #262626);
1929  }
1930`,tS={input:{"&:focus":{borderColor:"var(--subot-inline-primary-color) !important",boxShadow:"0px 0px 0px 2px var(--subot-inline-primary-color-300) !important"}}},Container$a=({action:e,onChange:t,active:n,htmlType:i,formSubmitMeta:l})=>{let o=useCurrentUrl(),a=(0,h.useRef)(null),[r,s]=(0,h.useState)(""),{params:d}=(0,h.useContext)(eM),c=(null==e?void 0:e.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT,u=(null==e?void 0:e.type)===E.f.USER_CHOICE_TEXT_BY_INPUT||c;return(0,h.useEffect)(()=>{var e,t;n&&(s((null===(e=null==l?void 0:l.find(e=>e.key===eN))||void 0===e?void 0:e.value)||""),null===(t=a.current)||void 0===t||t.focus())},[n,l]),_().createElement(_().Fragment,null,_().createElement(tI,{id:"si-action-text-choice",active:!!n,onClick:()=>null==t?void 0:t(e),"data-event-category":"Service Connection","data-event-action":"Risk Screening Answer Click","data-event-label":o,"data-bot-id":d.bot_id},_().createElement(tx,{active:!!n},"checkbox"===i&&_().createElement(Checkbox,{className:"icon-checkbox",viewBox:"0 0 22 22"})),_().createElement("div",{className:"label"},null==e?void 0:e.label)),u&&n&&_().createElement(B.Box,{px:"2px",style:{textAlign:"right"}},_().createElement(B.Textarea,{ref:a,placeholder:null==e?void 0:e.label,styles:tS,value:r,onChange:n=>
1930{s(n.target.value),null==t||t(e,[{key:eN,control:"text",value:n.target.value,action_id:null==e?void 0:e.id}])},maxLength:360})))};Container$a.displayName="SubotInlineActionTextChoice";let tC=F.A.div``,Container$9=({action:e,onChange:t,active:n,htmlType:i})=>_().createElement(tC,null,_().createElement(Container$a,{active:!!n,action:e,onChange:e=>{e&&t&&t({key:null==e?void 0:e.key,control:E.E[null==e?void 0:e.type],value:"",action_id:null==e?void 0:e.id})},htmlType:i}));Container$9.displayName="SubotInlinePollChoice";let Container$8=({action:e,onChange:t,active:n,htmlType:i})=>_().createElement(Container$c,{active:!!n,action:e,onChange:e=>{e&&t&&t({key:null==e?void 0:e.key,control:E.E[null==e?void 0:e.type],value:"",action_id:null==e?void 0:e.id})},htmlType:i});Container$8.displayName="SubotInlinePollChoiceImage";let tO={[E.f.USER_CHOICE_TEXT]:Container$a,[E.f.USER_CHOICE_TEXT_BY_INPUT]:Container$a,[E.f.USER_CHOICE_IMAGE]:Container$c,[E.f.ACTION_SSO_REDIRECT]:Container$b,[E.f.POLL_CHOICE]:Container$9,[E.f.POLL_CHOICE_TEXT_BY_INPUT]:Container$a,[E.f.POLL_BUTTON]:()=>null,[E.f.POLL_CHOICE_IMAGE]:Container$8},tk=new Proxy(tO,{get:(e,t)=>tO[t]||(()=>ee.K?null:_().createElement("p",null,"SubotInlineRevampActionBase ",t))}),tN=[E.f.USER_CHOICE_NEXT],Container$7=({actions:e,value:t,onChange:n,htmlType:i,node_type:l,formSubmitMeta:o})=>{let a=(0,h.useMemo)(()=>!!(null==e?void 0:e.find(e=>e.type===E.f.POLL_CHOICE_IMAGE)),[e]),r=(0,h.useMemo)(()=>{switch(l){case E.d.IMAGE:case E.d.REACTION:return"si-two-columns";default:return a?"si-two-columns":""}},[l]);return(null==e?void 0:e.length)?_().createElement(tE,{id:"si-action",className:r},null==e?void 0:e.map(e=>{let l=e.type;if(tN.includes(l))return null;let a=tk[e.type];return a&&_().createElement(a,{key:e.id,action:e,onChange:n,active:null==t?void 0:t.includes(e.id),htmlType:i,formSubmitMeta:o})})):null};Container$7.displayName="SubotInlineAction";let Container$6=({node:e,indexNumber:t})=>{let{params:n,listNodes:i,activeId:l,onSubmit:o,setIsShowFooter:a,setLoading:r}=(0,h.useContext)(eM),{value:s,setValue:d}=(0,h.useContext)(ej);return((0,h.useMemo)(()=>{a(!0)},[]),(0,h.useEffect)(()=>{d((null==e?void 0:e._message)||{})},[]),e)?_().createElement(t_,{id:"si-node-final"},_().createElement(Container$h,{intents:e.intents||[],indexNumber:t}),_().createElement(Container$7,{node_type:null==e?void 0:e.type,value:(null==s?void 0:s.action_id)?[null==s?void 0:s.action_id]:[],actions:null==e?void 0:e.actions,onChange:t=>(0,x._)(void 0,void 0,void 0,function*(){if(!t)return;d(Object.assign(Object.assign({},s),{action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key}));let a=Object.assign(Object.assign(Object.assign(Object.assign({},n),s),{node_id:e.id,action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key}),getCurrentTotalDynamicScore(i,l,t.id));r(!0);let c=yield subotInlineMessage$1(a);if(r(!1),(null==c?void 0:c._status)===1){let e=null==c?void 0:c._data,{node:t}=e,n=(0,x.a)(e,["node"]),i=Object.assign(Object.assign({},t),{_message:Object.assign(Object.assign({},n),{node_id:t.id})});o(i,a)}})})):null};Container$6.displayName="SubotinlineNodeImage";let tT=F.A.div`
1931  display: flex;
1932  flex-direction: column;
1933  padding-bottom: 16px;
1934  gap: 24px;
1935`,Container$5=({node:e,indexNumber:t})=>{var n;let{setIsShowFooter:i,onChange:l}=(0,h.useContext)(eM),{value:o,setValue:a}=(0,h.useContext)(ej);(0,h.useMemo)(()=>{i(!0)},[]),(0,h.useEffect)(()=>{a((null==e?void 0:e._message)||{})},[]),(0,h.useEffect)(()=>()=>{a({})},[]);let r=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e==E.f.ACTION_MULTIPLE_BUTTON);return n||null},[null==e?void 0:e.actions]),s=(0,h.useMemo)(()=>(null==o?void 0:o.selected_actions)?Object.keys(null==o?void 0:o.selected_actions):[],[o,null==o?void 0:o.selected_actions]),d=null===(n=null==e?void 0:e.actions)||void 0===n?void 0:n.filter(e=>e.type!==E.f.ACTION_MULTIPLE_BUTTON);return _().createElement(tT,{id:"si-node-text"},_().createElement(Container$h,{intents:(null==e?void 0:e.intents)||[],indexNumber:t}),_().createElement(Container$7,{value:s,actions:d,onChange:(e,t)=>
1935(0,x._)(void 0,void 0,void 0,function*(){var n,i;if(e){let s=JSON.parse(JSON.stringify(Object.assign(Object.assign({},o),{action_id:null==r?void 0:r.id,action_value:null==r?void 0:r.key,selected_actions:Object.assign({},null==o?void 0:o.selected_actions)})));if((null==e?void 0:e.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT||(null==e?void 0:e.type)===E.f.USER_CHOICE_TEXT_BY_INPUT){let i=(null==s?void 0:s.selected_actions)&&e.id in s.selected_actions;i?t?s.form_submit_meta=t:(delete s.form_submit_meta,null===(n=s.selected_actions)||void 0===n||delete n[e.id]):(null==e?void 0:e.id)&&(s.selected_actions=Object.assign(Object.assign({},s.selected_actions),{[e.id]:e.key||""})),a(s),null==l||l(s);return}if(!(null===(i=s.selected_actions)||void 0===i?void 0:i[e.id])){s.selected_actions=Object.assign(Object.assign({},s.selected_actions),{[e.id]:e.key||""}),l&&l(s),a(s);return}if(s.selected_actions[e.id]){delete s.selected_actions[e.id],l&&l(s),a(s);return}}}),formSubmitMeta:null==o?void 0:o.form_submit_meta}))};Container$5.displayName="SubotInlineNodeMultipleContainer";let useDescriptionPollNode=({node:e})=>{let{formatMessage:t}=(0,h.useContext)(k.T),n=t({id:"multiSelectError.required",defaultMessage:"You must choose one options"});return(null==e?void 0:e.multi_select_option)===E.g.UNLIMITED&&(n=t({id:"multiSelectError.unlimited",defaultMessage:"You must choose at least one options"})),(null==e?void 0:e.multi_select_option)===E.g.RANGE&&(n=t({id:"multiSelectError.range",defaultMessage:"You must choose from {from} to {to} answers (Ex: You must choose from 3 to 5 answers)"},{from:e.from,to:e.to})),(null==e?void 0:e.multi_select_option)===E.g.EXACT_NUMBER&&(n=t({id:"multiSelectError.exactNumber",defaultMessage:"You must choose {from} answers."},{from:e.from})),n},tM=F.A.div`
1936  .si-poll-description {
1937    font-style: italic;
1938    margin-bottom: 16px;
1939  }
1940`,Container$4=({node:e,indexNumber:t})=>{let{onChange:n,setIsShowFooter:i}=(0,h.useContext)(eM),{value:l,setValue:o}=(0,h.useContext)(ej),a=useDescriptionPollNode({node:e});(0,h.useMemo)(()=>{i(!0)},[]),(0,h.useEffect)(()=>{o((null==e?void 0:e._message)||{})},[]);let r=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e==E.f.POLL_BUTTON);return n||null},[null==e?void 0:e.actions]),s=(0,h.useMemo)(()=>(null==l?void 0:l.form_submit_meta)?null==l?void 0:l.form_submit_meta.map(({action_id:e})=>e):[],[l,null==l?void 0:l.form_submit_meta]);return(0,h.useEffect)(()=>{console.log("adfsafsdf"),o(null==e?void 0:e._message)},[]),_().createElement(tM,null,_().createElement(Container$h,{intents:e.intents||[],indexNumber:t}),_().createElement("p",{className:"si-poll-description"},a),_().createElement(Container$7,{node_type:null==e?void 0:e.type,value:s,actions:null==e?void 0:e.actions,onChange:(t,i)=>{var a,s,d,c,u,m,p;let v=JSON.parse(JSON.stringify(Object.assign(Object.assign({},l),{node_id:e.id,action_id:null==r?void 0:r.id,action_value:null==r?void 0:r.key,form_submit_meta:[...(null==l?void 0:l.form_submit_meta)||[]]})));if((null==t?void 0:t.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT||(null==t?void 0:t.type)===E.f.USER_CHOICE_TEXT_BY_INPUT){let e=null===(a=v.form_submit_meta)||void 0===a?void 0:a.some(({action_id:e})=>e===t.id);e?v.form_submit_meta=void 0===i?null===(s=v.form_submit_meta)||void 0===s?void 0:s.filter(({action_id:e})=>e!==t.id):null===(d=v.form_submit_meta)||void 0===d?void 0:d.filter(({action_id:e})=>e!==t.id).concat(i):v.form_submit_meta=null===(c=v.form_submit_meta)||void 0===c?void 0:c.concat([{key:null==t?void 0:t.key,control:E.E[null==t?void 0:t.type]||"text",value:"",action_id:null==t?void 0:t.id}]),o(v),null==n||n(v);return}let g=null===(u=v.form_submit_meta)||void 0===u?void 0:u.some(({action_id:e})=>e===(null==t?void 0:t.action_id));g?v.form_submit_meta=null===(m=v.form_submit_meta)||void 0===m?void 0:m.filter(({action_id:e})=>e!==(null==t?void 0:t.action_id)):v.form_submit_meta=null===(p=v.form_submit_meta)||void 0===p?void 0:p.concat([t]),o(v),null==n||n(v)},formSubmitMeta:null==l?void 0:l.form_submit_meta}))};Container$4.displayName="SubotinlineNodePoll";let tA=F.A.div``,Container$3=({node:e})=>{let t=(0,h.useRef)(!1),{formatMessage:n,data:{userInfo:i}}=(0,h.useContext)(k.T),{params:l,setIsShowFooter:o,listNodes:a,activeId:r}=(0,h.useContext)(eM);(0,h.useMemo)(()=>{o(!0)},[]),(0,h.useEffect)(()=>{var n;let l=null===(n=null==e?void 0:e.actions)||void 0===n?void 0:n.find(e=>e.type===E.f.ACTION_SSO_REDIRECT);(null==i?void 0:i.id)&&l&&!t.current&&(t.current=!0,handleOnChange(l))},[null==i?void 0:i.id]);let{triggerLogin:s}=(0,ep.u)(),handleOnChange=t=>{if(l.bot_id&&t&&t.type===E.f.ACTION_SSO_REDIRECT){let n={params:Object.assign(Object.assign(Object.assign({},l),null==e?void 0:e._message),{action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key,mode:"inline"}),listNodes:a,activeId:r,createdAt:new Date().getTime(),botId:l.bot_id};localStorage.setItem(eT,JSON.stringify(n));let i=(0,ev.g)(window.location.href,{botItem:a[0]});i.searchParams.set("bot_id",String(l.bot_id)),i.searchParams.set("mode","inline"),i.searchParams.set("source","subot-inline");let o=i.href;(0,ep.I)()?s({returnUrl:o,source:"subot-inline"}):window.location.href=`${y.l}?returnUrl=${encodeURIComponent(o)}`}};return e?_().createElement(tA,{id:"si-node-final"},_().createElement(Container$h,{intents:[...(null==e?void 0:e.intents)||[],...(0,M.s)(n)]}),_().createElement(Container$7,{actions:null==e?void 0:e.actions,onChange:handleOnChange})):null};Container$3.displayName="SubotinlineNodeSSO";let t$=F.A.div`
1941  display: flex;
1942  flex-direction: column;
1943  padding-bottom: 16px;
1944  gap: 24px;
1945`,Container$2=({node:e,indexNumber:t})=>{let{params:n,onSubmit:i,setIsShowFooter:l,listNodes:o,activeId:a,setLoa
1945ding:r,onChange:s}=(0,h.useContext)(eM),{value:d,setValue:c}=(0,h.useContext)(ej);(0,h.useMemo)(()=>{l(!0)},[]),(0,h.useEffect)(()=>{c((null==e?void 0:e._message)||{})},[]),(0,h.useEffect)(()=>()=>{c({})},[]);let handleOnChangeNormal=t=>(0,x._)(void 0,void 0,void 0,function*(){let l=Object.assign(Object.assign(Object.assign(Object.assign({},n),d),{node_id:e.id,action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key,form_submit_meta:void 0}),getCurrentTotalDynamicScore(o,a,t.id));r(!0);let s=yield subotInlineMessage$1(l);if(r(!1),(null==s?void 0:s._status)===1){let e=null==s?void 0:s._data,{node:t}=e,n=(0,x.a)(e,["node"]),o=Object.assign(Object.assign({},t),{_message:Object.assign(Object.assign({},n),{node_id:t.id})});i(o,l)}});return _().createElement(t$,{id:"si-node-text"},_().createElement(Container$h,{intents:(null==e?void 0:e.intents)||[],indexNumber:t}),_().createElement(Container$7,{value:(null==d?void 0:d.action_id)?[null==d?void 0:d.action_id]:[],actions:null==e?void 0:e.actions,onChange:(e,t)=>(0,x._)(void 0,void 0,void 0,function*(){if(!e)return;let n=(null==e?void 0:e.type)===E.f.USER_CHOICE_TEXT_BY_INPUT||(null==e?void 0:e.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT,i=Object.assign(Object.assign({},d),{action_id:null==e?void 0:e.id,action_value:null==e?void 0:e.key,form_submit_meta:t});if(n){c(i),null==s||s(i);return}delete i.form_submit_meta,c(i),handleOnChangeNormal(e)}),formSubmitMeta:null==d?void 0:d.form_submit_meta}))};Container$2.displayName="SubotInlineNodeTextContainer";let tP={TEXT:Container$2,IMAGE:Container$6,FORM:Container$d,FINAL_STANDARD:Container$f,FINAL:Container$g,FINAL_THANK_YOU:Container$e,SSO:Container$3,MULTIPLE:Container$5,POLL:Container$4},tB=new Proxy(tP,{get:(e,t)=>tP[t]||(()=>ee.K?null:_().createElement(_().Fragment,null,"SubotInlineNodeBase ",t))}),Container$1=({onClickStart:e})=>{var t;let{listNodes:n,activeId:i,isDisabledAnimationOnMobile:l}=(0,h.useContext)(eM),o=(0,h.useMemo)(()=>n.findIndex(e=>e.id==i),[n,i]),a=n[o];if(!a)return null;if(a.hasOwnProperty("first_node"))return l?_().createElement(Container$s,{node:a,onClickStart:e}):_().createElement(D.P.div,{key:a.id,initial:{opacity:0}
1945,animate:{opacity:1},transition:{y:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},_().createElement(Container$s,{node:a,onClickStart:e}));let r=E.d[a.type].valueOf(),s=null===(t=E.c[a.position])||void 0===t?void 0:t.valueOf(),d=a.position===E.c.SSO?tB[s]:tB[r];return a.is_multi_select&&a.type!==E.d.POLL&&(d=tB.MULTIPLE),_().createElement(D.P.div,{key:a.id,initial:{opacity:1,y:-300},animate:{opacity:1,y:0},transition:{y:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},_().createElement(d,{indexNumber:o,node:a}))};Container$1.displayName="SubotInlineNodeContainer";let TypeFormView=({typeFormProps:e,locale:t})=>{var n;let i;return(null==e?void 0:e.id)?_().createElement(B.Box,{component:"iframe",src:`https://${ee.K?"":"discover."}${P.y[t]}/typeform.html?id=${e.id}&${(n=e.params,i="",n&&(i=Object.keys(n).map(e=>e+"="+n[e]).join("&")),i)}`,width:"100%",height:"100%",sx:{display:"block",border:"none",borderRadius:"inherit"},allowFullScreen:!0}):null},tL={type:"spring",damping:25,stiffness:120},tj=(0,h.memo)(({loading:e,backgroundImage:t,isShowFooter:n,isFullContainer:i,isDisabledAnimationOnMobile:l,subotSettingData:o,onCloseMobile:a,bgImgFullContainer:r,typeFormProps:s})=>{let d=(0,h.useMemo)(()=>({backgroundImage:t?`url("${t}")`:void 0,backgroundRepeat:"no-repeat",backgroundPosition:"center"}),[t]),{isMobile:c,locale:u}=(0,h.useContext)(eM),[m,p]=(0,h.useState)(!1),v=s?"type-form":"subot-form";(0,h.useEffect)(()=>{m?document.body.classList.add("si-open-overflow"):document.body.classList.remove("si-open-overflow")},[m]),(0,h.useEffect)(()=>()=>{document.body.classList.remove("si-open-overflow")},[]);let g=m||l,b=_().createElement(e$,null,_().createElement(D.P.div,{style:d,layout:!0,transition:l?void 0:tL,className:j()("si-inline-revamp-container",{"si-container-open":g,"si-full-container-config":i,"si-typeform":!!s})},g&&!s&&_().createElement("button",{className:"si-close-btn",onClick:()=>{console.log("onClosemobile",a),p(!1),null==a||a()}},_().createElement(Close,null)),s&&u?_().createElement(TypeFormView,{locale:u,typeFormProps:s}):_().createElement(NodeContextProvider,null,_().createElement("div",{className:"subot-inline-revamp-container","data-show-footer":n},e&&!n&&_().createElement(R.L,{className:"si-loading"}),_().createElement(Container$1,{onClickStart:()=>{p(!0)}})),n&&_().createElement(Container$u,null))),_().createElement("div",{className:"si-container-placeholder"})),f=(0,h.useMemo)(()=>{if(r)return{backgroundImage:`url("${r}")`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}},[r]);if(i){let e=hasSubotLeftInfo(o);return _().createElement(eP,{className:"si-container-fs",style:f,"data-has-left-info":e},_().createElement(U.C,{className:(0,B.clsx)("si-container",{"si-typeform-container":!!s,"si-no-left-info":!e})},e&&_().createElement("div",{className:"si-revamp-left"},_().createElement(Container$t,{layout:s&&u||c?"horizontal":"vertical",subotSettingData:o}),_().createElement(Container$v,{className:(0,B.clsx)(v,"disclaimer-top")})),_().createElement("div",{className:"si-revamp-right"},b),_().createElement(Container$v,{className:(0,B.clsx)(v,"disclaimer-bottom")})))}return b});tj.displayName="SubotInlineRevampView";let Container=()=>{let{loading:e,listNodes:t,isShowFooter:n,activeId:i,isFullContainer:l,isDisabledAnimationOnMobile:o,onCloseMobile:a,userInfo:r,bgImgFullContainer:s,typeFormProps:d}=(0,h.useContext)(eM),c=(0,h.useMemo)(()=>{var e,n;let l=t.find(e=>e.id==i);return l?l.inline_background||(null===(n=null===(e=l.intents)||void 0===e?void 0:e.find(e=>e.type===E.N.BOT_BACKGROUND_IMAGE))||void 0===n?void 0:n.url):""},[t,i]),u=(0,h.useMemo)(()=>{let e=t[0];return{inlineImage:(null==e?void 0:e.inline_image)||"",inilneHeadline:(null==e?void 0:e.inline_headline)||"",reviewByAvatar:(null==e?void 0:e.inline_avatar)||"",reviewByName:(null==e?void 0:e.inline_review)||"",reviewBySpecialty:(null==e?void 0:e.inline_speciality)||"",reviewByHospital:(null==e?void 0:e.inline_hospital_name)||""}},[t[0]]);return void 0!==r&&t[0]?_().createElement(tj,Object.assign({},{loading:e,backgroundImage:c,bgImgFullContainer:s,isShowFooter:n,isFull
1945Container:l,isDisabledAnimationOnMobile:o,subotSettingData:u,onCloseMobile:a,typeFormProps:d})):null};Container.displayName="SubotInlineRevamp";let ContainerWithProvider=e=>_().createElement(SubotInlineProvider,Object.assign({},e,{subotId:Number(e.id)}),_().createElement(Container,null)),tU=(0,F.A)(B.Box)`
1946  position: relative;
1947  background-color: var(--mantine-color-blue-0, #e7f5ff);
1948
1949  ${G.M.mbDown} {
1950    padding-top: 40px;
1951    padding-bottom: 40px;
1952  }
1953
1954  ${G.M.mbUp} {
1955    padding-top: 80px;
1956    padding-bottom: 80px;
1957    ${({$isTypeForm:e})=>!e&&`
1958      min-height: calc(654px + 160px);
1959    `}
1960  }
1961`,tR=(0,F.A)(U.C)`
1962  display: flex;
1963  gap: 24px;
1964
1965  ${({$loading:e})=>!e&&`
1966    position: absolute;
1967    visibility: hidden;
1968    pointer-events: none;
1969  `}
1970
1971  ${G.M.mbDown} {
1972    flex-direction: column;
1973  }
1974
1975  ${G.M.mbUp} {
1976    gap: 30px;
1977    ${({$isTypeForm:e})=>e?`
1978      flex-direction: column;
1979    `:`
1980      flex-direction: row;
1981    `}
1982    ${({$hasLeftInfo:e,$isTypeForm:t})=>!e&&!t&&`
1983      justify-content: flex-end;
1984    `}
1985  }
1986`,tD=(0,F.A)(B.Stack)`
1987  width: 100%;
1988  max-width: 490px;
1989
1990  &[data-type-form='true'] {
1991    max-width: 900px;
1992  }
1993`,tF=(0,F.A)(B.Flex)`
1994  background-color: #fff;
1995  border-radius: 12px;
1996  padding: 12px;
1997  align-items: center;
1998  justify-content: center;
1999
2000  ${G.M.mbDown} {
2001    min-height: 80vh;
2002    width: 100%;
2003  }
2004
2005  ${G.M.mbUp} {
2006    border-radius: 20px;
2007    padding: 48px;
2008    min-height: ${({$isTypeForm:e})=>e?"550px":"654px"};
2009    width: ${({$isTypeForm:e})=>e?"100%":"720px"};
2010    max-width: 720px;
2011  }
2012`,tG=(0,F.A)(B.Stack)`
2013  ${G.M.mbDown} {
2014    flex-direction: row;
2015    gap: 16px;
2016  }
2017`,tH=(0,F.A)(B.Stack)`
2018  ${G.M.mbDown} {
2019    width: calc(100% - 48px);
2020  }
2021`,tz=(0,F.A)(B.Skeleton)`
2022  ${G.M.mbDown} {
2023    width: 48px !important;
2024    height: 48px !important;
2025    min-width: 48px;
2026  }
2027`,tV=F.A.div`
2028  ${({$loading:e})=>e?`
2029    position: absolute;
2030    inset: 0;
2031  `:`
2032    position: relative;
2033  `}
2034`,tq=(0,F.A)(B.Flex)`
2035  gap: 8px;
2036  align-items: center;
2037
2038  ${({$isTypeForm:e})=>!e&&`
2039    ${G.M.mbUp} {
2040      display: none;
2041    }
2042  `}
2043`,SubotInlineSkeleton=({children:e,loading:t,hasLeftInfo:n=!0,isTypeForm:i=!1})=>_().createElement(tU,{$hasLeftInfo:n,$isTypeForm:i},_().createElement(tR,{$hasLeftInfo:n,$isTypeForm:i,$loading:t,style:{opacity:Number(t)}},n&&_().createElement(tD,{spacing:24,justify:"space-between","data-type-form":i},_().createElement(tG,{spacing:i?12:24},_().createElement(tz,{height:64,width:64,radius:"100%"}),_().createElement(tH,{spacing:i?8:16},i?_().createElement(B.Skeleton,{height:36,width:"100%",radius:12}):_().createElement(_().Fragment,null,_().createElement(B.Skeleton,{height:24,width:"100%",radius:12}),_().createElement(B.Skeleton,{height:24,width:"70%",radius:12})))),_().createElement(B.Flex,{gap:12,align:"center",sx:i?e=>({[e.fn.largerThan("sm")]:{marginLeft:60,marginTop:-20}}):void 0},_().createElement(B.Skeleton,{height:40,width:40,radius:"100%",sx:{flexShrink:0}}),_().createElement(B.Stack,{spacing:8,sx:{width:"100%"}},_().createElement(B.Skeleton,{height:12,width:i?"80%":"100%",radius:4}),_().createElement(B.Skeleton,{height:12,width:i?"30%":"70%",radius:4})))),_().createElement(tF,{$hasLeftInfo:n,$isTypeForm:i},_().createElement(B.Stack,{spacing:16,sx:{width:"100%"}},_().createElement(B.Skeleton,{height:32,width:"80%",radius:8}),_().createElement(B.Stack,{spacing:8},_().createElement(B.Skeleton,{height:16,width:"100%",radius:4}),_().createElement(B.Skeleton,{height:16,width:"100%",radius:4}),_().createElement(B.Skeleton,{height:16,width:"40%",radius:4})),_().createElement(B.Skeleton,{height:40,width:130,radius:8}))),_().createElement(tq,{$isTypeForm:i},_().createElement(B.Skeleton,{height:20,width:20,radius:"100%"}),_().createElement(B.Skeleton,{height:16,width:300,radius:4}))),_().createElement(tV,{$loading:t,style:{opacity:Number(!t)}},e)),toLeftInfoSettings=e=>({inlineImage:e.inline_image||"",inilneHeadline:e.inline_headline||"",reviewByAvatar:e.inline_avatar||"",reviewByName:e.inline_review||"",reviewBySpecialty:e.inline_speciality||"",reviewByHospital:e.inline_hospital_name||""}),SubotInlineRevampWithTheme=e=>{var t,n,i,l,o,a,r,s,d,c,u,m,{onLoadFirstNode:p,withoutSkeleton:v}=e,g=(0,x.a)(e,["onLoadFirstNode","withoutSkeleton"]);let[b,f]=(0,h.useState)(null),[E,y]=(0,h.useState)(!v),w=!!g.typeFormProps,I=(0,h.useMemo)(()=>!b||hasSubotLeftInfo(toLeftInfoSettings(b)),[b]);(0,h.useEffect)(()=>{(0,x._)(void 0,void 0,void 0,function*(){let e=yield Promise.resolve().then(function(){return nz}).then(e=>e.subotInlineFirstNode),t=yield e(g.id),n=(null==t?void 0:t._data)||null;f(n)})},[g.id]),(0,h.useEffect)(()=>
2043{if(!b)return;if(null==p||p(b),v){y(!1);return}let e=setTimeout(()=>y(!1),600);return()=>clearTimeout(e)},[b,p,v]);let S=b?_().createElement(ContainerWithProvider,Object.assign({},g,{primaryColor:null===(n=null===(t=b.extra_settings)||void 0===t?void 0:t.inline_styles)||void 0===n?void 0:n.primary_color,textColor:null===(l=null===(i=b.extra_settings)||void 0===i?void 0:i.inline_styles)||void 0===l?void 0:l.text_color,textButtonColor:null===(a=null===(o=b.extra_settings)||void 0===o?void 0:o.inline_styles)||void 0===a?void 0:a.text_button_color,bgColor:null===(s=null===(r=b.extra_settings)||void 0===r?void 0:r.inline_styles)||void 0===s?void 0:s.container_bg_color,bgContentColor:null===(c=null===(d=b.extra_settings)||void 0===d?void 0:d.inline_styles)||void 0===c?void 0:c.content_bg_color,bgImgFullContainer:null===(m=null===(u=b.extra_settings)||void 0===u?void 0:u.inline_styles)||void 0===m?void 0:m.container_bg_image})):null;return v?S:_().createElement(SubotInlineSkeleton,{loading:E,hasLeftInfo:I,isTypeForm:w},S)},tW=(0,h.createContext)({activeId:"",params:{},nodes:[],getParams:()=>({}),trackingCommonInline:{}}),subotInlineClick=e=>(0,x._)(void 0,void 0,void 0,function*(){try{return yield(0,k.c)(getSubotApiPath(ey.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}}),subotInlineImpression=e=>(0,x._)(void 0,void 0,void 0,function*(){try{return yield(0,k.c)(getSubotApiPath(ey.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}}),subotInlineMessage=e=>(0,x._)(void 0,void 0,void 0,function*(){try{return yield(0,k.c)(getSubotApiPath(ey.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}}),computeExtraSettingsForBot=e=>{var t;if((null==e?void 0:e._status)===1&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{let t=JSON.parse(e._data.extra_settings);"object"==typeof t?e._data.extra_settings=t:e._data.extra_settings={sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},subotInlineFirstNode=e=>(0,x._)(void 0,void 0,void 0,function*(){try{let t=yield(0,k.c)(getSubotApiPath(ey.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return computeExtraSettingsForBot(t),t}catch(e){}}),tY=F.A.div`
2044  margin-top: 2rem;
2045  .form {
2046    background-color: ${Q.w.colors.white||"#fff"};
2047  }
2048`,tX=F.A.div``,tK=F.A.div`
2049  margin-top: 1.25rem;
2050`,tJ=F.A.div`
2051  margin-bottom: 1rem;
2052`,tZ=F.A.div`
2053  font-weight: 400;
2054  font-size: 16px;
2055  line-height: 24px;
2056  color: #595959;
2057  font-style: italic;
2058`,tQ=(0,F.A)(eu.B)`
2059  position: relative;
2060  min-width: 180px;
2061  svg {
2062    path {
2063      stroke: currentColor;
2064    }
2065  }
2066  &:hover {
2067    svg {
2068      path {
2069        stroke: currentColor;
2070      }
2071    }
2072  }
2073`,t0=F.A.div`
2074  display: flex;
2075  align-items: center;
2076  justify-content: center;
2077`,t1=F.A.div`
2078  position: relative;
2079  overflow: ${({isMore:e})=>e?"unset":"hidden"};
2080  max-height: ${({maxHeight:e})=>e?e+"px":"auto"};
2081  margin-bottom: 8px;
2082  transition: 0.25s all linear;
2083  &:before {
2084    position: absolute;
2085    z-index: 1;
2086    top: 50%;
2087    right: 0;
2088    bottom: 0;
2089    left: 0;
2090    background-image: linear-gradient(
2091      to top,
2092      ${Q.w.colors.neutral50||"#F7F9FC"} 0%,
2093      transparent 100%
2094    );
2095    content: '';
2096    pointer-events: none;
2097    ${({isMore:e})=>e&&"opacity: 0;"}
2098  }
2099`,t2=F.A.div`
2100  position: relative;
2101  padding: 32px 32px 16px;
2102  background-color: ${Q.w.colors.neutral50||"#F7F9FC"};
2103  border-radius: ${Q.w.borderRadius};
2104  ${G.M.tdDown} {
2105    padding: 24px 24px 16px;
2106  }
2107  ${G.M.mbDown} {
2108    padding: 16px;
2109    border-radius: 0px;
2110  }
2111`,t6=F.A.div`
2112  padding: 12px 32px 32px;
2113  ${G.M.tdDown} {
2114    padding: 12px 24px 24px;
2115  }
2116  ${G.M.mbDown} {
2117    padding: 12px 16px 16px;
2118  }
2119`,t5=F.A.div`
2120  border: 1px solid ${Q.w.colors.neutral100||"#E4E8EC"};
2121  background-color: ${Q.w.colors.neutral50||"#F7F9FC"};
2122  border-radius: ${Q.w.borderRadius};
2123  ${G.M.mbDown} {
2124    border: none;
2125  }
2126`,CheckboxIcon=e=>_().createElement("svg",Object.assign({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 21C16.5228 21 21 16.5228 21 11C21 5.47715 16.5228 1 11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21Z",fill:"#2D87F3",stroke:"#2D87F3",strokeWidth:"2"}),_().createElement("path",{d:"M15.5714 8L9.67857 14L7 11.2727",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),CheckIcon=e=>_().createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M13.3346 4L6.0013 11.3333L2.66797 8",stroke:"#737373",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),LikeIcon=e=>_().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0521 5.70293L11.8834 2L12.6635 2.03149C12.6635 2.03149 13.5407 2.05593 14.4487 2.51311C15.3568 2.9703 16.375 4.04935 16.375 5.69552C16.375 6.76085 16.1102 7.83874 15.8458 8.67047H20.125C21.1497 8.67047 22 9.53063 22 10.5673V12.8847C22 
212613.1046 21.9497 13.3294 21.8462 13.533L18.6437 19.9571C18.3261 20.5939 17.6767 21 16.9701 21H8.875C7.85025 21 7 20.1398 7 19.1031V10.0579C7 9.50164 7.24299 8.97147 7.66284 8.61119L11.0521 5.70293ZM13.4432 4.15712C13.4125 4.15279 13.3784 4.14799 13.3263 4.1321L12.7422 6.73842L8.875 10.0579V19.1031H16.9701L20.125 12.7717V10.5673H13.0864L13.6357 9.25027C13.6357 9.25027 14.5 7.01241 14.5 5.69552C14.5 4.74112 14.1119 4.46257 13.6138 4.21176C13.5294 4.16929 13.4902 4.16376 13.4432 4.15712Z",fill:"#595959"}),_().createElement("path",{d:"M2 10.5C2 9.672 2.672 9 3.5 9C4.328 9 5 9.672 5 10.5V19.5C5 20.328 4.328 21 3.5 21C2.672 21 2 20.328 2 19.5V10.5Z",fill:"#595959"})),DislikeIcon=e=>_().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0521 17.2971L11.8834 21L12.6635 20.9685C12.6635 20.9685 13.5407 20.9441 14.4487 20.4869C15.3568 20.0297 16.375 18.9507 16.375 17.3045C16.375 16.2391 16.1102 15.1613 15.8458 14.3295H20.125C21.1497 14.3295 22 13.4694 22 12.4327V10.1153C22 9.89545 21.9497 9.6706 21.8462 9.467L18.6437 3.0429C18.3261 2.40607 17.6767 2 16.9701 2H8.875C7.85025 2 7 2.86016 7 3.89685V12.9421C7 13.4984 7.24299 14.0285 7.66284 14.3888L11.0521 17.2971ZM13.4432 18.8429C13.4125 18.8472 13.3784 18.852 13.3263 18.8679L12.7422 16.2616L8.875 12.9421V3.89685H16.9701L20.125 10.2283V12.4327H13.0864L13.6357 13.7497C13.6357 13.7497 14.5 15.9876 14.5 17.3045C14.5 18.2589 14.1119 18.5374 13.6138 18.7882C13.5294 18.8307 13.4902 18.8362 13.4432 18.8429Z",fill:"#595959"}),_().createElement("path",{d:"M2 12.5C2 13.328 2.672 14 3.5 14C4.328 14 5 13.328 5 12.5V3.5C5 2.672 4.328 2 3.5 2C2.672 2 2 2.672 2 3.5V12.5Z",fill:"#595959"})),ArrowDown=e=>_().createElement("svg",Object.assign({width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M1 1L5 5L9 1",stroke:"#595959",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),ArrowLeft=e=>_().createElement("svg",Object.assign({width:"7",height:"10",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),ArrowRight=e=>_().createElement("svg",Object.assign({width:"7",height:"10",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),ArrowUp=e=>_().createElement("svg",Object.assign({width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M1 5L5 1L9 5",stroke:"#FC5D9A",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),ChevronRightActive=e=>_().createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("path",{d:"M6 12L10 8L6 4",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),RotateLeft=e=>_().createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_().createElement("g",{clipPath:"url(#clip0)"},_().createElement("path",{d:"M0.666626 2.6665V6.6665H4.66663",stroke:"#737373",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),_().createElement("path",{d:"M2.33996 10.0001C2.77222 11.227 3.59152 12.2802 4.6744 13.001C5.75728 13.7218 7.04508 14.0712 8.34377 13.9964C9.64246 13.9217 10.8817 13.4269 11.8747 12.5866C12.8677 11.7464 13.5608 10.6061 13.8494 9.3377C14.1381 8.06929 14.0067 6.74143 13.475 5.55419C12.9434 4.36696 12.0403 3.38466 10.9018 2.7553C9.76339 2.12595 8.45123 1.88364 7.16308 2.06487C5.87493 2.24611 4.68057 2.84108 3.75996 3.76013L0.666626 6.6668",stroke:"#737373",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),_().createElement("defs",null,_().createElement("clipPath",{id:"clip0"},_().createElement("rect",{width:"16",height:"16",fill:"white"})))),t4=F.A.div`
2127  display: flex;
2128  align-items: center;
2129  justify-content: center;
2130  padding: 12px 24px;
2131  border: 1px solid ${Q.w.colors.neutral100||"#E4E8EC"};
2132  background-color: ${Q.w.colors.white||"white"};
2133  border-radius: 32px;
2134  cursor: pointer;
2135  transition: 0.25s all linear;
2136  svg {
2137    height: 16px;
2138    margin-right: 3px;
2139  }
2140  &:hover {
2141    background-color: ${Q.w.colors.neutral100};
2142  }
2143  &.active {
2144    background-color: ${Q.w.colors.primaryActive};
2145    color: ${Q.w.colors.white||"#fff"};
2146    svg {
2147      stroke: ${Q.w.colors.white||"#fff"};
2148    }
2149  }
2150`,t3=F.A.div`
2151  padding: 12px 24px;
2152  border: 1px solid ${Q.w.colors.neutral100||"#E4E8EC"};
2153  background-color: ${Q.w.colors.white||"white"};
2154  border-radius: 32px;
2155  cursor: pointer;
2156  transition: 0.25s all linear;
2157  &.active {
2158    background-color: ${null===(u=Q.w.colors)||void 0===u?void 0:u.primaryActive};
2159    color: ${Q.w.colors.white||"#fff"};
2160    svg {
2161      stroke: ${Q.w.colors.white||"#fff"};
2162    }
2163  }
2164`,t7=F.A.div`
2165  display: flex;
2166  align-items: center;
2167  padding: 16px 24px;
2168  border: 1px solid
2169    ${({active:e})=>e?Q.w.colors.primaryBase||"#2685F1":Q.w.colors.white||"#fff"};
2170  background-color: ${Q.w.colors.white||"#fff"};
2171  border-radius: ${Q.w.borderRadius};
2172  cursor: pointer;
2173  transition: 0.25s all linear;
2174  .label {
2175    flex: 1;
2176  }
2177  .icon {
2178    position: relative;
2179    z-index: 0;
2180    display: flex;
2181    width: 24px;
2182    height: 24px;
2183    align-items: center;
2184    justify-content: center;
2185    padding: 1px;
2186    transition: 0.2s linear all;
2187    .icon-checkbox {
2188      width: 100%;
2189      height: 100%;
2190      opacity: 0;
2191      ${({active:e})=>e&&"opacity: 1"};
2192      transition: 0.25s all linear;
2193    }
2194    &:before {
2195      position: absolute;
2196      top: 50%;
2197      left: 50%;
2198      width: 22px;
2199      height: 22px;
2200      border: 2px solid
2201        ${({active:e})=>e?Q.w.colors.primaryBase||"#2685F1":Q.w.colors.gray600||"#595959"};
2202      border-radius: 50%;
2203      content: '';
2204      transform: translate(-50%, -50%);
2205      transition: 0.25s all linear;
2206    }
2207    &:after {
2208      position: absolute;
2209      z-index: -1;
2210      top: 50%;
2211      left: 50%;
2212      width: 10px;
2213      height: 10px;
2214      background-color: ${Q.w.colors.primaryBase||"#2685F1"};
2215      border-radius: 50%;
2216      content: '';
2217      opacity: 0;
2218      ${({active:e})=>e&&"opacity: 1"};
2219      transform: translate(-50%, -50%);
2220      transition: 0.25s all linear;
2221    }
2222  }
2223  &:hover {
2224    border-color: ${(null===(m=Q.w.colors)||void 0===m?void 0:m.primaryBase)||"#2685F1"};
2225    .icon {
2226      &:before {
2227        border-color: ${(null===(p=Q.w.colors)||void 0===p?void 0:p.primaryBase)||"#2685F1"};
2228        transition: 0.2s linear all;
2229      }
2230    }
2231  }
2232  ${G.M.tdDown} {
2233    padding: 16px 20px;
2234  }
2235`,t8=(0,F.A)(t7)`
2236  position: relative;
2237  flex-wrap: wrap;
2238  padding: 16px;
2239  background-color: ${(null===(v=Q.w.colors)||void 0===v?void 0:v.white)||"#fff"};
2240  .image-container {
2241    position: relative;
2242    overflow: hidden;
2243    width: 100%;
2244    padding-top: 67%;
2245    border-radius: 10px;
2246    .image {
2247      position: absolute;
2248      top: 50%;
2249      left: 50%;
2250      width: 100%;
2251      min-width: 100%;
2252      height: auto;
2253      min-height: 100%;
2254      transform: translate(-50%, -50%);
2255    }
2256  }
2257  .label {
2258    margin-top: 16px;
2259  }
2260  .icon {
2261    position: absolute;
2262    top: 1.75rem;
2263    right: 1.75rem;
2264    &:before {
2265      z-index: -1;
2266      background-color: #fff;
2267    }
2268  }
2269  ${G.M.tdDown} {
2270    padding: 12px;
2271    .label {
2272      margin-top: 12px;
2273    }
2274    .icon {
2275      top: 1.3rem;
2276      right: 1.3rem;
2277    }
2278  }
2279  ${G.M.tdDown} {
2280    padding: 8px;
2281    .label {
2282      margin-top: 8px;
2283    }
2284    .icon {
2285      top: 0.9rem;
2286      right: 0.9rem;
2287    }
2288  }
2289`,t9=F.A.div`
2290  display: flex;
2291  align-items: center;
2292  justify-content: flex-start;
2293  ${G.M.tdDown} {
2294    justify-content: center;
2295  }
2296`,ne=F.A.div`
2297  textarea {
2298    background-color: ${(null===(g=Q.w.colors)||void 0===g?void 0:g.white)||"#fff"};
2299  }
2300`,nt=F.A.div`
2301  margin-top: 20px;
2302  color: ${(null===(b=Q.w.colors)||void 0===b?void 0:b.gray500)||"#737373"};
2303  font-weight: 600;
2304`,nn=F.A.div`
2305  position: relative;
2306  z-index: 0;
2307  display: flex;
2308  overflow: hidden;
2309  align-items: center;
2310  padding: 16px 20px;
2311  border-radius: ${Q.w.borderRadius};
2312  .number {
2313    width: 32px;
2314    margin-right: 14px;
2315    font-weight: 600;
2316  }
2317  .content {
2318    flex: 1;
2319  }
2320  .icon {
2321    width: 16px;
2322    margin-left: 8px;
2323  }
2324  &:before {
2325    position: absolute;
2326    z-index: -1;
2327    top: 0;
2328    right: ${({percent:e})=>e?`${100-e}%`:"100%"};
2329    bottom: 0;
2330    left: 0;
2331    background-color: ${({is_chosen:e})=>e?Q.w.colors.primary50||"#E3F2FF":Q.w.colors.neutral100||"#E4E8EC"};
2332    content: '';
2333    transition: 0.3s all linear;
2334  }
2335  &:after {
2336    position: absolute;
2337    z-index: -2;
2338    top: 0;
2339    right: 0;
2340    bottom: 0;
2341    left: 0;
2342    background-color: ${(null===(f=Q.w.colors)||void 0===f?void 0:f.white)||"#fff"};
2343    content: '';
2344  }
2345  ${G.M.mbDown} {
2346    padding: 6px 16px;
2347  }
2348`,ni=F.A.div`
2349  width: ${({width:e})=>e||"100%"};
2350  padding: 4px;
2351  &.item-image-container {
2352    padding: 16px;
2353    ${G.M.tdDown} {
2354      padding: 7.5px;
2355    }
2356    ${G.M.mbDown} {
2357      width: 50%;
2358    }
2359  }
2360`,nl=F.A.div`
2361  display: flex;
2362  flex-wrap: wrap;
2363  align-items: flex-start;
2364  justify-content: center;
2365  margin: -4px;
2366
2367  &.list-container {
2368    margin: -16px;
2369    ${G.M.tdDown} {
2370      margin: -7.5px;
2371    }
2372  }
2373
2374  &.review-container {
2375    margin: -8px;
2376    > div {
2377      padding: 8px;
2378    }
2379  }
2380`,SubotInlineAction=({actions:e,value:t,onChange:n,htmlType:i,node_type:l,formSubmitMeta:o})=>{let a=(0,h.useMemo)(()=>{switch(l){case E.d.IMAGE:case E.d.REACTION:return"list-container";default:return""}},[l]);return _().createElement(_().Fragment,null,e&&!!(null==e?void 0:e.length)&&_().createElement(nl,{className:a},null==e?void 0:e.map(e=>{let l=ns[null==e?void 0:e.type];return l&&_().createElement(l,{key:e.id,action:e,onChange:n,active:null==t?void 0:t.includes(e.id),htmlType:i,formSubmitMeta:o})})))},no=(0,F.A)(eu.B)`
2381  &:disabled {
2382    background-color: rgb(242, 242, 242);
2383    color: rgb(140, 140, 140);
2384
2385    &:hover {
2386      border: 0;
2387    }
2388  }
2389  svg {
2390    path {
2391      stroke: currentColor;
2392    }
2393  }
2394`,na=(0,F.A)(no)`
2395  &:disabled {
2396    background-color: rgb(242, 242, 242);
2397    color: rgb(140, 140, 140);
2398    &:hover {
2399      border: 0;
2400    }
2401  }
2402  svg {
2403    path {
2404      stroke: currentColor;
2405    }
2406  }
2407`,nr=F.A.div`
2408  display: flex;
2409  align-items: center;
2410  justify-content: flex-end;
2411  padding: 16px 32px;
2412  border-top: 4px solid ${Q.w.colors.neutral100||"#E4E8EC"};
2413  .mantine-Button-root {
2414    + .mantine-Button-root {
2415      margin-left: 8px;
2416    }
2417  }
2418  ${G.M.tdDown} {
2419    padding: 12px 24px;
2420  }
2421  ${G.M.mbDown} {
2422    padding: 12px 16px;
2423  }
2424`,SubotInlineActionTextChoice=({action:e,onChange:t,active:n,htmlType:i,formSubmitMeta:l})=>{let{trackingCommonInline:o}=(0,h.useContext)(tW),a=(0,h.useRef)(null),[r,s]=(0,h.useState)(""),d=(null==e?void 0:e.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT,c=(null==e?void 0:e.type)===E.f.USER_CHOICE_TEXT_BY_INPUT||d;return(0,h.useEffect)(()=>{var e,t;n&&(s((null===(e=null==l?void 0:l.find(e=>e.key===eN))||void 0===e?void 0:e.value)||""),null===(t=a.current)||void 0===t||t.focus())},[n,l]),_().createElement(ni,null,_().createElement(t7,Object.assign({active:!!n,onClick:()=>null==t?void 0:t(e),className:"pointer-event-child-none"},o,{"data-response-id":null==e?void 0:e.id,"data-event-action":"Answer Click"}),_().createElement("div",{className:"label"},_().createElement(Markdown,null,null==e?void 0:e.label)),_().createElement("div",{className:"icon"},"checkbox"===i&&_().createElement(CheckboxIcon,{className:"icon-checkbox",viewBox:"0 0 22 22"}))),c&&n&&_().createElement(B.Box,{mt:"6px",style:{textAlign:"right"}},_().createElement(B.Textarea,{ref:a,placeholder:null==e?void 0:e.label,styles:{input:{paddingLeft:"24px",paddingRight:"24px",boxShadow:"none",":focus":{boxShadow:"none"}}},value:r,onChange:n=>{s(n.target.value),c&&(null==t||t(e,[{key:eN,control:E.E[null==e?void 0:e.type]||"text",value:n.target.value,action_id:e.id}]))},maxLength:360})))},SubotInlineActionImageChoice=({action:e,onChange:t,active:n,htmlType:i})=>{let{trackingCommonInline:l}=(0,h.useContext)(tW);return _().createElement(ni,{width:"45%",className:"item-image-container"},_().createElement(t8,Object.assign({onClick:()=>t&&t(e),active:!!n},l,{"data-response-id":null==e?void 0:e.id,"data-event-action":"Answer Click"}),_().createElement("div",{className:"image-container"},_().createElement("img",{loading:"lazy",src:null==e?void 0:e.url,alt:null==e?void 0:e.label,className:"image"})),(null==e?void 0:e.label)&&_().createElement("div",{className:"label"},_().createElement(Markdown,null,null==e?void 0:e.label)),_().createElement("div",{className:"icon"},"checkbox"===i&&_().createElement(CheckboxIcon,{className:"icon-checkbox",viewBox:"0 0 22 22"}))))},SubotInlineTextArea=({action:e,value:t,onChange:n})=>_().createElement(ni,null,_().createElement(ne,null,_().createElement(eg.T,{placeholder:null==e?void 0:e.label,value:t&&"string"!=typeof t&&(null==t?void 0:t.value)?null==t?void 0:t.value:"",onChange:t=>{let i={key:null==e?void 0:e.key,control:E.E[null==e?void 0:e.type],value:t.target.value,action_id:null==e?void 0:e.id};n&&n(i)}}))),ns={"user-image":SubotInlineActionImageChoice,[E.f.USER_CHOICE_TEXT]:SubotInlineActionTextChoice,[E.f.USER_CHOICE_TEXT_BY_INPUT]:SubotInlineActionTextChoice,[E.f.USER_CHOICE_IMAGE]:SubotInlineActionImageChoice,[E.f.ACTION_SSO_REDIRECT]:({action:e,onChange:t})=>{let{trackingCommonInline:n}=(0,h.useContext)(tW);return _().createElement(ni,{width:"50%",style:{alignSelf:"center"}},_().createElement(no,Object.assign({onClick:()=>t&&t(e),size:"lg",isBlock:!0},n,{className:"pointer-event-child-none","data-event-action":"Login Click","data-response-id":null==e?void 0:e.id}),_().createElement(Markdown,null,null==e?void 0:e.label)))},[E.f.POLL_CHOICE]:({active:e,action:t,onChange:n,htmlType:i,node_type:l})=>l===E.d.RESULT_POLL?_().createElement(ni,null,_().createElement(nn,{percent:(null==t?void 0:t.percent)||0,is_chosen:null==t?void 0:t.is_chosen},_().createElement("div",{className:"number"},null==t?void 0:t.percent,"%"),_().createElement("div",{className:"content"},null==t?void 0:t.label),_().createElement("div",{className:"icon"},(null==t?void 0:t.is_chosen)&&_().createElement(CheckIcon,{viewBox:"0 0 16 16"})))):_().createElement(SubotInlineActionTextChoice,{active:!!e,action:t,onChange:e=>{e&&n&&n({key:(null==e?void 0:e.key)||"",control:E.E[null==e?void 0:e.type],value:"",action_id:null==e?void 0:e.id})},htmlType:i}),[E.f.POLL_CHOICE_TEXT_BY_INPUT]:SubotInlineActionTextChoice,[E.f.POLL_CHOICE_IMAGE]:({active:e,action:t,onChange:n,htmlType:i,node_type:l})=>l===E.d.RESULT_POLL?_().createElement(ni,null,_().createElement(nn,{percent:(null==t?void 0:t.percent)||0,is_chosen:null==t?void 0:t.is_chosen},_().createElement("div",{className:"number"},null==t?void 0:t.percent,"%"),_().createElement("div",{className:"content"},null==t?void 0:t.label),_().createElement("div",{className:"icon"},(null==t?void 0:t.is_chosen)&&_().createElement(CheckIcon,{viewBox:"0 0 16 16"})))):_().createElement(SubotInlineActionImageChoice,{active:!!e,action:t,onChange:e=>{e&&n&&n({key:null==e?void 0:e.key,control:E.E[null==e?void 0:e.type],value:"",action_id:null==e?void 0:e.id})},htmlType:i}),[E.f.RATING_STAR]:({action:e,value:t,onChange:n})=>{var i,l;return _().createElement(ni,null,_().createElement(t9,null,_().createElement(eb.A,{rating:t&&"string"!=typeof t&&(null==t?void 0:t.value)?parseInt(null==t?void 0:t.value):0,changeRating:t=>{let i={key:null==e?void 0:e.key,control:E.E[null==e?void 0:e.type],value:t.toString(),action_id:null==e?void 0:e.id};n&&n(i)},starHoverColor:null===(i=null===Q.w||void 0===Q.w?void 0:Q.w.colors)||void 0===i?void 0:i.yellow600,starRatedColor:null===(l=null===Q.w||void 0===Q.w?void 0:Q.w.colors)||void 0===l?void 0:l.yellow600,starDimension:"48"})))},[E.f.RATING_DESCRIPTION]:SubotInlineTextArea,[E.f.LIKE_CHOICE]:({action:e,active:t,onChange:n})=>_().createElement(ni,{width:"40%",className:"item-image-container"},_().createElement(t4,{className:j()(!!t&&"active"),onClick:()=>n&&n(e)},_().createElement(LikeIcon,{viewBox:"0 0 24 24"}),_().createElement(Markdown,null,null==e?void 0:e.label))),[E.f.DISLIKE_CHOICE]:({action:e,active:t,onChange:n})=>_().createElement(ni,{width:"40%",className:"item-image-container"},_().createElement(t4,{className:j()(!!t&&"active"),onClick:()=>n&&n(e)},_().createElement(DislikeIcon,{viewBox:"0 0 24 24"}),_().createElement(Markdown,null,null==e?void 0:e.label))),[E.f.REVIEW_CHOICE]:({active:e,action:t,onChange:n})=>_().createElement(ni,{width:"auto",className:"review-choice"},_().createElement(t3,{className:j()(!!e&&"active"),onClick:()=>n&&n({key:null==t?void 0:t.key,control:E.E[null==t?void 0:t.type],value:"",action_id:null==t?void 0:t.id})},_().createElement(Markdown,null,null==t?void 0:t.label))),[E.f.REVIEW_DESCRIPTION]:SubotInlineTextArea,[E.f.RESULT_BUTTON]:SubotInlineActionTextChoice,[E.f.POLL_RESULT]:({action:e})=>_().createElement(ni,null,_().createElement(nt,null,null==e?void 0:e.label))};var nd=(0,h.memo)(({onBack:e,onNext:t,hideBack:n,hideNext:i,nextText:l,backProps:o,nextProps:a})=>{var r,s,d;let{formatMessage:c}=(0,h.useContext)(k.T),{nodes:u,activeId:m,params:p,onNext:v,trackingCommonInline:g}=(0,h.useContext)(tW),b=u.find(e=>e.id==m),f=null===(r=null==b?void 0:b.actions)||void 0===r?void 0:r.find(e=>e.type===E.f.USER_CHOICE_NEXT),x=null===(s=null==b?void 0:b.actions)||void 0===s?void 0:s.find(e=>e.type===E.f.ACTION_MULTIPLE_BUTTON);return _().createElement(nr,null,!n&&_().createElement(na,Object.assign({size:"md",color:"secondary",onClick:e},o,{className:j()("pointer-event-child-none",null==o?void 0:o.className)},g,{"data-event-action":"Back Click"}),_().createElement(ArrowLeft,{style:{marginRight:10}}),c({id:"riskScreener.back",defaultMessage:"Back"})),!i&&_().createElement(no,Object.assign({size:"md",color:"primary",onClick:f?()=>{if(b&&f){let e={node_id:b.id,action_id:null==f?void 0:f.id,action_value:null==f?void 0:f.key};null==v||v(Object.assign(Object.assign(Object.assign({},p),e),b._message))}}:t},a,{className:j()("pointer-event-child-none",null==a?void 0:a.className)},g,{"data-event-action":"Answer Click","data-response-id":(null==x?void 0:x.id)||(null==f?void 0:f.id)||(null===(d=null==b?void 0:b._message)||void 0===d?void 0:d.action_id)}),l||c({id:"riskScreener.next",defaultMessage:"Next"}),_().createElement(ArrowRight,{style:{marginLeft:10}}
2424)))});let nc=F.A.h4`
2425  padding: 32px 0px 12px;
2426  border-bottom: 1px solid ${Q.w.colors.neutral100||"#E4E8EC"};
2427  margin: 0px 32px;
2428  color: ${Q.w.colors.gray500||"#737373"};
2429  font-size: 14px;
2430  font-weight: 700;
2431  line-height: 1.5;
2432  ${G.M.tdDown} {
2433    padding: 24px 0px 12px;
2434    margin: 0px 24px;
2435  }
2436  ${G.M.mbDown} {
2437    padding: 16px 0px 12px;
2438    margin: 0px 16px;
2439  }
2440`;var nu=(0,h.memo)(()=>{let{formatMessage:e}=(0,h.useContext)(k.T),{nodes:t}=(0,h.useContext)(tW),n=(0,h.useMemo)(()=>{var e;return null===(e=t[0])||void 0===e?void 0:e.inline_headline},[t]);return _().createElement(nc,null,n||e({id:"subotInline.quote",defaultMessage:"HAVE TIME FOR A QUICK QUESTION?"}))});let nm=F.A.h3`
2441  margin-bottom: 0px;
2442  font-size: 22px;
2443  font-weight: bold;
2444  line-height: 1.45;
2445  ${G.M.tdDown} {
2446    font-size: 20px;
2447  }
2448`,np=(0,F.A)(eu.B)`
2449  &.bot-recalculate {
2450    svg {
2451      path {
2452        stroke: ${Q.w.colors.primaryBase||"#2685F1"} !important;
2453      }
2454    }
2455    &:hover {
2456      svg {
2457        path {
2458          stroke: #fff !important;
2459        }
2460      }
2461    }
2462  }
2463`,nv=(0,F.A)(eu.B)`
2464  border: 2px solid transparent;
2465`,ng=F.A.div`
2466  display: flex;
2467  padding-top: 10px;
2468  padding-bottom: 10px;
2469  .icon {
2470    width: 64px;
2471    height: 64px;
2472    margin-right: 16px;
2473    object-fit: contain;
2474    object-position: center;
2475  }
2476  .content {
2477    flex: 1;
2478    .title {
2479      margin-top: 0;
2480      margin-bottom: 0;
2481      font-size: inherit;
2482      font-weight: 700;
2483      line-height: 1.4;
2484    }
2485    .description {
2486      color: ${Q.w.colors.gray700||"#404040"};
2487      line-height: 1.4;
2488    }
2489  }
2490  ${G.M.mbDown} {
2491    .icon {
2492      width: 47px;
2493      height: 47px;
2494      margin-right: 16px;
2495    }
2496    .content {
2497      .title {
2498        font-size: 14px;
2499      }
2500      .description {
2501        font-size: 14px;
2502      }
2503    }
2504  }
2505`;(0,F.A)(eu.B)``;let nb=F.A.div`
2506  display: flex;
2507  align-items: flex-start;
2508  color: ${Q.w.colors.gray800||"#262626"};
2509  font-size: 22px;
2510  font-weight: 700;
2511  letter-space: -0.6px;
2512  line-height: 1.45;
2513  .number {
2514    margin-right: 3px;
2515  }
2516  .title {
2517    flex: 1;
2518  }
2519  ${G.M.tdDown} {
2520    font-size: 20px;
2521  }
2522  ${G.M.mbDown} {
2523    font-size: 18px;
2524  }
2525`,nf=F.A.div`
2526  display: flex;
2527  justify-content: center;
2528`,nh=F.A.div``,n_=F.A.div`
2529  padding: 12px 16px;
2530  border: 1px solid ${Q.w.colors.gray200||"#D9D9D9"};
2531  background-color: ${Q.w.colors.white||"#fff"};
2532  border-radius: ${Q.w.borderRadius};
2533  line-height: 1.5;
2534`,nE=F.A.div`
2535  border: ${Q.w.colors.gray200||"#D9D9D9"};
2536  background-color: ${Q.w.colors.white||"#FFF"};
2537  border-radius: ${Q.w.borderRadius};
2538  .intent-img {
2539    border-radius: ${Q.w.borderRadius};
2540    &.has-label {
2541      border-bottom-left-radius: 0px;
2542      border-bottom-right-radius: 0px;
2543    }
2544  }
2545  .intent-img-label {
2546    padding: 5px 10px;
2547    font-size: 0.8em;
2548    font-style: italic;
2549    font-weight: 400;
2550  }
2551`,nx=F.A.div`
2552  display: flex;
2553  .feature {
2554    width: 30%;
2555    .feature-wrapper {
2556      position: relative;
2557      display: block;
2558      overflow: hidden;
2559      width: 100%;
2560      padding-top: 66%;
2561      border-radius: ${Q.w.borderRadius};
2562      .feature-img {
2563        position: absolute;
2564        top: 50%;
2565        left: 50%;
2566        width: 100%;
2567        min-width: 100%;
2568        height: auto;
2569        min-height: 100%;
2570        transform: translate(-50%, -50%);
2571      }
2572    }
2573  }
2574  .body {
2575    flex: 1;
2576    margin-left: 10px;
2577    line-height: 1.5;
2578    a {
2579      color: ${Q.w.colors.gray800||"#262626"};
2580      text-decoration: none;
2581    }
2582  }
2583`,ny=F.A.div`
2584  display: flex;
2585  align-items: center;
2586  justify-content: space-between;
2587  padding: 20px 40px 20px 16px;
2588  background-color: #fff;
2589  border-radius: ${Q.w.borderRadius};
2590  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06),
2591    0px 0px 1px rgba(0, 0, 0, 0.04);
2592  .feature {
2593    display: block;
2594    overflow: hidden;
2595    width: 72px;
2596    height: 72px;
2597    margin-right: 16px;
2598    border-radius: ${Q.w.borderRadius};
2599    img {
2600      width: 100%;
2601      height: 100%;
2602      object-fit: cover;
2603      object-position: center;
2604    }
2605  }
2606  .title-container {
2607    display: flex;
2608    flex: 1;
2609    align-items: center;
2610    justify-content: space-between;
2611    a {
2612      font-size: 16px;
2613      line-height: 1.5em;
2614      text-decoration: none;
2615      .title {
2616        padding: 0;
2617        color: #262626;
2618        font-size: inherit;
2619        line-height: inherit;
2620      }
2621      &.link {
2622        display: flex;
2623        align-items: center;
2624        justify-content: center;
2625        margin-left: 20px;
2626        color: #2d87f3;
2627        font-weight: 700;
2628      }
2629    }
2630  }
2631  @media screen and (max-width: 769px) {
2632    padding: 16px 12px;
2633    .feature {
2634      width: 50px;
2635      height: 50px;
2636    }
2637    .title-container {
2638      a {
2639        font-size: 13px;
2640        line-height: 20px;
2641        &.link {
2642          margin-left: 10px;
2643        }
2644      }
2645    }
2646  }
2647`,nw=F.A.div`
2648  display: flex;
2649  align-items: center;
2650  justify-content: center;
2651`;F.A.div`
2652  padding: 16px;
2653  margin-top: 32px;
2654  margin-bottom: 32px;
2655  background-color: ${Q.w.colors.primary50||""};
2656  border-radius: ${Q.w.borderRadius};
2657  .item-grid {
2658    > div {
2659      box-shadow: none;
2660    }
2661  }
2662  .lp--affiliate-product {
2663    .arrow-left {
2664      left: -20px;
2665    }
2666    .arrow-right {
2667      right: -16px;
2668    }
2669  }
2670  .bullet-nav {
2671    bottom: -10px;
2672  }
2673`;let nI=F.A.div`
2674  width: ${({width:e})=>e||"100%"};
2675  padding: 8px;
2676  ${G.M.mbDown} {
2677    width: 100%;
2678  }
2679`,nS=F.A.div`
2680  display: flex;
2681  flex-wrap: wrap;
2682  align-items: flex-start;
2683  justify-content: center;
2684  margin: 0 -8px;
2685`,nC=F.A.div`
2686  width: ${({width:e})=>e||"100%"};
2687  padding: 4px;
2688  ${G.M.mbDown} {
2689    width: 100%;
2690  }
2691`,nO=F.A.div`
2692  display: flex;
2693  flex-wrap: wrap;
2694  align-items: flex-start;
2695  justify-content: center;
2696  margin: 0 -4px;
2697`,nk=F.A.div`
2698  margin-top: 20px;
2699`,SubotInlineIntent=({intents:e,indexNumber:t})=>{var n,i;let l=(0,h.useMemo)(()=>{let t=e&&e[0];return t||null},[]);return e.length?_().createElement(_().Fragment,null,l&&_().createElement(SubotInlineIntentBotTitle,{intent:l,indexNumber:t}),!!(null===(n=e.slice(1))||void 0===n?void 0:n.length)&&_().createElement(nk,null,_().createElement(nO,null,null===(i=e.slice(1))||void 0===i?void 0:i.map(e=>{let t=nN[null==e?void 0:e.type];return t&&_().createElement(t,{key:e.id,intent:e})})))):_().createElement(SubotInlineIntentBotTitle,{indexNumber:t})},SubotInlineIntentFinal=({intents:e})=>{let t=(0,h.useMemo)(()=>{let t=[],n=[],i=[];return null==e||e.map(e=>{switch(null==e?void 0:e.type){case E.N.BOT_MAIN_IMAGE:case E.N.BOT_MAIN_TITLE:case E.N.BOT_MAIN_BODY:case E.N.BOT_MAIN_BUTTON:case E.N.BOT_RECALCULATE:t.push(e);break;case E.N.BOT_SUB_TITLE:case E.N.BOT_SUB_BODY:n.push(e);break;default:i.push(e)}}),{mainIntents:t,subIntents:n,intents:i}},[]);if(!(null==e?void 0:e.length))return null;function renderIntent(e){let t=nN[null==e?void 0:e.type];return t?_().createElement(t,{key:e.id,intent:e}):null}return _().createElement(nO,null,_().createElement(nC,null,_().createElement(nS,null,t.mainIntents.map(renderIntent),t.subIntents.map(renderIntent),t.intents.map(renderIntent))))},SubotInlineIntentBotText=({intent:e})=>(null==e?void 0:e.label)?_().createElement(nC,null,_().createElement(n_,null,_().createElement(Markdown,null,null==e?void 0:e.label))):_().createElement(_().Fragment,null),SubotInlineIntentBotImage=({intent:e})=>{if(!e.url)return _().createElement(_().Fragment,null);let t=(()=>{try{return!!JSON.parse((null==e?void 0:e.label)||"")}catch(e){return!1}})();return _().createElement(nC,{width:"50%"},_().createElement(nE,null,_().createElement("img",{loading:"lazy",src:e.url,alt:e.label,className:`intent-img ${e.label&&"has-label"}`}),t&&_().createElement("h4",{className:"intent-img-label"},_().createElement(Markdown,null,e.label))))},SubotInlineIntentBotTitle=({intent:e,indexNumber:t})=>{let n=![E.N.SSO_INTENT].includes(null==e?void 0:e.type);return _().createElement(nh,null,_().createElement(nb,null,t&&_().createElement("div",{className:"number"},t<10?`0${t}`:t,"."),n&&e&&[E.N.BOT_TEXT,E.N.BOT_BUTTON].includes(null==e?void 0:e.type)&&_().createElement(Markdown,{className:"title"},e.label)),e&&[E.N.BOT_IMAGE].includes(null==e?void 0:e.type)&&_().createElement(nf,null,_().createElement(SubotInlineIntentBotImage,{intent:e})))},SubotInlineIntentBotMainTitle=({intent:e})=>e.label&&"Sub title"!==e.label&&"Main title"!==e.label?_().createElement(nI,null,_().createElement(nm,null,_().createElement(Markdown,null,e.label))):null,SubotInlineIntentBotMainBody=({intent:e})=>e.label&&"Main body"!==e.label&&"Sub body"!==e.label?_().createElement(nI,null,_().createElement("div",{className:"intents__item markdown"},_().createElement(Markdown,null,e.label))):null,nN={[E.N.BOT_TEXT]:SubotInlineIntentBotText,[E.N.BOT_IMAGE]:SubotInlineIntentBotImage,[E.N.BOT_BUTTON]:({intent:e})=>{let{trackingCommonInline:t}=(0,h.useContext)(tW);return(null==e?void 0:e.label)?_().createElement(nC,{width:"60%"},_().createElement(nv,Object.assign({size:"lg",color:"primary",onClick:()=>{window.location.href=e.url},isBlock:!0},t,{"data-event-action":"Click CTA","data-response-id":e.id}),_().createElement(Markdown,null,null==e?void 0:e.label))):_().createElement(_().Fragment,null)},[E.N.BOT_URL]:({intent:e})=>{let t=(0,h.useMemo)(()=>e.label.includes("{")?JSON.parse(e.label):{},[e.label]);return _().createElement(_().Fragment,null,!!Object.keys(t).length&&_().createElement(nC,null,_().createElement(nx,null,_().createElement("div",{className:"feature"},_().createElement("a",{href:null==t?void 0:t.url,className:"feature-wrapper"},_().createElement("img",{loading:"lazy",src:null==t?void 0:t.thumbnail,alt:null==t?void 0:t.t
2699itle,className:"feature-img"}))),_().createElement("div",{className:"body"},_().createElement("a",{href:null==t?void 0:t.url},_().createElement("h5",{className:"title"},_().createElement(Markdown,null,null==t?void 0:t.title)))))))},[E.N.BOT_RECALCULATE]:({intent:e})=>{let{onReset:t}=(0,h.useContext)(tW);return(null==e?void 0:e.label)?_().createElement(nC,{width:"auto",style:{justifyContent:"center",display:"flex"}},_().createElement(np,{size:"lg",color:"secondary",onClick:()=>{t&&t()},icon:_().createElement(RotateLeft,null),className:"bot-recalculate"},_().createElement(Markdown,null,null==e?void 0:e.label))):_().createElement(_().Fragment,null)},[E.N.BOT_MAIN_TITLE]:SubotInlineIntentBotMainTitle,[E.N.BOT_MAIN_IMAGE]:({intent:e})=>e.url?_().createElement(nI,null,_().createElement(nE,null,_().createElement("img",{loading:"lazy",src:e.url,alt:e.label,className:`intent-img ${e.label&&"has-label"}`}),e.label&&_().createElement("h4",{className:"intent-img-label"},_().createElement(Markdown,null,e.label)))):_().createElement(_().Fragment,null),[E.N.BOT_MAIN_BODY]:SubotInlineIntentBotMainBody,[E.N.BOT_MAIN_BUTTON]:({intent:e})=>{let{trackingCommonInline:t}=(0,h.useContext)(tW);return e.label?_().createElement(nC,{width:"auto"},_().createElement(nw,null,_().createElement(nv,Object.assign({size:"lg",color:"primary",onClick:()=>{window.location.href=e.url},className:"pointer-event-child-none"},t,{"data-event-action":"Click CTA","data-response-id":e.id}),_().createElement(Markdown,null,null==e?void 0:e.label)))):_().createElement(_().Fragment,null)},[E.N.BOT_SUB_TITLE]:SubotInlineIntentBotMainTitle,[E.N.BOT_SUB_BODY]:SubotInlineIntentBotMainBody,[E.N.BOT_LANDING_PAGE_URL]:SubotInlineIntentBotText,[E.N.BOT_LANDING_PAGE_BUTTON]:SubotInlineIntentBotText,[E.N.BOT_RISK_SCREEN]:({intent:e})=>{let{formatMessage:t}=(0,h.useContext)(k.T),n=(0,h.useMemo)(()=>e.label&&e.label.includes("{")?JSON.parse(e.label):{},[e,null==e?void 0:e.label]);return _().createElement(_().Fragment,null,!!(null==n?void 0:n.title)&&!!(null==n?void 0:n.thumbnail)&&!!(null==n?void 0:n.url)&&_().createElement(nI,null,_().createElement(ny,null,_().createElement("a",{href:null==n?void 0:n.url,className:"feature"},_().createElement("img",{loading:"lazy",src:null==n?void 0:n.thumbnail,alt:null==n?void 0:n.title})),_().createElement("div",{className:"title-container"},_().createElement("a",{href:null==n?void 0:n.url},_().createElement("h5",{className:"title"},null==n?void 0:n.title)),_().createElement("a",{href:null==n?void 0:n.url,className:"link"},t({id:"riskScreener.start",defaultMessage:"Start"}),_().createElement(ChevronRightActive,{style:{marginLeft:10}}))))))},[E.N.BOT_RELATED_ARTICLE]:({intent:e})=>{var t,n,i,l,o,a,r,s,d,c,u,m,p;let v=(0,h.useMemo)(()=>{if(e.label&&e.label.includes("{")){let t=JSON.parse(e.label);if(t.meta){let e={};t.meta.map(({key:t,value:n})=>{t&&n&&(e[t]=n)}),t.meta=Object.assign({},e)}return Object.assign({},t)}return{}},[e,null==e?void 0:e.label]);return _().createElement(_().Fragment,null,!!(null==v?void 0:v.title)&&!!(null==v?void 0:v.thumbnail)&&!!(null==v?void 0:v.url)&&!!(null==v?void 0:v.meta)&&!!(null===(t=null==v?void 0:v.meta)||void 0===t?void 0:t.post_modified)&&!!(null===(n=null==v?void 0:v.meta)||void 0===n?void 0:n.reviewed_display_name)&&!!(null===(i=null==v?void 0:v.meta)||void 0===i?void 0:i.reviewed_url)&&!!(null===(l=null==v?void 0:v.meta)||void 0===l?void 0:l.reviewed_avatar_thumbnail)&&!!(null===(o=null==v?void 0:v.meta)||void 0===o?void 0:o.category_url)&&!!(null===(a=null==v?void 0:v.meta)||void 0===a?void 0:a.category_name)&&_().createElement(nI,{width:"40%"},_().createElement(ef.d,{title:null==v?void 0:v.title,uploadTime:$()(null===(r=null==v?void 0:v.meta)||void 0===r?void 0:r.post_modified).format("DD/MM/YYYY"),authorName:null===(s=null==v?void 0:v.meta)||void 0===s?void 0:s.reviewed_display_name,authorLink:null===(d=null==v?void 0:v.meta)||void 0===d?void 0:d.reviewed_url,avatarImg:_().createElement("img",{loading:"lazy",src:null===(c=null==v?void 0:v.meta)||void 0===c?void 0:c.reviewed_avatar_thumbnail,alt:null===(u=null==v?void 0:v.meta)||void 0===u?void 0:u.reviewed_display_name}),categoryLink:null===(m=null==v?void 0:v.meta)||void 0===m?void 0:m.category_url,categoryName:null===(p=null==v?void 0:v.meta)||void 0===p?void 0:p.category_name,banner:_().createElement("img",{loading:"lazy",src:null==v?void 0:v.thumbnail,alt:null==v?void 0:v.title}),text:"",size:"sm",direction:"vertical"})))},[E.N.THANK_YOU_IMAGE]:({intent:e})=>e.url?_().createElement(nI,null,_().createElement(nE,null,_().createElement("img",{loading:"lazy",src:e.url,alt:e.label,className:`intent-img ${e.label&&"has-label"}`}),e.label&&_().createElement("h4",{className:"intent-img-label"},_().createElement(Markdown,null,e.label)))):_().createElement(_().Fragment,null),[E.N.THANK_YOU_TITLE]:({intent:e})=>e.label?_().createElement(nI,null,_().createElement(nm,null,_().createElement(Markdown,null,e.label))):_().createElement(_().Fragment,null),[E.N.THANK_YOU_BODY]:({intent:e})=>e.label?_().createElement(nI,null,_().createElement("div",{className:"intents__item markdown"},_().createElement(Markdown,null,e.label))):_().createElement(_().Fragment,null),[E.N.SSO_INTENT]:({intent:e})=>{let t=(()=>{try{return(null==e?void 0:e.label)?JSON.parse(null==e?void 0:e.label):{}}catch(e){return{}}})();return t&&t.title?_().createElement(nC,null,_().createElement(ng,null,_().createElement("img",{loading:"lazy",src:null==e?void 0:e.url,className:"icon",alt:""}),_().createElement("div",{className:"content"},_().createElement("h3",{className:"title"},t.title),_().createElement("div",{className:"description"},null==t?void 0:t.description)))):_().createElement(_().Fragment,null)}},SubotInlineNodeFinal=({node:e})=>{var t,n;let{nodes:i}=(0,h.useContext)(tW),{formatMessage:l}=(0,h.useContext)(k.T),o=(0,h.useRef)(null),a=(0,h.useRef)(null),[r,s]=(0,h.useState)(350),[d,c]=(0,h.useState)(!0),[u,m]=(0,h.useState)(!1),p=(0,h.useCallback)(()=>{ex.measure(()=>{var e;if(a.current){let t=null===(e=a.current)||void 0===e?void 0:e.getBoundingClientRect().height;r&&r<t?(s(t),m(!0)):(s(350),m(!1)),o.current&&o.current.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})}})},[r]);(0,h.useLayoutEffect)(()=>{ex.measure(()=>{a.current&&setTimeout(()=>{var e;let t=null===(e=a.current)||void 0===e?void 0:e.getBoundingClientRect().height;t&&r>t&&(c(!1),m(!1))},400)})},[]);let v=i[0],g=null===(t=null==v?void 0:v.extra_settings)||void 0===t?void 0:t.subot_type,b=(0,h.useMemo)(()=>{var t;return(null===(t=null==e?void 0:e.intents)||void 0===t?void 0:t.filter(e=>e.type===E.N.BOT_SUGGESTED_SERVICE))||[]},[]);return _().createElement(t2,null,_().createElement("div",{ref:o,className:"hhg-flag",style:{position:"absolute",top:-100,left:0,pointerEvents:"none"}}),_().createElement(t1,{maxHeight:r,isMore:u},_().createElement("div",{ref:a},_().createElement(SubotInlineIntentFinal,{intents:(null==e?void 0:e.intents)||[]}),b.length>0&&_().createElement("div",null,b.map(e=>{let t=e4[e.type||""];return t&&_().createElement(t,{key:e.id,intent:e})})))),d&&_().createElement(t0,null,_().createElement(tQ,{size:"md",color:"secondary",onClick:p},u?_().createElement(_().Fragment,null,l({id:"subotInline.showLess",defaultMessage:"Show less"}),_().createElement(ArrowUp,{style:{marginLeft:10}}
2699)):_().createElement(_().Fragment,null,l({id:"subotInline.showMore",defaultMessage:"Show more"}),_().createElement(ArrowDown,{style:{marginLeft:10}})))),g===E.h.voucherAcuvue&&_().createElement(SubotInlineVoucherLeftUI,{clientId:null===(n=v.extra_settings)||void 0===n?void 0:n.client_id,voucherAnswers:extractVoucherAnswers(i,v)}))},nT=F.A.span`
2700  display: inline-block;
2701  margin-top: 20px;
2702  color: ${Q.w.colors.primaryBase||"#2D87F3"};
2703  cursor: pointer;
2704  transition: 0.3 all ease;
2705  &:hover {
2706    color: ${Q.w.colors.primaryHover||"#2D87F3"};
2707  }
2708  ${G.M.tdDown} {
2709    margin-top: 16px;
2710  }
2711  ${G.M.mbDown} {
2712    margin-top: 12px;
2713  }
2714`,nM=F.A.div`
2715  max-width: 430px;
2716  margin-right: auto;
2717  margin-left: auto;
2718`,nA=F.A.div`
2719  padding: 44px 16px 32px;
2720  background-color: ${Q.w.colors.neutral50||"#F7F9FC"};
2721  border-radius: ${Q.w.borderRadius};
2722  position: relative;
2723  text-align: center;
2724  ${G.M.tdDown} {
2725    padding: 36px 16px 24px;
2726  }
2727  ${G.M.mbDown} {
2728    padding: 16px;
2729    border-radius: 0px;
2730  }
2731`,OTPInfoForm=({className:e,style:t,actions:n,countryCode:i,phoneNumber:l,areaCode:o,callBack:a})=>{let r=(0,h.useRef)(),[s,d]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),[m,p]=(0,h.useState)(!1),[v,g]=(0,h.useState)(!1),{register:b,formState:{errors:f},control:y,trigger:w,getValues:I,setValue:S}=(0,el.mN)(),{formatMessage:C,action:{pushNotifications:O}}=(0,h.useContext)(k.T),handleSendOTP=e=>(0,x._)(void 0,void 0,void 0,function*(){var t;e.preventDefault();let i=I(),l=(0,eo.parsePhoneNumber)(i.phone||"");if((null==l?void 0:l.nationalNumber)&&(null==l?void 0:l.countryCallingCode)){u(!0);try{let e=yield(0,k.c)(getSubotApiPath(ey.POST_SEND_OTP),"POST",{data:{phone_number:l.nationalNumber,area_code:`+${l.countryCallingCode}`}});if(u(!1),(null==e?void 0:e._status)===1){v&&(d(!1),r.current.reset()),g(!0),setTimeout(()=>{let e=document.querySelector(".input-otp-code");e&&(e.focus(),e.scrollIntoView({block:"center"}))},100);return}if((null==e?void 0:e._status)===0&&(null===(t=null==e?void 0:e._messages)||void 0===t?void 0:t[0])==="This phone number was verified"){r.current&&r.current.cancel(),O({title:"",message:"Số điện thoại n\xe0y đ\xe3 được x\xe1c minh.",type:"success"});let e=n.find(e=>e.type===E.f.USER_SUBMIT_SEND);e&&a(e,i.phone);return}throw Error()}catch(e){u(!1),r.current&&r.current.cancel(),showMessageSomethingWrong()}}}),handleOnVerify=(e,t)=>(0,x._)(void 0,void 0,void 0,function*(){if(e.preventDefault(),p(!0),yield w(),ei()(f)){let e=I(),{number:n}=e,i=(0,eo.parsePhoneNumber)(e.phone||"");if((null==i?void 0:i.nationalNumber)&&(null==i?void 0:i.countryCallingCode))try{let l=yield(0,k.c)(getSubotApiPath(ey.POST_VERIFY_OTP),"POST",{data:{phone_number:i.nationalNumber,area_code:`+${i.countryCallingCode}`,code:n}});if(p(!1),(null==l?void 0:l._status)===1){O({title:"",message:C({id:"subot.verifyOTP.success.message"}),type:"success"}),a(t,e.phone);return}throw Error()}catch(e){O({title:"",message:C({id:"validation.error.validOTP"}),type:"danger"}),p(!1)}}else p(!1)}),showMessageSomethingWrong=()=>{O({title:"",message:C({id:"notification.comment.somethingWrong"}),type:"danger"})},renderFormInput=e=>{if(!e.key)return null;switch(e.type){case E.f.USER_SUBMIT_PHONE:return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement(el.xI,{name:e.key,control:y,rules:{required:!0,validate:e=>(0,eo.isPossiblePhoneNumber)(e)},render:({field:{onChange:t,value:n}})=>{let o=!s&&v||c;return _().createElement(to,null,_().createElement(PhoneInputWithCode,{value:n,defaultValue:l,onChange:t,defaultCountry:i,id:e.id,className:`input-row ${e.id}`,name:e.key,disabled:o,flagComponent:FlagComponent,placeholder:e.label}),o&&_().createElement(IconEdit,{viewBox:"0 0 24 24",className:"icon-edit-phone",onClick:()=>{var e;t(""),g(!1),p(!1),null===(e=r.current)||void 0===e||e.cancel()}}),e.key&&f[e.key]&&_().createElement("p",{className:"error-message"},C({id:"validation.error.validNumber",defaultMessage:"Please enter a valid number."})),_().createElement("div",{className:"submit-btn-row",key:e.id},_().createElement(eu.B,{className:"submit-btn",size:"lg",onClick:handleSendOTP,isDisabled:!s&&v||c,isLoading:c},v?_().createElement(ti,{ref:r,isFinished:s,onFinish:d}):_().createElement("span",null,C({id:"subot.sendOTP.button",defaultMessage:"Send OTP"})))))}}));case E.f.USER_SUBMIT_NUMBER:if(!v)return"";return _().createElement("div",{className:"input-row",key:e.id},_().createElement("label",{htmlFor:e.key},e.label),_().createElement("input",Object.assign({type:"tel",id:e.id,placeholder:e.label},b(e.key,{required:!0,pattern:/^[0-9]{0,6}$/}),{className:"input-otp-code"})),f[e.key]&&_().createElement("p",{className:"error-message"},C({id:"validation.error.validOTP",defaultMessage:"Invalid OTP provided"}
2731)));default:return""}},renderFormSubmitAndTerms=e=>e.type===E.f.USER_SUBMIT_SEND&&v?_().createElement("div",{className:"submit-btn-row",key:e.id},_().createElement(eu.B,{className:"submit-btn",size:"lg",isDisabled:m,isLoading:m,onClick:t=>handleOnVerify(t,e)},e.label)):"";return(0,h.useEffect)(()=>{if(l){let e=n.find(e=>e.type===E.f.USER_SUBMIT_PHONE);e&&e.key&&S(e.key,`+${o}${l}`)}},[l,o]),_().createElement(tl,{className:e,style:t},_().createElement("form",{className:"user-info-form"},n.map(e=>renderFormInput(e)),n.map(e=>renderFormSubmitAndTerms(e))))},useVerifyPhoneNumber=()=>{let e=null===k.G||void 0===k.G?void 0:k.G.userInfo,[t,n]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{(null==e?void 0:e.phone)&&e.phone_verified_at&&e.verify_phone_code&&n(!0)},[e]),t},n$={TEXT:({node:e,indexNumber:t})=>{let{formatMessage:n,action:{pushNotifications:i}}=(0,h.useContext)(k.T),{nodes:l,activeId:o,params:a,onSubmit:r,onPrev:s,onNext:d,onChange:c}=(0,h.useContext)(tW),[u,m]=(0,h.useState)((null==e?void 0:e._message)||{}),handleOnChangeNormal=t=>(0,x._)(void 0,void 0,void 0,function*(){let n=Object.assign(Object.assign(Object.assign(Object.assign({},a),u),{node_id:e.id,action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key}),getCurrentTotalDynamicScore(l,o,t.id));delete n.form_submit_meta;let i=yield subotInlineMessage(n);if((null==i?void 0:i._status)===1){let e=null==i?void 0:i._data,{node:t}=e,l=(0,x.a)(e,["node"]),o=Object.assign(Object.assign({},t),{_message:Object.assign(Object.assign({},l),{node_id:t.id})});r&&r(o,n)}});return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tK,null,_().createElement(SubotInlineAction,{value:(null==u?void 0:u.action_id)?[null==u?void 0:u.action_id]:[],actions:null==e?void 0:e.actions,onChange:(e,t)=>
2731(0,x._)(void 0,void 0,void 0,function*(){if(!e)return;let n=(null==e?void 0:e.type)===E.f.USER_CHOICE_TEXT_BY_INPUT||(null==e?void 0:e.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT,i=Object.assign(Object.assign({},u),{action_id:null==e?void 0:e.id,action_value:null==e?void 0:e.key,form_submit_meta:t});if(n){m(i),null==c||c(i);return}delete i.form_submit_meta,m(i),handleOnChangeNormal(e)}),formSubmitMeta:null==u?void 0:u.form_submit_meta}))),_().createElement(nd,{onBack:()=>s&&s(),backProps:{isDisabled:!(1!==t)},onNext:()=>{let t=JSON.parse(JSON.stringify(Object.assign(Object.assign(Object.assign({},a),null==e?void 0:e._message),u)));if((null==u?void 0:u.action_id)&&(null==u?void 0:u.action_value)===eN){null==d||d(t);return}(null==u?void 0:u.action_id)&&(null==u?void 0:u.action_value)?(delete t.form_submit_meta,null==d||d(t)):i({title:"",message:n({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"})}}))},IMAGE:({node:e,indexNumber:t})=>{let{formatMessage:n,action:{pushNotifications:i}}=(0,h.useContext)(k.T),{params:l,onSubmit:o,onPrev:a,onNext:r}=(0,h.useContext)(tW),[s,d]=(0,h.useState)((null==e?void 0:e._message)||{});return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tK,null,_().createElement(SubotInlineAction,{node_type:null==e?void 0:e.type,value:(null==s?void 0:s.action_id)?[null==s?void 0:s.action_id]:[],actions:null==e?void 0:e.actions,onChange:t=>(0,x._)(void 0,void 0,void 0,function*(){if(t){d(Object.assign(Object.assign({},s),{action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key}));let n=Object.assign(Object.assign(Object.assign({},l),s),{node_id:e.id,action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key}),i=yield subotInlineMessage(n);if((null==i?void 0:i._status)===1){let e=null==i?void 0:i._data,{node:t}=e,l=(0,x.a)(e,["node"]),a=Object.assign(Object.assign({},t),{_message:Object.assign(Object.assign({},l),{node_id:t.id})});o&&o(a,n)}}})}))),_().createElement(nd,{onBack:()=>a&&a(),backProps:{isDisabled:!(1!==t)},onNext:()=>{var t;(null==e?void 0:e._message)&&(null===(t=e._message)||void 0===t?void 0:t.action_id)?r&&r(Object.assign(Object.assign(Object.assign({},l),s),null==e?void 0:e._message)):i({title:"",message:n({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"})}}))},FORM:({node:e,indexNumber:t})=>{var n;let{data:{locale:i}}=(0,h.useContext)(k.T),{params:l,onPrev:o,onSubmit:a,trackingCommonInline:r,nodes:s,activeId:d}=(0,h.useContext)(tW);return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tY,null,_().createElement(UserInfoForm,{botId:l.bot_id,nodeId:String(null==e?void 0:e.id),className:"form",actions:(null==e?void 0:e.actions)||[],formSubmitMeta:(null===(n=null==e?void 0:e._message)||void 0===n?void 0:n.form_submit_meta)||null,callBack:t=>(0,x._)(void 0,void 0,void 0,function*(){let n=yield subotInlineMessage(Object.assign(Object.assign(Object.assign(Object.assign({},l),e._message),t),getCurrentTotalDynamicScore(s,d,t.action_id,t.form_submit_meta)));if((null==n?void 0:n._status)===1){let i=null==n?void 0:n._data,{node:l}=i,o=(0,x.a)(i,["node"]),r=Object.assign(Object.assign({},l),{_message:Object.assign(Object.assign({},o),{node_id:l.id})});a&&a(r,Object.assign(Object.assign({},e._message),t))}}),countryCode:(null==i?void 0:i.split("-")[1])||"PH",trackingSubmitBtn:Object.assign(Object.assign({},r),{"data-event-action":"Submit"})}))),_().createElement(nd,{onBack:()=>o&&o(),backProps:{isDisabled:!(1!==t)},hideNext:!0}))},CONDITION:({node:e,indexNumber:t})=>{let{formatMessage:n,action:{pushNotifications:i}}=(0,h.useContext)(k.T),{params:l,onChange:o,onSubmit:a,onPrev:r,onNext:s,nodes:d,activeId:c}=(0,h.useContext)(tW),[u,m]=(0,h.useState)((null==e?void 0:e._message)||{}),handleOnChangeNormal=e=>(0,x._)(void 0,void 0,void 0,function*(){let t=Object.assign(Object.assign(Object.assign(Object.assign({},l),u),{action_id:null==e?void 0:e.id,action_value:null==e?void 0:e.key}),getCurrentTotalDynamicScore(d,c,e.id));delete t.form_submit_meta;let n=yield subotInlineMessage(t);if((null==n?void 0:n._status)===1){let e=null==n?void 0:n._data,{node:i}=e,l=(0,x.a)(e,["node"]),o=Object.assign(Object.assign({},i),{_message:Object.assign(Object.assign({},l),{node_id:i.id})});delete o._message.form_submit_meta,a&&a(o,t)}});return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tK,null,_().createElement(SubotInlineAction,{value:(null==u?void 0:u.action_id)?[null==u?void 0:u.action_id]:[],actions:null==e?void 0:e.actions,onChange:(e,t)=>
2731(0,x._)(void 0,void 0,void 0,function*(){if(!e)return;let n=(null==e?void 0:e.type)===E.f.USER_CHOICE_TEXT_BY_INPUT||(null==e?void 0:e.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT,i=Object.assign(Object.assign({},u),{action_id:null==e?void 0:e.id,action_value:null==e?void 0:e.key,form_submit_meta:t});if(n){m(i),null==o||o(i);return}delete i.form_submit_meta,m(i),handleOnChangeNormal(e)}),formSubmitMeta:null==u?void 0:u.form_submit_meta}))),_().createElement(nd,{onBack:()=>r&&r(),backProps:{isDisabled:!(1!==t)},onNext:()=>{let t=JSON.parse(JSON.stringify(Object.assign(Object.assign(Object.assign({},l),null==e?void 0:e._message),u)));if((null==u?void 0:u.action_id)&&(null==u?void 0:u.action_value)===eN){null==s||s(t);return}(null==u?void 0:u.action_id)&&(null==u?void 0:u.action_value)?(delete t.form_submit_meta,null==s||s(t)):i({title:"",message:n({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"})}}))},FINAL_STANDARD:SubotInlineNodeFinal,FINAL:SubotInlineNodeFinal,FINAL_THANK_YOU:({node:e})=>{var t;let{params:n,onNext:i}=(0,h.useContext)(tW),l=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e===E.f.RESULT_BUTTON);return n||null},[null==e?void 0:e.actions]),o=(0,h.useCallback)(()=>{i&&i(Object.assign(Object.assign(Object.assign({},n),null==e?void 0:e._message),{action_id:null==l?void 0:l.id,action_value:null==l?void 0:l.key}))},[l]);return _().createElement(nA,null,_().createElement(nM,null,null===(t=null==e?void 0:e.intents)||void 0===t?void 0:t.map(e=>{let t=nN[null==e?void 0:e.type];return t&&_().createElement(t,{key:e.id,intent:e})}),l&&_().createElement(nT,{onClick:o},null==l?void 0:l.label)))},SSO:({node:e,indexNumber:t})=>{let n=(0,h.useRef)(!1),{params:i,onPrev:l,nodes:o,activeId:a,userInfo:r}=(0,h.useContext)(tW);(0,h.useEffect)(()=>{var t;let i=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(e=>e.type===E.f.ACTION_SSO_REDIRECT);(null==r?void 0:r.id)&&i&&!n.current&&(n.current=!0,handleOnChange(i))},[null==r?void 0:r.id]);let{formatMessage:s}=(0,h.useContext)(k.T),handleOnChange=t=>{if(t&&t.type===E.f.ACTION_SSO_REDIRECT){let n={params:Object.assign(Object.assign(Object.assign({},i),null==e?void 0:e._message),{action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key,mode:"inline"}),listNodes:o,activeId:a,createdAt:new Date().getTime(),botId:i.bot_id};localStorage.setItem(eT,JSON.stringify(n));let l=(0,ev.g)(window.location.href,{botItem:o[0]});l.searchParams.set("bot_id",String(i.bot_id)),l.searchParams.set("mode","inline"),l.searchParams.set("source","subot-inline");let r=l.href;(0,ep.I)()?ep.u.getState().triggerLogin({returnUrl:r,source:"subot-inline"}):window.location.href=`${y.l}?returnUrl=${encodeURIComponent(r)}`}};return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:[...(null==e?void 0:e.intents)||[],...(0,M.s)(s)],indexNumber:t})),_().createElement(tK,null,_().createElement(SubotInlineAction,{actions:null==e?void 0:e.actions,onChange:handleOnChange}))),_().createElement(nd,{onBack:()=>l&&l(),backProps:{isDisabled:!(1!==t)},hideNext:!0}))},MULTIPLE:({node:e,indexNumber:t})=>{let{params:n,onChange:i,onPrev:l,onNext:o}=(0,h.useContext)(tW),{formatMessage:a,action:{pushNotifications:r}}=(0,h.useContext)(k.T),[s,d]=(0,h.useState)((null==e?void 0:e._message)||{}),c=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e==E.f.ACTION_MULTIPLE_BUTTON);return n||null},[null==e?void 0:e.actions]),u=(0,h.useMemo)(()=>(null==s?void 0:s.selected_actions)?Object.keys(null==s?void 0:s.selected_actions):[],[s,null==s?void 0:s.selected_actions]),validateSelectActions=(t,n)=>{let i=Object.keys(t);if(i.length){if((null==e?void 0:e.multi_select_option)===E.g.RANGE&&i.length<(null==e?void 0:e.from)){r({title:"",message:a({id:"multiSelectError.range",defaultMessage:"You must choose from {from} to {to} answers (Ex: You must choose from 3 to 5 answers)"},{from:e.from,to:e.to}),type:"warning"});return}if((null==e?void 0:e.multi_select_option)===E.g.EXACT_NUMBER&&i.length!==(null==e?void 0:e.from)){r({message:a({id:"multiSelectError.exactNumber",defaultMessage:"You must choose {from} answers."},{from:e.from}),type:"warning"});return}n()}
2731else{r({title:"",message:a({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"});return}},m=(0,h.useCallback)(()=>{validateSelectActions((null==s?void 0:s.selected_actions)||{},()=>{o&&o(Object.assign(Object.assign(Object.assign(Object.assign({},n),null==e?void 0:e._message),s),{node_id:e.id}))})},[s,null==s?void 0:s.selected_actions,o]);return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tK,null,_().createElement(SubotInlineAction,{value:u,actions:null==e?void 0:e.actions,onChange:(e,t)=>(0,x._)(void 0,void 0,void 0,function*(){var n,l;if(e){let o=JSON.parse(JSON.stringify(Object.assign(Object.assign({},s),{action_id:null==c?void 0:c.id,action_value:null==c?void 0:c.key,selected_actions:Object.assign({},null==s?void 0:s.selected_actions)})));if((null==e?void 0:e.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT||(null==e?void 0:e.type)===E.f.USER_CHOICE_TEXT_BY_INPUT){let l=(null==o?void 0:o.selected_actions)&&e.id in o.selected_actions;l?t?o.form_submit_meta=t:(delete o.form_submit_meta,null===(n=o.selected_actions)||void 0===n||delete n[e.id]):(null==e?void 0:e.id)&&(o.selected_actions=Object.assign(Object.assign({},o.selected_actions),{[e.id]:e.key||""})),d(o),null==i||i(o);return}if(!(null===(l=o.selected_actions)||void 0===l?void 0:l[e.id])){o.selected_actions=Object.assign(Object.assign({},o.selected_actions),{[e.id]:e.key||""}),i&&i(o),d(o);return}if(o.selected_actions[e.id]){delete o.selected_actions[e.id],i&&i(o),d(o);return}}}),htmlType:"checkbox",formSubmitMeta:null==s?void 0:s.form_submit_meta}))),_().createElement(nd,{onBack:()=>l&&l(),backProps:{isDisabled:!(1!==t)},nextText:c?null==c?void 0:c.label:"",onNext:m}))},POLL:({node:e,indexNumber:t})=>{var n,i;let{params:l,onChange:o,onPrev:a,onNext:r}=(0,h.useContext)(tW),[s,d]=(0,h.useState)((null==e?void 0:e._message)||{}),c=useValidationMultiOption(),u=useDescriptionPollNode({node:e}),m=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e==E.f.POLL_BUTTON);return n||null},[null==e?void 0:e.actions]),handleOnChange=(t,n)=>{var i,l,a,r,c,u,p;let v=JSON.parse(JSON.stringify(Object.assign(Object.assign({},s),{node_id:e.id,action_id:null==m?void 0:m.id,action_value:null==m?void 0:m.key,form_submit_meta:[...(null==s?void 0:s.form_submit_meta)||[]]})));if((null==t?void 0:t.type)===E.f.POLL_CHOICE_TEXT_BY_INPUT||(null==t?void 0:t.type)===E.f.USER_CHOICE_TEXT_BY_INPUT){let e=null===(i=v.form_submit_meta)||void 0===i?void 0:i.some(({action_id:e})=>e===t.id);e?v.form_submit_meta=void 0===n?null===(l=v.form_submit_meta)||void 0===l?void 0:l.filter(({action_id:e})=>e!==t.id):null===(a=v.form_submit_meta)||void 0===a?void 0:a.filter(({action_id:e})=>e!==t.id).concat(n):v.form_submit_meta=null===(r=v.form_submit_meta)||void 0===r?void 0:r.concat([{key:null==t?void 0:t.key,control:E.E[null==t?void 0:t.type]||"text",value:"",action_id:null==t?void 0:t.id}]),d(v),null==o||o(v);return}let g=null===(c=v.form_submit_meta)||void 0===c?void 0:c.some(({action_id:e})=>e===(null==t?void 0:t.action_id));g?v.form_submit_meta=null===(u=v.form_submit_meta)||void 0===u?void 0:u.filter(({action_id:e})=>e!==(null==t?void 0:t.action_id)):v.form_submit_meta=null===(p=v.form_submit_meta)||void 0===p?void 0:p.concat([t]),d(v),null==o||o(v)},p=(0,h.useMemo)(()=>(null==s?void 0:s.form_submit_meta)?null==s?void 0:s.form_submit_meta.map(({action_id:e})=>e):[],[s,null==s?void 0:s.form_submit_meta]);return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tZ,null,u),_().createElement(tK,null,(null==e?void 0:e.actions)&&!!(null===(n=e.actions)||void 0===n?void 0:n.length)&&_().createElement(nl,null,null===(i=null==e?void 0:e.actions.filter(({type:e})=>e!==E.f.POLL_BUTTON))||void 0===i?void 0:i.map(e=>{let t=ns[null==e?void 0:e.type];return t&&_().createElement(t,{key:e.id,active:p.includes(e.id),action:e,onChange:handleOnChange,htmlType:"checkbox",formSubmitMeta:null==s?void 0:s.form_submit_meta})})))),_().createElement(nd,{onBack:()=>a&&a(),backProps:{isDisabled:!(1!==t)},nextText:m?null==m?void 0:m.label:"",onNext:()=>{let t={};s.form_submit_meta&&s.form_submit_meta.length&&(t[e.id]=s.form_submit_meta.map(e=>e.action_id));let n=Object.assign(Object.assign({}
2731,s),{current_polls:t});c.validateSelectActions(p,e,()=>{r&&r(Object.assign(Object.assign(Object.assign({},l),null==e?void 0:e._message),n))})}}))},RATING:({node:e,indexNumber:t})=>{var n,i;let{formatMessage:l,action:{pushNotifications:o}}=(0,h.useContext)(k.T),{params:a,onChange:r,onSubmit:s,onPrev:d,onNext:c}=(0,h.useContext)(tW),[u,m]=(0,h.useState)((null==e?void 0:e._message)||{}),[p,v]=(0,h.useState)(!1),g=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e===E.f.RATING_STAR);if(u.form_submit_meta&&n){let e=null==u?void 0:u.form_submit_meta.findIndex(({action_id:e})=>e===(null==n?void 0:n.id));if(-1!==e)return parseInt(null==u?void 0:u.form_submit_meta[e].value)}return 0},[null==u?void 0:u.form_submit_meta]),b=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e==E.f.RATING_BUTTON);return n||null},[]),handleOnChange=t=>(0,x._)(void 0,void 0,void 0,function*(){if(t){let n=Object.assign(Object.assign(Object.assign({},a),u),{node_id:e.id,action_id:null==b?void 0:b.id,action_value:null==b?void 0:b.key,form_submit_meta:(null==u?void 0:u.form_submit_meta)?[...null==u?void 0:u.form_submit_meta]:[]}),i=[...null==n?void 0:n.form_submit_meta],l=i.findIndex(({action_id:e})=>e===t.action_id);-1!==l?i[l]=Object.assign({},t):i.push(t),n.form_submit_meta=[...i],m(n),r&&r(n)}});return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tK,null,(null==e?void 0:e.actions)&&!!(null===(n=e.actions)||void 0===n?void 0:n.length)&&_().createElement(nl,null,null===(i=null==e?void 0:e.actions.filter(({type:e})=>e!==E.f.RATING_BUTTON))||void 0===i?void 0:i.map(e=>{var t;let n=ns[null==e?void 0:e.type];return n&&_().createElement(n,{key:e.id,action:e,onChange:handleOnChange,value:u&&(null==u?void 0:u.form_submit_meta)&&(null===(t=u.form_submit_meta)||void 0===t?void 0:t.find(({action_id:t})=>t===e.id))})})))),_().createElement(nd,{onBack:()=>d&&d(),backProps:{isDisabled:!(1!==t)},nextText:b?null==b?void 0:b.label:"",onNext:()=>(0,x._)(void 0,void 0,void 0,function*(){if(!u.form_submit_meta||0===g){o({title:"",message:l({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"});return}if(p)c&&c(Object.assign(Object.assign(Object.assign({},a),u),null==e?void 0:e._message));else{let t=Object.assign(Object.assign(Object.assign({},a),null==e?void 0:e._message),u),n=yield subotInlineMessage(t);if((null==n?void 0:n._status)===1){let e=null==n?void 0:n._data,{node:i}=e,l=(0,x.a)(e,["node"]),o=Object.assign(Object.assign({},i),{_message:Object.assign(Object.assign({},l),{node_id:i.id})});s&&s(o,t),v(!0)}}})}))},REACTION:({node:e,indexNumber:t})=>{let{formatMessage:n,action:{pushNotifications:i}}=(0,h.useContext)(k.T),{params:l,onSubmit:o,onPrev:a,onNext:r}=(0,h.useContext)(tW),[s,d]=(0,h.useState)((null==e?void 0:e._message)||{});return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tK,null,_().createElement(SubotInlineAction,{value:(null==s?void 0:s.action_id)?[null==s?void 0:s.action_id]:[],actions:(null==e?void 0:e.actions)||[],onChange:t=>(0,x._)(void 0,void 0,void 0,function*(){if(t){d(Object.assign(Object.assign({},s),{action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key}));let n=Object.assign(Object.assign(Object.assign({},l),s),{node_id:e.id,action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key}),i=yield subotInlineMessage(n);if((null==i?void 0:i._status)===1){let e=null==i?void 0:i._data,{node:t}=e,l=(0,x.a)(e,["node"]),a=Object.assign(Object.assign({},t),{_message:Object.assign(Object.assign({},l),{node_id:t.id})});o&&o(a,n)}}})}))),_().createElement(nd,{onBack:()=>a&&a(),backProps:{isDisabled:!(1!==t)},onNext:()=>{var t;(null==e?void 0:e._message)&&(null===(t=e._message)||void 0===t?void 0:t.action_id)?r&&r(Object.assign(Object.assign(Object.assign({},l),s),null==e?void 0:e._message)):i({title:"",message:n({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"})}}))},REVIEW:({node:e,indexNumber:t})=>{let{formatMessage:n,action:{pushNotifications:i}}=(0,h.useContext)(k.T),{params:l,onChange:o,onSubmit:a,onPrev:r,onNext:s}=(0,h.useContext)(tW),[d,c]=(0,h.useState)((null==e?void 0:e._message)||{}),[u,m]=(0,h.useState)(!1),p=(0,h.useMemo)(()=>{var t;return(null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.filter(({type:e})=>e===E.f.REVIEW_CHOICE))||[]},[null==e?void 0:e.actions]),v=(0,h.useMemo)(()=>{var t;return(null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.filter(({type:e})=>e===E.f.REVIEW_DESCRIPTION))||[]},[null==e?void 0:e.actions]),g=(0,h.useMemo)(()=>{var t;let n=null===(t=null==e?void 0:e.actions)||void 0===t?void 0:t.find(({type:e})=>e==E.f.REVIEW_BUTTON);return n||null},[null==e?void 0:e.actions]),b=(0,h.useMemo)(()=>(null==d?void 0:d.form_submit_meta)?null==d?void 0:d.form_submit_meta.map(({action_id:e})=>e).filter(e=>!!(null==p?void 0:p.map(({id:e})=>e).includes(e))):[],[d,null==d?void 0:d.form_submit_meta]),handleOnClick=t=>{if(t){let n=Object.assign(Object.assign(Object.assign({},l),d),{node_id:e.id,action_id:null==g?void 0:g.id,action_value:null==g?void 0:g.key,form_submit_meta:(null==d?void 0:d.form_submit_meta)?[...null==d?void 0:d.form_submit_meta]:[]}),i=[...null==n?void 0:n.form_submit_meta],a=i.findIndex(({action_id:e})=>e===t.action_id);-1!==a?i=[...i.slice(0,a),...i.slice(a+1)]:i.push(t),n.form_submit_meta=[...i],c(n),m(!1),o&&o(n)}},handleOnChange=t=>{if(t){let n=Object.assign(Object.assign(Object.assign({},l),d),{node_id:e.id,action_id:null==g?void 0:g.id,action_value:null==g?void 0:g.key,form_submit_meta:(null==d?void 0:d.form_submit_meta)?[...null==d?void 0:d.form_submit_meta]:[]}),i=[...null==n?void 0:n.form_submit_meta],a=i.findIndex(({action_id:e})=>e===t.action_id);-1!==a?i[a]=Object.assign({},t):i.push(t),n.form_submit_meta=[...i],c(n),m(!1),o&&o(n)}};return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tK,null,!!p.length&&_().createElement(tJ,null,_().createElement(nl,{className:"review-container"},p.map(e=>{var t;let n=ns[null==e?void 0:e.type];return n&&_().createElement(n,{key:e.id,action:e,onChange:handleOnClick,active:d&&!!(null===(t=null==d?void 0:d.form_submit_meta)||void 0===t?void 0:t.find(({action_id:t})=>t===e.id))||!1})}))),!!(null==v?void 0:v.length)&&_().createElement(nl,null,v.map(e=>{var t;let n=ns[null==e?void 0:e.type];return n&&_().createElement(n,{key:e.id,action:e,onChange:handleOnChange,value:d&&(null==d?void 0:d.form_submit_meta)&&(null===(t=d.form_submit_meta)||void 0===t?void 0:t.find(({action_id:t})=>t===e.id))})})))),_().createElement(nd,{onBack:()=>r&&r(),backProps:{isDisabled:!(1!==t)},nextText:g?null==g?void 0:g.label:"",onNext:()=>(0,x._)(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null==e?void 0:e._message)||void 0===t?void 0:t.form_submit_meta)||!b.length){i({title:"",message:n({id:"multiSelectError.required",defaultMessage:"There is no answer!"}),type:"warning"});return}if(u)s&&s(Object.assign(Object.assign(Object.assign({},l),d),null==e?void 0:e._message));else{let t=Object.assign(Object.assign(Object.assign({},l),null==e?void 0:e._message),d),n=yield subotInlineMessage(t);if((null==n?void 0:n._status)===1){let e=null==n?void 0:n._data,{node:i}=e,l=(0,x.a)(e,["node"]),o=Object.assign(Object.assign({},i),{_message:Object.assign(Object.assign({},l),{node_id:i.id})});a&&a(o,t),m(!0)}}})}))},RESULT_POLL:({node:e})=>{var t,n;return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[]})),_().createElement(tK,null,(null==e?void 0:e.actions)&&!!(null===(t=e.actions)||void 0===t?void 0:t.length)&&_().createElement(nl,null,null===(n=null==e?void 0:e.actions.filter(({type:e})=>e!==E.f.POLL_BUTTON))||void 0===n?void 0:n.map(t=>{let n=ns[null==t?void 0:t.type];return n&&_().createElement(n,{key:t.id,action:t,htmlType:"checkbox",node_type:null==e?void 0:e.type})})))))},OTP:({node:e,indexNumber:t})=>{let{params:n,onPrev:i,onNext:l}=(0,h.useContext)(tW),o=null===k.G||void 0===k.G?void 0:k.G.userInfo,a=null===k.G||void 0===k.G?void 0:k.G.locale,[r,s]=(0,h.useState)((null==e?void 0:e._message)||{}),d=useVerifyPhoneNumber();return _().createElement(t5,null,_().createElement(nu,null),_().createElement(t6,null,_().createElement(tX,null,_().createElement(SubotInlineIntent,{intents:(null==e?void 0:e.intents)||[],indexNumber:t})),_().createElement(tK,null,_().createElement(OTPInfoForm,{phoneNumber:null==o?void 0:o.phone,verified:d,areaCode:null==o?void 0:o.area_code,callBack:(t,i)=>{var o;let a=null===(o=null==e?void 0:e.actions)||void 0===o?void 0:o.find(({type:e})=>e===E.f.USER_SUBMIT_PHONE);if(!t||!a)return;let d=[{key:String(a.key),control:E.E[E.f.USER_SUBMIT_PHONE],value:i}],c=Object.assign(Object.assign({},r),{form_submit_meta:d,action_id:null==t?void 0:t.id,action_value:null==t?void 0:t.key});s(c),l&&l(Object.assign(Object.assign(Object.assign({},n),c),null==e?void 0:e._message))},actions:(null==e?void 0:e.actions)||[],countryCode:(null==a?void 0:a.split("-")[1])||"PH"}))),_().createElement(nd,{onBack:()=>i&&i(),backProps:{isDisabled:!(1!==t)},hideNext:!0}))}},nP=(0,F.A)(eu.B)`
2732  margin-top: 24px;
2733  ${G.M.mbUp} {
2734    margin-top: 16px;
2735  }
2736`,nB=F.A.div`
2737  margin-top: 24px;
2738`,nL=(0,F.A)(eh.T)`
2739  text-align: center;
2740  ${G.M.mbUp} {
2741    text-align: left;
2742  }
2743`,nj=(0,F.A)(e_.H)`
2744  text-align: center;
2745  margin-bottom: 8px;
2746
2747  ${G.M.mbUp} {
2748    margin-bottom: 0;
2749    text-align: left;
2750  }
2751`,nU=F.A.div`
2752  background-color: #ffffff;
2753  border-radius: 50%;
2754  width: 120px;
2755  height: 120px;
2756  object-fit: contain;
2757  overflow: hidden;
2758  flex-shrink: 0;
2759
2760  img {
2761    width: 100%;
2762    height: 100%;
2763    object-fit: cover;
2764  }
2765`,nR=F.A.div`
2766  flex-grow: 1;
2767  ${G.M.tdDown} {
2768    width: 100%;
2769    margin-left: 0;
2770  }
2771`,nD=F.A.div`
2772  position: relative;
2773  display: flex;
2774  gap: 24px;
2775  ${G.M.mbDown} {
2776    flex-wrap: wrap;
2777    justify-content: center;
2778  }
2779`,nF=F.A.div`
2780  position: relative;
2781  overflow: hidden;
2782  background-color: ${Q.w.colors.primary50};
2783  padding: 32px;
2784  border-radius: ${Q.w.borderRadius};
2785  background-image: url('/images/subot-bg-transparent.png');
2786  background-size: contain;
2787  background-repeat: repeat-y;
2788  ${G.M.mbDown} {
2789    padding: 24px;
2790  }
2791`,SubotInlineNodeStart=({node:e,setLoading:t})=>{let n=(0,h.useRef)({impress:!1}),i=null===k.G||void 0===k.G?void 0:k.G.userInfo,{params:l,onNext:o,trackingCommonInline:a,isMobile:r}=(0,h.useContext)(tW),handleOnClick=(e=!0)=>()=>{if(e){let e={cookie_id:l.cookie_id,window_id:l.window_id,bot_id:l.bot_id,title_url:l.title_url,url:l.url,gtm_id:l.gtm_id,ga_client_id:l.ga_client_id,device_id:(0,M.h)(window.navigator.userAgent)?2:1,account_id:l.account_id||(null==i?void 0:i.id)||null};subotInlineClick(e)}
2791o&&o()};return((0,h.useEffect)(()=>{let inViewport=(e,t,i={})=>{if(window.IntersectionObserver&&!n.current.impress){let n=new IntersectionObserver((e,n)=>{e.forEach(e=>t(e,n))},i);n.observe(e)}},eventScrollImpress=()=>{n.current.element&&inViewport(n.current.element,(o,a)=>{if(!o.isIntersecting){n.current.impress&&(n.current.impress=!1);return}!n.current.impress&&(n.current.impress=!0,n.current.debounce&&clearTimeout(n.current.debounce),(null==e?void 0:e.inline_start_button)||t(!0),n.current.debounce=setTimeout(()=>{let t={cookie_id:l.cookie_id,window_id:l.window_id,bot_id:l.bot_id,title_url:l.title_url,url:l.url,gtm_id:l.gtm_id,ga_client_id:l.ga_client_id,device_id:(0,M.h)(window.navigator.userAgent)?2:1,account_id:l.account_id||(null==i?void 0:i.id)||null};t&&subotInlineImpression(t),(null==e?void 0:e.inline_start_button)||handleOnClick(!1)()},400),n.current.element&&(null==a||a.unobserve(n.current.element)))},{rootMargin:"1000px"})};return eventScrollImpress(),window.addEventListener("scroll",eventScrollImpress,{passive:!0}),()=>window.removeEventListener("scroll",eventScrollImpress)},[o]),e)?_().createElement(nF,null,_().createElement(nD,{ref:e=>n.current.element=e},e.inline_image&&_().createElement(nU,null,_().createElement("img",{loading:"lazy",src:e.inline_image,alt:""})),_().createElement(nR,null,e.inline_title||e.inline_headline?_().createElement(nj,{tag:"h3",fontWeight:"bold",color:Q.w.colors.secondaryBase},_().createElement(Markdown,null,e.inline_title||e.inline_headline)):null,e.inline_review&&_().createElement(nL,{size:"s4",color:Q.w.colors.gray600,as:"div"},_().createElement(Markdown,null,e.inline_review)),e.inline_start_button&&_().createElement(nP,Object.assign({size:"md",isBlock:r,onClick:handleOnClick(!0),className:"pointer-event-child-none"},a,{"data-event-action":"Start"}),e.inline_start_button))),_().createElement(nB,null,_().createElement(Markdown,null,e.inline_description))):null},nG=F.A.div`
2792  position: absolute;
2793  z-index: 2;
2794  top: 0;
2795  right: 0;
2796  bottom: 0;
2797  left: 0;
2798  display: flex;
2799  flex-direction: column;
2800  align-items: center;
2801  justify-content: center;
2802  color: ${Q.w.colors.gray800};
2803  opacity: 0;
2804  pointer-events: none;
2805  &:before {
2806    position: absolute;
2807    z-index: -1;
2808    top: 0;
2809    right: 0;
2810    bottom: 0;
2811    left: 0;
2812    background-color: ${Q.w.colors.neutral50||"#F7F9FC"};
2813    content: '';
2814    opacity: 1;
2815  }
2816  ${({isLoading:e})=>e&&" opacity: 1; pointer-events: auto; "};
2817`,nH=F.A.div`
2818  position: relative;
2819  z-index: 1;
2820  line-height: 1.5;
2821  transition: 0.25s all linear;
2822  margin-block: 16px;
2823  content-visibility: auto;
2824  contain-intrinsic-size: 500px;
2825  &.hhg-subot-style {
2826    min-height: 100px;
2827  }
2828  ${G.M.mbDown} {
2829    margin-right: -1rem;
2830    margin-left: -1rem;
2831  }
2832`,SubotInline=({id:e,isMobile:t,articleLink:n,customUrl:i})=>{let l=useCurrentUrl(),o=(0,h.useRef)(null),a=(0,h.useRef)(null),[r,s]=(0,h.useState)(!0),[d,c]=(0,h.useState)({activeId:"",params:{},nodes:[],getParams:()=>({})}),u=null===k.G||void 0===k.G?void 0:k.G.userInfo,m=(0,h.useMemo)(()=>d.nodes.find(e=>e.id==d.activeId),[d.nodes,d.activeId]),p=(0,h.useMemo)(()=>({"data-event-category":"Subot","data-event-label":l,"data-bot-id":d.params.bot_id,"data-bot-type":"Inline","data-question-id":"string"==typeof(null==m?void 0:m.id)?null==m?void 0:m.id:null}),[m,l,d.params.bot_id]),v=(0,h.useCallback)(()=>{var t,l,o,a;let r=window.gaData,s=(i||window.location.origin+y.b)+("tl-PH"===k.G.locale?n.replace("fil/",""):n),d={bot_id:e,account_id:(null===(t=(0,M.e)())||void 0===t?void 0:t.id)||null,action_id:"",action_value:"",cookie_id:(0,M.d)(null===(o=null===(l=null===k.G||void 0===k.G?void 0:k.G.router)||void 0===l?void 0:l.query)||void 0===o?void 0:o.cookie_id),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:r?Object.keys(r)[0]:"",ga_client_id:w.A.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:s.replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover."),window_id:(0,M.f)()};return(0,M.o)(d,null===(a=null===k.G||void 0===k.G?void 0:k.G.router)||void 0===a?void 0:a.query)},[]),elementScrollIntoView=()=>{a.current&&a.current.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})},onSubmit=(e,t)=>
2832(0,x._)(void 0,void 0,void 0,function*(){let n=Object.assign(Object.assign({},d),{nodes:[...d.nodes]});if(t&&(null==t?void 0:t.node_id)){let e=n.nodes.findIndex(({id:e})=>e==t.node_id);-1!==e&&(n.nodes[e]._message=Object.assign(Object.assign({},n.nodes[e]._message),t),n.nodes=[...n.nodes.slice(0,e+1)])}if(s(!0),e){let t=n.nodes.findIndex(({id:t})=>t==(null==e?void 0:e.id));if(-1===t)n.nodes=[...n.nodes,Object.assign({},e)];else{let i=Object.assign(Object.assign(Object.assign({},n.nodes[t]),e),{_message:Object.assign(Object.assign({},n.nodes[t]._message),null==e?void 0:e._message)});n.nodes=[...n.nodes.slice(0,t),Object.assign({},i),...n.nodes.slice(t+1)]}n.activeId=e.id}setTimeout(()=>{c(n),s(!1),n.activeId&&saveSubotInlineLogs({nodes:n.nodes,activeId:n.activeId,params:n.params,accountIdFromLogs:o.current})},250),elementScrollIntoView()}),getFirstAPI=e=>(0,x._)(void 0,void 0,void 0,function*(){var t;if((null==e?void 0:e.url)&&(null==e?void 0:e.bot_id)){let n="",i=[];s(!0);let l=yield subotInlineFirstNode(e.bot_id);(null==l?void 0:l._status)===1&&(n=null==l?void 0:l._data.id.toString(),i.push(null==l?void 0:l._data,null==l?void 0:l._data.first_node));let a=yield getSubotInlineLogs(i[0]);if(a){let e=a.nodes[a.nodes.length-1],l=[E.d.FINAL,E.d.FINAL_THANK_YOU,E.d.FINAL_STANDARD].includes(e.type);l||(i=a.nodes,n=a.activeId,o.current=(null===(t=a.params)||void 0===t?void 0:t.account_id)||0)}let r=getPreviousStateFromStorage(e.bot_id,{getParams:v});if(r&&r.params.action_id&&r.params.action_value){let e=yield subotInlineMessage(r.params);(null==e?void 0:e._status)===1&&(null==e?void 0:e._data.node)&&(n=null==e?void 0:e._data.node.id,(i=r.listNodes)[i.length-1]=null==e?void 0:e._data.node,saveSubotInlineLogs({nodes:i,activeId:n,params:r.params,accountIdFromLogs:o.current}),setTimeout(()=>{elementScrollIntoView()},100))}let u=(null==r?void 0:r.params)||(null==a?void 0:a.params)||e,m=Object.assign(Object.assign({},d),{params:u,activeId:n,nodes:i});s(!1),c(m)}});return((0,h.useEffect)(()=>{var e;if(null===(e=null==d?void 0:d.nodes)||void 0===e?void 0:e.length)return console.log("Subot Already Loaded"),()=>void 0;if(w.A.get(y.G)){let e=v();getFirstAPI(e)}else(0,M.c)({condition:()=>!!w.A.get(y.G),finished:()=>{let e=v();getFirstAPI(e)}})},[]),d.nodes.length&&!d.nodes[0].inline_active)?null:_().createElement(tW.Provider,{value:Object.assign(Object.assign({},d),{isMobile:t,getParams:v,onChange:e=>{c(t=>{var n;if(e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==(null==t?void 0:t.activeId)){let i=t.nodes.findIndex(({id:e})=>e==(null==t?void 0:t.activeId));if(-1!==i){let l=Object.assign(Object.assign({},t.nodes[i]),{_message:Object.assign(Object.assign({},null===(n=t.nodes[i])||void 0===n?void 0:n._message),e)});t.nodes[i]=l}}return Object.assign({},t)})},onSubmit,onPrev:()=>{var e;let t=Object.assign({},d),n=null===(e=null==t?void 0:t.nodes)||void 0===e?void 0:e.findIndex(({id:e})=>e==(null==t?void 0:t.activeId));if(n&&-1!==n&&n>1){let e=t.nodes[n-1];e&&(t.activeId=e.id)}elementScrollIntoView(),c(Object.assign({},t)),t.activeId&&saveSubotInlineLogs({nodes:t.nodes,activeId:t.activeId,params:t.params,accountIdFromLogs:o.current})},onNext:e=>(0,x._)(void 0,void 0,void 0,function*(){if(e&&(null==e?void 0:e.node_id)){let t=Object.assign(Object.assign({},e),getCurrentTotalDynamicScore(d.nodes,d.activeId,e.action_id)),n=yield subotInlineMessage(t);if(s(!1),(null==n?void 0:n._status)===1){let t=null==n?void 0:n._data,{node:i}=t,l=(0,x.a)(t,["node"]),o=Object.assign(Object.assign({},i),{_message:Object.assign(Object.assign({},l),{node_id:i.id})}),a=d.nodes.findIndex(({id:e})=>e===o.id);-1!==a?onSubmit(o):onSubmit(o,e);return}}let t=d.nodes.find(({id:e})=>e==(null==d?void 0:d.activeId));t&&!t.hasOwnProperty("type")&&(s(!0),d.nodes[0].id==(null==d?void 0:d.activeId)&&setTimeout(()=>{c(Object.assign(Object.assign({},d),{activeId:d.nodes[1].id.toString()})),s(!1),saveSubotInlineLogs({nodes:d.nodes,activeId:d.nodes[1].id.toString(),params:v(),accountIdFromLogs:o.current})},250))}),onReset:()=>{s(!0),c(e=>(e.nodes=e.nodes.slice(0,2),e.nodes[1]=Object.assign(Object.assign({},e.nodes[1]),{_message:void 0}),e.activeId=e.nodes[0].id.toString(),Object.assign({},e))),setTimeout(()=>{s(!1)},250),elementScrollIntoView()},trackingCommonInline:p,userInfo:u})},_().createElement(nH,{className:j()("hhg-subot",`hhg-subot-${e}`,!!d.nodes.length&&"hhg-subot-style")},!!d.nodes.length&&_().createElement(_().Fragment,null,_().createElement("div",{ref:a,className:"hhg-flag",style:{position:"absolute",top:-150,left:0,pointerEvents:"none"}}),_().createElement(nG,{isLoading:!!r},_().createElement(R.L,null),"Verifying..."),d.nodes.map((e,t)=>{if(e.id.toString()===(null==d?void 0:d.activeId)){if(!e.hasOwnProperty("type"))return _().createElement(SubotInlineNodeStart,{key:t.toString(),node:e,setLoading:s});{let n;return n=(null==e?void 0:e.position)===E.c.SSO?n$[E.c[null==e?void 0:e.position].valueOf()]:n$[E.d[null==e?void 0:e.type].valueOf()],e.is_multi_select&&e.type!==E.d.POLL&&(n=n$.MULTIPLE),n&&_().createElement(n,{key:t.toString(),indexNumber:t,node:e})}}return null}))))};var nz=Object.freeze({__proto__:null,default:ContainerWithProvider,SubotInlineRevampWithTheme:SubotInlineRevampWithTheme,UserInfoForm:UserInfoForm,Markdown:Markdown,hexRgb:hexRgb,SubotInlineVoucherLeftUI:SubotInlineVoucherLeftUI,SubotInline:SubotInline,overrideParamsByQuery:M.o,ssoIntents:M.s,checkUntilFinis
2832hed:M.c,getHhgIdFromCookie:M.l,getSubotCookieId:M.d,getUserIdFromCookie:M.b,getUserInfoFromCookie:M.e,getWindowId:M.f,getHelloSitesUrl:M.g,checkMobile:M.h,clickAndOpenInNewTab:M.i,TIME_RESET_RESEND_OTP:M.T,isFakeEmail:M.k,formatUrlWithEncrypedGa:M.j,getSubotApiPath:getSubotApiPath,subotInlineMessage:subotInlineMessage$1,computeExtraSettingsForBot:computeExtraSettingsForBot$1,subotInlineFirstNode:subotInlineFirstNode$1,subotInlineClick:subotInlineClick$1,subotInlineImpression:subotInlineImpression$1,PATHS:ey,getPreviousStateFromStorage:getPreviousStateFromStorage,getSubotInlineLogs:getSubotInlineLogs,extractUnifiedAnswers:extractUnifiedAnswers,extractVoucherAnswers:extractVoucherAnswers,saveSubotInlineLogs:saveSubotInlineLogs,getColorWithOpacity:getColorWithOpacity,detectToSkipNodeStart:detectToSkipNodeStart,KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD:eN,SubotInlineIntentBaseTarget:e5,SubotInlineIntentBase:e4,checkSyncDataOnFrisoCampaign:checkSyncDataOnFrisoCampaign,handleFrisoRedirecition:handleFrisoRedirecition,getDynamicScore:getDynamicScore,getCurrentTotalDynamicScore:getCurrentTotalDynamicScore,replaceTextWithVariables:replaceTextWithVariables})}}]);

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