"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[106],{wWMa:function(e,t,n){n.r(t),n.d(t,{AdBlock:function(){return O.A},AddressInput:function(){return eo.A},Alert:function(){return o.A},AnsweredByDoctor:function(){return O.x},ArticleCard:function(){return w.T},ArticleCardV2:function(){return k.T},ArticleDetailCard:function(){return el.A},AuthorBadge:function(){return _.A},Avatar:function(){return r.A},BMICardEmbed:function(){return V.q},BMRCardEmbed:function(){return z.l},BabyGrowthCardEmbed:function(){return W.h},BabyPoopEmbed:function(){return Y.f},BabyPoopForm:function(){return j.B},BabyVaccineCardEmbed:function(){return Q.I},BabyVaccineForm:function(){return Z.B},Badge:function(){return o.B},BmiForm:function(){return F.B},BmiNewsletterCheckbox:function(){return F.N},BmiQuestion1Label:function(){return F.Q},BmiQuestion2Description:function(){return F.b},BmiQuestion2Label:function(){return F.a},BookingBtn:function(){return _.B},BorderHeading:function(){return o.a},Breadcrumbs:function(){return O.B},BtnChoice:function(){return E.B},Button:function(){return i.B},CardCollapse:function(){return o.C},CardListItem:function(){return O.p},CartCareButton:function(){return T.C},CategoryCard:function(){return O.C},CertificateItem:function(){return O.s},Checkbox:function(){return a.C},CheckboxGroup:function(){return O.a},ClinicInfo:function(){return el.C},CollectPhoneForm:function(){return el.b},Container:function(){return l.C},CookieAcceptConfirm:function(){return O.e},CustomReferenceDot:function(){return b.C},DUE_DATE_METHOD:function(){return U.a},DatePicker:function(){return O.D},DateRangePicker:function(){return O.g},DistanceTag:function(){return r.D},Divider:function(){return u.D},DoctorExpertise:function(){return el.D},DoctorExpertiseItem:function(){return ei.D},DoctorInfo:function(){return O.d},DoctorInfoExpertise:function(){return ei.a},DragFreeCarousel:function(){return o.D},Drawer:function(){return d.D},DrawerBottom:function(){return r.a},DrawerComponent:function(){return L.D},Dropdown:function(){return S.D},DueDateCardEmbed:function(){return G.w},DueDateForm:function(){return U.D},EGender:function(){return el.c},EPopupCollectPhoneStep:function(){return el.E},EPopupRequestConsultationStep:function(){return el.e},FILE_UPLOAD_ACCEPTED_RATIOS:function(){return o.f},FILE_UPLOAD_ACCEPTED_TYPES:function(){return o.g},FileDropdown:function(){return o.F},FixedBottomAdBlock:function(){return O.k},Flag:function(){return c.F},FloatButtonGroup:function(){return O.F},Footer:function(){return eu.F},GenderOptionControl:function(){return A.G},GeneralInfo:function(){return O.G},Grid:function(){return o.G},HPVScreener:function(){return O.H},Heading:function(){return s.H},HealthToolCardWrapper:function(){return B.H},HealthToolDefaultLayout:function(){return F.H},HospitalInfo:function(){return el.H},HtmlContent:function(){return o.H},Icon:function(){return m.I},IconHeading:function(){return o.I},IconText:function(){return O.I},IconWrapper:function(){return r.I},ImageUpload:function(){return o.e},ImageWrap:function(){return y.I},ImageWrapV2:function(){return a.I},Input:function(){return p.I},InputDate:function(){return R.I},InsuranceList:function(){return ei.I},Label:function(){return p.L},LanguageSwitcher:function(){return et.L},List:function(){return O.L},ListContext:function(){return O.m},Loading:function(){return I.L},Logo:function(){return f.L},LogoIcon:function(){return C.L},MAPPING_CATEGORY_PREMIUM_API_TYPE:function(){return er.a},MAPPING_CATEGORY_PREMIUM_TYPE:function(){return er.M},MAX_RATING:function(){return O.w},MobileBottomNavigation:function(){return H.K},MobileBottomNavigationIcon:function(){return M.M},Modal:function(){return N.M},ModalGallery:function(){return O.M},ModalGalleryProvider:function(){return O.r},NavigationLogoutPopup:function(){return ed.F},NavigationProfileButton:function(){return ec.N},NavigationV2:function(){return ea.N},OvulationCardEmbed:function(){return $.$},OvulationForm:function(){return X.O},PWGCardEmbed:function(){return J.z},PWGForm:function(){return ee.P},Pagination:function(){return a.P},PaymentList:function(){return ei.P},PillCarousel:function(){return en.P},Popup:function(){return P.P},PopupCollectPhone:function(){return el.P},PopupRequestConsultation:function(){return el.g},ProductInsuranceInfo:function(){return el.h},ProfileNavigation:function(){return es.l},ProgressBar:function(){return D.k},PureInput:function(){return a.a},QuickFilter:function(){return O.Q},QuickFilterWrapLine:function(){return O.o},Radio:function(){return o.R},RadioGroup:function(){return O.R},RadioImageGroup:function(){return v.R},RateStars:function(){return o.b},RatingStars:function(){return O.t},RatingStarsInput:function(){return O.v},RequestConsultationForm:function(){return el.R},RequestConsultationSuccess:function(){return el.d},ScrollList:function(){return O.S},SearchInput:function(){return a.b},SeoHead:function(){return O.f},ShareContainer:function(){return O.h},ShareDrawer:function(){return O.j},SideBannerModal:function(){return er.b},SideMenu:function(){return O.i},SiteWideBanner:function(){return et.S},StatisticCard:function(){return O.b},StepRenderer:function(){return o.S},StepRendererContext:function(){return o.d},StyledSearchIcon:function(){return a.S},SummaryInfo:function(){return O.l},SurveyOrPremiumBanner:function(){return er.S},SurveyQuestionCard:function(){return x.S},SurveyThankyouCard:function(){return x.a},THRCardEmbed:function(){return q.M},Table:function(){return O.c},Tabs:function(){return O.T},Tag:function(){return o.T},Text:function(){return g.T},TextArea:function(){return h.T},ThrForm:function(){return K.T},Toggle:function(){return o.c},ToolsBannerCard:function(){return B.T},UserProfileNavigation:function(){return el.U},UserProfileNavigationHeader:function(){return el.N},UserProfileNavigationStats:function(){return el.a},VideoItem:function(){return et.V},VideoPlayerModal:function(){return et.a},VoucherItem:function(){return O.V},WidgetChatbotAi:function(){return O.W},formPhoneType:function(){return el.f},formatSiteWideBanner:function(){return O.y},getNavMenuContent:function(){return ea.g},getNavMenuContentWithCache:function(){return ea.a},useList:function(){return O.n},useListContext:function(){return O.u},useModalGalleryContext:function(){return O.q}});var o=n("3rRY"),r=n("fUyO"),i=n("CqtA"),a=n("28zG"),l=n("OLND"),u=n("tzWM"),d=n("DThU"),c=n("9aQb"),s=n("w9lR"),m=n("HecI"),p=n("jAVh"),f=n("HtoE"),v=n("7h2w"),g=n("rAbs"),h=n("F8SC"),_=n("MEry"),E=n("R/FU"),b=n("x/x+"),y=n("YwFi"),C=n("1tYH"),A=n("bmCs"),I=n("Jy0G"),T=n("r8aS"),L=n("vGCM"),R=n("dCfH"),w=n("Ztav"),k=n("qvfm"),O=n("T71H"),S=n("74fQ"),P=n("0hhg"),N=n("zT0q"),D=n("e6Kn"),x=n("WC8v"),H=n("QcYj"),M=n("6Nf9"),B=n("Vmir"),U=n("oAPd"),G=n("h+21"),V=n("2W4F"),F=n("WZlQ"),W=n("Pi6y"),Y=n("e5PB"),j=n("Az8i"),q=n("/FLf"),K=n("t+1B"),z=n("KFz6"),$=n("t0Yg"),X=n("86Y8"),Z=n("9ZZs"),Q=n("n4nW"),J=n("XJ7Q"),ee=n("Qj2v"),et=n("zSMg"),en=n("GD2D"),eo=n("b9XG"),er=n("v96d"),ei=n("ofcE"),ea=n("9owN"),el=n("+K3l"),eu=n("SNTr"),ed=n("hPj0"),ec=n("4K5D"),es=n("QHxc");n("q1tI"),n("rBCA"),n("yVya"),n("rSBk"),n("Wgwc"),n("xXM3"),n("NmYn"),n("gY0P"),n("ns0B"),n("qgJC"),n("DzJC"),n("sm25"),n("JIJ2"),n("KLKL"),n("mwIZ"),n("sEfC"),n("i8i4"),n("TYy9"),n("qPyV"),n("QgiU"),n("E+oP")},fxvZ:function(e,t,n){n.d(t,{C:function(){return u},L:function(){return c}});var o,r,i=n("GOBr"),a=n("yNk5");let l="vi-VN";a.env.NEXT_PUBLIC_ADMIN_GOOGLE_LOCATION_KEY,a.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID;let u="care",d={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"};i.y,d[l],i.y?d[l]:d[l],a.env.NEXT_PUBLIC_TOGETHER_API_URL&&""!==a.env.NEXT_PUBLIC_TOGETHER_API_URL?a.env.NEXT_PUBLIC_TOGETHER_API_URL:d[l],a.env.NEXT_PUBLIC_SSO_URL,(o=r||(r={}))[o.FEMALE=0]="FEMALE",o[o.MALE=1]="MALE",o[o.ANY=2]="ANY";let c={"en-PH":{PRODUCT:"product",CATEGORY:"category",BRAND:"brand",SEARCH:"search",PROFILE:"profile",PROFILE_MANAGE_ORDERS:"profile/manage-orders",PROFILE_MANAGE_ADDRESS:"profile/deliver-address",PROFILE_VOUCHER:"profile/voucher",PROFILE_MEMBER_CARD:"profile/member-card",CART:"cart",CART_CHECKOUT:"cart/checkout",ORDER_CONFIRMATION:"order-confirmation",PROMOTION:"promotion"},"vi-VN":{PRODUCT:"san-pham",CATEGORY:"danh-muc",BRAND:"thuong-hieu",SEARCH:"tim-kiem",PROFILE:"ho-so",PROFILE_MANAGE_ORDERS:"ho-so/quan-li-don-hang",PROFILE_MANAGE_ADDRESS:"ho-so/dia-chi-giao-hang",PROFILE_VOUCHER:"ho-so/khuyen-mai",PROFILE_MEMBER_CARD:"ho-so/the-thanh-vien",CART:"gio-hang",CART_CHECKOUT:"gio-hang/thanh-toan",ORDER_CONFIRMATION:"kiem-tra-don-hang",PROMOTION:"khuyen-mai"}}},iKyn:function(e,t,n){n.d(t,{C:function(){return c},I:function(){return i},L:function(){return o},M:function(){return l},S:function(){return a},a:function(){return r},c:function(){return m}});let o={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"tl-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"zh-TW":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"},"ms-MY":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"th-TH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"}},r=-1,i=-2;(u=c||(c={})).GSK="gsk",u.ROCHE="roche",u.MSD="msd",(d=s||(s={})).GSK="gsk",d.ROCHE="roche",d.MSD="spesialis";let a="vaksin-rotavirus",l={"vi-VN":{gsk:s.GSK,msd:s.MSD},"id-ID":{gsk:s.GSK,msd:s.MSD},"en-PH":{},"zh-TW":{},"ms-MY":{},"tl-PH":{},"th-TH":{}};var u,d,c,s,m=Object.freeze({__proto__:null,basePath:"/care",LOCALE_COUNTRY:{"vi-VN":{id:1,name:"Vietnam"},"id-ID":{id:2,name:"Indonesia"},"ms-MY":{id:3,name:"Malaysia"},"km-KH":{id:4,name:"Cambodia"},"en-PH":{id:5,name:"Philippines"},"th-TH":{id:6,name:"Thai Lan"},"my-MM":{id:7,name:"Myanmar"},"zh-TW":{id:8,name:"Taiwan"},"hi-IN":{id:9,name:"India"},"zh-SG":{id:11,name:"China"}},LOCALIZED_SLUGS:o,ID_OPTION_CURRENT_LOCATION:r,ID_OPTION_ALL_LOCATION:i,get CLIENT_KEY(){return c},get SLUG_CLIENT_KEY(){return s},SLUG_VACIN_ID:a,MAPPING_CLIENT_WITH_SLUG:l})},NnTf:function(e,t,n){n.d(t,{B:function(){return u},D:function(){return i},H:function(){return a},L:function(){return f},M:function(){return m},R:function(){return s},a:function(){return r},b:function(){return d},c:function(){return v},d:function(){return c}});var o=n("Yida");let r="/images/avatar.jpg",i="/images/default-image.jpg",a={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},l={"id-ID":{"kalkulator-bmi":a.BMI,"kebutuhan-kalori":a.BMR,"kalkulator-hari-perkiraan-lahir":a.DUE_DATE,"kalkulator-masa-subur-2":a.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":a.PWG,"kalkulator-detak-jantung-saat-olahraga":a.THR},"ms-MY":{"kalkulator-bmi":a.BMI,"kalkulator-bmr":a.BMR,"kalkulator-tarikh-bersalin":a.DUE_DATE,"kalkulator-kesuburan":a.OVULATION,"kalkulator-tambah-berat-badan-hamil":a.PWG,"target-heart-rate-calculator":a.THR},"vi-VN":{"cach-tinh-chi-so-bmi":a.BMI,"tinh-chi-so-bmr":a.BMR,"cong-cu-tinh-ngay-du-sinh":a.DUE_DATE,"tinh-ngay-rung-trung":a.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":a.PWG,"cong-cu-do-nhip-tim":a.THR},"zh-TW":{"bmi-calculator":a.BMI,"bmr-calculator":a.BMR,"due-date-calculator":a.DUE_DATE,"ovulation-calculator":a.OVULATION,"pregnancy-weight-gain-calculator":a.PWG,"target-heart-rate-calculator":a.THR},"en-PH":{"bmi-calculator":a.BMI,"bmr-calculator":a.BMR,"due-date-calculator":a.DUE_DATE,"ovulation-calculator":a.OVULATION,"pregnancy-weight-gain-calculator":a.PWG,"target-heart-rate-calculator":a.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":a.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":a.BMR,เครื่องมือคำนวณกำหนดคลอด:a.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":a.OVULATION,เครื่องคำนวณน้ำหนักตัว:a.PWG,เครื่องวัดอัตราการเต้น:a.THR},"hi-IN":{"bmi-calculator-en":a.BMI,"bmi-calculator":a.BMI,"bmr-calculator":a.BMR,"delivery-date-calculator":a.DUE_DATE,"ovulation-calculator":a.OVULATION,"pregnancy-weight-gain-calculator":a.PWG,"target-heart-rate-calculator":a.THR},"km-KH":{"គណនា-bmi":a.BMI,"គណនា-bmr":a.BMR,គណនាថ្ងៃសម្រាលកូន:a.DUE_DATE,គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់:a.OVULATION,គណនាទម្ងន់ស្ត្រីពពោះ:a.PWG,គណនារកចង្វាក់បេះដូងល្អ:a.THR},"my-MM":{"bmi-calculator":a.BMI,"bmr-calculator":a.BMR,"due-date-calendar":a.DUE_DATE,"ovulation-calculator":a.OVULATION,"pregnaancy-weight-calculator":a.PWG,"target-heartrate":a.THR,"pregnancy-weight-calculator":a.PWG,"target-heart-rate":a.THR}},u="hhg_user_token",d="together_admin_token",c="hhg-id",s={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},m=20,p={ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location",ORGANIZATION:"organization",VACCINATIONS:"vaccination",IVF:"ivf",IVF_DETAIL:"ivf-detail",EGG_FREEZING:"egg-freezing",EGG_FREEZING_DETAIL:"egg-freezing-detail",VACCINATION_DETAIL:"vaccination-detail",HEALTH_SCREENER:"health-screener",HEALTH_SCREENER_DETAIL:"health-screener-detail",USER_REVIEWS:"user-reviews",CART:"cart"},f={[o.L.PhilippinesEnglish]:p,[o.L.Vietnam]:{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai",ORGANIZATION:"to-chuc",IVF:"thu-tinh-ong-nghiem",IVF_DETAIL:"ivf-detail",EGG_FREEZING:"dong-lanh-trung",EGG_FREEZING_DETAIL:"egg-freezing-detail",VACCINATIONS:"tiem-chung",VACCINATION_DETAIL:"vaccination-detail",HEALTH_SCREENER:"xet-nghiem",HEALTH_SCREENER_DETAIL:"health-screener-detail",USER_REVIEWS:"danh-gia-dich-vu",CART:"gio-hang"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini",ORGANIZATION:"organisasi",IVF:"ivf",IVF_DETAIL:"ivf-detail",EGG_FREEZING:"egg-freezing",EGG_FREEZING_DETAIL:"egg-freezing-detail",VACCINATIONS:"vaccination",VACCINATION_DETAIL:"vaccination-detail",HEALTH_SCREENER:"health-screener",HEALTH_SCREENER_DETAIL:"health-screener-detail",USER_REVIEWS:"ulasan-pengguna",CART:"keranjang"},[o.L.Taiwan]:p,[o.L.Malaysia]:p,[o.L.Thailand]:p};var v=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:"DD/MM/YYYY",DEFAULT_AVATAR_IMG:r,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:i,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:a,LOCALE_HEALTH_TOOLS:l,BEARER_TOKEN_COOKIE:u,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:d,Z_INDEX:{adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:c,GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:s,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:m,LOCALISED_SLUGS:f})},"z+xM":function(e,t,n){n.d(t,{I:function(){return o}});let o={height:{min:1,max:300},weight:{min:1,max:200},pregnantWeek:{min:1,max:40}}},xrdX:function(e,t,n){n.d(t,{f:function(){return i},v:function(){return r}});var o=n("Yida");let r={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","zh-SG":"hellojiankang.com","hi-IN":"helloswasthya.com","tl-PH":"hellodoctor.com.ph","vi-VN_MB":"marrybaby.vn"},i={[o.L.Vietnam]:"hellobacsi.com",[o.L.Indonesia]:"hellosehat.com",[o.L.Malaysia]:"hellodoktor.com",[o.L.Cambodia]:"hellokrupet.com",[o.L.PhilippinesEnglish]:"hellodoctor.com.ph",[o.L.PhilippinesTagalog]:"hellodoctor.com.ph",[o.L.Thailand]:"hellokhunmor.com",[o.L.Myanmar]:"hellosayarwon.com",[o.L.Taiwan]:"helloyishi.com.tw",[o.L.India]:"helloswasthya.com",[o.L.Singapore]:"hellojiankang.com"}},GOBr:function(e,t,n){var o,r,i,a;n.d(t,{y:function(){return u}});let l="undefined"!=typeof window&&null!==(a=null===(i=null==(r=null===(o=null==window?void 0:window.location)||void 0===o?void 0:o.href)?void 0:r.match(/^https?:\/\/([^/?#]+)(?:[/?#]|$)/i))||void 0===i?void 0:i[1])&&void 0!==a?a:"";l.split(".");let u=!0},UIg8:function(e,t,n){n.d(t,{n:function(){return i},t:function(){return o}});var o,r=n("Yida");(o||(o={})).HPV="hpv";let i={[r.L.Vietnam]:{[o.HPV]:"hpv-vaccine"},[r.L.Indonesia]:{[o.HPV]:"deteksi-dini-hpv"}}},tiWT:function(e,t,n){n.d(t,{Cf:function(){return r},Z5:function(){return a},x9:function(){return i}});var o=n("Yida");let r={HELLO_HEALTH_GROUP:"hellohealthgroup.com",HELLO_DOCTOR:"hellodoctor.com.ph",HELLO_DOCTOR_FIL:"hellodoctor.com.ph/fil",HELLO_KRUPET:"hellokrupet.com",HELLO_SWASTHYA:"helloswasthya.com",HELLO_SEHAT:"hellosehat.com",HELLO_SAYARWON:"hellosayarwon.com",HELLO_DOKTOR:"hellodoktor.com",HELLO_KHUNMOR:"hellokhunmor.com",HELLO_YISHI:"helloyishi.com.tw",HELLO_BACSI:"hellobacsi.com",MARRY_BABY:"www.marrybaby.vn",HELLO_JIANKANG:"hellojiankang.com"},i={HELLO_HEALTH_GROUP:{lng:o.L.PhilippinesEnglish,ns:"translation",name:"Hello Health Group",theme:"hellosite",dayjs:"en",phoneCountry:"PH",siteId:10},HELLO_DOCTOR:{lng:o.L.PhilippinesEnglish,ns:"translation",name:"Hello Doctor",theme:"hellosite",dayjs:"en",phoneCountry:"PH",siteId:5},HELLO_DOCTOR_FIL:{lng:o.L.PhilippinesTagalog,ns:"translation",name:"Hello Doctor",theme:"hellosite",dayjs:"tl-ph",phoneCountry:"PH",siteId:5},HELLO_KRUPET:{lng:o.L.Cambodia,ns:"translation",name:"Hello Krupet",theme:"hellosite",dayjs:"km",phoneCountry:"KH",siteId:4},HELLO_SWASTHYA:{lng:o.L.India,ns:"translation",name:"Hello Swasthya",theme:"hellosite",dayjs:"hi",phoneCountry:"IN",siteId:9},HELLO_SEHAT:{lng:o.L.Indonesia,ns:"translation",name:"Hello Sehat",theme:"hellosite",dayjs:"id",phoneCountry:"ID",siteId:2},HELLO_SAYARWON:{lng:o.L.Myanmar,ns:"translation",name:"Hello Sayarwon",theme:"hellosite",dayjs:"my",phoneCountry:"MM",siteId:7},HELLO_DOKTOR:{lng:o.L.Malaysia,ns:"translation",name:"Hello Doktor",theme:"hellosite",dayjs:"ms-my",phoneCountry:"MY",siteId:3},HELLO_KHUNMOR:{lng:o.L.Thailand,ns:"translation",name:"Hello Khunmor",theme:"hellosite",dayjs:"th",phoneCountry:"TH",siteId:6},HELLO_YISHI:{lng:o.L.Taiwan,ns:"translation",name:"Hello Yishi",theme:"hellosite",dayjs:"zh-tw",phoneCountry:"TW",siteId:8},HELLO_BACSI:{lng:o.L.Vietnam,ns:"translation",name:"Hello Bacsi",theme:"hellosite",dayjs:"vi",phoneCountry:"VN",siteId:1},HELLO_JIANKANG:{lng:o.L.Singapore,ns:"translation",name:"Hello Jiankang",theme:"hellosite",dayjs:"zh-sg",phoneCountry:"SG",siteId:1},MARRY_BABY:{lng:o.L.Vietnam,ns:"marrybaby",name:"Marry Baby",theme:"marrybaby",dayjs:"vi",phoneCountry:"VN",siteId:11}},a={[o.L.Vietnam]:"₫",[o.L.Indonesia]:"Rp",[o.L.Malaysia]:"RM",[o.L.Cambodia]:"៛",[o.L.PhilippinesEnglish]:"₱",[o.L.PhilippinesTagalog]:"₱",[o.L.Thailand]:"฿",[o.L.Myanmar]:"K",[o.L.Taiwan]:"$",[o.L.India]:"₹",[o.L.Singapore]:"S$"}},X5xi:function(e,t,n){n.d(t,{C:function(){return r}});var o=n("q1tI");let r=(0,o.createContext)({})},F21Q:function(e,t,n){n.d(t,{g:function(){return getDataWithCache}});var o=n("NXpd"),r=n("GOBr");let i={},getCachedItem=e=>{if("undefined"==typeof window)return i[e];{let t;try{t=JSON.parse(localStorage.getItem((r.y?"":"staging_")+"hhg-cache-"+e)||"{}")}catch(e){}return t||{}}},setCachedItem=(e,t)=>{try{"undefined"!=typeof window?localStorage.setItem((r.y?"":"staging_")+"hhg-cache-"+e,JSON.stringify({data:t,time:Date.now()})):i[e]={data:t,time:Date.now()}}catch(e){}},getDataWithCache=(e,t,n,r=9e5)=>(0,o.a)(void 0,void 0,void 0,function*(){let i=getCachedItem(e);if(null==i?void 0:i.data)return setTimeout(()=>(0,o.a)(void 0,void 0,void 0,function*(){if(i.time&&Date.now()-i.time>r&&t){let o=yield t();(!n||n(o))&&setCachedItem(e,o)}}),0),i.data;if(t){let o=yield t();return(!n||n(o))&&setCachedItem(e,o),o}return null})},KF2R:function(e,t,n){n.d(t,{a:function(){return formatPost},b:function(){return formatUserProfileUrl},c:function(){return formatTopic},d:function(){return i},e:function(){return formatComment},f:function(){return formatCommunity},g:function(){return formatArticle},h:function(){return formatCategory}});var o=n("NXpd");let formatAuthor=e=>e?{displayName:e.display_name||null,avatar:e.avatar||null,thumbnailAvatar:e.avatar_thumbnail||null,profileUrl:e.profile_url||null,description:e.description||null,metaTag:e.meta_tag||"",specialty:e.specialty||"",organisation:e.organisation||""}:{},formatArticleExpert=e=>e?{id:e.ID||null,name:e.name||null,specialty:e.specialty||null,avatar:e.avatar||null,permalink:e.permalink||null,thumbnailAvatar:e.avatar_thumbnail||null}:{},formatSpotlightsSummary=e=>void 0!==e&&e?{id:e.ID,name:e.name,permalink:e.permalink,image:(null==e?void 0:e.small_banner)||(null==e?void 0:e.image)||"",imageMedium:(null==e?void 0:e.image_medium)||null,imageThumbnail:(null==e?void 0:e.image_thumbnail)||null,startDate:null==e?void 0:e.start_date,endDate:null==e?void 0:e.end_date}:null,formatArticleSubscriptionBanner=e=>{if(!e)return{};let{button_text:t,button_url:n,status:r,banner_desktop:i,banner_mobile:a}=e,l=(0,o._)(e,["button_text","button_url","status","banner_desktop","banner_mobile"]);return Object.assign({buttonText:t||"",buttonUrl:n||"",status:!!r,bannerDesktop:i||"",bannerMobile:a||""},l)},r={EN:"English",FIL:"Filipino"},formatTranslateOptions=e=>void 0===e||Object.keys(e).length<2?[]:Object.keys(e).map(t=>({label:t.toUpperCase() in r?r[t.toUpperCase()]:t.toUpperCase(),value:"/"===e[t].slice(-1)?e[t]:`${e[t]}/`})),formatArticle=e=>{var t,n,o,r;return e?{id:e.ID,postName:e.post_name,sponsor:e.sponsor?formatSponsor(e.sponsor):null,isSponsored:e.is_sponsored||null,isPremium:e.is_premium||!1,postTitle:e.post_title||"",postModified:e.post_modified||"",postDate:e.post_date||"",modifiedTime:e.modified_time||"",permalink:e.permalink||"",featureImage:e.image||null,featureImageMobile:e.image_medium||null,featureImageMobileXs:e.image_thumbnail||null,author:formatAuthor(e.author),reviewer:e.reviewed_by&&formatAuthor(e.reviewed_by)||null,articleReviewed:(null==e?void 0:e.reviewed)?Object.assign(Object.assign({},null==e?void 0:e.reviewed),{author:formatUserProfile(null===(t=null==e?void 0:e.reviewed)||void 0===t?void 0:t.author),editor:formatUserProfile(null===(n=null==e?void 0:e.reviewed)||void 0===n?void 0:n.editor),expert:formatUserProfile(null===(o=null==e?void 0:e.reviewed)||void 0===o?void 0:o.expert),fact_check:formatUserProfile(null===(r=null==e?void 0:e.reviewed)||void 0===r?void 0:r.fact_check)}):null,category:formatCategory(e.category),postContent:e.post_content||null,keyTakeaways:e.key_takeaways||null,categories:(e.categories||[]).map(formatCategory),sources:e.sources||null,description:e.description||null,excerpt:e.excerpt||null,expert:formatArticleExpert(e.expert),metaTag:e.meta_tag||null,spotlight:formatSpotlightsSummary(null==e?void 0:e.spotlight),affiliate_message:e.affiliate_message||null,turnOffComment:!!e.turn_off_comment,hasAffiliate:!!e.is_affiliate,translateOptions:formatTranslateOptions(e.translate),jumpingLink:e.jumping_link||[],pregnancy:(null==e?void 0:e.pregnancy)||!1,pregnancyWeek:(null==e?void 0:e.week_pregnancy)||1,primaryCategory:formatCategory(e.primary_category),turnOffIvsPlayer:!!e.turn_off_ivs_player,turnOffArticleVoice:!!e.turn_off_article_voice,enableAudio:!!e.enable_audio,label:(null==e?void 0:e.label)||"",editLast:formatAuthor(e.edit_last),subscriptionBanner:formatArticleSubscriptionBanner(e.subscription_banner)}:{}},formatUserProfile=e=>void 0!==e&&e?Object.assign(Object.assign({},e),{profile_url:(null==e?void 0:e.slug)?["expert","medical"].includes((null==e?void 0:e.role)||"")?`/expert/${null==e?void 0:e.slug}`:`/author/${null==e?void 0:e.slug}`:e.profile_url}):null,formatSponsor=e=>e?{title:e.title,logo:e.logo,link:e.link}:{},formatReviewedCategory=e=>({postTitle:e.post_title,permalink:e.permalink}),formatCategory=e=>{var t,n;return e?{termId:e.term_id||null,sponsor:e.sponsor?formatSponsor(e.sponsor):null,isSponsored:e.is_sponsored||null,categoryName:e.cat_name||null,name:e.name||null,iconUrl:e.icon||"",slugName:e.category_nicename||null,description:e.description||null,featureImage:e.image||null,displayName:e.name||null,parent:e.parent||null,permalink:e.permalink||null,slug:e.slug||null,childCates:(null===(t=e.child_cates)||void 0===t?void 0:t.map(e=>formatCategory(e)))||[],colorFeatureImage:e.color_feature_image||null,imageColor:e.image_color||null,textColor:e.text_color||null,catParent:(null===(n=e.cat_parent)||void 0===n?void 0:n.name)?{name:e.cat_parent.name,permalink:e.cat_parent.permalink}:{},metaTag:e.meta_tag||"",reviewedBy:e.reviewed_by?formatReviewedCategory(e.reviewed_by):null,reviewedDate:e.reviewed_date||"",faqs:e.faqs?e.faqs.map(e=>formatFaqsCategory(e)):null}:{}},formatFaqsCategory=e=>({title:e.title,content:e.content}),formatHealthTool=e=>e?{icon:e.icon,link:e.link.startsWith("http")?e.link:"/health-tools"+e.link.replace("/health-tools",""),subtitle:e.subtitle,title:e.title}:{},formatCommunity=e=>e?{topicCount:e.topics_count||0,postCount:e.posts_count||0,memberCount:e.members_count||0,thumbnail:e.thumbnail||"",coverImage:e.cover_image||"",mobileCoverImage:e.mobile_cover_image||"",name:e.name||"",description:e.description||"",slug:e.slug||"",id:e.id||0,joined:!!e.joined,isActive:null===e.is_active||void 0===e.is_active||!!e.is_active,mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:!!e.is_hidden}:{},formatTopic=e=>{var t,n,o,r;return e?{id:e.id||0,name:e.name||"",image:e.thumbnail||"",slug:e.slug||"",url:"/"+(null===(t=e.community)||void 0===t?void 0:t.slug)+"/"+(null==e?void 0:e.slug)||0,description:e.description||"",joined:e.joined||!1,postCount:e.count_posts||0,memberCount:e.count_members||0,communityId:String(null===(n=e.community)||void 0===n?void 0:n.id),communitySlug:null===(o=e.community)||void 0===o?void 0:o.slug,communityName:null===(r=e.community)||void 0===r?void 0:r.name,order:e.order||0,isActive:null===e.is_active||void 0===e.is_active||!!e.is_active,mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:!!e.is_hidden}:{}},formatExpertAnswer=e=>e?{answer:null==e?void 0:e.answer.map(formatComment),expert:null==e?void 0:e.expert}:{},formatPost=e=>{var t,n,o,r,i,a,l,u,d,c,s,m,p,f,v,g,h,_,E,b,y;return e?{id:e.id,topics:(null===(t=e.topics)||void 0===t?void 0:t.map(t=>{var n,o,r,i;return{id:t.id||0,name:t.name||"",slug:t.slug||"",url:"/"+(null===(n=e.community)||void 0===n?void 0:n.slug)+"/"+t.slug,communityId:String(null===(o=e.community)||void 0===o?void 0:o.id),communitySlug:(null===(r=e.community)||void 0===r?void 0:r.slug)||"",communityName:(null===(i=e.community)||void 0===i?void 0:i.name)||"",isHidden:!!t.is_hidden,isActive:!0}}))||[],community:{id:(null===(n=e.community)||void 0===n?void 0:n.id)||0,name:(null===(o=e.community)||void 0===o?void 0:o.name)||"",slug:(null===(r=e.community)||void 0===r?void 0:r.slug)||"",isActive:!0,isHidden:!!(null===(i=e.community)||void 0===i?void 0:i.is_hidden)},slug:e.slug||"",author:{id:(null===(a=e.user)||void 0===a?void 0:a.id)||0,username:(null===(l=e.user)||void 0===l?void 0:l.user_name)||"",email:(null===(u=e.user)||void 0===u?void 0:u.email)||"",name:(null===(d=e.user)||void 0===d?void 0:d.name)||"",avatar:(null===(c=e.user)||void 0===c?void 0:c.avatar)||"",role:(null===(s=e.user)||void 0===s?void 0:s.role)?null===(p=null===(m=e.user)||void 0===m?void 0:m.role)||void 0===p?void 0:p.toLowerCase():"",type:(null===(f=e.user)||void 0===f?void 0:f.type)||"",partnerId:(null===(v=e.user)||void 0===v?void 0:v.partner_id)?String(null===(g=e.user)||void 0===g?void 0:g.partner_id):"",title:(null===(h=e.user)||void 0===h?void 0:h.title)||"",doctorId:(null===(_=e.user)||void 0===_?void 0:_.doctor_id)?String(null===(E=e.user)||void 0===E?void 0:E.doctor_id):"",hospitalId:(null===(b=e.user)||void 0===b?void 0:b.hospital_id)?String(null===(y=e.user)||void 0===y?void 0:y.hospital_id):""},previewUrl:{title:e.preview_title||"",url:e.preview_link||"",image:e.preview_image||"",description:e.preview_description||""},createdAt:e.created_at||"",scheduleDateTime:e.schedule_datetime||"",photos:e.images||[],description:e.description||"",commentsCount:e.comments_count||0,likesCount:e.likes_count||0,title:e.name||"",isPin:!!e.is_pin,pinDate:e.pin_date||"",liked:e.liked||!1,bookmarked:!!e.bookmarked,mentions:e.mentions||[],commented:!!e.commented,introUrl:e.intro_url||"",bannerImage:e.banner_image||"",isAnonymous:e.is_anonymous?1:0,isAskDoctor:e.is_question?1:0,expertAnswer:formatExpertAnswer(null==e?void 0:e.expert_answer),createdTime:e.created_time||"",isMinigame:"mini_game"===e.event_type,eventStart:e.event_start,eventEnd:e.event_end,isSensitive:(null==e?void 0:e.is_sensitive)||0}:{}},formatComment=e=>{var t,n,o,r,i,a,l,u,d,c,s,m,p,f,v,g,h,_,E,b,y,C,A,I,T,L,R,w,k,O,S,P;return e?{content:e.content,countLikes:e.likes_count,countReplies:e.replies_count,createdAt:e.created_at,createdTime:e.created_time,id:String(e.id),images:e.image||[],link:e.link||null,replies:e.replies&&e.replies.length>0?e.replies.map(formatComment):[],author:{id:(null===(t=e.user)||void 0===t?void 0:t.id)||0,username:(null===(n=e.user)||void 0===n?void 0:n.user_name)||"",name:(null===(o=e.user)||void 0===o?void 0:o.name)||"",role:(null===(r=e.user)||void 0===r?void 0:r.role)?null===(a=null===(i=e.user)||void 0===i?void 0:i.role)||void 0===a?void 0:a.toLowerCase():"",avatar:(null===(l=e.user)||void 0===l?void 0:l.avatar)||"",type:(null===(u=e.user)||void 0===u?void 0:u.type)||"",email:(null===(d=e.user)||void 0===d?void 0:d.email)||"",partnerId:(null===(c=e.user)||void 0===c?void 0:c.partner_id)?String(null===(s=e.user)||void 0===s?void 0:s.partner_id):"",title:(null===(m=e.user)||void 0===m?void 0:m.title)||"",doctorId:(null===(p=e.user)||void 0===p?void 0:p.doctor_id)?String(null===(f=e.user)||void 0===f?void 0:f.doctor_id):"",hospitalId:(null===(v=e.user)||void 0===v?void 0:v.hospital_id)?String(null===(g=e.user)||void 0===g?void 0:g.hospital_id):""},liked:!!e.liked,mentionedUser:e.mentioned?{id:(null===(h=e.mentioned)||void 0===h?void 0:h.id)||0,username:(null===(_=e.mentioned)||void 0===_?void 0:_.user_name)||"",name:(null===(E=e.mentioned)||void 0===E?void 0:E.name)||"",role:(null===(b=e.mentioned)||void 0===b?void 0:b.role)?null===(C=null===(y=e.mentioned)||void 0===y?void 0:y.role)||void 0===C?void 0:C.toLowerCase():"",avatar:(null===(A=e.mentioned)||void 0===A?void 0:A.avatar)||"",type:(null===(I=e.mentioned)||void 0===I?void 0:I.type)||"",email:(null===(T=e.mentioned)||void 0===T?void 0:T.email)||"",partnerId:(null===(L=e.mentioned)||void 0===L?void 0:L.partner_id)?String(null===(R=e.mentioned)||void 0===R?void 0:R.partner_id):"",doctorId:(null===(w=e.mentioned)||void 0===w?void 0:w.doctor_id)?String(null===(k=e.mentioned)||void 0===k?void 0:k.doctor_id):"",hospitalId:(null===(O=e.mentioned)||void 0===O?void 0:O.hospital_id)?String(null===(S=e.mentioned)||void 0===S?void 0:S.hospital_id):"",title:(null===(P=e.mentioned)||void 0===P?void 0:P.title)||""}:null,mentions:e.mentions||[],isSensitive:e.is_sensitive||0,userReadComment:e.user_read_comment,source:e.source||[],isVerify:e.is_verify||0,isOppose:e.is_oppose||0,userVerify:e.user_verify||{},categorySlug:e.categories||"",isAnonymous:!!Number(e.is_anonymous||0)}:{}},formatUserProfileUrl=e=>void 0!==e&&e?(null==e?void 0:e.turn_off_profile)?"":(null==e?void 0:e.slug)?["expert","medical"].includes((null==e?void 0:e.role)||"")?`/expert/${null==e?void 0:e.slug}`:`/author/${null==e?void 0:e.slug}`:(null==e?void 0:e.profile_url)||(null==e?void 0:e.permalink)||"#":"";var i=Object.freeze({__proto__:null,formatAuthor:formatAuthor,formatArticleExpert:formatArticleExpert,formatSpotlightsSummary:formatSpotlightsSummary,TRANSLATE_LANGUAGES:r,formatTranslateOptions:formatTranslateOptions,formatArticle:formatArticle,formatUserProfile:formatUserProfile,formatBMIResult:e=>{var t,n,o,r,i,a,l,u,d;return e&&e.status?{status:null==e?void 0:e.status,comparison:null!==(t=null==e?void 0:e.comparison)&&void 0!==t?t:"",assessmentData:[{tab:"tools.condition",content:null!==(n=null==e?void 0:e.condition)&&void 0!==n?n:""},{tab:"tools.risks",content:null!==(o=null==e?void 0:e.risk)&&void 0!==o?o:""},{tab:"tools.suggestion",content:null!==(r=null==e?void 0:e.suggestion)&&void 0!==r?r:""}],chartData:(null===(i=null==e?void 0:e.chart_data)||void 0===i?void 0:i.length)>0?null==e?void 0:e.chart_data:[],disclaimer:null!==(a=null==e?void 0:e.disclaimer)&&void 0!==a?a:"",illustrator:null!==(l=null==e?void 0:e.illustrator)&&void 0!==l?l:"",faqs:null!==(u=null==e?void 0:e.faqs)&&void 0!==u?u:[],suggestedArticlesLink:null!==(d=null==e?void 0:e.suggested_articles_link)&&void 0!==d?d:""}:{}},formatSponsor:formatSponsor,formatReviewedCategory:formatReviewedCategory,formatCategory:formatCategory,formatCategoryApi:e=>e?{categoryInfo:formatCategory(e.data.category)||null,explainersPosts:(e.data.explainers_posts||[]).map(formatArticle),subCategories:(e.data.sub_categories||[]).map(formatCategory)}:{},formatFaqsCategory:formatFaqsCategory,formatHealthTool:formatHealthTool,formatHealthToolTypeCategory:e=>{var t,n;return e?{termId:(null==e?void 0:e.term_id)||0,name:(null==e?void 0:e.name)||"",healthTools:null!==(n=null===(t=null==e?void 0:e.health_tools)||void 0===t?void 0:t.map(e=>formatHealthTool(e)))&&void 0!==n?n:[]}:{}},formatCommunity:formatCommunity,formatTopic:formatTopic,formatExpertAnswer:formatExpertAnswer,formatPost:formatPost,formatPostPagination:e=>e?{currentPage:e.current||0,lastPage:e.last||0,total:e.total_items||0}:{},formatNotification:e=>{var t,n,o;return e?{time:e.created_at,content:e.content,postId:String(e.post_id),fromUser:{name:null===(t=e.from_user)||void 0===t?void 0:t.name,id:null===(n=e.from_user)||void 0===n?void 0:n.id,avatar:null===(o=e.from_user)||void 0===o?void 0:o.avatar},toUserId:String(e.to_user_id),postSlug:e.post_slug||"",communitySlug:e.community_slug||""}:{}},formatSpotlightsList:e=>e?e.map(e=>({id:e.ID,name:e.name,permalink:e.permalink,image:(null==e?void 0:e.small_banner)||(null==e?void 0:e.image),imageMedium:(null==e?void 0:e.image_medium)||null,imageThumbnail:(null==e?void 0:e.image_thumbnail)||null,startDate:null==e?void 0:e.start_date,endDate:null==e?void 0:e.end_date})):[],formatOvulationInfo:e=>e?{disclaimer:e.disclaimer,featuredImage:e.featured_image,info:e.informations||[],reviewedBy:e.reviewed_by?{id:e.reviewed_by.ID,permalink:e.reviewed_by.permalink,name:e.reviewed_by.name,postTitle:e.reviewed_by.post_title}:null,reviewedDate:e.reviewed_date}:{},formatSuggestedArticle:e=>e?{postId:e.post_id||null,categoryId:e.category_id||null,postUrl:e.post_url||null,postReviewed:e.post_reviewed||null,postPageviews:e.post_pageviews||null,postRank:e.post_rank||null,isPin:e.is_pin||null,frequency:e.frequency||null,topic:e.topic||null}:{},formatTopicHealthTool:e=>e?{id:e.tool_id||null,topicFrequency:e.frequency||null,topicId:e.topic_id||null,topicName:e.topic_name||null,isPinned:!!e.is_pin||null,toolLink:e.tool_link||""}:{},formatComment:formatComment,formatReportedPostToPostDetail:e=>e?{name:e.title,description:e.description,images:e.images,likes_count:e.count_likes,comments_count:e.count_comments,topics:[],slug:e.post_slug,id:e.post_id,is_pin:e.is_pin,pin_date:"",post_type:e.post_type,schedule_datetime:e.schedule_datetime,is_active:e.is_active,preview_title:e.preview_title||"",preview_image:e.preview_image||"",preview_description:e.preview_description||"",preview_link:e.preview_link||"",user:e.user,created_at:"",created_time:"",community:{id:e.community_id,name:e.community_name,slug:e.community_slug,description:""}}:{},formatTopicSubot:e=>e?{chatBotId:e.subot_id,isPinned:e.is_pin,topicId:e.topic_id,topicFrequency:e.frequency}:{},formatSiteWideBanner:(e,t)=>void 0!==e&&e?{content:(null==e?void 0:e.content)||"",icon:(null==e?void 0:e.icon)||"",type:t||"other"}:null,formatPWGContent:e=>e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?formatUserProfile(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{},formatUserProfileUrl:formatUserProfileUrl,formatTHRContent:e=>e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?formatUserProfile(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{},formatBabyGrowthContent:e=>{var t,n,o;return e&&e.information?{information:null!==(t=e.information.map(e=>({title:e.title,description:e.description})))&&void 0!==t?t:[],reviewBy:{reviewer:(null===(n=e.reviewed_by)||void 0===n?void 0:n.display_name)||(null===(o=e.reviewed_by)||void 0===o?void 0:o.name)||"",date:e.reviewed_date||"",link:formatUserProfileUrl(null==e?void 0:e.reviewed_by)},metaTag:e.meta_tag||"",title:e.title||"",description:e.description||"",disclaimer:e.disclaimer||"",is_sponsored:e.is_sponsored||!1,sponsor:e.sponsor,featuredImage:e.featured_image||""}:{}}})},AWkR:function(e,t,n){n.d(t,{f:function(){return formatPill}});let formatPill=e=>e?{id:e.id,name:e.name||"",icon:e.fruit_icon||""}:{}},jVpD:function(e,t,n){n.d(t,{I:function(){return A},R:function(){return RichTextEditor},S:function(){return y}});var o=n("NXpd"),r=n("q1tI"),i=n("CqtA"),a=n("jAVh"),l=n("VkaC"),u=n("lk1G"),d=n("sEfC"),c=n.n(d),s=n("27Mu"),m=n("7Vls"),p=n("Xp6P"),f=n("rBCA"),v=n("iBNF"),g=n("IQVP"),h=n("NnTf"),_=n("Z/8f"),E=n("c0tG"),b=n("GB21");let y=f.Z.div` input:focus, textarea:focus, [contenteditable='true'] { outline: none; } &.has-ask-doctor-option { .textarea-control { border-bottom: none; border-radius: 4px 4px 0 0; } } &.error-description { .textarea-control { border: 1px solid ${v.r.colors.red600}; } } .textarea-control { position: relative; border: 1px solid ${v.r.colors.gray200}; border-radius: ${v.r.borderRadius}; &.--focus { border-color: ${v.r.colors.primaryBase}; box-shadow: 0px 0px 2px 2px ${v.r.colors.primary200}; } .textarea-wrapper { width: 100%; height: 200px; } .control-tool { position: absolute; bottom: 0; left: 0; display: flex; width: calc(100% - 2rem); height: 40px; align-items: center; justify-content: flex-end; border-top: 1px solid ${v.r.colors.gray200}; margin: 0 1rem; .tool-button { display: flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; background: transparent; cursor: pointer; } .image-icon { vertical-align: middle; } } } .link-preview-wrapper { position: relative; .icon-close { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; cursor: pointer; } } .image-gallery { margin-bottom: 1rem; .image-item { position: relative; overflow: hidden; width: 100%; height: 0; padding-top: 67%; margin-top: 1rem; border-radius: ${v.r.borderRadius}; & > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; } .close-btn { position: absolute; top: 8px; right: 8px; left: unset; width: 24px; height: 24px; cursor: pointer; } } } .description-label { margin-bottom: 5px; color: ${v.r.colors.gray600}; /* font-family: 'Open Sans', sans-serif; */ font-size: 13px; font-weight: bold; } .count-string { margin-top: 5px; color: ${v.r.colors.gray500}; font-size: 11px; text-align: right; } .input-notification { display: flex; & > img { width: 16px; height: 16px; margin-top: 1.5px; margin-right: 8px; } } `,C=f.Z.div` height: 100%; position: relative; width: 100%; display: flex; flex-direction: column; .ql-toolbar.ql-snow { top: 0; width: 100%; // position: sticky; z-index: 3; border: none; border-bottom: 1px solid #ccc; border-radius: 4px 4px 0 0; background: white; .ql-formats { display: inline-flex; align-items: center; margin-right: 0.5rem; .link-tool-wrapper { .popover-menu__content { padding: 0.5rem; transform: translateX(calc(-50% - 1rem)); max-width: calc(100vw - 4rem); ::before { right: calc(50% - 8px); } .link-tool-popover { input { padding-left: 1rem; } .link-input-url { margin-bottom: 0.5rem; } .link-input-text { margin-bottom: 0.5rem; } label { display: inline-block; margin-bottom: 0.2rem; } .link-input-button-wrapper { &[data-is-marrybaby='true'] { .link-input-button { border: solid 2px ${v.r.mbColors.pink}; background-color: ${v.r.mbColors.pink}; &:hover:not(:disabled) { border: solid 2px ${v.r.mbColors.pink}; background-color: ${v.r.colors.white}; color: ${v.r.mbColors.pink}; } } } } .link-input-button { width: auto; height: auto; padding: 0.4rem 1rem; background-color: ${v.r.colors.primaryBase}; &:disabled { border-color: #bfbfbf; background-color: #bfbfbf; color: #fff; cursor: not-allowed; } &:hover:not(:disabled) { background-color: ${v.r.colors.primaryHover}; } } .error-text { padding: 0; margin-bottom: 0.5rem; font-weight: 600; color: ${v.r.colors.red700}; } } } } } @media (max-width: 450px) { position: relative; .ql-formats { .link-tool-wrapper { position: unset; .popover-menu__content { left: 0; transform: unset; max-width: 100%; } } } } } .quill { flex: 1; overflow-y: hidden; .ql-container { display: inline-block; width: 100%; min-height: 100%; /* padding: 14px 16px; */ border: none; border-radius: ${v.r.borderRadius}; color: ${v.r.colors.gray800}; font-size: 1rem; line-height: 1.5; resize: none; white-space: break-spaces; .ql-editor { word-break: break-word; overflow-wrap: break-word; /* -ms-overflow-style: none; scrollbar-width: none; &::-webkit-scrollbar { display: none; } */ } mocka { padding: 2px 6px; border-radius: 1rem; &[data-url='true'] { /* background-color: #eeeeff; */ font-style: italic; color: #1890ff; cursor: pointer; outline: none; text-decoration: underline; } &[data-error='true'] { background-color: #ffeeee; color: red; text-decoration: underline; font-style: bold; } } mention { padding: 2px 6px; border-radius: 1rem; background-color: #eeeeff; color: #1890ff; cursor: pointer; outline: none; text-decoration: none; } ol, ul { padding-left: 1rem; } } } .mention-search-container { position: absolute; background: white; border-radius: ${v.r.borderRadius}; filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04)) drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04)); overflow-y: scroll; z-index: 99; ::-webkit-scrollbar { -webkit-appearance: none; } ::-webkit-scrollbar:vertical { width: 14px; } ::-webkit-scrollbar-thumb { border-radius: ${v.r.borderRadius}; background-color: #d9d9d9; @supports (background-clip: padding-box) { border: 3px solid rgba(0, 0, 0, 0); background-clip: padding-box; } @supports not (background-clip: padding-box) { border: 3px solid white; } } ::-webkit-scrollbar-track { background-color: #fff; border-radius: 0 6px 6px 0; border-left: 1px solid #f2f2f2; } .mention-search-item { cursor: pointer; padding: 12px 1rem; display: flex; align-items: center; &.item-selected { background-color: ${v.r.colors.gray100}; } .search-avatar { width: 40px; height: 40px; font-size: 20px; margin-right: 20px; } } } `;var A="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9.545 16H7.091c-.537 0-1.07-.104-1.566-.305a4.1 4.1 0 0 1-1.327-.867A3.96 3.96 0 0 1 3 12c0-1.06.431-2.078 1.198-2.828A4.14 4.14 0 0 1 7.091 8h2.454m4.38 0h2.984c.537 0 1.07.103 1.566.304a4.1 4.1 0 0 1 1.327.868c.38.371.681.812.887 1.297a3.92 3.92 0 0 1 0 3.062 4 4 0 0 1-.887 1.297c-.38.372-.831.667-1.327.867a4.2 4.2 0 0 1-1.566.305h-2.983M9 12h6'/%3e%3c/svg%3e";let I=null;(0,o.a)(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return;let e=yield Promise.all([n.e(9774),n.e(2937),n.e(2138),n.e(9467),n.e(4467),n.e(6966),n.e(5243),n.e(8132),n.e(1375),n.e(4561),n.e(1448),n.e(5465),n.e(1217),n.e(5480),n.e(731),n.e(2050),n.e(2008),n.e(8469),n.e(8214),n.e(1482),n.e(6817),n.e(467),n.e(5951),n.e(9357),n.e(747),n.e(5675),n.e(6753),n.e(4802),n.e(3046),n.e(5745),n.e(3437),n.e(252),n.e(6839),n.e(9424),n.e(5702),n.e(8922),n.e(6399),n.e(553),n.e(2902),n.e(4969),n.e(3257),n.e(6611),n.e(7538),n.e(6894),n.e(5341)]).then(n.t.bind(n,"rmP6",23));I=e.default;let t=e.Quill||I.Quill;t.register("modules/preserveWhiteSpace",class{constructor(e,t){this.quill=e,this.options=t,e.container.style.whiteSpace="pre-line"}});let o=t.import("blots/inline");let MockABlot=class MockABlot extends o{static create(e){if(!e)return super.create(!1);let t=super.create(e);return MockABlot.setNodeConfigurations(t,e),t}static formats(e){return!!(e.innerText&&(e.getAttribute("data-href")||e.getAttribute("data-url")||e.getAttribute("data-error")||e.getAttribute("data-bad-word")))&&{"data-bad-word":e.getAttribute("data-bad-word"),"data-error":e.getAttribute("data-error"),"data-href":e.getAttribute("data-href"),"data-url":e.getAttribute("data-url"),"data-text":e.innerText||e.getAttribute("data-href")}}static setNodeConfigurations(e,t){var n,o;t&&(null===(o=null===(n=null==t?void 0:t["data-text"])||void 0===n?void 0:n.replace(/(\ )+/g," "))||void 0===o?void 0:o.replace(/(\u200c|‌)+/g,""))&&(t["data-bad-word"]&&e.setAttribute("data-bad-word",t["data-bad-word"]),t["data-href"]&&e.setAttribute("data-href",t["data-href"]),t["data-error"]&&e.setAttribute("data-error",t["data-error"]),t["data-url"]&&e.setAttribute("data-url",t["data-url"]))}};MockABlot.blotName="mocka1",MockABlot.tagName="mocka",t.register(MockABlot);let MentionBlot=class MentionBlot extends o{static create(e){if(!e)return super.create(!1);let t=super.create(e);return MentionBlot.setNodeConfigurations(t,e),t}static formats(e){return!!(e.getAttribute("data-name")&&e.getAttribute("data-id"))&&{"data-name":e.getAttribute("data-name"),"data-id":e.getAttribute("data-id")}}static setNodeConfigurations(e,t){var n,o;t&&t["data-id"]&&(null===(o=null===(n=null==t?void 0:t["data-name"])||void 0===n?void 0:n.replace(/(\ )+/g," "))||void 0===o?void 0:o.replace(/(\u200c|‌)+/g,""))&&(t["data-id"]&&e.setAttribute("data-id",t["data-id"]),t["data-name"]&&e.setAttribute("data-name",t["data-name"]))}};MentionBlot.blotName="mention",MentionBlot.tagName="mention",t.register(MentionBlot)});let inputModify=(e,t)=>{var n;let{formatUrl:o,bannedWords:r=[]}=t||{},i=(0,_.f)((0,_.r)(e));if(!o)return{value:(0,_.h)(i,r)};let a=(0,_.a)((0,_.w)(i)),l=(0,_.g)(i);if(l){let e=[];return l.forEach(t=>{if(t)try{let n=new URL(t);_.A.some(e=>n.origin.endsWith(e))||e.push(t)}catch(n){e.push(t)}}),e.length>0&&(a=a.replace(RegExp(`data-url="true">(${e.map(_.e).join("|")})<`,"gi"),'data-error="true" data-url="true">$1<').replace(RegExp(`data-href="/(${e.map(_.e).join("|")})" data-url="true">`,"gi"),'data-href="/$1" data-error="true" data-url="true">')),{invalidUrls:e,previewUrl:null===(n=l.filter(t=>-1===e.indexOf(t)))||void 0===n?void 0:n[0],value:(0,_.h)(a,r)}}return{value:(0,_.h)(a,r)}},RichTextEditor=({html:e,onChange:t,className:n,style:i,onImagePickerClick:a,bannedWords:u=[],onInvalidUrlsChange:d,onPreviewUrlChange:f,setEditorRef:v,isReplying:b})=>{var y,A,T,L;let R=(0,r.useRef)([]);R.current=u;let[w,k]=(0,r.useState)([]),[O,S]=(0,r.useState)(null),{data:{locale:P}}=(0,r.useContext)(p.T),N=(null==u?void 0:u.join(","))||"";(0,r.useEffect)(()=>{var e,t;let n=null===(t=null===(e=G.current)||void 0===e?void 0:e.getEditor())||void 0===t?void 0:t.root.innerHTML;x(n)},[N]);let fetchPreviewData=e=>{O&&O.url===e||(S({url:e,isFetching:!0}),(0,p.c)((0,p.e)(g.yy.FETCH_PREVIEW,{_locale:P}),"POST",{data:{link:e}}).then(t=>{var n,o,r,i;S({title:null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.title,description:null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.description,image:(null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.image)||(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.logo),url:e})}).catch(()=>{S(null)}))},D=(0,r.useRef)(fetchPreviewData);D.current=fetchPreviewData;let x=(0,r.useCallback)(c()(e=>{if(e){let n=inputModify(e,{bannedWords:R.current,formatUrl:!0}),{invalidUrls:o,previewUrl:r,value:i}=n;o&&k(o),r?D.current(r):S(null),i!==e&&(null==t||t(i))}},500),[]);(0,r.useEffect)(()=>{d&&d(w)},[w]),(0,r.useEffect)(()=>{f&&((null==O?void 0:O.url)?f({title:O.title||"",url:O.url||"",image:O.image||"",description:O.description||""}):f(null))},[O]);let H=(0,r.useRef)(a);H.current=a;let M=(0,m.a)(),B=(0,r.useRef)({toolbar:{handlers:{image:()=>{var e;return null===(e=H.current)||void 0===e?void 0:e.call(H)},link:()=>!1},container:"#toolbar-"+M},preserveWhiteSpace:!0}),U=(0,r.useRef)(-1),G=(0,r.useRef)(null);v&&(null===(A=null===(y=G.current)||void 0===y?void 0:y.getEditor())||void 0===A?void 0:A.root)&&v(null===(L=null===(T=G.current)||void 0===T?void 0:T.getEditor())||void 0===L?void 0:L.root);let handleSelectionChange=()=>{var e,t,n,o,r,i,a,l;if(null===(t=null===(e=G.current)||void 0===e?void 0:e.getEditor())||void 0===t?void 0:t.root){let e=function(e){var t,n;let o=-1;if(void 0!==window.getSelection){let r=window.getSelection();if((null==r?void 0:r.rangeCount)&&(null==r?void 0:r.rangeCount)>0){let r=null===(t=window.getSelection())||void 0===t?void 0:t.getRangeAt(0);if(r){let t=r.cloneRange();t.selectNodeContents(e),t.setEnd(r.endContainer,r.endOffset),o=function calculateChildNodeOffset(e,t){return e.forEach((n,o)=>{let r=o+1===e.length;if(n.nodeType===Node.ELEMENT_NODE){let e=n.outerHTML;if(r)t+=e.indexOf(">")+1,t=calculateChildNodeOffset(n.childNodes,t);else{t+=e.length;return}}else n.nodeType===Node.TEXT_NODE&&(t+=(n.nodeValue||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").length)}),t}(t.cloneContents().childNodes,o);let i=null===(n=r.endContainer.parentElement)||void 0===n?void 0:n.closest("mocka"),a=r.endContainer.nodeValue||r.endContainer.outerHTML;i&&(null==a?void 0:a.length)&&(o=o-r.endOffset+(i.outerHTML.length-(null==i?void 0:i.outerHTML.lastIndexOf(a))))}}}return o}(null===(o=null===(n=G.current)||void 0===n?void 0:n.getEditor())||void 0===o?void 0:o.root),t=null===(i=null===(r=G.current)||void 0===r?void 0:r.getEditor())||void 0===i?void 0:i.root.innerHTML;if(e>=0&&e0){let r=null===(t=window.getSelection())||void 0===t?void 0:t.getRangeAt(0);if(r){let t=r.cloneRange();t.selectNodeContents(e),t.setEnd(r.endContainer,r.endOffset);let i=(t.endContainer.nodeValue||"").substring(0,r.endOffset),a=i.lastIndexOf("@");if(a+1(0,o.a)(void 0,void 0,void 0,function*(){var o,r,i,a;if(!e||!DOMRect)return F([]);let l=yield((null===(o=(0,s.ej)(h.B))||void 0===o?void 0:o.length)||0)>0?(0,p.b)((0,p.e)(g.yy.SEARCH_USER,{_locale:P,name:e}),"get"):(0,p.q)((0,p.e)(g.qf.SEARCH_USER,{_locale:P,name:e}),"get");X(0),F(null===(i=null===(r=null==l?void 0:l.data)||void 0===r?void 0:r.users)||void 0===i?void 0:i.filter(e=>!(null==n?void 0:n.includes(String(e.id)))));let u=null===(a=q.current)||void 0===a?void 0:a.getBoundingClientRect();if(t&&u){let e={top:t.bottom-u.top,width:"min(343px, 100%)",maxHeight:256},n=u.width-(t.left-u.left);n<343?e.right=0:e.left=t.left-u.left,Y(e)}}),500),[]),setSelectUser=(e,t)=>{var n,o,r;if(K.current){K.current.deleteContents();let i=document.createElement("mention");i.setAttribute("data-id",e),i.setAttribute("data-name",t),i.innerText=t;let a=document.createTextNode(" ");K.current.insertNode(a),K.current.insertNode(i);let l=null===(o=null===(n=G.current)||void 0===n?void 0:n.getEditor())||void 0===o?void 0:o.root;l.focus();let u=null===(r=window.getSelection())||void 0===r?void 0:r.getRangeAt(0);null==u||u.setStart(K.current.endContainer,K.current.endOffset),null==u||u.setEnd(K.current.endContainer,K.current.endOffset)}F([])},q=(0,r.useRef)(null),K=(0,r.useRef)(null),z=(0,r.useRef)(null),[$,X]=(0,r.useState)(0);return(0,r.useEffect)(()=>{if(z.current){let e=z.current,t=e.children.item($);if(t){let n=e.getBoundingClientRect(),o=t.getBoundingClientRect();t.offsetTope.scrollTop+n.height&&(e.scrollTop=t.offsetTop-n.height+o.height)}}},[$]),(0,r.useEffect)(()=>{let clickHandler=function(e){var t;(null===(t=q.current)||void 0===t?void 0:t.contains(e.target))||F([])};return window.addEventListener("click",clickHandler,{passive:!0}),()=>{window.removeEventListener("click",clickHandler)}},[]),r.createElement(C,{ref:q,className:n,style:i,onKeyDownCapture:e=>{if(null==V?void 0:V.length){let t=!1;if("ArrowDown"===e.key)t=!0,X(e=>e+1>=V.length?0:e+1);else if("Escape"===e.key)t=!0,X(0),F([]);else if("ArrowUp"===e.key)t=!0,X(e=>e-1<0?V.length-1:e-1);else if("Enter"===e.key||"Tab"===e.key){let e=V[$];e&&(t=!0,setSelectUser(e.id,e.name))}if(t)return e.preventDefault(),!1}}},r.createElement(CustomToolbar,{id:M,onAddLink:(e,n)=>{var o,r;let i=U.current+1,a=null===(r=null===(o=G.current)||void 0===o?void 0:o.getEditor())||void 0===r?void 0:r.root.innerHTML,l=((null==a?void 0:a.substring(0,i))||"")+`${e} `+((null==a?void 0:a.substring(i))||"");null==t||t(l),x(l)}}),I&&r.createElement(I,{ref:G,theme:"snow",value:e,onChange:e=>{null==t||t(e),x(e),handleSelectionChange()},onChangeSelection:()=>{handleSelectionChange()},modules:B.current,formats:["mocka1","mention","id","key","bold","italic","underline","list","bullet"]}),!!(null==V?void 0:V.length)&&r.createElement("div",{ref:z,className:"mention-search-container",style:W},V.map((e,t)=>r.createElement("div",{className:`mention-search-item ${$===t?"item-selected":""}`,key:e.id,onClick:t=>{t.preventDefault(),t.stopPropagation(),setSelectUser(e.id,e.name)},onMouseEnter:()=>{X(t)}},r.createElement(E.U,{className:"search-avatar",username:e.name,avatar:e.avatar}),r.createElement("div",null,r.createElement(l.T,{size:"p2"},e.name),r.createElement(l.T,{size:"p4",color:"#595959"},"@",e.username))))))},CustomToolbar=({onAddLink:e,id:t})=>r.createElement("div",{id:"toolbar-"+t,onClick:e=>{e.preventDefault(),e.stopPropagation()}},r.createElement("span",{className:"ql-formats"},r.createElement("button",{className:"ql-bold",type:"button"}),r.createElement("button",{className:"ql-italic",type:"button"}),r.createElement("button",{className:"ql-underline",type:"button"})),r.createElement("span",{className:"ql-formats"},r.createElement("button",{className:"ql-list",value:"ordered",type:"button"}),r.createElement("button",{className:"ql-list",value:"bullet",type:"button"})),r.createElement("span",{className:"ql-formats"},e&&r.createElement(b.P,{className:"link-tool-wrapper",toggleButtonContent:r.createElement("img",{className:"link-icon",src:A,loading:"lazy"}),buttonProps:{size:"md",color:"transparent"},align:"end"},({setShow:t})=>r.createElement(LinkToolInputPopover,{onAddUrl:e,setShow:t})))),T=["notification.limitUrlDomain","notification.urlWrongFormat"],LinkToolInputPopover=({onAddUrl:e,setShow:t})=>{let{data:{env:{isMarryBaby:n}}}=(0,r.useContext)(p.T),{t:o}=(0,u.u)(),[d,c]=(0,r.useState)(""),[s,m]=(0,r.useState)(""),[f,v]=(0,r.useState)(-1),checkUrlValid=e=>{let t=(0,_.c)(e.trim());try{let e=new URL(t);if(!e.protocol.startsWith("http"))return v(1),!1;if(!_.A.some(t=>e.origin.endsWith("/"+t)||e.origin.endsWith("."+t)))return v(0),!1;return v(-1),!0}catch(e){return v(1),!1}},g=d.trim()&&s.trim()&&f<0;return r.createElement("div",{className:"link-tool-popover"},r.createElement(a.I,{name:"url",value:d,size:"md",label:"URL",placeholder:o("placeholder.enterUrlHere"),type:"text",className:"link-input-url",onChange:e=>{c(e),checkUrlValid(e)}}),f>=0&&r.createElement(l.T,{size:"c2",className:"error-text"},o(T[f])),r.createElement(a.I,{name:"text",value:s,size:"md",label:o("createPost.urlText"),placeholder:o("placeholder.enterUrlTextHere"),type:"text",className:"link-input-text",onChange:e=>m(e)}),r.createElement("div",{"data-is-marrybaby":n,className:"link-input-button-wrapper"},r.createElement(i.B,{theme:n?"marryBaby":"helloSites",size:"sm",color:"primary",className:"link-input-button",onClick:()=>{g&&(e(s.trim(),(0,_.c)(d.trim())),t&&t(!1))},isDisabled:!g},o("insert"))))}}}]);