(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2869,7074,5639,9675,9275,9903,4137,5495,6678,7202,4806],{Cov9:function(e,t,n){"use strict";n.d(t,{h:function(){return i},x:function(){return r}});var o=n("NMK5");let i=(0,o.Jj)(e=>{var t,n;return void 0!==e&&e?{province:e.state||"",keyCategory:e.key_category,category:e.category,description:e.description,qualityMin:e.air_quality_min||null,qualityMax:e.air_quality_max||null,currentAqiusValue:(null==e?void 0:null===(t=e.pollution)||void 0===t?void 0:t.aqius)||null,updatedTime:(null==e?void 0:null===(n=e.pollution)||void 0===n?void 0:n.ts)||null}:null}),r=(0,o.Jj)(e=>void 0!==e&&e?{title:e.title||"",description:e.description||"",disclaimer:e.disclaimer||"",featuredImage:e.featured_image||""}:null)},GWVq:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var o=n("iAbL");let i={formatProductPromotion:e=>e?{id:e.id||0,name:e.name||"",thumbnail:e.thumbnail||"",expirationDate:e.expiration_date||""}:null,formatPriceInfo:e=>e?{final:e.final||0,regular:e.regular||0,discountPercent:e.discount_percent||0}:null,formatCategory:function(e,t,n){var o,r,a;let l=n?n+"/"+e.slug:e.slug,u=(null==e?void 0:null===(r=e.children)||void 0===r?void 0:null===(o=r.map)||void 0===o?void 0:o.call(r,t=>i.formatCategory(t,e.id,l)))||[];return{id:null==e?void 0:e.id,name:(null==e?void 0:e.name)||"",logo:(null==e?void 0:e.logo)||"",slug:(null==e?void 0:e.slug)||"",fullSlug:l||"",children:u,parentId:t||0,products:(null===(a=e.products)||void 0===a?void 0:a.map(this.formatProduct))||[]}},formatProduct:e=>{var t,n,r;return e?{id:e.id||0,price:e.price&&i.formatPriceInfo(e.price)||{final:0,regular:0,discountPercent:0},thumbnail:e.thumbnail||"",name:e.name||"",averageRating:Number((e.average_rating||0).toFixed(2)),reviewsCount:e.reviews_count||0,tag:e.tag||null,sku:e.sku||"",slug:e.slug||"",images:e.images||[],tags:e.tags||[],unit:e.unit||"",brand:e.brand?{name:e.brand.name||"",image:e.brand.image||"",slug:e.brand.slug||"",productsCount:e.brand.products_count||0}:null,description:e.description||"",productPromotions:(null===(n=e.product_promotions)||void 0===n?void 0:null===(t=n.map)||void 0===t?void 0:t.call(n,i.formatProductPromotion).filter(o.$K))||[],isInStock:(null==e?void 0:e.is_in_stock)||!1,isAffiliateProduct:(null==e?void 0:e.is_affiliate_product)||!1,affiliates:(null===(r=e.affiliates)||void 0===r?void 0:r.map(e=>({channelCode:e.channel_code||"",price:e.price,url:e.url})))||[]}:null}}},ejbI:function(e,t,n){"use strict";function myImageLoader(e){let{src:t="",width:n,quality:o}=e;return t.includes("?")?"".concat(t,"&w=").concat(n,"&q=").concat(o||75):"".concat(t,"?w=").concat(n,"&q=").concat(o||75)}n.d(t,{Z:function(){return myImageLoader}})},Fyo5:function(e,t,n){"use strict";n.d(t,{B9:function(){return isValidStatus},le:function(){return checkValidDataApi},rx:function(){return checkValidData}});var o=n("qe1T");function checkValidDataApi(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!e&&"string"==typeof(null==e?void 0:e.state)&&(!!n||""!==e.state)&&"number"==typeof(null==e?void 0:null===(t=e.pollution)||void 0===t?void 0:t.aqius)}function checkValidData(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!e&&"string"==typeof(null==e?void 0:e.province)&&(!!t||""!==e.province)&&"number"==typeof(null==e?void 0:e.currentAqiusValue)}function isValidStatus(e){return Object.values(o.P).includes(e)}},QW8v:function(e,t,n){"use strict";n.d(t,{W:function(){return d}});var o=n("VNqU"),i=n("09QT"),r=n("Cov9"),a=n("oQBk"),l=n("Tk9B"),u=n("Fyo5");let d=(0,o.Ue)((e,t)=>({loading:!1,error:null,currentData:null,cardInfo:null,listProvinces:null,currentLocation:null,setCurrentLocation(t){e({currentLocation:t})},fetchInitData:async()=>{let{loading:n,listProvinces:o}=t();if(!n&&!o){e({loading:!0,error:null});try{var d,c;let t=await (0,l.k)(!1),n=(null==t?void 0:t.location)||null,[o,s,m,v]=await Promise.all([(0,i.d)(a.y.HEALTH_TOOL.GET_AIR_POPULATION_INFO),n?(0,i.d)(a.y.HEALTH_TOOL.GET_AIR_POPULATION_SPECIFIC_PROVINCE,{params:{type:"geo",lat:n.latitude,lng:n.longitude}}):null,(0,i.d)(a.y.HEALTH_TOOL.GET_AIR_POPULATION_DEFAULT),(0,i.d)(a.y.HEALTH_TOOL.GET_AIR_POPULATION_PROVINCE),(0,l.k)(!1)]),f=null==s?void 0:s.data,g=null==m?void 0:m.data,k=(0,u.le)(f,!0),p=(0,u.le)(g),h=!!(null==o?void 0:o.data)&&!!(null==v?void 0:null===(d=v.data)||void 0===d?void 0:d.provinces)&&(k||p);if(h){let i=n&&k;e({currentLocation:i?t:null,cardInfo:(0,r.x)(null==o?void 0:o.data),currentData:(0,r.h)(i?f:p?g:null),listProvinces:(null==v?void 0:null===(c=v.data)||void 0===c?void 0:c.provinces)||[]})}else e({error:"General error"})}catch(t){e({error:t.message})}finally{e({loading:!1})}}},retryFetchInitData:async()=>{e({error:null}),await t().fetchInitData()}}))},tjQ2:function(e,t,n){"use strict";n.d(t,{Ep:function(){return ArticleStoreProvider},WM:function(){return useArticleStore}});var o=n("BGKE"),i=n("q1tI"),r=n("sEfC"),a=n.n(r),l=n("oWg6"),u=n("VNqU"),d=n("2vNa"),c=n("Bp26");let s=["small","medium","large"],m=(0,i.createContext)(null),createArticleStore=e=>(0,l.M)((t,n)=>({articles:[],bookmarkIds:[],chineseTranslate:c.w.traditional,currentArticle:null,currentProgress:0,fontSize:"small",isBookmarked:!1,isCommentPopupOpen:!1,isLiked:!1,isDisliked:!1,totalComment:0,categories:[],...e||{},addToArticles:e=>{!e||n().articles.find(t=>e.id===t.id)||t({articles:n().articles.concat(e)})},addToBookmark:e=>t({isBookmarked:!0,bookmarkIds:[...n().bookmarkIds,e]}),removeBookmark:e=>{let o=n().bookmarkIds.filter(t=>t!==e);t({isBookmarked:!1,bookmarkIds:o})},setArticles:e=>t(t=>({articles:"function"==typeof e?e(t.articles):e})),setBookmarkIds:e=>{t({bookmarkIds:e})},setChineseTranslate:e=>t({chineseTranslate:e}),setCurrentArticle:a()(e=>t({currentArticle:e}),300),setCurrentProgress:e=>t({currentProgress:e}),cycleFontSize:()=>t({fontSize:(0,d.D)(s,n().fontSize)}),setIsBookmarked:e=>t({isBookmarked:e}),setIsCommentPopupOpen:e=>t({isCommentPopupOpen:e}),setIsLiked:e=>t({isLiked:e}),setIsDisliked:e=>t({isDisliked:e}),setTotalComment:e=>t({totalComment:e}),setCategories:e=>t({categories:e}),setShowDictionaryShortcutBtn:e=>t({showDictionaryShortcutBtn:e})})),ArticleStoreProvider=e=>{let{init:t,refreshKey:n,children:r}=e,a=(0,i.useRef)(createArticleStore(t)),l=a.current;return(0,i.useEffect)(()=>{n&&a.current.setState(t)},[n]),(0,o.tZ)(m.Provider,{value:l,children:r})},useArticleStore=(e,t)=>{let n=(0,i.useContext)(m),o=(0,u.oR)(n,e,t);return o}},Bp26:function(e,t,n){"use strict";var o,i;n.d(t,{w:function(){return o}}),(i=o||(o={}))[i.traditional=0]="traditional",i[i.simplified=1]="simplified"},Qx0X:function(e,t,n){"use strict";n.d(t,{D:function(){return o},L:function(){return i}});let o="#284A75",i={loading:!1,shouldRender:!1,error:null,imsakDate:null,maghribDate:null,nextImsakDate:null,ramadanEvent:null,loadingCurrentLocation:!1}},yv45:function(e,t,n){"use strict";n.d(t,{Uc:function(){return checkValidEvent},dD:function(){return getCountDownData},kW:function(){return getColorShade},lR:function(){return handlerEventState}});var o=n("Wgwc"),i=n.n(o),r=n("QiCV");n("qe1T");var a=n("5nj8"),l=n("H+I9"),u=n("Qx0X"),d=n("JPk0");function checkValidEvent(e){var t,n;let o=i().unix((null==e?void 0:null===(t=e.prayerTimes)||void 0===t?void 0:t.imsak.timestamp)||0),r=i().unix((null==e?void 0:null===(n=e.prayerTimes)||void 0===n?void 0:n.maghrib.timestamp)||0),a=i().unix((null==e?void 0:e.nextImsak.timestamp)||0);return{shouldRender:!!e&&o.isValid()&&r.isValid()&&a.isValid(),imsakDate:o,maghribDate:r,nextImsakDate:a}}let getColorShade=e=>{let{h:t,s:n,b:o}=(0,a.sU)(e,!0),i=(0,a.Nv)(t,n,o-12),r=(0,a.Nv)(t,n,o-20),l=(0,a.Nv)(t,30,90);return{mainColor:e,secondColor:"rgb(".concat(i[0],",").concat(i[1],",").concat(i[2],")"),thirdColor:"rgb(".concat(r[0],",").concat(r[1],",").concat(r[2],")"),bgFillColor:"rgb(".concat(l[0],",").concat(l[1],",").concat(l[2],")")}};function handlerEventState(e,t){let n=checkValidEvent(t);return(null==n?void 0:n.shouldRender)?{shouldRender:!0,currentZone:(null==t?void 0:t.zone)||"",ramadanEvent:t,imsakDate:n.imsakDate,maghribDate:n.maghribDate,nextImsakDate:n.nextImsakDate,colorShade:getColorShade(t.color||u.D),selectedZone:t?{label:(null==t?void 0:t.zoneName)||"",value:(null==t?void 0:t.zone)||""}:null,status:(0,r.Vy)({toDate:e,imsakDate:n.imsakDate,maghribDate:n.maghribDate,nextImsakDate:n.nextImsakDate})}:{...u.L,shouldRender:!0,status:d.I.IDLE}}function getCountDownData(e){let{status:t,toDate:n,imsakDate:o,maghribDate:i}=e,r=t===d.I.COUNT_DOWN_TO_PRAY_TIME?o:i;return(0,l.VA)({starDate:n,endDate:r})}},I07S:function(e,t,n){"use strict";n.d(t,{Y:function(){return useRamadanStore}});var o=n("VNqU");let useRamadanStore=(e,t,n)=>(0,o.oR)(e,t,n)},pdCJ:function(e,t,n){"use strict";n.d(t,{P:function(){return createRamadanStore}});var o=n("Wgwc"),i=n.n(o),r=n("oWg6"),a=n("NMK5");let l=(0,a.Jj)(e=>{var t,n,o,r,a,l,u,d,c,s,m,v;if(void 0===e||!e||!e.prayer_times)return null;let f=e.widget_settings||{},g=f.start_date||"",k=f.end_date||"",p=e.date||"",h=i()(g),D=i()(p),_=i()(k),C=h.isValid()&&D.isValid()&&_.isValid()&&D.isBetween(h,_,null,"[]");return C?{date:p,zone:e.zone||"",zoneName:e.zone_name||"",gregorianDate:"".concat(e.gregorian_date||""," - ").concat(e.hijri_date||""),prayerTimes:{imsak:{time:null===(n=e.prayer_times)||void 0===n?void 0:null===(t=n.imsak)||void 0===t?void 0:t.time,timestamp:i()("".concat(p," ").concat(null===(r=e.prayer_times)||void 0===r?void 0:null===(o=r.imsak)||void 0===o?void 0:o.time),"YYYY-MM-DD h:mm A").unix()},maghrib:{time:null===(l=e.prayer_times)||void 0===l?void 0:null===(a=l.maghrib)||void 0===a?void 0:a.time,timestamp:i()("".concat(p," ").concat(null===(d=e.prayer_times)||void 0===d?void 0:null===(u=d.maghrib)||void 0===u?void 0:u.time),"YYYY-MM-DD h:mm A").unix()}},nextImsak:{time:null===(c=e.next_day_imsak)||void 0===c?void 0:c.time,timestamp:i()("".concat(p," ").concat(null===(s=e.next_day_imsak)||void 0===s?void 0:s.time),"YYYY-MM-DD h:mm A").unix()},color:f.widget_color||null,sponsorItem:{name:(null===(m=f.sponsor)||void 0===m?void 0:m.post_title)||"",logo:(null===(v=f.sponsor)||void 0===v?void 0:v.logo)||"",content:f.widget_text||""},startDate:g,endDate:k}:null}),u=(0,a.Jj)(e=>void 0!==e&&e?{value:e.code||"",label:e.label||""}:null);var d=n("09QT"),c=n("oQBk");let getEventZones=()=>(0,d.d)(c.y.RAMADAN_WIDGET.GET_ZONES),getPrayerTimes=e=>(0,d.d)(c.y.RAMADAN_WIDGET.GET_PRAYER_TIMES,{params:e});var s=n("QiCV"),m=n("H+I9"),v=n("Tk9B"),f=n("Qx0X"),g=n("yv45"),k=n("JPk0");let createRamadanStore=e=>(0,r.M)((t,n)=>{let o=(null==e?void 0:e.toDate)||i()();return{loading:!1,shouldRender:!1,error:null,toDate:o,imsakDate:null,maghribDate:null,nextImsakDate:null,errorCurrentLocation:!1,loadingCurrentLocation:!1,listZone:null,ramadanEvent:null,colorShade:(0,g.kW)(f.D),selectedZone:null,currentZone:null,status:k.I.IDLE,currentLocation:(null==e?void 0:e.currentLocation)||null,setStatus:e=>t({status:e}),setSelectedZone:e=>t({selectedZone:e}),setCurrentLocation:e=>t({currentLocation:e}),setCurrentZone:e=>t({currentZone:e}),setLoadingCurrentLocation:e=>t({loadingCurrentLocation:e}),setErrorCurrentLocation:e=>t({errorCurrentLocation:e}),handleChangeZone:async e=>{let o=n(),{toDate:i}=o||{};if(i){t({loading:!0,error:null});try{let n=await getPrayerTimes({zoneId:e,date:i.format("YYYY-MM-DD")}),r=l((null==n?void 0:n.data)||null);t({...o,...(0,g.lR)(i,r)})}catch(e){t({error:e.message,ramadanEvent:null})}finally{t({loading:!1})}}},handleChangeLocation:async e=>{let o=n();t({loadingCurrentLocation:!0});let{toDate:i,currentLocation:r}=o||{},a=r;if(!a){let e=await (0,v.k)(),t=null==e?void 0:e.location;a=(null==t?void 0:t.latitude)&&(null==t?void 0:t.longitude)?t:null}if(a){let[n]=await Promise.all([getPrayerTimes({lat:a.latitude||"",lng:a.longitude||"",date:null==i?void 0:i.format("YYYY-MM-DD")})]),r=l((null==n?void 0:n.data)||null);t({...o,...(0,g.lR)(i,r),currentLocation:a,loadingCurrentLocation:!1}),null==e||e()}else t({errorCurrentLocation:!0,loadingCurrentLocation:!1})},fetchInitData:async()=>{let e=n(),{loading:i,listZone:r,currentLocation:a}=e||{};if(!i&&!r){t({loading:!0,error:null});try{var d;let n=(null==a?void 0:a.latitude)&&(null==a?void 0:a.longitude),i=n?a:null;if(!i){let e=await (0,v.k)(!1),t=(null==e?void 0:e.location)||null,n=(null==t?void 0:t.latitude)&&(null==t?void 0:t.longitude);n&&(i=t)}let[r,c,s]=await Promise.all([getEventZones(),getPrayerTimes({date:null==o?void 0:o.format("YYYY-MM-DD")}),getPrayerTimes({lat:(null==i?void 0:i.latitude)||"",lng:(null==i?void 0:i.longitude)||"",date:null==o?void 0:o.format("YYYY-MM-DD")})]),m=l(c.data),f=l(s.data),k=(0,g.Uc)(m);if(!m&&!k.shouldRender){t({shouldRender:!1});return}let p=f||(i?null:m);t({...e,...(0,g.lR)(o,p),listZone:((null==r?void 0:null===(d=r.data)||void 0===d?void 0:d.zones)||[]).map(u),currentLocation:i})}catch(e){t({error:e.message})}finally{t({loading:!1})}}},updateTime:e=>{let{imsakDate:o,maghribDate:i,nextImsakDate:r}=n();t({toDate:e,status:(0,s.Vy)({toDate:e,imsakDate:o,maghribDate:i,nextImsakDate:r})})},getCountDownData:()=>{let{status:e,toDate:t,imsakDate:o,maghribDate:i}=n(),r=e===k.I.COUNT_DOWN_TO_PRAY_TIME?o:i;return(0,m.VA)({starDate:t,endDate:r})},handleCloseLocatorDropdown:()=>{t({loadingCurrentLocation:!1,errorCurrentLocation:!1})}}})},JPk0:function(e,t,n){"use strict";var o,i;n.d(t,{I:function(){return o}}),(i=o||(o={})).IDLE="idle",i.COUNT_DOWN_TO_PRAY_TIME="count_down_to_pray_time",i.COUNT_DOWN_TO_BREAKING_TIME="count_down_to_breaking_time"},d30B:function(e,t,n){var o=n("q1tI");function Info(e){return o.createElement("svg",e,[o.createElement("path",{d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z",fill:"#2D87F3",key:0}),o.createElement("path",{d:"M8 11V8",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",key:1}),o.createElement("path",{d:"M8 5H8.01",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",key:2})])}Info.defaultProps={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e.exports=Info,Info.default=Info},hvR8:function(e,t,n){var o=n("q1tI");function Danger(e){return o.createElement("svg",e,[o.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"#262626",key:0}),o.createElement("path",{d:"M14.8286 9.17163L9.17176 14.8285",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",key:1}),o.createElement("path",{d:"M9.17139 9.17163L14.8282 14.8285",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",key:2})])}Danger.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e.exports=Danger,Danger.default=Danger},X1xk:function(e,t,n){var o=n("q1tI");function Success(e){return o.createElement("svg",e,[o.createElement("path",{d:"M10.0001 18.3334C14.6025 18.3334 18.3334 14.6024 18.3334 10C18.3334 5.39765 14.6025 1.66669 10.0001 1.66669C5.39771 1.66669 1.66675 5.39765 1.66675 10C1.66675 14.6024 5.39771 18.3334 10.0001 18.3334Z",fill:"#00B16A",key:0}),o.createElement("path",{d:"M13.8333 7.5L8.33325 12.5L5.83325 10.2273",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",key:1})])}Success.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e.exports=Success,Success.default=Success},l0B8:function(e,t,n){var o=n("q1tI");function Warning(e){return o.createElement("svg",e,o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1.66666C5.4 1.66666 1.66667 5.39999 1.66667 9.99999C1.66667 14.6 5.4 18.3333 10 18.3333C14.6 18.3333 18.3333 14.6 18.3333 9.99999C18.3333 5.39999 14.6 1.66666 10 1.66666ZM10 10.8333C9.54167 10.8333 9.16667 10.4583 9.16667 9.99999V6.66666C9.16667 6.20832 9.54167 5.83332 10 5.83332C10.4583 5.83332 10.8333 6.20832 10.8333 6.66666V9.99999C10.8333 10.4583 10.4583 10.8333 10 10.8333ZM9.16667 12.5V14.1667H10.8333V12.5H9.16667Z",fill:"#FE921D"}))}Warning.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e.exports=Warning,Warning.default=Warning},VYCi:function(){},"A/s0":function(){},YZfw:function(){},uMuU:function(){}}]);