s-platform-landing-section 0.1.35 → 0.1.36-beta.1

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/index.js CHANGED
@@ -10,16 +10,16 @@ var pi = require('react-icons/pi');
10
10
  var tb = require('react-icons/tb');
11
11
  var si = require('react-icons/si');
12
12
  var io = require('react-icons/io');
13
+ var md = require('react-icons/md');
13
14
  var fa6 = require('react-icons/fa6');
14
- require('react-icons/ci');
15
- var bs = require('react-icons/bs');
15
+ var ai = require('react-icons/ai');
16
16
  var lu = require('react-icons/lu');
17
17
  var DatePicker = _interopDefault(require('react-datepicker'));
18
18
  require('react-datepicker/dist/react-datepicker.css');
19
19
  var Slider = _interopDefault(require('react-slick'));
20
20
  require('slick-carousel/slick/slick.css');
21
21
  require('slick-carousel/slick/slick-theme.css');
22
- var ai = require('react-icons/ai');
22
+ var bs = require('react-icons/bs');
23
23
  var go = require('react-icons/go');
24
24
  var gr = require('react-icons/gr');
25
25
  var ri = require('react-icons/ri');
@@ -951,7 +951,7 @@ var SectionTitle2 = function SectionTitle2(props) {
951
951
  }), /*#__PURE__*/React__default.createElement(io.IoIosStar, {
952
952
  className: "w-4 h-4 text-warning"
953
953
  })) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
954
- className: "text-xl text-center leading-relaxed text-textSecondary"
954
+ className: "text-xl text-center leading-relaxed text-textSecondary pb-4"
955
955
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
956
956
  };
957
957
 
@@ -978,10 +978,27 @@ var SectionTitle4 = function SectionTitle4(props) {
978
978
  }, data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
979
979
  className: "border w-32 border-primary"
980
980
  })) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
981
- className: "text-xl text-center font-medium leading-relaxed text-secondary mt-2"
981
+ className: "text-xl text-center leading-relaxed text-secondary mt-2"
982
982
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
983
983
  };
984
984
 
985
+ var SectionTitle5 = function SectionTitle5(props) {
986
+ var data = props.data;
987
+ return /*#__PURE__*/React__default.createElement("div", {
988
+ className: true
989
+ }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
990
+ className: "flex items-start gap-2"
991
+ }, /*#__PURE__*/React__default.createElement("div", {
992
+ className: "text-secondary text-4xl md:text-5xl"
993
+ }, /*#__PURE__*/React__default.createElement(md.MdKeyboardDoubleArrowRight, null)), /*#__PURE__*/React__default.createElement("div", {
994
+ className: "flex flex-col gap-2"
995
+ }, /*#__PURE__*/React__default.createElement("div", {
996
+ className: "text-2xl md:text-4xl text-textHeading font-medium font-fontHeading"
997
+ }, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
998
+ className: "text-lg md:text-2xl leading-relaxed text-textSecondary"
999
+ }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null)) : null);
1000
+ };
1001
+
985
1002
  var Input = React.forwardRef(function (props, ref) {
986
1003
  var _props$label = props.label,
987
1004
  label = _props$label === void 0 ? "" : _props$label,
@@ -1214,20 +1231,22 @@ var Hero2 = function Hero2(props) {
1214
1231
  }, /*#__PURE__*/React__default.createElement("img", {
1215
1232
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
1216
1233
  alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
1217
- className: "w-full h-auto object-cover min-h-[22vh] max-h-[100vh]"
1234
+ className: "w-full h-auto object-cover min-h-[35vh] max-h-[100vh]"
1218
1235
  }), /*#__PURE__*/React__default.createElement("div", {
1219
- className: "absolute inset-y-0 right-[1%] md:right-[8%] w-[58%] md:w-1/2 flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
1236
+ className: "absolute inset-y-0 right-[2%] md:right-[4%] w-[58%] md:w-[54%] flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
1220
1237
  }, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
1221
1238
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
1222
1239
  className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
1223
1240
  }) : null, /*#__PURE__*/React__default.createElement("div", {
1224
- className: "font-medium line-clamp-1 ",
1241
+ className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
1225
1242
  style: {
1226
- fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
1227
1243
  lineHeight: "1.5"
1228
1244
  }
1229
1245
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
1230
- className: "text-xs line-clamp-2 md:line-clamp-3 text-ellipsis sm:text-base md:text-xl lg:text-2xl"
1246
+ className: "line-clamp-3 text-ellipsis text-base md:text-lg lg:text-xl xl:text-2xl",
1247
+ style: {
1248
+ lineHeight: 1.625
1249
+ }
1231
1250
  }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.description)));
1232
1251
  };
1233
1252
 
@@ -1239,13 +1258,16 @@ var Hero5 = function Hero5(props) {
1239
1258
  }, /*#__PURE__*/React__default.createElement("img", {
1240
1259
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
1241
1260
  alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
1242
- className: "w-full min-h-[22vh] max-h-[100vh] object-cover"
1261
+ className: "w-full min-h-[35vh] max-h-[100vh] object-cover"
1243
1262
  }), /*#__PURE__*/React__default.createElement("div", {
1244
- className: "absolute inset-0 flex flex-col top-[5%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 lg:w-[45%] max-w-[90%] left-1 lg:left-10 xl:left-20"
1263
+ className: "absolute inset-0 flex flex-col top-[8%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 max-w-[90%] left-1 lg:left-10 xl:left-20"
1245
1264
  }, /*#__PURE__*/React__default.createElement("div", {
1246
- className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading pt-2 pb-1 overflow-hidden text-ellipsis font-medium line-clamp-1"
1265
+ className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2 xl:line-clamp-1",
1266
+ style: {
1267
+ lineHeight: 1.5
1268
+ }
1247
1269
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
1248
- className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 md:line-clamp-4 overflow-hidden text-ellipsis "
1270
+ className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 overflow-hidden text-ellipsis"
1249
1271
  }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.description)));
1250
1272
  };
1251
1273
 
@@ -1261,21 +1283,20 @@ var Hero6 = function Hero6(props) {
1261
1283
  }, /*#__PURE__*/React__default.createElement("img", {
1262
1284
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
1263
1285
  alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
1264
- className: "object-cover w-full h-auto"
1286
+ className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
1265
1287
  }), /*#__PURE__*/React__default.createElement("div", {
1266
- className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-16 md:px-20 "
1288
+ className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10 md:px-20 "
1267
1289
  }, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.title ? /*#__PURE__*/React__default.createElement("div", {
1268
- className: "text-primary font-headingFont text-center line-clamp-1 text-ellipsis pt-2 md:pt-3",
1290
+ className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
1269
1291
  style: {
1270
- fontSize: "clamp(1rem, 4vw, 3rem)",
1271
1292
  lineHeight: "2"
1272
1293
  }
1273
1294
  }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.title) : null, /*#__PURE__*/React__default.createElement("div", {
1274
- className: "flex flex-col gap-1 md:gap-4 lg:gap-6 "
1295
+ className: "flex flex-col gap-2 md:gap-4 lg:gap-6 "
1275
1296
  }, data !== null && data !== void 0 && (_data$data5 = data.data) !== null && _data$data5 !== void 0 && (_data$data5$ = _data$data5[0]) !== null && _data$data5$ !== void 0 && _data$data5$.description ? /*#__PURE__*/React__default.createElement("div", {
1276
- className: "line-clamp-1 md:line-clamp-2 pb-1",
1297
+ className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
1277
1298
  style: {
1278
- fontSize: "clamp(0.75rem, 3vw, 1.5rem)"
1299
+ lineHeight: 1.5
1279
1300
  }
1280
1301
  }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description) : null, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$buttons = _sectionData$.buttons) === null || _sectionData$$buttons === void 0 ? void 0 : _sectionData$$buttons.map(function (button) {
1281
1302
  return button !== null && button !== void 0 && button.label && (button !== null && button !== void 0 && button.route || button !== null && button !== void 0 && button.link) ? /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -1322,13 +1343,16 @@ var Hero10 = function Hero10(props) {
1322
1343
 
1323
1344
  var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
1324
1345
  var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
1346
+ var SECTION_CLASS_PADDING = "py-6 md:py-12 px-4 xl:px-20 bg-background";
1325
1347
 
1326
1348
  var Hero11 = function Hero11(props) {
1327
- var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$;
1349
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons;
1328
1350
  var _props$data = props.data,
1329
1351
  data = _props$data === void 0 ? {} : _props$data,
1330
1352
  _props$shopConfigStyl = props.shopConfigStyle,
1331
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
1353
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
1354
+ _props$Link = props.Link,
1355
+ Link = _props$Link === void 0 ? null : _props$Link;
1332
1356
  return /*#__PURE__*/React__default.createElement("div", {
1333
1357
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-bgSecondary gap-6 md:gap-12"
1334
1358
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -1356,11 +1380,16 @@ var Hero11 = function Hero11(props) {
1356
1380
  className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont w-max text-center text-primary"
1357
1381
  }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$title = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
1358
1382
  className: "text-lg md:text-xl lg:text-2xl"
1359
- }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), /*#__PURE__*/React__default.createElement(Button, {
1360
- label: "\u0110\u1EB7t b\xE0n ngay",
1361
- shopConfigStyle: shopConfigStyle,
1362
- className: "!font-normal w-max",
1363
- sho: true
1383
+ }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.map(function (button, index) {
1384
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
1385
+ Link: Link,
1386
+ key: "gdf-" + index,
1387
+ href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
1388
+ }, /*#__PURE__*/React__default.createElement(Button, {
1389
+ label: button === null || button === void 0 ? void 0 : button.label,
1390
+ shopConfigStyle: shopConfigStyle,
1391
+ className: "!font-normal w-max"
1392
+ }));
1364
1393
  })));
1365
1394
  };
1366
1395
 
@@ -1386,113 +1415,6 @@ var Hero12 = function Hero12(props) {
1386
1415
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description)));
1387
1416
  };
1388
1417
 
1389
- var CarouselItem = function CarouselItem(props) {
1390
- var _Object$keys;
1391
- var _props$data = props.data,
1392
- data = _props$data === void 0 ? [] : _props$data,
1393
- _props$className = props.className,
1394
- className = _props$className === void 0 ? "" : _props$className,
1395
- _props$style = props.style,
1396
- style = _props$style === void 0 ? {} : _props$style,
1397
- _props$onClick = props.onClick,
1398
- onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
1399
- _props$isAll = props.isAll,
1400
- isAll = _props$isAll === void 0 ? true : _props$isAll,
1401
- _props$isNavigateButt = props.isNavigateButton,
1402
- isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
1403
- _props$itemClassName = props.itemClassName,
1404
- itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
1405
- var listRef = React.useRef(null);
1406
- var _useState = React.useState(false),
1407
- canScrollLeft = _useState[0],
1408
- setCanScrollLeft = _useState[1];
1409
- var _useState2 = React.useState(false),
1410
- canScrollRight = _useState2[0],
1411
- setCanScrollRight = _useState2[1];
1412
- var _useState3 = React.useState({}),
1413
- value = _useState3[0],
1414
- setValue = _useState3[1];
1415
- React.useEffect(function () {
1416
- var _listRef$current;
1417
- checkScroll();
1418
- (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
1419
- return function () {
1420
- var _listRef$current2;
1421
- return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
1422
- };
1423
- }, [data]);
1424
- var checkScroll = function checkScroll() {
1425
- if (listRef.current) {
1426
- var _listRef$current3 = listRef.current,
1427
- scrollLeft = _listRef$current3.scrollLeft,
1428
- scrollWidth = _listRef$current3.scrollWidth,
1429
- clientWidth = _listRef$current3.clientWidth;
1430
- setCanScrollLeft(scrollLeft > 0);
1431
- setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
1432
- }
1433
- };
1434
- var handleClickPrevImg = function handleClickPrevImg() {
1435
- if (listRef.current) {
1436
- checkScroll();
1437
- listRef.current.scrollBy({
1438
- left: -300,
1439
- behavior: "smooth"
1440
- });
1441
- }
1442
- };
1443
- var handleClickNextImg = function handleClickNextImg() {
1444
- if (listRef.current) {
1445
- checkScroll();
1446
- listRef.current.scrollBy({
1447
- left: 300,
1448
- behavior: "smooth"
1449
- });
1450
- }
1451
- };
1452
- var handleOnClick = function handleOnClick(item) {
1453
- setValue(item);
1454
- onClick === null || onClick === void 0 ? void 0 : onClick(item);
1455
- };
1456
- return /*#__PURE__*/React__default.createElement("div", {
1457
- className: "h-10 md:h-12 flex justify-between items-center " + className,
1458
- style: style
1459
- }, /*#__PURE__*/React__default.createElement("div", {
1460
- className: "w-full overflow-hidden "
1461
- }, /*#__PURE__*/React__default.createElement("div", {
1462
- className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
1463
- ref: listRef
1464
- }, isAll ? /*#__PURE__*/React__default.createElement("div", {
1465
- className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
1466
- onClick: function onClick() {
1467
- handleOnClick({});
1468
- }
1469
- }, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
1470
- return /*#__PURE__*/React__default.createElement("div", {
1471
- className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
1472
- key: "carousel-" + index,
1473
- onClick: function onClick() {
1474
- handleOnClick(item);
1475
- }
1476
- }, item === null || item === void 0 ? void 0 : item.label);
1477
- })))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
1478
- className: "hidden my-auto gap-4 md:flex justify-end ps-10"
1479
- }, /*#__PURE__*/React__default.createElement("button", {
1480
- className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
1481
- onClick: handleClickPrevImg,
1482
- disabled: !canScrollLeft
1483
- }, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
1484
- size: 24,
1485
- className: "inline-block text-lg"
1486
- })), /*#__PURE__*/React__default.createElement("button", {
1487
- className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
1488
- onClick: handleClickNextImg,
1489
- disabled: !canScrollRight
1490
- }, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
1491
- size: 24,
1492
- className: "inline-block text-lg "
1493
- }))) : null);
1494
- };
1495
-
1496
1418
  // A type of promise-like that resolves synchronously and supports only one observer
1497
1419
 
1498
1420
  const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
@@ -1512,6 +1434,19 @@ function _catch(body, recover) {
1512
1434
  return result;
1513
1435
  }
1514
1436
 
1437
+ // Asynchronously await a promise and pass the result to a finally continuation
1438
+ function _finallyRethrows(body, finalizer) {
1439
+ try {
1440
+ var result = body();
1441
+ } catch (e) {
1442
+ return finalizer(true, e);
1443
+ }
1444
+ if (result && result.then) {
1445
+ return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
1446
+ }
1447
+ return finalizer(false, result);
1448
+ }
1449
+
1515
1450
  function bind(fn, thisArg) {
1516
1451
  return function wrap() {
1517
1452
  return fn.apply(thisArg, arguments);
@@ -7603,6 +7538,14 @@ var formatCurrency = function formatCurrency(amount) {
7603
7538
  var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7604
7539
  return formattedAmount + " \u20AB";
7605
7540
  };
7541
+ var formatCurrency2 = function formatCurrency2(amount) {
7542
+ if (isNaN(amount)) {
7543
+ return 'đ 0';
7544
+ }
7545
+ var roundedAmount = Math.round(amount);
7546
+ var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7547
+ return "\u0111 " + formattedAmount;
7548
+ };
7606
7549
  var pattern = {
7607
7550
  phoneNumberPattern: /^(?:\+84|0)\d{9}$/
7608
7551
  };
@@ -7700,102 +7643,273 @@ var Hero13 = function Hero13(props) {
7700
7643
  var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
7701
7644
  var listRef = React.useRef(null);
7702
7645
  var _useState = React.useState(false);
7703
- var data = props.data;
7646
+ var shopConfig = props.shopConfig,
7647
+ data = props.data;
7704
7648
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7705
7649
  var _CategoryController = CategoryController(props);
7706
7650
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
7707
7651
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
7708
7652
  alt: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.title,
7709
7653
  className: "w-full object-cover"
7710
- }));
7711
- };
7712
-
7713
- var Features2 = function Features2(props) {
7714
- var data = props.data;
7715
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
7716
- return /*#__PURE__*/React__default.createElement("div", {
7717
- className: "" + SECTION_DEFAULT_CLASS
7654
+ }), /*#__PURE__*/React__default.createElement("div", {
7655
+ className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
7656
+ }, /*#__PURE__*/React__default.createElement("a", {
7657
+ href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
7718
7658
  }, /*#__PURE__*/React__default.createElement("div", {
7719
- className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
7720
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7721
- return /*#__PURE__*/React__default.createElement("div", {
7722
- className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
7723
- key: "dfgg-" + index
7724
- }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7725
- className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
7726
- dangerouslySetInnerHTML: {
7727
- __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7728
- }
7729
- }) : /*#__PURE__*/React__default.createElement("img", {
7730
- src: item === null || item === void 0 ? void 0 : item.srcImage,
7731
- className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
7732
- alt: "logo"
7733
- }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
7734
- })));
7659
+ className: "relative w-max"
7660
+ }, /*#__PURE__*/React__default.createElement("span", {
7661
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7662
+ }), /*#__PURE__*/React__default.createElement("div", {
7663
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7664
+ }, /*#__PURE__*/React__default.createElement(ai.AiOutlinePhone, {
7665
+ size: 36
7666
+ })))), /*#__PURE__*/React__default.createElement("a", {
7667
+ href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
7668
+ target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
7669
+ }, /*#__PURE__*/React__default.createElement("div", {
7670
+ className: "relative w-max"
7671
+ }, /*#__PURE__*/React__default.createElement("span", {
7672
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7673
+ }), /*#__PURE__*/React__default.createElement("div", {
7674
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7675
+ }, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
7676
+ size: 32
7677
+ })))), /*#__PURE__*/React__default.createElement("a", {
7678
+ href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
7679
+ target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
7680
+ }, /*#__PURE__*/React__default.createElement("div", {
7681
+ className: "relative w-max"
7682
+ }, /*#__PURE__*/React__default.createElement("span", {
7683
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7684
+ }), /*#__PURE__*/React__default.createElement("div", {
7685
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7686
+ }, /*#__PURE__*/React__default.createElement(si.SiZalo, {
7687
+ size: 32
7688
+ }))))));
7735
7689
  };
7736
7690
 
7737
- var Features3 = function Features3(props) {
7738
- var _data$sectionTitle;
7691
+ var Hero14 = function Hero14(props) {
7692
+ var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button;
7739
7693
  var shopConfigStyle = props.shopConfigStyle,
7740
- shopConfig = props.shopConfig,
7741
7694
  data = props.data,
7742
- _props$SectionTitle = props.SectionTitle,
7743
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
7744
7695
  _props$Link = props.Link,
7745
7696
  Link = _props$Link === void 0 ? null : _props$Link;
7746
7697
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7747
- data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
7748
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7749
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
7750
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7751
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
7752
- background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
7753
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
7754
- bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
7755
7698
  return /*#__PURE__*/React__default.createElement("div", {
7756
- className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
7699
+ className: "relative w-full bg-cover bg-center bg-no-repeat ",
7757
7700
  style: {
7758
- background: background,
7759
- color: textBody
7701
+ backgroundImage: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]) + ")"
7760
7702
  }
7761
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7762
- data: data,
7763
- shopConfigStyle: shopConfigStyle
7703
+ }, /*#__PURE__*/React__default.createElement("div", {
7704
+ className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
7764
7705
  }), /*#__PURE__*/React__default.createElement("div", {
7765
- className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
7766
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7706
+ className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-end bg-gradient-to-t from-black/50 to-transparent"
7707
+ }, /*#__PURE__*/React__default.createElement("div", {
7708
+ className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
7709
+ }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData !== null && sectionData !== void 0 && (_sectionData$2 = sectionData[0]) !== null && _sectionData$2 !== void 0 && _sectionData$2.description ? /*#__PURE__*/React__default.createElement("div", {
7710
+ className: "text-lg text-center text-white md:text-2xl"
7711
+ }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description) : null, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : _sectionData$4$button.map(function (button, index) {
7767
7712
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
7768
7713
  Link: Link,
7769
- href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
7770
- }, /*#__PURE__*/React__default.createElement("div", {
7771
- className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
7772
- key: "dfsdfj-" + index,
7773
- style: {
7774
- background: bgSecondary
7775
- }
7776
- }, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7777
- className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
7778
- }, /*#__PURE__*/React__default.createElement("div", {
7779
- dangerouslySetInnerHTML: {
7780
- __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7781
- }
7782
- })) : /*#__PURE__*/React__default.createElement("img", {
7783
- src: item === null || item === void 0 ? void 0 : item.srcImage,
7784
- className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
7785
- alt: ""
7786
- })));
7714
+ key: "gdf-" + index,
7715
+ href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
7716
+ }, /*#__PURE__*/React__default.createElement(Button, {
7717
+ label: button === null || button === void 0 ? void 0 : button.label,
7718
+ className: "!bg-secondary",
7719
+ shopConfigStyle: shopConfigStyle
7720
+ }));
7787
7721
  })));
7788
7722
  };
7789
7723
 
7790
- var ProductController = function ProductController(props) {
7791
- var shopConfig = props.shopConfig,
7792
- params = props.params,
7793
- _props$isAutoGetList = props.isAutoGetList,
7794
- isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
7795
- var _useState = React.useState([]),
7796
- products = _useState[0],
7797
- setProducts = _useState[1];
7798
- var _useState2 = React.useState(false),
7724
+ var Hero15 = function Hero15(props) {
7725
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons, _data$data5, _data$data5$, _data$data5$$buttons, _data$data5$$buttons$, _data$data6, _data$data6$, _data$data6$$buttons, _data$data6$$buttons$, _data$data7, _data$data7$, _data$data7$$buttons, _data$data7$$buttons$, _data$data8, _data$data8$, _data$data8$$srcImage;
7726
+ var _props$data = props.data,
7727
+ data = _props$data === void 0 ? {} : _props$data,
7728
+ _props$shopConfigStyl = props.shopConfigStyle,
7729
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
7730
+ return /*#__PURE__*/React__default.createElement("div", {
7731
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
7732
+ }, /*#__PURE__*/React__default.createElement("img", {
7733
+ src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
7734
+ className: "object-cover max-w-full h-auto border-4 border-secondary block md:hidden"
7735
+ }), /*#__PURE__*/React__default.createElement("div", {
7736
+ className: "relative flex flex-col justify-center gap-6 lg:gap-10"
7737
+ }, /*#__PURE__*/React__default.createElement("div", {
7738
+ className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont text-textSecondary"
7739
+ }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$title = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
7740
+ className: "text-lg text-textButton"
7741
+ }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), /*#__PURE__*/React__default.createElement("hr", {
7742
+ className: "w-1/3"
7743
+ }), (data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
7744
+ href: (data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : (_data$data5$$buttons = _data$data5$.buttons) === null || _data$data5$$buttons === void 0 ? void 0 : (_data$data5$$buttons$ = _data$data5$$buttons[0]) === null || _data$data5$$buttons$ === void 0 ? void 0 : _data$data5$$buttons$.route) || (data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : (_data$data6$$buttons = _data$data6$.buttons) === null || _data$data6$$buttons === void 0 ? void 0 : (_data$data6$$buttons$ = _data$data6$$buttons[0]) === null || _data$data6$$buttons$ === void 0 ? void 0 : _data$data6$$buttons$.link) || "#"
7745
+ }, /*#__PURE__*/React__default.createElement(Button, {
7746
+ label: data === null || data === void 0 ? void 0 : (_data$data7 = data.data) === null || _data$data7 === void 0 ? void 0 : (_data$data7$ = _data$data7[0]) === null || _data$data7$ === void 0 ? void 0 : (_data$data7$$buttons = _data$data7$.buttons) === null || _data$data7$$buttons === void 0 ? void 0 : (_data$data7$$buttons$ = _data$data7$$buttons[0]) === null || _data$data7$$buttons$ === void 0 ? void 0 : _data$data7$$buttons$.label,
7747
+ shopConfigStyle: shopConfigStyle,
7748
+ className: "!font-normal w-max !bg-secondary"
7749
+ })) : null), /*#__PURE__*/React__default.createElement("img", {
7750
+ src: data === null || data === void 0 ? void 0 : (_data$data8 = data.data) === null || _data$data8 === void 0 ? void 0 : (_data$data8$ = _data$data8[0]) === null || _data$data8$ === void 0 ? void 0 : (_data$data8$$srcImage = _data$data8$.srcImages) === null || _data$data8$$srcImage === void 0 ? void 0 : _data$data8$$srcImage[0],
7751
+ className: "object-cover max-w-full h-auto border-4 border-secondary hidden md:block"
7752
+ }));
7753
+ };
7754
+
7755
+ var Hero16 = function Hero16(props) {
7756
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$srcImage;
7757
+ var _props$data = props.data,
7758
+ data = _props$data === void 0 ? {} : _props$data,
7759
+ _props$shopConfigStyl = props.shopConfigStyle,
7760
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7761
+ _props$router = props.router,
7762
+ router = _props$router === void 0 ? function () {} : _props$router,
7763
+ _props$Link = props.Link,
7764
+ Link = _props$Link === void 0 ? null : _props$Link;
7765
+ var _useState = React.useState(""),
7766
+ value = _useState[0],
7767
+ setValue = _useState[1];
7768
+ var handleSearch = function handleSearch(e) {
7769
+ if ((e === null || e === void 0 ? void 0 : e.key) === "Enter" && value && value.length > 0) {
7770
+ router === null || router === void 0 ? void 0 : router.push(genLinkSearch(value));
7771
+ }
7772
+ };
7773
+ return /*#__PURE__*/React__default.createElement("div", {
7774
+ className: "min-h-[480px] w-full h-full relative"
7775
+ }, /*#__PURE__*/React__default.createElement("img", {
7776
+ src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
7777
+ className: "object-cover max-w-full h-auto"
7778
+ }), /*#__PURE__*/React__default.createElement("div", {
7779
+ className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
7780
+ }), /*#__PURE__*/React__default.createElement("div", {
7781
+ className: "w-full md:w-2/3 absolute top-[10%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
7782
+ }, /*#__PURE__*/React__default.createElement("h2", {
7783
+ className: "font-medium text-2xl lg:text-4xl"
7784
+ }, "Thu\u1ED1c t\u1ED1t, gi\xE1 t\u1ED1t - V\xEC s\u1EE9c kh\u1ECFe c\u1EE7a b\u1EA1n"), /*#__PURE__*/React__default.createElement("div", {
7785
+ className: " text-lg lg:text-2xl"
7786
+ }, "Ch\xFAng t\xF4i lu\xF4n n\u1ED5 l\u1EF1c h\u1EBFt m\xECnh cung c\u1EA5p s\u1EA3n ph\u1EA9m v\xE0 d\u1ECBch v\u1EE5 \u0111\xFAng v\u1EDBi gi\xE1 tr\u1ECB m\xE0 kh\xE1ch h\xE0ng mong \u0111\u1EE3i."), /*#__PURE__*/React__default.createElement("div", {
7787
+ className: "flex flex-col md:flex-row gap-4 w-full"
7788
+ }, /*#__PURE__*/React__default.createElement(Input, {
7789
+ wrapClassName: "w-full md:w-2/3 xl:w-[85%]",
7790
+ icons: /*#__PURE__*/React__default.createElement(lu.LuSearch, {
7791
+ className: "text-gray3",
7792
+ size: 18
7793
+ }),
7794
+ placeholder: "Nh\u1EADp t\xEAn s\u1EA3n ph\u1EA9m",
7795
+ inputClassName: "w-full text-textBody",
7796
+ className: "h-12",
7797
+ onKeyDown: function onKeyDown(e) {
7798
+ handleSearch(e);
7799
+ },
7800
+ onChange: setValue
7801
+ }), value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
7802
+ Link: Link,
7803
+ href: genLinkSearch(value)
7804
+ }, /*#__PURE__*/React__default.createElement(Button, {
7805
+ label: "T\xECm ki\u1EBFm",
7806
+ className: "whitespace-nowrap h-12 w-max",
7807
+ shopConfigStyle: shopConfigStyle
7808
+ })) : /*#__PURE__*/React__default.createElement(Button, {
7809
+ label: "T\xECm ki\u1EBFm",
7810
+ className: "whitespace-nowrap w-max h-12",
7811
+ shopConfigStyle: shopConfigStyle
7812
+ }))), /*#__PURE__*/React__default.createElement("div", {
7813
+ className: "absolute bottom-0 right-0 text-primary w-[45%] z-10"
7814
+ }, /*#__PURE__*/React__default.createElement("svg", {
7815
+ viewBox: "0 0 480 212",
7816
+ fill: "none",
7817
+ xmlns: "http://www.w3.org/2000/svg"
7818
+ }, /*#__PURE__*/React__default.createElement("path", {
7819
+ d: "M75.1847 149.804C55 189.553 14.9932 204.532 0 212H480V0C424.514 20.7319 393 94.1529 216.361 62.1956C120.186 44.7957 96.1405 108.537 75.1847 149.804Z",
7820
+ fill: "currentColor"
7821
+ }))), /*#__PURE__*/React__default.createElement("img", {
7822
+ src: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$srcImage = _data$data2$.srcImages) === null || _data$data2$$srcImage === void 0 ? void 0 : _data$data2$$srcImage[1],
7823
+ className: "object-cover w-[28%] h-auto absolute right-10 opacity-100 bottom-0 z-10"
7824
+ }));
7825
+ };
7826
+
7827
+ var Features2 = function Features2(props) {
7828
+ var data = props.data;
7829
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
7830
+ return /*#__PURE__*/React__default.createElement("div", {
7831
+ className: "" + SECTION_DEFAULT_CLASS
7832
+ }, /*#__PURE__*/React__default.createElement("div", {
7833
+ className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
7834
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7835
+ return /*#__PURE__*/React__default.createElement("div", {
7836
+ className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
7837
+ key: "dfgg-" + index
7838
+ }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7839
+ className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
7840
+ dangerouslySetInnerHTML: {
7841
+ __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7842
+ }
7843
+ }) : /*#__PURE__*/React__default.createElement("img", {
7844
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
7845
+ className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
7846
+ alt: "logo"
7847
+ }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
7848
+ })));
7849
+ };
7850
+
7851
+ var Features3 = function Features3(props) {
7852
+ var _data$sectionTitle;
7853
+ var shopConfigStyle = props.shopConfigStyle,
7854
+ shopConfig = props.shopConfig,
7855
+ data = props.data,
7856
+ _props$SectionTitle = props.SectionTitle,
7857
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
7858
+ _props$Link = props.Link,
7859
+ Link = _props$Link === void 0 ? null : _props$Link;
7860
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
7861
+ data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
7862
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7863
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
7864
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7865
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
7866
+ background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
7867
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
7868
+ bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
7869
+ return /*#__PURE__*/React__default.createElement("div", {
7870
+ className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
7871
+ style: {
7872
+ background: background,
7873
+ color: textBody
7874
+ }
7875
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7876
+ data: data,
7877
+ shopConfigStyle: shopConfigStyle
7878
+ }), /*#__PURE__*/React__default.createElement("div", {
7879
+ className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
7880
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7881
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
7882
+ Link: Link,
7883
+ href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
7884
+ }, /*#__PURE__*/React__default.createElement("div", {
7885
+ className: "grid grid-cols-2 p-3 h-full w-full rounded-lg font-semibold",
7886
+ key: "dfsdfj-" + index,
7887
+ style: {
7888
+ background: bgSecondary
7889
+ }
7890
+ }, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7891
+ className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
7892
+ }, /*#__PURE__*/React__default.createElement("div", {
7893
+ dangerouslySetInnerHTML: {
7894
+ __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7895
+ }
7896
+ })) : /*#__PURE__*/React__default.createElement("img", {
7897
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
7898
+ className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
7899
+ alt: ""
7900
+ })));
7901
+ })));
7902
+ };
7903
+
7904
+ var ProductController = function ProductController(props) {
7905
+ var shopConfig = props.shopConfig,
7906
+ params = props.params,
7907
+ _props$isAutoGetList = props.isAutoGetList,
7908
+ isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
7909
+ var _useState = React.useState([]),
7910
+ products = _useState[0],
7911
+ setProducts = _useState[1];
7912
+ var _useState2 = React.useState(false),
7799
7913
  loading = _useState2[0],
7800
7914
  setLoading = _useState2[1];
7801
7915
  var _useState3 = React.useState(),
@@ -8226,6 +8340,7 @@ var NotFoundProduct = function NotFoundProduct(props) {
8226
8340
  };
8227
8341
 
8228
8342
  var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8343
+ var _products$slice;
8229
8344
  var _props$shopConfigStyl = props.shopConfigStyle,
8230
8345
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8231
8346
  _props$data = props.data,
@@ -8238,7 +8353,8 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8238
8353
  _shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
8239
8354
  secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
8240
8355
  var _useState = React.useState({
8241
- types: "1"
8356
+ types: "1,10",
8357
+ size: 12
8242
8358
  }),
8243
8359
  params = _useState[0],
8244
8360
  setParams = _useState[1];
@@ -8255,15 +8371,27 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8255
8371
  var _useState2 = React.useState(0),
8256
8372
  selectedCategory = _useState2[0],
8257
8373
  setSelectedCategory = _useState2[1];
8374
+ var _useState3 = React.useState(true),
8375
+ isGetMore = _useState3[0],
8376
+ setIsGetMore = _useState3[1];
8258
8377
  React.useEffect(function () {
8259
8378
  var newParams = _extends({}, params, {
8260
- categoryId: selectedCategory
8379
+ categoryId: selectedCategory,
8380
+ size: 12
8261
8381
  });
8262
8382
  if (!selectedCategory) {
8263
8383
  delete newParams.categoryId;
8264
8384
  }
8265
8385
  setParams(newParams);
8266
8386
  }, [selectedCategory]);
8387
+ var handleGetMoreProducts = function handleGetMoreProducts() {
8388
+ setIsGetMore(false);
8389
+ setParams(function (prev) {
8390
+ return _extends({}, prev, {
8391
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
8392
+ });
8393
+ });
8394
+ };
8267
8395
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8268
8396
  className: SECTION_DEFAULT_CLASS + " relative"
8269
8397
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
@@ -8280,15 +8408,16 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8280
8408
  key: index,
8281
8409
  className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
8282
8410
  onClick: function onClick() {
8283
- return setSelectedCategory(item.categoryId);
8411
+ setSelectedCategory(item.categoryId);
8412
+ setIsGetMore(true);
8284
8413
  }
8285
8414
  }, item === null || item === void 0 ? void 0 : item.cateName);
8286
8415
  }
8287
- }), loading ? /*#__PURE__*/React__default.createElement("div", {
8416
+ }), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
8288
8417
  className: "flex w-full justify-center p-12"
8289
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
8418
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
8290
8419
  className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
8291
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
8420
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, index) {
8292
8421
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
8293
8422
  key: index,
8294
8423
  Link: Link,
@@ -8298,7 +8427,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8298
8427
  }));
8299
8428
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8300
8429
  text: "d\u1ECBch v\u1EE5"
8301
- })), /*#__PURE__*/React__default.createElement(Dash, {
8430
+ }), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
8431
+ className: "w-full flex justify-center mt-6"
8432
+ }, /*#__PURE__*/React__default.createElement(Button, {
8433
+ label: "Xem thêm",
8434
+ onClick: handleGetMoreProducts,
8435
+ className: "" + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
8436
+ })) : null), /*#__PURE__*/React__default.createElement(Dash, {
8302
8437
  color: secondary
8303
8438
  }));
8304
8439
  };
@@ -8316,7 +8451,7 @@ var TreatmentsList6 = function TreatmentsList6(props) {
8316
8451
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
8317
8452
  var _useState = React.useState({
8318
8453
  size: 12,
8319
- types: "1"
8454
+ types: "1,10"
8320
8455
  }),
8321
8456
  params = _useState[0],
8322
8457
  setParams = _useState[1];
@@ -8515,83 +8650,179 @@ var BookingController = function BookingController(props) {
8515
8650
  };
8516
8651
  };
8517
8652
 
8518
- var Select = React.forwardRef(function (props, ref) {
8653
+ var DateTimePicker = React.forwardRef(function (props, ref) {
8519
8654
  var _props$label = props.label,
8520
8655
  label = _props$label === void 0 ? "" : _props$label,
8521
- _props$labelClassName = props.labelClassName,
8522
- labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8523
- _props$placeholder = props.placeholder,
8524
- placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
8525
8656
  _props$className = props.className,
8526
8657
  className = _props$className === void 0 ? "" : _props$className,
8527
- _props$optionClassNam = props.optionClassName,
8528
- optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
8529
- _props$wrapClassName = props.wrapClassName,
8530
- wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
8531
- _props$selectClassNam = props.selectClassName,
8532
- selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
8533
- _props$disabled = props.disabled,
8534
- disabled = _props$disabled === void 0 ? false : _props$disabled,
8535
- _props$rules = props.rules,
8536
- rules = _props$rules === void 0 ? [] : _props$rules,
8537
- options = props.options,
8658
+ _props$labelClassName = props.labelClassName,
8659
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8538
8660
  _props$defaultValue = props.defaultValue,
8539
- defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
8540
- handleSearchOption = props.handleSearchOption,
8541
- _props$isMulti = props.isMulti,
8542
- isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
8543
- _props$onClick = props.onClick,
8544
- onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
8545
- _props$isButtonDelete = props.isButtonDelete,
8546
- isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
8547
- _props$funcDelete = props.funcDelete,
8548
- funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
8549
- _props$isSearch = props.isSearch,
8550
- isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
8551
- renderItem = props.renderItem;
8552
- var _useState = React.useState(false),
8553
- isOpen = _useState[0],
8554
- setIsOpen = _useState[1];
8555
- var selectRef = React.useRef(null);
8661
+ defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
8662
+ _props$time = props.time,
8663
+ time = _props$time === void 0 ? false : _props$time,
8664
+ rules = props.rules;
8665
+ var _useState = React.useState(defaultValue),
8666
+ value = _useState[0],
8667
+ _setValue = _useState[1];
8556
8668
  var _useState2 = React.useState(""),
8557
8669
  error = _useState2[0],
8558
8670
  _setError = _useState2[1];
8559
- var _useState3 = React.useState(""),
8560
- inputSearch = _useState3[0],
8561
- setInputSearch = _useState3[1];
8562
- var _useState4 = React.useState(defaultValue),
8563
- value = _useState4[0],
8564
- setValue = _useState4[1];
8565
- var _useState5 = React.useState(options),
8566
- listOptions = _useState5[0],
8567
- setListOptions = _useState5[1];
8568
- var dropdownRef = React.useRef(null);
8569
- var _useState6 = React.useState('bottom'),
8570
- dropdownPosition = _useState6[0],
8571
- setDropdownPosition = _useState6[1];
8572
- var inputRef = React.useRef(null);
8573
- React.useEffect(function () {
8574
- if (isMulti) setValue(defaultValue);
8575
- }, [defaultValue]);
8576
- React.useEffect(function () {
8577
- setListOptions(options);
8578
- if (!isMulti) setValue(defaultValue);
8579
- }, [options]);
8580
- React.useEffect(function () {
8581
- var delayDebounceFn = setTimeout(function () {
8582
- handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8583
- }, 600);
8584
- return function () {
8585
- return clearTimeout(delayDebounceFn);
8586
- };
8587
- }, [inputSearch]);
8588
- React.useEffect(function () {
8589
- var _inputRef$current;
8590
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
8591
- var updateDropdownPosition = function updateDropdownPosition() {
8592
- if (selectRef.current && dropdownRef.current) {
8593
- var _selectRef$current, _window;
8594
- var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
8671
+ var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
8672
+ var CustomInput = React.forwardRef(function (_ref, ref) {
8673
+ var value = _ref.value,
8674
+ onClick = _ref.onClick,
8675
+ className = _ref.className;
8676
+ return /*#__PURE__*/React__default.createElement("div", {
8677
+ className: className,
8678
+ onClick: onClick,
8679
+ ref: ref
8680
+ }, value);
8681
+ });
8682
+ React.useImperativeHandle(ref, function () {
8683
+ return {
8684
+ validateData: function validateData() {
8685
+ return _validateData();
8686
+ },
8687
+ setValue: function setValue(text) {
8688
+ return _setValue(text);
8689
+ },
8690
+ getValue: function getValue() {
8691
+ return value;
8692
+ },
8693
+ setError: function setError(err) {
8694
+ return _setError(err);
8695
+ }
8696
+ };
8697
+ });
8698
+ var _validateData = function _validateData() {
8699
+ var count = 0;
8700
+ rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
8701
+ var _e$pattern, _e$validate;
8702
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
8703
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8704
+ count++;
8705
+ return false;
8706
+ } else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
8707
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8708
+ count++;
8709
+ return false;
8710
+ } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
8711
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8712
+ count++;
8713
+ return false;
8714
+ }
8715
+ });
8716
+ if (count) {
8717
+ return false;
8718
+ } else {
8719
+ _setError('');
8720
+ return true;
8721
+ }
8722
+ };
8723
+ var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
8724
+ return (e === null || e === void 0 ? void 0 : e.type) === "required";
8725
+ }));
8726
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
8727
+ className: "text-danger"
8728
+ }, " *") : null;
8729
+ return /*#__PURE__*/React__default.createElement("div", {
8730
+ className: "w-full"
8731
+ }, label ? /*#__PURE__*/React__default.createElement("div", {
8732
+ className: "mb-1 " + labelClassName
8733
+ }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
8734
+ selected: value,
8735
+ onChange: function onChange(date) {
8736
+ _setValue(date);
8737
+ },
8738
+ customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
8739
+ className: _className
8740
+ }),
8741
+ dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
8742
+ showTimeSelect: time,
8743
+ timeIntervals: 15,
8744
+ wrapperClassName: "w-full"
8745
+ }), error ? /*#__PURE__*/React__default.createElement("div", {
8746
+ className: "text-danger"
8747
+ }, error) : null);
8748
+ });
8749
+
8750
+ var Select = React.forwardRef(function (props, ref) {
8751
+ var _props$label = props.label,
8752
+ label = _props$label === void 0 ? "" : _props$label,
8753
+ _props$labelClassName = props.labelClassName,
8754
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8755
+ _props$placeholder = props.placeholder,
8756
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
8757
+ _props$className = props.className,
8758
+ className = _props$className === void 0 ? "" : _props$className,
8759
+ _props$optionClassNam = props.optionClassName,
8760
+ optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
8761
+ _props$wrapClassName = props.wrapClassName,
8762
+ wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
8763
+ _props$selectClassNam = props.selectClassName,
8764
+ selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
8765
+ _props$disabled = props.disabled,
8766
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
8767
+ _props$rules = props.rules,
8768
+ rules = _props$rules === void 0 ? [] : _props$rules,
8769
+ options = props.options,
8770
+ _props$defaultValue = props.defaultValue,
8771
+ defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
8772
+ _props$isMulti = props.isMulti,
8773
+ isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
8774
+ _props$onClick = props.onClick,
8775
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
8776
+ _props$isButtonDelete = props.isButtonDelete,
8777
+ isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
8778
+ _props$funcDelete = props.funcDelete,
8779
+ funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
8780
+ _props$isSearch = props.isSearch,
8781
+ isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
8782
+ renderItem = props.renderItem;
8783
+ var _useState = React.useState(false),
8784
+ isOpen = _useState[0],
8785
+ setIsOpen = _useState[1];
8786
+ var selectRef = React.useRef(null);
8787
+ var _useState2 = React.useState(""),
8788
+ error = _useState2[0],
8789
+ _setError = _useState2[1];
8790
+ var _useState3 = React.useState(""),
8791
+ inputSearch = _useState3[0],
8792
+ setInputSearch = _useState3[1];
8793
+ var _useState4 = React.useState(defaultValue),
8794
+ value = _useState4[0],
8795
+ setValue = _useState4[1];
8796
+ var _useState5 = React.useState(options),
8797
+ listOptions = _useState5[0],
8798
+ setListOptions = _useState5[1];
8799
+ var dropdownRef = React.useRef(null);
8800
+ var _useState6 = React.useState('bottom'),
8801
+ dropdownPosition = _useState6[0],
8802
+ setDropdownPosition = _useState6[1];
8803
+ var inputRef = React.useRef(null);
8804
+ React.useEffect(function () {
8805
+ if (isMulti) setValue(defaultValue);
8806
+ }, [defaultValue]);
8807
+ React.useEffect(function () {
8808
+ setListOptions(options);
8809
+ if (!isMulti) setValue(defaultValue);
8810
+ }, [options]);
8811
+ React.useEffect(function () {
8812
+ var delayDebounceFn = setTimeout(function () {
8813
+ handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8814
+ }, 600);
8815
+ return function () {
8816
+ return clearTimeout(delayDebounceFn);
8817
+ };
8818
+ }, [inputSearch]);
8819
+ React.useEffect(function () {
8820
+ var _inputRef$current;
8821
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
8822
+ var updateDropdownPosition = function updateDropdownPosition() {
8823
+ if (selectRef.current && dropdownRef.current) {
8824
+ var _selectRef$current, _window;
8825
+ var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
8595
8826
  var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
8596
8827
  var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
8597
8828
  if (spaceBelow < spaceAbove) {
@@ -8662,20 +8893,13 @@ var Select = React.forwardRef(function (props, ref) {
8662
8893
  }
8663
8894
  };
8664
8895
  var handleSearch = function handleSearch(searchValue) {
8665
- if (handleSearchOption && typeof handleSearchOption === 'function') {
8666
- handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
8667
- } else {
8668
- var listFilterOptions = options.filter(function (item) {
8669
- var _item$label;
8670
- return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
8671
- });
8672
- setListOptions(listFilterOptions);
8673
- }
8896
+ var listFilterOptions = options.filter(function (item) {
8897
+ var _item$label;
8898
+ return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
8899
+ });
8900
+ setListOptions(listFilterOptions);
8674
8901
  };
8675
8902
  var handleToggleSelect = function handleToggleSelect() {
8676
- if (!isOpen && handleSearchOption && typeof handleSearchOption === 'function') {
8677
- handleSearchOption("");
8678
- }
8679
8903
  setIsOpen(!isOpen);
8680
8904
  setInputSearch("");
8681
8905
  setListOptions(options);
@@ -8774,103 +8998,6 @@ var Select = React.forwardRef(function (props, ref) {
8774
8998
  });
8775
8999
  var Select$1 = React.memo(Select);
8776
9000
 
8777
- var DateTimePicker = React.forwardRef(function (props, ref) {
8778
- var _props$label = props.label,
8779
- label = _props$label === void 0 ? "" : _props$label,
8780
- _props$className = props.className,
8781
- className = _props$className === void 0 ? "" : _props$className,
8782
- _props$labelClassName = props.labelClassName,
8783
- labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8784
- _props$defaultValue = props.defaultValue,
8785
- defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
8786
- _props$time = props.time,
8787
- time = _props$time === void 0 ? false : _props$time,
8788
- rules = props.rules;
8789
- var _useState = React.useState(defaultValue),
8790
- value = _useState[0],
8791
- _setValue = _useState[1];
8792
- var _useState2 = React.useState(""),
8793
- error = _useState2[0],
8794
- _setError = _useState2[1];
8795
- var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
8796
- var CustomInput = React.forwardRef(function (_ref, ref) {
8797
- var value = _ref.value,
8798
- onClick = _ref.onClick,
8799
- className = _ref.className;
8800
- return /*#__PURE__*/React__default.createElement("div", {
8801
- className: className,
8802
- onClick: onClick,
8803
- ref: ref
8804
- }, value);
8805
- });
8806
- React.useImperativeHandle(ref, function () {
8807
- return {
8808
- validateData: function validateData() {
8809
- return _validateData();
8810
- },
8811
- setValue: function setValue(text) {
8812
- return _setValue(text);
8813
- },
8814
- getValue: function getValue() {
8815
- return value;
8816
- },
8817
- setError: function setError(err) {
8818
- return _setError(err);
8819
- }
8820
- };
8821
- });
8822
- var _validateData = function _validateData() {
8823
- var count = 0;
8824
- rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
8825
- var _e$pattern, _e$validate;
8826
- if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
8827
- _setError(e === null || e === void 0 ? void 0 : e.message);
8828
- count++;
8829
- return false;
8830
- } else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
8831
- _setError(e === null || e === void 0 ? void 0 : e.message);
8832
- count++;
8833
- return false;
8834
- } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
8835
- _setError(e === null || e === void 0 ? void 0 : e.message);
8836
- count++;
8837
- return false;
8838
- }
8839
- });
8840
- if (count) {
8841
- return false;
8842
- } else {
8843
- _setError('');
8844
- return true;
8845
- }
8846
- };
8847
- var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
8848
- return (e === null || e === void 0 ? void 0 : e.type) === "required";
8849
- }));
8850
- var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
8851
- className: "text-danger"
8852
- }, " *") : null;
8853
- return /*#__PURE__*/React__default.createElement("div", {
8854
- className: "w-full"
8855
- }, label ? /*#__PURE__*/React__default.createElement("div", {
8856
- className: "mb-1 " + labelClassName
8857
- }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
8858
- selected: value,
8859
- onChange: function onChange(date) {
8860
- _setValue(date);
8861
- },
8862
- customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
8863
- className: _className
8864
- }),
8865
- dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
8866
- showTimeSelect: time,
8867
- timeIntervals: 15,
8868
- wrapperClassName: "w-full"
8869
- }), error ? /*#__PURE__*/React__default.createElement("div", {
8870
- className: "text-danger"
8871
- }, error) : null);
8872
- });
8873
-
8874
9001
  var InputPhoneNumber = React.forwardRef(function (props, ref) {
8875
9002
  var _props$label = props.label,
8876
9003
  label = _props$label === void 0 ? "" : _props$label,
@@ -9019,150 +9146,312 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
9019
9146
  }, error) : null);
9020
9147
  });
9021
9148
 
9022
- var dayjs_min = createCommonjsModule(function (module, exports) {
9023
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
9024
- });
9025
-
9026
- var js_cookie = createCommonjsModule(function (module, exports) {
9027
- (function (global, factory) {
9028
- module.exports = factory() ;
9029
- })(commonjsGlobal, (function () {
9030
- /* eslint-disable no-var */
9031
- function assign (target) {
9032
- for (var i = 1; i < arguments.length; i++) {
9033
- var source = arguments[i];
9034
- for (var key in source) {
9035
- target[key] = source[key];
9036
- }
9149
+ var Select$2 = React.forwardRef(function (props, ref) {
9150
+ var _props$label = props.label,
9151
+ label = _props$label === void 0 ? "" : _props$label,
9152
+ _props$labelClassName = props.labelClassName,
9153
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
9154
+ _props$placeholder = props.placeholder,
9155
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
9156
+ _props$className = props.className,
9157
+ className = _props$className === void 0 ? "" : _props$className,
9158
+ _props$optionClassNam = props.optionClassName,
9159
+ optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
9160
+ _props$wrapClassName = props.wrapClassName,
9161
+ wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
9162
+ _props$selectClassNam = props.selectClassName,
9163
+ selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
9164
+ _props$disabled = props.disabled,
9165
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
9166
+ _props$rules = props.rules,
9167
+ rules = _props$rules === void 0 ? [] : _props$rules,
9168
+ options = props.options,
9169
+ _props$defaultValue = props.defaultValue,
9170
+ defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
9171
+ handleSearchOption = props.handleSearchOption,
9172
+ _props$isMulti = props.isMulti,
9173
+ isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
9174
+ _props$onClick = props.onClick,
9175
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
9176
+ _props$isButtonDelete = props.isButtonDelete,
9177
+ isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
9178
+ _props$funcDelete = props.funcDelete,
9179
+ funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
9180
+ setParams = props.setParams,
9181
+ _props$isSearch = props.isSearch,
9182
+ isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
9183
+ renderItem = props.renderItem;
9184
+ var _useState = React.useState(false),
9185
+ isOpen = _useState[0],
9186
+ setIsOpen = _useState[1];
9187
+ var selectRef = React.useRef(null);
9188
+ var _useState2 = React.useState(""),
9189
+ error = _useState2[0],
9190
+ _setError = _useState2[1];
9191
+ var _useState3 = React.useState(""),
9192
+ inputSearch = _useState3[0],
9193
+ setInputSearch = _useState3[1];
9194
+ var _useState4 = React.useState(defaultValue),
9195
+ value = _useState4[0],
9196
+ setValue = _useState4[1];
9197
+ var _useState5 = React.useState(options),
9198
+ listOptions = _useState5[0],
9199
+ setListOptions = _useState5[1];
9200
+ var dropdownRef = React.useRef(null);
9201
+ var _useState6 = React.useState('bottom'),
9202
+ dropdownPosition = _useState6[0],
9203
+ setDropdownPosition = _useState6[1];
9204
+ var inputRef = React.useRef(null);
9205
+ var _useState7 = React.useState(12),
9206
+ nextTrigger = _useState7[0],
9207
+ setNextTrigger = _useState7[1];
9208
+ var optionRef = React.useRef(null);
9209
+ React.useEffect(function () {
9210
+ if (isMulti) setValue(defaultValue);
9211
+ }, [defaultValue]);
9212
+ React.useEffect(function () {
9213
+ setListOptions(options);
9214
+ if (!isMulti) setValue(defaultValue);
9215
+ }, [options]);
9216
+ React.useEffect(function () {
9217
+ if (typeof setParams !== 'function') return;
9218
+ var handleScroll = function handleScroll() {
9219
+ if (!optionRef.current) return;
9220
+ var children = optionRef.current.querySelectorAll('div.option');
9221
+ var parentRect = optionRef.current.getBoundingClientRect();
9222
+ children.forEach(function (child, index) {
9223
+ var rect = child.getBoundingClientRect();
9224
+ if (rect.top >= parentRect.top && rect.bottom <= parentRect.bottom) {
9225
+ if (index === nextTrigger) {
9226
+ setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
9227
+ return _extends({}, prev, {
9228
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 8
9229
+ });
9230
+ });
9231
+ setNextTrigger(function (prev) {
9232
+ return prev + 8;
9233
+ });
9234
+ }
9235
+ }
9236
+ });
9237
+ };
9238
+ if (optionRef.current) {
9239
+ optionRef.current.addEventListener('scroll', handleScroll);
9037
9240
  }
9038
- return target
9039
- }
9040
- /* eslint-enable no-var */
9041
-
9042
- /* eslint-disable no-var */
9043
- var defaultConverter = {
9044
- read: function (value) {
9045
- if (value[0] === '"') {
9046
- value = value.slice(1, -1);
9241
+ return function () {
9242
+ if (optionRef.current) {
9243
+ optionRef.current.removeEventListener('scroll', handleScroll);
9047
9244
  }
9048
- return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
9049
- },
9050
- write: function (value) {
9051
- return encodeURIComponent(value).replace(
9052
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
9053
- decodeURIComponent
9054
- )
9055
- }
9056
- };
9057
- /* eslint-enable no-var */
9058
-
9059
- /* eslint-disable no-var */
9060
-
9061
- function init (converter, defaultAttributes) {
9062
- function set (name, value, attributes) {
9063
- if (typeof document === 'undefined') {
9064
- return
9245
+ };
9246
+ }, [listOptions, nextTrigger]);
9247
+ React.useEffect(function () {
9248
+ var delayDebounceFn = setTimeout(function () {
9249
+ handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
9250
+ if (optionRef.current) {
9251
+ optionRef.current.scrollTop = 0;
9065
9252
  }
9066
-
9067
- attributes = assign({}, defaultAttributes, attributes);
9068
-
9069
- if (typeof attributes.expires === 'number') {
9070
- attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
9253
+ }, 600);
9254
+ return function () {
9255
+ return clearTimeout(delayDebounceFn);
9256
+ };
9257
+ }, [inputSearch]);
9258
+ React.useEffect(function () {
9259
+ var _inputRef$current;
9260
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
9261
+ var updateDropdownPosition = function updateDropdownPosition() {
9262
+ if (selectRef.current && dropdownRef.current) {
9263
+ var _selectRef$current, _window;
9264
+ var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
9265
+ var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
9266
+ var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
9267
+ if (spaceBelow < spaceAbove) {
9268
+ setDropdownPosition('top');
9269
+ } else {
9270
+ setDropdownPosition('bottom');
9271
+ }
9071
9272
  }
9072
- if (attributes.expires) {
9073
- attributes.expires = attributes.expires.toUTCString();
9273
+ };
9274
+ if (isOpen) {
9275
+ updateDropdownPosition();
9276
+ window.addEventListener('resize', updateDropdownPosition);
9277
+ }
9278
+ return function () {
9279
+ window.removeEventListener('resize', updateDropdownPosition);
9280
+ };
9281
+ }, [isOpen]);
9282
+ var handleClickOutside = function handleClickOutside(event) {
9283
+ var _selectRef$current2;
9284
+ if (selectRef !== null && selectRef !== void 0 && selectRef.current && !(selectRef !== null && selectRef !== void 0 && (_selectRef$current2 = selectRef.current) !== null && _selectRef$current2 !== void 0 && _selectRef$current2.contains(event.target))) {
9285
+ setIsOpen(false);
9286
+ setInputSearch("");
9287
+ setListOptions(options);
9288
+ }
9289
+ };
9290
+ React.useEffect(function () {
9291
+ document.addEventListener('click', handleClickOutside);
9292
+ return function () {
9293
+ document.removeEventListener('click', handleClickOutside);
9294
+ };
9295
+ }, []);
9296
+ React.useImperativeHandle(ref, function () {
9297
+ return {
9298
+ validateData: function validateData() {
9299
+ return _validateData();
9300
+ },
9301
+ setError: function setError(err) {
9302
+ return _setError(err);
9074
9303
  }
9075
-
9076
- name = encodeURIComponent(name)
9077
- .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
9078
- .replace(/[()]/g, escape);
9079
-
9080
- var stringifiedAttributes = '';
9081
- for (var attributeName in attributes) {
9082
- if (!attributes[attributeName]) {
9083
- continue
9084
- }
9085
-
9086
- stringifiedAttributes += '; ' + attributeName;
9087
-
9088
- if (attributes[attributeName] === true) {
9089
- continue
9090
- }
9091
-
9092
- // Considers RFC 6265 section 5.2:
9093
- // ...
9094
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
9095
- // character:
9096
- // Consume the characters of the unparsed-attributes up to,
9097
- // not including, the first %x3B (";") character.
9098
- // ...
9099
- stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
9304
+ };
9305
+ });
9306
+ var isEmpty = function isEmpty(value) {
9307
+ var _Object$keys;
9308
+ if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
9309
+ if (typeof value === 'object') return (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0;
9310
+ return false;
9311
+ };
9312
+ var _validateData = function _validateData() {
9313
+ var count = 0;
9314
+ for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
9315
+ var _e$pattern;
9316
+ var e = _step.value;
9317
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
9318
+ _setError(e === null || e === void 0 ? void 0 : e.message);
9319
+ count++;
9320
+ break;
9321
+ } else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
9322
+ _setError(e === null || e === void 0 ? void 0 : e.message);
9323
+ count++;
9324
+ break;
9100
9325
  }
9101
-
9102
- return (document.cookie =
9103
- name + '=' + converter.write(value, name) + stringifiedAttributes)
9104
9326
  }
9105
-
9106
- function get (name) {
9107
- if (typeof document === 'undefined' || (arguments.length && !name)) {
9108
- return
9109
- }
9110
-
9111
- // To prevent the for loop in the first place assign an empty array
9112
- // in case there are no cookies at all.
9113
- var cookies = document.cookie ? document.cookie.split('; ') : [];
9114
- var jar = {};
9115
- for (var i = 0; i < cookies.length; i++) {
9116
- var parts = cookies[i].split('=');
9117
- var value = parts.slice(1).join('=');
9118
-
9119
- try {
9120
- var found = decodeURIComponent(parts[0]);
9121
- jar[found] = converter.read(value, found);
9122
-
9123
- if (name === found) {
9124
- break
9125
- }
9126
- } catch (e) {}
9127
- }
9128
-
9129
- return name ? jar[name] : jar
9327
+ if (count) {
9328
+ return false;
9329
+ } else {
9330
+ _setError('');
9331
+ return true;
9332
+ }
9333
+ };
9334
+ var handleSearch = function handleSearch(searchValue) {
9335
+ if (handleSearchOption && typeof handleSearchOption === 'function') {
9336
+ handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
9337
+ setNextTrigger(12);
9338
+ } else {
9339
+ var listFilterOptions = options.filter(function (item) {
9340
+ var _item$label;
9341
+ return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
9342
+ });
9343
+ setListOptions(listFilterOptions);
9344
+ }
9345
+ };
9346
+ var handleToggleSelect = function handleToggleSelect() {
9347
+ setIsOpen(!isOpen);
9348
+ setInputSearch("");
9349
+ setListOptions(options);
9350
+ if (typeof setParams === 'function') {
9351
+ setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
9352
+ return _extends({}, prev, {
9353
+ size: 16
9354
+ });
9355
+ });
9356
+ setNextTrigger(12);
9357
+ }
9358
+ };
9359
+ var checkSelection = function checkSelection(valueId) {
9360
+ if (isMulti) return value === null || value === void 0 ? void 0 : value.some(function (item) {
9361
+ return (item === null || item === void 0 ? void 0 : item.value) === valueId;
9362
+ });
9363
+ return (value === null || value === void 0 ? void 0 : value.value) == valueId;
9364
+ };
9365
+ var handleSelection = function handleSelection(item, e) {
9366
+ e.stopPropagation();
9367
+ if (!isMulti) {
9368
+ setValue(item);
9369
+ setIsOpen(false);
9370
+ }
9371
+ onClick === null || onClick === void 0 ? void 0 : onClick(item);
9372
+ };
9373
+ var handleDeleteSelection = function handleDeleteSelection(e, item) {
9374
+ e.stopPropagation();
9375
+ if (isMulti === false) setValue({});
9376
+ funcDelete === null || funcDelete === void 0 ? void 0 : funcDelete(item);
9377
+ };
9378
+ var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
9379
+ return (e === null || e === void 0 ? void 0 : e.type) === "required";
9380
+ }));
9381
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
9382
+ className: "text-danger"
9383
+ }, " *") : null;
9384
+ return /*#__PURE__*/React__default.createElement("div", {
9385
+ ref: selectRef,
9386
+ className: "relative " + wrapClassName
9387
+ }, label ? /*#__PURE__*/React__default.createElement("div", {
9388
+ className: "mb-1 " + labelClassName
9389
+ }, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
9390
+ className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
9391
+ }, /*#__PURE__*/React__default.createElement("button", {
9392
+ className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
9393
+ onClick: handleToggleSelect,
9394
+ disabled: disabled
9395
+ }, /*#__PURE__*/React__default.createElement("div", {
9396
+ className: "flex justify-between items-center w-full"
9397
+ }, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
9398
+ className: "text-gray3 line-clamp-1"
9399
+ }, placeholder) : /*#__PURE__*/React__default.createElement("div", {
9400
+ className: "w-full text-start pointer-events-none line-clamp-1",
9401
+ dangerouslySetInnerHTML: {
9402
+ __html: value === null || value === void 0 ? void 0 : value.label
9403
+ }
9404
+ }), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
9405
+ onClick: function onClick(e) {
9406
+ handleDeleteSelection(e, value);
9130
9407
  }
9131
-
9132
- return Object.create(
9133
- {
9134
- set,
9135
- get,
9136
- remove: function (name, attributes) {
9137
- set(
9138
- name,
9139
- '',
9140
- assign({}, attributes, {
9141
- expires: -1
9142
- })
9143
- );
9144
- },
9145
- withAttributes: function (attributes) {
9146
- return init(this.converter, assign({}, this.attributes, attributes))
9147
- },
9148
- withConverter: function (converter) {
9149
- return init(assign({}, this.converter, converter), this.attributes)
9150
- }
9151
- },
9152
- {
9153
- attributes: { value: Object.freeze(defaultAttributes) },
9154
- converter: { value: Object.freeze(converter) }
9408
+ }, /*#__PURE__*/React__default.createElement(rx.RxCross2, null)) : /*#__PURE__*/React__default.createElement("div", {
9409
+ className: "ms-1"
9410
+ }, /*#__PURE__*/React__default.createElement(fa.FaAngleUp, {
9411
+ className: "text-xs"
9412
+ }), /*#__PURE__*/React__default.createElement(fa.FaAngleDown, {
9413
+ className: "text-xs"
9414
+ })))), isOpen ? /*#__PURE__*/React__default.createElement("div", {
9415
+ ref: dropdownRef,
9416
+ style: {
9417
+ background: "#FFFFFF"
9418
+ },
9419
+ className: "absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
9420
+ }, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
9421
+ className: "px-3 flex items-center border-b-[1px]"
9422
+ }, /*#__PURE__*/React__default.createElement(lu.LuSearch, {
9423
+ className: "inline text-gray3 me-2"
9424
+ }), /*#__PURE__*/React__default.createElement("input", {
9425
+ type: "text",
9426
+ ref: inputRef,
9427
+ className: "py-2 w-full border-0 focus:outline-none focus:ring-0",
9428
+ placeholder: "T\xECm ki\u1EBFm",
9429
+ value: inputSearch,
9430
+ onChange: function onChange(e) {
9431
+ setInputSearch(e.target.value);
9432
+ }
9433
+ })) : null, /*#__PURE__*/React__default.createElement("div", {
9434
+ className: "overflow-y-auto max-h-72 scroll-container",
9435
+ ref: optionRef
9436
+ }, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
9437
+ return /*#__PURE__*/React__default.createElement("div", {
9438
+ key: "gjfd-" + index,
9439
+ className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
9440
+ onClick: function onClick(e) {
9441
+ handleSelection(item, e);
9155
9442
  }
9156
- )
9157
- }
9158
-
9159
- var api = init(defaultConverter, { path: '/' });
9160
- /* eslint-enable no-var */
9161
-
9162
- return api;
9163
-
9164
- }));
9443
+ }, /*#__PURE__*/React__default.createElement(io.IoMdCheckmark, {
9444
+ className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
9445
+ }), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
9446
+ className: " whitespace-nowrap line-clamp-1"
9447
+ }, item === null || item === void 0 ? void 0 : item.label));
9448
+ }) : /*#__PURE__*/React__default.createElement("div", {
9449
+ className: "py-6 text-center"
9450
+ }, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
9451
+ className: "text-danger"
9452
+ }, error) : null);
9165
9453
  });
9454
+ var SelectDynamic = React.memo(Select$2);
9166
9455
 
9167
9456
  var BookingForm = function BookingForm(props) {
9168
9457
  var _props$shopConfig = props.shopConfig,
@@ -9179,7 +9468,8 @@ var BookingForm = function BookingForm(props) {
9179
9468
  isModalBooking = _props$isModalBooking === void 0 ? false : _props$isModalBooking;
9180
9469
  var _useState = React.useState(false);
9181
9470
  var _useState2 = React.useState({
9182
- types: "1,10"
9471
+ types: "1,10",
9472
+ size: 16
9183
9473
  }),
9184
9474
  productsParams = _useState2[0],
9185
9475
  setProductsParams = _useState2[1];
@@ -9353,6 +9643,7 @@ var BookingForm = function BookingForm(props) {
9353
9643
  var handleSearchProducts = function handleSearchProducts(value) {
9354
9644
  setProductsParams(function (prev) {
9355
9645
  return _extends({}, prev, {
9646
+ size: 16,
9356
9647
  productName: value
9357
9648
  });
9358
9649
  });
@@ -9389,7 +9680,8 @@ var BookingForm = function BookingForm(props) {
9389
9680
  className: "grid grid-cols-1 gap-4"
9390
9681
  }, /*#__PURE__*/React__default.createElement("div", {
9391
9682
  className: "relative"
9392
- }, /*#__PURE__*/React__default.createElement(Select$1, {
9683
+ }, /*#__PURE__*/React__default.createElement(SelectDynamic, {
9684
+ setParams: setProductsParams,
9393
9685
  ref: inputSelectedRef,
9394
9686
  isMulti: true,
9395
9687
  defaultValue: listProductSelected,
@@ -9505,6 +9797,7 @@ var BookingForm = function BookingForm(props) {
9505
9797
  className: "text-center"
9506
9798
  }, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
9507
9799
  };
9800
+ var BookingForm$1 = React.memo(BookingForm);
9508
9801
 
9509
9802
  var TreatmentsList7 = function TreatmentsList7(props) {
9510
9803
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -9625,7 +9918,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9625
9918
  color: secondary
9626
9919
  }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9627
9920
  onClose: handleCloseModal
9628
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
9921
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9629
9922
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
9630
9923
  onCloseFormBooking: handleCloseModal,
9631
9924
  defaultValue: dataBooking,
@@ -9820,7 +10113,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
9820
10113
  className: "text-gray3 mt-2"
9821
10114
  }, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9822
10115
  onClose: handleCloseModal
9823
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
10116
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9824
10117
  isModalBooking: isBooking,
9825
10118
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
9826
10119
  onCloseFormBooking: handleCloseModal,
@@ -9955,7 +10248,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9955
10248
  className: "text-gray3 mt-2"
9956
10249
  }, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9957
10250
  onClose: handleCloseModal
9958
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
10251
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9959
10252
  isModalBooking: isBooking,
9960
10253
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
9961
10254
  onCloseFormBooking: handleCloseModal,
@@ -10109,100 +10402,272 @@ var ProductItem5 = function ProductItem5(props) {
10109
10402
  }))));
10110
10403
  };
10111
10404
 
10112
- var ProductItem6 = function ProductItem6(props) {
10405
+ var ProductItem6 = function ProductItem6(props) {
10406
+ var _product$productInfo;
10407
+ var product = props.product,
10408
+ _props$shopConfigStyl = props.shopConfigStyle,
10409
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10410
+ _props$Link = props.Link,
10411
+ Link = _props$Link === void 0 ? null : _props$Link,
10412
+ _props$className = props.className,
10413
+ className = _props$className === void 0 ? "" : _props$className;
10414
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10415
+ Link: Link,
10416
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10417
+ }, /*#__PURE__*/React__default.createElement("div", {
10418
+ className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
10419
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10420
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10421
+ className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10422
+ }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10423
+ className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10424
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10425
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10426
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10427
+ })), /*#__PURE__*/React__default.createElement("div", {
10428
+ className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
10429
+ }, /*#__PURE__*/React__default.createElement("div", {
10430
+ className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
10431
+ }, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
10432
+ label: "Mua ngay",
10433
+ className: "w-full",
10434
+ shopConfigStyle: shopConfigStyle
10435
+ }))));
10436
+ };
10437
+
10438
+ var ProductItem7 = function ProductItem7(props) {
10439
+ var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6, _product$productInfo7, _product$productInfo8, _product$productInfo9, _product$productInfo10, _product$productInfo11;
10440
+ var product = props.product,
10441
+ _props$Link = props.Link,
10442
+ Link = _props$Link === void 0 ? null : _props$Link,
10443
+ _props$className = props.className,
10444
+ className = _props$className === void 0 ? "" : _props$className;
10445
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10446
+ Link: Link,
10447
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10448
+ }, /*#__PURE__*/React__default.createElement("div", {
10449
+ className: "w-full bg-bgSecondary relative p-2 md:p-4 rounded-2xl " + className
10450
+ }, /*#__PURE__*/React__default.createElement("div", {
10451
+ className: "relative"
10452
+ }, /*#__PURE__*/React__default.createElement("div", {
10453
+ className: "px-2 md:px-4 xl:px-6"
10454
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10455
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10456
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
10457
+ })), (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.price) !== (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) && product !== null && product !== void 0 && (_product$productInfo3 = product.productInfo) !== null && _product$productInfo3 !== void 0 && _product$productInfo3.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("div", {
10458
+ className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10459
+ }, "-", Math.round(100 - (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) * 100)) : null), /*#__PURE__*/React__default.createElement("div", {
10460
+ className: "flex flex-col mt-4 gap-4 items-start"
10461
+ }, /*#__PURE__*/React__default.createElement("div", {
10462
+ className: "line-clamp-2 min-h-12 w-full overflow-hidden text-ellipsis"
10463
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10464
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10465
+ className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10466
+ })), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo7 = product.productInfo) !== null && _product$productInfo7 !== void 0 && _product$productInfo7.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo8 = product.productInfo) === null || _product$productInfo8 === void 0 ? void 0 : _product$productInfo8.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo9 = product.productInfo) === null || _product$productInfo9 === void 0 ? void 0 : _product$productInfo9.price) ? /*#__PURE__*/React__default.createElement("div", {
10467
+ className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
10468
+ }, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo10 = product.productInfo) === null || _product$productInfo10 === void 0 ? void 0 : _product$productInfo10.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo11 = product.productInfo) === null || _product$productInfo11 === void 0 ? void 0 : _product$productInfo11.priceBeforeDiscount)) : null));
10469
+ };
10470
+
10471
+ var ProductItem8 = function ProductItem8(props) {
10472
+ var _product$productInfo;
10473
+ var product = props.product,
10474
+ _props$Link = props.Link,
10475
+ Link = _props$Link === void 0 ? null : _props$Link,
10476
+ _props$className = props.className,
10477
+ className = _props$className === void 0 ? "" : _props$className,
10478
+ _props$shopConfigStyl = props.shopConfigStyle,
10479
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10480
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10481
+ Link: Link,
10482
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10483
+ }, /*#__PURE__*/React__default.createElement("div", {
10484
+ className: "text-center rounded relative group " + className
10485
+ }, /*#__PURE__*/React__default.createElement("div", {
10486
+ className: "relative "
10487
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10488
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10489
+ className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
10490
+ }), /*#__PURE__*/React__default.createElement("div", {
10491
+ className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10492
+ }, /*#__PURE__*/React__default.createElement("div", {
10493
+ className: "text-lg text-textButton"
10494
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10495
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10496
+ className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
10497
+ priceClassName: "text-textButton !font-normal",
10498
+ priceBeforeDiscountClassName: "text-textButton !font-normal"
10499
+ }), /*#__PURE__*/React__default.createElement(Button, {
10500
+ label: "Th\xEAm v\xE0o gi\u1ECF",
10501
+ shopConfigStyle: shopConfigStyle,
10502
+ className: "hidden group-hover:block transition-all duration-300 !font-normal"
10503
+ })))));
10504
+ };
10505
+
10506
+ var ProductItem9 = function ProductItem9(props) {
10507
+ var _product$productInfo;
10508
+ var product = props.product,
10509
+ _props$Link = props.Link,
10510
+ Link = _props$Link === void 0 ? null : _props$Link,
10511
+ _props$shopConfigStyl = props.shopConfigStyle,
10512
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10513
+ _props$className = props.className,
10514
+ className = _props$className === void 0 ? "" : _props$className;
10515
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10516
+ Link: Link,
10517
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10518
+ }, /*#__PURE__*/React__default.createElement("div", {
10519
+ className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10520
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10521
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10522
+ className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
10523
+ }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10524
+ className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10525
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10526
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10527
+ priceClassName: "!text-secondary !text-base !font-normal",
10528
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10529
+ })), /*#__PURE__*/React__default.createElement("div", {
10530
+ className: "flex gap-2 md:gap-4 "
10531
+ }, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
10532
+ className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
10533
+ }), /*#__PURE__*/React__default.createElement(Button, {
10534
+ label: "Mua ngay",
10535
+ className: "w-full",
10536
+ shopConfigStyle: shopConfigStyle
10537
+ }))));
10538
+ };
10539
+
10540
+ var ProductItem10 = function ProductItem10(props) {
10541
+ var _product$productInfo;
10542
+ var product = props.product;
10543
+ return /*#__PURE__*/React__default.createElement("div", {
10544
+ className: "flex border-b border-stroke items-center py-4"
10545
+ }, /*#__PURE__*/React__default.createElement("div", {
10546
+ className: "mb-auto"
10547
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10548
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10549
+ className: "!w-24 rounded-lg"
10550
+ })), /*#__PURE__*/React__default.createElement("div", {
10551
+ className: "ml-4 flex-1"
10552
+ }, /*#__PURE__*/React__default.createElement("div", {
10553
+ className: "text-xl"
10554
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
10555
+ className: "mt-2"
10556
+ }, /*#__PURE__*/React__default.createElement(ProductPrice, {
10557
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10558
+ priceClassName: "!font-normal text-lg"
10559
+ })) : null));
10560
+ };
10561
+
10562
+ function getMinMax$1(array, field) {
10563
+ if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
10564
+ return null;
10565
+ }
10566
+ var _array$reduce = array.reduce(function (acc, obj) {
10567
+ var value = obj[field];
10568
+ return {
10569
+ min: value < acc.min ? value : acc.min,
10570
+ max: value > acc.max ? value : acc.max
10571
+ };
10572
+ }, {
10573
+ min: array[0][field],
10574
+ max: array[0][field]
10575
+ }),
10576
+ min = _array$reduce.min,
10577
+ max = _array$reduce.max;
10578
+ return {
10579
+ min: min,
10580
+ max: max
10581
+ };
10582
+ }
10583
+ var ProductPrice2 = function ProductPrice2(props) {
10584
+ var product = props.product,
10585
+ variant = props.variant,
10586
+ _props$className = props.className,
10587
+ className = _props$className === void 0 ? "" : _props$className,
10588
+ _props$style = props.style,
10589
+ style = _props$style === void 0 ? {} : _props$style,
10590
+ _props$priceClassName = props.priceClassName,
10591
+ priceClassName = _props$priceClassName === void 0 ? "" : _props$priceClassName,
10592
+ _props$priceBeforeDis = props.priceBeforeDiscountClassName,
10593
+ priceBeforeDiscountClassName = _props$priceBeforeDis === void 0 ? "" : _props$priceBeforeDis;
10594
+ var _useState = React.useState(),
10595
+ displayPrice = _useState[0],
10596
+ setDisplayPrice = _useState[1];
10597
+ var _useState2 = React.useState(),
10598
+ displayPriceBeforeDiscount = _useState2[0],
10599
+ setDisplayPriceBeforeDiscount = _useState2[1];
10600
+ React.useEffect(function () {
10601
+ if (variant) {
10602
+ genProductPrice([variant]);
10603
+ } else if (product) {
10604
+ genProductPrice(product.variants);
10605
+ }
10606
+ }, [product, variant]);
10607
+ var genProductPrice = function genProductPrice(variants) {
10608
+ var mPrice = getMinMax$1(variants, 'price');
10609
+ var mPriceBeforeDiscount = getMinMax$1(variants, 'priceBeforeDiscount');
10610
+ if (mPrice && mPriceBeforeDiscount) {
10611
+ var _displayPriceBeforeDiscount = formatCurrency2(mPriceBeforeDiscount.min);
10612
+ var _displayPrice = formatCurrency2(mPrice.min);
10613
+ if (mPrice.min !== mPrice.max) {
10614
+ _displayPrice += " - " + formatCurrency2(mPrice.max);
10615
+ }
10616
+ if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
10617
+ _displayPriceBeforeDiscount += " - " + formatCurrency2(mPriceBeforeDiscount.max);
10618
+ }
10619
+ setDisplayPrice(_displayPrice);
10620
+ setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
10621
+ } else {
10622
+ var _displayPrice2 = formatCurrency2(product === null || product === void 0 ? void 0 : product.price);
10623
+ setDisplayPrice(_displayPrice2);
10624
+ }
10625
+ };
10626
+ return /*#__PURE__*/React__default.createElement("div", {
10627
+ className: "flex gap-4 flex-wrap " + className
10628
+ }, /*#__PURE__*/React__default.createElement("span", {
10629
+ className: "text-primary font-semibold " + priceClassName,
10630
+ style: style
10631
+ }, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
10632
+ className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
10633
+ }, displayPriceBeforeDiscount) : null);
10634
+ };
10635
+
10636
+ var ProductItem11 = function ProductItem11(props) {
10113
10637
  var _product$productInfo;
10114
10638
  var product = props.product,
10115
- _props$shopConfigStyl = props.shopConfigStyle,
10116
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10117
10639
  _props$Link = props.Link,
10118
10640
  Link = _props$Link === void 0 ? null : _props$Link,
10641
+ _props$shopConfigStyl = props.shopConfigStyle,
10642
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10119
10643
  _props$className = props.className,
10120
10644
  className = _props$className === void 0 ? "" : _props$className;
10121
10645
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10122
10646
  Link: Link,
10123
10647
  href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10124
10648
  }, /*#__PURE__*/React__default.createElement("div", {
10125
- className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
10649
+ className: "w-full bg-bgSecondary " + className
10650
+ }, /*#__PURE__*/React__default.createElement("div", {
10651
+ className: "overflow-hidden"
10126
10652
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10127
10653
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10128
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10129
- }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10130
- className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10131
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10654
+ className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
10655
+ })), /*#__PURE__*/React__default.createElement("div", {
10656
+ className: "p-4 flex flex-col gap-4"
10657
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10658
+ className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10659
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice2, {
10132
10660
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10661
+ priceClassName: "!font-normal",
10133
10662
  className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10134
10663
  })), /*#__PURE__*/React__default.createElement("div", {
10135
- className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
10136
- }, /*#__PURE__*/React__default.createElement("div", {
10137
- className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
10138
- }, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
10664
+ className: "flex gap-2 md:gap-4 "
10665
+ }, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
10666
+ className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
10667
+ }), /*#__PURE__*/React__default.createElement(Button, {
10139
10668
  label: "Mua ngay",
10140
10669
  className: "w-full",
10141
10670
  shopConfigStyle: shopConfigStyle
10142
- }))));
10143
- };
10144
-
10145
- var ProductItem7 = function ProductItem7(props) {
10146
- var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6;
10147
- var product = props.product,
10148
- _props$Link = props.Link,
10149
- Link = _props$Link === void 0 ? null : _props$Link,
10150
- _props$className = props.className,
10151
- className = _props$className === void 0 ? "" : _props$className,
10152
- _props$classNamePrice = props.classNamePrice,
10153
- classNamePrice = _props$classNamePrice === void 0 ? "text-lg" : _props$classNamePrice;
10154
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10155
- Link: Link,
10156
- href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10157
- }, /*#__PURE__*/React__default.createElement("div", {
10158
- className: "w-full bg-bgSecondary relative rounded-2xl " + className
10159
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10160
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10161
- className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
10162
- }), /*#__PURE__*/React__default.createElement("div", {
10163
- className: "p-3 sm:p-4 flex flex-col gap-4 items-start"
10164
- }, /*#__PURE__*/React__default.createElement("div", {
10165
- className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
10166
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10167
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10168
- className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "") + " " + classNamePrice
10169
- })), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo2 = product.productInfo) !== null && _product$productInfo2 !== void 0 && _product$productInfo2.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) ? /*#__PURE__*/React__default.createElement("div", {
10170
- className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
10171
- }, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.priceBeforeDiscount)) : null));
10172
- };
10173
-
10174
- var ProductItem8 = function ProductItem8(props) {
10175
- var _product$productInfo;
10176
- var product = props.product,
10177
- _props$Link = props.Link,
10178
- Link = _props$Link === void 0 ? null : _props$Link,
10179
- _props$className = props.className,
10180
- className = _props$className === void 0 ? "" : _props$className,
10181
- _props$shopConfigStyl = props.shopConfigStyle,
10182
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10183
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10184
- Link: Link,
10185
- href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10186
- }, /*#__PURE__*/React__default.createElement("div", {
10187
- className: "text-center rounded relative group " + className
10188
- }, /*#__PURE__*/React__default.createElement("div", {
10189
- className: "relative "
10190
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10191
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10192
- className: "min-h-[360px] md:min-h-[400px] xl:min-h-[440px] !object-cover !rounded"
10193
- }), /*#__PURE__*/React__default.createElement("div", {
10194
- className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10195
- }, /*#__PURE__*/React__default.createElement("div", {
10196
- className: "text-lg text-textButton"
10197
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10198
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10199
- className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
10200
- priceClassName: "text-textButton !font-normal",
10201
- priceBeforeDiscountClassName: "text-textButton !font-normal"
10202
- }), /*#__PURE__*/React__default.createElement(Button, {
10203
- label: "Th\xEAm v\xE0o gi\u1ECF",
10204
- shopConfigStyle: shopConfigStyle,
10205
- className: "hidden group-hover:block transition-all duration-300 !font-normal"
10206
10671
  })))));
10207
10672
  };
10208
10673
 
@@ -10331,13 +10796,13 @@ var Products2 = function Products2(props) {
10331
10796
  breakpoint: 1024,
10332
10797
  settings: {
10333
10798
  slidesToShow: 4,
10334
- slidesToScroll: 4
10799
+ slidesToScroll: 1
10335
10800
  }
10336
10801
  }, {
10337
10802
  breakpoint: 1023,
10338
10803
  settings: {
10339
10804
  slidesToShow: 3,
10340
- slidesToScroll: 3
10805
+ slidesToScroll: 1
10341
10806
  }
10342
10807
  }, {
10343
10808
  breakpoint: 635,
@@ -10345,6 +10810,12 @@ var Products2 = function Products2(props) {
10345
10810
  slidesToShow: 2,
10346
10811
  slidesToScroll: 2
10347
10812
  }
10813
+ }, {
10814
+ breakpoint: 370,
10815
+ settings: {
10816
+ slidesToShow: 1,
10817
+ slidesToScroll: 1
10818
+ }
10348
10819
  }]
10349
10820
  };
10350
10821
  React.useEffect(function () {
@@ -10378,12 +10849,12 @@ var Products2 = function Products2(props) {
10378
10849
  color: textBody
10379
10850
  }
10380
10851
  }, /*#__PURE__*/React__default.createElement("div", {
10381
- className: "relative rounded-3xl w-full py-10 md:px-10 sm:px-6 px-4",
10852
+ className: "relative rounded-3xl w-full py-6 md:py-10 md:px-6 px-3 xl:px-10",
10382
10853
  style: {
10383
10854
  background: secondary
10384
10855
  }
10385
10856
  }, /*#__PURE__*/React__default.createElement("h2", {
10386
- className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-4",
10857
+ className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-6",
10387
10858
  style: {
10388
10859
  color: textButton
10389
10860
  }
@@ -10397,16 +10868,15 @@ var Products2 = function Products2(props) {
10397
10868
  beforeChange: handleBeforeChange
10398
10869
  }), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
10399
10870
  return /*#__PURE__*/React__default.createElement("div", {
10400
- className: "px-2 lg:px-3",
10871
+ className: "px-1 md:px-2 lg:px-3",
10401
10872
  key: "dfg-" + index
10402
10873
  }, /*#__PURE__*/React__default.createElement(ProductItem, {
10403
10874
  product: product,
10404
10875
  Link: Link,
10405
- shopConfigStyle: shopConfigStyle,
10406
- classNamePrice: "text-base md:text-lg"
10876
+ shopConfigStyle: shopConfigStyle
10407
10877
  }));
10408
10878
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
10409
- className: "absolute left-0 top-1/2 w-full flex justify-between px-2 md:px-4 lg:px-6"
10879
+ className: "absolute left-0 top-[45%] w-full flex justify-between px-2 md:px-4 lg:px-6"
10410
10880
  }, /*#__PURE__*/React__default.createElement("button", {
10411
10881
  onClick: goToPrev,
10412
10882
  className: (canGoPrev ? "bg-primary" : "bg-gray5 cursor-not-allowed") + " p-2 rounded-full"
@@ -10451,7 +10921,7 @@ var Pagination = function Pagination(_ref) {
10451
10921
  for (var i = start; i <= end; i++) {
10452
10922
  pages.push(i);
10453
10923
  }
10454
- if (current_page < total_pages - 2) pages.push("...");
10924
+ if (current_page < total_pages - 3) pages.push("...");
10455
10925
  pages.push(total_pages);
10456
10926
  return pages;
10457
10927
  };
@@ -10471,7 +10941,7 @@ var Pagination = function Pagination(_ref) {
10471
10941
  onClick: function onClick() {
10472
10942
  return typeof page === "number" && handlePageChange(page - 1);
10473
10943
  },
10474
- className: "px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
10944
+ className: "px-2 md:px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
10475
10945
  disabled: page === "..."
10476
10946
  }, page);
10477
10947
  })), /*#__PURE__*/React__default.createElement(io5.IoChevronForwardOutline, {
@@ -10590,44 +11060,217 @@ var Products3 = function Products3(props) {
10590
11060
  }));
10591
11061
  };
10592
11062
 
10593
- var Products9 = function Products9(props) {
11063
+ var CarouselItem = function CarouselItem(props) {
10594
11064
  var _Object$keys;
11065
+ var _props$data = props.data,
11066
+ data = _props$data === void 0 ? [] : _props$data,
11067
+ _props$className = props.className,
11068
+ className = _props$className === void 0 ? "" : _props$className,
11069
+ _props$style = props.style,
11070
+ style = _props$style === void 0 ? {} : _props$style,
11071
+ _props$onClick = props.onClick,
11072
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
11073
+ _props$isAll = props.isAll,
11074
+ isAll = _props$isAll === void 0 ? true : _props$isAll,
11075
+ _props$isNavigateButt = props.isNavigateButton,
11076
+ isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
11077
+ _props$itemClassName = props.itemClassName,
11078
+ itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
11079
+ var listRef = React.useRef(null);
11080
+ var _useState = React.useState(false),
11081
+ canScrollLeft = _useState[0],
11082
+ setCanScrollLeft = _useState[1];
11083
+ var _useState2 = React.useState(false),
11084
+ canScrollRight = _useState2[0],
11085
+ setCanScrollRight = _useState2[1];
11086
+ var _useState3 = React.useState({}),
11087
+ value = _useState3[0],
11088
+ setValue = _useState3[1];
11089
+ React.useEffect(function () {
11090
+ var _listRef$current;
11091
+ checkScroll();
11092
+ (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
11093
+ return function () {
11094
+ var _listRef$current2;
11095
+ return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
11096
+ };
11097
+ }, [data]);
11098
+ var checkScroll = function checkScroll() {
11099
+ if (listRef.current) {
11100
+ var _listRef$current3 = listRef.current,
11101
+ scrollLeft = _listRef$current3.scrollLeft,
11102
+ scrollWidth = _listRef$current3.scrollWidth,
11103
+ clientWidth = _listRef$current3.clientWidth;
11104
+ setCanScrollLeft(scrollLeft > 0);
11105
+ setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
11106
+ }
11107
+ };
11108
+ var handleClickPrevImg = function handleClickPrevImg() {
11109
+ if (listRef.current) {
11110
+ checkScroll();
11111
+ listRef.current.scrollBy({
11112
+ left: -300,
11113
+ behavior: "smooth"
11114
+ });
11115
+ }
11116
+ };
11117
+ var handleClickNextImg = function handleClickNextImg() {
11118
+ if (listRef.current) {
11119
+ checkScroll();
11120
+ listRef.current.scrollBy({
11121
+ left: 300,
11122
+ behavior: "smooth"
11123
+ });
11124
+ }
11125
+ };
11126
+ var handleOnClick = function handleOnClick(item) {
11127
+ setValue(item);
11128
+ onClick === null || onClick === void 0 ? void 0 : onClick(item);
11129
+ };
11130
+ return /*#__PURE__*/React__default.createElement("div", {
11131
+ className: "h-10 md:h-12 flex justify-between items-center " + className,
11132
+ style: style
11133
+ }, /*#__PURE__*/React__default.createElement("div", {
11134
+ className: "w-full overflow-hidden "
11135
+ }, /*#__PURE__*/React__default.createElement("div", {
11136
+ className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
11137
+ ref: listRef
11138
+ }, isAll ? /*#__PURE__*/React__default.createElement("div", {
11139
+ className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " text-primary w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
11140
+ onClick: function onClick() {
11141
+ handleOnClick({});
11142
+ }
11143
+ }, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
11144
+ return /*#__PURE__*/React__default.createElement("div", {
11145
+ className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border text-primary border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
11146
+ key: "carousel-" + index,
11147
+ onClick: function onClick() {
11148
+ handleOnClick(item);
11149
+ }
11150
+ }, item === null || item === void 0 ? void 0 : item.label);
11151
+ })))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
11152
+ className: "hidden my-auto gap-4 md:flex justify-end ps-10"
11153
+ }, /*#__PURE__*/React__default.createElement("button", {
11154
+ className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
11155
+ onClick: handleClickPrevImg,
11156
+ disabled: !canScrollLeft
11157
+ }, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
11158
+ size: 24,
11159
+ className: "inline-block text-lg"
11160
+ })), /*#__PURE__*/React__default.createElement("button", {
11161
+ className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
11162
+ onClick: handleClickNextImg,
11163
+ disabled: !canScrollRight
11164
+ }, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
11165
+ size: 24,
11166
+ className: "inline-block text-lg "
11167
+ }))) : null);
11168
+ };
11169
+
11170
+ var Products9 = function Products9(props) {
11171
+ var _Object$keys2;
10595
11172
  var _props$Link = props.Link,
10596
11173
  Link = _props$Link === void 0 ? null : _props$Link,
10597
11174
  shopConfigStyle = props.shopConfigStyle,
10598
11175
  _props$ProductItem = props.ProductItem,
10599
11176
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
10600
- var _useState = React.useState({
11177
+ var _useState = React.useState(true),
11178
+ loading = _useState[0],
11179
+ setLoading = _useState[1];
11180
+ var _useState2 = React.useState({
10601
11181
  size: 12
10602
11182
  }),
10603
- params = _useState[0],
10604
- setParams = _useState[1];
11183
+ params = _useState2[0];
11184
+ var _useState3 = React.useState(false),
11185
+ isAutoGetList = _useState3[0];
10605
11186
  var _CategoryController = CategoryController(_extends({}, props, {
10606
11187
  types: "0"
10607
11188
  })),
10608
11189
  _CategoryController$c = _CategoryController.categories,
10609
11190
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
10610
11191
  var _ProductController = ProductController(_extends({}, props, {
10611
- params: params
11192
+ params: params,
11193
+ isAutoGetList: isAutoGetList
10612
11194
  })),
10613
- _ProductController$pr = _ProductController.products,
10614
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
10615
- loading = _ProductController.loading;
11195
+ getProductListSearch = _ProductController.getProductListSearch;
11196
+ var _useState4 = React.useState([]),
11197
+ categoryProducts = _useState4[0],
11198
+ setCategoryProducts = _useState4[1];
11199
+ React.useEffect(function () {
11200
+ if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0) {
11201
+ fetchAll();
11202
+ }
11203
+ }, [categories]);
11204
+ var fetchAll = function fetchAll() {
11205
+ try {
11206
+ setLoading(true);
11207
+ var _temp = _finallyRethrows(function () {
11208
+ return _catch(function () {
11209
+ var _categories$slice;
11210
+ var result = {};
11211
+ return Promise.resolve(Promise.all(categories === null || categories === void 0 ? void 0 : (_categories$slice = categories.slice(0, 4)) === null || _categories$slice === void 0 ? void 0 : _categories$slice.map(function (cat) {
11212
+ try {
11213
+ return Promise.resolve(getProductListSearch({
11214
+ categoryId: cat === null || cat === void 0 ? void 0 : cat.categoryId,
11215
+ size: 4
11216
+ })).then(function (products) {
11217
+ if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
11218
+ result[cat === null || cat === void 0 ? void 0 : cat.cateName] = products;
11219
+ }
11220
+ });
11221
+ } catch (e) {
11222
+ return Promise.reject(e);
11223
+ }
11224
+ }))).then(function () {
11225
+ setCategoryProducts(result);
11226
+ });
11227
+ }, function (error) {
11228
+ console.log(error);
11229
+ });
11230
+ }, function (_wasThrown, _result) {
11231
+ setLoading(false);
11232
+ if (_wasThrown) throw _result;
11233
+ return _result;
11234
+ });
11235
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
11236
+ } catch (e) {
11237
+ return Promise.reject(e);
11238
+ }
11239
+ };
10616
11240
  var handleChooseCategory = function handleChooseCategory(item) {
10617
- setParams(_extends({}, params, {
10618
- categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
10619
- size: 12
10620
- }));
11241
+ var _Object$keys;
11242
+ if ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0) {
11243
+ fetchAll();
11244
+ } else {
11245
+ fetchOne(item);
11246
+ }
10621
11247
  };
10622
- var groupedProducts = products === null || products === void 0 ? void 0 : products.reduce(function (acc, product) {
10623
- var _product$productInfo = product === null || product === void 0 ? void 0 : product.productInfo,
10624
- categoryName = _product$productInfo.categoryName;
10625
- if (!acc[categoryName]) {
10626
- acc[categoryName] = [];
11248
+ var fetchOne = function fetchOne(item) {
11249
+ try {
11250
+ setLoading(true);
11251
+ var _temp2 = _finallyRethrows(function () {
11252
+ return _catch(function () {
11253
+ return Promise.resolve(getProductListSearch({
11254
+ categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
11255
+ size: 12
11256
+ })).then(function (products) {
11257
+ var _setCategoryProducts, _console$log;
11258
+ setCategoryProducts((_setCategoryProducts = {}, _setCategoryProducts[item === null || item === void 0 ? void 0 : item.cateName] = products, _setCategoryProducts));
11259
+ console.log("check::::", (_console$log = {}, _console$log[item === null || item === void 0 ? void 0 : item.cateName] = products, _console$log));
11260
+ });
11261
+ }, function (error) {
11262
+ console.log(error);
11263
+ });
11264
+ }, function (_wasThrown2, _result2) {
11265
+ setLoading(false);
11266
+ if (_wasThrown2) throw _result2;
11267
+ return _result2;
11268
+ });
11269
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
11270
+ } catch (e) {
11271
+ return Promise.reject(e);
10627
11272
  }
10628
- acc[categoryName].push(product);
10629
- return acc;
10630
- }, {});
11273
+ };
10631
11274
  return /*#__PURE__*/React__default.createElement("div", {
10632
11275
  className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
10633
11276
  }, /*#__PURE__*/React__default.createElement(CarouselItem, {
@@ -10635,7 +11278,7 @@ var Products9 = function Products9(props) {
10635
11278
  onClick: handleChooseCategory
10636
11279
  }), loading ? /*#__PURE__*/React__default.createElement("div", {
10637
11280
  className: "m-auto mt-20 min-h-32"
10638
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(groupedProducts)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0 ? Object.entries(groupedProducts).map(function (_ref, index) {
11281
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$keys2 = Object.keys(categoryProducts)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) > 0 ? Object.entries(categoryProducts).map(function (_ref, index) {
10639
11282
  var _products$;
10640
11283
  var categoryName = _ref[0],
10641
11284
  products = _ref[1];
@@ -10659,7 +11302,9 @@ var Products9 = function Products9(props) {
10659
11302
  product: product,
10660
11303
  key: product === null || product === void 0 ? void 0 : product.landingShopProductId
10661
11304
  });
10662
- }) : null));
11305
+ }) : /*#__PURE__*/React__default.createElement("div", {
11306
+ className: "col-span-2 sm:col-span-3 lg:col-span-4"
11307
+ }, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))));
10663
11308
  }) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
10664
11309
  };
10665
11310
 
@@ -10730,7 +11375,6 @@ var listFilter = [{
10730
11375
  value: "sortPriceDESC"
10731
11376
  }];
10732
11377
  var Products11 = function Products11(props) {
10733
- var _productsFilter$slice;
10734
11378
  var _props$shopConfigStyl = props.shopConfigStyle,
10735
11379
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10736
11380
  _props$Link = props.Link,
@@ -10742,22 +11386,19 @@ var Products11 = function Products11(props) {
10742
11386
  var _useState = React.useState({
10743
11387
  page: 0,
10744
11388
  size: 12,
10745
- categoryId: categoryId
11389
+ categoryId: categoryId || ""
10746
11390
  }),
10747
11391
  params = _useState[0],
10748
11392
  setParams = _useState[1];
10749
- var _useState2 = React.useState(true),
10750
- firstLoading = _useState2[0],
10751
- setFirstLoading = _useState2[1];
10752
- var _useState3 = React.useState({}),
10753
- categorySelected = _useState3[0],
10754
- setCategorySelected = _useState3[1];
10755
- var _useState4 = React.useState([]),
10756
- productsFilter = _useState4[0],
10757
- setProductsFilter = _useState4[1];
10758
- var _useState5 = React.useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
10759
- filterItem = _useState5[0],
10760
- setFilterItem = _useState5[1];
11393
+ var _useState2 = React.useState({}),
11394
+ categorySelected = _useState2[0],
11395
+ setCategorySelected = _useState2[1];
11396
+ var _useState3 = React.useState([]),
11397
+ productsFilter = _useState3[0],
11398
+ setProductsFilter = _useState3[1];
11399
+ var _useState4 = React.useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
11400
+ filterItem = _useState4[0],
11401
+ setFilterItem = _useState4[1];
10761
11402
  var _CategoryController = CategoryController(_extends({}, props, {
10762
11403
  types: "0"
10763
11404
  })),
@@ -10771,16 +11412,18 @@ var Products11 = function Products11(props) {
10771
11412
  loading = _ProductController.loading,
10772
11413
  page = _ProductController.page;
10773
11414
  var handleOnChangePage = function handleOnChangePage(pageIndex) {
10774
- setFirstLoading(false);
10775
11415
  setParams(function (prev) {
10776
11416
  return _extends({}, prev, {
10777
11417
  page: pageIndex
10778
11418
  });
10779
11419
  });
11420
+ window.scrollTo({
11421
+ top: 0,
11422
+ behavior: 'smooth'
11423
+ });
10780
11424
  };
10781
11425
  var handleChooseCategory = function handleChooseCategory(category) {
10782
11426
  setCategorySelected(category);
10783
- setFirstLoading(true);
10784
11427
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
10785
11428
  setParams(function (prev) {
10786
11429
  return _extends({}, prev, {
@@ -10788,6 +11431,10 @@ var Products11 = function Products11(props) {
10788
11431
  size: 12
10789
11432
  });
10790
11433
  });
11434
+ window.scrollTo({
11435
+ top: 0,
11436
+ behavior: 'smooth'
11437
+ });
10791
11438
  };
10792
11439
  React.useEffect(function () {
10793
11440
  if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0 && params !== null && params !== void 0 && params.categoryId) {
@@ -10798,23 +11445,42 @@ var Products11 = function Products11(props) {
10798
11445
  }
10799
11446
  }, [categories]);
10800
11447
  React.useEffect(function () {
10801
- setProductsFilter(products);
11448
+ if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "sortPriceDESC") {
11449
+ var productsCopy = [].concat(products);
11450
+ productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
11451
+ var _a$productInfo, _b$productInfo;
11452
+ return (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price);
11453
+ });
11454
+ setProductsFilter(productsCopy);
11455
+ } else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
11456
+ var _productsCopy2;
11457
+ var _productsCopy = [].concat(products);
11458
+ _productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
11459
+ var _product$productInfo, _product$productInfo2, _product$productInfo3;
11460
+ return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
11461
+ });
11462
+ setProductsFilter(_productsCopy);
11463
+ } else {
11464
+ setProductsFilter(products);
11465
+ }
10802
11466
  }, [products, categorySelected]);
10803
11467
  var handleFilter = function handleFilter(item) {
10804
11468
  setFilterItem(item);
10805
- if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
11469
+ if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
10806
11470
  var productsCopy = [].concat(products);
10807
11471
  productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
10808
- var _b$productInfo, _a$productInfo;
10809
- return +(b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price) - (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price);
11472
+ var _a$productInfo2, _b$productInfo2;
11473
+ return (a === null || a === void 0 ? void 0 : (_a$productInfo2 = a.productInfo) === null || _a$productInfo2 === void 0 ? void 0 : _a$productInfo2.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo2 = b.productInfo) === null || _b$productInfo2 === void 0 ? void 0 : _b$productInfo2.price);
10810
11474
  });
10811
11475
  setProductsFilter(productsCopy);
10812
- } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
10813
- var _productsCopy = [].concat(products);
10814
- _productsCopy === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
10815
- return (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price);
11476
+ } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
11477
+ var _productsCopy4;
11478
+ var _productsCopy3 = [].concat(products);
11479
+ _productsCopy3 = (_productsCopy4 = _productsCopy3) === null || _productsCopy4 === void 0 ? void 0 : _productsCopy4.filter(function (product) {
11480
+ var _product$productInfo4, _product$productInfo5, _product$productInfo6;
11481
+ return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
10816
11482
  });
10817
- setProductsFilter(_productsCopy);
11483
+ setProductsFilter(_productsCopy3);
10818
11484
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10819
11485
  setParams(function (prev) {
10820
11486
  return _extends({}, prev, {
@@ -10823,19 +11489,20 @@ var Products11 = function Products11(props) {
10823
11489
  });
10824
11490
  } else {
10825
11491
  setParams(function (prev) {
10826
- return _extends({}, prev, {
11492
+ return {
11493
+ page: 0,
10827
11494
  categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
10828
11495
  size: 12
10829
- });
11496
+ };
10830
11497
  });
10831
11498
  }
10832
11499
  };
10833
11500
  return /*#__PURE__*/React__default.createElement("div", {
10834
11501
  className: SECTION_CLASS + " grid grid-cols-1 !my-6 !md:my-6 md:grid-cols-4 gap-6"
10835
11502
  }, /*#__PURE__*/React__default.createElement("div", {
10836
- className: "md:sticky top-0 self-start"
11503
+ className: "md:sticky top-16 self-start"
10837
11504
  }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
10838
- className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
11505
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
10839
11506
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
10840
11507
  return /*#__PURE__*/React__default.createElement("div", {
10841
11508
  className: "px-6 py-2 hover:bg-gray-100 hover:text-primary cursor-pointer rounded-lg " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (item === null || item === void 0 ? void 0 : item.categoryId) ? " bg-primary text-textButton" : ""),
@@ -10843,7 +11510,9 @@ var Products11 = function Products11(props) {
10843
11510
  onClick: function onClick() {
10844
11511
  handleChooseCategory(item);
10845
11512
  }
10846
- }, item === null || item === void 0 ? void 0 : item.cateName);
11513
+ }, /*#__PURE__*/React__default.createElement("div", {
11514
+ className: "line-clamp-2"
11515
+ }, item === null || item === void 0 ? void 0 : item.cateName));
10847
11516
  })) : null), /*#__PURE__*/React__default.createElement("div", {
10848
11517
  className: "md:col-span-3 flex flex-col gap-6"
10849
11518
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10856,11 +11525,11 @@ var Products11 = function Products11(props) {
10856
11525
  handleFilter(item);
10857
11526
  }
10858
11527
  }, item === null || item === void 0 ? void 0 : item.label);
10859
- })), loading && firstLoading ? /*#__PURE__*/React__default.createElement("div", {
11528
+ })), loading ? /*#__PURE__*/React__default.createElement("div", {
10860
11529
  className: "w-full h-96 mb-1 flex justify-center items-center"
10861
11530
  }, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10862
- className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 lg:gap-8"
10863
- }, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : (_productsFilter$slice = productsFilter.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _productsFilter$slice === void 0 ? void 0 : _productsFilter$slice.map(function (product, index) {
11531
+ className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 xl:gap-8"
11532
+ }, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.map(function (product, index) {
10864
11533
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10865
11534
  href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
10866
11535
  Link: Link,
@@ -10884,26 +11553,6 @@ var Products11 = function Products11(props) {
10884
11553
  }) : null)));
10885
11554
  };
10886
11555
 
10887
- var ProductItem9 = function ProductItem9(props) {
10888
- var _product$productInfo;
10889
- var product = props.product;
10890
- return /*#__PURE__*/React__default.createElement("div", {
10891
- className: "flex border-b border-stroke items-center py-4"
10892
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10893
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10894
- className: "!w-24 rounded-lg"
10895
- }), /*#__PURE__*/React__default.createElement("div", {
10896
- className: "ml-4 flex-1"
10897
- }, /*#__PURE__*/React__default.createElement("div", {
10898
- className: "text-xl"
10899
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
10900
- className: "mt-2"
10901
- }, /*#__PURE__*/React__default.createElement(ProductPrice, {
10902
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10903
- priceClassName: "!font-normal text-lg"
10904
- })) : null));
10905
- };
10906
-
10907
11556
  var Products12 = function Products12(props) {
10908
11557
  var _props$shopConfigStyl = props.shopConfigStyle,
10909
11558
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -10936,15 +11585,19 @@ var Products12 = function Products12(props) {
10936
11585
  });
10937
11586
  };
10938
11587
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
10939
- className: SECTION_DEFAULT_CLASS + " flex flex-col gap-6"
11588
+ className: SECTION_CLASS + " w-full flex flex-col gap-6"
10940
11589
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
10941
11590
  data: data,
10942
11591
  shopConfigStyle: shopConfigStyle
10943
- }), /*#__PURE__*/React__default.createElement(CarouselItem, {
11592
+ }), /*#__PURE__*/React__default.createElement("div", {
11593
+ className: "flex justify-center"
11594
+ }, /*#__PURE__*/React__default.createElement("div", {
11595
+ className: "!overflow-hidden max-w-[80%] md:max-w-[67%] pt-2"
11596
+ }, /*#__PURE__*/React__default.createElement(CarouselItem, {
10944
11597
  isNavigateButton: false,
10945
11598
  data: categories,
10946
11599
  onClick: handleFilterByCategory
10947
- }), loading ? /*#__PURE__*/React__default.createElement("div", {
11600
+ }))), loading ? /*#__PURE__*/React__default.createElement("div", {
10948
11601
  className: "flex w-full justify-center p-12"
10949
11602
  }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
10950
11603
  className: "grid grid-cols-1 md:grid-cols-2 gap-x-12"
@@ -10953,12 +11606,70 @@ var Products12 = function Products12(props) {
10953
11606
  key: index,
10954
11607
  Link: Link,
10955
11608
  href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10956
- }, /*#__PURE__*/React__default.createElement(ProductItem9, {
11609
+ }, /*#__PURE__*/React__default.createElement(ProductItem10, {
10957
11610
  product: product
10958
11611
  }));
10959
11612
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
10960
11613
  };
10961
11614
 
11615
+ var Products14 = function Products14(props) {
11616
+ var _products$slice;
11617
+ var _props$Link = props.Link,
11618
+ Link = _props$Link === void 0 ? null : _props$Link,
11619
+ data = props.data,
11620
+ _props$shopConfigStyl = props.shopConfigStyle,
11621
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
11622
+ _props$SectionTitle = props.SectionTitle,
11623
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
11624
+ _props$ProductItem = props.ProductItem,
11625
+ ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11626
+ var _ProductDetailControl = ProductDetailController(props),
11627
+ product = _ProductDetailControl.product;
11628
+ var _useState = React.useState(false),
11629
+ isAutoGetList = _useState[0],
11630
+ setIsAutoGetList = _useState[1];
11631
+ var _useState2 = React.useState({
11632
+ size: 12,
11633
+ categoryId: product === null || product === void 0 ? void 0 : product.categoryId
11634
+ }),
11635
+ params = _useState2[0],
11636
+ setParams = _useState2[1];
11637
+ var _ProductController = ProductController(_extends({}, props, {
11638
+ params: params,
11639
+ isAutoGetList: isAutoGetList
11640
+ })),
11641
+ _ProductController$pr = _ProductController.products,
11642
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
11643
+ loading = _ProductController.loading;
11644
+ React.useEffect(function () {
11645
+ if (product !== null && product !== void 0 && product.categoryId) {
11646
+ setParams(function (prev) {
11647
+ return _extends({}, prev, {
11648
+ categoryId: product === null || product === void 0 ? void 0 : product.categoryId
11649
+ });
11650
+ });
11651
+ setIsAutoGetList(true);
11652
+ }
11653
+ }, [product]);
11654
+ return /*#__PURE__*/React__default.createElement("div", {
11655
+ className: SECTION_CLASS + " flex flex-col gap-6 md:gap-12"
11656
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
11657
+ data: data,
11658
+ shopConfigStyle: shopConfigStyle
11659
+ }), loading ? /*#__PURE__*/React__default.createElement("div", {
11660
+ className: "m-auto mt-20 min-h-32"
11661
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11662
+ className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
11663
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
11664
+ return /*#__PURE__*/React__default.createElement(ProductItem, {
11665
+ Link: Link,
11666
+ shopConfigStyle: shopConfigStyle,
11667
+ product: product,
11668
+ key: "zjk-" + idx
11669
+ });
11670
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
11671
+ };
11672
+
10962
11673
  var ProductCategory2 = function ProductCategory2(props) {
10963
11674
  var _products$slice;
10964
11675
  var _props$Link = props.Link,
@@ -11110,7 +11821,11 @@ var ProductSearch1 = function ProductSearch1(props) {
11110
11821
  isAutoGetList: isAutoGetList
11111
11822
  })),
11112
11823
  products = _ProductController.products,
11113
- loading = _ProductController.loading;
11824
+ loading = _ProductController.loading,
11825
+ page = _ProductController.page;
11826
+ var _useState5 = React.useState({}),
11827
+ filterValue = _useState5[0],
11828
+ setFilterValue = _useState5[1];
11114
11829
  React.useEffect(function () {
11115
11830
  setIsAutoGetList(true);
11116
11831
  setParams(function (prev) {
@@ -11120,8 +11835,16 @@ var ProductSearch1 = function ProductSearch1(props) {
11120
11835
  });
11121
11836
  }, [keywordValue]);
11122
11837
  React.useEffect(function () {
11123
- if ((products === null || products === void 0 ? void 0 : products.length) > 0) setProductsFilter(products);else {
11124
- setProductsFilter([]);
11838
+ if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
11839
+ var _productsCopy;
11840
+ var productsCopy = [].concat(products);
11841
+ productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
11842
+ var _product$productInfo, _product$productInfo2, _product$productInfo3;
11843
+ return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
11844
+ });
11845
+ setProductsFilter(productsCopy);
11846
+ } else {
11847
+ setProductsFilter(products);
11125
11848
  }
11126
11849
  }, [products]);
11127
11850
  var handleGetMoreProducts = function handleGetMoreProducts() {
@@ -11133,10 +11856,13 @@ var ProductSearch1 = function ProductSearch1(props) {
11133
11856
  });
11134
11857
  };
11135
11858
  var handleFilter = function handleFilter(item) {
11136
- if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
11859
+ setFilterValue(item);
11860
+ if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
11861
+ var _productsCopy2;
11137
11862
  var productsCopy = [].concat(products);
11138
- productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.filter(function (product) {
11139
- return (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price);
11863
+ productsCopy = (_productsCopy2 = productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
11864
+ var _product$productInfo4, _product$productInfo5, _product$productInfo6;
11865
+ return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
11140
11866
  });
11141
11867
  setProductsFilter(productsCopy);
11142
11868
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
@@ -11161,7 +11887,7 @@ var ProductSearch1 = function ProductSearch1(props) {
11161
11887
  shopConfigStyle: shopConfigStyle
11162
11888
  }), /*#__PURE__*/React__default.createElement("div", {
11163
11889
  className: "text-lg"
11164
- }, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", products === null || products === void 0 ? void 0 : products.length, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
11890
+ }, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", page === null || page === void 0 ? void 0 : page.total_elements, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
11165
11891
  data: listFilter$1,
11166
11892
  isNavigateButton: false,
11167
11893
  onClick: handleFilter
@@ -11958,7 +12684,7 @@ var Booking1 = function Booking1(props) {
11958
12684
  shopConfigStyle: shopConfigStyle
11959
12685
  }), /*#__PURE__*/React__default.createElement("div", {
11960
12686
  className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12"
11961
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
12687
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
11962
12688
  shopConfigStyle: shopConfigStyle,
11963
12689
  shopConfig: shopConfig,
11964
12690
  className: "!bg-bgSecondary"
@@ -12000,7 +12726,7 @@ var BookingForm6 = function BookingForm6(props) {
12000
12726
  className: "w-full h-auto"
12001
12727
  }), /*#__PURE__*/React__default.createElement("div", {
12002
12728
  className: "mt-4 whitespace-pre-line"
12003
- }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
12729
+ }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm$1, {
12004
12730
  shopConfigStyle: shopConfigStyle,
12005
12731
  shopConfig: shopConfig,
12006
12732
  className: "col-span-2"
@@ -12244,7 +12970,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
12244
12970
  })), /*#__PURE__*/React__default.createElement("div", {
12245
12971
  className: "text-center"
12246
12972
  }, /*#__PURE__*/React__default.createElement(Button, {
12247
- label: "Đặt lịch ngay",
12973
+ label: "Đặt bàn ngay",
12248
12974
  shopConfigStyle: shopConfigStyle,
12249
12975
  onClick: handleSubmit
12250
12976
  }))) : null, isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
@@ -12261,7 +12987,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
12261
12987
  }
12262
12988
  })), /*#__PURE__*/React__default.createElement("div", {
12263
12989
  className: "font-medium text-2xl"
12264
- }, "\u0110\u1EB7t l\u1ECBch th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
12990
+ }, "\u0110\u1EB7t b\xE0n th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
12265
12991
  className: "text-center"
12266
12992
  }, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
12267
12993
  };
@@ -12283,7 +13009,7 @@ var BookingTable1 = function BookingTable1(props) {
12283
13009
  data: data,
12284
13010
  shopConfigStyle: shopConfigStyle
12285
13011
  }), /*#__PURE__*/React__default.createElement("div", {
12286
- className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
13012
+ className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 lg:gap-12"
12287
13013
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
12288
13014
  href: convertURL(data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.route) || (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.link) || "#"
12289
13015
  }, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.svgImage ? /*#__PURE__*/React__default.createElement("div", {
@@ -12294,13 +13020,13 @@ var BookingTable1 = function BookingTable1(props) {
12294
13020
  }
12295
13021
  })) : /*#__PURE__*/React__default.createElement("img", {
12296
13022
  src: data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : _data$data5$.srcImage,
12297
- className: "w-full h-auto"
13023
+ className: "w-full h-full lg:h-auto object-cover rounded-2xl"
12298
13024
  }), /*#__PURE__*/React__default.createElement("div", {
12299
13025
  className: "mt-4 whitespace-pre-line"
12300
13026
  }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingFoodForm, {
12301
13027
  shopConfigStyle: shopConfigStyle,
12302
13028
  shopConfig: shopConfig,
12303
- className: "col-span-2"
13029
+ className: "md:col-span-2"
12304
13030
  })));
12305
13031
  };
12306
13032
 
@@ -12412,6 +13138,30 @@ var Banner3 = function Banner3(props) {
12412
13138
  }));
12413
13139
  };
12414
13140
 
13141
+ var Banner4 = function Banner4(props) {
13142
+ var _data$data, _data$data$, _data$data2, _data$data2$slice;
13143
+ var data = props.data,
13144
+ _props$Link = props.Link,
13145
+ Link = _props$Link === void 0 ? null : _props$Link;
13146
+ return /*#__PURE__*/React__default.createElement("div", {
13147
+ className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
13148
+ }, /*#__PURE__*/React__default.createElement("img", {
13149
+ src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.srcImage,
13150
+ className: "md:col-span-2 object-cover w-full h-full rounded-[10px]"
13151
+ }), /*#__PURE__*/React__default.createElement("div", {
13152
+ className: "flex flex-col gap-6"
13153
+ }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(1, 3)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
13154
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13155
+ Link: Link,
13156
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
13157
+ key: "djsd-" + index
13158
+ }, /*#__PURE__*/React__default.createElement("img", {
13159
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
13160
+ className: "object-cover w-full h-full rounded-xl"
13161
+ }));
13162
+ })));
13163
+ };
13164
+
12415
13165
  var Banner7 = function Banner7(props) {
12416
13166
  var _data$data;
12417
13167
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -12483,7 +13233,7 @@ var Partner1 = function Partner1(props) {
12483
13233
  data: data,
12484
13234
  shopConfigStyle: shopConfigStyle
12485
13235
  }), /*#__PURE__*/React__default.createElement("div", {
12486
- className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-6 rounded-xl",
13236
+ className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-4 md:p-6 rounded-xl",
12487
13237
  style: {
12488
13238
  background: bgSecondary
12489
13239
  }
@@ -13037,7 +13787,9 @@ var Footer7 = function Footer7(props) {
13037
13787
  style: {
13038
13788
  background: primary
13039
13789
  }
13040
- }))))), /*#__PURE__*/React__default.createElement("hr", null), /*#__PURE__*/React__default.createElement("div", {
13790
+ }))))), /*#__PURE__*/React__default.createElement("hr", {
13791
+ className: "mt-12"
13792
+ }), /*#__PURE__*/React__default.createElement("div", {
13041
13793
  className: "py-4"
13042
13794
  }, /*#__PURE__*/React__default.createElement("small", {
13043
13795
  className: "me-5"
@@ -13057,24 +13809,26 @@ var RatingStar = function RatingStar(props) {
13057
13809
  star = _props$star === void 0 ? 5 : _props$star,
13058
13810
  _props$style = props.style,
13059
13811
  style = _props$style === void 0 ? {} : _props$style,
13812
+ _props$color = props.color,
13813
+ color = _props$color === void 0 ? "#E2B93B" : _props$color,
13060
13814
  _props$className = props.className,
13061
13815
  className = _props$className === void 0 ? "" : _props$className;
13062
13816
  var res = [];
13063
13817
  for (var i = 1; i <= star; i++) {
13064
13818
  res.push(/*#__PURE__*/React__default.createElement(fa6.FaStar, {
13065
- color: "#E2B93B"
13819
+ color: color
13066
13820
  }));
13067
- if (i > 5) break;
13821
+ if (i >= 5) break;
13068
13822
  }
13069
13823
  var decimalPart = star % 1;
13070
13824
  if (decimalPart && decimalPart >= 0.5) {
13071
13825
  res.push(/*#__PURE__*/React__default.createElement(fa6.FaRegStarHalfStroke, {
13072
- color: "#E2B93B"
13826
+ color: color
13073
13827
  }));
13074
13828
  }
13075
13829
  for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
13076
13830
  res.push(/*#__PURE__*/React__default.createElement(fa6.FaRegStar, {
13077
- color: "#E2B93B"
13831
+ color: color
13078
13832
  }));
13079
13833
  }
13080
13834
  return /*#__PURE__*/React__default.createElement("div", {
@@ -13244,9 +13998,9 @@ var CustomerRating8 = function CustomerRating8(props) {
13244
13998
  src: item === null || item === void 0 ? void 0 : item.avatar,
13245
13999
  className: "w-40 h-40 rounded-full object-cover border-8 border-stroke"
13246
14000
  }), /*#__PURE__*/React__default.createElement("div", {
13247
- className: "text-xl text-primary"
14001
+ className: "text-xl text-primary text-center"
13248
14002
  }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
13249
- className: "text-gray3"
14003
+ className: "text-gray3 text-center"
13250
14004
  }, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
13251
14005
  className: "flex gap-2 "
13252
14006
  }, /*#__PURE__*/React__default.createElement(ri.RiDoubleQuotesL, {
@@ -13261,6 +14015,58 @@ var CustomerRating8 = function CustomerRating8(props) {
13261
14015
  }))));
13262
14016
  };
13263
14017
 
14018
+ var CustomerRating9 = function CustomerRating9(props) {
14019
+ var _data$data;
14020
+ var _props$shopConfigStyl = props.shopConfigStyle,
14021
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
14022
+ _props$data = props.data,
14023
+ data = _props$data === void 0 ? {} : _props$data,
14024
+ _props$SectionTitle = props.SectionTitle,
14025
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
14026
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
14027
+ className: SECTION_DEFAULT_CLASS
14028
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
14029
+ data: data,
14030
+ shopConfigStyle: shopConfigStyle
14031
+ }), /*#__PURE__*/React__default.createElement("div", {
14032
+ className: "mt-12 grid grid-cols-1 lg:grid-cols-3 gap-6"
14033
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
14034
+ return /*#__PURE__*/React__default.createElement("div", {
14035
+ key: index,
14036
+ className: "flex bg-primary pt-16 px-6 pb-6"
14037
+ }, /*#__PURE__*/React__default.createElement("div", {
14038
+ className: "bg-background relative"
14039
+ }, /*#__PURE__*/React__default.createElement("div", {
14040
+ className: "flex justify-between items-center pr-4 w-full absolute top-[-40px]"
14041
+ }, /*#__PURE__*/React__default.createElement("div", {
14042
+ className: "text-[#A85A09]"
14043
+ }, /*#__PURE__*/React__default.createElement("svg", {
14044
+ width: "39",
14045
+ height: "28",
14046
+ viewBox: "0 0 39 28",
14047
+ fill: "none",
14048
+ xmlns: "http://www.w3.org/2000/svg"
14049
+ }, /*#__PURE__*/React__default.createElement("path", {
14050
+ d: "M34.5852 25.8793C34.9242 26.5446 34.4409 27.3333 33.6942 27.3333H27.7867C27.4106 27.3333 27.0664 27.1223 26.8957 26.7873L21.7391 16.6666V3.66663C21.7391 2.00977 23.0822 0.666626 24.7391 0.666626H35.0435C36.7003 0.666626 38.0435 2.00977 38.0435 3.66663V16.6666H29.8913L34.5852 25.8793ZM12.8461 25.8793C13.185 26.5446 12.7017 27.3333 11.955 27.3333H6.0475C5.67146 27.3333 5.3272 27.1223 5.15649 26.7873L-0.000110626 16.6666V3.66663C-0.000110626 2.00977 1.34304 0.666626 2.99989 0.666626H13.3043C14.9611 0.666626 16.3043 2.00977 16.3043 3.66663V16.6666H8.15208L12.8461 25.8793Z",
14051
+ fill: "currentColor"
14052
+ }))), /*#__PURE__*/React__default.createElement("img", {
14053
+ src: item === null || item === void 0 ? void 0 : item.avatar,
14054
+ className: " w-20 object-cover h-20 rounded-full"
14055
+ })), /*#__PURE__*/React__default.createElement("div", {
14056
+ className: "p-4 flex flex-col gap-2"
14057
+ }, /*#__PURE__*/React__default.createElement("div", {
14058
+ className: "text-lg text-textHeading md:text-2xl"
14059
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
14060
+ className: "w-full border border-secondary"
14061
+ }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", {
14062
+ className: "ms-auto"
14063
+ }, /*#__PURE__*/React__default.createElement(RatingStar, {
14064
+ star: (item === null || item === void 0 ? void 0 : item.rate) || 5,
14065
+ color: "#A85A09"
14066
+ })))));
14067
+ }))));
14068
+ };
14069
+
13264
14070
  var CustomerRating10 = function CustomerRating10(props) {
13265
14071
  var _data$data;
13266
14072
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -13435,7 +14241,7 @@ var Gallery1 = function Gallery1(props) {
13435
14241
  }));
13436
14242
  };
13437
14243
 
13438
- var Gallery1$1 = function Gallery1(props) {
14244
+ var Gallery2 = function Gallery2(props) {
13439
14245
  var _data$data, _data$data$slice, _data$data2, _data$data2$slice, _data$data3, _data$data3$slice;
13440
14246
  var _props$shopConfigStyl = props.shopConfigStyle,
13441
14247
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -13474,6 +14280,30 @@ var Gallery1$1 = function Gallery1(props) {
13474
14280
  })))));
13475
14281
  };
13476
14282
 
14283
+ var Gallery3 = function Gallery3(props) {
14284
+ var _data$data;
14285
+ var _props$shopConfigStyl = props.shopConfigStyle,
14286
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
14287
+ _props$data = props.data,
14288
+ data = _props$data === void 0 ? {} : _props$data,
14289
+ _props$SectionTitle = props.SectionTitle,
14290
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
14291
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
14292
+ className: "" + SECTION_DEFAULT_CLASS
14293
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
14294
+ data: data,
14295
+ shopConfigStyle: shopConfigStyle
14296
+ }), /*#__PURE__*/React__default.createElement("div", {
14297
+ className: "grid grid-cols-3 gap-2 md:gap-6 mt-6 md:mt-12"
14298
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
14299
+ return /*#__PURE__*/React__default.createElement("img", {
14300
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
14301
+ key: "iggdf-" + index,
14302
+ className: (index === 1 || index === 5 ? "col-span-2" : "") + " w-full h-full object-cover"
14303
+ });
14304
+ }))));
14305
+ };
14306
+
13477
14307
  var PageTitle1 = function PageTitle1(props) {
13478
14308
  var _sectionData$;
13479
14309
  var data = props.data,
@@ -13504,13 +14334,13 @@ var PageTitle2 = function PageTitle2(props) {
13504
14334
  backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
13505
14335
  }
13506
14336
  }, /*#__PURE__*/React__default.createElement("div", {
13507
- className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
14337
+ className: "absolute top-0 w-full h-full bg-black/60 z-0"
13508
14338
  }), /*#__PURE__*/React__default.createElement("div", {
13509
- className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
14339
+ className: "relative w-full p-10 lg:p-20 z-10 flex flex-col gap-6 items-center justify-center"
13510
14340
  }, /*#__PURE__*/React__default.createElement("h2", {
13511
14341
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
13512
14342
  }, data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : route === null || route === void 0 ? void 0 : route.label), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
13513
- className: "text-lg md:text-2xl text-white"
14343
+ className: "text-lg md:text-2xl text-white text-center"
13514
14344
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null));
13515
14345
  };
13516
14346
 
@@ -13591,9 +14421,9 @@ var PageTitle3 = function PageTitle3(props) {
13591
14421
  backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
13592
14422
  }
13593
14423
  }, /*#__PURE__*/React__default.createElement("div", {
13594
- className: "absolute top-0 w-full h-full bg-black opacity-60 z-0"
14424
+ className: "absolute top-0 w-full h-full bg-black/60 z-0"
13595
14425
  }), /*#__PURE__*/React__default.createElement("div", {
13596
- className: "relative w-full p-20 z-10 flex flex-col items-center justify-center"
14426
+ className: "relative w-full pt-8 md:p-2 md:p-12 lg:p-20 z-10 flex flex-col items-center justify-center"
13597
14427
  }, /*#__PURE__*/React__default.createElement("h2", {
13598
14428
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
13599
14429
  }, route === null || route === void 0 ? void 0 : (_route$route = route.route) === null || _route$route === void 0 ? void 0 : (_route$route$split = _route$route.split("/")) === null || _route$route$split === void 0 ? void 0 : (_route$route$split$fi = _route$route$split.filter(function (e) {
@@ -14066,6 +14896,10 @@ var FormCheckout = React.forwardRef(function (props, ref) {
14066
14896
  })));
14067
14897
  });
14068
14898
 
14899
+ var dayjs_min = createCommonjsModule(function (module, exports) {
14900
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
14901
+ });
14902
+
14069
14903
  var OrderControllerWithoutLogin = function OrderControllerWithoutLogin(props) {
14070
14904
  _objectDestructuringEmpty(props);
14071
14905
  var draftOrderWithoutLogin = function draftOrderWithoutLogin(shopId, dataOrder) {
@@ -14735,7 +15569,7 @@ var SearchBar6 = function SearchBar6(props) {
14735
15569
  }
14736
15570
  };
14737
15571
  return /*#__PURE__*/React__default.createElement("div", {
14738
- className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center h-40 lg:h-52 ",
15572
+ className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center py-6 md:py-12 lg:px-20",
14739
15573
  style: {
14740
15574
  background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
14741
15575
  backgroundPosition: "center",
@@ -14948,7 +15782,7 @@ var ShopHighlights8 = function ShopHighlights8(props) {
14948
15782
  className: "flex flex-col h-full gap-3"
14949
15783
  }, /*#__PURE__*/React__default.createElement("img", {
14950
15784
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14951
- className: "object-cover"
15785
+ className: "object-cover rounded-lg"
14952
15786
  }), /*#__PURE__*/React__default.createElement("div", {
14953
15787
  className: "text-2xl text-textBody"
14954
15788
  }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
@@ -14957,6 +15791,89 @@ var ShopHighlights8 = function ShopHighlights8(props) {
14957
15791
  })));
14958
15792
  };
14959
15793
 
15794
+ var ShopHighlights9 = function ShopHighlights9(props) {
15795
+ var data = props.data,
15796
+ _props$Link = props.Link,
15797
+ Link = _props$Link === void 0 ? null : _props$Link,
15798
+ _props$SectionTitle = props.SectionTitle,
15799
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
15800
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
15801
+ return /*#__PURE__*/React__default.createElement("div", {
15802
+ className: SECTION_CLASS + " flex flex-col gap-6 md:gap-10"
15803
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
15804
+ data: data
15805
+ }), /*#__PURE__*/React__default.createElement("div", {
15806
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-x-12 lg:gap-y-6"
15807
+ }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
15808
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
15809
+ Link: Link,
15810
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
15811
+ key: "kdf-" + index
15812
+ }, /*#__PURE__*/React__default.createElement("div", {
15813
+ className: "flex flex-col md:flex-row h-full gap-4"
15814
+ }, /*#__PURE__*/React__default.createElement("img", {
15815
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
15816
+ className: "object-cover rounded-lg w-full md:min-w-60 md:max-w-60"
15817
+ }), /*#__PURE__*/React__default.createElement("div", {
15818
+ className: "flex flex-col gap-2"
15819
+ }, /*#__PURE__*/React__default.createElement("div", {
15820
+ className: "text-lg font-semibold text-textHeading"
15821
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
15822
+ className: "w-1/3 border border-stroke"
15823
+ }), /*#__PURE__*/React__default.createElement("div", {
15824
+ className: "flex-grow text-textBody leading-relaxed"
15825
+ }, item === null || item === void 0 ? void 0 : item.description))));
15826
+ })));
15827
+ };
15828
+
15829
+ var ShopHighlights10 = function ShopHighlights10(props) {
15830
+ var data = props.data,
15831
+ _props$Link = props.Link,
15832
+ Link = _props$Link === void 0 ? null : _props$Link;
15833
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
15834
+ return /*#__PURE__*/React__default.createElement("div", {
15835
+ className: "pt-10"
15836
+ }, /*#__PURE__*/React__default.createElement("div", {
15837
+ className: "relative overflow-hidden w-full"
15838
+ }, /*#__PURE__*/React__default.createElement("svg", {
15839
+ viewBox: "0 0 1440 105",
15840
+ className: "text-[#FFE7CC] w-[105%]",
15841
+ fill: "none",
15842
+ xmlns: "http://www.w3.org/2000/svg"
15843
+ }, /*#__PURE__*/React__default.createElement("path", {
15844
+ d: "M439.5 55.3739C216.5 71.3734 77 37.8735 0 0.747667V104.606H1440C1410.56 83.7584 1313.93 35.6959 1162.92 10.2239C974.151 -21.6161 726.714 34.7672 439.5 55.3739Z",
15845
+ fill: "currentColor"
15846
+ })), /*#__PURE__*/React__default.createElement("div", {
15847
+ className: "text-primary w-[105%] absolute top-2"
15848
+ }, /*#__PURE__*/React__default.createElement("svg", {
15849
+ viewBox: "0 0 1440 104",
15850
+ fill: "none",
15851
+ xmlns: "http://www.w3.org/2000/svg"
15852
+ }, /*#__PURE__*/React__default.createElement("path", {
15853
+ d: "M439.5 54.6864C216.5 70.6859 77 37.186 0 0.0601582V103.918H1440C1410.56 83.0709 1313.93 35.0084 1162.92 9.53638C974.151 -22.3036 726.714 34.0797 439.5 54.6864Z",
15854
+ fill: "currentColor"
15855
+ })))), /*#__PURE__*/React__default.createElement("div", {
15856
+ className: SECTION_CLASS + " mt-0 md:mt-0 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-4 bg-primary py-10"
15857
+ }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
15858
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
15859
+ Link: Link,
15860
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
15861
+ key: "kdf-" + index
15862
+ }, /*#__PURE__*/React__default.createElement("div", {
15863
+ className: "flex flex-col h-full gap-6"
15864
+ }, /*#__PURE__*/React__default.createElement("div", {
15865
+ className: "flex flex-col gap-3 items-center"
15866
+ }, /*#__PURE__*/React__default.createElement("div", {
15867
+ className: "text-2xl text-center text-textButton"
15868
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
15869
+ className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
15870
+ }, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
15871
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
15872
+ className: "h-56 lg:h-72 object-cover mt-auto border-4 border-secondary"
15873
+ })));
15874
+ })));
15875
+ };
15876
+
14960
15877
  var VideoFull1 = function VideoFull1(props) {
14961
15878
  var _data$data, _data$data$;
14962
15879
  var shopConfigStyle = props.shopConfigStyle,
@@ -15565,6 +16482,7 @@ exports.Address1 = Address1;
15565
16482
  exports.Banner1 = Banner1;
15566
16483
  exports.Banner2 = Banner2;
15567
16484
  exports.Banner3 = Banner3;
16485
+ exports.Banner4 = Banner4;
15568
16486
  exports.Banner7 = Banner7;
15569
16487
  exports.BannerFull1 = BannerFull1;
15570
16488
  exports.BannerFull2 = BannerFull2;
@@ -15580,6 +16498,7 @@ exports.CustomerRating10 = CustomerRating10;
15580
16498
  exports.CustomerRating5 = CustomerRating5;
15581
16499
  exports.CustomerRating6 = CustomerRating6;
15582
16500
  exports.CustomerRating8 = CustomerRating8;
16501
+ exports.CustomerRating9 = CustomerRating9;
15583
16502
  exports.DateTimePicker = DateTimePicker;
15584
16503
  exports.Employees1 = Employees1;
15585
16504
  exports.Features2 = Features2;
@@ -15587,12 +16506,16 @@ exports.Features3 = Features3;
15587
16506
  exports.Footer1 = Footer1;
15588
16507
  exports.Footer7 = Footer7;
15589
16508
  exports.Gallery1 = Gallery1;
15590
- exports.Gallery2 = Gallery1$1;
16509
+ exports.Gallery2 = Gallery2;
16510
+ exports.Gallery3 = Gallery3;
15591
16511
  exports.Hero1 = Hero1;
15592
16512
  exports.Hero10 = Hero10;
15593
16513
  exports.Hero11 = Hero11;
15594
16514
  exports.Hero12 = Hero12;
15595
16515
  exports.Hero13 = Hero13;
16516
+ exports.Hero14 = Hero14;
16517
+ exports.Hero15 = Hero15;
16518
+ exports.Hero16 = Hero16;
15596
16519
  exports.Hero2 = Hero2;
15597
16520
  exports.Hero5 = Hero5;
15598
16521
  exports.Hero6 = Hero6;
@@ -15616,6 +16539,8 @@ exports.ProductHighlight1 = ProductHighlight1;
15616
16539
  exports.ProductHot1 = ProductHot1;
15617
16540
  exports.ProductHot3 = ProductHot3;
15618
16541
  exports.ProductImage = ProductImage;
16542
+ exports.ProductItem10 = ProductItem10;
16543
+ exports.ProductItem11 = ProductItem11;
15619
16544
  exports.ProductItem2 = ProductItem2;
15620
16545
  exports.ProductItem3 = ProductItem3;
15621
16546
  exports.ProductItem4 = ProductItem4;
@@ -15623,6 +16548,7 @@ exports.ProductItem5 = ProductItem5;
15623
16548
  exports.ProductItem6 = ProductItem6;
15624
16549
  exports.ProductItem7 = ProductItem7;
15625
16550
  exports.ProductItem8 = ProductItem8;
16551
+ exports.ProductItem9 = ProductItem9;
15626
16552
  exports.ProductList5 = ProductList5;
15627
16553
  exports.ProductList7 = ProductList7;
15628
16554
  exports.ProductSale2 = ProductSale2;
@@ -15630,6 +16556,7 @@ exports.ProductSearch1 = ProductSearch1;
15630
16556
  exports.Products10 = Products10;
15631
16557
  exports.Products11 = Products11;
15632
16558
  exports.Products12 = Products12;
16559
+ exports.Products14 = Products14;
15633
16560
  exports.Products2 = Products2;
15634
16561
  exports.Products3 = Products3;
15635
16562
  exports.Products9 = Products9;
@@ -15642,13 +16569,16 @@ exports.SectionTitle1 = SectionTitle1;
15642
16569
  exports.SectionTitle2 = SectionTitle2;
15643
16570
  exports.SectionTitle3 = SectionTitle3;
15644
16571
  exports.SectionTitle4 = SectionTitle4;
16572
+ exports.SectionTitle5 = SectionTitle5;
15645
16573
  exports.Select = Select$1;
15646
16574
  exports.ServiceDetail1 = ServiceDetail1;
16575
+ exports.ShopHighlights10 = ShopHighlights10;
15647
16576
  exports.ShopHighlights2 = ShopHighlights2;
15648
16577
  exports.ShopHighlights5 = ShopHighlights5;
15649
16578
  exports.ShopHighlights6 = ShopHighlights6;
15650
16579
  exports.ShopHighlights7 = ShopHighlights7;
15651
16580
  exports.ShopHighlights8 = ShopHighlights8;
16581
+ exports.ShopHighlights9 = ShopHighlights9;
15652
16582
  exports.TextArea = TextArea;
15653
16583
  exports.TreatmentDetail1 = TreatmentDetail1;
15654
16584
  exports.TreatmentItem1 = TreatmentItem1;