@momo-webplatform/mobase 0.2.99 → 0.2.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -67,7 +67,7 @@ import*as Wo from"react";import{ChevronDownIcon as Zm}from"@heroicons/react/20/s
|
|
|
67
67
|
transform: translate3d(0, 30%, 0);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
`})]}),Yt=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...m})=>D($e,{...m,children:D(Le,{className:i("h-auto max-h-screen overflow-hidden border-0 md:max-h-screen md:max-w-2xl lg:max-w-3xl [&>button>svg]:text-white",e),size:"xl",positionRightCloseBtn:!0,children:D(Je,{className:"p-0",children:pe("div",{className:"flex flex-row flex-wrap",children:[D("div",{className:"hidden flex-none w-full sm:block md:w-5/12",children:o||pe("div",{className:"grid grid-cols-1 gap-y-6 px-5 py-8 text-sm",children:[pe("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),pe("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 1 :"}),D("div",{className:"mt-1 text-gray-500",children:l?"M\u1EDF app MoMo ho\u1EB7c \u1EE9ng d\u1EE5ng ng\xE2n h\xE0ng/v\xED \u0111i\u1EC7n t\u1EED ch\u1EA5p nh\u1EADn m\xE3 v\u1EA1ch t\u1EEB QR \u0110a N\u0103ng":"M\u1EDF \u1EE9ng d\u1EE5ng camera m\u1EB7c \u0111\u1ECBnh ho\u1EB7c \u1EE9ng d\u1EE5ng h\u1ED7 tr\u1EE3 QR code c\u1EE7a b\u1EA1n"})]})]}),pe("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),pe("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 2 :"}),D("div",{className:"mt-1 text-gray-500",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),pe("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),pe("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 3 :"}),pe("div",{className:"mt-1 text-gray-500",children:["B\u1EA5m v\xE0o th\xF4ng b\xE1o hi\u1EC3n th\u1ECB \u0111\u1EC3 t\u1EA3i \u1EE9ng d\u1EE5ng ho\u1EB7c"," ",a||"Truy c\u1EADp ngay"]})]})]})]})}),D("div",{className:"flex justify-center items-center w-full h-auto md:w-7/12",style:{background:"url(https://homepage.momocdn.net/jk/momo2020/img/intro/qrcode-pattern.png) 10px 10px no-repeat,linear-gradient(to top,#c1177c,#e11b90)"},children:pe("div",{className:"px-5 py-10 text-center",children:[t&&D("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),pe("div",{className:"relative",children:[l&&D("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:D("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),D(sc,{img:r,isQrForAll:l,children:n&&D(nc,{value:n,size:215,imageSettings:{src:`${s||"https://homepage.momocdn.net/pwa/images/logoMomox50.png"}`,height:50,width:50,excavate:!0},level:"H"})})]})]})})]})})})});import{useState as gc}from"react";import{useEffect as lc,useLayoutEffect as mc,useState as cc}from"react";import dc from"ua-parser-js";var pc=()=>dc().device.type==="mobile",fc=typeof window<"u"?mc:lc,yo=()=>{let[e,o]=cc(!1);return fc(()=>{o(pc())},[]),e};import{Fragment as uc,jsx as Ca,jsxs as vc}from"react/jsx-runtime";var Ge=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,...s})=>{let[l,m]=gc(!1),c=yo(),d=!!a?.qrLink,p=()=>{let z=d?a?.qrLink:e;return typeof z=="string"?z.trim():""},g=()=>{let z=p();!z&&typeof e!="function"||(typeof e=="function"?e():window.open(z,o?"_blank":"_self"))},v=(z,_=0)=>{let F=document.querySelector(z);if(!F)return;let N=F.getBoundingClientRect().top+window.scrollY-_;window.scrollTo({top:N,behavior:"smooth"})},P=()=>{typeof e=="string"&&e.startsWith("#")?v(e,t):g()},w=()=>vc(uc,{children:[Ca(Ae,{...s,className:r,onClick:()=>m(!0),"data-name":"button-action-with-qr",children:n}),Ca(Yt,{...a,open:l,onOpenChange:()=>m(!1),qrLink:a?.qrLink||""})]});return d?c?a?.isQrForAll?w():Ca(Ae,{...s,className:r,onClick:g,"data-name":"button-action-with-qr",children:n}):w():Ca(Ae,{...s,onClick:P,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};import*as wo from"react";import{ChevronRightIcon as hc,DotsHorizontalIcon as xc}from"@radix-ui/react-icons";import{Slot as bc}from"@radix-ui/react-slot";import{jsx as Nt,jsxs as yc}from"react/jsx-runtime";var Xi=wo.forwardRef(({className:e,...o},t)=>Nt("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));Xi.displayName="Breadcrumb";var Yi=wo.forwardRef(({className:e,...o},t)=>Nt("ol",{ref:t,className:i("flex items-center gap-2 break-words text-sm overflow-x-auto snap-mandatory snap-x [&::-webkit-scrollbar]:hidden",e),...o}));Yi.displayName="BreadcrumbList";var Zi=wo.forwardRef(({className:e,...o},t)=>Nt("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));Zi.displayName="BreadcrumbItem";var Ki=wo.forwardRef(({asChild:e,className:o,...t},a)=>Nt(e?bc:"a",{ref:a,className:i("transition-colors hover:text-foreground",o),...t}));Ki.displayName="BreadcrumbLink";var Ji=wo.forwardRef(({className:e,...o},t)=>Nt("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));Ji.displayName="BreadcrumbPage";var en=({children:e,className:o,...t})=>Nt("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??Nt(hc,{className:"w-2 h-2"})});en.displayName="BreadcrumbSeparator";var tn=({className:e,...o})=>yc("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[Nt(xc,{className:"w-4 h-4 text-gray-900"}),Nt("span",{className:"sr-only",children:"More"})]});tn.displayName="BreadcrumbElipssis";import Dr from"html-react-parser";import{createContext as wc,useContext as on}from"react";import{jsx as jo}from"react/jsx-runtime";var Cr=wc({align:"center"}),Rr=({color:e="pink",size:o="small",isTruncated:t=!1,className:a,children:r})=>{let n={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},s={small:"text-sm",large:"text-lg"};return jo("div",{className:i("mb-1 font-semibold",n[e],s[o],t&&"truncate",a),children:r})},Tr=({tagHeading:e="h2",size:o="small",color:t="pink",isTruncated:a=!1,className:r,children:n})=>{let s=e,l={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},m={small:"lg:text-3xl text-2xl",large:"lg:text-4xl md:text-3xl text-2xl"},{align:c}=on(Cr);return jo(s,{className:i("max-w-4xl font-bold",c==="center"?"mx-auto":c==="right"?"ml-auto":"",l[t],m[o],a&&"truncate",r),children:n})},kr=({color:e="regular",size:o="small",marginTop:t="spacingX",isTruncated:a=!1,className:r,children:n})=>{let s={regular:"text-gray-500",white:"text-white/80"},l={small:"text-base",large:"md:text-lg text-base"},m={none:"",spacingX:"mt-2",spacingM:"mt-3",spacingL:"mt-4",spacingXl:"mt-5",spacing2Xl:"mt-6"},{align:c}=on(Cr);return jo("div",{className:i(c==="center"?"mx-auto max-w-2xl":c==="right"?"ml-auto max-w-4xl":"max-w-4xl",s[e],l[o],m[t],a&&"truncate",r),children:n})},Sr=({className:e,align:o="center",children:t})=>jo("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:jo(Cr.Provider,{value:{align:o},children:t})});import{jsx as Zt,jsxs as Nc}from"react/jsx-runtime";var O=({idSection:e,className:o,background:t,children:a})=>Zt("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:Zt("div",{className:"wrapper relative",children:a})}),h=({align:e="center",tagline:o,title:t,description:a,tagHeading:r="h2",colorScheme:n="pink",sizeHeading:s="small",className:l})=>{let m=n==="black"?"pink":n==="pink"?"regular":"white",c=n==="pink"?"pink":n==="white"?"white":"regular",d=n==="white"?"white":"regular";return!t&&!a&&!o?null:Nc(Sr,{align:e,className:l,children:[o&&Zt(Rr,{color:m,children:o}),t&&Zt(Tr,{tagHeading:r,color:c,size:s,children:Dr(t)}),a&&Zt(kr,{color:d,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:Dr(a)})]})},x=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:Zt("div",{className:i("buttons-block mt-8 flex w-full gap-4 md:mt-10",e==="center"&&"justify-center",e==="right"&&"justify-end",o&&"flex-wrap md:flex-nowrap",a),children:t?.slice(0,2).map((r,n)=>{if(!r)return null;let{btnName:s,...l}=r;return Zt(Ge,{...l,className:i(o&&"w-full md:w-auto",r?.className),children:Dr(s)},n)})});import Hc,{memo as _c}from"react";import{ArrowDownIcon as Bc}from"@heroicons/react/20/solid";import Oc from"html-react-parser";import{createContext as Tc,useCallback as kc,useContext as Mr,useEffect as Sc,useRef as Dc,useState as Mc}from"react";import{ChevronLeft as Ic,ChevronRight as Ac}from"lucide-react";import*as an from"react";import{Slot as Pc}from"@radix-ui/react-slot";import{cva as Cc}from"class-variance-authority";import{jsx as Rc}from"react/jsx-runtime";var Kt=Cc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent",{variants:{variant:{primary:"bg-pink-500 text-white hover:bg-pink-600 disabled:bg-pink-300",secondary:"bg-white text-gray-900 hover:bg-gray-100 disabled:text-gray-400 disabled:bg-white border-gray-300",outline:"border-pink-500 text-pink-500 bg-white hover:bg-pink-50 disabled:bg-white disabled:border-pink-300 disabled:text-pink-300",tonal:"bg-pink-100 text-pink-500 hover:bg-pink-200 disabled:bg-gray-200 disabled:text-gray-400",danger:"bg-red-500 text-white hover:bg-red-600 disabled:bg-red-300",transparent:"text-gray-900 bg-transparent hover:bg-gray-100 disabled:text-gray-400 disabled:bg-transparent"},size:{default:"text-sm h-10 w-10",sm:"h-8 w-8 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{variant:"primary",size:"default"}}),ie=an.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Pc:"button",m=i(Kt({variant:o,size:t,className:e}));return Rc(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ie.displayName="IconButton";import{Fragment as Lc,jsx as Et,jsxs as rn}from"react/jsx-runtime";var Ra=Tc(void 0),Pt=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=Dc(null),[n,s]=Mc({left:!1,right:!1}),l=kc(()=>{let c=r.current;if(c){let{scrollLeft:d,scrollWidth:p,clientWidth:g}=c;s({left:d>0,right:Math.ceil(d+g)<p})}},[]);Sc(()=>{let c=r.current;if(c)return l(),window.addEventListener("resize",l),c.addEventListener("scroll",l),()=>{window.removeEventListener("resize",l),c.removeEventListener("scroll",l)}},[l]);let m=c=>{let d=r.current;if(d){let{scrollLeft:p,clientWidth:g,scrollWidth:v}=d,P=g*.7*(c==="left"?-1:1),w=p+P;w<0?w=0:w>v-g&&(w=v-g),d.scrollTo({left:w,behavior:"smooth"})}};return Et(Ra.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:m,gradientOverlayColor:o},children:rn("div",{className:i("relative w-full",t),children:[e&&rn(Lc,{children:[n.left&&Et("div",{className:"pointer-events-none absolute left-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient( to left, rgba(255, 255, 255, 0),rgb(${o}),rgb(${o}))`}}),n.right&&Et("div",{className:"pointer-events-none absolute right-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient(to right, rgba(255, 255, 255, 0), rgb(${o}),rgb(${o}))`}})]}),a]})})},Ct=({className:e,children:o})=>{let t=Mr(Ra);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return Et("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},Rt=({className:e,children:o,...t})=>{let a=Mr(Ra);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?Et(ie,{className:i("pointer-events-auto absolute left-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("left"),"aria-label":"Scroll left",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Et(Ic,{className:"h-4 w-4"})}):null},Tt=({className:e,children:o,...t})=>{let a=Mr(Ra);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?Et(ie,{className:i("pointer-events-auto absolute right-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("right"),"aria-label":"Scroll right",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Et(Ac,{className:"h-4 w-4"})}):null};import*as Ta from"react";import*as je from"@radix-ui/react-tabs";import{jsx as Ir}from"react/jsx-runtime";var kt=je.Root,et=Ta.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>Ir(je.List,{ref:r,className:i("inline-flex w-full flex-row items-center bg-muted text-muted-foreground space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden",`text-${o}`,t&&"border-b border-gray-200",e),...a}));et.displayName=je.List.displayName;var tt=Ta.forwardRef(({className:e,...o},t)=>Ir(je.Trigger,{ref:t,className:i("inline-flex items-center justify-center whitespace-nowrap py-3 font-semibold ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-b-2 border-transparent data-[state=active]:text-pink-500 data-[state=active]:border-pink-500 text-gray-900 hover:text-pink-500",e),...o}));tt.displayName=je.Trigger.displayName;var ot=Ta.forwardRef(({className:e,...o},t)=>Ir(je.Content,{ref:t,className:i("mt-3 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 text-gray-900",e),...o}));ot.displayName=je.Content.displayName;import*as nn from"react";import{Slot as Fc}from"@radix-ui/react-slot";import{cva as zc}from"class-variance-authority";import{jsx as Ec}from"react/jsx-runtime";var sn=zc("inline-flex items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent flex-nowrap",{variants:{variant:{default:"text-blue-700 hover:underline hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",primary:"text-pink-500 hover:underline hover:bg-pink-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",secondary:"text-gray-700 hover:underline hover:text-blue-700 hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline"},size:{default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),fe=nn.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Fc:"button",m=i(sn({variant:o,size:t,className:e}));return Ec(l,{className:m,disabled:r,ref:s,...n,children:n.children})});fe.displayName="TextButton";import{Fragment as ln,jsx as G,jsxs as at}from"react/jsx-runtime";var Vc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return at(ln,{children:[G("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:G("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:at("picture",{children:[G("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),G("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),at("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&G(fe,{variant:"default",className:"shink-0 mb-0.5 line-clamp-1 block justify-start whitespace-normal text-left text-xs md:hidden",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),G("div",{className:"text-sm font-medium text-gray-900 line-clamp-3 group-hover:text-pink-500 md:line-clamp-none md:text-base",children:e?.title}),at("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&at(ln,{children:[G(fe,{variant:"default",className:"justify-start hidden text-xs text-left whitespace-normal shink-0 md:line-clamp-1 md:block",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&G("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&G("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},ka=_c(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,p,g)=>{d?.preventDefault(),d?.stopPropagation(),a?a(p):window.open(g,"_blank")},c=(d,p)=>at("div",{children:[G("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",d?.blogList?.length<3?"md:justify-center":""),children:d?.blogList?.map((g,v)=>G("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:G("div",{onClick:P=>m(P,g?.id,g?.url),className:i("group flex cursor-pointer flex-row md:flex-col",d?.classNameItem),children:G(Vc,{blog:g})},g?.id)},v))}),d?.isShowBtn&&G("div",{className:"flex items-center justify-center w-full mt-8",children:at(Ge,{action:r?()=>r?.(p):d?.btnUrl,newTab:d?.isNewTab,variant:"outline",children:[Oc(d.btnName||"Xem th\xEAm"),d?.isLoading?G(ho,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!d?.btnUrl&&G(Bc,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},d?.title||p);return at(Hc.Fragment,{children:[e&&G(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t?.length>1?at(kt,{defaultValue:t[0]?.title,children:[at(Pt,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[G(Ct,{className:"mb-6 text-center",children:G(et,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((d,p)=>G(tt,{value:d.title,children:d.title},d.title+p))})}),G(Rt,{}),G(Tt,{})]}),t.map((d,p)=>G(ot,{value:d.title,children:c(d,p)},d.title+p))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import Qc,{memo as Uc,useEffect as qc,useState as dn}from"react";import{ChevronLeftIcon as Xc,ChevronRightIcon as Yc}from"@heroicons/react/20/solid";import pn from"html-react-parser";import*as V from"react";import{ChevronLeftIcon as Wc,ChevronRightIcon as $c}from"@heroicons/react/20/solid";import Gc from"embla-carousel-react";import{Fragment as jc,jsx as Fe,jsxs as cn}from"react/jsx-runtime";var mn=V.createContext(null);function Qo(){let e=V.useContext(mn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var ge=V.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[m,c]=Gc({align:"start",...o,axis:e==="horizontal"?"x":"y"},a),[d,p]=V.useState(!1),[g,v]=V.useState(!1),P=V.useCallback(_=>{_&&(p(_.canScrollPrev()),v(_.canScrollNext()))},[]),w=V.useCallback(()=>{c?.scrollPrev()},[c]),C=V.useCallback(()=>{c?.scrollNext()},[c]),z=V.useCallback(_=>{_.key==="ArrowLeft"?(_.preventDefault(),w()):_.key==="ArrowRight"&&(_.preventDefault(),C())},[w,C]);return V.useEffect(()=>{!c||!t||t(c)},[c,t]),V.useEffect(()=>{if(c)return P(c),c.on("reInit",P),c.on("select",P),()=>{c?.off("select",P)}},[c,P]),Fe(mn.Provider,{value:{carouselRef:m,api:c,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:w,scrollNext:C,canScrollPrev:d,canScrollNext:g},children:Fe("div",{ref:l,onKeyDownCapture:z,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});ge.displayName="Carousel";var ue=V.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=Qo();return Fe("div",{ref:r,className:i("overflow-hidden",o),children:Fe("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ue.displayName="CarouselContent";var le=V.forwardRef(({className:e,...o},t)=>{let{orientation:a}=Qo();return Fe("div",{ref:t,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",e),...o})});le.displayName="CarouselItem";var No=V.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=Qo();return cn(ie,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[Fe(Wc,{className:"h-6 w-6"}),Fe("span",{className:"sr-only",children:"Previous slide"})]})});No.displayName="CarouselPrevious";var Po=V.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=Qo();return cn(ie,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[Fe($c,{className:"h-6 w-6"}),Fe("span",{className:"sr-only",children:"Next slide"})]})});Po.displayName="CarouselNext";var Co=V.forwardRef((e,o)=>{let{api:t}=Qo(),[,a]=V.useState(!1),r=V.useCallback(()=>a(l=>!l),[]);V.useEffect(()=>{if(t)return t.on("select",r),t.on("reInit",r),()=>{t.off("select",r),t.off("reInit",r)}},[t,r]);let n=t?.scrollSnapList().length||0,s=t?.selectedScrollSnap()||0;return n>1?Fe("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,m)=>Fe(ie,{className:`navigation-item mx-1 h-1.5 w-1.5 rounded-full p-0 ${m===s?"navigation-item-active scale-125 transform bg-gray-500 hover:bg-gray-500/90":"bg-gray-200 hover:bg-gray-100"}`,"aria-label":`Go to slide ${m+1}`,onClick:()=>t?.scrollTo(m)},m))}):Fe(jc,{})});Co.displayName="CarouselDots";import{Fragment as Sa,jsx as j,jsxs as Qe}from"react/jsx-runtime";var Zc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return Qe(Sa,{children:[j("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:j("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),Qe("div",{className:"mt-4 md:pr-3",children:[j("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&j("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:pn(e?.description??"")}),Qe("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&Qe(Sa,{children:[j(fe,{variant:"default",className:"shink-0 justify-start whitespace-normal text-left text-sm md:line-clamp-1 ",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&j("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&j("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},Kc=({dataBlog:e,setCarouselRef:o,carouselRef:t,setCurrent:a,handleOnClickItem:r})=>{let{blogList:n=[],isShowBtn:s,btnName:l,btnUrl:m="#",isNewTab:c,classNameItem:d}=e??{};return qc(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),Qe(Sa,{children:[j(ge,{opts:{dragFree:!1},setApi:o,className:"w-full",children:j(ue,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(p=>j(le,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:j("div",{onClick:g=>r(g,p?.id,p?.url),className:i("group cursor-pointer",d),children:j(Zc,{blog:p})},p?.id)},p?.id))})}),s&&j("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:Qe(Ge,{action:m&&m,newTab:c,variant:"outline",children:[pn(l||"Xem th\xEAm")," "]})})]})},Jc=({carouselRef:e})=>Qe(ie,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[j(Xc,{className:"h-6 w-6"}),j("span",{className:"sr-only",children:"Previous slide"})]}),ed=({carouselRef:e})=>Qe(ie,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[j(Yc,{className:"h-6 w-6"}),j("span",{className:"sr-only",children:"Next slide"})]}),Ar=Uc(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(c,d,p)=>{c?.preventDefault(),c?.stopPropagation(),t?t(d):window.open(p,"_blank")},[n,s]=dn(null),[,l]=dn(0),m=()=>n?Qe("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[j(Jc,{carouselRef:n}),j(ed,{carouselRef:n})]}):j(Sa,{});return Qe(Qc.Fragment,{children:[Qe("div",{className:" flex items-center justify-between",children:[e&&j(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"left",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),j(m,{})]}),j(Kc,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});import{Fragment as rd,jsx as Ro}from"react/jsx-runtime";var td=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return Ro(ka,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return Ro(Ar,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return Ro(ka,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},od=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>Ro(rd,{children:td({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),ad=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>Ro(O,{className:i("overflow-hidden",r),idSection:a,background:n,children:Ro(od,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:m})});import*as Ma from"react";import{enUS as ld,vi as md}from"date-fns/locale";import{ChevronLeft as cd,ChevronRight as dd}from"lucide-react";import pd from"lunisolar";import{DayPicker as fd}from"react-day-picker";import*as fn from"react";import*as Uo from"@radix-ui/react-checkbox";import{CheckIcon as id}from"@heroicons/react/16/solid";import{cva as gn}from"class-variance-authority";import{jsx as Lr}from"react/jsx-runtime";var nd=gn("peer shrink-0 rounded border-2 disabled:bg-gray-300 border-gray-300 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:bg-gray-100 data-[state=checked]:border-none disabled:data-[state=checked]:bg-gray-400 disabled:data-[state=checked]:text-gray-100 data-[state=checked]:bg-pink-500 data-[state=checked]:text-white",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),sd=gn("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),Da=fn.forwardRef(({className:e,size:o,...t},a)=>Lr(Uo.Root,{ref:a,className:i(nd({size:o}),e),...t,children:Lr(Uo.Indicator,{className:i("flex items-center justify-center text-current"),children:Lr(id,{className:i(sd({size:o}))})})}));Da.displayName=Uo.Root.displayName;import{Fragment as xd,jsx as rt,jsxs as Fr}from"react/jsx-runtime";var gd=({date:e,cusContent:o})=>{let t=null;return t=pd(e).lunar,Fr(xd,{children:[o?o(e):e.getDate(),t&&rt("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},ud={formatCaption:e=>`Th\xE1ng ${e.getMonth()+1}/${e.getFullYear()}`,formatWeekdayName:e=>{let o=e.getDay();return["CN","T2","T3","T4","T5","T6","T7"][o]}};function vd({isShow:e,setIsShow:o,lang:t}){let a=Ma.useId();return rt("div",{className:"w-full p-3 pt-0",children:Fr("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[rt(Da,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),rt("label",{htmlFor:`check-show-luna-${a}`,className:"z-[1] cursor-pointer text-sm leading-none text-gray-900 peer-disabled:cursor-default peer-disabled:text-gray-400",children:t==="vi"?"Hi\u1EC7n ng\xE0y \xE2m l\u1ECBch":"Show lunar date"})]})})}var hd=e=>e.getDay()===0||e.getDay()===6;function Ia({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,m]=Ma.useState(!0);return rt(fd,{locale:r==="vi"?md:ld,showOutsideDays:t,className:i("b w-fit rounded-b-md border border-gray-200 bg-white shadow-md",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-y-0",month:"p-3 pt-0 w-full",caption:"flex justify-center p-3 bg-blue-50 relative items-center -mx-3 mb-3",caption_label:"text-sm font-medium text-gray-900",nav:"space-x-1 flex items-center",nav_button:i(Ke({variant:"transparent"}),"h-7 w-7 p-0 text-gray-900 hover:bg-transparent hover:opacity-70"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse",head_row:"flex space-x-0.5",head_cell:i("w-11 rounded-md text-xs font-medium text-gray-500 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),row:"flex w-full mt-0.5 space-x-0.5",cell:"h-11 w-11 text-center text-sm p-0 relative border-none",day:i(Ke({variant:"transparent"}),"group relative h-11 w-11 p-0 text-center text-sm font-semibold focus-within:relative focus-within:z-20 aria-selected:opacity-100 [&.day-range-end.day-range-start]:rounded-md aria-selected:[&:not(.day-range-middle)]:bg-pink-500 aria-selected:[&:not(.day-range-middle)]:text-white",a&&l&&"show-luna"),day_range_end:"day-range-end [&.day-range-end]:rounded-l-none",day_range_start:"day-range-start [&.day-range-start]:rounded-r-none",day_today:"day-today [&:not([aria-selected])]:text-pink-500 [&:not([aria-selected])]:border-gray-200",day_outside:"day-outside opacity-50 aria-selected:bg-accent/50 aria-selected:opacity-30",day_disabled:"opacity-50",day_range_middle:i("group/mid day-range-middle !rounded-none !bg-pink-50 text-gray-900 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),day_hidden:"invisible",...o},modifiers:{weekend:hd},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>rt(cd,{className:"h-6 w-6"}),IconRight:()=>rt(dd,{className:"h-6 w-6"}),DayContent:c=>rt(gd,{date:c.date,cusContent:n}),Months:({children:c})=>Fr("div",{className:"w-full",children:[rt("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:c}),a&&rt(vd,{isShow:l,setIsShow:m,lang:r})]})},formatters:r==="vi"?ud:{},...s})}Ia.displayName="Calendar";import{QuestionMarkCircleIcon as bd,XCircleIcon as yd}from"@heroicons/react/16/solid";import{format as Aa}from"date-fns";import{Calendar as wd}from"lucide-react";import*as vn from"react";import*as St from"@radix-ui/react-popover";import{jsx as un}from"react/jsx-runtime";var qo=St.Root,Xo=St.Trigger,To=vn.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>un(St.Portal,{children:un(St.Content,{ref:r,align:o,sideOffset:t,className:i("z-50 w-72 rounded-md border border-gray-200 bg-white p-4 sm:p-5 text-gray-900 shadow-small outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));To.displayName=St.Content.displayName;import{Fragment as hn,jsx as Re,jsxs as Yo}from"react/jsx-runtime";var Nd=({label:e,placeholder:o="Select a value",size:t=1,message:a,isError:r,disabled:n,dateFormat:s="dd/MM/yyyy",buttonProps:l,popoverProps:m,calendarProps:c,popoverContentProps:d})=>{let p=c?.selected||null;return Yo("div",{children:[Yo(qo,{...m,children:[Re(Xo,{asChild:!0,children:Yo(Ae,{variant:"secondary",className:i("relative h-11 w-full justify-between overflow-visible text-left text-sm font-normal text-gray-900 ring-inset hover:ring-1 hover:ring-gray-400 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 [&[data-state=open]]:border-pink-500 [&[data-state=open]]:ring-1 [&[data-state=open]]:ring-pink-500",t===2&&"h-12 text-base",(!p||!(p instanceof Date)&&typeof p=="object"&&(!("from"in p)||!p.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[Re("div",{className:"line-clamp-1 flex-1",children:p instanceof Date?Aa(p,s):p&&typeof p=="object"&&"from"in p&&"to"in p?Re(hn,{children:p.from?p.to?Yo(hn,{children:[Re("span",{className:"date-from",children:Aa(p.from,s)})," ",Re("span",{className:"date-separator",children:"-"}),Re("span",{className:"date-to",children:Aa(p.to,s)})]}):Aa(p.from,s):o}):o}),e&&Re("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",t===2&&" -top-2.5 text-sm",r&&"text-red-500"),children:e}),Re(wd,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),Re(To,{className:"w-auto border-none !p-0",...d,children:Re(Ia,{...c,defaultMonth:p&&typeof p=="object"&&"from"in p?p.from:p instanceof Date?p:void 0})})]}),a&&Yo("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?Re(yd,{width:16,height:16,className:"text-red-500"}):Re(bd,{width:16,height:16,className:"text-gray-500"}),Re("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};import{useEffect as kd,useState as Cn}from"react";import{QuestionMarkCircleIcon as Sd,XCircleIcon as Dd}from"@heroicons/react/16/solid";import{isValid as Md}from"date-fns";import*as it from"react";import{ChevronDownIcon as xn,ChevronUpIcon as Pd,CheckIcon as Cd,XCircleIcon as Rd}from"@heroicons/react/16/solid";import{QuestionMarkCircleIcon as Td}from"@heroicons/react/24/outline";import*as S from"@radix-ui/react-select";import{jsx as Q,jsxs as Zo}from"react/jsx-runtime";var Ko=it.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},m)=>Zo("div",{ref:m,className:i("select-mobase relative",e,s?"disabled":"",n?"[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-red-500 [&>.select-mobase-button]:ring-1":"",r===2?"[&>.select-mobase-button]:text-base [&>.select-mobase-button]:h-12":""),children:[t&&Q("span",{className:i("mobase-select-label absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500 z-[1]",r===2&&"text-sm -top-2.5",n&&"text-red-500"),children:t}),Q(S.Root,{disabled:s,...l,children:o}),a&&Zo("div",{className:i("mobase-select-message flex space-x-1 items-center mt-1 text-gray-500",n&&"text-red-500"),children:[n?Q(Rd,{width:16,height:16}):Q(Td,{width:16,height:16}),Q("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),Jo=S.Value,ko=it.forwardRef(({className:e,children:o,...t},a)=>Zo(S.Trigger,{ref:a,className:i("select-mobase-button bg-white w-full ring-0 transition-all focus-visible:border-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent focus-visible:ring-1 focus-visible:!ring-pink-500 rounded-md border border-gray-300 data-[placeholder]:text-gray-500 p-3 disabled:bg-gray-50 disabled:border-gray-200 disabled:pointer-events-none flex items-center justify-between data-[state=open]:border-pink-500 data-[state=open]:ring-1 hover:ring-1 hover:ring-gray-400 data-[state=open]:ring-pink-500 text-gray-900 h-11 ring-inset text-sm",e),...t,children:[Q("div",{className:"line-clamp-1 text-left",children:o}),Q(S.Icon,{asChild:!0,children:Q(xn,{className:"h-4 w-4 text-gray-500 flex-none"})})]}));ko.displayName=S.Trigger.displayName;var zr=it.forwardRef(({className:e,...o},t)=>Q(S.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:Q(Pd,{className:"h-5 w-5"})}));zr.displayName=S.ScrollUpButton.displayName;var Er=it.forwardRef(({className:e,...o},t)=>Q(S.ScrollDownButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1 bg-gradient-to-t from-white to-transparent",e),...o,children:Q(xn,{className:"h-5 w-5"})}));Er.displayName=S.ScrollDownButton.displayName;var So=it.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>Q(S.Portal,{children:Zo(S.Content,{ref:r,className:i("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900 shadow-small data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...a,children:[Q(zr,{}),Q(S.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),Q(Er,{})]})}));So.displayName=S.Content.displayName;var ea=it.forwardRef(({className:e,children:o,...t},a)=>Q(S.Group,{ref:a,className:i("relative p-1 after:w-full border-b border-gray-200 last:border-0",e),...t,children:o})),bn=it.forwardRef(({className:e,...o},t)=>Q(S.Label,{ref:t,className:i("pr-2 pl-7 py-1.5 text-sm font-semibold z-[1]",e),...o}));bn.displayName=S.Label.displayName;var Ht=it.forwardRef(({className:e,children:o,...t},a)=>Zo(S.Item,{ref:a,className:i("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-7 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[Q("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:Q(S.ItemIndicator,{children:Q(Cd,{className:"h-4 w-4 text-pink-500"})})}),Q(S.ItemText,{children:o})]})),yn=it.forwardRef(({className:e,...o},t)=>Q(S.Separator,{ref:t,className:i("-mx-1 my-1 h-px bg-muted",e),...o}));yn.displayName=S.Separator.displayName;var wn=["Th\xE1ng 01","Th\xE1ng 02","Th\xE1ng 03","Th\xE1ng 04","Th\xE1ng 05","Th\xE1ng 06","Th\xE1ng 07","Th\xE1ng 08","Th\xE1ng 09","Th\xE1ng 10","Th\xE1ng 11","Th\xE1ng 12"],Nn=["January","February","March","April","May","June","July","August","September","October","November","December"],Hr=(e,o,t,a)=>{let r=new Date(e,o,0).getDate(),n=t&&e===t.getFullYear()&&o===t.getMonth()+1?t.getDate():1,s=a&&e===a.getFullYear()&&o===a.getMonth()+1?a.getDate():r;return{daysInMonth:r,startDay:n,endDay:s}},Pn=(e,o,t,a)=>{let r=t?t.getFullYear():e,n=a?a.getFullYear():o;return Array.from({length:n-r+1},(s,l)=>n-l)};import{jsx as te,jsxs as nt}from"react/jsx-runtime";var Id=({label:e,selected:o,onSelect:t,size:a=1,message:r,isError:n,disabled:s,dateFormat:l="dd/MM/yyyy",lang:m="vi",fromYear:c=1900,toYear:d=new Date().getFullYear(),disableUnselect:p=!1})=>{let[g,v]=Cn(o??null),P=Math.min(c,d),w=Math.max(c,d),C=l==="MM/yyyy",z=(N,B)=>{if(B===0){v(void 0),t?.(void 0);return}let L=g?.getFullYear()||new Date().getFullYear(),Ve=g?.getMonth()??0,We=g?.getDate()??1;N==="month"&&B!==null&&(Ve=B-1),N==="year"&&B!==null&&(L=B),C?We=1:N==="day"&&B!==null&&(We=B);let Pa=Hr(L,Ve+1).daysInMonth;We>Pa&&(We=1);let Oo=new Date(L,Ve,We);Md(Oo)&&(v(Oo),t?.(Oo))},[_,F]=Cn(!1),ut=N=>{F(N)};return kd(()=>{v(o??null)},[o]),nt("div",{className:i("relative",s&&"cursor-no-drop"),children:[nt("div",{className:i("relative block h-11 w-full rounded-md border border-gray-300 bg-white px-1 py-3 text-sm text-gray-900 outline-none ring-inset transition-all placeholder:text-gray-500 hover:ring-1 hover:ring-gray-400 focus:border-pink-500 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50",_&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",g?"":"text-gray-500",n&&"border-red-500 ring-1 ring-red-500",s&&"pointer-events-none select-none border-gray-200 bg-gray-50"),children:[e&&te("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",a===2&&" -top-2.5 text-sm",n&&"text-red-500"),children:e}),nt("div",{className:"flex h-full flex-row divide-x",children:[!C&&nt(Ko,{value:g?g.getDate().toString().padStart(2,"0"):"",onValueChange:N=>z("day",parseInt(N,10)),onOpenChange:ut,className:"w-[30%]",children:[te(ko,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:te(Jo,{placeholder:m==="vi"?"Ng\xE0y":"Day"})}),te(So,{onCloseAutoFocus:N=>N.preventDefault(),children:nt(ea,{children:[!p&&te(Ht,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:Hr(g?.getFullYear()||new Date().getFullYear(),(g?.getMonth()??0)+1).daysInMonth},(N,B)=>(B+1).toString().padStart(2,"0")).map(N=>te(Ht,{value:N,children:N},N))]})})]}),nt(Ko,{value:g?(g.getMonth()+1).toString():"",onValueChange:N=>z("month",parseInt(N,10)),onOpenChange:ut,className:i(C?"w-1/2":"w-2/5"),children:[te(ko,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:te(Jo,{placeholder:m==="vi"?"Th\xE1ng":"Month"})}),te(So,{onCloseAutoFocus:N=>N.preventDefault(),children:nt(ea,{children:[!p&&te(Ht,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(N,B)=>B+1).map(N=>te(Ht,{value:N.toString(),children:m==="vi"?wn[N-1]:Nn[N-1]},N))]})})]}),nt(Ko,{value:g?g.getFullYear().toString():"",onValueChange:N=>z("year",parseInt(N,10)),onOpenChange:ut,className:i(C?"w-1/2":"w-[30%]"),children:[te(ko,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:te(Jo,{placeholder:m==="vi"?"N\u0103m":"Year"})}),te(So,{onCloseAutoFocus:N=>N.preventDefault(),children:nt(ea,{children:[!p&&te(Ht,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Pn(P,w).map(N=>te(Ht,{value:N.toString(),children:N},N))]})})]})]})]}),r&&nt("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?te(Dd,{width:16,height:16,className:"text-red-500"}):te(Sd,{width:16,height:16,className:"text-gray-500"}),te("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};import*as Jt from"react";import*as W from"@radix-ui/react-alert-dialog";import{jsx as Dt,jsxs as Fd}from"react/jsx-runtime";var Ad=W.Root,Ld=W.Trigger,Rn=W.Portal,_r=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Overlay,{className:i("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...o,ref:t}));_r.displayName=W.Overlay.displayName;var Tn=Jt.forwardRef(({className:e,...o},t)=>Fd(Rn,{children:[Dt(_r,{}),Dt(W.Content,{ref:t,className:i("fixed left-[50%] w-[90vw] bg-white text-gray-700 border border-gray-300 top-[50%] z-50 grid w- max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-xl",e),...o})]}));Tn.displayName=W.Content.displayName;var kn=({className:e,...o})=>Dt("div",{className:i("flex flex-col space-y-2 text-left",e),...o});kn.displayName="AlertDialogHeader";var Sn=({className:e,...o})=>Dt("div",{className:i("flex flex-row justify-end space-x-4",e),...o});Sn.displayName="AlertDialogFooter";var Dn=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));Dn.displayName=W.Title.displayName;var Mn=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));Mn.displayName=W.Description.displayName;var In=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Action,{ref:t,className:i(Ke({variant:"primary"}),"",e),...o}));In.displayName=W.Action.displayName;var An=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Cancel,{ref:t,className:i(Ke({variant:"secondary"}),e),...o}));An.displayName=W.Cancel.displayName;import{memo as $d,useState as Gd}from"react";import{useEffect as zd,useState as Fn}from"react";import zn from"html-react-parser";import{motion as Ed}from"motion/react";import*as Ln from"@radix-ui/react-aspect-ratio";var E=Ln.Root;import{Fragment as En,jsx as oe,jsxs as ta}from"react/jsx-runtime";var Hd=({guideGroup:e,mockup:o})=>{let[t,a]=Fn(),[r,n]=Fn(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return zd(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),oe(En,{children:e?.stepList&&e?.stepList?.length>0&&ta("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[oe("div",{className:"h-auto w-64 flex-none",children:ta("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&ta(En,{children:[oe("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),oe("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),oe("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),oe("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),oe("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:ta(ge,{setApi:a,children:[oe(ue,{className:"ml-0",children:e?.stepList.map((l,m)=>oe(le,{className:"pl-0",children:oe(E,{ratio:o==="small"?540/960:540/1168,children:l?.image&&oe("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},m))}),oe(No,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),oe(Po,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),oe("div",{className:"flex flex-auto pl-12 pt-4",children:oe("ul",{className:"flex flex-col",children:e?.stepList.map((l,m)=>ta("li",{className:i("relative min-h-20 pb-8 pl-14 after:absolute after:left-4 after:top-0 after:h-full after:border-l after:border-dashed after:border-gray-200 last:min-h-0 last:pb-0 last:after:hidden",m+1===r?"":"cursor-pointer"),onClick:()=>t&&t.scrollTo(m),children:[oe("div",{className:i("absolute -top-1.5 left-0 z-10 flex h-8 w-8 items-center justify-center rounded-full text-sm font-bold",m+1===r?"bg-pink-500 text-white":"bg-pink-100 text-pink-500"),children:m+1}),oe("div",{className:i(" text-sm font-medium",m+1===r?"text-pink-500":"text-gray-900"),children:zn(l.title)}),l.content&&oe(Ed.div,{initial:"closed",animate:m+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:oe("div",{className:"mt-3 text-sm text-gray-700",children:zn(l.content)})})]},m))})})]})})},Br=Hd;import{useEffect as _d,useRef as Bd,useState as La}from"react";import{ChevronRightIcon as Hn}from"@heroicons/react/20/solid";import Od from"embla-carousel-autoplay";import Fa from"html-react-parser";import{Fragment as Or,jsx as y,jsxs as ye}from"react/jsx-runtime";var Vd=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=La(0),[s,l]=La();return _d(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:y($e,{open:e,onOpenChange:o,children:ye(Le,{position:"bottom",height:"full",children:[y(xo,{children:y(bo,{className:"line-clamp-1",children:t?.title})}),ye(Je,{className:"grid overflow-hidden p-0 ",children:[y(ge,{setApi:l,className:" grid overflow-hidden",children:y(ue,{className:"ml-0 h-full",children:t.stepList.map((m,c)=>y(le,{className:"h-full w-full pl-0",children:ye("div",{className:"flex h-full flex-col overflow-y-auto",children:[y("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:y("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:ye("div",{className:i("relative mx-auto w-full",a==="none"?"":"rounded-[2rem] border-8 border-gray-800 bg-gray-800 shadow-md",a==="small"?"px-0.5 py-3":""),children:[a!=="none"&&ye(Or,{children:[y("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),y("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:y(E,{ratio:a==="small"?540/960:540/1168,children:m?.image&&y("img",{src:m.image,className:"size-full object-contain",alt:m.title})})})]})})}),ye("div",{className:"p-5 pb-12",children:[y("div",{className:"font-semibold",children:Fa(m.title)}),m?.content&&y("div",{className:"mt-3 text-sm text-gray-800",children:Fa(m.content)})]})]})},c))})}),y("div",{className:"text-muted-foreground fixed bottom-3 left-1/2 flex -translate-x-1/2 items-center justify-center gap-1.5 rounded-full bg-gray-900/50 px-3 py-1 py-2 text-center text-sm text-gray-700",children:t.stepList.map((m,c)=>y("div",{className:`h-2 w-2 cursor-pointer rounded-full ${c+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(c)},c))})]})]})})},Wd=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=La(!1),[n,s]=La(null),l=Bd(Od({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),m=c=>{s(e?.[c]||null),r(!0)};return e?.length===0?null:ye(Or,{children:[e?.length>1?y("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((c,d)=>ye("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>m(d),children:[y("div",{className:"borde flex h-28 w-20 justify-center overflow-hidden rounded-t-lg bg-gray-100 p-2 pb-0",children:(c?.avatar||c?.stepList?.[0]?.image)&&y("img",{src:c.avatar||c?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:c.title})}),ye("div",{className:i("relative grid min-h-32 flex-1 grid-cols-1 items-center pr-8 ",d+1!=e.length&&"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-gray-200"),children:[ye("div",{className:"py-2",children:[t&&y("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${d+1}`}),y("div",{className:"font-semibold",children:Fa(c.title)}),c?.description&&y("div",{className:"mt-1 text-sm text-gray-500",children:Fa(c.description)})]}),y("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:y(Hn,{className:"h-6 w-6"})})]})]},d))}):e?.[0]&&e[0].stepList?.length>0&&ye("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[y("div",{className:"relative max-h-96 w-full flex-none overflow-hidden",style:{WebkitMask:"linear-gradient(to bottom, rgba(0, 0, 0, 1.0) 95%, rgba(0, 0, 0, 0.3) 98%, transparent 100%)"},children:y("div",{className:"mx-auto h-auto w-72",children:ye("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&ye(Or,{children:[y("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),y("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:y(ge,{plugins:[l.current],children:y(ue,{className:"ml-0",children:e[0]?.stepList.map((c,d)=>y(le,{className:"pl-0",onClick:()=>m(0),children:y(E,{ratio:o==="small"?540/960:540/1168,children:c?.image&&y("img",{src:c.image,className:"size-full object-contain",alt:c.title})})},d))})})})]})})}),y("div",{className:"flex w-full flex-none justify-center",children:ye(fe,{size:"lg",variant:"primary",onClick:()=>m(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",y(Hn,{className:"ml-1 h-5 w-5"})]})})]}),a&&y(Vd,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},_n=Wd;import{Fragment as jd,jsx as me,jsxs as oa}from"react/jsx-runtime";var Bn=({direction:e,className:o})=>{let t=e==="left"?{viewBox:"0 0 20 40",d:"M20 0H0L18 20L0 40H20V0Z",width:"20"}:{viewBox:"0 0 19 40",d:"M0.906128 0H0V40H0.906128L19 20L0.906128 0Z",width:"19"};return me("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:me("path",{d:t.d,fill:"currentColor"})})},Vr=$d(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:m}=o||{},[c,d]=Gd(t?.[0]?.title||"");return oa(jd,{children:[e&&me(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t&&t?.length>0&&oa(uo,{children:[me(Ze,{lessThan:"md",children:me(_n,{dataGuide:t,mockup:r,isStep:n})}),me(Ze,{greaterThan:"sm",children:t?.length>1?oa(kt,{defaultValue:t[0]?.title,onValueChange:p=>d(p),children:[oa(Pt,{showGradientOverlay:s,gradientOverlayColor:l,className:m,children:[me(Ct,{className:"mb-6 text-center",children:me(et,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((p,g)=>{let v=g===t.length-1,P=c===p?.title||"";return oa(tt,{value:p.title,className:i(n?"relative h-10 border-0 bg-pink-100 px-3 first:rounded-l-md first:pl-5 last:rounded-r-md last:pl-3 last:pr-5":"",P&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&g!==0&&me(Bn,{direction:"left",className:i("right-full top-0",P?"text-pink-500":"text-pink-100")}),p.title,n&&!v&&me(Bn,{direction:"right",className:i("left-full top-0",P?"text-pink-500":"text-pink-100")})]},p.title+g)})})}),me(Rt,{}),me(Tt,{})]}),t.map((p,g)=>me(ot,{value:p.title,children:me(Br,{guideGroup:p,mockup:r})},p.title+g))]}):t?.length===1&&t[0]&&me(Br,{guideGroup:t[0],mockup:r})})]}),a&&me(x,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});import{Fragment as Xd,jsx as aa}from"react/jsx-runtime";var Qd=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return aa(Vr,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return aa(Vr,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},Ud=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>aa(Xd,{children:Qd({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),qd=({idSection:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,className:n,background:s,template:l=1,mockup:m="default",isStep:c=!1})=>aa(O,{className:i(n),background:s,idSection:e,children:aa(Ud,{dataHeading:o,template:l,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:m,isStep:c})});import{ChevronLeft as Yd,ChevronRight as Zd}from"lucide-react";import{Fragment as Kd,jsx as ze,jsxs as On}from"react/jsx-runtime";function Vn({current:e,total:o,onChange:t}){let a=r=>ze("li",{children:ze("button",{className:i(Kt({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return ze("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:On("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&ze("li",{children:ze("button",{className:i(Kt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:ze(Yd,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):On(Kd,{children:[a(1),e===1&&[a(2),a(3)],e>3&&ze("li",{children:ze("button",{className:i(Kt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e-3),children:"..."})}),e>2&&e!==1&&e!==o&&a(e-1),e>1&&e<o&&a(e),e<o-1&&e!==1&&a(e+1),e===o&&[a(o-2),a(o-1)],e<o-2&&e!==o&&ze("button",{className:i(Kt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&ze("li",{children:ze("button",{className:i(Kt({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:ze(Zd,{className:"h-4 w-4"})})})]})})}import{forwardRef as Jd}from"react";import{QuestionMarkCircleIcon as ep}from"@heroicons/react/24/outline";import{XCircleIcon as tp}from"@heroicons/react/24/solid";import{jsx as Do,jsxs as Wn}from"react/jsx-runtime";var Wr=Jd(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...m},c)=>Wn("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&Do("span",{className:i("mobase-text-area-label absolute -top-2.5 left-2 z-[1] bg-white px-1.5 text-sm text-gray-500",s===2&&" -top-2.5 text-sm"),children:a}),Do("textarea",{disabled:e,ref:c,className:i("mobase-text-area-box block w-full rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-500 focus:border-pink-500 disabled:border-gray-200 disabled:bg-gray-50",s===2&&"text-base",n),rows:l,...m}),t&&Wn("div",{className:"mobase-text-area-message mt-0.5 flex items-center space-x-1",children:[o?Do(tp,{width:16,height:16,className:"text-red-500"}):Do(ep,{width:16,height:16,className:"text-gray-500"}),Do("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),Do("style",{children:`
|
|
70
|
+
`})]}),Yt=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...m})=>D($e,{...m,children:D(Le,{className:i("h-auto max-h-screen overflow-hidden border-0 md:max-h-screen md:max-w-2xl lg:max-w-3xl [&>button>svg]:text-white",e),size:"xl",positionRightCloseBtn:!0,children:D(Je,{className:"p-0",children:pe("div",{className:"flex flex-row flex-wrap",children:[D("div",{className:"hidden flex-none w-full sm:block md:w-5/12",children:o||pe("div",{className:"grid grid-cols-1 gap-y-6 px-5 py-8 text-sm",children:[pe("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),pe("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 1 :"}),D("div",{className:"mt-1 text-gray-500",children:l?"M\u1EDF app MoMo ho\u1EB7c \u1EE9ng d\u1EE5ng ng\xE2n h\xE0ng/v\xED \u0111i\u1EC7n t\u1EED ch\u1EA5p nh\u1EADn m\xE3 v\u1EA1ch t\u1EEB QR \u0110a N\u0103ng":"M\u1EDF \u1EE9ng d\u1EE5ng camera m\u1EB7c \u0111\u1ECBnh ho\u1EB7c \u1EE9ng d\u1EE5ng h\u1ED7 tr\u1EE3 QR code c\u1EE7a b\u1EA1n"})]})]}),pe("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),pe("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 2 :"}),D("div",{className:"mt-1 text-gray-500",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),pe("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),pe("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 3 :"}),pe("div",{className:"mt-1 text-gray-500",children:["B\u1EA5m v\xE0o th\xF4ng b\xE1o hi\u1EC3n th\u1ECB \u0111\u1EC3 t\u1EA3i \u1EE9ng d\u1EE5ng ho\u1EB7c"," ",a||"Truy c\u1EADp ngay"]})]})]})]})}),D("div",{className:"flex justify-center items-center w-full h-auto md:w-7/12",style:{background:"url(https://homepage.momocdn.net/jk/momo2020/img/intro/qrcode-pattern.png) 10px 10px no-repeat,linear-gradient(to top,#c1177c,#e11b90)"},children:pe("div",{className:"px-5 py-10 text-center",children:[t&&D("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),pe("div",{className:"relative",children:[l&&D("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:D("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),D(sc,{img:r,isQrForAll:l,children:n&&D(nc,{value:n,size:215,imageSettings:{src:`${s||"https://homepage.momocdn.net/pwa/images/logoMomox50.png"}`,height:50,width:50,excavate:!0},level:"H"})})]})]})})]})})})});import{useState as gc}from"react";import{useEffect as lc,useLayoutEffect as mc,useState as cc}from"react";import dc from"ua-parser-js";var pc=()=>dc().device.type==="mobile",fc=typeof window<"u"?mc:lc,yo=()=>{let[e,o]=cc(!1);return fc(()=>{o(pc())},[]),e};import{Fragment as uc,jsx as Ca,jsxs as vc}from"react/jsx-runtime";var Ge=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,...s})=>{let[l,m]=gc(!1),c=yo(),d=!!a?.qrLink,p=()=>{let z=d?a?.qrLink:e;return typeof z=="string"?z.trim():""},g=()=>{let z=p();!z&&typeof e!="function"||(typeof e=="function"?e():window.open(z,o?"_blank":"_self"))},v=(z,_=0)=>{let F=document.querySelector(z);if(!F)return;let N=F.getBoundingClientRect().top+window.scrollY-_;window.scrollTo({top:N,behavior:"smooth"})},P=()=>{typeof e=="string"&&e.startsWith("#")?v(e,t):g()},w=()=>vc(uc,{children:[Ca(Ae,{...s,className:r,onClick:()=>m(!0),"data-name":"button-action-with-qr",children:n}),Ca(Yt,{...a,open:l,onOpenChange:()=>m(!1),qrLink:a?.qrLink||""})]});return d?c?a?.isQrForAll?w():Ca(Ae,{...s,className:r,onClick:g,"data-name":"button-action-with-qr",children:n}):w():Ca(Ae,{...s,onClick:P,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};import*as wo from"react";import{ChevronRightIcon as hc,DotsHorizontalIcon as xc}from"@radix-ui/react-icons";import{Slot as bc}from"@radix-ui/react-slot";import{jsx as Nt,jsxs as yc}from"react/jsx-runtime";var Xi=wo.forwardRef(({className:e,...o},t)=>Nt("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));Xi.displayName="Breadcrumb";var Yi=wo.forwardRef(({className:e,...o},t)=>Nt("ol",{ref:t,className:i("flex items-center gap-2 break-words text-sm overflow-x-auto snap-mandatory snap-x [&::-webkit-scrollbar]:hidden",e),...o}));Yi.displayName="BreadcrumbList";var Zi=wo.forwardRef(({className:e,...o},t)=>Nt("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));Zi.displayName="BreadcrumbItem";var Ki=wo.forwardRef(({asChild:e,className:o,...t},a)=>Nt(e?bc:"a",{ref:a,className:i("transition-colors hover:text-foreground",o),...t}));Ki.displayName="BreadcrumbLink";var Ji=wo.forwardRef(({className:e,...o},t)=>Nt("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));Ji.displayName="BreadcrumbPage";var en=({children:e,className:o,...t})=>Nt("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??Nt(hc,{className:"w-2 h-2"})});en.displayName="BreadcrumbSeparator";var tn=({className:e,...o})=>yc("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[Nt(xc,{className:"w-4 h-4 text-gray-900"}),Nt("span",{className:"sr-only",children:"More"})]});tn.displayName="BreadcrumbElipssis";import Dr from"html-react-parser";import{createContext as wc,useContext as on}from"react";import{jsx as jo}from"react/jsx-runtime";var Cr=wc({align:"center"}),Rr=({color:e="pink",size:o="small",isTruncated:t=!1,className:a,children:r})=>{let n={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},s={small:"text-sm",large:"text-lg"};return jo("div",{className:i("mb-1 font-semibold",n[e],s[o],t&&"truncate",a),children:r})},Tr=({tagHeading:e="h2",size:o="small",color:t="pink",isTruncated:a=!1,className:r,children:n})=>{let s=e,l={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},m={small:"lg:text-3xl text-2xl",large:"lg:text-4xl md:text-3xl text-2xl"},{align:c}=on(Cr);return jo(s,{className:i("max-w-4xl font-bold",c==="center"?"mx-auto":c==="right"?"ml-auto":"",l[t],m[o],a&&"truncate",r),children:n})},kr=({color:e="regular",size:o="small",marginTop:t="spacingX",isTruncated:a=!1,className:r,children:n})=>{let s={regular:"text-gray-500",white:"text-white/80"},l={small:"text-base",large:"md:text-lg text-base"},m={none:"",spacingX:"mt-2",spacingM:"mt-3",spacingL:"mt-4",spacingXl:"mt-5",spacing2Xl:"mt-6"},{align:c}=on(Cr);return jo("div",{className:i(c==="center"?"mx-auto max-w-2xl":c==="right"?"ml-auto max-w-4xl":"max-w-4xl",s[e],l[o],m[t],a&&"truncate",r),children:n})},Sr=({className:e,align:o="center",children:t})=>jo("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:jo(Cr.Provider,{value:{align:o},children:t})});import{jsx as Zt,jsxs as Nc}from"react/jsx-runtime";var O=({idSection:e,className:o,background:t,children:a})=>Zt("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:Zt("div",{className:"wrapper relative",children:a})}),h=({align:e="center",tagline:o,title:t,description:a,tagHeading:r="h2",colorScheme:n="pink",sizeHeading:s="small",className:l})=>{let m=n==="black"?"pink":n==="pink"?"regular":"white",c=n==="pink"?"pink":n==="white"?"white":"regular",d=n==="white"?"white":"regular";return!t&&!a&&!o?null:Nc(Sr,{align:e,className:l,children:[o&&Zt(Rr,{color:m,children:o}),t&&Zt(Tr,{tagHeading:r,color:c,size:s,children:Dr(t)}),a&&Zt(kr,{color:d,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:Dr(a)})]})},x=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:Zt("div",{className:i("buttons-block mt-8 flex w-full gap-4 md:mt-10",e==="center"&&"justify-center",e==="right"&&"justify-end",o&&"flex-wrap md:flex-nowrap",a),children:t?.slice(0,2).map((r,n)=>{if(!r)return null;let{btnName:s,...l}=r;return Zt(Ge,{...l,className:i(o&&"w-full md:w-auto",r?.className),children:Dr(s)},n)})});import Hc,{memo as _c}from"react";import{ArrowDownIcon as Bc}from"@heroicons/react/20/solid";import Oc from"html-react-parser";import{createContext as Tc,useCallback as kc,useContext as Mr,useEffect as Sc,useRef as Dc,useState as Mc}from"react";import{ChevronLeft as Ic,ChevronRight as Ac}from"lucide-react";import*as an from"react";import{Slot as Pc}from"@radix-ui/react-slot";import{cva as Cc}from"class-variance-authority";import{jsx as Rc}from"react/jsx-runtime";var Kt=Cc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent",{variants:{variant:{primary:"bg-pink-500 text-white hover:bg-pink-600 disabled:bg-pink-300",secondary:"bg-white text-gray-900 hover:bg-gray-100 disabled:text-gray-400 disabled:bg-white border-gray-300",outline:"border-pink-500 text-pink-500 bg-white hover:bg-pink-50 disabled:bg-white disabled:border-pink-300 disabled:text-pink-300",tonal:"bg-pink-100 text-pink-500 hover:bg-pink-200 disabled:bg-gray-200 disabled:text-gray-400",danger:"bg-red-500 text-white hover:bg-red-600 disabled:bg-red-300",transparent:"text-gray-900 bg-transparent hover:bg-gray-100 disabled:text-gray-400 disabled:bg-transparent"},size:{default:"text-sm h-10 w-10",sm:"h-8 w-8 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{variant:"primary",size:"default"}}),ie=an.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Pc:"button",m=i(Kt({variant:o,size:t,className:e}));return Rc(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ie.displayName="IconButton";import{Fragment as Lc,jsx as Et,jsxs as rn}from"react/jsx-runtime";var Ra=Tc(void 0),Pt=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=Dc(null),[n,s]=Mc({left:!1,right:!1}),l=kc(()=>{let c=r.current;if(c){let{scrollLeft:d,scrollWidth:p,clientWidth:g}=c;s({left:d>0,right:Math.ceil(d+g)<p})}},[]);Sc(()=>{let c=r.current;if(c)return l(),window.addEventListener("resize",l),c.addEventListener("scroll",l),()=>{window.removeEventListener("resize",l),c.removeEventListener("scroll",l)}},[l]);let m=c=>{let d=r.current;if(d){let{scrollLeft:p,clientWidth:g,scrollWidth:v}=d,P=g*.7*(c==="left"?-1:1),w=p+P;w<0?w=0:w>v-g&&(w=v-g),d.scrollTo({left:w,behavior:"smooth"})}};return Et(Ra.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:m,gradientOverlayColor:o},children:rn("div",{className:i("relative w-full",t),children:[e&&rn(Lc,{children:[n.left&&Et("div",{className:"pointer-events-none absolute left-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient( to left, rgba(255, 255, 255, 0),rgb(${o}),rgb(${o}))`}}),n.right&&Et("div",{className:"pointer-events-none absolute right-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient(to right, rgba(255, 255, 255, 0), rgb(${o}),rgb(${o}))`}})]}),a]})})},Ct=({className:e,children:o})=>{let t=Mr(Ra);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return Et("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},Rt=({className:e,children:o,...t})=>{let a=Mr(Ra);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?Et(ie,{className:i("pointer-events-auto absolute left-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("left"),"aria-label":"Scroll left",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Et(Ic,{className:"h-4 w-4"})}):null},Tt=({className:e,children:o,...t})=>{let a=Mr(Ra);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?Et(ie,{className:i("pointer-events-auto absolute right-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("right"),"aria-label":"Scroll right",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Et(Ac,{className:"h-4 w-4"})}):null};import*as Ta from"react";import*as je from"@radix-ui/react-tabs";import{jsx as Ir}from"react/jsx-runtime";var kt=je.Root,et=Ta.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>Ir(je.List,{ref:r,className:i("inline-flex w-full flex-row items-center space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden",`text-${o}`,t&&"border-b border-gray-200",e),...a}));et.displayName=je.List.displayName;var tt=Ta.forwardRef(({className:e,...o},t)=>Ir(je.Trigger,{ref:t,className:i("ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap border-b-2 border-transparent py-3 font-semibold text-gray-900 transition-all hover:text-pink-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-pink-500 data-[state=active]:text-pink-500",e),...o}));tt.displayName=je.Trigger.displayName;var ot=Ta.forwardRef(({className:e,...o},t)=>Ir(je.Content,{ref:t,className:i("ring-offset-background focus-visible:ring-ring mt-3 text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",e),...o}));ot.displayName=je.Content.displayName;import*as nn from"react";import{Slot as Fc}from"@radix-ui/react-slot";import{cva as zc}from"class-variance-authority";import{jsx as Ec}from"react/jsx-runtime";var sn=zc("inline-flex items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent flex-nowrap",{variants:{variant:{default:"text-blue-700 hover:underline hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",primary:"text-pink-500 hover:underline hover:bg-pink-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",secondary:"text-gray-700 hover:underline hover:text-blue-700 hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline"},size:{default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),fe=nn.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Fc:"button",m=i(sn({variant:o,size:t,className:e}));return Ec(l,{className:m,disabled:r,ref:s,...n,children:n.children})});fe.displayName="TextButton";import{Fragment as ln,jsx as G,jsxs as at}from"react/jsx-runtime";var Vc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return at(ln,{children:[G("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:G("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:at("picture",{children:[G("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),G("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),at("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&G(fe,{variant:"default",className:"shink-0 mb-0.5 line-clamp-1 block justify-start whitespace-normal text-left text-xs md:hidden",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),G("div",{className:"text-sm font-medium text-gray-900 line-clamp-3 group-hover:text-pink-500 md:line-clamp-none md:text-base",children:e?.title}),at("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&at(ln,{children:[G(fe,{variant:"default",className:"justify-start hidden text-xs text-left whitespace-normal shink-0 md:line-clamp-1 md:block",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&G("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&G("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},ka=_c(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,p,g)=>{d?.preventDefault(),d?.stopPropagation(),a?a(p):window.open(g,"_blank")},c=(d,p)=>at("div",{children:[G("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",d?.blogList?.length<3?"md:justify-center":""),children:d?.blogList?.map((g,v)=>G("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:G("div",{onClick:P=>m(P,g?.id,g?.url),className:i("group flex cursor-pointer flex-row md:flex-col",d?.classNameItem),children:G(Vc,{blog:g})},g?.id)},v))}),d?.isShowBtn&&G("div",{className:"flex items-center justify-center w-full mt-8",children:at(Ge,{action:r?()=>r?.(p):d?.btnUrl,newTab:d?.isNewTab,variant:"outline",children:[Oc(d.btnName||"Xem th\xEAm"),d?.isLoading?G(ho,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!d?.btnUrl&&G(Bc,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},d?.title||p);return at(Hc.Fragment,{children:[e&&G(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t?.length>1?at(kt,{defaultValue:t[0]?.title,children:[at(Pt,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[G(Ct,{className:"mb-6 text-center",children:G(et,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((d,p)=>G(tt,{value:d.title,children:d.title},d.title+p))})}),G(Rt,{}),G(Tt,{})]}),t.map((d,p)=>G(ot,{value:d.title,children:c(d,p)},d.title+p))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import Qc,{memo as Uc,useEffect as qc,useState as dn}from"react";import{ChevronLeftIcon as Xc,ChevronRightIcon as Yc}from"@heroicons/react/20/solid";import pn from"html-react-parser";import*as V from"react";import{ChevronLeftIcon as Wc,ChevronRightIcon as $c}from"@heroicons/react/20/solid";import Gc from"embla-carousel-react";import{Fragment as jc,jsx as Fe,jsxs as cn}from"react/jsx-runtime";var mn=V.createContext(null);function Qo(){let e=V.useContext(mn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var ge=V.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[m,c]=Gc({align:"start",...o,axis:e==="horizontal"?"x":"y"},a),[d,p]=V.useState(!1),[g,v]=V.useState(!1),P=V.useCallback(_=>{_&&(p(_.canScrollPrev()),v(_.canScrollNext()))},[]),w=V.useCallback(()=>{c?.scrollPrev()},[c]),C=V.useCallback(()=>{c?.scrollNext()},[c]),z=V.useCallback(_=>{_.key==="ArrowLeft"?(_.preventDefault(),w()):_.key==="ArrowRight"&&(_.preventDefault(),C())},[w,C]);return V.useEffect(()=>{!c||!t||t(c)},[c,t]),V.useEffect(()=>{if(c)return P(c),c.on("reInit",P),c.on("select",P),()=>{c?.off("select",P)}},[c,P]),Fe(mn.Provider,{value:{carouselRef:m,api:c,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:w,scrollNext:C,canScrollPrev:d,canScrollNext:g},children:Fe("div",{ref:l,onKeyDownCapture:z,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});ge.displayName="Carousel";var ue=V.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=Qo();return Fe("div",{ref:r,className:i("overflow-hidden",o),children:Fe("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ue.displayName="CarouselContent";var le=V.forwardRef(({className:e,...o},t)=>{let{orientation:a}=Qo();return Fe("div",{ref:t,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",e),...o})});le.displayName="CarouselItem";var No=V.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=Qo();return cn(ie,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[Fe(Wc,{className:"h-6 w-6"}),Fe("span",{className:"sr-only",children:"Previous slide"})]})});No.displayName="CarouselPrevious";var Po=V.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=Qo();return cn(ie,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[Fe($c,{className:"h-6 w-6"}),Fe("span",{className:"sr-only",children:"Next slide"})]})});Po.displayName="CarouselNext";var Co=V.forwardRef((e,o)=>{let{api:t}=Qo(),[,a]=V.useState(!1),r=V.useCallback(()=>a(l=>!l),[]);V.useEffect(()=>{if(t)return t.on("select",r),t.on("reInit",r),()=>{t.off("select",r),t.off("reInit",r)}},[t,r]);let n=t?.scrollSnapList().length||0,s=t?.selectedScrollSnap()||0;return n>1?Fe("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,m)=>Fe(ie,{className:`navigation-item mx-1 h-1.5 w-1.5 rounded-full p-0 ${m===s?"navigation-item-active scale-125 transform bg-gray-500 hover:bg-gray-500/90":"bg-gray-200 hover:bg-gray-100"}`,"aria-label":`Go to slide ${m+1}`,onClick:()=>t?.scrollTo(m)},m))}):Fe(jc,{})});Co.displayName="CarouselDots";import{Fragment as Sa,jsx as j,jsxs as Qe}from"react/jsx-runtime";var Zc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return Qe(Sa,{children:[j("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:j("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),Qe("div",{className:"mt-4 md:pr-3",children:[j("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&j("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:pn(e?.description??"")}),Qe("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&Qe(Sa,{children:[j(fe,{variant:"default",className:"shink-0 justify-start whitespace-normal text-left text-sm md:line-clamp-1 ",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&j("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&j("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},Kc=({dataBlog:e,setCarouselRef:o,carouselRef:t,setCurrent:a,handleOnClickItem:r})=>{let{blogList:n=[],isShowBtn:s,btnName:l,btnUrl:m="#",isNewTab:c,classNameItem:d}=e??{};return qc(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),Qe(Sa,{children:[j(ge,{opts:{dragFree:!1},setApi:o,className:"w-full",children:j(ue,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(p=>j(le,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:j("div",{onClick:g=>r(g,p?.id,p?.url),className:i("group cursor-pointer",d),children:j(Zc,{blog:p})},p?.id)},p?.id))})}),s&&j("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:Qe(Ge,{action:m&&m,newTab:c,variant:"outline",children:[pn(l||"Xem th\xEAm")," "]})})]})},Jc=({carouselRef:e})=>Qe(ie,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[j(Xc,{className:"h-6 w-6"}),j("span",{className:"sr-only",children:"Previous slide"})]}),ed=({carouselRef:e})=>Qe(ie,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[j(Yc,{className:"h-6 w-6"}),j("span",{className:"sr-only",children:"Next slide"})]}),Ar=Uc(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(c,d,p)=>{c?.preventDefault(),c?.stopPropagation(),t?t(d):window.open(p,"_blank")},[n,s]=dn(null),[,l]=dn(0),m=()=>n?Qe("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[j(Jc,{carouselRef:n}),j(ed,{carouselRef:n})]}):j(Sa,{});return Qe(Qc.Fragment,{children:[Qe("div",{className:" flex items-center justify-between",children:[e&&j(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"left",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),j(m,{})]}),j(Kc,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});import{Fragment as rd,jsx as Ro}from"react/jsx-runtime";var td=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return Ro(ka,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return Ro(Ar,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return Ro(ka,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},od=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>Ro(rd,{children:td({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),ad=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>Ro(O,{className:i("overflow-hidden",r),idSection:a,background:n,children:Ro(od,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:m})});import*as Ma from"react";import{enUS as ld,vi as md}from"date-fns/locale";import{ChevronLeft as cd,ChevronRight as dd}from"lucide-react";import pd from"lunisolar";import{DayPicker as fd}from"react-day-picker";import*as fn from"react";import*as Uo from"@radix-ui/react-checkbox";import{CheckIcon as id}from"@heroicons/react/16/solid";import{cva as gn}from"class-variance-authority";import{jsx as Lr}from"react/jsx-runtime";var nd=gn("peer shrink-0 rounded border-2 disabled:bg-gray-300 border-gray-300 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:bg-gray-100 data-[state=checked]:border-none disabled:data-[state=checked]:bg-gray-400 disabled:data-[state=checked]:text-gray-100 data-[state=checked]:bg-pink-500 data-[state=checked]:text-white",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),sd=gn("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),Da=fn.forwardRef(({className:e,size:o,...t},a)=>Lr(Uo.Root,{ref:a,className:i(nd({size:o}),e),...t,children:Lr(Uo.Indicator,{className:i("flex items-center justify-center text-current"),children:Lr(id,{className:i(sd({size:o}))})})}));Da.displayName=Uo.Root.displayName;import{Fragment as xd,jsx as rt,jsxs as Fr}from"react/jsx-runtime";var gd=({date:e,cusContent:o})=>{let t=null;return t=pd(e).lunar,Fr(xd,{children:[o?o(e):e.getDate(),t&&rt("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},ud={formatCaption:e=>`Th\xE1ng ${e.getMonth()+1}/${e.getFullYear()}`,formatWeekdayName:e=>{let o=e.getDay();return["CN","T2","T3","T4","T5","T6","T7"][o]}};function vd({isShow:e,setIsShow:o,lang:t}){let a=Ma.useId();return rt("div",{className:"w-full p-3 pt-0",children:Fr("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[rt(Da,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),rt("label",{htmlFor:`check-show-luna-${a}`,className:"z-[1] cursor-pointer text-sm leading-none text-gray-900 peer-disabled:cursor-default peer-disabled:text-gray-400",children:t==="vi"?"Hi\u1EC7n ng\xE0y \xE2m l\u1ECBch":"Show lunar date"})]})})}var hd=e=>e.getDay()===0||e.getDay()===6;function Ia({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,m]=Ma.useState(!0);return rt(fd,{locale:r==="vi"?md:ld,showOutsideDays:t,className:i("b w-fit rounded-b-md border border-gray-200 bg-white shadow-md",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-y-0",month:"p-3 pt-0 w-full",caption:"flex justify-center p-3 bg-blue-50 relative items-center -mx-3 mb-3",caption_label:"text-sm font-medium text-gray-900",nav:"space-x-1 flex items-center",nav_button:i(Ke({variant:"transparent"}),"h-7 w-7 p-0 text-gray-900 hover:bg-transparent hover:opacity-70"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse",head_row:"flex space-x-0.5",head_cell:i("w-11 rounded-md text-xs font-medium text-gray-500 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),row:"flex w-full mt-0.5 space-x-0.5",cell:"h-11 w-11 text-center text-sm p-0 relative border-none",day:i(Ke({variant:"transparent"}),"group relative h-11 w-11 p-0 text-center text-sm font-semibold focus-within:relative focus-within:z-20 aria-selected:opacity-100 [&.day-range-end.day-range-start]:rounded-md aria-selected:[&:not(.day-range-middle)]:bg-pink-500 aria-selected:[&:not(.day-range-middle)]:text-white",a&&l&&"show-luna"),day_range_end:"day-range-end [&.day-range-end]:rounded-l-none",day_range_start:"day-range-start [&.day-range-start]:rounded-r-none",day_today:"day-today [&:not([aria-selected])]:text-pink-500 [&:not([aria-selected])]:border-gray-200",day_outside:"day-outside opacity-50 aria-selected:bg-accent/50 aria-selected:opacity-30",day_disabled:"opacity-50",day_range_middle:i("group/mid day-range-middle !rounded-none !bg-pink-50 text-gray-900 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),day_hidden:"invisible",...o},modifiers:{weekend:hd},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>rt(cd,{className:"h-6 w-6"}),IconRight:()=>rt(dd,{className:"h-6 w-6"}),DayContent:c=>rt(gd,{date:c.date,cusContent:n}),Months:({children:c})=>Fr("div",{className:"w-full",children:[rt("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:c}),a&&rt(vd,{isShow:l,setIsShow:m,lang:r})]})},formatters:r==="vi"?ud:{},...s})}Ia.displayName="Calendar";import{QuestionMarkCircleIcon as bd,XCircleIcon as yd}from"@heroicons/react/16/solid";import{format as Aa}from"date-fns";import{Calendar as wd}from"lucide-react";import*as vn from"react";import*as St from"@radix-ui/react-popover";import{jsx as un}from"react/jsx-runtime";var qo=St.Root,Xo=St.Trigger,To=vn.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>un(St.Portal,{children:un(St.Content,{ref:r,align:o,sideOffset:t,className:i("z-50 w-72 rounded-md border border-gray-200 bg-white p-4 sm:p-5 text-gray-900 shadow-small outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));To.displayName=St.Content.displayName;import{Fragment as hn,jsx as Re,jsxs as Yo}from"react/jsx-runtime";var Nd=({label:e,placeholder:o="Select a value",size:t=1,message:a,isError:r,disabled:n,dateFormat:s="dd/MM/yyyy",buttonProps:l,popoverProps:m,calendarProps:c,popoverContentProps:d})=>{let p=c?.selected||null;return Yo("div",{children:[Yo(qo,{...m,children:[Re(Xo,{asChild:!0,children:Yo(Ae,{variant:"secondary",className:i("relative h-11 w-full justify-between overflow-visible text-left text-sm font-normal text-gray-900 ring-inset hover:ring-1 hover:ring-gray-400 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 [&[data-state=open]]:border-pink-500 [&[data-state=open]]:ring-1 [&[data-state=open]]:ring-pink-500",t===2&&"h-12 text-base",(!p||!(p instanceof Date)&&typeof p=="object"&&(!("from"in p)||!p.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[Re("div",{className:"line-clamp-1 flex-1",children:p instanceof Date?Aa(p,s):p&&typeof p=="object"&&"from"in p&&"to"in p?Re(hn,{children:p.from?p.to?Yo(hn,{children:[Re("span",{className:"date-from",children:Aa(p.from,s)})," ",Re("span",{className:"date-separator",children:"-"}),Re("span",{className:"date-to",children:Aa(p.to,s)})]}):Aa(p.from,s):o}):o}),e&&Re("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",t===2&&" -top-2.5 text-sm",r&&"text-red-500"),children:e}),Re(wd,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),Re(To,{className:"w-auto border-none !p-0",...d,children:Re(Ia,{...c,defaultMonth:p&&typeof p=="object"&&"from"in p?p.from:p instanceof Date?p:void 0})})]}),a&&Yo("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?Re(yd,{width:16,height:16,className:"text-red-500"}):Re(bd,{width:16,height:16,className:"text-gray-500"}),Re("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};import{useEffect as kd,useState as Cn}from"react";import{QuestionMarkCircleIcon as Sd,XCircleIcon as Dd}from"@heroicons/react/16/solid";import{isValid as Md}from"date-fns";import*as it from"react";import{CheckIcon as Pd,ChevronDownIcon as xn,ChevronUpIcon as Cd,XCircleIcon as Rd}from"@heroicons/react/16/solid";import{QuestionMarkCircleIcon as Td}from"@heroicons/react/24/outline";import*as S from"@radix-ui/react-select";import{jsx as Q,jsxs as Zo}from"react/jsx-runtime";var Ko=it.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},m)=>Zo("div",{ref:m,className:i("select-mobase relative",e,s?"disabled":"",n?"[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-1 [&>.select-mobase-button]:ring-red-500":"",r===2?"[&>.select-mobase-button]:h-12 [&>.select-mobase-button]:text-base":""),children:[t&&Q("span",{className:i("mobase-select-label absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",r===2&&"-top-2.5 text-sm",n&&"text-red-500"),children:t}),Q(S.Root,{disabled:s,...l,children:o}),a&&Zo("div",{className:i("mobase-select-message mt-1 flex items-center space-x-1 text-gray-500",n&&"text-red-500"),children:[n?Q(Rd,{width:16,height:16}):Q(Td,{width:16,height:16}),Q("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),Jo=S.Value,ko=it.forwardRef(({className:e,children:o,...t},a)=>Zo(S.Trigger,{ref:a,className:i("select-mobase-button flex h-11 w-full items-center justify-between rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 ring-0 ring-inset transition-all hover:ring-1 hover:ring-gray-400 focus-visible:border-pink-500 focus-visible:ring-1 focus-visible:!ring-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 data-[state=open]:border-pink-500 data-[placeholder]:text-gray-500 data-[state=open]:ring-1 data-[state=open]:ring-pink-500",e),...t,children:[Q("div",{className:"line-clamp-1 text-left",children:o}),Q(S.Icon,{asChild:!0,children:Q(xn,{className:"h-4 w-4 flex-none text-gray-500"})})]}));ko.displayName=S.Trigger.displayName;var zr=it.forwardRef(({className:e,...o},t)=>Q(S.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:Q(Cd,{className:"h-5 w-5"})}));zr.displayName=S.ScrollUpButton.displayName;var Er=it.forwardRef(({className:e,...o},t)=>Q(S.ScrollDownButton,{ref:t,className:i("flex cursor-default items-center justify-center bg-gradient-to-t from-white to-transparent py-1",e),...o,children:Q(xn,{className:"h-5 w-5"})}));Er.displayName=S.ScrollDownButton.displayName;var So=it.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>Q(S.Portal,{children:Zo(S.Content,{ref:r,className:i("shadow-small data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...a,children:[Q(zr,{}),Q(S.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),Q(Er,{})]})}));So.displayName=S.Content.displayName;var ea=it.forwardRef(({className:e,children:o,...t},a)=>Q(S.Group,{ref:a,className:i("relative border-b border-gray-200 p-1 after:w-full last:border-0",e),...t,children:o})),bn=it.forwardRef(({className:e,...o},t)=>Q(S.Label,{ref:t,className:i("z-[1] py-1.5 pl-7 pr-2 text-sm font-semibold",e),...o}));bn.displayName=S.Label.displayName;var Ht=it.forwardRef(({className:e,children:o,...t},a)=>Zo(S.Item,{ref:a,className:i("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-7 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[Q("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:Q(S.ItemIndicator,{children:Q(Pd,{className:"h-4 w-4 text-pink-500"})})}),Q(S.ItemText,{children:o})]})),yn=it.forwardRef(({className:e,...o},t)=>Q(S.Separator,{ref:t,className:i("-mx-1 my-1 h-px",e),...o}));yn.displayName=S.Separator.displayName;var wn=["Th\xE1ng 01","Th\xE1ng 02","Th\xE1ng 03","Th\xE1ng 04","Th\xE1ng 05","Th\xE1ng 06","Th\xE1ng 07","Th\xE1ng 08","Th\xE1ng 09","Th\xE1ng 10","Th\xE1ng 11","Th\xE1ng 12"],Nn=["January","February","March","April","May","June","July","August","September","October","November","December"],Hr=(e,o,t,a)=>{let r=new Date(e,o,0).getDate(),n=t&&e===t.getFullYear()&&o===t.getMonth()+1?t.getDate():1,s=a&&e===a.getFullYear()&&o===a.getMonth()+1?a.getDate():r;return{daysInMonth:r,startDay:n,endDay:s}},Pn=(e,o,t,a)=>{let r=t?t.getFullYear():e,n=a?a.getFullYear():o;return Array.from({length:n-r+1},(s,l)=>n-l)};import{jsx as te,jsxs as nt}from"react/jsx-runtime";var Id=({label:e,selected:o,onSelect:t,size:a=1,message:r,isError:n,disabled:s,dateFormat:l="dd/MM/yyyy",lang:m="vi",fromYear:c=1900,toYear:d=new Date().getFullYear(),disableUnselect:p=!1})=>{let[g,v]=Cn(o??null),P=Math.min(c,d),w=Math.max(c,d),C=l==="MM/yyyy",z=(N,B)=>{if(B===0){v(void 0),t?.(void 0);return}let L=g?.getFullYear()||new Date().getFullYear(),Ve=g?.getMonth()??0,We=g?.getDate()??1;N==="month"&&B!==null&&(Ve=B-1),N==="year"&&B!==null&&(L=B),C?We=1:N==="day"&&B!==null&&(We=B);let Pa=Hr(L,Ve+1).daysInMonth;We>Pa&&(We=1);let Oo=new Date(L,Ve,We);Md(Oo)&&(v(Oo),t?.(Oo))},[_,F]=Cn(!1),ut=N=>{F(N)};return kd(()=>{v(o??null)},[o]),nt("div",{className:i("relative",s&&"cursor-no-drop"),children:[nt("div",{className:i("relative block h-11 w-full rounded-md border border-gray-300 bg-white px-1 py-3 text-sm text-gray-900 outline-none ring-inset transition-all placeholder:text-gray-500 hover:ring-1 hover:ring-gray-400 focus:border-pink-500 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50",_&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",g?"":"text-gray-500",n&&"border-red-500 ring-1 ring-red-500",s&&"pointer-events-none select-none border-gray-200 bg-gray-50"),children:[e&&te("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",a===2&&" -top-2.5 text-sm",n&&"text-red-500"),children:e}),nt("div",{className:"flex h-full flex-row divide-x",children:[!C&&nt(Ko,{value:g?g.getDate().toString().padStart(2,"0"):"",onValueChange:N=>z("day",parseInt(N,10)),onOpenChange:ut,className:"w-[30%]",children:[te(ko,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:te(Jo,{placeholder:m==="vi"?"Ng\xE0y":"Day"})}),te(So,{onCloseAutoFocus:N=>N.preventDefault(),children:nt(ea,{children:[!p&&te(Ht,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:Hr(g?.getFullYear()||new Date().getFullYear(),(g?.getMonth()??0)+1).daysInMonth},(N,B)=>(B+1).toString().padStart(2,"0")).map(N=>te(Ht,{value:N,children:N},N))]})})]}),nt(Ko,{value:g?(g.getMonth()+1).toString():"",onValueChange:N=>z("month",parseInt(N,10)),onOpenChange:ut,className:i(C?"w-1/2":"w-2/5"),children:[te(ko,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:te(Jo,{placeholder:m==="vi"?"Th\xE1ng":"Month"})}),te(So,{onCloseAutoFocus:N=>N.preventDefault(),children:nt(ea,{children:[!p&&te(Ht,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(N,B)=>B+1).map(N=>te(Ht,{value:N.toString(),children:m==="vi"?wn[N-1]:Nn[N-1]},N))]})})]}),nt(Ko,{value:g?g.getFullYear().toString():"",onValueChange:N=>z("year",parseInt(N,10)),onOpenChange:ut,className:i(C?"w-1/2":"w-[30%]"),children:[te(ko,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:te(Jo,{placeholder:m==="vi"?"N\u0103m":"Year"})}),te(So,{onCloseAutoFocus:N=>N.preventDefault(),children:nt(ea,{children:[!p&&te(Ht,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Pn(P,w).map(N=>te(Ht,{value:N.toString(),children:N},N))]})})]})]})]}),r&&nt("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?te(Dd,{width:16,height:16,className:"text-red-500"}):te(Sd,{width:16,height:16,className:"text-gray-500"}),te("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};import*as Jt from"react";import*as W from"@radix-ui/react-alert-dialog";import{jsx as Dt,jsxs as Fd}from"react/jsx-runtime";var Ad=W.Root,Ld=W.Trigger,Rn=W.Portal,_r=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Overlay,{className:i("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...o,ref:t}));_r.displayName=W.Overlay.displayName;var Tn=Jt.forwardRef(({className:e,...o},t)=>Fd(Rn,{children:[Dt(_r,{}),Dt(W.Content,{ref:t,className:i("fixed left-[50%] w-[90vw] bg-white text-gray-700 border border-gray-300 top-[50%] z-50 grid w- max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-xl",e),...o})]}));Tn.displayName=W.Content.displayName;var kn=({className:e,...o})=>Dt("div",{className:i("flex flex-col space-y-2 text-left",e),...o});kn.displayName="AlertDialogHeader";var Sn=({className:e,...o})=>Dt("div",{className:i("flex flex-row justify-end space-x-4",e),...o});Sn.displayName="AlertDialogFooter";var Dn=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));Dn.displayName=W.Title.displayName;var Mn=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));Mn.displayName=W.Description.displayName;var In=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Action,{ref:t,className:i(Ke({variant:"primary"}),"",e),...o}));In.displayName=W.Action.displayName;var An=Jt.forwardRef(({className:e,...o},t)=>Dt(W.Cancel,{ref:t,className:i(Ke({variant:"secondary"}),e),...o}));An.displayName=W.Cancel.displayName;import{memo as $d,useState as Gd}from"react";import{useEffect as zd,useState as Fn}from"react";import zn from"html-react-parser";import{motion as Ed}from"motion/react";import*as Ln from"@radix-ui/react-aspect-ratio";var E=Ln.Root;import{Fragment as En,jsx as oe,jsxs as ta}from"react/jsx-runtime";var Hd=({guideGroup:e,mockup:o})=>{let[t,a]=Fn(),[r,n]=Fn(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return zd(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),oe(En,{children:e?.stepList&&e?.stepList?.length>0&&ta("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[oe("div",{className:"h-auto w-64 flex-none",children:ta("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&ta(En,{children:[oe("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),oe("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),oe("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),oe("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),oe("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:ta(ge,{setApi:a,children:[oe(ue,{className:"ml-0",children:e?.stepList.map((l,m)=>oe(le,{className:"pl-0",children:oe(E,{ratio:o==="small"?540/960:540/1168,children:l?.image&&oe("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},m))}),oe(No,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),oe(Po,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),oe("div",{className:"flex flex-auto pl-12 pt-4",children:oe("ul",{className:"flex flex-col",children:e?.stepList.map((l,m)=>ta("li",{className:i("relative min-h-20 pb-8 pl-14 after:absolute after:left-4 after:top-0 after:h-full after:border-l after:border-dashed after:border-gray-200 last:min-h-0 last:pb-0 last:after:hidden",m+1===r?"":"cursor-pointer"),onClick:()=>t&&t.scrollTo(m),children:[oe("div",{className:i("absolute -top-1.5 left-0 z-10 flex h-8 w-8 items-center justify-center rounded-full text-sm font-bold",m+1===r?"bg-pink-500 text-white":"bg-pink-100 text-pink-500"),children:m+1}),oe("div",{className:i(" text-sm font-medium",m+1===r?"text-pink-500":"text-gray-900"),children:zn(l.title)}),l.content&&oe(Ed.div,{initial:"closed",animate:m+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:oe("div",{className:"mt-3 text-sm text-gray-700",children:zn(l.content)})})]},m))})})]})})},Br=Hd;import{useEffect as _d,useRef as Bd,useState as La}from"react";import{ChevronRightIcon as Hn}from"@heroicons/react/20/solid";import Od from"embla-carousel-autoplay";import Fa from"html-react-parser";import{Fragment as Or,jsx as y,jsxs as ye}from"react/jsx-runtime";var Vd=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=La(0),[s,l]=La();return _d(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:y($e,{open:e,onOpenChange:o,children:ye(Le,{position:"bottom",height:"full",children:[y(xo,{children:y(bo,{className:"line-clamp-1",children:t?.title})}),ye(Je,{className:"grid overflow-hidden p-0 ",children:[y(ge,{setApi:l,className:" grid overflow-hidden",children:y(ue,{className:"ml-0 h-full",children:t.stepList.map((m,c)=>y(le,{className:"h-full w-full pl-0",children:ye("div",{className:"flex h-full flex-col overflow-y-auto",children:[y("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:y("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:ye("div",{className:i("relative mx-auto w-full",a==="none"?"":"rounded-[2rem] border-8 border-gray-800 bg-gray-800 shadow-md",a==="small"?"px-0.5 py-3":""),children:[a!=="none"&&ye(Or,{children:[y("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),y("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:y(E,{ratio:a==="small"?540/960:540/1168,children:m?.image&&y("img",{src:m.image,className:"size-full object-contain",alt:m.title})})})]})})}),ye("div",{className:"p-5 pb-12",children:[y("div",{className:"font-semibold",children:Fa(m.title)}),m?.content&&y("div",{className:"mt-3 text-sm text-gray-800",children:Fa(m.content)})]})]})},c))})}),y("div",{className:"text-muted-foreground fixed bottom-3 left-1/2 flex -translate-x-1/2 items-center justify-center gap-1.5 rounded-full bg-gray-900/50 px-3 py-1 py-2 text-center text-sm text-gray-700",children:t.stepList.map((m,c)=>y("div",{className:`h-2 w-2 cursor-pointer rounded-full ${c+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(c)},c))})]})]})})},Wd=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=La(!1),[n,s]=La(null),l=Bd(Od({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),m=c=>{s(e?.[c]||null),r(!0)};return e?.length===0?null:ye(Or,{children:[e?.length>1?y("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((c,d)=>ye("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>m(d),children:[y("div",{className:"borde flex h-28 w-20 justify-center overflow-hidden rounded-t-lg bg-gray-100 p-2 pb-0",children:(c?.avatar||c?.stepList?.[0]?.image)&&y("img",{src:c.avatar||c?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:c.title})}),ye("div",{className:i("relative grid min-h-32 flex-1 grid-cols-1 items-center pr-8 ",d+1!=e.length&&"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-gray-200"),children:[ye("div",{className:"py-2",children:[t&&y("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${d+1}`}),y("div",{className:"font-semibold",children:Fa(c.title)}),c?.description&&y("div",{className:"mt-1 text-sm text-gray-500",children:Fa(c.description)})]}),y("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:y(Hn,{className:"h-6 w-6"})})]})]},d))}):e?.[0]&&e[0].stepList?.length>0&&ye("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[y("div",{className:"relative max-h-96 w-full flex-none overflow-hidden",style:{WebkitMask:"linear-gradient(to bottom, rgba(0, 0, 0, 1.0) 95%, rgba(0, 0, 0, 0.3) 98%, transparent 100%)"},children:y("div",{className:"mx-auto h-auto w-72",children:ye("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&ye(Or,{children:[y("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),y("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:y(ge,{plugins:[l.current],children:y(ue,{className:"ml-0",children:e[0]?.stepList.map((c,d)=>y(le,{className:"pl-0",onClick:()=>m(0),children:y(E,{ratio:o==="small"?540/960:540/1168,children:c?.image&&y("img",{src:c.image,className:"size-full object-contain",alt:c.title})})},d))})})})]})})}),y("div",{className:"flex w-full flex-none justify-center",children:ye(fe,{size:"lg",variant:"primary",onClick:()=>m(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",y(Hn,{className:"ml-1 h-5 w-5"})]})})]}),a&&y(Vd,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},_n=Wd;import{Fragment as jd,jsx as me,jsxs as oa}from"react/jsx-runtime";var Bn=({direction:e,className:o})=>{let t=e==="left"?{viewBox:"0 0 20 40",d:"M20 0H0L18 20L0 40H20V0Z",width:"20"}:{viewBox:"0 0 19 40",d:"M0.906128 0H0V40H0.906128L19 20L0.906128 0Z",width:"19"};return me("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:me("path",{d:t.d,fill:"currentColor"})})},Vr=$d(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:m}=o||{},[c,d]=Gd(t?.[0]?.title||"");return oa(jd,{children:[e&&me(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t&&t?.length>0&&oa(uo,{children:[me(Ze,{lessThan:"md",children:me(_n,{dataGuide:t,mockup:r,isStep:n})}),me(Ze,{greaterThan:"sm",children:t?.length>1?oa(kt,{defaultValue:t[0]?.title,onValueChange:p=>d(p),children:[oa(Pt,{showGradientOverlay:s,gradientOverlayColor:l,className:m,children:[me(Ct,{className:"mb-6 text-center",children:me(et,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((p,g)=>{let v=g===t.length-1,P=c===p?.title||"";return oa(tt,{value:p.title,className:i(n?"relative h-10 border-0 bg-pink-100 px-3 first:rounded-l-md first:pl-5 last:rounded-r-md last:pl-3 last:pr-5":"",P&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&g!==0&&me(Bn,{direction:"left",className:i("right-full top-0",P?"text-pink-500":"text-pink-100")}),p.title,n&&!v&&me(Bn,{direction:"right",className:i("left-full top-0",P?"text-pink-500":"text-pink-100")})]},p.title+g)})})}),me(Rt,{}),me(Tt,{})]}),t.map((p,g)=>me(ot,{value:p.title,children:me(Br,{guideGroup:p,mockup:r})},p.title+g))]}):t?.length===1&&t[0]&&me(Br,{guideGroup:t[0],mockup:r})})]}),a&&me(x,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});import{Fragment as Xd,jsx as aa}from"react/jsx-runtime";var Qd=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return aa(Vr,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return aa(Vr,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},Ud=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>aa(Xd,{children:Qd({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),qd=({idSection:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,className:n,background:s,template:l=1,mockup:m="default",isStep:c=!1})=>aa(O,{className:i(n),background:s,idSection:e,children:aa(Ud,{dataHeading:o,template:l,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:m,isStep:c})});import{ChevronLeft as Yd,ChevronRight as Zd}from"lucide-react";import{Fragment as Kd,jsx as ze,jsxs as On}from"react/jsx-runtime";function Vn({current:e,total:o,onChange:t}){let a=r=>ze("li",{children:ze("button",{className:i(Kt({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return ze("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:On("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&ze("li",{children:ze("button",{className:i(Kt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:ze(Yd,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):On(Kd,{children:[a(1),e===1&&[a(2),a(3)],e>3&&ze("li",{children:ze("button",{className:i(Kt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e-3),children:"..."})}),e>2&&e!==1&&e!==o&&a(e-1),e>1&&e<o&&a(e),e<o-1&&e!==1&&a(e+1),e===o&&[a(o-2),a(o-1)],e<o-2&&e!==o&&ze("button",{className:i(Kt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&ze("li",{children:ze("button",{className:i(Kt({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:ze(Zd,{className:"h-4 w-4"})})})]})})}import{forwardRef as Jd}from"react";import{QuestionMarkCircleIcon as ep}from"@heroicons/react/24/outline";import{XCircleIcon as tp}from"@heroicons/react/24/solid";import{jsx as Do,jsxs as Wn}from"react/jsx-runtime";var Wr=Jd(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...m},c)=>Wn("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&Do("span",{className:i("mobase-text-area-label absolute -top-2.5 left-2 z-[1] bg-white px-1.5 text-sm text-gray-500",s===2&&" -top-2.5 text-sm"),children:a}),Do("textarea",{disabled:e,ref:c,className:i("mobase-text-area-box block w-full rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-500 focus:border-pink-500 disabled:border-gray-200 disabled:bg-gray-50",s===2&&"text-base",n),rows:l,...m}),t&&Wn("div",{className:"mobase-text-area-message mt-0.5 flex items-center space-x-1",children:[o?Do(tp,{width:16,height:16,className:"text-red-500"}):Do(ep,{width:16,height:16,className:"text-gray-500"}),Do("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),Do("style",{children:`
|
|
71
71
|
.mobase-text-area-box:hover {
|
|
72
72
|
box-shadow: 0px 0px 0px 1px rgb(var(--mobase-gray-400) / 1) inset;
|
|
73
73
|
}
|
|
@@ -298,7 +298,7 @@ import*as Wo from"react";import{ChevronDownIcon as Zm}from"@heroicons/react/20/s
|
|
|
298
298
|
.mark-vertical-marquee {
|
|
299
299
|
mask: linear-gradient(transparent, black 16px, black calc(100% - 16px), transparent);
|
|
300
300
|
}
|
|
301
|
-
`})]})};import{Fragment as Lu,jsx as co}from"react/jsx-runtime";var Mu=({template:e,dataHeading:o,dataTestimonials:t,dataButtons:a})=>{switch(e){case 1:return co(Ci,{dataHeading:o,dataTestimonials:t,dataButtons:a});case 2:return co(Ql,{dataHeading:o,dataTestimonials:t,dataButtons:a});case 3:return co($l,{dataHeading:o,dataTestimonials:t,dataButtons:a});default:return co(Ci,{dataHeading:o,dataTestimonials:t,dataButtons:a})}},Iu=({template:e,dataHeading:o,dataTestimonials:t,dataButtons:a})=>co(Lu,{children:Mu({template:e,dataHeading:o,dataTestimonials:t,dataButtons:a})}),Au=({template:e=1,background:o,className:t,idSection:a,dataHeading:r,dataTestimonials:n,dataButtons:s})=>co(O,{className:i(e===1&&(n?.length??0)>3?"[&>.wrapper]:max-w-full [&>.wrapper]:md:px-0":"",e===3?"overflow-hidden":"",t),idSection:a,background:o,children:co(Iu,{template:e,dataHeading:r,dataTestimonials:n,dataButtons:s})});import Ul from"html-react-parser";import{Fragment as Fu,jsx as ae,jsxs as po}from"react/jsx-runtime";var ki=({dataFAQ:e,dataHeading:o,dataButtons:t})=>{let a=r=>ae(ht,{type:"single",collapsible:!0,defaultValue:r?.isActiveFistQuestion&&r?.contents?.[0]?.title||"",className:"w-full",children:r?.contents?.map((n,s)=>po(xt,{value:n.title,className:"last:border-none",children:[ae(bt,{className:"md:text-lg",children:n.title}),ae(yt,{className:"prose prose-sm sm:prose-base prose-strong:text-gray-600 max-w-none text-gray-600",children:Ul(n.description)})]},s))});return po("div",{className:"grid grid-cols-1 gap-y-0 md:grid-cols-3 md:gap-x-10",children:[ae("div",{className:"relative",children:po("div",{className:"md:sticky md:top-16",children:[o&&ae(h,{tagline:o.tagline,title:o.title,description:o.description,tagHeading:o.tagHeading||"h2",align:"left",colorScheme:o.colorScheme||"pink",sizeHeading:o.sizeHeading,className:i(o.className)}),t&&ae(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i("hidden md:mt-6 md:flex",t?.className),align:"left"})]})}),e&&e.length>0&&e[0]&&ae("div",{className:"col-span-2",children:a(e[0])}),t&&ae(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i("mt-3 md:hidden",t?.className),align:"center"})]})},ql=({dataFAQ:e,dataHeading:o,dataButtons:t,dataHorizontalScroll:a})=>{let{showGradientOverlay:r=!0,gradientOverlayColor:n,className:s}=a||{},l=m=>ae(ht,{type:"single",collapsible:!0,defaultValue:m?.isActiveFistQuestion&&m?.contents?.[0]?.title||"",className:"w-full",children:m?.contents?.map((c,d)=>po(xt,{value:c.title,className:"last:border-none",children:[ae(bt,{className:"md:text-lg",children:c.title}),ae(yt,{className:"prose prose-sm sm:prose-base prose-strong:text-gray-600 max-w-none text-gray-600",children:Ul(c.description)})]},d))});return po(Fu,{children:[o&&ae(h,{tagline:o.tagline,title:o.title,description:o.description,tagHeading:o.tagHeading||"h2",align:"center",colorScheme:o.colorScheme||"pink",sizeHeading:o.sizeHeading,className:i(o.className)}),e&&po(kt,{defaultValue:e[0]?.title,children:[e?.length>1&&po(Pt,{showGradientOverlay:r,gradientOverlayColor:n,className:s,children:[ae(Ct,{className:"mb-3 text-center",children:ae(et,{className:"mx-auto mb-0 inline-flex w-auto items-center overflow-visible",size:"base",children:e.map((m,c)=>ae(tt,{value:m.title,children:m.title},m.title+c))})}),ae(Rt,{}),ae(Tt,{})]}),e.map((m,c)=>ae(ot,{className:"mx-auto mt-0 max-w-3xl",value:m.title,children:l(m)},m.title+c))]}),t&&ae(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i(t?.className),align:"center"})]})};import{Fragment as _u,jsx as Eo}from"react/jsx-runtime";var zu=({template:e,dataFAQ:o,dataHeading:t,dataButtons:a,dataHorizontalScroll:r})=>{switch(e){case 1:return Eo(ki,{dataFAQ:o,dataHeading:t,dataButtons:a,dataHorizontalScroll:r});case 2:return Eo(ql,{dataFAQ:o,dataHeading:t,dataButtons:a,dataHorizontalScroll:r});default:return Eo(ki,{dataFAQ:o,dataHeading:t,dataButtons:a,dataHorizontalScroll:r})}},Eu=({dataHeading:e,dataFAQ:o,template:t,dataButtons:a,dataHorizontalScroll:r})=>Eo(_u,{children:zu({dataHeading:e,dataFAQ:o,template:t,dataButtons:a,dataHorizontalScroll:r})}),Hu=({dataHeading:e,dataFAQ:o=[],className:t,background:a,idSection:r,dataButtons:n,dataHorizontalScroll:s,template:l=1})=>Eo(O,{className:t,idSection:r,background:a,children:Eo(Eu,{dataHeading:e,dataFAQ:o,template:l,dataHorizontalScroll:s,dataButtons:n})});import Bu,{memo as Ou}from"react";import{ArrowDownIcon as Vu}from"@heroicons/react/20/solid";import Wu from"html-react-parser";import{Fragment as Xl,jsx as Y,jsxs as pt}from"react/jsx-runtime";var $u=({news:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return pt(Xl,{children:[Y("div",{className:"relative block aspect-[1/1] overflow-hidden rounded-md bg-gray-100 md:aspect-[77/37] md:rounded-none",children:pt("picture",{children:[Y("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),Y("img",{className:"h-full w-full object-cover",src:e?.thumbnailMobile,alt:e?.title})]})}),pt("div",{className:"mt-3 flex flex-1 flex-col md:mt-0 md:p-3",children:[Y("div",{className:"line-clamp-2 flex-1 text-sm font-medium text-gray-900 group-hover:text-pink-500 md:line-clamp-none",children:e?.title}),pt("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&pt(Xl,{children:[Y(fe,{variant:"default",className:"shink-0 line-clamp-1 justify-start whitespace-normal text-left text-xs",onClick:t=>o(t,e?.categoryUrl||""),title:e?.category,children:e?.category}),e?.category&&e?.dateTime&&Y("span",{className:"flex-none leading-none",children:"\xB7"})]}),Y("div",{className:"flex-none text-xs text-gray-500",children:e?.dateTime})]})]})]})},Si=Ou(({dataHeading:e,dataHorizontalScroll:o,dataNews:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,p,g)=>{d?.preventDefault(),d?.stopPropagation(),a?a(p):window.open(g,"_blank")},c=(d,p)=>pt("div",{children:[Y("div",{className:i("-mx-2 flex flex-row flex-wrap gap-y-5",d?.newsList?.length<4?"md:justify-center":""),children:d?.newsList?.map((g,v)=>Y("div",{className:"min-w-0 basis-1/2 px-2 lg:basis-1/4",children:Y("div",{onClick:P=>m(P,g?.id,g?.url),className:i("group flex cursor-pointer flex-col overflow-hidden md:h-full md:rounded-md md:bg-white md:shadow-md",d?.classNameItem),children:Y($u,{news:g})},g?.id)},v))}),d?.isShowBtn&&Y("div",{className:"mt-8 flex w-full items-center justify-center",children:pt(Ge,{action:d?.btnUrl||r&&(()=>r?.(p)),newTab:d?.isNewTab,variant:"outline",disabled:d?.isLoading,children:[Wu(d.btnName||"Xem th\xEAm"),d?.isLoading?Y(ho,{className:"animate-spin-loading ml-2 h-5 w-5"}):r&&!d?.btnUrl&&Y(Vu,{className:"-mb-1 ml-2 h-5 w-5 animate-bounce"})]})})]},d?.title||p);return pt(Bu.Fragment,{children:[e&&Y(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t?.length>1?pt(kt,{defaultValue:t[0]?.title,children:[pt(Pt,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[Y(Ct,{className:"mb-6 text-center",children:Y(et,{className:"mx-auto mb-0 inline-flex w-auto items-center overflow-visible",children:t.map((d,p)=>Y(tt,{value:d.title,children:d.title},d.title+p))})}),Y(Rt,{}),Y(Tt,{})]}),t.map((d,p)=>Y(ot,{value:d.title,children:c(d,p)},d.title+p))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import{Fragment as Uu,jsx as ha}from"react/jsx-runtime";var Gu=({template:e,dataNews:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return ha(Si,{dataNews:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return ha(Si,{dataNews:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},ju=({dataHeading:e,dataHorizontalScroll:o,dataNews:t,template:a,onClickModal:r,onClickLoadMore:n})=>ha(Uu,{children:Gu({dataHeading:e,dataHorizontalScroll:o,dataNews:t,template:a,onClickModal:r,onClickLoadMore:n})}),Qu=({idSection:e,dataHeading:o,dataHorizontalScroll:t,dataNews:a=[],className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>ha(O,{className:i(r),background:n,idSection:e,children:ha(ju,{dataHeading:o,dataHorizontalScroll:t,dataNews:a,template:s,onClickModal:l,onClickLoadMore:m})});import{Fragment as Ku,jsx as De,jsxs as Di}from"react/jsx-runtime";var Yl=({dataHeading:e,dataCTA:o,dataButtons:t})=>Di("div",{className:"rounded-2xl block relative overflow-hidden lg:overflow-visible p-6 md:py-14 md:px-10 bg-pink-50",style:{background:o?.background},children:[e&&De(h,{tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,align:"center",colorScheme:e.colorScheme||"black",sizeHeading:e.sizeHeading,className:e.className}),t&&De(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i(t?.className,"mt-0 md:mt-0"),align:"center"})]}),qu=({dataHeading:e,dataCTA:o,dataButtons:t,dataMedia:a})=>Di("div",{className:"grid gap-6 grid-cols-1 md:grid-cols-2 rounded-2xl block relative overflow-hidden lg:overflow-visible p-6 pb-0 md:px-10 bg-pink-700 md:pb-0 md:pt-0",style:o?.background?{background:o.background}:{},children:[Di("div",{className:"md:py-14 flex flex-col justify-center",children:[e&&De(h,{tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,align:"left",colorScheme:e.colorScheme||"white",sizeHeading:e.sizeHeading,className:e.className}),t&&De(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i(t?.className,"mt-0 md:mt-0"),align:"left"})]}),De("div",{className:" max-w-sm mx-auto md:ml-auto md:mr-0 w-full md:pt-10 self-end",children:a&&De(E,{ratio:4/3,children:De("img",{src:a.src,alt:a.alt,className:"h-full w-full rounded-md object-contain"})})})]}),Xu=({template:e,dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r})=>{switch(e){case 1:return De(Yl,{dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r});case 2:return De(qu,{dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r});default:return De(Yl,{dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r})}},Yu=({template:e,dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r})=>De(Ku,{children:Xu({template:e,dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r})}),Zu=({template:e=1,background:o,className:t,idSection:a,dataHeading:r,dataCTA:n,dataButtons:s,dataMedia:l})=>De(O,{className:t,idSection:a,background:o,children:De(Yu,{template:e,dataHeading:r,dataCTA:n,dataButtons:s,dataMedia:l})});import Zl from"react";import Mi from"html-react-parser";import{jsx as qt,jsxs as Kl}from"react/jsx-runtime";var Ju=({metric:e})=>{let{metricTitle:o="",metricValue:t="",metricDescription:a=""}=e??{};return Kl("div",{className:" text-center",children:[qt("div",{className:"text-3xl font-bold text-pink-500 md:text-4xl",children:Mi(t??"")}),qt("div",{className:"mt-2 text-sm font-semibold text-gray-900",children:Mi(o??"")}),a&&qt("div",{className:"mt-2 text-sm text-gray-500",children:Mi(a??"")})]})},ur=({dataMetrics:e,dataButtons:o,dataHeading:t})=>Kl(Zl.Fragment,{children:[t&&qt(h,{tagline:t?.tagline,title:t?.title,description:t?.description,tagHeading:t?.tagHeading,align:"center",colorScheme:t?.colorScheme||"pink",sizeHeading:t?.sizeHeading,className:i(t?.className)}),e&&e?.length>0&&qt("div",{className:"grid grid-cols-1 gap-10 py-4 md:grid-cols-3 md:gap-4 md:py-0",children:e?.map((a,r)=>qt(Zl.Fragment,{children:qt(Ju,{metric:a})},r))}),o&&qt(x,{isFullInMobile:o?.isFullInMobile,buttons:o?.buttons,className:i(o?.className,"mt-8 md:mt-10"),align:"center"})]});import Jl from"react";import Ii from"html-react-parser";import{jsx as Xt,jsxs as em}from"react/jsx-runtime";var e0=({metric:e})=>{let{metricTitle:o="",metricValue:t="",metricDescription:a=""}=e??{};return em("div",{className:" text-center md:text-left",children:[Xt("div",{className:"mt-2 text-2xl font-bold text-pink-500 md:text-3xl",children:Ii(t??"")}),Xt("div",{className:"mt-2 text-sm font-semibold text-gray-900",children:Ii(o??"")}),a&&Xt("div",{className:"mt-2 hidden text-sm text-gray-500 md:block",children:Ii(a??"")})]})},Ai=({dataMetrics:e,dataButtons:o,dataHeading:t})=>em(Jl.Fragment,{children:[t&&Xt(h,{tagline:t?.tagline,title:t?.title,description:t?.description,tagHeading:t?.tagHeading,align:"center",colorScheme:t?.colorScheme||"pink",sizeHeading:t?.sizeHeading,className:i(t?.className)}),e&&e?.length>0&&Xt("div",{className:"grid grid-cols-2 gap-10 py-4 md:grid-cols-4 md:gap-4 md:py-0",children:e?.map((a,r)=>Xt(Jl.Fragment,{children:Xt(e0,{metric:a})},r))}),o&&Xt(x,{isFullInMobile:o?.isFullInMobile,buttons:o?.buttons,className:i(o?.className,"mt-8 md:mt-10"),align:"center"})]});import{Fragment as r0,jsx as Ho}from"react/jsx-runtime";var t0=({dataHeading:e,dataMetrics:o,template:t,dataButtons:a})=>{switch(t){case 1:return Ho(ur,{dataMetrics:o,dataButtons:a,dataHeading:e});case 2:return Ho(Ai,{dataMetrics:o,dataButtons:a,dataHeading:e});default:return Ho(ur,{dataMetrics:o,dataButtons:a,dataHeading:e})}},o0=({dataHeading:e,dataMetrics:o,template:t,dataButtons:a})=>Ho(r0,{children:t0({dataHeading:e,dataMetrics:o,template:t,dataButtons:a})}),a0=({idSection:e,dataHeading:o,dataMetrics:t=[],dataButtons:a,background:r,className:n,template:s})=>Ho(O,{className:i(n),background:r,idSection:e,children:Ho(o0,{dataHeading:o,dataMetrics:t,dataButtons:a,template:s})});import{forwardRef as i0}from"react";import{jsx as tm,jsxs as s0}from"react/jsx-runtime";var n0=i0(({className:e,title:o,children:t},a)=>s0("div",{className:e,ref:a,children:[tm("div",{className:"font-semibold text-gray-800",children:o}),tm("div",{style:{backgroundImage:"url(https://homepage.momocdn.net/img/momo-amazone-s3-api-241105114139-638664036992710012.png)",backgroundSize:"30%",backgroundPosition:"53% 25%"},className:"mt-4 grid grid-cols-1 gap-4 rounded-lg border bg-no-repeat p-3 text-gray-800",children:t})]}));import{useCallback as p0}from"react";import{Fragment as d0,jsx as fo,jsxs as c0}from"react/jsx-runtime";var l0=()=>fo("div",{className:"p-3 border rounded-lg",children:c0("div",{className:"flex items-center gap-3",children:[fo(Ya,{className:"rounded-md h-9 w-9 "}),fo("div",{className:"flex-1",children:fo(Ya,{className:"w-48 h-5 "})}),fo("div",{className:"w-4 h-4 border-2 border-gray-200 rounded-full"})]})});function m0(){return fo(d0,{children:Array.from({length:4}).map((e,o)=>fo(l0,{},o))})}var om=m0;import{Fragment as u0,jsx as Ft,jsxs as Li}from"react/jsx-runtime";var f0=({paymentMethod:e})=>Ft(Xa,{disabled:e?.disabled,value:e?.paymentMethod,className:"data-[state=checked]:bg-pink-50/50",children:Li("div",{className:"flex items-center space-x-3",children:[Ft("img",{className:"h-9 w-9 object-cover",src:e.logo,alt:e?.name}),Li("div",{className:"grid grid-cols-1 gap-1",children:[Ft("div",{className:"md:text-md line-clamp-2 text-sm font-medium text-gray-700",children:e?.name}),e?.label&&Ft("div",{className:"text-xs font-semibold text-pink-500",children:e?.label}),e?.description&&Ft("div",{className:"text-xs font-normal text-gray-500 ",children:e?.description})]})]})}),g0=({title:e="Ch\u1ECDn ph\u01B0\u01A1ng th\u1EE9c thanh to\xE1n",paymentMethods:o,isLoading:t,onSelectPaymentMethod:a,defaultPaymentMethod:r=""})=>{let n=p0(s=>a?.(s),[a]);return Li(u0,{children:[e&&Ft("div",{className:"text-base font-semibold text-gray-800 ",children:e}),t?Ft(om,{}):Ft(qa,{defaultValue:r??"captureWallet",orientation:"vertical",className:"grid grid-cols-1 gap-4",onValueChange:n,children:o?.length>0&&o?.map(s=>Ft(f0,{paymentMethod:s},s.id))})]})};import{forwardRef as am}from"react";import{jsx as im}from"react/jsx-runtime";var v0=am(({children:e,className:o},t)=>im("div",{ref:t,className:i("grid grid-cols-1 gap-4 bg-white",o),children:e})),rm=am(({children:e,className:o,...t},a)=>im(v0,{ref:a,className:o,...t,children:e}));rm.displayName="Payment";import{forwardRef as h0}from"react";import{jsx as nm,jsxs as b0}from"react/jsx-runtime";var x0=h0(({className:e,children:o},t)=>b0("div",{className:i("",e),ref:t,children:[nm("hr",{className:"mb-5 h-px w-full bg-gray-500"}),nm("div",{className:"flex w-full items-center space-x-3",children:o})]}));import{forwardRef as y0}from"react";import{jsx as N0}from"react/jsx-runtime";var w0=y0(({className:e,children:o},t)=>N0("div",{className:i("pb-5",e),ref:t,children:o}));import{forwardRef as S0}from"react";import{CheckBadgeIcon as P0,XCircleIcon as C0}from"@heroicons/react/20/solid";import{jsx as ne,jsxs as _o}from"react/jsx-runtime";var R0=({iconPaymentResult:e,message:o="",title:t=""})=>_o("div",{className:"grid grid-cols-1 gap-4",children:[_o("div",{className:"flex flex-col items-center space-y-3 md:flex-row md:space-x-3 md:space-y-0",children:[e&&ne("div",{className:"relative h-12 w-12 shrink-0 overflow-hidden object-cover",children:e}),t&&ne("div",{className:"text-center text-lg font-bold text-gray-800 md:text-left md:text-2xl",children:t})]}),o&&ne(ca,{message:o,type:"success",icon:ne(P0,{className:"h-5 w-5 shrink-0 text-green-500"})})]}),T0=({iconPaymentResult:e,message:o="",title:t=""})=>_o("div",{className:"grid grid-cols-1 gap-4",children:[_o("div",{className:"flex flex-col items-center space-y-3 md:flex-row md:space-x-3 md:space-y-0",children:[e&&ne("div",{className:"relative h-12 w-12 shrink-0 overflow-hidden object-cover",children:e}),t&&ne("div",{className:"text-center text-lg font-bold text-gray-800 md:text-left md:text-2xl",children:t})]}),ne(ca,{message:o,type:"error",icon:ne(C0,{className:"h-5 w-5 shrink-0 text-red-600"})})]}),k0=({iconPaymentResult:e,message:o="",title:t=""})=>_o("div",{className:"grid grid-cols-1 gap-4",children:[_o("div",{className:"flex flex-col items-center space-y-3 md:flex-row md:space-x-3 md:space-y-0",children:[e&&ne("div",{className:"relative h-12 w-12 shrink-0 overflow-hidden object-cover",children:e}),t&&ne("div",{className:"text-center text-lg font-bold text-gray-800 md:text-left md:text-2xl",children:t})]}),o&&ne(ca,{message:o,type:"neutral"})]}),sm=({status:e,title:o,message:t,iconPaymentResult:a})=>{switch(e){case"success":return ne(R0,{status:e,title:o,message:t,iconPaymentResult:a||ne("img",{className:"",width:48,height:48,src:"https://homepage.momocdn.net/img/momo-amazone-s3-api-241105161325-638664200053564141.svg"})});case"failed":return ne(T0,{status:e,title:o,message:t,iconPaymentResult:a||ne("img",{className:"",src:"https://homepage.momocdn.net/img/momo-amazone-s3-api-241105161658-638664202186984790.svg"})});case"pending":return ne(k0,{status:e,title:o,message:t,iconPaymentResult:a||ne("img",{className:"",src:"https://homepage.momocdn.net/img/momo-amazone-s3-api-241105161636-638664201963670899.svg"})});default:}};import{jsx as M0,jsxs as I0}from"react/jsx-runtime";var D0=S0(({className:e,status:o,message:t,title:a,iconPaymentResult:r,children:n},s)=>I0("div",{ref:s,className:i("rounded-lg p-4",e),children:[M0(sm,{iconPaymentResult:r,title:a,message:t,status:o}),n]}));import{forwardRef as L0,useEffect as F0}from"react";import{jsx as Fi,jsxs as A0}from"react/jsx-runtime";var vr=({content:e})=>A0("picture",{children:[Fi("source",{media:"(max-width: 639px)",srcSet:e?.imageMobile||e.imageDesktop}),Fi("img",{alt:"main-banner-top",className:"w-full",src:e.imageDesktop}),Fi(Ge,{variant:"transparent",className:"absolute inset-0 h-full w-full opacity-0",...e?.button})]});import{jsx as xa,jsxs as H0}from"react/jsx-runtime";var z0=({template:e,content:o})=>{switch(e){case 1:return xa(vr,{content:o});default:return xa(vr,{content:o})}},E0=L0(({template:e,content:o},t)=>(F0(()=>{let a=document.querySelector(".container-topbar");if(a instanceof HTMLElement){let r=a.offsetHeight;document.documentElement.style.setProperty("--container-topbar-height",`${r}px`)}},[o]),H0("div",{ref:t,className:"container-topbar relative flex items-center justify-between",style:{background:o?.background||"#fafafa"},children:[xa("div",{className:"mx-auto w-full max-w-6xl px-0 md:px-8 lg:px-8",children:xa("div",{className:"content",children:z0({template:e,content:o})})}),xa("style",{children:`
|
|
301
|
+
`})]})};import{Fragment as Lu,jsx as co}from"react/jsx-runtime";var Mu=({template:e,dataHeading:o,dataTestimonials:t,dataButtons:a})=>{switch(e){case 1:return co(Ci,{dataHeading:o,dataTestimonials:t,dataButtons:a});case 2:return co(Ql,{dataHeading:o,dataTestimonials:t,dataButtons:a});case 3:return co($l,{dataHeading:o,dataTestimonials:t,dataButtons:a});default:return co(Ci,{dataHeading:o,dataTestimonials:t,dataButtons:a})}},Iu=({template:e,dataHeading:o,dataTestimonials:t,dataButtons:a})=>co(Lu,{children:Mu({template:e,dataHeading:o,dataTestimonials:t,dataButtons:a})}),Au=({template:e=1,background:o,className:t,idSection:a,dataHeading:r,dataTestimonials:n,dataButtons:s})=>co(O,{className:i(e===1&&(n?.length??0)>3?"[&>.wrapper]:max-w-full [&>.wrapper]:md:px-0":"",e===3?"overflow-hidden":"",t),idSection:a,background:o,children:co(Iu,{template:e,dataHeading:r,dataTestimonials:n,dataButtons:s})});import Ul from"html-react-parser";import{Fragment as Fu,jsx as ae,jsxs as po}from"react/jsx-runtime";var ki=({dataFAQ:e,dataHeading:o,dataButtons:t})=>{let a=r=>ae(ht,{type:"single",collapsible:!0,defaultValue:r?.isActiveFistQuestion&&r?.contents?.[0]?.title||"",className:"w-full",children:r?.contents?.map((n,s)=>po(xt,{value:n.title,className:"last:border-none",children:[ae(bt,{className:"md:text-lg",children:n.title}),ae(yt,{className:"prose prose-sm sm:prose-base prose-strong:text-gray-600 max-w-none text-gray-600",children:Ul(n.description)})]},s))});return po("div",{className:"grid grid-cols-1 gap-y-0 md:grid-cols-3 md:gap-x-10",children:[ae("div",{className:"relative",children:po("div",{className:"md:sticky md:top-16",children:[o&&ae(h,{tagline:o.tagline,title:o.title,description:o.description,tagHeading:o.tagHeading||"h2",align:"left",colorScheme:o.colorScheme||"pink",sizeHeading:o.sizeHeading,className:i(o.className)}),t&&ae(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i("hidden md:mt-6 md:flex",t?.className),align:"left"})]})}),e&&e.length>0&&e[0]&&ae("div",{className:"col-span-2",children:a(e[0])}),t&&ae(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i("mt-3 md:hidden",t?.className),align:"center"})]})},ql=({dataFAQ:e,dataHeading:o,dataButtons:t,dataHorizontalScroll:a})=>{let{showGradientOverlay:r=!0,gradientOverlayColor:n,className:s}=a||{},l=m=>ae(ht,{type:"single",collapsible:!0,defaultValue:m?.isActiveFistQuestion&&m?.contents?.[0]?.title||"",className:"w-full",children:m?.contents?.map((c,d)=>po(xt,{value:c.title,className:"last:border-none",children:[ae(bt,{className:"md:text-lg",children:c.title}),ae(yt,{className:"prose prose-sm sm:prose-base prose-strong:text-gray-600 max-w-none text-gray-600",children:Ul(c.description)})]},d))});return po(Fu,{children:[o&&ae(h,{tagline:o.tagline,title:o.title,description:o.description,tagHeading:o.tagHeading||"h2",align:"center",colorScheme:o.colorScheme||"pink",sizeHeading:o.sizeHeading,className:i(o.className)}),e&&po(kt,{defaultValue:e[0]?.title,children:[e?.length>=1&&po(Pt,{showGradientOverlay:r,gradientOverlayColor:n,className:s,children:[ae(Ct,{className:"mb-3 text-center",children:ae(et,{className:"mx-auto mb-0 inline-flex w-auto items-center overflow-visible",size:"base",children:e.map((m,c)=>ae(tt,{value:m.title,children:m.title},m.title+c))})}),ae(Rt,{}),ae(Tt,{})]}),e.map((m,c)=>ae(ot,{className:"mx-auto mt-0 max-w-3xl",value:m.title,children:l(m)},m.title+c))]}),t&&ae(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i(t?.className),align:"center"})]})};import{Fragment as _u,jsx as Eo}from"react/jsx-runtime";var zu=({template:e,dataFAQ:o,dataHeading:t,dataButtons:a,dataHorizontalScroll:r})=>{switch(e){case 1:return Eo(ki,{dataFAQ:o,dataHeading:t,dataButtons:a,dataHorizontalScroll:r});case 2:return Eo(ql,{dataFAQ:o,dataHeading:t,dataButtons:a,dataHorizontalScroll:r});default:return Eo(ki,{dataFAQ:o,dataHeading:t,dataButtons:a,dataHorizontalScroll:r})}},Eu=({dataHeading:e,dataFAQ:o,template:t,dataButtons:a,dataHorizontalScroll:r})=>Eo(_u,{children:zu({dataHeading:e,dataFAQ:o,template:t,dataButtons:a,dataHorizontalScroll:r})}),Hu=({dataHeading:e,dataFAQ:o=[],className:t,background:a,idSection:r,dataButtons:n,dataHorizontalScroll:s,template:l=1})=>Eo(O,{className:t,idSection:r,background:a,children:Eo(Eu,{dataHeading:e,dataFAQ:o,template:l,dataHorizontalScroll:s,dataButtons:n})});import Bu,{memo as Ou}from"react";import{ArrowDownIcon as Vu}from"@heroicons/react/20/solid";import Wu from"html-react-parser";import{Fragment as Xl,jsx as Y,jsxs as pt}from"react/jsx-runtime";var $u=({news:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return pt(Xl,{children:[Y("div",{className:"relative block aspect-[1/1] overflow-hidden rounded-md bg-gray-100 md:aspect-[77/37] md:rounded-none",children:pt("picture",{children:[Y("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),Y("img",{className:"h-full w-full object-cover",src:e?.thumbnailMobile,alt:e?.title})]})}),pt("div",{className:"mt-3 flex flex-1 flex-col md:mt-0 md:p-3",children:[Y("div",{className:"line-clamp-2 flex-1 text-sm font-medium text-gray-900 group-hover:text-pink-500 md:line-clamp-none",children:e?.title}),pt("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&pt(Xl,{children:[Y(fe,{variant:"default",className:"shink-0 line-clamp-1 justify-start whitespace-normal text-left text-xs",onClick:t=>o(t,e?.categoryUrl||""),title:e?.category,children:e?.category}),e?.category&&e?.dateTime&&Y("span",{className:"flex-none leading-none",children:"\xB7"})]}),Y("div",{className:"flex-none text-xs text-gray-500",children:e?.dateTime})]})]})]})},Si=Ou(({dataHeading:e,dataHorizontalScroll:o,dataNews:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,p,g)=>{d?.preventDefault(),d?.stopPropagation(),a?a(p):window.open(g,"_blank")},c=(d,p)=>pt("div",{children:[Y("div",{className:i("-mx-2 flex flex-row flex-wrap gap-y-5",d?.newsList?.length<4?"md:justify-center":""),children:d?.newsList?.map((g,v)=>Y("div",{className:"min-w-0 basis-1/2 px-2 lg:basis-1/4",children:Y("div",{onClick:P=>m(P,g?.id,g?.url),className:i("group flex cursor-pointer flex-col overflow-hidden md:h-full md:rounded-md md:bg-white md:shadow-md",d?.classNameItem),children:Y($u,{news:g})},g?.id)},v))}),d?.isShowBtn&&Y("div",{className:"mt-8 flex w-full items-center justify-center",children:pt(Ge,{action:d?.btnUrl||r&&(()=>r?.(p)),newTab:d?.isNewTab,variant:"outline",disabled:d?.isLoading,children:[Wu(d.btnName||"Xem th\xEAm"),d?.isLoading?Y(ho,{className:"animate-spin-loading ml-2 h-5 w-5"}):r&&!d?.btnUrl&&Y(Vu,{className:"-mb-1 ml-2 h-5 w-5 animate-bounce"})]})})]},d?.title||p);return pt(Bu.Fragment,{children:[e&&Y(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t?.length>1?pt(kt,{defaultValue:t[0]?.title,children:[pt(Pt,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[Y(Ct,{className:"mb-6 text-center",children:Y(et,{className:"mx-auto mb-0 inline-flex w-auto items-center overflow-visible",children:t.map((d,p)=>Y(tt,{value:d.title,children:d.title},d.title+p))})}),Y(Rt,{}),Y(Tt,{})]}),t.map((d,p)=>Y(ot,{value:d.title,children:c(d,p)},d.title+p))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import{Fragment as Uu,jsx as ha}from"react/jsx-runtime";var Gu=({template:e,dataNews:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return ha(Si,{dataNews:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return ha(Si,{dataNews:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},ju=({dataHeading:e,dataHorizontalScroll:o,dataNews:t,template:a,onClickModal:r,onClickLoadMore:n})=>ha(Uu,{children:Gu({dataHeading:e,dataHorizontalScroll:o,dataNews:t,template:a,onClickModal:r,onClickLoadMore:n})}),Qu=({idSection:e,dataHeading:o,dataHorizontalScroll:t,dataNews:a=[],className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>ha(O,{className:i(r),background:n,idSection:e,children:ha(ju,{dataHeading:o,dataHorizontalScroll:t,dataNews:a,template:s,onClickModal:l,onClickLoadMore:m})});import{Fragment as Ku,jsx as De,jsxs as Di}from"react/jsx-runtime";var Yl=({dataHeading:e,dataCTA:o,dataButtons:t})=>Di("div",{className:"rounded-2xl block relative overflow-hidden lg:overflow-visible p-6 md:py-14 md:px-10 bg-pink-50",style:{background:o?.background},children:[e&&De(h,{tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,align:"center",colorScheme:e.colorScheme||"black",sizeHeading:e.sizeHeading,className:e.className}),t&&De(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i(t?.className,"mt-0 md:mt-0"),align:"center"})]}),qu=({dataHeading:e,dataCTA:o,dataButtons:t,dataMedia:a})=>Di("div",{className:"grid gap-6 grid-cols-1 md:grid-cols-2 rounded-2xl block relative overflow-hidden lg:overflow-visible p-6 pb-0 md:px-10 bg-pink-700 md:pb-0 md:pt-0",style:o?.background?{background:o.background}:{},children:[Di("div",{className:"md:py-14 flex flex-col justify-center",children:[e&&De(h,{tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,align:"left",colorScheme:e.colorScheme||"white",sizeHeading:e.sizeHeading,className:e.className}),t&&De(x,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:i(t?.className,"mt-0 md:mt-0"),align:"left"})]}),De("div",{className:" max-w-sm mx-auto md:ml-auto md:mr-0 w-full md:pt-10 self-end",children:a&&De(E,{ratio:4/3,children:De("img",{src:a.src,alt:a.alt,className:"h-full w-full rounded-md object-contain"})})})]}),Xu=({template:e,dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r})=>{switch(e){case 1:return De(Yl,{dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r});case 2:return De(qu,{dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r});default:return De(Yl,{dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r})}},Yu=({template:e,dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r})=>De(Ku,{children:Xu({template:e,dataHeading:o,dataCTA:t,dataButtons:a,dataMedia:r})}),Zu=({template:e=1,background:o,className:t,idSection:a,dataHeading:r,dataCTA:n,dataButtons:s,dataMedia:l})=>De(O,{className:t,idSection:a,background:o,children:De(Yu,{template:e,dataHeading:r,dataCTA:n,dataButtons:s,dataMedia:l})});import Zl from"react";import Mi from"html-react-parser";import{jsx as qt,jsxs as Kl}from"react/jsx-runtime";var Ju=({metric:e})=>{let{metricTitle:o="",metricValue:t="",metricDescription:a=""}=e??{};return Kl("div",{className:"text-center",children:[qt("div",{className:"text-3xl font-bold text-pink-500 md:text-4xl",children:Mi(t??"")}),qt("div",{className:"mt-2 text-sm font-semibold text-gray-900",children:Mi(o??"")}),a&&qt("div",{className:"mt-2 text-sm text-gray-500",children:Mi(a??"")})]})},ur=({dataMetrics:e,dataButtons:o,dataHeading:t})=>Kl(Zl.Fragment,{children:[t&&qt(h,{tagline:t?.tagline,title:t?.title,description:t?.description,tagHeading:t?.tagHeading,align:"center",colorScheme:t?.colorScheme||"pink",sizeHeading:t?.sizeHeading,className:i(t?.className)}),e&&e?.length>0&&qt("div",{className:i("grid grid-cols-1 gap-10 py-4 md:grid-cols-3 md:gap-4 md:py-0",e?.length===2&&"md:grid-cols-4 md:[&>*:first-child]:col-start-2",e?.length===4&&"md:grid-cols-4"),children:e?.map((a,r)=>qt(Zl.Fragment,{children:qt(Ju,{metric:a})},r))}),o&&qt(x,{isFullInMobile:o?.isFullInMobile,buttons:o?.buttons,className:i(o?.className,"mt-8 md:mt-10"),align:"center"})]});import Jl from"react";import Ii from"html-react-parser";import{jsx as Xt,jsxs as em}from"react/jsx-runtime";var e0=({metric:e})=>{let{metricTitle:o="",metricValue:t="",metricDescription:a=""}=e??{};return em("div",{className:"bg-gray-100 p-4 text-center md:p-8",children:[Xt("div",{className:"text-2xl font-bold text-gray-900 md:text-3xl",children:Ii(t??"")}),Xt("div",{className:"mt-2 text-sm font-semibold text-gray-500",children:Ii(o??"")}),a&&Xt("div",{className:"mt-2 hidden text-sm text-gray-500 md:block",children:Ii(a??"")})]})},Ai=({dataMetrics:e,dataButtons:o,dataHeading:t})=>em(Jl.Fragment,{children:[t&&Xt(h,{tagline:t?.tagline,title:t?.title,description:t?.description,tagHeading:t?.tagHeading,align:"center",colorScheme:t?.colorScheme||"pink",sizeHeading:t?.sizeHeading,className:i(t?.className)}),e&&e?.length>0&&Xt("div",{className:i("grid grid-cols-2 gap-px overflow-hidden rounded-lg md:rounded-xl md:py-0 lg:grid-cols-4",e?.length===2&&"lg:grid-cols-2",e?.length===3&&"lg:grid-cols-3"),children:e?.map((a,r)=>Xt(Jl.Fragment,{children:Xt(e0,{metric:a})},r))}),o&&Xt(x,{isFullInMobile:o?.isFullInMobile,buttons:o?.buttons,className:i(o?.className,"mt-8 md:mt-10"),align:"center"})]});import{Fragment as r0,jsx as Ho}from"react/jsx-runtime";var t0=({dataHeading:e,dataMetrics:o,template:t,dataButtons:a})=>{switch(t){case 1:return Ho(ur,{dataMetrics:o,dataButtons:a,dataHeading:e});case 2:return Ho(Ai,{dataMetrics:o,dataButtons:a,dataHeading:e});default:return Ho(ur,{dataMetrics:o,dataButtons:a,dataHeading:e})}},o0=({dataHeading:e,dataMetrics:o,template:t,dataButtons:a})=>Ho(r0,{children:t0({dataHeading:e,dataMetrics:o,template:t,dataButtons:a})}),a0=({idSection:e,dataHeading:o,dataMetrics:t=[],dataButtons:a,background:r,className:n,template:s})=>Ho(O,{className:i(n),background:r,idSection:e,children:Ho(o0,{dataHeading:o,dataMetrics:t,dataButtons:a,template:s})});import{forwardRef as i0}from"react";import{jsx as tm,jsxs as s0}from"react/jsx-runtime";var n0=i0(({className:e,title:o,children:t},a)=>s0("div",{className:e,ref:a,children:[tm("div",{className:"font-semibold text-gray-800",children:o}),tm("div",{style:{backgroundImage:"url(https://homepage.momocdn.net/img/momo-amazone-s3-api-241105114139-638664036992710012.png)",backgroundSize:"30%",backgroundPosition:"53% 25%"},className:"mt-4 grid grid-cols-1 gap-4 rounded-lg border bg-no-repeat p-3 text-gray-800",children:t})]}));import{useCallback as p0}from"react";import{Fragment as d0,jsx as fo,jsxs as c0}from"react/jsx-runtime";var l0=()=>fo("div",{className:"p-3 border rounded-lg",children:c0("div",{className:"flex items-center gap-3",children:[fo(Ya,{className:"rounded-md h-9 w-9 "}),fo("div",{className:"flex-1",children:fo(Ya,{className:"w-48 h-5 "})}),fo("div",{className:"w-4 h-4 border-2 border-gray-200 rounded-full"})]})});function m0(){return fo(d0,{children:Array.from({length:4}).map((e,o)=>fo(l0,{},o))})}var om=m0;import{Fragment as u0,jsx as Ft,jsxs as Li}from"react/jsx-runtime";var f0=({paymentMethod:e})=>Ft(Xa,{disabled:e?.disabled,value:e?.paymentMethod,className:"data-[state=checked]:bg-pink-50/50",children:Li("div",{className:"flex items-center space-x-3",children:[Ft("img",{className:"h-9 w-9 object-cover",src:e.logo,alt:e?.name}),Li("div",{className:"grid grid-cols-1 gap-1",children:[Ft("div",{className:"md:text-md line-clamp-2 text-sm font-medium text-gray-700",children:e?.name}),e?.label&&Ft("div",{className:"text-xs font-semibold text-pink-500",children:e?.label}),e?.description&&Ft("div",{className:"text-xs font-normal text-gray-500 ",children:e?.description})]})]})}),g0=({title:e="Ch\u1ECDn ph\u01B0\u01A1ng th\u1EE9c thanh to\xE1n",paymentMethods:o,isLoading:t,onSelectPaymentMethod:a,defaultPaymentMethod:r=""})=>{let n=p0(s=>a?.(s),[a]);return Li(u0,{children:[e&&Ft("div",{className:"text-base font-semibold text-gray-800 ",children:e}),t?Ft(om,{}):Ft(qa,{defaultValue:r??"captureWallet",orientation:"vertical",className:"grid grid-cols-1 gap-4",onValueChange:n,children:o?.length>0&&o?.map(s=>Ft(f0,{paymentMethod:s},s.id))})]})};import{forwardRef as am}from"react";import{jsx as im}from"react/jsx-runtime";var v0=am(({children:e,className:o},t)=>im("div",{ref:t,className:i("grid grid-cols-1 gap-4 bg-white",o),children:e})),rm=am(({children:e,className:o,...t},a)=>im(v0,{ref:a,className:o,...t,children:e}));rm.displayName="Payment";import{forwardRef as h0}from"react";import{jsx as nm,jsxs as b0}from"react/jsx-runtime";var x0=h0(({className:e,children:o},t)=>b0("div",{className:i("",e),ref:t,children:[nm("hr",{className:"mb-5 h-px w-full bg-gray-500"}),nm("div",{className:"flex w-full items-center space-x-3",children:o})]}));import{forwardRef as y0}from"react";import{jsx as N0}from"react/jsx-runtime";var w0=y0(({className:e,children:o},t)=>N0("div",{className:i("pb-5",e),ref:t,children:o}));import{forwardRef as S0}from"react";import{CheckBadgeIcon as P0,XCircleIcon as C0}from"@heroicons/react/20/solid";import{jsx as ne,jsxs as _o}from"react/jsx-runtime";var R0=({iconPaymentResult:e,message:o="",title:t=""})=>_o("div",{className:"grid grid-cols-1 gap-4",children:[_o("div",{className:"flex flex-col items-center space-y-3 md:flex-row md:space-x-3 md:space-y-0",children:[e&&ne("div",{className:"relative h-12 w-12 shrink-0 overflow-hidden object-cover",children:e}),t&&ne("div",{className:"text-center text-lg font-bold text-gray-800 md:text-left md:text-2xl",children:t})]}),o&&ne(ca,{message:o,type:"success",icon:ne(P0,{className:"h-5 w-5 shrink-0 text-green-500"})})]}),T0=({iconPaymentResult:e,message:o="",title:t=""})=>_o("div",{className:"grid grid-cols-1 gap-4",children:[_o("div",{className:"flex flex-col items-center space-y-3 md:flex-row md:space-x-3 md:space-y-0",children:[e&&ne("div",{className:"relative h-12 w-12 shrink-0 overflow-hidden object-cover",children:e}),t&&ne("div",{className:"text-center text-lg font-bold text-gray-800 md:text-left md:text-2xl",children:t})]}),ne(ca,{message:o,type:"error",icon:ne(C0,{className:"h-5 w-5 shrink-0 text-red-600"})})]}),k0=({iconPaymentResult:e,message:o="",title:t=""})=>_o("div",{className:"grid grid-cols-1 gap-4",children:[_o("div",{className:"flex flex-col items-center space-y-3 md:flex-row md:space-x-3 md:space-y-0",children:[e&&ne("div",{className:"relative h-12 w-12 shrink-0 overflow-hidden object-cover",children:e}),t&&ne("div",{className:"text-center text-lg font-bold text-gray-800 md:text-left md:text-2xl",children:t})]}),o&&ne(ca,{message:o,type:"neutral"})]}),sm=({status:e,title:o,message:t,iconPaymentResult:a})=>{switch(e){case"success":return ne(R0,{status:e,title:o,message:t,iconPaymentResult:a||ne("img",{className:"",width:48,height:48,src:"https://homepage.momocdn.net/img/momo-amazone-s3-api-241105161325-638664200053564141.svg"})});case"failed":return ne(T0,{status:e,title:o,message:t,iconPaymentResult:a||ne("img",{className:"",src:"https://homepage.momocdn.net/img/momo-amazone-s3-api-241105161658-638664202186984790.svg"})});case"pending":return ne(k0,{status:e,title:o,message:t,iconPaymentResult:a||ne("img",{className:"",src:"https://homepage.momocdn.net/img/momo-amazone-s3-api-241105161636-638664201963670899.svg"})});default:}};import{jsx as M0,jsxs as I0}from"react/jsx-runtime";var D0=S0(({className:e,status:o,message:t,title:a,iconPaymentResult:r,children:n},s)=>I0("div",{ref:s,className:i("rounded-lg p-4",e),children:[M0(sm,{iconPaymentResult:r,title:a,message:t,status:o}),n]}));import{forwardRef as L0,useEffect as F0}from"react";import{jsx as Fi,jsxs as A0}from"react/jsx-runtime";var vr=({content:e})=>A0("picture",{children:[Fi("source",{media:"(max-width: 639px)",srcSet:e?.imageMobile||e.imageDesktop}),Fi("img",{alt:"main-banner-top",className:"w-full",src:e.imageDesktop}),Fi(Ge,{variant:"transparent",className:"absolute inset-0 h-full w-full opacity-0",...e?.button})]});import{jsx as xa,jsxs as H0}from"react/jsx-runtime";var z0=({template:e,content:o})=>{switch(e){case 1:return xa(vr,{content:o});default:return xa(vr,{content:o})}},E0=L0(({template:e,content:o},t)=>(F0(()=>{let a=document.querySelector(".container-topbar");if(a instanceof HTMLElement){let r=a.offsetHeight;document.documentElement.style.setProperty("--container-topbar-height",`${r}px`)}},[o]),H0("div",{ref:t,className:"container-topbar relative flex items-center justify-between",style:{background:o?.background||"#fafafa"},children:[xa("div",{className:"mx-auto w-full max-w-6xl px-0 md:px-8 lg:px-8",children:xa("div",{className:"content",children:z0({template:e,content:o})})}),xa("style",{children:`
|
|
302
302
|
.container-topbar .content {
|
|
303
303
|
width: 100%;
|
|
304
304
|
aspect-ratio: 1088/50;
|