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

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.
@@ -19,7 +19,7 @@ import 'slick-carousel/slick/slick-theme.css';
19
19
  import { BsCurrencyDollar } from 'react-icons/bs';
20
20
  import { GoCreditCard, GoClock } from 'react-icons/go';
21
21
  import { GrPowerCycle } from 'react-icons/gr';
22
- import { RiMessengerFill, RiDoubleQuotesL, RiDeleteBin7Line } from 'react-icons/ri';
22
+ import { RiMessengerFill, RiDoubleQuotesL, RiDoubleQuotesR, RiDeleteBin7Line } from 'react-icons/ri';
23
23
  import { HiOutlineLocationMarker, HiOutlineArrowNarrowLeft, HiOutlineArrowNarrowRight } from 'react-icons/hi';
24
24
  import { GiNewspaper } from 'react-icons/gi';
25
25
 
@@ -112,33 +112,34 @@ var getDurationValue = function getDurationValue(attributes) {
112
112
  return durationAtt ? ((durationAtt === null || durationAtt === void 0 ? void 0 : (_durationAtt$value = durationAtt.value) === null || _durationAtt$value === void 0 ? void 0 : _durationAtt$value[0]) || "0") + " p" : "";
113
113
  };
114
114
  var genProductSlugVi = function genProductSlugVi(productName, id) {
115
- var _productName$replace;
116
- return (productName === null || productName === void 0 ? void 0 : (_productName$replace = productName.replace(/\s+/g, "-")) === null || _productName$replace === void 0 ? void 0 : _productName$replace.replace(/\//g, "~")) + "-" + id;
115
+ var _productName$replace, _productName$replace$, _productName$replace$2, _productName$replace$3, _productName$replace$4;
116
+ var slug = productName === null || productName === void 0 ? void 0 : (_productName$replace = productName.replace(/%/g, 'pct')) === null || _productName$replace === void 0 ? void 0 : (_productName$replace$ = _productName$replace.replace(/\//g, 'fs')) === null || _productName$replace$ === void 0 ? void 0 : (_productName$replace$2 = _productName$replace$.replace(/&/g, 'amp')) === null || _productName$replace$2 === void 0 ? void 0 : (_productName$replace$3 = _productName$replace$2.replace(/-/g, 'hyp')) === null || _productName$replace$3 === void 0 ? void 0 : (_productName$replace$4 = _productName$replace$3.replace(/\s+/g, '-')) === null || _productName$replace$4 === void 0 ? void 0 : _productName$replace$4.replace(/(?:[\0-!#%-'\*\+\/<-\?\\\^`\{\}\x7F-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C8B-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CE\uA7CF\uA7D2\uA7D4\uA7DD-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDBF\uDDF4-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDD49\uDD66-\uDD6E\uDD86-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEC1\uDEC5-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDF7F\uDF8A\uDF8C\uDF8D\uDF8F\uDFB6\uDFB8-\uDFD0\uDFD2\uDFD4-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFBF\uDFE1-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD812-\uD817\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDC5F]|\uD810[\uDFFB-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD818[\uDC00-\uDCFF\uDD1E-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDD3F\uDD6D-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFE\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDDCF\uDDEE\uDDEF\uDDF1-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, '');
117
+ return slug + "-" + id;
117
118
  };
118
119
  var getLinkProductDetail = function getLinkProductDetail(product) {
119
120
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
120
- return "/san-pham/" + slug;
121
+ return "/san-pham/" + encodeURIComponent(slug);
121
122
  };
122
123
  var getLinkServiceDetail = function getLinkServiceDetail(product) {
123
124
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
124
- return "/dich-vu/" + slug;
125
+ return "/dich-vu/" + encodeURIComponent(slug);
125
126
  };
126
127
  var getLinkNewsDetail = function getLinkNewsDetail(news) {
127
128
  var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
128
129
  var category = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
129
- return "/tin-tuc/" + category + "/" + slug;
130
+ return "/tin-tuc/" + encodeURIComponent(category) + "/" + encodeURIComponent(slug);
130
131
  };
131
132
  var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
132
133
  var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
133
- return "/tin-tuc-theo-danh-muc/" + slug;
134
+ return "/tin-tuc-theo-danh-muc/" + encodeURIComponent(slug);
134
135
  };
135
136
  var getLinkProductsByCategory = function getLinkProductsByCategory(product) {
136
137
  if (product !== null && product !== void 0 && product.categoryName) {
137
138
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.categoryName, product === null || product === void 0 ? void 0 : product.categoryId);
138
- return "/danh-muc/" + slug;
139
+ return "/danh-muc/" + encodeURIComponent(slug);
139
140
  } else {
140
141
  var _slug12 = genProductSlugVi(product === null || product === void 0 ? void 0 : product.cateName, product === null || product === void 0 ? void 0 : product.categoryId);
141
- return "/danh-muc/" + _slug12;
142
+ return "/danh-muc/" + encodeURIComponent(_slug12);
142
143
  }
143
144
  };
144
145
  var LinkToPage = function LinkToPage(props) {
@@ -152,7 +153,7 @@ var genLinkSearch = function genLinkSearch(keyword) {
152
153
  };
153
154
  var configSvg = function configSvg(data) {
154
155
  var _data$replace, _data$replace$replace;
155
- return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width="[^"]*"/, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height="[^"]*"/, '');
156
+ return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width=['"][^'"]*['"]/g, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height=['"][^'"]*['"]/g, '');
156
157
  };
157
158
  var urlMappings = {
158
159
  "/products": "/san-pham",
@@ -433,7 +434,7 @@ var NavBar7 = function NavBar7(props) {
433
434
  href: "/",
434
435
  className: "flex items-center gap-2"
435
436
  }, /*#__PURE__*/React__default.createElement("img", {
436
- className: "object-cover w-12 max-h-12",
437
+ className: "object-contain w-12 h-12",
437
438
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
438
439
  }), /*#__PURE__*/React__default.createElement("h3", {
439
440
  className: "text-xl md:text-2xl text-primary font-headingFont text-wrap line-clamp-2 leading-tight"
@@ -496,7 +497,7 @@ var NavBar7 = function NavBar7(props) {
496
497
  href: "/",
497
498
  className: "flex flex-1 gap-2 items-center"
498
499
  }, /*#__PURE__*/React__default.createElement("img", {
499
- className: "object-cover w-12 max-h-12",
500
+ className: "object-contain w-12 h-12",
500
501
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
501
502
  }), /*#__PURE__*/React__default.createElement("h3", {
502
503
  className: "text-xl md:text-2xl font-headingFont text-wrap text-primary line-clamp-2"
@@ -530,7 +531,7 @@ var NavBar7 = function NavBar7(props) {
530
531
  className: "flex gap-2 items-center mb-2"
531
532
  }, /*#__PURE__*/React__default.createElement("img", {
532
533
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
533
- className: "max-h-14 w-14 object-cover"
534
+ className: "h-14 w-14 object-contain"
534
535
  }), /*#__PURE__*/React__default.createElement("h3", {
535
536
  className: "text-xl font-headingFont text-primary line-clamp-1"
536
537
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
@@ -726,7 +727,7 @@ var NavBar1 = function NavBar1(props) {
726
727
  href: "/",
727
728
  className: "flex items-center gap-2"
728
729
  }, /*#__PURE__*/React__default.createElement("img", {
729
- className: "object-cover w-12 max-h-12",
730
+ className: "object-contain w-12 h-12",
730
731
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
731
732
  alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
732
733
  }), /*#__PURE__*/React__default.createElement("h3", {
@@ -788,7 +789,7 @@ var NavBar1 = function NavBar1(props) {
788
789
  href: "/",
789
790
  className: "flex flex-1 gap-2 items-center"
790
791
  }, /*#__PURE__*/React__default.createElement("img", {
791
- className: "object-cover w-12 max-h-12",
792
+ className: "object-contain w-12 h-12",
792
793
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
793
794
  alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
794
795
  }), /*#__PURE__*/React__default.createElement("h3", {
@@ -823,7 +824,7 @@ var NavBar1 = function NavBar1(props) {
823
824
  className: "flex gap-2 items-center mb-2"
824
825
  }, /*#__PURE__*/React__default.createElement("img", {
825
826
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
826
- className: "max-h-14 w-14 bg-cover bg-no-repeat"
827
+ className: "h-14 w-14 object-contain"
827
828
  }), /*#__PURE__*/React__default.createElement("div", {
828
829
  className: "text-xl font-headingFont text-primary line-clamp-1"
829
830
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
@@ -1233,7 +1234,7 @@ var Hero2 = function Hero2(props) {
1233
1234
  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"
1234
1235
  }, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
1235
1236
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
1236
- 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"
1237
+ className: "h-6 w-6 object-contain sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
1237
1238
  }) : null, /*#__PURE__*/React__default.createElement("div", {
1238
1239
  className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
1239
1240
  style: {
@@ -1259,7 +1260,7 @@ var Hero5 = function Hero5(props) {
1259
1260
  }), /*#__PURE__*/React__default.createElement("div", {
1260
1261
  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"
1261
1262
  }, /*#__PURE__*/React__default.createElement("div", {
1262
- 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",
1263
+ className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2",
1263
1264
  style: {
1264
1265
  lineHeight: 1.5
1265
1266
  }
@@ -1282,14 +1283,14 @@ var Hero6 = function Hero6(props) {
1282
1283
  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,
1283
1284
  className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
1284
1285
  }), /*#__PURE__*/React__default.createElement("div", {
1285
- 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 "
1286
+ className: "absolute w-full md:w-2/3 mx-auto inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10"
1286
1287
  }, 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", {
1287
1288
  className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
1288
1289
  style: {
1289
1290
  lineHeight: "2"
1290
1291
  }
1291
1292
  }, 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", {
1292
- className: "flex flex-col gap-2 md:gap-4 lg:gap-6 "
1293
+ className: "flex flex-col gap-4 lg:gap-6 "
1293
1294
  }, 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", {
1294
1295
  className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
1295
1296
  style: {
@@ -7638,20 +7639,17 @@ var CategoryController = function CategoryController(props) {
7638
7639
 
7639
7640
  var Hero13 = function Hero13(props) {
7640
7641
  var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
7641
- var listRef = useRef(null);
7642
- var _useState = useState(false);
7643
7642
  var shopConfig = props.shopConfig,
7644
7643
  data = props.data;
7645
7644
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7646
- var _CategoryController = CategoryController(props);
7647
7645
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
7648
7646
  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],
7649
7647
  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,
7650
7648
  className: "w-full object-cover"
7651
7649
  }), /*#__PURE__*/React__default.createElement("div", {
7652
7650
  className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
7653
- }, /*#__PURE__*/React__default.createElement("a", {
7654
- href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
7651
+ }, (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) && /*#__PURE__*/React__default.createElement("a", {
7652
+ href: "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone)
7655
7653
  }, /*#__PURE__*/React__default.createElement("div", {
7656
7654
  className: "relative w-max"
7657
7655
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7660,9 +7658,9 @@ var Hero13 = function Hero13(props) {
7660
7658
  className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7661
7659
  }, /*#__PURE__*/React__default.createElement(AiOutlinePhone, {
7662
7660
  size: 36
7663
- })))), /*#__PURE__*/React__default.createElement("a", {
7661
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) && /*#__PURE__*/React__default.createElement("a", {
7664
7662
  href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
7665
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
7663
+ target: "_blank"
7666
7664
  }, /*#__PURE__*/React__default.createElement("div", {
7667
7665
  className: "relative w-max"
7668
7666
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7671,9 +7669,9 @@ var Hero13 = function Hero13(props) {
7671
7669
  className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7672
7670
  }, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
7673
7671
  size: 32
7674
- })))), /*#__PURE__*/React__default.createElement("a", {
7675
- href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
7676
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
7672
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) && /*#__PURE__*/React__default.createElement("a", {
7673
+ href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
7674
+ target: "_blank"
7677
7675
  }, /*#__PURE__*/React__default.createElement("div", {
7678
7676
  className: "relative w-max"
7679
7677
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7723,7 +7721,9 @@ var Hero15 = function Hero15(props) {
7723
7721
  var _props$data = props.data,
7724
7722
  data = _props$data === void 0 ? {} : _props$data,
7725
7723
  _props$shopConfigStyl = props.shopConfigStyle,
7726
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
7724
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7725
+ _props$Link = props.Link,
7726
+ Link = _props$Link === void 0 ? null : _props$Link;
7727
7727
  return /*#__PURE__*/React__default.createElement("div", {
7728
7728
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
7729
7729
  }, /*#__PURE__*/React__default.createElement("img", {
@@ -7738,7 +7738,8 @@ var Hero15 = function Hero15(props) {
7738
7738
  }, 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", {
7739
7739
  className: "w-1/3"
7740
7740
  }), (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, {
7741
- 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) || "#"
7741
+ Link: Link,
7742
+ href: convertURL(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) || "#"
7742
7743
  }, /*#__PURE__*/React__default.createElement(Button, {
7743
7744
  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,
7744
7745
  shopConfigStyle: shopConfigStyle,
@@ -7750,7 +7751,7 @@ var Hero15 = function Hero15(props) {
7750
7751
  };
7751
7752
 
7752
7753
  var Hero16 = function Hero16(props) {
7753
- var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$srcImage;
7754
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$srcImage;
7754
7755
  var _props$data = props.data,
7755
7756
  data = _props$data === void 0 ? {} : _props$data,
7756
7757
  _props$shopConfigStyl = props.shopConfigStyle,
@@ -7771,19 +7772,19 @@ var Hero16 = function Hero16(props) {
7771
7772
  className: "min-h-[480px] w-full h-full relative"
7772
7773
  }, /*#__PURE__*/React__default.createElement("img", {
7773
7774
  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],
7774
- className: "object-cover max-w-full h-auto"
7775
+ className: "object-cover w-full h-full min-h-[480px]"
7775
7776
  }), /*#__PURE__*/React__default.createElement("div", {
7776
7777
  className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
7777
7778
  }), /*#__PURE__*/React__default.createElement("div", {
7778
- 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"
7779
+ className: "w-full sm:w-2/3 absolute z-20 top-[15%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
7779
7780
  }, /*#__PURE__*/React__default.createElement("h2", {
7780
7781
  className: "font-medium text-2xl lg:text-4xl"
7781
- }, "Thu\u1ED1c t\u1ED1t, gi\xE1 t\u1ED1t - V\xEC s\u1EE9c kh\u1ECFe c\u1EE7a b\u1EA1n"), /*#__PURE__*/React__default.createElement("div", {
7782
+ }, 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), /*#__PURE__*/React__default.createElement("div", {
7782
7783
  className: " text-lg lg:text-2xl"
7783
- }, "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", {
7784
- className: "flex flex-col md:flex-row gap-4 w-full"
7784
+ }, 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("div", {
7785
+ className: "flex flex-col sm:flex-row gap-4 w-full"
7785
7786
  }, /*#__PURE__*/React__default.createElement(Input, {
7786
- wrapClassName: "w-full md:w-2/3 xl:w-[85%]",
7787
+ wrapClassName: "w-2/3 sm:w-[80%] xl:w-[85%]",
7787
7788
  icons: /*#__PURE__*/React__default.createElement(LuSearch, {
7788
7789
  className: "text-gray3",
7789
7790
  size: 18
@@ -7816,32 +7817,37 @@ var Hero16 = function Hero16(props) {
7816
7817
  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",
7817
7818
  fill: "currentColor"
7818
7819
  }))), /*#__PURE__*/React__default.createElement("img", {
7819
- 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],
7820
- className: "object-cover w-[28%] h-auto absolute right-10 opacity-100 bottom-0 z-10"
7820
+ src: 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$$srcImage = _data$data4$.srcImages) === null || _data$data4$$srcImage === void 0 ? void 0 : _data$data4$$srcImage[1],
7821
+ className: "object-cover w-[25%] h-auto max-h-full absolute right-10 opacity-100 bottom-0 z-10"
7821
7822
  }));
7822
7823
  };
7823
7824
 
7824
7825
  var Features2 = function Features2(props) {
7825
- var data = props.data;
7826
+ var data = props.data,
7827
+ _props$Link = props.Link,
7828
+ Link = _props$Link === void 0 ? null : _props$Link;
7826
7829
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7827
7830
  return /*#__PURE__*/React__default.createElement("div", {
7828
7831
  className: "" + SECTION_DEFAULT_CLASS
7829
7832
  }, /*#__PURE__*/React__default.createElement("div", {
7830
7833
  className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
7831
7834
  }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7832
- return /*#__PURE__*/React__default.createElement("div", {
7835
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
7836
+ Link: Link,
7837
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
7838
+ }, /*#__PURE__*/React__default.createElement("div", {
7833
7839
  className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
7834
7840
  key: "dfgg-" + index
7835
7841
  }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7836
- className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
7842
+ className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 aspect-square",
7837
7843
  dangerouslySetInnerHTML: {
7838
7844
  __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7839
7845
  }
7840
7846
  }) : /*#__PURE__*/React__default.createElement("img", {
7841
7847
  src: item === null || item === void 0 ? void 0 : item.srcImage,
7842
- className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
7848
+ className: "w-12 md:w-16 lg:w-20 object-contain xl:w-24 aspect-square text-primary",
7843
7849
  alt: "logo"
7844
- }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
7850
+ }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title)));
7845
7851
  })));
7846
7852
  };
7847
7853
 
@@ -7933,11 +7939,6 @@ var ProductController = function ProductController(props) {
7933
7939
  var _res$data2, _res$data3;
7934
7940
  setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
7935
7941
  setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
7936
- var url = new URL(window.location.href);
7937
- if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
7938
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
7939
- window.history.replaceState({}, '', url.pathname + url.search);
7940
- }
7941
7942
  }
7942
7943
  setLoading(false);
7943
7944
  });
@@ -8500,6 +8501,8 @@ var ModalNotification = function ModalNotification(props) {
8500
8501
  onCloseFormBooking = props.onCloseFormBooking,
8501
8502
  _props$isButtonClose = props.isButtonClose,
8502
8503
  isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose,
8504
+ _props$isMaskClose = props.isMaskClose,
8505
+ isMaskClose = _props$isMaskClose === void 0 ? false : _props$isMaskClose,
8503
8506
  _props$className = props.className,
8504
8507
  className = _props$className === void 0 ? "" : _props$className,
8505
8508
  _props$style = props.style,
@@ -8514,6 +8517,9 @@ var ModalNotification = function ModalNotification(props) {
8514
8517
  }, []);
8515
8518
  var handleClickOutside = function handleClickOutside(event) {
8516
8519
  event.stopPropagation();
8520
+ if (isMaskClose) {
8521
+ return;
8522
+ }
8517
8523
  if (onClose) {
8518
8524
  onClose === null || onClose === void 0 ? void 0 : onClose();
8519
8525
  }
@@ -9160,6 +9166,8 @@ var Select$2 = forwardRef(function (props, ref) {
9160
9166
  selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
9161
9167
  _props$disabled = props.disabled,
9162
9168
  disabled = _props$disabled === void 0 ? false : _props$disabled,
9169
+ _props$loading = props.loading,
9170
+ loading = _props$loading === void 0 ? false : _props$loading,
9163
9171
  _props$rules = props.rules,
9164
9172
  rules = _props$rules === void 0 ? [] : _props$rules,
9165
9173
  options = props.options,
@@ -9203,6 +9211,7 @@ var Select$2 = forwardRef(function (props, ref) {
9203
9211
  nextTrigger = _useState7[0],
9204
9212
  setNextTrigger = _useState7[1];
9205
9213
  var optionRef = useRef(null);
9214
+ var triggeredRef = useRef(false);
9206
9215
  useEffect(function () {
9207
9216
  if (isMulti) setValue(defaultValue);
9208
9217
  }, [defaultValue]);
@@ -9211,34 +9220,33 @@ var Select$2 = forwardRef(function (props, ref) {
9211
9220
  if (!isMulti) setValue(defaultValue);
9212
9221
  }, [options]);
9213
9222
  useEffect(function () {
9223
+ var _optionRef$current;
9214
9224
  if (typeof setParams !== 'function') return;
9215
- var handleScroll = function handleScroll() {
9216
- if (!optionRef.current) return;
9217
- var children = optionRef.current.querySelectorAll('div.option');
9218
- var parentRect = optionRef.current.getBoundingClientRect();
9219
- children.forEach(function (child, index) {
9220
- var rect = child.getBoundingClientRect();
9221
- if (rect.top >= parentRect.top && rect.bottom <= parentRect.bottom) {
9222
- if (index === nextTrigger) {
9223
- setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
9224
- return _extends({}, prev, {
9225
- size: (prev === null || prev === void 0 ? void 0 : prev.size) + 8
9226
- });
9227
- });
9228
- setNextTrigger(function (prev) {
9229
- return prev + 8;
9230
- });
9231
- }
9232
- }
9233
- });
9234
- };
9235
- if (optionRef.current) {
9236
- optionRef.current.addEventListener('scroll', handleScroll);
9237
- }
9238
- return function () {
9239
- if (optionRef.current) {
9240
- optionRef.current.removeEventListener('scroll', handleScroll);
9225
+ triggeredRef.current = false;
9226
+ var options = (_optionRef$current = optionRef.current) === null || _optionRef$current === void 0 ? void 0 : _optionRef$current.querySelectorAll('div.option');
9227
+ if (!options || options.length === 0) return;
9228
+ var targetElement = options[nextTrigger];
9229
+ if (!targetElement) return;
9230
+ var observer = new IntersectionObserver(function (_ref) {
9231
+ var entry = _ref[0];
9232
+ if (entry.isIntersecting && !triggeredRef.current) {
9233
+ triggeredRef.current = true;
9234
+ setParams(function (prev) {
9235
+ return _extends({}, prev, {
9236
+ size: prev.size + 8
9237
+ });
9238
+ });
9239
+ setNextTrigger(function (prev) {
9240
+ return prev + 8;
9241
+ });
9241
9242
  }
9243
+ }, {
9244
+ root: optionRef.current,
9245
+ threshold: 1.0
9246
+ });
9247
+ observer.observe(targetElement);
9248
+ return function () {
9249
+ observer.disconnect();
9242
9250
  };
9243
9251
  }, [listOptions, nextTrigger]);
9244
9252
  useEffect(function () {
@@ -9430,7 +9438,7 @@ var Select$2 = forwardRef(function (props, ref) {
9430
9438
  })) : null, /*#__PURE__*/React__default.createElement("div", {
9431
9439
  className: "overflow-y-auto max-h-72 scroll-container",
9432
9440
  ref: optionRef
9433
- }, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
9441
+ }, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? /*#__PURE__*/React__default.createElement("div", null, listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
9434
9442
  return /*#__PURE__*/React__default.createElement("div", {
9435
9443
  key: "gjfd-" + index,
9436
9444
  className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
@@ -9442,7 +9450,9 @@ var Select$2 = forwardRef(function (props, ref) {
9442
9450
  }), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
9443
9451
  className: " whitespace-nowrap line-clamp-1"
9444
9452
  }, item === null || item === void 0 ? void 0 : item.label));
9445
- }) : /*#__PURE__*/React__default.createElement("div", {
9453
+ }), loading ? /*#__PURE__*/React__default.createElement("div", {
9454
+ className: "flex justify-center py-4"
9455
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : null) : /*#__PURE__*/React__default.createElement("div", {
9446
9456
  className: "py-6 text-center"
9447
9457
  }, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
9448
9458
  className: "text-danger"
@@ -9496,7 +9506,8 @@ var BookingForm = function BookingForm(props) {
9496
9506
  var _ProductController = ProductController(_extends({}, props, {
9497
9507
  params: productsParams
9498
9508
  })),
9499
- products = _ProductController.products;
9509
+ products = _ProductController.products,
9510
+ loading = _ProductController.loading;
9500
9511
  var _BookingController = BookingController(props),
9501
9512
  _BookingController$cr = _BookingController.createSchedule,
9502
9513
  createSchedule = _BookingController$cr === void 0 ? function () {} : _BookingController$cr;
@@ -9681,6 +9692,7 @@ var BookingForm = function BookingForm(props) {
9681
9692
  setParams: setProductsParams,
9682
9693
  ref: inputSelectedRef,
9683
9694
  isMulti: true,
9695
+ loading: loading,
9684
9696
  defaultValue: listProductSelected,
9685
9697
  onClick: handleSelectedProduct,
9686
9698
  handleSearchOption: handleSearchProducts,
@@ -10057,13 +10069,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
10057
10069
  product: product,
10058
10070
  className: "w-full aspect-square !object-contain rounded-2xl"
10059
10071
  })), /*#__PURE__*/React__default.createElement("div", {
10060
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10072
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
10061
10073
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10062
10074
  return /*#__PURE__*/React__default.createElement("img", {
10063
10075
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10064
10076
  key: item === null || item === void 0 ? void 0 : item.imageId,
10065
10077
  alt: "",
10066
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10078
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10067
10079
  onClick: function onClick() {
10068
10080
  handleDisplayImage(item);
10069
10081
  }
@@ -10184,7 +10196,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10184
10196
  }, /*#__PURE__*/React__default.createElement("div", {
10185
10197
  className: "flex flex-col gap-4 col-span-2"
10186
10198
  }, /*#__PURE__*/React__default.createElement("div", {
10187
- className: "rounded-2xl p-2 bg-background border"
10199
+ className: "rounded-2xl bg-background border"
10188
10200
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
10189
10201
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
10190
10202
  className: "w-full aspect-square object-contain rounded-2xl"
@@ -10192,13 +10204,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10192
10204
  product: product,
10193
10205
  className: "w-full aspect-square !object-contain rounded-2xl"
10194
10206
  })), /*#__PURE__*/React__default.createElement("div", {
10195
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10207
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
10196
10208
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10197
10209
  return /*#__PURE__*/React__default.createElement("img", {
10198
10210
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10199
10211
  key: item === null || item === void 0 ? void 0 : item.imageId,
10200
10212
  alt: "",
10201
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10213
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10202
10214
  onClick: function onClick() {
10203
10215
  handleDisplayImage(item);
10204
10216
  }
@@ -10320,7 +10332,7 @@ var ProductItem3 = function ProductItem3(props) {
10320
10332
  className: "w-full border border-stroke rounded-2xl " + className
10321
10333
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10322
10334
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10323
- className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
10335
+ className: "w-full rounded-t-2xl"
10324
10336
  }), /*#__PURE__*/React__default.createElement("div", {
10325
10337
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10326
10338
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10347,7 +10359,7 @@ var ProductItem4 = function ProductItem4(props) {
10347
10359
  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
10348
10360
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10349
10361
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10350
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10362
+ className: "w-full rounded-2xl"
10351
10363
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10352
10364
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10353
10365
  }, 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, {
@@ -10382,7 +10394,7 @@ var ProductItem5 = function ProductItem5(props) {
10382
10394
  className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10383
10395
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10384
10396
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10385
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10397
+ className: "w-full rounded-2xl"
10386
10398
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10387
10399
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10388
10400
  }, 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, {
@@ -10415,7 +10427,7 @@ var ProductItem6 = function ProductItem6(props) {
10415
10427
  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
10416
10428
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10417
10429
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10418
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10430
+ className: "w-full !aspect-[3/4] rounded-2xl"
10419
10431
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10420
10432
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10421
10433
  }, 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, {
@@ -10450,7 +10462,7 @@ var ProductItem7 = function ProductItem7(props) {
10450
10462
  className: "px-2 md:px-4 xl:px-6"
10451
10463
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10452
10464
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10453
- className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
10465
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
10454
10466
  })), (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", {
10455
10467
  className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10456
10468
  }, "-", 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", {
@@ -10483,7 +10495,7 @@ var ProductItem8 = function ProductItem8(props) {
10483
10495
  className: "relative "
10484
10496
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10485
10497
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10486
- className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
10498
+ className: "!aspect-[5/8] rounded"
10487
10499
  }), /*#__PURE__*/React__default.createElement("div", {
10488
10500
  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 "
10489
10501
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10516,7 +10528,7 @@ var ProductItem9 = function ProductItem9(props) {
10516
10528
  className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10517
10529
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10518
10530
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10519
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
10531
+ className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
10520
10532
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10521
10533
  className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10522
10534
  }, 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, {
@@ -10648,7 +10660,7 @@ var ProductItem11 = function ProductItem11(props) {
10648
10660
  className: "overflow-hidden"
10649
10661
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10650
10662
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10651
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
10663
+ className: "hover:scale-105 transition duration-300 ease-in-out"
10652
10664
  })), /*#__PURE__*/React__default.createElement("div", {
10653
10665
  className: "p-4 flex flex-col gap-4"
10654
10666
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -10669,7 +10681,7 @@ var ProductItem11 = function ProductItem11(props) {
10669
10681
  };
10670
10682
 
10671
10683
  var TreatmentItem1 = function TreatmentItem1(props) {
10672
- var _product$productInfo;
10684
+ var _product$productInfo, _product$productInfo2;
10673
10685
  var product = props.product,
10674
10686
  _props$Link = props.Link,
10675
10687
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10682,7 +10694,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10682
10694
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10683
10695
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10684
10696
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10685
- className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10697
+ className: " rounded-2xl"
10686
10698
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10687
10699
  className: "line-clamp-1 mb-2 font-medium text-lg"
10688
10700
  }, 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, {
@@ -10692,7 +10704,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10692
10704
  className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
10693
10705
  }, /*#__PURE__*/React__default.createElement("div", {
10694
10706
  className: "whitespace-nowrap"
10695
- }, "Th\u1EDDi gian: 120p"), /*#__PURE__*/React__default.createElement(Button, {
10707
+ }, "Th\u1EDDi gian: ", getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), /*#__PURE__*/React__default.createElement(Button, {
10696
10708
  shopConfigStyle: shopConfigStyle,
10697
10709
  label: "\u0110\u1EB7t l\u1ECBch",
10698
10710
  className: "w-full"
@@ -10771,7 +10783,14 @@ var Products2 = function Products2(props) {
10771
10783
  var _useState2 = useState(false),
10772
10784
  canGoNext = _useState2[0],
10773
10785
  setCanGoNext = _useState2[1];
10774
- var _ProductController = ProductController(props),
10786
+ var _useState3 = useState({
10787
+ size: 16,
10788
+ isSale: true
10789
+ }),
10790
+ params = _useState3[0];
10791
+ var _ProductController = ProductController(_extends({}, props, {
10792
+ params: params
10793
+ })),
10775
10794
  _ProductController$pr = _ProductController.products,
10776
10795
  products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
10777
10796
  _ProductController$lo = _ProductController.loading,
@@ -11377,7 +11396,7 @@ var Products11 = function Products11(props) {
11377
11396
  _props$Link = props.Link,
11378
11397
  Link = _props$Link === void 0 ? null : _props$Link,
11379
11398
  _props$categoryId = props.categoryId,
11380
- categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
11399
+ categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
11381
11400
  _props$ProductItem = props.ProductItem,
11382
11401
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11383
11402
  var _useState = useState({
@@ -11420,13 +11439,18 @@ var Products11 = function Products11(props) {
11420
11439
  });
11421
11440
  };
11422
11441
  var handleChooseCategory = function handleChooseCategory(category) {
11442
+ if (categoryId) {
11443
+ var newUrl = getLinkProductsByCategory(category);
11444
+ window.history.replaceState(null, '', newUrl);
11445
+ }
11423
11446
  setCategorySelected(category);
11424
11447
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
11425
11448
  setParams(function (prev) {
11426
- return _extends({}, prev, {
11449
+ return {
11450
+ page: 0,
11427
11451
  categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
11428
11452
  size: 12
11429
- });
11453
+ };
11430
11454
  });
11431
11455
  window.scrollTo({
11432
11456
  top: 0,
@@ -11449,48 +11473,38 @@ var Products11 = function Products11(props) {
11449
11473
  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);
11450
11474
  });
11451
11475
  setProductsFilter(productsCopy);
11452
- } else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
11453
- var _productsCopy2;
11454
- var _productsCopy = [].concat(products);
11455
- _productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
11456
- var _product$productInfo, _product$productInfo2, _product$productInfo3;
11457
- 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);
11458
- });
11459
- setProductsFilter(_productsCopy);
11460
11476
  } else {
11461
11477
  setProductsFilter(products);
11462
11478
  }
11463
11479
  }, [products, categorySelected]);
11464
11480
  var handleFilter = function handleFilter(item) {
11465
11481
  setFilterItem(item);
11466
- if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
11482
+ if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight) && !(params !== null && params !== void 0 && params.isSale)) {
11467
11483
  var productsCopy = [].concat(products);
11468
11484
  productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
11469
11485
  var _a$productInfo2, _b$productInfo2;
11470
11486
  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);
11471
11487
  });
11472
11488
  setProductsFilter(productsCopy);
11473
- } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
11474
- var _productsCopy4;
11475
- var _productsCopy3 = [].concat(products);
11476
- _productsCopy3 = (_productsCopy4 = _productsCopy3) === null || _productsCopy4 === void 0 ? void 0 : _productsCopy4.filter(function (product) {
11477
- var _product$productInfo4, _product$productInfo5, _product$productInfo6;
11478
- 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);
11489
+ } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
11490
+ setParams({
11491
+ page: 0,
11492
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11493
+ size: 12,
11494
+ isSale: true
11479
11495
  });
11480
- setProductsFilter(_productsCopy3);
11481
11496
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
11482
- setParams(function (prev) {
11483
- return _extends({}, prev, {
11484
- isHighlight: true
11485
- });
11497
+ setParams({
11498
+ page: 0,
11499
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11500
+ size: 12,
11501
+ isHighlight: true
11486
11502
  });
11487
11503
  } else {
11488
- setParams(function (prev) {
11489
- return {
11490
- page: 0,
11491
- categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11492
- size: 12
11493
- };
11504
+ setParams({
11505
+ page: 0,
11506
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11507
+ size: 12
11494
11508
  });
11495
11509
  }
11496
11510
  };
@@ -11499,7 +11513,7 @@ var Products11 = function Products11(props) {
11499
11513
  }, /*#__PURE__*/React__default.createElement("div", {
11500
11514
  className: "md:sticky top-16 self-start"
11501
11515
  }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11502
- className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
11516
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
11503
11517
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
11504
11518
  return /*#__PURE__*/React__default.createElement("div", {
11505
11519
  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" : ""),
@@ -11788,7 +11802,7 @@ var listFilter$1 = [{
11788
11802
  }
11789
11803
  }];
11790
11804
  var ProductSearch1 = function ProductSearch1(props) {
11791
- var _window, _window$location, _productsFilter$slice;
11805
+ var _window, _window$location, _products$slice;
11792
11806
  var _props$Link = props.Link,
11793
11807
  Link = _props$Link === void 0 ? null : _props$Link,
11794
11808
  _props$SectionTitle = props.SectionTitle,
@@ -11798,21 +11812,18 @@ var ProductSearch1 = function ProductSearch1(props) {
11798
11812
  shopConfigStyle = props.shopConfigStyle;
11799
11813
  var queryParams = new URLSearchParams((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.search);
11800
11814
  var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('tu-khoa');
11801
- var _useState = useState([]),
11802
- productsFilter = _useState[0],
11803
- setProductsFilter = _useState[1];
11804
- var _useState2 = useState({
11815
+ var _useState = useState({
11805
11816
  productName: keywordValue,
11806
11817
  size: 12
11807
11818
  }),
11808
- params = _useState2[0],
11809
- setParams = _useState2[1];
11810
- var _useState3 = useState(true),
11811
- isGetMore = _useState3[0],
11812
- setIsGetMore = _useState3[1];
11813
- var _useState4 = useState(false),
11814
- isAutoGetList = _useState4[0],
11815
- setIsAutoGetList = _useState4[1];
11819
+ params = _useState[0],
11820
+ setParams = _useState[1];
11821
+ var _useState2 = useState(true),
11822
+ isGetMore = _useState2[0],
11823
+ setIsGetMore = _useState2[1];
11824
+ var _useState3 = useState(false),
11825
+ isAutoGetList = _useState3[0],
11826
+ setIsAutoGetList = _useState3[1];
11816
11827
  var _ProductController = ProductController(_extends({}, props, {
11817
11828
  params: params,
11818
11829
  isAutoGetList: isAutoGetList
@@ -11820,9 +11831,6 @@ var ProductSearch1 = function ProductSearch1(props) {
11820
11831
  products = _ProductController.products,
11821
11832
  loading = _ProductController.loading,
11822
11833
  page = _ProductController.page;
11823
- var _useState5 = useState({}),
11824
- filterValue = _useState5[0],
11825
- setFilterValue = _useState5[1];
11826
11834
  useEffect(function () {
11827
11835
  setIsAutoGetList(true);
11828
11836
  setParams(function (prev) {
@@ -11831,19 +11839,6 @@ var ProductSearch1 = function ProductSearch1(props) {
11831
11839
  });
11832
11840
  });
11833
11841
  }, [keywordValue]);
11834
- useEffect(function () {
11835
- if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
11836
- var _productsCopy;
11837
- var productsCopy = [].concat(products);
11838
- productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
11839
- var _product$productInfo, _product$productInfo2, _product$productInfo3;
11840
- 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);
11841
- });
11842
- setProductsFilter(productsCopy);
11843
- } else {
11844
- setProductsFilter(products);
11845
- }
11846
- }, [products]);
11847
11842
  var handleGetMoreProducts = function handleGetMoreProducts() {
11848
11843
  setIsGetMore(false);
11849
11844
  setParams(function (prev) {
@@ -11853,20 +11848,17 @@ var ProductSearch1 = function ProductSearch1(props) {
11853
11848
  });
11854
11849
  };
11855
11850
  var handleFilter = function handleFilter(item) {
11856
- setFilterValue(item);
11857
- if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
11858
- var _productsCopy2;
11859
- var productsCopy = [].concat(products);
11860
- productsCopy = (_productsCopy2 = productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
11861
- var _product$productInfo4, _product$productInfo5, _product$productInfo6;
11862
- 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);
11851
+ if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
11852
+ setParams({
11853
+ size: 12,
11854
+ productName: keywordValue,
11855
+ isSale: true
11863
11856
  });
11864
- setProductsFilter(productsCopy);
11865
11857
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
11866
- setParams(function (prev) {
11867
- return _extends({}, prev, {
11868
- isHighlight: true
11869
- });
11858
+ setParams({
11859
+ size: 12,
11860
+ productName: keywordValue,
11861
+ isHighlight: true
11870
11862
  });
11871
11863
  } else {
11872
11864
  setParams({
@@ -11890,15 +11882,15 @@ var ProductSearch1 = function ProductSearch1(props) {
11890
11882
  onClick: handleFilter
11891
11883
  }), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
11892
11884
  className: "m-auto mt-20 min-h-32"
11893
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11885
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11894
11886
  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"
11895
- }, 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, idx) {
11887
+ }, 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) {
11896
11888
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11897
11889
  Link: Link,
11898
11890
  product: product,
11899
11891
  key: "htrhr-" + idx
11900
11892
  });
11901
- })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
11893
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
11902
11894
  label: "Xem thêm",
11903
11895
  onClick: handleGetMoreProducts,
11904
11896
  className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
@@ -12278,12 +12270,12 @@ var ProductDetail10 = function ProductDetail10(props) {
12278
12270
  return /*#__PURE__*/React__default.createElement("div", {
12279
12271
  className: SECTION_CLASS + " mt-0 md:mt-0 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
12280
12272
  }, /*#__PURE__*/React__default.createElement("div", {
12281
- className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 md:gap-6 bg-bgSecondary"
12273
+ className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-3 md:gap-6 bg-bgSecondary"
12282
12274
  }, /*#__PURE__*/React__default.createElement("div", {
12283
- className: "flex flex-col gap-4 col-span-2 "
12275
+ className: "flex flex-col gap-4 md:col-span-2 "
12284
12276
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
12285
12277
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
12286
- className: "w-full border rounded-2xl p-2 bg-background aspect-square object-contain rounded-2xl "
12278
+ className: "w-full border bg-background aspect-square object-contain rounded-2xl "
12287
12279
  }) : /*#__PURE__*/React__default.createElement("div", {
12288
12280
  className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
12289
12281
  style: {
@@ -12294,19 +12286,19 @@ var ProductDetail10 = function ProductDetail10(props) {
12294
12286
  height: "25%",
12295
12287
  fill: "#D9D9D9"
12296
12288
  })), /*#__PURE__*/React__default.createElement("div", {
12297
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
12289
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
12298
12290
  }, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
12299
12291
  return /*#__PURE__*/React__default.createElement("img", {
12300
12292
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12301
12293
  key: item === null || item === void 0 ? void 0 : item.imageId,
12302
12294
  alt: "",
12303
- className: "cursor-pointer h-16 w-16 rounded-lg bg-background\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12295
+ className: "cursor-pointer h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full aspect-square rounded-md lg:rounded-lg bg-background object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12304
12296
  onClick: function onClick() {
12305
12297
  handleDisplayImage(item);
12306
12298
  }
12307
12299
  });
12308
12300
  }))), /*#__PURE__*/React__default.createElement("div", {
12309
- className: "col-span-3"
12301
+ className: "md:col-span-3 "
12310
12302
  }, /*#__PURE__*/React__default.createElement("p", {
12311
12303
  className: "font-semibold text-2xl"
12312
12304
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -12320,7 +12312,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12320
12312
  }, /*#__PURE__*/React__default.createElement("div", {
12321
12313
  className: "min-w-24"
12322
12314
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12323
- className: "flex gap-2"
12315
+ className: "flex flex-wrap gap-2"
12324
12316
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12325
12317
  return /*#__PURE__*/React__default.createElement("button", {
12326
12318
  key: i,
@@ -12372,7 +12364,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12372
12364
  __html: product === null || product === void 0 ? void 0 : product.description
12373
12365
  }
12374
12366
  }), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
12375
- className: "h-10 relative -mt-10 rounded-b-lg",
12367
+ className: "h-28 relative -mt-28 rounded-b-lg",
12376
12368
  style: {
12377
12369
  background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
12378
12370
  }
@@ -12517,7 +12509,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12517
12509
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12518
12510
  key: item === null || item === void 0 ? void 0 : item.imageId,
12519
12511
  alt: "",
12520
- className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12512
+ className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-contain aspect-square rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12521
12513
  onClick: function onClick() {
12522
12514
  handleDisplayImage(item);
12523
12515
  }
@@ -12549,7 +12541,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12549
12541
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12550
12542
  key: item === null || item === void 0 ? void 0 : item.imageId,
12551
12543
  alt: "",
12552
- className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12544
+ className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-contain rounded-lg aspect-square\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12553
12545
  onClick: function onClick() {
12554
12546
  handleDisplayImage(item);
12555
12547
  }
@@ -12569,7 +12561,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12569
12561
  }, /*#__PURE__*/React__default.createElement("div", {
12570
12562
  className: "min-w-24 my-auto"
12571
12563
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12572
- className: "flex gap-2"
12564
+ className: "flex flex-wrap gap-2"
12573
12565
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12574
12566
  return /*#__PURE__*/React__default.createElement("button", {
12575
12567
  key: i,
@@ -13031,7 +13023,9 @@ var Banner1 = function Banner1(props) {
13031
13023
  var data = props.data,
13032
13024
  shopConfigStyle = props.shopConfigStyle,
13033
13025
  _props$SectionTitle = props.SectionTitle,
13034
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
13026
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
13027
+ _props$Link = props.Link,
13028
+ Link = _props$Link === void 0 ? null : _props$Link;
13035
13029
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13036
13030
  return /*#__PURE__*/React__default.createElement("div", {
13037
13031
  className: "" + SECTION_DEFAULT_CLASS
@@ -13041,12 +13035,15 @@ var Banner1 = function Banner1(props) {
13041
13035
  }), /*#__PURE__*/React__default.createElement("div", {
13042
13036
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4 lg:gap-6 mt-6"
13043
13037
  }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
13044
- return /*#__PURE__*/React__default.createElement("img", {
13038
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13039
+ Link: Link,
13040
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
13041
+ }, /*#__PURE__*/React__default.createElement("img", {
13045
13042
  src: item === null || item === void 0 ? void 0 : item.srcImage,
13046
13043
  alt: "",
13047
13044
  className: "rounded-2xl",
13048
13045
  key: "hnfhn-" + index
13049
- });
13046
+ }));
13050
13047
  })));
13051
13048
  };
13052
13049
 
@@ -13136,25 +13133,30 @@ var Banner3 = function Banner3(props) {
13136
13133
  };
13137
13134
 
13138
13135
  var Banner4 = function Banner4(props) {
13139
- var _data$data, _data$data$, _data$data2, _data$data2$slice;
13136
+ var _data$data, _data$data$, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$slice;
13140
13137
  var data = props.data,
13141
13138
  _props$Link = props.Link,
13142
13139
  Link = _props$Link === void 0 ? null : _props$Link;
13143
13140
  return /*#__PURE__*/React__default.createElement("div", {
13144
13141
  className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
13142
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13143
+ className: "md:col-span-2",
13144
+ Link: Link,
13145
+ 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) || "#"
13145
13146
  }, /*#__PURE__*/React__default.createElement("img", {
13146
- 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,
13147
- className: "md:col-span-2 object-cover w-full h-full rounded-[10px]"
13148
- }), /*#__PURE__*/React__default.createElement("div", {
13149
- className: "flex flex-col gap-6"
13150
- }, 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) {
13147
+ src: 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$.srcImage,
13148
+ className: " object-cover w-full h-full rounded-[10px]"
13149
+ })), /*#__PURE__*/React__default.createElement("div", {
13150
+ className: "flex flex-col gap-6 h-full"
13151
+ }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$slice = _data$data4.slice(1, 3)) === null || _data$data4$slice === void 0 ? void 0 : _data$data4$slice.map(function (item, index) {
13151
13152
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
13152
13153
  Link: Link,
13153
13154
  href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
13155
+ className: "flex-1 min-h-0",
13154
13156
  key: "djsd-" + index
13155
13157
  }, /*#__PURE__*/React__default.createElement("img", {
13156
13158
  src: item === null || item === void 0 ? void 0 : item.srcImage,
13157
- className: "object-cover w-full h-full rounded-xl"
13159
+ className: "object-cover w-full h-full rounded-[10px]"
13158
13160
  }));
13159
13161
  })));
13160
13162
  };
@@ -13561,7 +13563,7 @@ var Footer1 = function Footer1(props) {
13561
13563
  href: "/",
13562
13564
  className: "flex items-center"
13563
13565
  }, /*#__PURE__*/React__default.createElement("img", {
13564
- className: "object-cover w-14 max-h-14",
13566
+ className: "object-contain w-14 h-14",
13565
13567
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
13566
13568
  }), /*#__PURE__*/React__default.createElement("h3", {
13567
13569
  className: "text-2xl md:text-3xl ms-2 font-headingFont ",
@@ -13704,7 +13706,7 @@ var Footer7 = function Footer7(props) {
13704
13706
  href: "/",
13705
13707
  className: "flex items-center gap-2"
13706
13708
  }, /*#__PURE__*/React__default.createElement("img", {
13707
- className: "object-cover w-14 max-h-14",
13709
+ className: "object-contain w-14 h-14",
13708
13710
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
13709
13711
  }), /*#__PURE__*/React__default.createElement("h3", {
13710
13712
  className: " text-2xl md:text-3xl ms-2 font-headingFont ",
@@ -14001,13 +14003,13 @@ var CustomerRating8 = function CustomerRating8(props) {
14001
14003
  }, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
14002
14004
  className: "flex gap-2 "
14003
14005
  }, /*#__PURE__*/React__default.createElement(RiDoubleQuotesL, {
14004
- className: "text-gray3",
14005
- size: 36
14006
+ className: "flex-shrink-0 text-gray4",
14007
+ size: 16
14006
14008
  }), /*#__PURE__*/React__default.createElement("div", {
14007
14009
  className: "pt-4"
14008
- }, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement(RiDoubleQuotesL, {
14009
- className: " mt-auto text-gray3",
14010
- size: 36
14010
+ }, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement(RiDoubleQuotesR, {
14011
+ className: "flex-shrink-0 mt-auto text-gray4",
14012
+ size: 16
14011
14013
  })));
14012
14014
  }))));
14013
14015
  };
@@ -14258,21 +14260,21 @@ var Gallery2 = function Gallery2(props) {
14258
14260
  }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$slice = _data$data.slice(0, 2)) === null || _data$data$slice === void 0 ? void 0 : _data$data$slice.map(function (item, index) {
14259
14261
  return /*#__PURE__*/React__default.createElement("img", {
14260
14262
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14261
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl"
14263
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
14262
14264
  });
14263
14265
  })), /*#__PURE__*/React__default.createElement("div", {
14264
14266
  className: "flex flex-col gap-2 md:gap-4"
14265
14267
  }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(2, 4)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
14266
14268
  return /*#__PURE__*/React__default.createElement("img", {
14267
14269
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14268
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl odd:h-[130%]"
14270
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
14269
14271
  });
14270
14272
  })), /*#__PURE__*/React__default.createElement("div", {
14271
14273
  className: "flex flex-col gap-2 md:gap-4"
14272
14274
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$slice = _data$data3.slice(4, 6)) === null || _data$data3$slice === void 0 ? void 0 : _data$data3$slice.map(function (item, index) {
14273
14275
  return /*#__PURE__*/React__default.createElement("img", {
14274
14276
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14275
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl even:h-[130%]"
14277
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
14276
14278
  });
14277
14279
  })))));
14278
14280
  };
@@ -14367,12 +14369,12 @@ var Breadcrumb1 = function Breadcrumb1(props) {
14367
14369
  return e === null || e === void 0 ? void 0 : e.length;
14368
14370
  })) === null || _route$route$split$fi === void 0 ? void 0 : _route$route$split$fi.slice(0, 2);
14369
14371
  items = (_items = items) === null || _items === void 0 ? void 0 : _items.map(function (e) {
14370
- var _e, _e$replace, _e$replace$replace, _e$replace$replace$re;
14372
+ var _e, _e$replace, _e$replace$replace, _e$replace$replace$re, _e$replace$replace$re2;
14371
14373
  if (e === "product") e = "products";else if (e === "service") e = "services";
14372
14374
  return (routes === null || routes === void 0 ? void 0 : routes.find(function (r) {
14373
14375
  return (r === null || r === void 0 ? void 0 : r.name) === e;
14374
14376
  })) || {
14375
- label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(/-{3}/g, "###")) === null || _e$replace === void 0 ? void 0 : (_e$replace$replace = _e$replace.replace(/-/g, " ")) === null || _e$replace$replace === void 0 ? void 0 : (_e$replace$replace$re = _e$replace$replace.replace(/###/g, "-")) === null || _e$replace$replace$re === void 0 ? void 0 : _e$replace$replace$re.replace(/~/g, "/")
14377
+ label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(/pct/g, '%')) === null || _e$replace === void 0 ? void 0 : (_e$replace$replace = _e$replace.replace(/fs/g, '/')) === null || _e$replace$replace === void 0 ? void 0 : (_e$replace$replace$re = _e$replace$replace.replace(/amp/g, '&')) === null || _e$replace$replace$re === void 0 ? void 0 : (_e$replace$replace$re2 = _e$replace$replace$re.replace(/-/g, ' ')) === null || _e$replace$replace$re2 === void 0 ? void 0 : _e$replace$replace$re2.replace(/hyp/g, '-')
14376
14378
  };
14377
14379
  });
14378
14380
  (_items2 = items) === null || _items2 === void 0 ? void 0 : _items2.unshift({
@@ -14380,7 +14382,6 @@ var Breadcrumb1 = function Breadcrumb1(props) {
14380
14382
  label: "Trang chủ",
14381
14383
  route: "/"
14382
14384
  });
14383
- console.log(items);
14384
14385
  setItems(items);
14385
14386
  };
14386
14387
  return /*#__PURE__*/React__default.createElement("div", {
@@ -15625,7 +15626,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
15625
15626
  }) : /*#__PURE__*/React__default.createElement("img", {
15626
15627
  src: item === null || item === void 0 ? void 0 : item.srcImage,
15627
15628
  alt: "logo",
15628
- className: "w-16 h-16 p-3 rounded-full bg-primary"
15629
+ className: "w-16 h-16 p-3 rounded-full object-cover bg-primary"
15629
15630
  }), /*#__PURE__*/React__default.createElement("div", {
15630
15631
  className: "font-medium text-lg"
15631
15632
  }, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
@@ -15657,7 +15658,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
15657
15658
  }) : /*#__PURE__*/React__default.createElement("img", {
15658
15659
  src: item === null || item === void 0 ? void 0 : item.srcImage,
15659
15660
  alt: "logo",
15660
- className: "w-16 h-16 rounded-full bg-primary"
15661
+ className: "w-16 h-16 rounded-full object-cover bg-primary"
15661
15662
  }), /*#__PURE__*/React__default.createElement("div", {
15662
15663
  className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
15663
15664
  }, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
@@ -15687,7 +15688,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
15687
15688
  }) : /*#__PURE__*/React__default.createElement("img", {
15688
15689
  src: item === null || item === void 0 ? void 0 : item.srcImage,
15689
15690
  alt: "logo",
15690
- className: "w-16 h-16"
15691
+ className: "w-16 h-16 object-cover"
15691
15692
  }), /*#__PURE__*/React__default.createElement("div", {
15692
15693
  className: " w-44 h-0.5 rounded-full bg-primary"
15693
15694
  }), /*#__PURE__*/React__default.createElement("div", {
@@ -15866,7 +15867,7 @@ var ShopHighlights10 = function ShopHighlights10(props) {
15866
15867
  className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
15867
15868
  }, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
15868
15869
  src: item === null || item === void 0 ? void 0 : item.srcImage,
15869
- className: "h-56 lg:h-72 object-cover mt-auto border-4 border-secondary"
15870
+ className: "aspect-video object-cover mt-auto border-4 border-secondary"
15870
15871
  })));
15871
15872
  })));
15872
15873
  };
@@ -15958,11 +15959,6 @@ var NewsController = function NewsController(props) {
15958
15959
  var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
15959
15960
  setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
15960
15961
  setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
15961
- var url = new URL(window.location.href);
15962
- if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
15963
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
15964
- window.history.replaceState({}, '', url.pathname + url.search);
15965
- }
15966
15962
  }
15967
15963
  setLoading(false);
15968
15964
  });
@@ -16196,7 +16192,8 @@ var News1 = function News1(props) {
16196
16192
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
16197
16193
  _props$Link = props.Link,
16198
16194
  Link = _props$Link === void 0 ? null : _props$Link,
16199
- catId = props.catId;
16195
+ _props$catId = props.catId,
16196
+ catId = _props$catId === void 0 ? "" : _props$catId;
16200
16197
  var _useState = useState({
16201
16198
  page: 0,
16202
16199
  sort: "timeUpdate,DESC",
@@ -16236,6 +16233,18 @@ var News1 = function News1(props) {
16236
16233
  setCategorySelected(category);
16237
16234
  }
16238
16235
  }, [newsCategories]);
16236
+ var handleSelectedCateogry = function handleSelectedCateogry(item) {
16237
+ if (catId) {
16238
+ var newUrl = getLinkNewsByCategory(item);
16239
+ window.history.replaceState(null, '', newUrl);
16240
+ }
16241
+ setCategorySelected(item);
16242
+ setParams(function (prev) {
16243
+ return _extends({}, prev, {
16244
+ catId: item === null || item === void 0 ? void 0 : item.catId
16245
+ });
16246
+ });
16247
+ };
16239
16248
  return /*#__PURE__*/React__default.createElement("div", {
16240
16249
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
16241
16250
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -16256,12 +16265,7 @@ var News1 = function News1(props) {
16256
16265
  className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
16257
16266
  key: "sdjfdh-" + index,
16258
16267
  onClick: function onClick() {
16259
- setCategorySelected(item);
16260
- setParams(function (prev) {
16261
- return _extends({}, prev, {
16262
- catId: item === null || item === void 0 ? void 0 : item.catId
16263
- });
16264
- });
16268
+ handleSelectedCateogry(item);
16265
16269
  }
16266
16270
  }, /*#__PURE__*/React__default.createElement("div", {
16267
16271
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16315,12 +16319,7 @@ var News1 = function News1(props) {
16315
16319
  className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
16316
16320
  key: "sdjfdh-" + index,
16317
16321
  onClick: function onClick() {
16318
- setCategorySelected(item);
16319
- setParams(function (prev) {
16320
- return _extends({}, prev, {
16321
- catId: item === null || item === void 0 ? void 0 : item.catId
16322
- });
16323
- });
16322
+ handleSelectedCateogry(item);
16324
16323
  }
16325
16324
  }, /*#__PURE__*/React__default.createElement("div", {
16326
16325
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16416,7 +16415,7 @@ var NewsDetail1 = function NewsDetail1(props) {
16416
16415
  }), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
16417
16416
  className: "top-6 block md:hidden"
16418
16417
  }, /*#__PURE__*/React__default.createElement("div", {
16419
- className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
16418
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
16420
16419
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
16421
16420
  className: "rounded-b-lg bg-bgSecondary"
16422
16421
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
@@ -16472,5 +16471,192 @@ var NewsDetail1 = function NewsDetail1(props) {
16472
16471
  }))) : null);
16473
16472
  };
16474
16473
 
16475
- export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner4, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, BookingTable1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, CustomerRating8, CustomerRating9, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Gallery2, Gallery3, Hero1, Hero10, Hero11, Hero12, Hero13, Hero14, Hero15, Hero16, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, PageTitle2, PageTitle3, Partner1, ProductCategory2, ProductDetail10, ProductDetail11, ProductHighlight1, ProductHot1, ProductHot3, ProductImage, ProductItem10, ProductItem11, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductItem8, ProductItem9, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products11, Products12, Products14, Products2, Products3, Products9, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, SectionTitle4, SectionTitle5, Select$1 as Select, ServiceDetail1, ShopHighlights10, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, ShopHighlights8, ShopHighlights9, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
16474
+ var submitFormApi = function submitFormApi(landingShopConfigId, data) {
16475
+ return api({
16476
+ method: "post",
16477
+ url: endpointLandingShop + "/" + landingShopConfigId + "/form",
16478
+ data: data
16479
+ });
16480
+ };
16481
+
16482
+ var Form = function Form(props) {
16483
+ var _data$data, _data$data2, _data$data3;
16484
+ var _props$shopConfigStyl = props.shopConfigStyle,
16485
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
16486
+ _props$shopConfig = props.shopConfig,
16487
+ shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
16488
+ _props$data = props.data,
16489
+ data = _props$data === void 0 ? {} : _props$data,
16490
+ _props$SectionTitle = props.SectionTitle,
16491
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
16492
+ _props$router = props.router,
16493
+ router = _props$router === void 0 ? function () {} : _props$router;
16494
+ var _shopConfigStyle$colo = shopConfigStyle.color,
16495
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo === void 0 ? {} : _shopConfigStyle$colo,
16496
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo2.background,
16497
+ background = _shopConfigStyle$colo3 === void 0 ? "#fff" : _shopConfigStyle$colo3;
16498
+ var fields = (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.fields) || [];
16499
+ var redirectUrl = (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.redirect_url) || "";
16500
+ var srcImage = data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.srcImage;
16501
+ var _useState = useState(false),
16502
+ isLoading = _useState[0],
16503
+ setIsLoading = _useState[1];
16504
+ var fieldRefs = useRef({});
16505
+ var getFieldRef = function getFieldRef(key) {
16506
+ if (!fieldRefs.current[key]) {
16507
+ fieldRefs.current[key] = React__default.createRef();
16508
+ }
16509
+ return fieldRefs.current[key];
16510
+ };
16511
+ var formatFieldsWithValue = function formatFieldsWithValue() {
16512
+ return fields.map(function (field, index) {
16513
+ var _ref$current;
16514
+ var key = (field === null || field === void 0 ? void 0 : field.title) || "field-" + index;
16515
+ var ref = getFieldRef(key);
16516
+ var getValue = ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getValue;
16517
+ var value = getValue ? getValue() : undefined;
16518
+ return _extends({}, field, {
16519
+ value: value
16520
+ });
16521
+ });
16522
+ };
16523
+ var handleSubmit = function handleSubmit() {
16524
+ try {
16525
+ setIsLoading(true);
16526
+ return Promise.resolve(_finallyRethrows(function () {
16527
+ return _catch(function () {
16528
+ var isValid = true;
16529
+ var payload = {};
16530
+ fields.forEach(function (field, index) {
16531
+ var _ref$current2, _ref$current3;
16532
+ var key = (field === null || field === void 0 ? void 0 : field.title) || "field-" + index;
16533
+ var ref = getFieldRef(key);
16534
+ var validate = ref === null || ref === void 0 ? void 0 : (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.validateData;
16535
+ var getValue = ref === null || ref === void 0 ? void 0 : (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.getValue;
16536
+ var ok = validate ? validate() : true;
16537
+ if (ok === false) {
16538
+ isValid = false;
16539
+ }
16540
+ payload[key] = getValue ? getValue() : undefined;
16541
+ });
16542
+ if (!isValid) return;
16543
+ var fieldsWithValue = formatFieldsWithValue();
16544
+ var body = {
16545
+ title: data === null || data === void 0 ? void 0 : data.sectionTitle,
16546
+ data: JSON.stringify(fieldsWithValue)
16547
+ };
16548
+ var _temp = function () {
16549
+ if (shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) {
16550
+ return Promise.resolve(submitFormApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, body)).then(function (res) {
16551
+ var _res$data, _res$data$status;
16552
+ if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$status = _res$data.status) === null || _res$data$status === void 0 ? void 0 : _res$data$status.code) == '200') {
16553
+ router === null || router === void 0 ? void 0 : router.push(redirectUrl || "/");
16554
+ }
16555
+ });
16556
+ }
16557
+ }();
16558
+ if (_temp && _temp.then) return _temp.then(function () {});
16559
+ }, function (error) {
16560
+ console.log(error);
16561
+ });
16562
+ }, function (_wasThrown, _result) {
16563
+ setIsLoading(false);
16564
+ if (_wasThrown) throw _result;
16565
+ return _result;
16566
+ }));
16567
+ } catch (e) {
16568
+ return Promise.reject(e);
16569
+ }
16570
+ };
16571
+ var renderField = function renderField(field, index) {
16572
+ var _field$title;
16573
+ var key = (field === null || field === void 0 ? void 0 : field.title) || "field-" + index;
16574
+ var commonProps = {
16575
+ label: field === null || field === void 0 ? void 0 : field.title,
16576
+ placeholder: "Nh\u1EADp " + ((field === null || field === void 0 ? void 0 : (_field$title = field.title) === null || _field$title === void 0 ? void 0 : _field$title.toLowerCase()) || ""),
16577
+ className: "!bg-bgSecondary",
16578
+ rules: field !== null && field !== void 0 && field.required ? [{
16579
+ type: "required",
16580
+ message: "Bắt buộc nhập"
16581
+ }] : [],
16582
+ labelClassName: "font-medium"
16583
+ };
16584
+ if ((field === null || field === void 0 ? void 0 : field.type) === "phone") {
16585
+ return /*#__PURE__*/React__default.createElement(InputPhoneNumber, _extends({
16586
+ key: key
16587
+ }, commonProps, {
16588
+ rules: [].concat(commonProps.rules, [{
16589
+ type: "pattern",
16590
+ pattern: pattern === null || pattern === void 0 ? void 0 : pattern.phoneNumberPattern,
16591
+ message: "Số điện thoại không hợp lệ!"
16592
+ }]),
16593
+ className: "bg-white",
16594
+ wrapClassName: "w-full",
16595
+ ref: getFieldRef(key)
16596
+ }));
16597
+ }
16598
+ if ((field === null || field === void 0 ? void 0 : field.type) === "area") {
16599
+ return /*#__PURE__*/React__default.createElement(TextArea, _extends({
16600
+ key: key
16601
+ }, commonProps, {
16602
+ className: "w-full",
16603
+ textareaClassName: "w-full p-3 bg-white",
16604
+ ref: getFieldRef(key)
16605
+ }));
16606
+ }
16607
+ var extraRules = [];
16608
+ if ((field === null || field === void 0 ? void 0 : field.type) === "email") {
16609
+ extraRules.push({
16610
+ type: "pattern",
16611
+ pattern: /\S+@\S+\.\S+/,
16612
+ message: "Email không hợp lệ"
16613
+ });
16614
+ }
16615
+ return /*#__PURE__*/React__default.createElement(Input, _extends({
16616
+ key: key
16617
+ }, commonProps, {
16618
+ type: (field === null || field === void 0 ? void 0 : field.type) === "email" ? "email" : "text",
16619
+ ref: getFieldRef(key),
16620
+ rules: [].concat(commonProps.rules, extraRules)
16621
+ }));
16622
+ };
16623
+ return /*#__PURE__*/React__default.createElement("div", {
16624
+ className: "relative w-full px-4 xl:px-20 py-12",
16625
+ style: {
16626
+ backgroundColor: background
16627
+ }
16628
+ }, SectionTitle ? /*#__PURE__*/React__default.createElement(SectionTitle, {
16629
+ data: data,
16630
+ shopConfigStyle: shopConfigStyle
16631
+ }) : null, /*#__PURE__*/React__default.createElement("div", {
16632
+ className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12 items-start"
16633
+ }, /*#__PURE__*/React__default.createElement("div", {
16634
+ className: "space-y-4"
16635
+ }, srcImage ? /*#__PURE__*/React__default.createElement("div", {
16636
+ className: "w-full"
16637
+ }, /*#__PURE__*/React__default.createElement("img", {
16638
+ src: srcImage,
16639
+ alt: "form-banner",
16640
+ className: "w-full h-auto rounded-xl object-cover"
16641
+ })) : null), /*#__PURE__*/React__default.createElement("div", {
16642
+ className: "grid gap-4 rounded-2xl p-6 border bg-white"
16643
+ }, fields !== null && fields !== void 0 && fields.length ? /*#__PURE__*/React__default.createElement("div", {
16644
+ className: "grid grid-cols-1 gap-4"
16645
+ }, fields === null || fields === void 0 ? void 0 : fields.map(renderField)) : /*#__PURE__*/React__default.createElement("div", null, "Ch\u01B0a c\xF3 c\u1EA5u h\xECnh tr\u01B0\u1EDDng"), /*#__PURE__*/React__default.createElement("div", {
16646
+ className: "text-center"
16647
+ }, isLoading ? /*#__PURE__*/React__default.createElement("div", {
16648
+ className: "flex gap-2 justify-center items-center"
16649
+ }, /*#__PURE__*/React__default.createElement(Loading, {
16650
+ size: 24
16651
+ }), /*#__PURE__*/React__default.createElement("span", {
16652
+ className: "ml-2"
16653
+ }, "\u0110ang g\u1EEDi th\xF4ng tin...")) : /*#__PURE__*/React__default.createElement(Button, {
16654
+ label: "Gửi thông tin",
16655
+ shopConfigStyle: shopConfigStyle,
16656
+ onClick: handleSubmit,
16657
+ disabled: isLoading
16658
+ })))));
16659
+ };
16660
+
16661
+ export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner4, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, BookingTable1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, CustomerRating8, CustomerRating9, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Form, Gallery1, Gallery2, Gallery3, Hero1, Hero10, Hero11, Hero12, Hero13, Hero14, Hero15, Hero16, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, PageTitle2, PageTitle3, Partner1, ProductCategory2, ProductDetail10, ProductDetail11, ProductHighlight1, ProductHot1, ProductHot3, ProductImage, ProductItem10, ProductItem11, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductItem8, ProductItem9, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products11, Products12, Products14, Products2, Products3, Products9, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, SectionTitle4, SectionTitle5, Select$1 as Select, ServiceDetail1, ShopHighlights10, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, ShopHighlights8, ShopHighlights9, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
16476
16662
  //# sourceMappingURL=index.modern.js.map