@momo-webplatform/mobase 0.2.105-link → 0.2.106-link
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 +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/index.cjs
CHANGED
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
transform: translate3d(0, 30%, 0);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
`})]}),lo=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...c})=>(0,y.jsx)(qe,{...c,children:(0,y.jsx)(Oe,{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:(0,y.jsx)(lt,{className:"p-0",children:(0,y.jsxs)("div",{className:"flex flex-row flex-wrap",children:[(0,y.jsx)("div",{className:"hidden flex-none w-full sm:block md:w-5/12",children:o||(0,y.jsxs)("div",{className:"grid grid-cols-1 gap-y-6 px-5 py-8 text-sm",children:[(0,y.jsxs)("div",{className:"flex flex-nowrap items-center",children:[(0,y.jsx)("div",{className:"flex-none",children:(0,y.jsx)("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),(0,y.jsxs)("div",{className:"flex-1 pl-4",children:[(0,y.jsx)("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 1 :"}),(0,y.jsx)("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"})]})]}),(0,y.jsxs)("div",{className:"flex flex-nowrap items-center",children:[(0,y.jsx)("div",{className:"flex-none",children:(0,y.jsx)("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),(0,y.jsxs)("div",{className:"flex-1 pl-4",children:[(0,y.jsx)("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 2 :"}),(0,y.jsx)("div",{className:"mt-1 text-gray-500",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),(0,y.jsxs)("div",{className:"flex flex-nowrap items-center",children:[(0,y.jsx)("div",{className:"flex-none",children:(0,y.jsx)("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),(0,y.jsxs)("div",{className:"flex-1 pl-4",children:[(0,y.jsx)("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 3 :"}),(0,y.jsxs)("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"]})]})]})]})}),(0,y.jsx)("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:(0,y.jsxs)("div",{className:"px-5 py-10 text-center",children:[t&&(0,y.jsx)("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),(0,y.jsxs)("div",{className:"relative",children:[l&&(0,y.jsx)("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:(0,y.jsx)("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),(0,y.jsx)(ep,{img:r,isQrForAll:l,children:n&&(0,y.jsx)(Fs.QRCodeSVG,{value:n,size:215,imageSettings:{src:`${s||"https://homepage.momocdn.net/pwa/images/logoMomox50.png"}`,height:50,width:50,excavate:!0},level:"H"})})]})]})})]})})})});var zs=require("react");var jo=require("react"),Es=v(require("ua-parser-js"),1),tp=()=>(0,Es.default)().device.type==="mobile",op=typeof window<"u"?jo.useLayoutEffect:jo.useEffect,Qo=()=>{let[e,o]=(0,jo.useState)(!1);return op(()=>{o(tp())},[]),e};var Ut=require("react/jsx-runtime"),Xe=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,...s})=>{let[l,c]=(0,zs.useState)(!1),d=Qo(),p=!!a?.qrLink,f=()=>{let B=p?a?.qrLink:e;return typeof B=="string"?B.trim():""},u=()=>{let B=f();!B&&typeof e!="function"||(typeof e=="function"?e():window.open(B,o?"_blank":"_self"))},b=(B,K=0)=>{let q=document.querySelector(B);if(!q)return;let T=q.getBoundingClientRect().top+window.scrollY-K;window.scrollTo({top:T,behavior:"smooth"})},R=()=>{typeof e=="string"&&e.startsWith("#")?b(e,t):u()},M=()=>(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)(Be,{...s,className:r,onClick:()=>c(!0),"data-name":"button-action-with-qr",children:n}),(0,Ut.jsx)(lo,{...a,open:l,onOpenChange:()=>c(!1),qrLink:a?.qrLink||""})]});return p?d?a?.isQrForAll?M():(0,Ut.jsx)(Be,{...s,className:r,onClick:u,"data-name":"button-action-with-qr",children:n}):M():(0,Ut.jsx)(Be,{...s,onClick:R,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};var Uo=v(require("react"),1),Ja=require("@radix-ui/react-icons"),Bs=require("@radix-ui/react-slot");var Os=require("next/router");var Hs=require("next/router");var ap=({href:e,locale:o,defaultLocale:t,basePath:a=""})=>{if(!o||o===t||!e.startsWith("/")||/\.(pdf|docx|xlsx|doc|xls)$/i.test(e))return e;let r=`/${o}`,n=new RegExp(`^${a}(?=[/#?]|$)`),s;return a&&n.test(e)?s=e.replace(n,`${a}${r}`):s=`${r}${e}`,s},mo=({href:e,locale:o,defaultLocale:t,basePath:a})=>e?ap({href:e,locale:o,defaultLocale:t,basePath:a}):void 0;var _s=require("react/jsx-runtime"),L=({href:e,children:o,...t})=>{let a=(0,Hs.useRouter)(),{locale:r,basePath:n,defaultLocale:s}=a;return(0,_s.jsx)("a",{href:mo({href:e,locale:r,basePath:n,defaultLocale:s}),...t,children:o})};var Ye=require("react/jsx-runtime"),hi=Uo.forwardRef(({className:e,...o},t)=>(0,Ye.jsx)("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));hi.displayName="Breadcrumb";var xi=Uo.forwardRef(({className:e,...o},t)=>(0,Ye.jsx)("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}));xi.displayName="BreadcrumbList";var bi=Uo.forwardRef(({className:e,...o},t)=>(0,Ye.jsx)("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));bi.displayName="BreadcrumbItem";var yi=Uo.forwardRef(({asChild:e,className:o,href:t,...a},r)=>{let n=(0,Os.useRouter)(),{locale:s,basePath:l,defaultLocale:c}=n;return(0,Ye.jsx)(e?Bs.Slot:"a",{ref:r,className:i("transition-colors hover:text-foreground",o),href:mo({href:t,locale:s,basePath:l,defaultLocale:c}),...a})});yi.displayName="BreadcrumbLink";var wi=Uo.forwardRef(({className:e,...o},t)=>(0,Ye.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));wi.displayName="BreadcrumbPage";var Ni=({children:e,className:o,...t})=>(0,Ye.jsx)("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??(0,Ye.jsx)(Ja.ChevronRightIcon,{className:"w-2 h-2"})});Ni.displayName="BreadcrumbSeparator";var Pi=({className:e,...o})=>(0,Ye.jsxs)("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[(0,Ye.jsx)(Ja.DotsHorizontalIcon,{className:"w-4 h-4 text-gray-900"}),(0,Ye.jsx)("span",{className:"sr-only",children:"More"})]});Pi.displayName="BreadcrumbElipssis";var rr=v(require("html-react-parser"),1);var ha=require("react");var qo=require("react/jsx-runtime"),Ci=(0,ha.createContext)({align:"center"}),er=({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(0,qo.jsx)("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"},c={small:"lg:text-3xl text-2xl",large:"lg:text-4xl md:text-3xl text-2xl"},{align:d}=(0,ha.useContext)(Ci);return(0,qo.jsx)(s,{className:i("max-w-4xl font-bold",d==="center"?"mx-auto":d==="right"?"ml-auto":"",l[t],c[o],a&&"truncate",r),children:n})},or=({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"},c={none:"",spacingX:"mt-2",spacingM:"mt-3",spacingL:"mt-4",spacingXl:"mt-5",spacing2Xl:"mt-6"},{align:d}=(0,ha.useContext)(Ci);return(0,qo.jsx)("div",{className:i(d==="center"?"mx-auto max-w-2xl":d==="right"?"ml-auto max-w-4xl":"max-w-4xl",s[e],l[o],c[t],a&&"truncate",r),children:n})},ar=({className:e,align:o="center",children:t})=>(0,qo.jsx)("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:(0,qo.jsx)(Ci.Provider,{value:{align:o},children:t})});var Rt=require("react/jsx-runtime"),Z=({idSection:e,className:o,background:t,children:a})=>(0,Rt.jsx)("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:(0,Rt.jsx)("div",{className:"wrapper relative",children:a})}),w=({align:e="center",tagline:o,title:t,description:a,tagHeading:r="h2",colorScheme:n="pink",sizeHeading:s="small",className:l})=>{let c=n==="black"?"pink":n==="pink"?"regular":"white",d=n==="pink"?"pink":n==="white"?"white":"regular",p=n==="white"?"white":"regular";return!t&&!a&&!o?null:(0,Rt.jsxs)(ar,{align:e,className:l,children:[o&&(0,Rt.jsx)(er,{color:c,children:o}),t&&(0,Rt.jsx)(tr,{tagHeading:r,color:d,size:s,children:(0,rr.default)(t)}),a&&(0,Rt.jsx)(or,{color:p,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:(0,rr.default)(a)})]})},N=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:(0,Rt.jsx)("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(0,Rt.jsx)(Xe,{...l,className:i(o&&"w-full md:w-auto",r?.className),children:(0,rr.default)(s)},n)})});var mr=v(require("react"),1),Xs=require("@heroicons/react/20/solid"),Ys=v(require("html-react-parser"),1);var Ee=require("react"),ir=require("lucide-react");var Vs=v(require("react"),1),Ws=require("@radix-ui/react-slot"),$s=require("class-variance-authority");var Gs=require("react/jsx-runtime"),ko=(0,$s.cva)("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"}}),he=Vs.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Ws.Slot:"button",c=i(ko({variant:o,size:t,className:e}));return(0,Gs.jsx)(l,{className:c,disabled:r,ref:s,...n,children:n.children})});he.displayName="IconButton";var Fe=require("react/jsx-runtime"),nr=(0,Ee.createContext)(void 0),kt=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=(0,Ee.useRef)(null),[n,s]=(0,Ee.useState)({left:!1,right:!1}),l=(0,Ee.useCallback)(()=>{let d=r.current;if(d){let{scrollLeft:p,scrollWidth:f,clientWidth:u}=d;s({left:p>0,right:Math.ceil(p+u)<f})}},[]);(0,Ee.useEffect)(()=>{let d=r.current;if(d)return l(),window.addEventListener("resize",l),d.addEventListener("scroll",l),()=>{window.removeEventListener("resize",l),d.removeEventListener("scroll",l)}},[l]);let c=d=>{let p=r.current;if(p){let{scrollLeft:f,clientWidth:u,scrollWidth:b}=p,R=u*.7*(d==="left"?-1:1),M=f+R;M<0?M=0:M>b-u&&(M=b-u),p.scrollTo({left:M,behavior:"smooth"})}};return(0,Fe.jsx)(nr.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:c,gradientOverlayColor:o},children:(0,Fe.jsxs)("div",{className:i("relative w-full",t),children:[e&&(0,Fe.jsxs)(Fe.Fragment,{children:[n.left&&(0,Fe.jsx)("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&&(0,Fe.jsx)("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]})})},Tt=({className:e,children:o})=>{let t=(0,Ee.useContext)(nr);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return(0,Fe.jsx)("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},St=({className:e,children:o,...t})=>{let a=(0,Ee.useContext)(nr);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?(0,Fe.jsx)(he,{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||(0,Fe.jsx)(ir.ChevronLeft,{className:"h-4 w-4"})}):null},Dt=({className:e,children:o,...t})=>{let a=(0,Ee.useContext)(nr);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?(0,Fe.jsx)(he,{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||(0,Fe.jsx)(ir.ChevronRight,{className:"h-4 w-4"})}):null};var sr=v(require("react"),1),mt=v(require("@radix-ui/react-tabs"),1);var lr=require("react/jsx-runtime"),Mt=mt.Root,ct=sr.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>(0,lr.jsx)(mt.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}));ct.displayName=mt.List.displayName;var dt=sr.forwardRef(({className:e,...o},t)=>(0,lr.jsx)(mt.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}));dt.displayName=mt.Trigger.displayName;var pt=sr.forwardRef(({className:e,...o},t)=>(0,lr.jsx)(mt.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}));pt.displayName=mt.Content.displayName;var js=v(require("react"),1),Qs=require("@radix-ui/react-slot"),Us=require("class-variance-authority");var qs=require("react/jsx-runtime"),Ri=(0,Us.cva)("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"}}),Ce=js.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Qs.Slot:"button",c=i(Ri({variant:o,size:t,className:e}));return(0,qs.jsx)(l,{className:c,disabled:r,ref:s,...n,children:n.children})});Ce.displayName="TextButton";var A=require("react/jsx-runtime"),rp=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:(0,A.jsx)("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:(0,A.jsxs)("picture",{children:[(0,A.jsx)("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),(0,A.jsx)("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),(0,A.jsxs)("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&(0,A.jsx)(Ce,{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}),(0,A.jsx)("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}),(0,A.jsxs)("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Ce,{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&&(0,A.jsx)("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&(0,A.jsx)("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},cr=(0,mr.memo)(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},c=(p,f,u)=>{p?.preventDefault(),p?.stopPropagation(),a?a(f):window.open(u,"_blank")},d=(p,f)=>(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",p?.blogList?.length<3?"md:justify-center":""),children:p?.blogList?.map((u,b)=>(0,A.jsx)("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:(0,A.jsx)("div",{onClick:R=>c(R,u?.id,u?.url),className:i("group flex cursor-pointer flex-row md:flex-col",p?.classNameItem),children:(0,A.jsx)(rp,{blog:u})},u?.id)},b))}),p?.isShowBtn&&(0,A.jsx)("div",{className:"flex items-center justify-center w-full mt-8",children:(0,A.jsxs)(Xe,{action:r?()=>r?.(f):p?.btnUrl,newTab:p?.isNewTab,variant:"outline",children:[(0,Ys.default)(p.btnName||"Xem th\xEAm"),p?.isLoading?(0,A.jsx)($o,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!p?.btnUrl&&(0,A.jsx)(Xs.ArrowDownIcon,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},p?.title||f);return(0,A.jsxs)(mr.default.Fragment,{children:[e&&(0,A.jsx)(w,{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?(0,A.jsxs)(Mt,{defaultValue:t[0]?.title,children:[(0,A.jsxs)(kt,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[(0,A.jsx)(Tt,{className:"mb-6 text-center",children:(0,A.jsx)(ct,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((p,f)=>(0,A.jsx)(dt,{value:p.title,children:p.title},p.title+f))})}),(0,A.jsx)(St,{}),(0,A.jsx)(Dt,{})]}),t.map((p,f)=>(0,A.jsx)(pt,{value:p.title,children:d(p,f)},p.title+f))]}):t?.length===1&&t[0]&&d(t[0],0)]})});var qt=v(require("react"),1),pr=require("@heroicons/react/20/solid"),ki=v(require("html-react-parser"),1);var ee=v(require("react"),1),dr=require("@heroicons/react/20/solid"),Zs=v(require("embla-carousel-react"),1);var xe=require("react/jsx-runtime"),Ks=ee.createContext(null);function xa(){let e=ee.useContext(Ks);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Re=ee.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[c,d]=(0,Zs.default)({align:"start",...o,axis:e==="horizontal"?"x":"y"},a),[p,f]=ee.useState(!1),[u,b]=ee.useState(!1),R=ee.useCallback(K=>{K&&(f(K.canScrollPrev()),b(K.canScrollNext()))},[]),M=ee.useCallback(()=>{d?.scrollPrev()},[d]),k=ee.useCallback(()=>{d?.scrollNext()},[d]),B=ee.useCallback(K=>{K.key==="ArrowLeft"?(K.preventDefault(),M()):K.key==="ArrowRight"&&(K.preventDefault(),k())},[M,k]);return ee.useEffect(()=>{!d||!t||t(d)},[d,t]),ee.useEffect(()=>{if(d)return R(d),d.on("reInit",R),d.on("select",R),()=>{d?.off("select",R)}},[d,R]),(0,xe.jsx)(Ks.Provider,{value:{carouselRef:c,api:d,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:M,scrollNext:k,canScrollPrev:p,canScrollNext:u},children:(0,xe.jsx)("div",{ref:l,onKeyDownCapture:B,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});Re.displayName="Carousel";var ke=ee.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=xa();return(0,xe.jsx)("div",{ref:r,className:i("overflow-hidden",o),children:(0,xe.jsx)("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ke.displayName="CarouselContent";var Ne=ee.forwardRef(({className:e,...o},t)=>{let{orientation:a}=xa();return(0,xe.jsx)("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})});Ne.displayName="CarouselItem";var To=ee.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=xa();return(0,xe.jsxs)(he,{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:[(0,xe.jsx)(dr.ChevronLeftIcon,{className:"h-6 w-6"}),(0,xe.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});To.displayName="CarouselPrevious";var So=ee.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=xa();return(0,xe.jsxs)(he,{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:[(0,xe.jsx)(dr.ChevronRightIcon,{className:"h-6 w-6"}),(0,xe.jsx)("span",{className:"sr-only",children:"Next slide"})]})});So.displayName="CarouselNext";var Do=ee.forwardRef((e,o)=>{let{api:t}=xa(),[,a]=ee.useState(!1),r=ee.useCallback(()=>a(l=>!l),[]);ee.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?(0,xe.jsx)("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,c)=>(0,xe.jsx)(he,{className:`navigation-item mx-1 h-1.5 w-1.5 rounded-full p-0 ${c===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 ${c+1}`,onClick:()=>t?.scrollTo(c)},c))}):(0,xe.jsx)(xe.Fragment,{})});Do.displayName="CarouselDots";var S=require("react/jsx-runtime"),ip=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:(0,S.jsx)("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),(0,S.jsxs)("div",{className:"mt-4 md:pr-3",children:[(0,S.jsx)("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&(0,S.jsx)("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:(0,ki.default)(e?.description??"")}),(0,S.jsxs)("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Ce,{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&&(0,S.jsx)("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&(0,S.jsx)("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},np=({dataBlog:e,setCarouselRef:o,carouselRef:t,setCurrent:a,handleOnClickItem:r})=>{let{blogList:n=[],isShowBtn:s,btnName:l,btnUrl:c="#",isNewTab:d,classNameItem:p}=e??{};return(0,qt.useEffect)(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Re,{opts:{dragFree:!1},setApi:o,className:"w-full",children:(0,S.jsx)(ke,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(f=>(0,S.jsx)(Ne,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:(0,S.jsx)("div",{onClick:u=>r(u,f?.id,f?.url),className:i("group cursor-pointer",p),children:(0,S.jsx)(ip,{blog:f})},f?.id)},f?.id))})}),s&&(0,S.jsx)("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:(0,S.jsxs)(Xe,{action:c&&c,newTab:d,variant:"outline",children:[(0,ki.default)(l||"Xem th\xEAm")," "]})})]})},sp=({carouselRef:e})=>(0,S.jsxs)(he,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[(0,S.jsx)(pr.ChevronLeftIcon,{className:"h-6 w-6"}),(0,S.jsx)("span",{className:"sr-only",children:"Previous slide"})]}),lp=({carouselRef:e})=>(0,S.jsxs)(he,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[(0,S.jsx)(pr.ChevronRightIcon,{className:"h-6 w-6"}),(0,S.jsx)("span",{className:"sr-only",children:"Next slide"})]}),Ti=(0,qt.memo)(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(d,p,f)=>{d?.preventDefault(),d?.stopPropagation(),t?t(p):window.open(f,"_blank")},[n,s]=(0,qt.useState)(null),[,l]=(0,qt.useState)(0),c=()=>n?(0,S.jsxs)("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[(0,S.jsx)(sp,{carouselRef:n}),(0,S.jsx)(lp,{carouselRef:n})]}):(0,S.jsx)(S.Fragment,{});return(0,S.jsxs)(qt.default.Fragment,{children:[(0,S.jsxs)("div",{className:" flex items-center justify-between",children:[e&&(0,S.jsx)(w,{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)}),(0,S.jsx)(c,{})]}),(0,S.jsx)(np,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});var Xt=require("react/jsx-runtime"),mp=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return(0,Xt.jsx)(cr,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return(0,Xt.jsx)(Ti,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return(0,Xt.jsx)(cr,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},cp=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>(0,Xt.jsx)(Xt.Fragment,{children:mp({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),Js=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:c})=>(0,Xt.jsx)(Z,{className:i("overflow-hidden",r),idSection:a,background:n,children:(0,Xt.jsx)(cp,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:c})});var gr=v(require("react"),1),ur=require("date-fns/locale"),vr=require("lucide-react"),ol=v(require("lunisolar"),1),al=require("react-day-picker");var el=v(require("react"),1),ba=v(require("@radix-ui/react-checkbox"),1),tl=require("@heroicons/react/16/solid"),Si=require("class-variance-authority");var fr=require("react/jsx-runtime"),dp=(0,Si.cva)("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"}}),pp=(0,Si.cva)("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),ya=el.forwardRef(({className:e,size:o,...t},a)=>(0,fr.jsx)(ba.Root,{ref:a,className:i(dp({size:o}),e),...t,children:(0,fr.jsx)(ba.Indicator,{className:i("flex items-center justify-center text-current"),children:(0,fr.jsx)(tl.CheckIcon,{className:i(pp({size:o}))})})}));ya.displayName=ba.Root.displayName;var Pe=require("react/jsx-runtime"),fp=({date:e,cusContent:o})=>{let t=null;return t=(0,ol.default)(e).lunar,(0,Pe.jsxs)(Pe.Fragment,{children:[o?o(e):e.getDate(),t&&(0,Pe.jsx)("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},gp={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 up({isShow:e,setIsShow:o,lang:t}){let a=gr.useId();return(0,Pe.jsx)("div",{className:"w-full p-3 pt-0",children:(0,Pe.jsxs)("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[(0,Pe.jsx)(ya,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),(0,Pe.jsx)("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 vp=e=>e.getDay()===0||e.getDay()===6;function wa({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,c]=gr.useState(!0);return(0,Pe.jsx)(al.DayPicker,{locale:r==="vi"?ur.vi:ur.enUS,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(st({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(st({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:vp},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>(0,Pe.jsx)(vr.ChevronLeft,{className:"h-6 w-6"}),IconRight:()=>(0,Pe.jsx)(vr.ChevronRight,{className:"h-6 w-6"}),DayContent:d=>(0,Pe.jsx)(fp,{date:d.date,cusContent:n}),Months:({children:d})=>(0,Pe.jsxs)("div",{className:"w-full",children:[(0,Pe.jsx)("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:d}),a&&(0,Pe.jsx)(up,{isShow:l,setIsShow:c,lang:r})]})},formatters:r==="vi"?gp:{},...s})}wa.displayName="Calendar";var hr=require("@heroicons/react/16/solid"),Na=require("date-fns"),il=require("lucide-react");var rl=v(require("react"),1),Yt=v(require("@radix-ui/react-popover"),1);var Di=require("react/jsx-runtime"),Xo=Yt.Root,Yo=Yt.Trigger,Mo=rl.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>(0,Di.jsx)(Yt.Portal,{children:(0,Di.jsx)(Yt.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})}));Mo.displayName=Yt.Content.displayName;var ie=require("react/jsx-runtime"),nl=({label:e,placeholder:o="Select a value",size:t=1,message:a,isError:r,disabled:n,dateFormat:s="dd/MM/yyyy",buttonProps:l,popoverProps:c,calendarProps:d,popoverContentProps:p})=>{let f=d?.selected||null;return(0,ie.jsxs)("div",{children:[(0,ie.jsxs)(Xo,{...c,children:[(0,ie.jsx)(Yo,{asChild:!0,children:(0,ie.jsxs)(Be,{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",(!f||!(f instanceof Date)&&typeof f=="object"&&(!("from"in f)||!f.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[(0,ie.jsx)("div",{className:"line-clamp-1 flex-1",children:f instanceof Date?(0,Na.format)(f,s):f&&typeof f=="object"&&"from"in f&&"to"in f?(0,ie.jsx)(ie.Fragment,{children:f.from?f.to?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{className:"date-from",children:(0,Na.format)(f.from,s)})," ",(0,ie.jsx)("span",{className:"date-separator",children:"-"}),(0,ie.jsx)("span",{className:"date-to",children:(0,Na.format)(f.to,s)})]}):(0,Na.format)(f.from,s):o}):o}),e&&(0,ie.jsx)("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}),(0,ie.jsx)(il.Calendar,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),(0,ie.jsx)(Mo,{className:"w-auto border-none !p-0",...p,children:(0,ie.jsx)(wa,{...d,defaultMonth:f&&typeof f=="object"&&"from"in f?f.from:f instanceof Date?f:void 0})})]}),a&&(0,ie.jsxs)("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?(0,ie.jsx)(hr.XCircleIcon,{width:16,height:16,className:"text-red-500"}):(0,ie.jsx)(hr.QuestionMarkCircleIcon,{width:16,height:16,className:"text-gray-500"}),(0,ie.jsx)("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};var Pa=require("react"),yr=require("@heroicons/react/16/solid"),dl=require("date-fns");var It=v(require("react"),1),Zt=require("@heroicons/react/16/solid"),sl=require("@heroicons/react/24/outline"),E=v(require("@radix-ui/react-select"),1);var $=require("react/jsx-runtime"),Zo=It.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},c)=>(0,$.jsxs)("div",{ref:c,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&&(0,$.jsx)("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}),(0,$.jsx)(E.Root,{disabled:s,...l,children:o}),a&&(0,$.jsxs)("div",{className:i("mobase-select-message mt-1 flex items-center space-x-1 text-gray-500",n&&"text-red-500"),children:[n?(0,$.jsx)(Zt.XCircleIcon,{width:16,height:16}):(0,$.jsx)(sl.QuestionMarkCircleIcon,{width:16,height:16}),(0,$.jsx)("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),Ko=E.Value,Io=It.forwardRef(({className:e,children:o,...t},a)=>(0,$.jsxs)(E.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:[(0,$.jsx)("div",{className:"line-clamp-1 text-left",children:o}),(0,$.jsx)(E.Icon,{asChild:!0,children:(0,$.jsx)(Zt.ChevronDownIcon,{className:"h-4 w-4 flex-none text-gray-500"})})]}));Io.displayName=E.Trigger.displayName;var xr=It.forwardRef(({className:e,...o},t)=>(0,$.jsx)(E.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:(0,$.jsx)(Zt.ChevronUpIcon,{className:"h-5 w-5"})}));xr.displayName=E.ScrollUpButton.displayName;var br=It.forwardRef(({className:e,...o},t)=>(0,$.jsx)(E.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:(0,$.jsx)(Zt.ChevronDownIcon,{className:"h-5 w-5"})}));br.displayName=E.ScrollDownButton.displayName;var Lo=It.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>(0,$.jsx)(E.Portal,{children:(0,$.jsxs)(E.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:[(0,$.jsx)(xr,{}),(0,$.jsx)(E.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),(0,$.jsx)(br,{})]})}));Lo.displayName=E.Content.displayName;var Jo=It.forwardRef(({className:e,children:o,...t},a)=>(0,$.jsx)(E.Group,{ref:a,className:i("relative border-b border-gray-200 p-1 after:w-full last:border-0",e),...t,children:o})),Mi=It.forwardRef(({className:e,...o},t)=>(0,$.jsx)(E.Label,{ref:t,className:i("z-[1] py-1.5 pl-7 pr-2 text-sm font-semibold",e),...o}));Mi.displayName=E.Label.displayName;var Kt=It.forwardRef(({className:e,children:o,...t},a)=>(0,$.jsxs)(E.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:[(0,$.jsx)("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:(0,$.jsx)(E.ItemIndicator,{children:(0,$.jsx)(Zt.CheckIcon,{className:"h-4 w-4 text-pink-500"})})}),(0,$.jsx)(E.ItemText,{children:o})]})),Ii=It.forwardRef(({className:e,...o},t)=>(0,$.jsx)(E.Separator,{ref:t,className:i("-mx-1 my-1 h-px",e),...o}));Ii.displayName=E.Separator.displayName;var ll=["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"],ml=["January","February","March","April","May","June","July","August","September","October","November","December"],Li=(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}},cl=(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)};var O=require("react/jsx-runtime"),pl=({label:e,selected:o,onSelect:t,size:a=1,message:r,isError:n,disabled:s,dateFormat:l="dd/MM/yyyy",lang:c="vi",fromYear:d=1900,toYear:p=new Date().getFullYear(),disableUnselect:f=!1})=>{let[u,b]=(0,Pa.useState)(o??null),R=Math.min(d,p),M=Math.max(d,p),k=l==="MM/yyyy",B=(T,J)=>{if(J===0){b(void 0),t?.(void 0);return}let W=u?.getFullYear()||new Date().getFullYear(),it=u?.getMonth()??0,nt=u?.getDate()??1;T==="month"&&J!==null&&(it=J-1),T==="year"&&J!==null&&(W=J),k?nt=1:T==="day"&&J!==null&&(nt=J);let Xa=Li(W,it+1).daysInMonth;nt>Xa&&(nt=1);let fa=new Date(W,it,nt);(0,dl.isValid)(fa)&&(b(fa),t?.(fa))},[K,q]=(0,Pa.useState)(!1),Gt=T=>{q(T)};return(0,Pa.useEffect)(()=>{b(o??null)},[o]),(0,O.jsxs)("div",{className:i("relative",s&&"cursor-no-drop"),children:[(0,O.jsxs)("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",K&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",u?"":"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&&(0,O.jsx)("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}),(0,O.jsxs)("div",{className:"flex h-full flex-row divide-x",children:[!k&&(0,O.jsxs)(Zo,{value:u?u.getDate().toString().padStart(2,"0"):"",onValueChange:T=>B("day",parseInt(T,10)),onOpenChange:Gt,className:"w-[30%]",children:[(0,O.jsx)(Io,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:(0,O.jsx)(Ko,{placeholder:c==="vi"?"Ng\xE0y":"Day"})}),(0,O.jsx)(Lo,{onCloseAutoFocus:T=>T.preventDefault(),children:(0,O.jsxs)(Jo,{children:[!f&&(0,O.jsx)(Kt,{value:"0",className:"text-gray-600",children:c==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:Li(u?.getFullYear()||new Date().getFullYear(),(u?.getMonth()??0)+1).daysInMonth},(T,J)=>(J+1).toString().padStart(2,"0")).map(T=>(0,O.jsx)(Kt,{value:T,children:T},T))]})})]}),(0,O.jsxs)(Zo,{value:u?(u.getMonth()+1).toString():"",onValueChange:T=>B("month",parseInt(T,10)),onOpenChange:Gt,className:i(k?"w-1/2":"w-2/5"),children:[(0,O.jsx)(Io,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:(0,O.jsx)(Ko,{placeholder:c==="vi"?"Th\xE1ng":"Month"})}),(0,O.jsx)(Lo,{onCloseAutoFocus:T=>T.preventDefault(),children:(0,O.jsxs)(Jo,{children:[!f&&(0,O.jsx)(Kt,{value:"0",className:"text-gray-600",children:c==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(T,J)=>J+1).map(T=>(0,O.jsx)(Kt,{value:T.toString(),children:c==="vi"?ll[T-1]:ml[T-1]},T))]})})]}),(0,O.jsxs)(Zo,{value:u?u.getFullYear().toString():"",onValueChange:T=>B("year",parseInt(T,10)),onOpenChange:Gt,className:i(k?"w-1/2":"w-[30%]"),children:[(0,O.jsx)(Io,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:(0,O.jsx)(Ko,{placeholder:c==="vi"?"N\u0103m":"Year"})}),(0,O.jsx)(Lo,{onCloseAutoFocus:T=>T.preventDefault(),children:(0,O.jsxs)(Jo,{children:[!f&&(0,O.jsx)(Kt,{value:"0",className:"text-gray-600",children:c==="vi"?"B\u1ECF ch\u1ECDn":"None"}),cl(R,M).map(T=>(0,O.jsx)(Kt,{value:T.toString(),children:T},T))]})})]})]})]}),r&&(0,O.jsxs)("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?(0,O.jsx)(yr.XCircleIcon,{width:16,height:16,className:"text-red-500"}):(0,O.jsx)(yr.QuestionMarkCircleIcon,{width:16,height:16,className:"text-gray-500"}),(0,O.jsx)("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};var Ao=v(require("react"),1),ae=v(require("@radix-ui/react-alert-dialog"),1);var Ze=require("react/jsx-runtime"),fl=ae.Root,gl=ae.Trigger,Ai=ae.Portal,wr=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.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}));wr.displayName=ae.Overlay.displayName;var Fi=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsxs)(Ai,{children:[(0,Ze.jsx)(wr,{}),(0,Ze.jsx)(ae.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})]}));Fi.displayName=ae.Content.displayName;var Ei=({className:e,...o})=>(0,Ze.jsx)("div",{className:i("flex flex-col space-y-2 text-left",e),...o});Ei.displayName="AlertDialogHeader";var zi=({className:e,...o})=>(0,Ze.jsx)("div",{className:i("flex flex-row justify-end space-x-4",e),...o});zi.displayName="AlertDialogFooter";var Hi=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));Hi.displayName=ae.Title.displayName;var _i=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));_i.displayName=ae.Description.displayName;var Bi=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.Action,{ref:t,className:i(st({variant:"primary"}),"",e),...o}));Bi.displayName=ae.Action.displayName;var Oi=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.Cancel,{ref:t,className:i(st({variant:"secondary"}),e),...o}));Oi.displayName=ae.Cancel.displayName;var Nr=require("react");var Ca=require("react"),Vi=v(require("html-react-parser"),1),vl=require("motion/react");var ul=v(require("@radix-ui/react-aspect-ratio"),1),X=ul.Root;var Q=require("react/jsx-runtime"),hp=({guideGroup:e,mockup:o})=>{let[t,a]=(0,Ca.useState)(),[r,n]=(0,Ca.useState)(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return(0,Ca.useEffect)(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),(0,Q.jsx)(Q.Fragment,{children:e?.stepList&&e?.stepList?.length>0&&(0,Q.jsxs)("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[(0,Q.jsx)("div",{className:"h-auto w-64 flex-none",children:(0,Q.jsxs)("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"&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),(0,Q.jsx)("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,Q.jsx)("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,Q.jsx)("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),(0,Q.jsx)("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:(0,Q.jsxs)(Re,{setApi:a,children:[(0,Q.jsx)(ke,{className:"ml-0",children:e?.stepList.map((l,c)=>(0,Q.jsx)(Ne,{className:"pl-0",children:(0,Q.jsx)(X,{ratio:o==="small"?540/960:540/1168,children:l?.image&&(0,Q.jsx)("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},c))}),(0,Q.jsx)(To,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),(0,Q.jsx)(So,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),(0,Q.jsx)("div",{className:"flex flex-auto pl-12 pt-4",children:(0,Q.jsx)("ul",{className:"flex flex-col",children:e?.stepList.map((l,c)=>(0,Q.jsxs)("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",c+1===r?"":"cursor-pointer"),onClick:()=>t&&t.scrollTo(c),children:[(0,Q.jsx)("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",c+1===r?"bg-pink-500 text-white":"bg-pink-100 text-pink-500"),children:c+1}),(0,Q.jsx)("div",{className:i(" text-sm font-medium",c+1===r?"text-pink-500":"text-gray-900"),children:(0,Vi.default)(l.title)}),l.content&&(0,Q.jsx)(vl.motion.div,{initial:"closed",animate:c+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:(0,Q.jsx)("div",{className:"mt-3 text-sm text-gray-700",children:(0,Vi.default)(l.content)})})]},c))})})]})})},Wi=hp;var Jt=require("react"),$i=require("@heroicons/react/20/solid"),hl=v(require("embla-carousel-autoplay"),1),Ra=v(require("html-react-parser"),1);var x=require("react/jsx-runtime"),xp=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=(0,Jt.useState)(0),[s,l]=(0,Jt.useState)();return(0,Jt.useEffect)(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:(0,x.jsx)(qe,{open:e,onOpenChange:o,children:(0,x.jsxs)(Oe,{position:"bottom",height:"full",children:[(0,x.jsx)(Co,{children:(0,x.jsx)(Ro,{className:"line-clamp-1",children:t?.title})}),(0,x.jsxs)(lt,{className:"grid overflow-hidden p-0 ",children:[(0,x.jsx)(Re,{setApi:l,className:" grid overflow-hidden",children:(0,x.jsx)(ke,{className:"ml-0 h-full",children:t.stepList.map((c,d)=>(0,x.jsx)(Ne,{className:"h-full w-full pl-0",children:(0,x.jsxs)("div",{className:"flex h-full flex-col overflow-y-auto",children:[(0,x.jsx)("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:(0,x.jsx)("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:(0,x.jsxs)("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"&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),(0,x.jsx)("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:(0,x.jsx)(X,{ratio:a==="small"?540/960:540/1168,children:c?.image&&(0,x.jsx)("img",{src:c.image,className:"size-full object-contain",alt:c.title})})})]})})}),(0,x.jsxs)("div",{className:"p-5 pb-12",children:[(0,x.jsx)("div",{className:"font-semibold",children:(0,Ra.default)(c.title)}),c?.content&&(0,x.jsx)("div",{className:"mt-3 text-sm text-gray-800",children:(0,Ra.default)(c.content)})]})]})},d))})}),(0,x.jsx)("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((c,d)=>(0,x.jsx)("div",{className:`h-2 w-2 cursor-pointer rounded-full ${d+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(d)},d))})]})]})})},bp=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=(0,Jt.useState)(!1),[n,s]=(0,Jt.useState)(null),l=(0,Jt.useRef)((0,hl.default)({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),c=d=>{s(e?.[d]||null),r(!0)};return e?.length===0?null:(0,x.jsxs)(x.Fragment,{children:[e?.length>1?(0,x.jsx)("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((d,p)=>(0,x.jsxs)("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>c(p),children:[(0,x.jsx)("div",{className:"borde flex h-28 w-20 justify-center overflow-hidden rounded-t-lg bg-gray-100 p-2 pb-0",children:(d?.avatar||d?.stepList?.[0]?.image)&&(0,x.jsx)("img",{src:d.avatar||d?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:d.title})}),(0,x.jsxs)("div",{className:i("relative grid min-h-32 flex-1 grid-cols-1 items-center pr-8 ",p+1!=e.length&&"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-gray-200"),children:[(0,x.jsxs)("div",{className:"py-2",children:[t&&(0,x.jsx)("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${p+1}`}),(0,x.jsx)("div",{className:"font-semibold",children:(0,Ra.default)(d.title)}),d?.description&&(0,x.jsx)("div",{className:"mt-1 text-sm text-gray-500",children:(0,Ra.default)(d.description)})]}),(0,x.jsx)("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:(0,x.jsx)($i.ChevronRightIcon,{className:"h-6 w-6"})})]})]},p))}):e?.[0]&&e[0].stepList?.length>0&&(0,x.jsxs)("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[(0,x.jsx)("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:(0,x.jsx)("div",{className:"mx-auto h-auto w-72",children:(0,x.jsxs)("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"&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),(0,x.jsx)("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:(0,x.jsx)(Re,{plugins:[l.current],children:(0,x.jsx)(ke,{className:"ml-0",children:e[0]?.stepList.map((d,p)=>(0,x.jsx)(Ne,{className:"pl-0",onClick:()=>c(0),children:(0,x.jsx)(X,{ratio:o==="small"?540/960:540/1168,children:d?.image&&(0,x.jsx)("img",{src:d.image,className:"size-full object-contain",alt:d.title})})},p))})})})]})})}),(0,x.jsx)("div",{className:"flex w-full flex-none justify-center",children:(0,x.jsxs)(Ce,{size:"lg",variant:"primary",onClick:()=>c(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",(0,x.jsx)($i.ChevronRightIcon,{className:"ml-1 h-5 w-5"})]})})]}),a&&(0,x.jsx)(xp,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},xl=bp;var te=require("react/jsx-runtime"),bl=({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(0,te.jsx)("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:(0,te.jsx)("path",{d:t.d,fill:"currentColor"})})},Gi=(0,Nr.memo)(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:c}=o||{},[d,p]=(0,Nr.useState)(t?.[0]?.title||"");return(0,te.jsxs)(te.Fragment,{children:[e&&(0,te.jsx)(w,{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&&(0,te.jsxs)(Wo,{children:[(0,te.jsx)(yt,{lessThan:"md",children:(0,te.jsx)(xl,{dataGuide:t,mockup:r,isStep:n})}),(0,te.jsx)(yt,{greaterThan:"sm",children:t?.length>1?(0,te.jsxs)(Mt,{defaultValue:t[0]?.title,onValueChange:f=>p(f),children:[(0,te.jsxs)(kt,{showGradientOverlay:s,gradientOverlayColor:l,className:c,children:[(0,te.jsx)(Tt,{className:"mb-6 text-center",children:(0,te.jsx)(ct,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((f,u)=>{let b=u===t.length-1,R=d===f?.title||"";return(0,te.jsxs)(dt,{value:f.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":"",R&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&u!==0&&(0,te.jsx)(bl,{direction:"left",className:i("right-full top-0",R?"text-pink-500":"text-pink-100")}),f.title,n&&!b&&(0,te.jsx)(bl,{direction:"right",className:i("left-full top-0",R?"text-pink-500":"text-pink-100")})]},f.title+u)})})}),(0,te.jsx)(St,{}),(0,te.jsx)(Dt,{})]}),t.map((f,u)=>(0,te.jsx)(pt,{value:f.title,children:(0,te.jsx)(Wi,{guideGroup:f,mockup:r})},f.title+u))]}):t?.length===1&&t[0]&&(0,te.jsx)(Wi,{guideGroup:t[0],mockup:r})})]}),a&&(0,te.jsx)(N,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});var co=require("react/jsx-runtime"),yp=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return(0,co.jsx)(Gi,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return(0,co.jsx)(Gi,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},wp=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>(0,co.jsx)(co.Fragment,{children:yp({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),yl=({idSection:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,className:n,background:s,template:l=1,mockup:c="default",isStep:d=!1})=>(0,co.jsx)(Z,{className:i(n),background:s,idSection:e,children:(0,co.jsx)(wp,{dataHeading:o,template:l,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:c,isStep:d})});var Pr=require("lucide-react");var be=require("react/jsx-runtime");function ji({current:e,total:o,onChange:t}){let a=r=>(0,be.jsx)("li",{children:(0,be.jsx)("button",{className:i(ko({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return(0,be.jsx)("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:(0,be.jsxs)("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&(0,be.jsx)("li",{children:(0,be.jsx)("button",{className:i(ko({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:(0,be.jsx)(Pr.ChevronLeft,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):(0,be.jsxs)(be.Fragment,{children:[a(1),e===1&&[a(2),a(3)],e>3&&(0,be.jsx)("li",{children:(0,be.jsx)("button",{className:i(ko({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&&(0,be.jsx)("button",{className:i(ko({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&(0,be.jsx)("li",{children:(0,be.jsx)("button",{className:i(ko({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:(0,be.jsx)(Pr.ChevronRight,{className:"h-4 w-4"})})})]})})}var wl=require("react"),Nl=require("@heroicons/react/24/outline"),Pl=require("@heroicons/react/24/solid");var Lt=require("react/jsx-runtime"),Cr=(0,wl.forwardRef)(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...c},d)=>(0,Lt.jsxs)("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&(0,Lt.jsx)("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}),(0,Lt.jsx)("textarea",{disabled:e,ref:d,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,...c}),t&&(0,Lt.jsxs)("div",{className:"mobase-text-area-message mt-0.5 flex items-center space-x-1",children:[o?(0,Lt.jsx)(Pl.XCircleIcon,{width:16,height:16,className:"text-red-500"}):(0,Lt.jsx)(Nl.QuestionMarkCircleIcon,{width:16,height:16,className:"text-gray-500"}),(0,Lt.jsx)("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),(0,Lt.jsx)("style",{children:`
|
|
70
|
+
`})]}),lo=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...c})=>(0,y.jsx)(qe,{...c,children:(0,y.jsx)(Oe,{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:(0,y.jsx)(lt,{className:"p-0",children:(0,y.jsxs)("div",{className:"flex flex-row flex-wrap",children:[(0,y.jsx)("div",{className:"hidden flex-none w-full sm:block md:w-5/12",children:o||(0,y.jsxs)("div",{className:"grid grid-cols-1 gap-y-6 px-5 py-8 text-sm",children:[(0,y.jsxs)("div",{className:"flex flex-nowrap items-center",children:[(0,y.jsx)("div",{className:"flex-none",children:(0,y.jsx)("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),(0,y.jsxs)("div",{className:"flex-1 pl-4",children:[(0,y.jsx)("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 1 :"}),(0,y.jsx)("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"})]})]}),(0,y.jsxs)("div",{className:"flex flex-nowrap items-center",children:[(0,y.jsx)("div",{className:"flex-none",children:(0,y.jsx)("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),(0,y.jsxs)("div",{className:"flex-1 pl-4",children:[(0,y.jsx)("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 2 :"}),(0,y.jsx)("div",{className:"mt-1 text-gray-500",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),(0,y.jsxs)("div",{className:"flex flex-nowrap items-center",children:[(0,y.jsx)("div",{className:"flex-none",children:(0,y.jsx)("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),(0,y.jsxs)("div",{className:"flex-1 pl-4",children:[(0,y.jsx)("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 3 :"}),(0,y.jsxs)("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"]})]})]})]})}),(0,y.jsx)("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:(0,y.jsxs)("div",{className:"px-5 py-10 text-center",children:[t&&(0,y.jsx)("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),(0,y.jsxs)("div",{className:"relative",children:[l&&(0,y.jsx)("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:(0,y.jsx)("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),(0,y.jsx)(ep,{img:r,isQrForAll:l,children:n&&(0,y.jsx)(Fs.QRCodeSVG,{value:n,size:215,imageSettings:{src:`${s||"https://homepage.momocdn.net/pwa/images/logoMomox50.png"}`,height:50,width:50,excavate:!0},level:"H"})})]})]})})]})})})});var zs=require("react");var jo=require("react"),Es=v(require("ua-parser-js"),1),tp=()=>(0,Es.default)().device.type==="mobile",op=typeof window<"u"?jo.useLayoutEffect:jo.useEffect,Qo=()=>{let[e,o]=(0,jo.useState)(!1);return op(()=>{o(tp())},[]),e};var Ut=require("react/jsx-runtime"),Xe=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,...s})=>{let[l,c]=(0,zs.useState)(!1),d=Qo(),p=!!a?.qrLink,f=()=>{let B=p?a?.qrLink:e;return typeof B=="string"?B.trim():""},u=()=>{let B=f();!B&&typeof e!="function"||(typeof e=="function"?e():window.open(B,o?"_blank":"_self"))},b=(B,K=0)=>{let q=document.querySelector(B);if(!q)return;let T=q.getBoundingClientRect().top+window.scrollY-K;window.scrollTo({top:T,behavior:"smooth"})},R=()=>{typeof e=="string"&&e.startsWith("#")?b(e,t):u()},M=()=>(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)(Be,{...s,className:r,onClick:()=>c(!0),"data-name":"button-action-with-qr",children:n}),(0,Ut.jsx)(lo,{...a,open:l,onOpenChange:()=>c(!1),qrLink:a?.qrLink||""})]});return p?d?a?.isQrForAll?M():(0,Ut.jsx)(Be,{...s,className:r,onClick:u,"data-name":"button-action-with-qr",children:n}):M():(0,Ut.jsx)(Be,{...s,onClick:R,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};var Uo=v(require("react"),1),Ja=require("@radix-ui/react-icons"),Bs=require("@radix-ui/react-slot");var Os=require("next/router");var Hs=require("next/router");var ap=({href:e,locale:o,defaultLocale:t,basePath:a=""})=>{if(!o||o===t||!e.startsWith("/")||/\.(pdf|docx|xlsx|doc|xls)$/i.test(e))return e;let r=`/${o}`,n=new RegExp(`^${a}(?=[/#?]|$)`);return a&&a!=="/"&&n.test(e)?e.replace(n,`${a}${r}`):`${r}${e}`},mo=({href:e,locale:o,defaultLocale:t,basePath:a})=>e?ap({href:e,locale:o,defaultLocale:t,basePath:a}):void 0;var _s=require("react/jsx-runtime"),L=({href:e,children:o,...t})=>{let a=(0,Hs.useRouter)(),{locale:r,basePath:n,defaultLocale:s}=a;return(0,_s.jsx)("a",{href:mo({href:e,locale:r,basePath:n,defaultLocale:s}),...t,children:o})};var Ye=require("react/jsx-runtime"),hi=Uo.forwardRef(({className:e,...o},t)=>(0,Ye.jsx)("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));hi.displayName="Breadcrumb";var xi=Uo.forwardRef(({className:e,...o},t)=>(0,Ye.jsx)("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}));xi.displayName="BreadcrumbList";var bi=Uo.forwardRef(({className:e,...o},t)=>(0,Ye.jsx)("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));bi.displayName="BreadcrumbItem";var yi=Uo.forwardRef(({asChild:e,className:o,href:t,...a},r)=>{let n=(0,Os.useRouter)(),{locale:s,basePath:l,defaultLocale:c}=n;return(0,Ye.jsx)(e?Bs.Slot:"a",{ref:r,className:i("transition-colors hover:text-foreground",o),href:mo({href:t,locale:s,basePath:l,defaultLocale:c}),...a})});yi.displayName="BreadcrumbLink";var wi=Uo.forwardRef(({className:e,...o},t)=>(0,Ye.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));wi.displayName="BreadcrumbPage";var Ni=({children:e,className:o,...t})=>(0,Ye.jsx)("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??(0,Ye.jsx)(Ja.ChevronRightIcon,{className:"w-2 h-2"})});Ni.displayName="BreadcrumbSeparator";var Pi=({className:e,...o})=>(0,Ye.jsxs)("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[(0,Ye.jsx)(Ja.DotsHorizontalIcon,{className:"w-4 h-4 text-gray-900"}),(0,Ye.jsx)("span",{className:"sr-only",children:"More"})]});Pi.displayName="BreadcrumbElipssis";var rr=v(require("html-react-parser"),1);var ha=require("react");var qo=require("react/jsx-runtime"),Ci=(0,ha.createContext)({align:"center"}),er=({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(0,qo.jsx)("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"},c={small:"lg:text-3xl text-2xl",large:"lg:text-4xl md:text-3xl text-2xl"},{align:d}=(0,ha.useContext)(Ci);return(0,qo.jsx)(s,{className:i("max-w-4xl font-bold",d==="center"?"mx-auto":d==="right"?"ml-auto":"",l[t],c[o],a&&"truncate",r),children:n})},or=({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"},c={none:"",spacingX:"mt-2",spacingM:"mt-3",spacingL:"mt-4",spacingXl:"mt-5",spacing2Xl:"mt-6"},{align:d}=(0,ha.useContext)(Ci);return(0,qo.jsx)("div",{className:i(d==="center"?"mx-auto max-w-2xl":d==="right"?"ml-auto max-w-4xl":"max-w-4xl",s[e],l[o],c[t],a&&"truncate",r),children:n})},ar=({className:e,align:o="center",children:t})=>(0,qo.jsx)("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:(0,qo.jsx)(Ci.Provider,{value:{align:o},children:t})});var Rt=require("react/jsx-runtime"),Z=({idSection:e,className:o,background:t,children:a})=>(0,Rt.jsx)("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:(0,Rt.jsx)("div",{className:"wrapper relative",children:a})}),w=({align:e="center",tagline:o,title:t,description:a,tagHeading:r="h2",colorScheme:n="pink",sizeHeading:s="small",className:l})=>{let c=n==="black"?"pink":n==="pink"?"regular":"white",d=n==="pink"?"pink":n==="white"?"white":"regular",p=n==="white"?"white":"regular";return!t&&!a&&!o?null:(0,Rt.jsxs)(ar,{align:e,className:l,children:[o&&(0,Rt.jsx)(er,{color:c,children:o}),t&&(0,Rt.jsx)(tr,{tagHeading:r,color:d,size:s,children:(0,rr.default)(t)}),a&&(0,Rt.jsx)(or,{color:p,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:(0,rr.default)(a)})]})},N=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:(0,Rt.jsx)("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(0,Rt.jsx)(Xe,{...l,className:i(o&&"w-full md:w-auto",r?.className),children:(0,rr.default)(s)},n)})});var mr=v(require("react"),1),Xs=require("@heroicons/react/20/solid"),Ys=v(require("html-react-parser"),1);var Ee=require("react"),ir=require("lucide-react");var Vs=v(require("react"),1),Ws=require("@radix-ui/react-slot"),$s=require("class-variance-authority");var Gs=require("react/jsx-runtime"),ko=(0,$s.cva)("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"}}),he=Vs.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Ws.Slot:"button",c=i(ko({variant:o,size:t,className:e}));return(0,Gs.jsx)(l,{className:c,disabled:r,ref:s,...n,children:n.children})});he.displayName="IconButton";var Fe=require("react/jsx-runtime"),nr=(0,Ee.createContext)(void 0),kt=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=(0,Ee.useRef)(null),[n,s]=(0,Ee.useState)({left:!1,right:!1}),l=(0,Ee.useCallback)(()=>{let d=r.current;if(d){let{scrollLeft:p,scrollWidth:f,clientWidth:u}=d;s({left:p>0,right:Math.ceil(p+u)<f})}},[]);(0,Ee.useEffect)(()=>{let d=r.current;if(d)return l(),window.addEventListener("resize",l),d.addEventListener("scroll",l),()=>{window.removeEventListener("resize",l),d.removeEventListener("scroll",l)}},[l]);let c=d=>{let p=r.current;if(p){let{scrollLeft:f,clientWidth:u,scrollWidth:b}=p,R=u*.7*(d==="left"?-1:1),M=f+R;M<0?M=0:M>b-u&&(M=b-u),p.scrollTo({left:M,behavior:"smooth"})}};return(0,Fe.jsx)(nr.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:c,gradientOverlayColor:o},children:(0,Fe.jsxs)("div",{className:i("relative w-full",t),children:[e&&(0,Fe.jsxs)(Fe.Fragment,{children:[n.left&&(0,Fe.jsx)("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&&(0,Fe.jsx)("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]})})},Tt=({className:e,children:o})=>{let t=(0,Ee.useContext)(nr);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return(0,Fe.jsx)("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},St=({className:e,children:o,...t})=>{let a=(0,Ee.useContext)(nr);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?(0,Fe.jsx)(he,{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||(0,Fe.jsx)(ir.ChevronLeft,{className:"h-4 w-4"})}):null},Dt=({className:e,children:o,...t})=>{let a=(0,Ee.useContext)(nr);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?(0,Fe.jsx)(he,{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||(0,Fe.jsx)(ir.ChevronRight,{className:"h-4 w-4"})}):null};var sr=v(require("react"),1),mt=v(require("@radix-ui/react-tabs"),1);var lr=require("react/jsx-runtime"),Mt=mt.Root,ct=sr.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>(0,lr.jsx)(mt.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}));ct.displayName=mt.List.displayName;var dt=sr.forwardRef(({className:e,...o},t)=>(0,lr.jsx)(mt.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}));dt.displayName=mt.Trigger.displayName;var pt=sr.forwardRef(({className:e,...o},t)=>(0,lr.jsx)(mt.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}));pt.displayName=mt.Content.displayName;var js=v(require("react"),1),Qs=require("@radix-ui/react-slot"),Us=require("class-variance-authority");var qs=require("react/jsx-runtime"),Ri=(0,Us.cva)("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"}}),Ce=js.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Qs.Slot:"button",c=i(Ri({variant:o,size:t,className:e}));return(0,qs.jsx)(l,{className:c,disabled:r,ref:s,...n,children:n.children})});Ce.displayName="TextButton";var A=require("react/jsx-runtime"),rp=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:(0,A.jsx)("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:(0,A.jsxs)("picture",{children:[(0,A.jsx)("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),(0,A.jsx)("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),(0,A.jsxs)("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&(0,A.jsx)(Ce,{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}),(0,A.jsx)("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}),(0,A.jsxs)("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Ce,{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&&(0,A.jsx)("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&(0,A.jsx)("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},cr=(0,mr.memo)(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},c=(p,f,u)=>{p?.preventDefault(),p?.stopPropagation(),a?a(f):window.open(u,"_blank")},d=(p,f)=>(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",p?.blogList?.length<3?"md:justify-center":""),children:p?.blogList?.map((u,b)=>(0,A.jsx)("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:(0,A.jsx)("div",{onClick:R=>c(R,u?.id,u?.url),className:i("group flex cursor-pointer flex-row md:flex-col",p?.classNameItem),children:(0,A.jsx)(rp,{blog:u})},u?.id)},b))}),p?.isShowBtn&&(0,A.jsx)("div",{className:"flex items-center justify-center w-full mt-8",children:(0,A.jsxs)(Xe,{action:r?()=>r?.(f):p?.btnUrl,newTab:p?.isNewTab,variant:"outline",children:[(0,Ys.default)(p.btnName||"Xem th\xEAm"),p?.isLoading?(0,A.jsx)($o,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!p?.btnUrl&&(0,A.jsx)(Xs.ArrowDownIcon,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},p?.title||f);return(0,A.jsxs)(mr.default.Fragment,{children:[e&&(0,A.jsx)(w,{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?(0,A.jsxs)(Mt,{defaultValue:t[0]?.title,children:[(0,A.jsxs)(kt,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[(0,A.jsx)(Tt,{className:"mb-6 text-center",children:(0,A.jsx)(ct,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((p,f)=>(0,A.jsx)(dt,{value:p.title,children:p.title},p.title+f))})}),(0,A.jsx)(St,{}),(0,A.jsx)(Dt,{})]}),t.map((p,f)=>(0,A.jsx)(pt,{value:p.title,children:d(p,f)},p.title+f))]}):t?.length===1&&t[0]&&d(t[0],0)]})});var qt=v(require("react"),1),pr=require("@heroicons/react/20/solid"),ki=v(require("html-react-parser"),1);var ee=v(require("react"),1),dr=require("@heroicons/react/20/solid"),Zs=v(require("embla-carousel-react"),1);var xe=require("react/jsx-runtime"),Ks=ee.createContext(null);function xa(){let e=ee.useContext(Ks);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Re=ee.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[c,d]=(0,Zs.default)({align:"start",...o,axis:e==="horizontal"?"x":"y"},a),[p,f]=ee.useState(!1),[u,b]=ee.useState(!1),R=ee.useCallback(K=>{K&&(f(K.canScrollPrev()),b(K.canScrollNext()))},[]),M=ee.useCallback(()=>{d?.scrollPrev()},[d]),k=ee.useCallback(()=>{d?.scrollNext()},[d]),B=ee.useCallback(K=>{K.key==="ArrowLeft"?(K.preventDefault(),M()):K.key==="ArrowRight"&&(K.preventDefault(),k())},[M,k]);return ee.useEffect(()=>{!d||!t||t(d)},[d,t]),ee.useEffect(()=>{if(d)return R(d),d.on("reInit",R),d.on("select",R),()=>{d?.off("select",R)}},[d,R]),(0,xe.jsx)(Ks.Provider,{value:{carouselRef:c,api:d,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:M,scrollNext:k,canScrollPrev:p,canScrollNext:u},children:(0,xe.jsx)("div",{ref:l,onKeyDownCapture:B,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});Re.displayName="Carousel";var ke=ee.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=xa();return(0,xe.jsx)("div",{ref:r,className:i("overflow-hidden",o),children:(0,xe.jsx)("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ke.displayName="CarouselContent";var Ne=ee.forwardRef(({className:e,...o},t)=>{let{orientation:a}=xa();return(0,xe.jsx)("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})});Ne.displayName="CarouselItem";var To=ee.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=xa();return(0,xe.jsxs)(he,{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:[(0,xe.jsx)(dr.ChevronLeftIcon,{className:"h-6 w-6"}),(0,xe.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});To.displayName="CarouselPrevious";var So=ee.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=xa();return(0,xe.jsxs)(he,{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:[(0,xe.jsx)(dr.ChevronRightIcon,{className:"h-6 w-6"}),(0,xe.jsx)("span",{className:"sr-only",children:"Next slide"})]})});So.displayName="CarouselNext";var Do=ee.forwardRef((e,o)=>{let{api:t}=xa(),[,a]=ee.useState(!1),r=ee.useCallback(()=>a(l=>!l),[]);ee.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?(0,xe.jsx)("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,c)=>(0,xe.jsx)(he,{className:`navigation-item mx-1 h-1.5 w-1.5 rounded-full p-0 ${c===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 ${c+1}`,onClick:()=>t?.scrollTo(c)},c))}):(0,xe.jsx)(xe.Fragment,{})});Do.displayName="CarouselDots";var S=require("react/jsx-runtime"),ip=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:(0,S.jsx)("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),(0,S.jsxs)("div",{className:"mt-4 md:pr-3",children:[(0,S.jsx)("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&(0,S.jsx)("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:(0,ki.default)(e?.description??"")}),(0,S.jsxs)("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Ce,{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&&(0,S.jsx)("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&(0,S.jsx)("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},np=({dataBlog:e,setCarouselRef:o,carouselRef:t,setCurrent:a,handleOnClickItem:r})=>{let{blogList:n=[],isShowBtn:s,btnName:l,btnUrl:c="#",isNewTab:d,classNameItem:p}=e??{};return(0,qt.useEffect)(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Re,{opts:{dragFree:!1},setApi:o,className:"w-full",children:(0,S.jsx)(ke,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(f=>(0,S.jsx)(Ne,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:(0,S.jsx)("div",{onClick:u=>r(u,f?.id,f?.url),className:i("group cursor-pointer",p),children:(0,S.jsx)(ip,{blog:f})},f?.id)},f?.id))})}),s&&(0,S.jsx)("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:(0,S.jsxs)(Xe,{action:c&&c,newTab:d,variant:"outline",children:[(0,ki.default)(l||"Xem th\xEAm")," "]})})]})},sp=({carouselRef:e})=>(0,S.jsxs)(he,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[(0,S.jsx)(pr.ChevronLeftIcon,{className:"h-6 w-6"}),(0,S.jsx)("span",{className:"sr-only",children:"Previous slide"})]}),lp=({carouselRef:e})=>(0,S.jsxs)(he,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[(0,S.jsx)(pr.ChevronRightIcon,{className:"h-6 w-6"}),(0,S.jsx)("span",{className:"sr-only",children:"Next slide"})]}),Ti=(0,qt.memo)(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(d,p,f)=>{d?.preventDefault(),d?.stopPropagation(),t?t(p):window.open(f,"_blank")},[n,s]=(0,qt.useState)(null),[,l]=(0,qt.useState)(0),c=()=>n?(0,S.jsxs)("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[(0,S.jsx)(sp,{carouselRef:n}),(0,S.jsx)(lp,{carouselRef:n})]}):(0,S.jsx)(S.Fragment,{});return(0,S.jsxs)(qt.default.Fragment,{children:[(0,S.jsxs)("div",{className:" flex items-center justify-between",children:[e&&(0,S.jsx)(w,{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)}),(0,S.jsx)(c,{})]}),(0,S.jsx)(np,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});var Xt=require("react/jsx-runtime"),mp=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return(0,Xt.jsx)(cr,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return(0,Xt.jsx)(Ti,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return(0,Xt.jsx)(cr,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},cp=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>(0,Xt.jsx)(Xt.Fragment,{children:mp({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),Js=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:c})=>(0,Xt.jsx)(Z,{className:i("overflow-hidden",r),idSection:a,background:n,children:(0,Xt.jsx)(cp,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:c})});var gr=v(require("react"),1),ur=require("date-fns/locale"),vr=require("lucide-react"),ol=v(require("lunisolar"),1),al=require("react-day-picker");var el=v(require("react"),1),ba=v(require("@radix-ui/react-checkbox"),1),tl=require("@heroicons/react/16/solid"),Si=require("class-variance-authority");var fr=require("react/jsx-runtime"),dp=(0,Si.cva)("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"}}),pp=(0,Si.cva)("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),ya=el.forwardRef(({className:e,size:o,...t},a)=>(0,fr.jsx)(ba.Root,{ref:a,className:i(dp({size:o}),e),...t,children:(0,fr.jsx)(ba.Indicator,{className:i("flex items-center justify-center text-current"),children:(0,fr.jsx)(tl.CheckIcon,{className:i(pp({size:o}))})})}));ya.displayName=ba.Root.displayName;var Pe=require("react/jsx-runtime"),fp=({date:e,cusContent:o})=>{let t=null;return t=(0,ol.default)(e).lunar,(0,Pe.jsxs)(Pe.Fragment,{children:[o?o(e):e.getDate(),t&&(0,Pe.jsx)("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},gp={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 up({isShow:e,setIsShow:o,lang:t}){let a=gr.useId();return(0,Pe.jsx)("div",{className:"w-full p-3 pt-0",children:(0,Pe.jsxs)("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[(0,Pe.jsx)(ya,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),(0,Pe.jsx)("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 vp=e=>e.getDay()===0||e.getDay()===6;function wa({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,c]=gr.useState(!0);return(0,Pe.jsx)(al.DayPicker,{locale:r==="vi"?ur.vi:ur.enUS,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(st({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(st({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:vp},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>(0,Pe.jsx)(vr.ChevronLeft,{className:"h-6 w-6"}),IconRight:()=>(0,Pe.jsx)(vr.ChevronRight,{className:"h-6 w-6"}),DayContent:d=>(0,Pe.jsx)(fp,{date:d.date,cusContent:n}),Months:({children:d})=>(0,Pe.jsxs)("div",{className:"w-full",children:[(0,Pe.jsx)("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:d}),a&&(0,Pe.jsx)(up,{isShow:l,setIsShow:c,lang:r})]})},formatters:r==="vi"?gp:{},...s})}wa.displayName="Calendar";var hr=require("@heroicons/react/16/solid"),Na=require("date-fns"),il=require("lucide-react");var rl=v(require("react"),1),Yt=v(require("@radix-ui/react-popover"),1);var Di=require("react/jsx-runtime"),Xo=Yt.Root,Yo=Yt.Trigger,Mo=rl.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>(0,Di.jsx)(Yt.Portal,{children:(0,Di.jsx)(Yt.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})}));Mo.displayName=Yt.Content.displayName;var ie=require("react/jsx-runtime"),nl=({label:e,placeholder:o="Select a value",size:t=1,message:a,isError:r,disabled:n,dateFormat:s="dd/MM/yyyy",buttonProps:l,popoverProps:c,calendarProps:d,popoverContentProps:p})=>{let f=d?.selected||null;return(0,ie.jsxs)("div",{children:[(0,ie.jsxs)(Xo,{...c,children:[(0,ie.jsx)(Yo,{asChild:!0,children:(0,ie.jsxs)(Be,{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",(!f||!(f instanceof Date)&&typeof f=="object"&&(!("from"in f)||!f.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[(0,ie.jsx)("div",{className:"line-clamp-1 flex-1",children:f instanceof Date?(0,Na.format)(f,s):f&&typeof f=="object"&&"from"in f&&"to"in f?(0,ie.jsx)(ie.Fragment,{children:f.from?f.to?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{className:"date-from",children:(0,Na.format)(f.from,s)})," ",(0,ie.jsx)("span",{className:"date-separator",children:"-"}),(0,ie.jsx)("span",{className:"date-to",children:(0,Na.format)(f.to,s)})]}):(0,Na.format)(f.from,s):o}):o}),e&&(0,ie.jsx)("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}),(0,ie.jsx)(il.Calendar,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),(0,ie.jsx)(Mo,{className:"w-auto border-none !p-0",...p,children:(0,ie.jsx)(wa,{...d,defaultMonth:f&&typeof f=="object"&&"from"in f?f.from:f instanceof Date?f:void 0})})]}),a&&(0,ie.jsxs)("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?(0,ie.jsx)(hr.XCircleIcon,{width:16,height:16,className:"text-red-500"}):(0,ie.jsx)(hr.QuestionMarkCircleIcon,{width:16,height:16,className:"text-gray-500"}),(0,ie.jsx)("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};var Pa=require("react"),yr=require("@heroicons/react/16/solid"),dl=require("date-fns");var It=v(require("react"),1),Zt=require("@heroicons/react/16/solid"),sl=require("@heroicons/react/24/outline"),E=v(require("@radix-ui/react-select"),1);var $=require("react/jsx-runtime"),Zo=It.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},c)=>(0,$.jsxs)("div",{ref:c,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&&(0,$.jsx)("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}),(0,$.jsx)(E.Root,{disabled:s,...l,children:o}),a&&(0,$.jsxs)("div",{className:i("mobase-select-message mt-1 flex items-center space-x-1 text-gray-500",n&&"text-red-500"),children:[n?(0,$.jsx)(Zt.XCircleIcon,{width:16,height:16}):(0,$.jsx)(sl.QuestionMarkCircleIcon,{width:16,height:16}),(0,$.jsx)("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),Ko=E.Value,Io=It.forwardRef(({className:e,children:o,...t},a)=>(0,$.jsxs)(E.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:[(0,$.jsx)("div",{className:"line-clamp-1 text-left",children:o}),(0,$.jsx)(E.Icon,{asChild:!0,children:(0,$.jsx)(Zt.ChevronDownIcon,{className:"h-4 w-4 flex-none text-gray-500"})})]}));Io.displayName=E.Trigger.displayName;var xr=It.forwardRef(({className:e,...o},t)=>(0,$.jsx)(E.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:(0,$.jsx)(Zt.ChevronUpIcon,{className:"h-5 w-5"})}));xr.displayName=E.ScrollUpButton.displayName;var br=It.forwardRef(({className:e,...o},t)=>(0,$.jsx)(E.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:(0,$.jsx)(Zt.ChevronDownIcon,{className:"h-5 w-5"})}));br.displayName=E.ScrollDownButton.displayName;var Lo=It.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>(0,$.jsx)(E.Portal,{children:(0,$.jsxs)(E.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:[(0,$.jsx)(xr,{}),(0,$.jsx)(E.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),(0,$.jsx)(br,{})]})}));Lo.displayName=E.Content.displayName;var Jo=It.forwardRef(({className:e,children:o,...t},a)=>(0,$.jsx)(E.Group,{ref:a,className:i("relative border-b border-gray-200 p-1 after:w-full last:border-0",e),...t,children:o})),Mi=It.forwardRef(({className:e,...o},t)=>(0,$.jsx)(E.Label,{ref:t,className:i("z-[1] py-1.5 pl-7 pr-2 text-sm font-semibold",e),...o}));Mi.displayName=E.Label.displayName;var Kt=It.forwardRef(({className:e,children:o,...t},a)=>(0,$.jsxs)(E.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:[(0,$.jsx)("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:(0,$.jsx)(E.ItemIndicator,{children:(0,$.jsx)(Zt.CheckIcon,{className:"h-4 w-4 text-pink-500"})})}),(0,$.jsx)(E.ItemText,{children:o})]})),Ii=It.forwardRef(({className:e,...o},t)=>(0,$.jsx)(E.Separator,{ref:t,className:i("-mx-1 my-1 h-px",e),...o}));Ii.displayName=E.Separator.displayName;var ll=["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"],ml=["January","February","March","April","May","June","July","August","September","October","November","December"],Li=(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}},cl=(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)};var O=require("react/jsx-runtime"),pl=({label:e,selected:o,onSelect:t,size:a=1,message:r,isError:n,disabled:s,dateFormat:l="dd/MM/yyyy",lang:c="vi",fromYear:d=1900,toYear:p=new Date().getFullYear(),disableUnselect:f=!1})=>{let[u,b]=(0,Pa.useState)(o??null),R=Math.min(d,p),M=Math.max(d,p),k=l==="MM/yyyy",B=(T,J)=>{if(J===0){b(void 0),t?.(void 0);return}let W=u?.getFullYear()||new Date().getFullYear(),it=u?.getMonth()??0,nt=u?.getDate()??1;T==="month"&&J!==null&&(it=J-1),T==="year"&&J!==null&&(W=J),k?nt=1:T==="day"&&J!==null&&(nt=J);let Xa=Li(W,it+1).daysInMonth;nt>Xa&&(nt=1);let fa=new Date(W,it,nt);(0,dl.isValid)(fa)&&(b(fa),t?.(fa))},[K,q]=(0,Pa.useState)(!1),Gt=T=>{q(T)};return(0,Pa.useEffect)(()=>{b(o??null)},[o]),(0,O.jsxs)("div",{className:i("relative",s&&"cursor-no-drop"),children:[(0,O.jsxs)("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",K&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",u?"":"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&&(0,O.jsx)("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}),(0,O.jsxs)("div",{className:"flex h-full flex-row divide-x",children:[!k&&(0,O.jsxs)(Zo,{value:u?u.getDate().toString().padStart(2,"0"):"",onValueChange:T=>B("day",parseInt(T,10)),onOpenChange:Gt,className:"w-[30%]",children:[(0,O.jsx)(Io,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:(0,O.jsx)(Ko,{placeholder:c==="vi"?"Ng\xE0y":"Day"})}),(0,O.jsx)(Lo,{onCloseAutoFocus:T=>T.preventDefault(),children:(0,O.jsxs)(Jo,{children:[!f&&(0,O.jsx)(Kt,{value:"0",className:"text-gray-600",children:c==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:Li(u?.getFullYear()||new Date().getFullYear(),(u?.getMonth()??0)+1).daysInMonth},(T,J)=>(J+1).toString().padStart(2,"0")).map(T=>(0,O.jsx)(Kt,{value:T,children:T},T))]})})]}),(0,O.jsxs)(Zo,{value:u?(u.getMonth()+1).toString():"",onValueChange:T=>B("month",parseInt(T,10)),onOpenChange:Gt,className:i(k?"w-1/2":"w-2/5"),children:[(0,O.jsx)(Io,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:(0,O.jsx)(Ko,{placeholder:c==="vi"?"Th\xE1ng":"Month"})}),(0,O.jsx)(Lo,{onCloseAutoFocus:T=>T.preventDefault(),children:(0,O.jsxs)(Jo,{children:[!f&&(0,O.jsx)(Kt,{value:"0",className:"text-gray-600",children:c==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(T,J)=>J+1).map(T=>(0,O.jsx)(Kt,{value:T.toString(),children:c==="vi"?ll[T-1]:ml[T-1]},T))]})})]}),(0,O.jsxs)(Zo,{value:u?u.getFullYear().toString():"",onValueChange:T=>B("year",parseInt(T,10)),onOpenChange:Gt,className:i(k?"w-1/2":"w-[30%]"),children:[(0,O.jsx)(Io,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:(0,O.jsx)(Ko,{placeholder:c==="vi"?"N\u0103m":"Year"})}),(0,O.jsx)(Lo,{onCloseAutoFocus:T=>T.preventDefault(),children:(0,O.jsxs)(Jo,{children:[!f&&(0,O.jsx)(Kt,{value:"0",className:"text-gray-600",children:c==="vi"?"B\u1ECF ch\u1ECDn":"None"}),cl(R,M).map(T=>(0,O.jsx)(Kt,{value:T.toString(),children:T},T))]})})]})]})]}),r&&(0,O.jsxs)("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?(0,O.jsx)(yr.XCircleIcon,{width:16,height:16,className:"text-red-500"}):(0,O.jsx)(yr.QuestionMarkCircleIcon,{width:16,height:16,className:"text-gray-500"}),(0,O.jsx)("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};var Ao=v(require("react"),1),ae=v(require("@radix-ui/react-alert-dialog"),1);var Ze=require("react/jsx-runtime"),fl=ae.Root,gl=ae.Trigger,Ai=ae.Portal,wr=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.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}));wr.displayName=ae.Overlay.displayName;var Fi=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsxs)(Ai,{children:[(0,Ze.jsx)(wr,{}),(0,Ze.jsx)(ae.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})]}));Fi.displayName=ae.Content.displayName;var Ei=({className:e,...o})=>(0,Ze.jsx)("div",{className:i("flex flex-col space-y-2 text-left",e),...o});Ei.displayName="AlertDialogHeader";var zi=({className:e,...o})=>(0,Ze.jsx)("div",{className:i("flex flex-row justify-end space-x-4",e),...o});zi.displayName="AlertDialogFooter";var Hi=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));Hi.displayName=ae.Title.displayName;var _i=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));_i.displayName=ae.Description.displayName;var Bi=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.Action,{ref:t,className:i(st({variant:"primary"}),"",e),...o}));Bi.displayName=ae.Action.displayName;var Oi=Ao.forwardRef(({className:e,...o},t)=>(0,Ze.jsx)(ae.Cancel,{ref:t,className:i(st({variant:"secondary"}),e),...o}));Oi.displayName=ae.Cancel.displayName;var Nr=require("react");var Ca=require("react"),Vi=v(require("html-react-parser"),1),vl=require("motion/react");var ul=v(require("@radix-ui/react-aspect-ratio"),1),X=ul.Root;var Q=require("react/jsx-runtime"),hp=({guideGroup:e,mockup:o})=>{let[t,a]=(0,Ca.useState)(),[r,n]=(0,Ca.useState)(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return(0,Ca.useEffect)(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),(0,Q.jsx)(Q.Fragment,{children:e?.stepList&&e?.stepList?.length>0&&(0,Q.jsxs)("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[(0,Q.jsx)("div",{className:"h-auto w-64 flex-none",children:(0,Q.jsxs)("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"&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),(0,Q.jsx)("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,Q.jsx)("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,Q.jsx)("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),(0,Q.jsx)("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:(0,Q.jsxs)(Re,{setApi:a,children:[(0,Q.jsx)(ke,{className:"ml-0",children:e?.stepList.map((l,c)=>(0,Q.jsx)(Ne,{className:"pl-0",children:(0,Q.jsx)(X,{ratio:o==="small"?540/960:540/1168,children:l?.image&&(0,Q.jsx)("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},c))}),(0,Q.jsx)(To,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),(0,Q.jsx)(So,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),(0,Q.jsx)("div",{className:"flex flex-auto pl-12 pt-4",children:(0,Q.jsx)("ul",{className:"flex flex-col",children:e?.stepList.map((l,c)=>(0,Q.jsxs)("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",c+1===r?"":"cursor-pointer"),onClick:()=>t&&t.scrollTo(c),children:[(0,Q.jsx)("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",c+1===r?"bg-pink-500 text-white":"bg-pink-100 text-pink-500"),children:c+1}),(0,Q.jsx)("div",{className:i(" text-sm font-medium",c+1===r?"text-pink-500":"text-gray-900"),children:(0,Vi.default)(l.title)}),l.content&&(0,Q.jsx)(vl.motion.div,{initial:"closed",animate:c+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:(0,Q.jsx)("div",{className:"mt-3 text-sm text-gray-700",children:(0,Vi.default)(l.content)})})]},c))})})]})})},Wi=hp;var Jt=require("react"),$i=require("@heroicons/react/20/solid"),hl=v(require("embla-carousel-autoplay"),1),Ra=v(require("html-react-parser"),1);var x=require("react/jsx-runtime"),xp=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=(0,Jt.useState)(0),[s,l]=(0,Jt.useState)();return(0,Jt.useEffect)(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:(0,x.jsx)(qe,{open:e,onOpenChange:o,children:(0,x.jsxs)(Oe,{position:"bottom",height:"full",children:[(0,x.jsx)(Co,{children:(0,x.jsx)(Ro,{className:"line-clamp-1",children:t?.title})}),(0,x.jsxs)(lt,{className:"grid overflow-hidden p-0 ",children:[(0,x.jsx)(Re,{setApi:l,className:" grid overflow-hidden",children:(0,x.jsx)(ke,{className:"ml-0 h-full",children:t.stepList.map((c,d)=>(0,x.jsx)(Ne,{className:"h-full w-full pl-0",children:(0,x.jsxs)("div",{className:"flex h-full flex-col overflow-y-auto",children:[(0,x.jsx)("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:(0,x.jsx)("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:(0,x.jsxs)("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"&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),(0,x.jsx)("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:(0,x.jsx)(X,{ratio:a==="small"?540/960:540/1168,children:c?.image&&(0,x.jsx)("img",{src:c.image,className:"size-full object-contain",alt:c.title})})})]})})}),(0,x.jsxs)("div",{className:"p-5 pb-12",children:[(0,x.jsx)("div",{className:"font-semibold",children:(0,Ra.default)(c.title)}),c?.content&&(0,x.jsx)("div",{className:"mt-3 text-sm text-gray-800",children:(0,Ra.default)(c.content)})]})]})},d))})}),(0,x.jsx)("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((c,d)=>(0,x.jsx)("div",{className:`h-2 w-2 cursor-pointer rounded-full ${d+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(d)},d))})]})]})})},bp=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=(0,Jt.useState)(!1),[n,s]=(0,Jt.useState)(null),l=(0,Jt.useRef)((0,hl.default)({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),c=d=>{s(e?.[d]||null),r(!0)};return e?.length===0?null:(0,x.jsxs)(x.Fragment,{children:[e?.length>1?(0,x.jsx)("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((d,p)=>(0,x.jsxs)("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>c(p),children:[(0,x.jsx)("div",{className:"borde flex h-28 w-20 justify-center overflow-hidden rounded-t-lg bg-gray-100 p-2 pb-0",children:(d?.avatar||d?.stepList?.[0]?.image)&&(0,x.jsx)("img",{src:d.avatar||d?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:d.title})}),(0,x.jsxs)("div",{className:i("relative grid min-h-32 flex-1 grid-cols-1 items-center pr-8 ",p+1!=e.length&&"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-gray-200"),children:[(0,x.jsxs)("div",{className:"py-2",children:[t&&(0,x.jsx)("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${p+1}`}),(0,x.jsx)("div",{className:"font-semibold",children:(0,Ra.default)(d.title)}),d?.description&&(0,x.jsx)("div",{className:"mt-1 text-sm text-gray-500",children:(0,Ra.default)(d.description)})]}),(0,x.jsx)("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:(0,x.jsx)($i.ChevronRightIcon,{className:"h-6 w-6"})})]})]},p))}):e?.[0]&&e[0].stepList?.length>0&&(0,x.jsxs)("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[(0,x.jsx)("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:(0,x.jsx)("div",{className:"mx-auto h-auto w-72",children:(0,x.jsxs)("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"&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),(0,x.jsx)("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),(0,x.jsx)("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:(0,x.jsx)(Re,{plugins:[l.current],children:(0,x.jsx)(ke,{className:"ml-0",children:e[0]?.stepList.map((d,p)=>(0,x.jsx)(Ne,{className:"pl-0",onClick:()=>c(0),children:(0,x.jsx)(X,{ratio:o==="small"?540/960:540/1168,children:d?.image&&(0,x.jsx)("img",{src:d.image,className:"size-full object-contain",alt:d.title})})},p))})})})]})})}),(0,x.jsx)("div",{className:"flex w-full flex-none justify-center",children:(0,x.jsxs)(Ce,{size:"lg",variant:"primary",onClick:()=>c(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",(0,x.jsx)($i.ChevronRightIcon,{className:"ml-1 h-5 w-5"})]})})]}),a&&(0,x.jsx)(xp,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},xl=bp;var te=require("react/jsx-runtime"),bl=({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(0,te.jsx)("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:(0,te.jsx)("path",{d:t.d,fill:"currentColor"})})},Gi=(0,Nr.memo)(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:c}=o||{},[d,p]=(0,Nr.useState)(t?.[0]?.title||"");return(0,te.jsxs)(te.Fragment,{children:[e&&(0,te.jsx)(w,{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&&(0,te.jsxs)(Wo,{children:[(0,te.jsx)(yt,{lessThan:"md",children:(0,te.jsx)(xl,{dataGuide:t,mockup:r,isStep:n})}),(0,te.jsx)(yt,{greaterThan:"sm",children:t?.length>1?(0,te.jsxs)(Mt,{defaultValue:t[0]?.title,onValueChange:f=>p(f),children:[(0,te.jsxs)(kt,{showGradientOverlay:s,gradientOverlayColor:l,className:c,children:[(0,te.jsx)(Tt,{className:"mb-6 text-center",children:(0,te.jsx)(ct,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((f,u)=>{let b=u===t.length-1,R=d===f?.title||"";return(0,te.jsxs)(dt,{value:f.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":"",R&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&u!==0&&(0,te.jsx)(bl,{direction:"left",className:i("right-full top-0",R?"text-pink-500":"text-pink-100")}),f.title,n&&!b&&(0,te.jsx)(bl,{direction:"right",className:i("left-full top-0",R?"text-pink-500":"text-pink-100")})]},f.title+u)})})}),(0,te.jsx)(St,{}),(0,te.jsx)(Dt,{})]}),t.map((f,u)=>(0,te.jsx)(pt,{value:f.title,children:(0,te.jsx)(Wi,{guideGroup:f,mockup:r})},f.title+u))]}):t?.length===1&&t[0]&&(0,te.jsx)(Wi,{guideGroup:t[0],mockup:r})})]}),a&&(0,te.jsx)(N,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});var co=require("react/jsx-runtime"),yp=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return(0,co.jsx)(Gi,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return(0,co.jsx)(Gi,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},wp=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>(0,co.jsx)(co.Fragment,{children:yp({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),yl=({idSection:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,className:n,background:s,template:l=1,mockup:c="default",isStep:d=!1})=>(0,co.jsx)(Z,{className:i(n),background:s,idSection:e,children:(0,co.jsx)(wp,{dataHeading:o,template:l,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:c,isStep:d})});var Pr=require("lucide-react");var be=require("react/jsx-runtime");function ji({current:e,total:o,onChange:t}){let a=r=>(0,be.jsx)("li",{children:(0,be.jsx)("button",{className:i(ko({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return(0,be.jsx)("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:(0,be.jsxs)("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&(0,be.jsx)("li",{children:(0,be.jsx)("button",{className:i(ko({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:(0,be.jsx)(Pr.ChevronLeft,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):(0,be.jsxs)(be.Fragment,{children:[a(1),e===1&&[a(2),a(3)],e>3&&(0,be.jsx)("li",{children:(0,be.jsx)("button",{className:i(ko({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&&(0,be.jsx)("button",{className:i(ko({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&(0,be.jsx)("li",{children:(0,be.jsx)("button",{className:i(ko({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:(0,be.jsx)(Pr.ChevronRight,{className:"h-4 w-4"})})})]})})}var wl=require("react"),Nl=require("@heroicons/react/24/outline"),Pl=require("@heroicons/react/24/solid");var Lt=require("react/jsx-runtime"),Cr=(0,wl.forwardRef)(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...c},d)=>(0,Lt.jsxs)("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&(0,Lt.jsx)("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}),(0,Lt.jsx)("textarea",{disabled:e,ref:d,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,...c}),t&&(0,Lt.jsxs)("div",{className:"mobase-text-area-message mt-0.5 flex items-center space-x-1",children:[o?(0,Lt.jsx)(Pl.XCircleIcon,{width:16,height:16,className:"text-red-500"}):(0,Lt.jsx)(Nl.QuestionMarkCircleIcon,{width:16,height:16,className:"text-gray-500"}),(0,Lt.jsx)("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),(0,Lt.jsx)("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
|
}
|