diy-template-components 0.2.30 → 0.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
 
4
4
 
5
- function ___$insertStyle(css) {
6
- if (!css || typeof window === 'undefined') {
7
- return;
8
- }
9
- const style = document.createElement('style');
10
- style.setAttribute('type', 'text/css');
11
- style.innerHTML = css;
12
- document.head.appendChild(style);
13
- return css;
5
+ function ___$insertStyle(css) {
6
+ if (!css || !window) {
7
+ return;
8
+ }
9
+ const style = document.createElement('style');
10
+ style.setAttribute('type', 'text/css');
11
+ style.innerHTML = css;
12
+ document.head.appendChild(style);
13
+ return css;
14
14
  }
15
15
 
16
16
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -33,17 +33,20 @@ var Countdown__default = /*#__PURE__*/_interopDefaultLegacy(Countdown);
33
33
  var ReactDOMServer__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOMServer);
34
34
 
35
35
  function _extends() {
36
- _extends = Object.assign ? Object.assign.bind() : function (target) {
36
+ _extends = Object.assign || function (target) {
37
37
  for (var i = 1; i < arguments.length; i++) {
38
38
  var source = arguments[i];
39
+
39
40
  for (var key in source) {
40
41
  if (Object.prototype.hasOwnProperty.call(source, key)) {
41
42
  target[key] = source[key];
42
43
  }
43
44
  }
44
45
  }
46
+
45
47
  return target;
46
48
  };
49
+
47
50
  return _extends.apply(this, arguments);
48
51
  }
49
52
 
@@ -299,17 +302,21 @@ const alpha = {
299
302
  seventyPercent: 0.7,
300
303
  eightyPercent: 0.8
301
304
  };
305
+
302
306
  const getRGBFromHex = hex => {
303
307
  const r = parseInt(hex.slice(1, 3), 16);
304
308
  const g = parseInt(hex.slice(3, 5), 16);
305
309
  const b = parseInt(hex.slice(5, 7), 16);
306
310
  return [r, g, b];
307
311
  };
312
+
308
313
  const hexToRgbA = (hex, alpha = null) => {
309
314
  const values = getRGBFromHex(hex);
315
+
310
316
  if (alpha !== null) {
311
317
  values.push(alpha);
312
318
  }
319
+
313
320
  return `rgba(${values.join(',')})`;
314
321
  };
315
322
  const colorMixer = (hex1, weightage = 1, hex2 = colors.white) => {
@@ -449,24 +456,29 @@ function useLinkBuilder(data) {
449
456
  basePath,
450
457
  isMasterTemplate
451
458
  } = React.useContext(PageContext);
459
+
452
460
  if (isEdit || !data.isLink) {
453
461
  return null;
454
462
  }
463
+
455
464
  if (data?.isExistingLink === false) {
456
465
  return data.link;
457
466
  }
467
+
458
468
  if (data?.isExternal) {
459
469
  return data.link;
460
470
  }
471
+
461
472
  if (!isPreview) {
462
473
  const link = data.link === '/' ? '' : '/' + data.link;
463
474
  return basePath ? `//${basePath}${link}` : null;
464
- }
475
+ } // courses in preview: special case
476
+
465
477
 
466
- // courses in preview: special case
467
478
  if (data.link === 'courses') {
468
479
  return `//${basePath}/courses`;
469
480
  }
481
+
470
482
  const {
471
483
  pageId
472
484
  } = navList.find(el => el.slug === data?.link) || {};
@@ -642,12 +654,14 @@ var calendar$1 = "data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%
642
654
  var video = "data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2219%22%20viewBox%3D%220%200%2018%2019%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M15.8625%205.1275C15.555%204.9625%2014.91%204.79%2014.0325%205.405L12.93%206.185C12.8475%203.8525%2011.835%202.9375%209.375%202.9375H4.875C2.31%202.9375%201.3125%203.935%201.3125%206.5V12.5C1.3125%2014.225%202.25%2016.0625%204.875%2016.0625H9.375C11.835%2016.0625%2012.8475%2015.1475%2012.93%2012.815L14.0325%2013.595C14.4975%2013.925%2014.9025%2014.03%2015.225%2014.03C15.5025%2014.03%2015.72%2013.9475%2015.8625%2013.8725C16.17%2013.715%2016.6875%2013.2875%2016.6875%2012.215V6.785C16.6875%205.7125%2016.17%205.285%2015.8625%205.1275ZM8.25%209.035C7.4775%209.035%206.84%208.405%206.84%207.625C6.84%206.845%207.4775%206.215%208.25%206.215C9.0225%206.215%209.66%206.845%209.66%207.625C9.66%208.405%209.0225%209.035%208.25%209.035Z%22%20fill%3D%22%23589DF5%22%2F%3E%3C%2Fsvg%3E";
643
655
 
644
656
  /** @returns {import('./types').IconData} */
657
+
645
658
  const getConfiguredIcon1 = url => ({
646
659
  url,
647
660
  svgChildrenConfigs: []
648
661
  });
649
-
650
662
  /** @returns {import('./types').IconData} */
663
+
664
+
651
665
  const getConfiguredIcon2 = (url, stroke, fill) => ({
652
666
  url,
653
667
  svgChildrenConfigs: [{
@@ -656,6 +670,7 @@ const getConfiguredIcon2 = (url, stroke, fill) => ({
656
670
  fill
657
671
  }]
658
672
  });
673
+
659
674
  const icons = {
660
675
  'Live class': getConfiguredIcon2(liveTv, false, true),
661
676
  'Recorded videos': getConfiguredIcon2(liveTv2, false, true),
@@ -688,51 +703,41 @@ const icons = {
688
703
  'Video Play': getConfiguredIcon2(videoPlay, false, true),
689
704
  Quote: getConfiguredIcon2(quote, false, true),
690
705
  // Stock
691
-
692
706
  'Stock Growth': getConfiguredIcon2(stockGrowth, false, true),
693
707
  Money: getConfiguredIcon2(money, false, true),
694
708
  Split: getConfiguredIcon2(split, false, true),
695
709
  Chart: getConfiguredIcon2(chart, false, true),
696
710
  // Personality Development
697
-
698
711
  Leaders: getConfiguredIcon2(leaders, false, true),
699
712
  Women: getConfiguredIcon2(women, false, true),
700
713
  Program: getConfiguredIcon2(program, false, true),
701
714
  // Photography
702
-
703
715
  'Video Editing': getConfiguredIcon2(videoEditing, false, true),
704
716
  Editing: getConfiguredIcon2(editing, false, true),
705
717
  Camera: getConfiguredIcon2(camera, false, true),
706
718
  Sessions: getConfiguredIcon2(sessions, false, true),
707
719
  // Computer
708
-
709
720
  'Regular Batches': getConfiguredIcon2(regularBatches, false, true),
710
721
  'Alternate Batches': getConfiguredIcon2(alternateBatches, false, true),
711
722
  'Weekend Batches': getConfiguredIcon2(weekendBatches, false, true),
712
723
  // Life Coach
713
-
714
724
  Girl: getConfiguredIcon2(girl, false, true),
715
725
  Smile: getConfiguredIcon2(smile, false, true),
716
726
  Relationships: getConfiguredIcon2(relationships, false, true),
717
727
  // Music
718
-
719
728
  Vocal: getConfiguredIcon2(vocal, false, true),
720
729
  Instrument: getConfiguredIcon2(instrument, false, true),
721
730
  Music: getConfiguredIcon2(music, false, true),
722
731
  // Fitness
723
-
724
732
  Workout: getConfiguredIcon2(workout, false, true),
725
733
  Barbell: getConfiguredIcon2(barbell, false, true),
726
734
  Trainer: getConfiguredIcon2(trainer, false, true),
727
735
  Report: getConfiguredIcon2(report, false, true),
728
736
  // Govt Exam
729
-
730
737
  'Govt Exam': getConfiguredIcon2(govtExam, false, true),
731
738
  // IIT JEE
732
-
733
739
  College: getConfiguredIcon2(college, false, true),
734
740
  // Others
735
-
736
741
  Teachers: getConfiguredIcon2(teachers, false, true),
737
742
  Learning: getConfiguredIcon2(learning, false, true),
738
743
  Success: getConfiguredIcon2(success, false, true),
@@ -744,9 +749,12 @@ const icons = {
744
749
  Video: getConfiguredIcon2(video, false, true)
745
750
  };
746
751
 
747
- const someMethod1 = ( /** @type {import('./types').IconData["svgChildrenConfigs"]} */svgChildrenConfigs, color, hoverColor) => {
752
+ const someMethod1 = (
753
+ /** @type {import('./types').IconData["svgChildrenConfigs"]} */
754
+ svgChildrenConfigs, color, hoverColor) => {
748
755
  /** @type {{ [k:string]:React.CSSProperties; }} */
749
756
  const obj = {};
757
+
750
758
  for (const svgChildConfig of svgChildrenConfigs) {
751
759
  if (color) obj['& ' + svgChildConfig.selector] = {
752
760
  fill: svgChildConfig.fill ? color : undefined,
@@ -757,8 +765,10 @@ const someMethod1 = ( /** @type {import('./types').IconData["svgChildrenConfigs"
757
765
  stroke: svgChildConfig.stroke ? hoverColor : undefined
758
766
  };
759
767
  }
768
+
760
769
  return obj;
761
770
  };
771
+
762
772
  const useStyles$1 = reactJss.createUseStyles({
763
773
  '@keyframes slideRight': {
764
774
  to: {
@@ -802,8 +812,8 @@ const defaultSvgState = {
802
812
  childrenConfigs: [],
803
813
  attributes: defaultAttributes
804
814
  };
805
-
806
815
  /** @type {import('./props.type').IconProps} */
816
+
807
817
  const iconDefaultProps = {
808
818
  name: undefined,
809
819
  width: 'auto',
@@ -813,8 +823,8 @@ const iconDefaultProps = {
813
823
  opacity: undefined,
814
824
  className: undefined
815
825
  };
816
-
817
826
  /** @type {import("react").FC<import('./props.type').IconProps>} */
827
+
818
828
  const Icon = ({
819
829
  name,
820
830
  width,
@@ -833,8 +843,10 @@ const Icon = ({
833
843
  }, []);
834
844
  /** */
835
845
 
836
- const rootRef = React.useRef( /** @type {HTMLElement} */null);
837
- // this ref is used to cancel the fetch promise success callback in case name prop changed
846
+ const rootRef = React.useRef(
847
+ /** @type {HTMLElement} */
848
+ null); // this ref is used to cancel the fetch promise success callback in case name prop changed
849
+
838
850
  const currentName = React.useRef(name);
839
851
  const [svgState, setSvgState] = React.useState(defaultSvgState);
840
852
  const styles = useStyles$1({
@@ -845,41 +857,46 @@ const Icon = ({
845
857
  opacity,
846
858
  hoverColor
847
859
  });
860
+
848
861
  const _className = React.useMemo(() => `${styles.root} ${className || ''}`, [className]);
862
+
849
863
  React.useEffect(() => {
850
864
  // reset
851
865
  currentName.current = name;
852
866
  setSvgState(defaultSvgState);
853
867
  const icon = icons[name];
868
+
854
869
  if (icon) {
855
870
  /**
856
871
  * retrieve from cache
857
872
  * @type {Promise<string>}
858
873
  */
859
874
  let svgProm = Icon.getCachedSvgPromise(name);
875
+
860
876
  if (!svgProm) {
861
877
  svgProm = fetch(icon.url).then(r => r.text()).catch(() => {
862
878
  // unset in cache
863
879
  Icon.setCachedSvgPromise(name, undefined);
864
880
  return null;
865
- });
866
- //save in cache
881
+ }); //save in cache
882
+
867
883
  Icon.setCachedSvgPromise(name, svgProm);
868
884
  }
885
+
869
886
  svgProm.then(svg => {
870
887
  if (svg && isMounted.current && name === currentName.current) {
871
888
  const div = document.createElement('div');
872
- div.innerHTML = svg;
889
+ div.innerHTML = svg; // set the new attributes
873
890
 
874
- // set the new attributes
875
891
  const newAttributes = {};
892
+
876
893
  for (const ob of div.firstElementChild.attributes) {
877
894
  const camelCased = ob.name.replace(/(-|:)([a-z])/g, g => g[1].toUpperCase());
878
895
  newAttributes[camelCased] = ob.value;
879
- }
880
-
881
- // setting the state in last.
896
+ } // setting the state in last.
882
897
  // Set state calls are called immediately inside asynchronous operations, timeouts, and intervals.
898
+
899
+
883
900
  setSvgState({
884
901
  innerHtml: div.firstElementChild.innerHTML,
885
902
  childrenConfigs: icon.svgChildrenConfigs,
@@ -899,11 +916,14 @@ const Icon = ({
899
916
  onClick: onClick
900
917
  }));
901
918
  };
902
- Icon.defaultProps = iconDefaultProps;
903
919
 
920
+ Icon.defaultProps = iconDefaultProps;
904
921
  /** static properties for caching */
922
+
905
923
  Icon.cacheStore = {};
924
+
906
925
  Icon.getCachedSvgPromise = name => Icon.cacheStore[name];
926
+
907
927
  Icon.setCachedSvgPromise = (name, prom) => Icon.cacheStore[name] = prom;
908
928
 
909
929
  const useDropdownStyles = createUseStyles(theme => ({
@@ -1015,6 +1035,7 @@ function OptionList({
1015
1035
  isLandingPages
1016
1036
  }) {
1017
1037
  React.useContext(PageContext);
1038
+
1018
1039
  const tabsDataModifier = () => {
1019
1040
  return optionsData?.map(dt => {
1020
1041
  return {
@@ -1026,6 +1047,7 @@ function OptionList({
1026
1047
  };
1027
1048
  });
1028
1049
  };
1050
+
1029
1051
  const tabData = tabsDataModifier();
1030
1052
  const classes = useSectionStyles$a();
1031
1053
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -1114,24 +1136,31 @@ function DesktopHeader({
1114
1136
  const classes = useSectionStyles$a({
1115
1137
  isFixed
1116
1138
  });
1139
+
1117
1140
  const optionDataFn = () => {
1118
1141
  let optionsArr = navData;
1119
1142
  let optionsData = [];
1143
+
1120
1144
  if (optionsArr?.length > 5) {
1121
1145
  optionsData = optionsArr?.slice(0, 4);
1122
1146
  } else {
1123
1147
  optionsData = optionsArr;
1124
1148
  }
1149
+
1125
1150
  return optionsData;
1126
1151
  };
1152
+
1127
1153
  const moreContentFn = () => {
1128
1154
  let optionsArr = navData;
1129
1155
  let moreContent = [];
1156
+
1130
1157
  if (optionsArr?.length > 5) {
1131
1158
  moreContent = optionsArr?.slice(4);
1132
1159
  }
1160
+
1133
1161
  return moreContent;
1134
1162
  };
1163
+
1135
1164
  return /*#__PURE__*/React__default["default"].createElement("nav", {
1136
1165
  className: classes.section
1137
1166
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -1189,6 +1218,7 @@ function MobileHeader({
1189
1218
  const navEl = React.useRef(null);
1190
1219
  React.useLayoutEffect(() => {
1191
1220
  const body = navEl?.current?.ownerDocument?.body;
1221
+
1192
1222
  if (sideMenu) {
1193
1223
  body?.setAttribute('style', 'overflow: hidden;');
1194
1224
  } else {
@@ -1198,6 +1228,7 @@ function MobileHeader({
1198
1228
  let iosUrl = null;
1199
1229
  let androidUrl = null;
1200
1230
  let downloadLink = null;
1231
+
1201
1232
  if (isTutorWebsite) {
1202
1233
  if (header?.iosUrl) {
1203
1234
  iosUrl = /*#__PURE__*/React__default["default"].createElement(Button, {
@@ -1220,6 +1251,7 @@ function MobileHeader({
1220
1251
  }
1221
1252
  });
1222
1253
  }
1254
+
1223
1255
  if (header?.androidURL) {
1224
1256
  androidUrl = /*#__PURE__*/React__default["default"].createElement(Button, {
1225
1257
  data: {
@@ -1240,6 +1272,7 @@ function MobileHeader({
1240
1272
  }
1241
1273
  });
1242
1274
  }
1275
+
1243
1276
  if (iosUrl && androidUrl) {
1244
1277
  downloadLink = /*#__PURE__*/React__default["default"].createElement("div", null, iosUrl, androidUrl);
1245
1278
  } else if (header?.iosUrl) {
@@ -1289,6 +1322,7 @@ function MobileHeader({
1289
1322
  downloadLink = null;
1290
1323
  }
1291
1324
  }
1325
+
1292
1326
  return /*#__PURE__*/React__default["default"].createElement("nav", {
1293
1327
  ref: navEl,
1294
1328
  className: classes.section
@@ -1345,9 +1379,11 @@ function Header({
1345
1379
  isMobile,
1346
1380
  isTutorWebsite
1347
1381
  } = React.useContext(PageContext);
1382
+
1348
1383
  const filterHiddenNavs = () => {
1349
1384
  return data?.navs?.filter(dt => !dt.isHiddenNav);
1350
1385
  };
1386
+
1351
1387
  return isMobile ? /*#__PURE__*/React__default["default"].createElement(MobileHeader, {
1352
1388
  navData: filterHiddenNavs(),
1353
1389
  header: data,
@@ -1375,9 +1411,6 @@ const useSectionStyles$9 = createUseStyles(theme => ({
1375
1411
  boxSizing: 'border-box'
1376
1412
  }
1377
1413
  },
1378
- sectionNoBranding: {
1379
- paddingBottom: '0px'
1380
- },
1381
1414
  upperContainer: {
1382
1415
  display: 'flex',
1383
1416
  justifyContent: 'space-between',
@@ -1386,9 +1419,6 @@ const useSectionStyles$9 = createUseStyles(theme => ({
1386
1419
  borderBottom: '1px solid #E1EAF6',
1387
1420
  alignItems: 'flex-start'
1388
1421
  },
1389
- upperContainerNoBranding: {
1390
- borderBottom: '0px'
1391
- },
1392
1422
  upperContainerItem1: {
1393
1423
  width: '33%',
1394
1424
  display: 'flex',
@@ -1536,9 +1566,9 @@ function Footer({
1536
1566
  const classes = useSectionStyles$9();
1537
1567
  console.log(data, 'this is data');
1538
1568
  return /*#__PURE__*/React__default["default"].createElement("footer", {
1539
- className: data.metadata.isCpBranding ? `${classes.section}` : `${classes.section} ${classes.sectionNoBranding}`
1569
+ className: classes.section
1540
1570
  }, /*#__PURE__*/React__default["default"].createElement("div", {
1541
- className: data.metadata.isCpBranding ? `${classes.upperContainer}` : `${classes.upperContainer} ${classes.upperContainerNoBranding}`
1571
+ className: classes.upperContainer
1542
1572
  }, /*#__PURE__*/React__default["default"].createElement("div", {
1543
1573
  className: classes.upperContainerItem1
1544
1574
  }, /*#__PURE__*/React__default["default"].createElement("img", {
@@ -1709,6 +1739,7 @@ const rustTheme = {
1709
1739
  light: colors.lightRust,
1710
1740
  lightest: colors.lightestRust
1711
1741
  };
1742
+
1712
1743
  const generateThemePalette = themeColors => ({
1713
1744
  primary: themeColors,
1714
1745
  background: {
@@ -1731,6 +1762,7 @@ const generateThemePalette = themeColors => ({
1731
1762
  tertiary: colors.blueGrey
1732
1763
  }
1733
1764
  });
1765
+
1734
1766
  const bluePalette = generateThemePalette(blueTheme);
1735
1767
  const redPalette = generateThemePalette(redTheme);
1736
1768
  const orangePalette = generateThemePalette(orangeTheme);
@@ -1771,7 +1803,9 @@ const fontComponents = {
1771
1803
  'Merriweather Sans': MerriweatherSans,
1772
1804
  'Arima Madurai': ArimaMadurai
1773
1805
  };
1806
+
1774
1807
  const getFontComponent = font => fontComponents[font] || (() => null);
1808
+
1775
1809
  function FontSeeder({
1776
1810
  fontFamily
1777
1811
  }) {
@@ -1781,30 +1815,37 @@ function FontSeeder({
1781
1815
  const useRubikFont = reactJss.createUseStyles({
1782
1816
  '@import': `url('https://fonts.googleapis.com/css2?family=Lato&family=Rubik:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap')`
1783
1817
  });
1818
+
1784
1819
  function Rubik() {
1785
1820
  // to import "Rubik" font css
1786
1821
  useRubikFont();
1787
1822
  return null;
1788
1823
  }
1824
+
1789
1825
  const useIbmPlexSansFont = reactJss.createUseStyles({
1790
1826
  '@import': 'url(https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap)'
1791
1827
  });
1828
+
1792
1829
  function IbmPlexSans() {
1793
1830
  // to import "Ibm Plex Sans" font css
1794
1831
  useIbmPlexSansFont();
1795
1832
  return null;
1796
1833
  }
1834
+
1797
1835
  const useMerriweatherSansFont = reactJss.createUseStyles({
1798
1836
  '@import': 'url(https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap)'
1799
1837
  });
1838
+
1800
1839
  function MerriweatherSans() {
1801
1840
  // to import "Merriweather Sans" font css
1802
1841
  useMerriweatherSansFont();
1803
1842
  return null;
1804
1843
  }
1844
+
1805
1845
  const useArimaMaduraiFont = reactJss.createUseStyles({
1806
1846
  '@import': 'url(https://fonts.googleapis.com/css2?family=Arima+Madurai:wght@400;500;700&display=swap)'
1807
1847
  });
1848
+
1808
1849
  function ArimaMadurai() {
1809
1850
  // to import "Arima Madurai" font css
1810
1851
  useArimaMaduraiFont();
@@ -1835,7 +1876,9 @@ const TYPE_TO_COMPONENT_MAP$1 = {
1835
1876
  TILES_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$1; })),
1836
1877
  EMAIL_DRIP_MARKET: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index; }))
1837
1878
  };
1879
+
1838
1880
  const getCompToRender$1 = type => TYPE_TO_COMPONENT_MAP$1[type] || (() => null);
1881
+
1839
1882
  const MemoisedSection$1 = /*#__PURE__*/React.memo(({
1840
1883
  sectionData,
1841
1884
  extraProps
@@ -1852,7 +1895,9 @@ function SectionRenderer$1({
1852
1895
  extraProps
1853
1896
  }) {
1854
1897
  return /*#__PURE__*/React__default["default"].createElement(React.Suspense, {
1855
- fallback: null /*GIF maybe*/
1898
+ fallback: null
1899
+ /*GIF maybe*/
1900
+
1856
1901
  }, /*#__PURE__*/React__default["default"].createElement(MemoisedSection$1, {
1857
1902
  sectionData: sectionData,
1858
1903
  extraProps: extraProps
@@ -1900,7 +1945,8 @@ function PageRenderer$1({
1900
1945
  templateId,
1901
1946
  isTutorWebsite = false,
1902
1947
  extraProps,
1903
- hideLogin
1948
+ hideLogin,
1949
+ isCustomWebsite
1904
1950
  }) {
1905
1951
  const theme = React.useMemo(() => getTheme(color, font), [color, font]);
1906
1952
  const navList = header?.navs;
@@ -1920,9 +1966,11 @@ function PageRenderer$1({
1920
1966
  isTutorWebsite,
1921
1967
  extraProps,
1922
1968
  hideLogin,
1969
+ isCustomWebsite,
1923
1970
  _id
1924
1971
  }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id]);
1925
- const Wrapper = SectionWrapper || React.Fragment;
1972
+ const Wrapper = SectionWrapper || React.Fragment; // console.log("CONTEXT______", context)
1973
+
1926
1974
  return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
1927
1975
  theme: theme
1928
1976
  }, /*#__PURE__*/React__default["default"].createElement(PageContext.Provider, {
@@ -1999,6 +2047,11 @@ const useSectionStyles$8 = createUseStyles(theme => ({
1999
2047
  margin: '0 auto',
2000
2048
  maxWidth: '100%'
2001
2049
  },
2050
+ imageContainer: {
2051
+ width: '100%',
2052
+ position: 'relative',
2053
+ height: '90%'
2054
+ },
2002
2055
  subTitleHeading: {
2003
2056
  marginBottom: '8px',
2004
2057
  fontSize: '16px',
@@ -2055,6 +2108,10 @@ const useSectionStyles$8 = createUseStyles(theme => ({
2055
2108
  },
2056
2109
  linkButton: {
2057
2110
  padding: '12px 16px'
2111
+ },
2112
+ imageContainer: {
2113
+ height: 'undefined',
2114
+ paddingBottom: '80%'
2058
2115
  }
2059
2116
  }
2060
2117
  }));
@@ -2136,18 +2193,23 @@ const getArrowRotationAngle = props => {
2136
2193
  switch (true) {
2137
2194
  case props.left:
2138
2195
  return 180;
2196
+
2139
2197
  case props.up:
2140
2198
  return 270;
2199
+
2141
2200
  case props.down:
2142
2201
  return 90;
2202
+
2143
2203
  case props.right:
2144
2204
  default:
2145
2205
  return 0;
2146
2206
  }
2147
2207
  };
2208
+
2148
2209
  const sizeHandler = ({
2149
2210
  size
2150
2211
  }) => size === 'small' ? '32px' : '48px';
2212
+
2151
2213
  const useArrowButtonStyles = createUseStyles(theme => ({
2152
2214
  arrowButtonContainer: {
2153
2215
  cursor: 'pointer',
@@ -2187,6 +2249,7 @@ function dotsToShow(i, n) {
2187
2249
  const leftToShow = i < elementsToShow / 2;
2188
2250
  const rightToShow = n - i - 1 < elementsToShow / 2;
2189
2251
  let leftCount, rightCount;
2252
+
2190
2253
  if (leftToShow) {
2191
2254
  leftCount = i;
2192
2255
  rightCount = elementsToShow - i - 1;
@@ -2197,11 +2260,13 @@ function dotsToShow(i, n) {
2197
2260
  leftCount = 2;
2198
2261
  rightCount = 2;
2199
2262
  }
2263
+
2200
2264
  return {
2201
2265
  leftCount,
2202
2266
  rightCount
2203
2267
  };
2204
2268
  }
2269
+
2205
2270
  function Carousel({
2206
2271
  settings,
2207
2272
  children,
@@ -2255,12 +2320,15 @@ function Carousel({
2255
2320
  ...settings,
2256
2321
  className: settings?.className ? settings?.className + ' ' + classes.sliderClass : classes.sliderClass
2257
2322
  };
2323
+
2258
2324
  const nextClick = () => {
2259
2325
  sliderRef.current.slickNext();
2260
2326
  };
2327
+
2261
2328
  const previousClick = () => {
2262
2329
  sliderRef.current.slickPrev();
2263
2330
  };
2331
+
2264
2332
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Slider__default["default"], _extends({
2265
2333
  ref: sliderRef
2266
2334
  }, sliderSettings), children), hideArrow || isMobile ? null : /*#__PURE__*/React__default["default"].createElement("div", {
@@ -2276,6 +2344,41 @@ function Carousel({
2276
2344
  })));
2277
2345
  }
2278
2346
 
2347
+ const NextImageRenderer = ({
2348
+ src,
2349
+ ...props
2350
+ }) => {
2351
+ const {
2352
+ isCustomWebsite
2353
+ } = React.useContext(PageContext);
2354
+ let {
2355
+ refSetter,
2356
+ className
2357
+ } = props;
2358
+
2359
+ if (isCustomWebsite) {
2360
+ return /*#__PURE__*/React__default["default"].createElement(require.resolve('next/image').default, {
2361
+ src: src,
2362
+ // height: "640",
2363
+ // width: "959",
2364
+ layout: 'fill',
2365
+ ref: {
2366
+ refSetter
2367
+ },
2368
+ className: {
2369
+ className
2370
+ },
2371
+ ...props
2372
+ });
2373
+ } else {
2374
+ return /*#__PURE__*/React__default["default"].createElement("img", {
2375
+ ref: refSetter,
2376
+ className: className,
2377
+ src: src
2378
+ });
2379
+ }
2380
+ };
2381
+
2279
2382
  function Section$4({
2280
2383
  nodeData
2281
2384
  }) {
@@ -2319,12 +2422,15 @@ function Section$4({
2319
2422
  data: nodeData.cta.metadata,
2320
2423
  type: nodeData?.cta?.metadata?.type,
2321
2424
  size: isMobile ? 'small' : 'medium'
2322
- })), /*#__PURE__*/React__default["default"].createElement("img", {
2425
+ })), /*#__PURE__*/React__default["default"].createElement("div", {
2426
+ className: classes?.imageContainer
2427
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
2323
2428
  ref: nodeData?.image?.refSetter,
2324
2429
  className: classes.sideBannerImage,
2325
2430
  src: nodeData.image.metadata.value
2326
- })));
2431
+ }))));
2327
2432
  }
2433
+
2328
2434
  function BannerCarouselRight({
2329
2435
  sectionData
2330
2436
  }) {
@@ -2350,7 +2456,9 @@ function BannerCarouselRight({
2350
2456
  className: classes.sectionContainer
2351
2457
  }, /*#__PURE__*/React__default["default"].createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$4, {
2352
2458
  nodeData: node,
2353
- key: idx /* or some other unique property */
2459
+ key: idx
2460
+ /* or some other unique property */
2461
+
2354
2462
  })))));
2355
2463
  }
2356
2464
 
@@ -2557,9 +2665,11 @@ function List({
2557
2665
  containerWidth
2558
2666
  });
2559
2667
  const [nodeData] = sectionData.components;
2668
+
2560
2669
  const getNumber = val => {
2561
2670
  return val.toString().length == 1 ? '0' + val : val;
2562
2671
  };
2672
+
2563
2673
  return /*#__PURE__*/React__default["default"].createElement("section", {
2564
2674
  className: classes.section
2565
2675
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -2629,9 +2739,9 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2629
2739
  sectionContainer: {
2630
2740
  margin: '0 auto',
2631
2741
  width: '100%',
2632
- maxWidth: ({
2633
- containerWidth
2634
- } = {}) => containerWidth
2742
+ // maxWidth: ({ containerWidth } = {}) => containerWidth,
2743
+ position: 'absolute',
2744
+ zIndex: '99'
2635
2745
  },
2636
2746
  absoluteButtons: {
2637
2747
  display: 'flex',
@@ -2645,19 +2755,33 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2645
2755
  padding: '100px 0',
2646
2756
  height: '100%',
2647
2757
  display: 'flex',
2648
- alignItems: 'center',
2649
- backgroundImage: ({
2650
- imageUrl
2651
- } = {}) => `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
2652
- backgroundPosition: 'center',
2653
- backgroundSize: 'cover'
2758
+ alignItems: 'center' // backgroundImage: ({ imageUrl } = {}) =>
2759
+ // `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
2760
+ // backgroundPosition: 'center',
2761
+ // backgroundSize: 'cover'
2762
+
2763
+ },
2764
+ centerBgImageContainer: {
2765
+ width: '100%',
2766
+ position: 'relative',
2767
+ paddingBottom: '35rem',
2768
+ backgroundImage: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%)',
2769
+ backgroundSize: 'cover',
2770
+ backgroundPosition: 'center center'
2771
+ },
2772
+ centerBgImage: {
2773
+ objectFit: 'cover',
2774
+ backgroundImage: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%)',
2775
+ backgroundSize: 'cover',
2776
+ backgroundPosition: 'center center'
2654
2777
  },
2655
2778
  partialBackground: {
2656
2779
  height: '100%'
2657
2780
  },
2658
2781
  textContainer: {
2659
2782
  padding: '0 18%',
2660
- margin: '0 auto'
2783
+ margin: '0 auto',
2784
+ width: '80%'
2661
2785
  },
2662
2786
  subTitleHeading: {
2663
2787
  color: theme?.palette?.font?.invertedDefault,
@@ -2667,7 +2791,7 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2667
2791
  },
2668
2792
  heading: {
2669
2793
  margin: '0',
2670
- fontSize: '72px',
2794
+ fontSize: '62px',
2671
2795
  color: theme?.palette?.font?.invertedDefault,
2672
2796
  wordBreak: 'break-word'
2673
2797
  },
@@ -2689,7 +2813,9 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2689
2813
  },
2690
2814
  contentContainer: {
2691
2815
  display: 'flex',
2692
- flexFlow: 'column-reverse'
2816
+ flexFlow: 'column-reverse',
2817
+ justifyContent: 'center',
2818
+ padding: '0px'
2693
2819
  },
2694
2820
  textContainer: {
2695
2821
  padding: '20px'
@@ -2699,12 +2825,19 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2699
2825
  },
2700
2826
  description: {
2701
2827
  margin: '16px 0'
2828
+ },
2829
+ centerBgImageContainer: {
2830
+ width: '100%',
2831
+ position: 'relative',
2832
+ height: '34rem',
2833
+ paddingBottom: '100%'
2702
2834
  }
2703
2835
  }
2704
2836
  }));
2705
2837
 
2706
2838
  const Section$3 = ({
2707
- nodeData
2839
+ nodeData,
2840
+ isCustomWebsite
2708
2841
  }) => {
2709
2842
  const {
2710
2843
  layout: {
@@ -2716,6 +2849,7 @@ const Section$3 = ({
2716
2849
  imageUrl: nodeData.image.metadata.value,
2717
2850
  containerWidth
2718
2851
  });
2852
+ console.log('isCustomWebsite______', isCustomWebsite);
2719
2853
  return /*#__PURE__*/React__default["default"].createElement("section", {
2720
2854
  className: classes.bannerCarouselCenterSection
2721
2855
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -2749,11 +2883,19 @@ const Section$3 = ({
2749
2883
  data: nodeData.cta.metadata,
2750
2884
  type: nodeData?.cta?.metadata?.type,
2751
2885
  size: isMobile ? 'small' : 'medium'
2752
- })))));
2886
+ }))), /*#__PURE__*/React__default["default"].createElement("div", {
2887
+ className: classes?.centerBgImageContainer
2888
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
2889
+ src: nodeData.image.metadata.value,
2890
+ className: classes?.centerBgImage
2891
+ }))));
2753
2892
  };
2893
+
2754
2894
  function BannerCarouselCenter({
2755
- sectionData
2895
+ sectionData,
2896
+ isCustomWebsite
2756
2897
  }) {
2898
+ console.log('isCustomWebsite______', isCustomWebsite);
2757
2899
  const classes = useSectionStyles$6();
2758
2900
  const [{
2759
2901
  bannerCarousel
@@ -2767,7 +2909,10 @@ function BannerCarouselCenter({
2767
2909
  className: classes.bannerCarouselCenterSection
2768
2910
  }, /*#__PURE__*/React__default["default"].createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$3, {
2769
2911
  nodeData: node,
2770
- key: idx /* or some other unique property */
2912
+ isCustomWebsite: isCustomWebsite,
2913
+ key: idx
2914
+ /* or some other unique property */
2915
+
2771
2916
  }))));
2772
2917
  }
2773
2918
 
@@ -2808,7 +2953,10 @@ const useSectionStyles$5 = createUseStyles(theme => {
2808
2953
  position: 'relative'
2809
2954
  },
2810
2955
  imageContainer: {
2811
- position: 'relative'
2956
+ position: 'relative',
2957
+ width: '100%',
2958
+ // height: "650px"
2959
+ paddingBottom: '82%'
2812
2960
  },
2813
2961
  imageBorder: {
2814
2962
  border: `2px solid ${theme?.palette?.primary?.light}`,
@@ -2899,10 +3047,10 @@ function Section$2({
2899
3047
  className: classes.imageContainerDiv
2900
3048
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2901
3049
  className: classes.imageContainer
2902
- }, /*#__PURE__*/React__default["default"].createElement("img", {
3050
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
3051
+ src: nodeData.image.metadata.value,
2903
3052
  ref: nodeData?.image?.refSetter,
2904
- className: classes.sideBannerImage,
2905
- src: nodeData.image.metadata.value
3053
+ className: classes.sideBannerImage
2906
3054
  }), /*#__PURE__*/React__default["default"].createElement("div", {
2907
3055
  className: classes.imageBorder
2908
3056
  }))), /*#__PURE__*/React__default["default"].createElement("div", {
@@ -2934,9 +3082,12 @@ function Section$2({
2934
3082
  size: isMobile ? 'small' : 'medium'
2935
3083
  })));
2936
3084
  }
3085
+
2937
3086
  function BannerCarouselLeft({
2938
- sectionData
3087
+ sectionData,
3088
+ isCustomWebsite
2939
3089
  }) {
3090
+ console.log('isCustomWebsite______', isCustomWebsite);
2940
3091
  const {
2941
3092
  layout: {
2942
3093
  containerWidth
@@ -2955,7 +3106,9 @@ function BannerCarouselLeft({
2955
3106
  className: classes.sectionContainer
2956
3107
  }, /*#__PURE__*/React__default["default"].createElement(Wrapper, null, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$2, {
2957
3108
  nodeData: node,
2958
- key: idx /* or some other unique property */
3109
+ key: idx
3110
+ /* or some other unique property */
3111
+
2959
3112
  })))));
2960
3113
  }
2961
3114
 
@@ -3110,6 +3263,7 @@ async function postApiCall(baseURLs, data) {
3110
3263
  },
3111
3264
  data
3112
3265
  });
3266
+
3113
3267
  if (res) {
3114
3268
  return res.data;
3115
3269
  }
@@ -3134,6 +3288,7 @@ async function postApiCallForm(baseURLs, data, extraProps) {
3134
3288
  if (extraProps && extraProps.formSubmitSuccess) {
3135
3289
  extraProps.formSubmitSuccess();
3136
3290
  }
3291
+
3137
3292
  return res.data;
3138
3293
  });
3139
3294
  } catch (err) {
@@ -3246,6 +3401,7 @@ function SubscribeToNewsletter({
3246
3401
  const [inputVal, setInputVal] = React.useState(formInitialValue);
3247
3402
  let [isValid, setIsValid] = React.useState(true);
3248
3403
  let [btnDisabled, setBtnDisabled] = React.useState(false);
3404
+
3249
3405
  const handleSubmit = () => {
3250
3406
  let data = {
3251
3407
  sectionId: sectionData.sectionId,
@@ -3261,9 +3417,11 @@ function SubscribeToNewsletter({
3261
3417
  setBtnDisabled(true);
3262
3418
  setInputVal(formInitialValue);
3263
3419
  };
3420
+
3264
3421
  const checkValidity = () => {
3265
3422
  if (validations?.[nodeData?.inputField?.metadata?.validationType]?.length) {
3266
3423
  let regex = new RegExp(validations[nodeData?.inputField?.metadata?.validationType]);
3424
+
3267
3425
  if (regex?.test(inputVal)) {
3268
3426
  setIsValid(true);
3269
3427
  } else {
@@ -3271,6 +3429,7 @@ function SubscribeToNewsletter({
3271
3429
  }
3272
3430
  }
3273
3431
  };
3432
+
3274
3433
  React.useEffect(() => {
3275
3434
  if (!isValid) {
3276
3435
  setBtnDisabled(true);
@@ -3390,8 +3549,7 @@ const useTestimonialStyles = createUseStyles(theme => {
3390
3549
  color: theme?.palette?.font?.default,
3391
3550
  margin: '10px 0 40px 10px',
3392
3551
  overflow: 'hidden',
3393
- wordBreak: 'break-word',
3394
- // whiteSpace: 'nowrap',
3552
+ whiteSpace: 'nowrap',
3395
3553
  textOverflow: 'ellipsis'
3396
3554
  },
3397
3555
  sliderContainer: {
@@ -3431,8 +3589,16 @@ const useTestimonialStyles = createUseStyles(theme => {
3431
3589
  },
3432
3590
  userContainer: {
3433
3591
  display: 'flex',
3592
+ gap: '15px',
3434
3593
  padding: '0 0 29px 48px'
3435
3594
  },
3595
+ userImageContainer: {
3596
+ width: '64px',
3597
+ height: '64px',
3598
+ position: 'relative',
3599
+ // paddingBottom: '55px',
3600
+ objectFit: 'cover'
3601
+ },
3436
3602
  userImageDummy: {
3437
3603
  width: '64px',
3438
3604
  height: '64px',
@@ -3474,8 +3640,7 @@ const useTestimonialStyles = createUseStyles(theme => {
3474
3640
  color: theme?.palette?.font?.default,
3475
3641
  margin: '4px 0 12px 0',
3476
3642
  overflow: 'hidden',
3477
- // whiteSpace: 'nowrap',
3478
- wordBreak: 'break-word',
3643
+ whiteSpace: 'nowrap',
3479
3644
  textOverflow: 'ellipsis'
3480
3645
  },
3481
3646
  userImageDummy: {
@@ -3502,6 +3667,10 @@ const useTestimonialStyles = createUseStyles(theme => {
3502
3667
  overflow: 'hidden',
3503
3668
  whiteSpace: 'nowrap',
3504
3669
  textOverflow: 'ellipsis'
3670
+ },
3671
+ userImageContainer: {
3672
+ width: '48px',
3673
+ height: '48px'
3505
3674
  }
3506
3675
  }
3507
3676
  };
@@ -3560,12 +3729,22 @@ function Section$1({
3560
3729
  }
3561
3730
  }), /*#__PURE__*/React__default["default"].createElement("div", {
3562
3731
  className: classes.userContainer
3563
- }, el?.cardUserImage?.metadata?.value ? /*#__PURE__*/React__default["default"].createElement("img", {
3732
+ }, el?.cardUserImage?.metadata?.value ?
3733
+ /*#__PURE__*/
3734
+ // <img
3735
+ // ref={el?.cardUserImage?.refSetter}
3736
+ // className={classes.userImage}
3737
+ // src={el?.cardUserImage?.metadata?.value}
3738
+ // alt="userImg"
3739
+ // />
3740
+ React__default["default"].createElement("div", {
3741
+ className: classes.userImageContainer
3742
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
3564
3743
  ref: el?.cardUserImage?.refSetter,
3565
3744
  className: classes.userImage,
3566
3745
  src: el?.cardUserImage?.metadata?.value,
3567
3746
  alt: "userImg"
3568
- }) : /*#__PURE__*/React__default["default"].createElement("div", {
3747
+ })) : /*#__PURE__*/React__default["default"].createElement("div", {
3569
3748
  ref: el?.cardUserImage?.refSetter,
3570
3749
  className: classes.userImageDummy
3571
3750
  }), /*#__PURE__*/React__default["default"].createElement("h3", {
@@ -3600,6 +3779,7 @@ function Section$1({
3600
3779
  className: classes.contentRow
3601
3780
  }, carouselContent))));
3602
3781
  }
3782
+
3603
3783
  function Testimonials({
3604
3784
  sectionData
3605
3785
  }) {
@@ -3664,6 +3844,7 @@ const loaderStyle = theme => ({
3664
3844
  });
3665
3845
 
3666
3846
  const useStyles = reactJss.createUseStyles(loaderStyle);
3847
+
3667
3848
  function Loader({
3668
3849
  texts
3669
3850
  }) {
@@ -3675,11 +3856,13 @@ function Loader({
3675
3856
  React.useEffect(() => {
3676
3857
  if (texts && texts.length) {
3677
3858
  let textID = '';
3859
+
3678
3860
  for (let i = 0; i < texts.length; i++) {
3679
3861
  textID = setTimeout(() => {
3680
3862
  setLoaderText(texts[i]);
3681
3863
  }, 2000 * i);
3682
3864
  }
3865
+
3683
3866
  return () => {
3684
3867
  clearTimeout(textID);
3685
3868
  };
@@ -3708,14 +3891,16 @@ const useVideoStyles$1 = createUseStyles(theme => {
3708
3891
  isLoaded
3709
3892
  } = {}) => isLoaded ? 'block' : 'none'
3710
3893
  },
3894
+ icon: {
3895
+ zIndex: '999'
3896
+ },
3711
3897
  imgContainer: {
3712
3898
  position: 'absolute',
3713
3899
  width: '100%',
3714
3900
  height: '100%',
3715
3901
  borderRadius: theme.shape.borderRadius.small,
3716
- backgroundImage: ({
3717
- imageUrl
3718
- } = {}) => `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
3902
+ // backgroundImage: ({ imageUrl } = {}) =>
3903
+ // `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
3719
3904
  backgroundSize: 'cover',
3720
3905
  display: 'flex',
3721
3906
  justifyContent: 'center',
@@ -3747,20 +3932,26 @@ function VideoPlayer(props) {
3747
3932
  imageUrl: imageUrl
3748
3933
  });
3749
3934
  const theme = useTheme();
3935
+
3750
3936
  function getId(url) {
3751
3937
  var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
3752
3938
  var match = url?.match(regExp);
3939
+
3753
3940
  if (match?.[2].length == 11) {
3754
3941
  return 'https://www.youtube.com/embed/' + match[2];
3755
3942
  } else {
3756
3943
  return url;
3757
3944
  }
3758
3945
  }
3946
+
3759
3947
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, !isLoaded && /*#__PURE__*/React__default["default"].createElement("div", {
3760
3948
  className: classes.imgContainer
3761
- }, isEnabled ? /*#__PURE__*/React__default["default"].createElement(Loader, null) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, props.onlyThumbnail ? null : /*#__PURE__*/React__default["default"].createElement(Icon, {
3949
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
3950
+ src: imageUrl
3951
+ }), isEnabled ? /*#__PURE__*/React__default["default"].createElement(Loader, null) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, props.onlyThumbnail ? null : /*#__PURE__*/React__default["default"].createElement(Icon, {
3762
3952
  name: "Video Play",
3763
3953
  color: theme.palette.font.invertedDefault,
3954
+ className: classes?.icon,
3764
3955
  onClick: () => {
3765
3956
  setIsEnableed(true);
3766
3957
  }
@@ -4598,8 +4789,8 @@ const usePhotoGalleryStyles = createUseStyles(theme => {
4598
4789
  width: 'calc(100% - 2px)',
4599
4790
  position: 'relative',
4600
4791
  paddingBottom: '59.83%' // keeping aspect ratio 585x350
4601
- },
4602
4792
 
4793
+ },
4603
4794
  contentRow: {
4604
4795
  display: 'grid',
4605
4796
  gridTemplateColumns: ({
@@ -4681,11 +4872,10 @@ function PhotoGallery({
4681
4872
  key: idx
4682
4873
  }, /*#__PURE__*/React__default["default"].createElement("div", {
4683
4874
  className: classes.singleCard
4684
- }, /*#__PURE__*/React__default["default"].createElement("img", {
4685
- ref: el?.cardImage?.refSetter,
4686
- className: classes?.carouselImage,
4875
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
4687
4876
  src: el?.cardImage?.metadata?.value,
4688
- alt: ""
4877
+ ref: el?.cardImage?.refSetter,
4878
+ className: classes?.carouselImage
4689
4879
  })));
4690
4880
  });
4691
4881
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -4858,6 +5048,7 @@ const FAQListing = ({
4858
5048
  isSelected: selectedIndex === index
4859
5049
  })))));
4860
5050
  };
5051
+
4861
5052
  const Accordion = ({
4862
5053
  item,
4863
5054
  isSelected,
@@ -5131,9 +5322,11 @@ const useCourseStyles = createUseStyles(theme => {
5131
5322
  courseCardImg: {
5132
5323
  width: '100%',
5133
5324
  height: '200px',
5134
- backgroundSize: '100% 100%',
5135
- backgroundRepeat: 'no-repeat',
5136
- backgroundPosition: 'center',
5325
+ position: 'relative',
5326
+ borderTopLeftRadius: theme?.shape?.borderRadius?.regular,
5327
+ borderTopRightRadius: theme?.shape?.borderRadius?.regular
5328
+ },
5329
+ courseCardImgThumbnail: {
5137
5330
  borderTopLeftRadius: theme?.shape?.borderRadius?.regular,
5138
5331
  borderTopRightRadius: theme?.shape?.borderRadius?.regular
5139
5332
  },
@@ -5142,10 +5335,9 @@ const useCourseStyles = createUseStyles(theme => {
5142
5335
  flexGrow: 1,
5143
5336
  display: 'flex',
5144
5337
  flexDirection: 'column',
5145
- justifyContent: 'space-between'
5146
- //alignItems: 'center',
5147
- },
5338
+ justifyContent: 'space-between' //alignItems: 'center',
5148
5339
 
5340
+ },
5149
5341
  courseCardTags: {
5150
5342
  display: 'flex',
5151
5343
  justifyContent: 'flex-start',
@@ -5171,12 +5363,11 @@ const useCourseStyles = createUseStyles(theme => {
5171
5363
  wordBreak: 'break-word',
5172
5364
  padding: '12px 0px',
5173
5365
  textAlign: 'left',
5174
- display: 'inline-block'
5175
- // overflow: 'hidden',
5366
+ display: 'inline-block' // overflow: 'hidden',
5176
5367
  // whiteSpace: 'nowrap',
5177
5368
  // textOverflow: 'ellipsis'
5178
- },
5179
5369
 
5370
+ },
5180
5371
  courseCardDiscount: {
5181
5372
  display: 'flex',
5182
5373
  justifyContent: 'flex-start',
@@ -5258,8 +5449,7 @@ const useCourseStyles = createUseStyles(theme => {
5258
5449
  }
5259
5450
  },
5260
5451
  '@media (max-width: 768px)': {
5261
- coursesContainer: {
5262
- //background: theme?.palette?.background?.primary
5452
+ coursesContainer: {//background: theme?.palette?.background?.primary
5263
5453
  },
5264
5454
  coursesCardAndText: {
5265
5455
  padding: '70px 30px'
@@ -5291,6 +5481,7 @@ async function getCourseList(baseURLs, hashToken) {
5291
5481
  if (!hashToken) {
5292
5482
  throw 'Missing hash token';
5293
5483
  }
5484
+
5294
5485
  const res = await axios__default["default"]({
5295
5486
  method: 'get',
5296
5487
  baseURL: baseURLs?.API_COURSE_URL,
@@ -5302,6 +5493,7 @@ async function getCourseList(baseURLs, hashToken) {
5302
5493
  requiredFilters: '[10]'
5303
5494
  }
5304
5495
  });
5496
+
5305
5497
  if (res) {
5306
5498
  return res.data;
5307
5499
  }
@@ -5313,6 +5505,7 @@ function getShortenedSubstring(name, length, allowDots = true) {
5313
5505
  if (name) {
5314
5506
  return name.length < length ? name : `${name.substr(0, length)}${allowDots && '...'}`;
5315
5507
  }
5508
+
5316
5509
  return '';
5317
5510
  }
5318
5511
 
@@ -5328,13 +5521,11 @@ function CourseCard({
5328
5521
  return /*#__PURE__*/React__default["default"].createElement("div", {
5329
5522
  className: classes.singleCard
5330
5523
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5331
- style: card?.imageUrl ? {
5332
- backgroundImage: `url("${card?.imageUrl}")`
5333
- } : {
5334
- backgroundImage: `url("${defaultCardImg}")`
5335
- },
5336
5524
  className: classes.courseCardImg
5337
- }), /*#__PURE__*/React__default["default"].createElement("div", {
5525
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
5526
+ src: card?.imageUrl ? card?.imageUrl : defaultCardImg,
5527
+ className: classes.courseCardImgThumbnail
5528
+ })), /*#__PURE__*/React__default["default"].createElement("div", {
5338
5529
  className: classes.courseCardData
5339
5530
  }, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", {
5340
5531
  className: classes.courseCardTags
@@ -5361,9 +5552,9 @@ function CourseCard({
5361
5552
  className: classes.courseCardPriceContainer
5362
5553
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5363
5554
  className: classes.courseCardPrice
5364
- }, '₹', card?.finalPrice), card?.price !== card?.finalPrice ? /*#__PURE__*/React__default["default"].createElement("div", {
5555
+ }, '₹', card?.finalPrice), /*#__PURE__*/React__default["default"].createElement("div", {
5365
5556
  className: classes.courseCardStrikePrice
5366
- }, /*#__PURE__*/React__default["default"].createElement("span", null, '₹', card?.price), ' ', discount > 0 && discount + '% OFF') : null), /*#__PURE__*/React__default["default"].createElement("a", {
5557
+ }, /*#__PURE__*/React__default["default"].createElement("span", null, '₹', card?.price), ' ', discount > 0 && discount + '% OFF')), /*#__PURE__*/React__default["default"].createElement("a", {
5367
5558
  className: classes.coursesAnchorTag,
5368
5559
  href: isEdit ? null : card?.shareableLink
5369
5560
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -5392,11 +5583,13 @@ function courses({
5392
5583
  containerWidth
5393
5584
  });
5394
5585
  const [nodeData] = sectionData?.components;
5586
+
5395
5587
  const handleApiCall = () => {
5396
5588
  if (baseURLs) {
5397
5589
  getCourseList(baseURLs, hashToken).then(response => {
5398
5590
  const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
5399
5591
  const coursesData = response?.data?.coursesData;
5592
+
5400
5593
  if (coursesData && coursesData.length) {
5401
5594
  setCardList(response?.data?.coursesData);
5402
5595
  setShowShimmer(false);
@@ -5407,12 +5600,12 @@ function courses({
5407
5600
  setShowShimmer(false);
5408
5601
  setFallbackImages(placeholders);
5409
5602
  }
5410
- }
5411
- // For User Website & Draft Preview: If no data found, hide section.
5603
+ } // For User Website & Draft Preview: If no data found, hide section.
5412
5604
  else setErrored(true);
5413
5605
  }
5414
5606
  }).catch(err => {
5415
5607
  const errMsg = err?.response?.data?.data?.message;
5608
+
5416
5609
  if (errMsg === 'NOT_FOUND') {
5417
5610
  if (nodeData?.cardCarousel?.metadata?.placeholders?.length && isEdit) {
5418
5611
  setShowShimmer(false);
@@ -5424,16 +5617,16 @@ function courses({
5424
5617
  });
5425
5618
  }
5426
5619
  };
5620
+
5427
5621
  React.useEffect(() => {
5428
- const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
5429
- // For Master template Preview: Show placeholder images. If placeholder doesn't come from backend, show shimmer.
5622
+ const placeholders = nodeData?.cardCarousel?.metadata?.placeholders; // For Master template Preview: Show placeholder images. If placeholder doesn't come from backend, show shimmer.
5623
+
5430
5624
  if (isMasterTemplate) {
5431
5625
  if (placeholders && placeholders.length) {
5432
5626
  setShowShimmer(false);
5433
5627
  setFallbackImages(placeholders);
5434
5628
  }
5435
- }
5436
- // other
5629
+ } // other
5437
5630
  else {
5438
5631
  handleApiCall();
5439
5632
  }
@@ -5498,6 +5691,7 @@ function courses({
5498
5691
  });
5499
5692
  })))));
5500
5693
  }
5694
+
5501
5695
  function SimpleCardsContainer({
5502
5696
  children,
5503
5697
  classes
@@ -5651,7 +5845,7 @@ const SingleSlide = ({
5651
5845
  className: classes.singleSlideContainer
5652
5846
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5653
5847
  className: classes.imageContainer
5654
- }, /*#__PURE__*/React__default["default"].createElement("img", {
5848
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
5655
5849
  ref: data?.image?.refSetter,
5656
5850
  className: classes.image,
5657
5851
  alt: "Hero Image",
@@ -5793,7 +5987,7 @@ const useSectionStyles$1 = createUseStyles(theme => ({
5793
5987
  marginTop: '32px'
5794
5988
  },
5795
5989
  leftContainer: {
5796
- width: '65%'
5990
+ width: '50%'
5797
5991
  },
5798
5992
  subtitle: {
5799
5993
  margin: '0 0 40px 0',
@@ -5913,6 +6107,7 @@ function FormEnquiry({
5913
6107
  setBtnDisabled(true);
5914
6108
  }
5915
6109
  }, [validData]);
6110
+
5916
6111
  const handleSubmit = () => {
5917
6112
  let data = {
5918
6113
  sectionId: sectionData?._id || null,
@@ -5923,22 +6118,23 @@ function FormEnquiry({
5923
6118
  setBtnDisabled(true);
5924
6119
  setInputVal(formInitialValue);
5925
6120
  };
6121
+
5926
6122
  const checkValidity = (regexField, fieldname, fieldValidity) => {
5927
6123
  if (validations?.[regexField]?.length) {
5928
6124
  let regex = new RegExp(validations[regexField]);
6125
+
5929
6126
  if (regex?.test(inputVal[fieldname])) {
5930
- setValidData({
5931
- ...validData,
6127
+ setValidData({ ...validData,
5932
6128
  [fieldValidity]: 1
5933
6129
  });
5934
6130
  } else {
5935
- setValidData({
5936
- ...validData,
6131
+ setValidData({ ...validData,
5937
6132
  [fieldValidity]: 0
5938
6133
  });
5939
6134
  }
5940
6135
  }
5941
6136
  };
6137
+
5942
6138
  return /*#__PURE__*/React__default["default"].createElement("section", {
5943
6139
  className: classes.section
5944
6140
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6018,8 +6214,7 @@ function FormEnquiry({
6018
6214
  isValid: validData.nameValid,
6019
6215
  inputType: 'input',
6020
6216
  onChange: e => {
6021
- setInputVal({
6022
- ...inputVal,
6217
+ setInputVal({ ...inputVal,
6023
6218
  name: e.target.value
6024
6219
  });
6025
6220
  },
@@ -6027,8 +6222,7 @@ function FormEnquiry({
6027
6222
  checkValidity(nodeData?.nameField?.metadata?.validationType, 'name', 'nameValid');
6028
6223
  },
6029
6224
  onFocus: () => {
6030
- setValidData({
6031
- ...validData,
6225
+ setValidData({ ...validData,
6032
6226
  nameValid: 1
6033
6227
  });
6034
6228
  }
@@ -6040,8 +6234,7 @@ function FormEnquiry({
6040
6234
  isValid: validData.phoneValid,
6041
6235
  inputType: 'input',
6042
6236
  onChange: e => {
6043
- setInputVal({
6044
- ...inputVal,
6237
+ setInputVal({ ...inputVal,
6045
6238
  phone: e.target.value
6046
6239
  });
6047
6240
  },
@@ -6049,8 +6242,7 @@ function FormEnquiry({
6049
6242
  checkValidity(nodeData?.phoneField?.metadata?.validationType, 'phone', 'phoneValid');
6050
6243
  },
6051
6244
  onFocus: () => {
6052
- setValidData({
6053
- ...validData,
6245
+ setValidData({ ...validData,
6054
6246
  phoneValid: 1
6055
6247
  });
6056
6248
  }
@@ -6062,8 +6254,7 @@ function FormEnquiry({
6062
6254
  isValid: validData.emailValid,
6063
6255
  inputType: 'input',
6064
6256
  onChange: e => {
6065
- setInputVal({
6066
- ...inputVal,
6257
+ setInputVal({ ...inputVal,
6067
6258
  email: e.target.value
6068
6259
  });
6069
6260
  },
@@ -6071,8 +6262,7 @@ function FormEnquiry({
6071
6262
  checkValidity(nodeData?.emailField?.metadata?.validationType, 'email', 'emailValid');
6072
6263
  },
6073
6264
  onFocus: () => {
6074
- setValidData({
6075
- ...validData,
6265
+ setValidData({ ...validData,
6076
6266
  emailValid: 1
6077
6267
  });
6078
6268
  }
@@ -6084,8 +6274,7 @@ function FormEnquiry({
6084
6274
  isValid: validData.messageValid,
6085
6275
  inputType: 'textarea',
6086
6276
  onChange: e => {
6087
- setInputVal({
6088
- ...inputVal,
6277
+ setInputVal({ ...inputVal,
6089
6278
  message: e.target.value
6090
6279
  });
6091
6280
  },
@@ -6093,12 +6282,11 @@ function FormEnquiry({
6093
6282
  checkValidity(nodeData?.messageField?.metadata?.validationType, 'message', 'messageValid');
6094
6283
  },
6095
6284
  onFocus: () => {
6096
- setValidData({
6097
- ...validData,
6285
+ setValidData({ ...validData,
6098
6286
  messageValid: 1
6099
6287
  });
6100
6288
  }
6101
- })), nodeData?.cta?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement(Button, {
6289
+ })), /*#__PURE__*/React__default["default"].createElement(Button, {
6102
6290
  ref: nodeData?.cta?.refSetter,
6103
6291
  data: btnDisabled && validData?.messageValid && validData?.emailValid && validData?.nameValid && validData?.phoneValid ? {
6104
6292
  value: 'Submitted'
@@ -6138,6 +6326,7 @@ const useSectionStyles = createUseStyles(theme => ({
6138
6326
  }
6139
6327
  },
6140
6328
  contactContainer: {
6329
+ width: '80%',
6141
6330
  margin: '0 auto',
6142
6331
  maxWidth: ({
6143
6332
  containerWidth
@@ -6188,10 +6377,15 @@ const useSectionStyles = createUseStyles(theme => ({
6188
6377
  display: 'flex',
6189
6378
  alignItems: 'flex-start',
6190
6379
  flexDirection: 'column',
6191
- width: '100%',
6192
- '& img': {
6193
- width: '80%'
6194
- }
6380
+ width: '85%',
6381
+ position: 'relative',
6382
+ paddingBottom: '55%' // '& img': {
6383
+ // width: '80%'
6384
+ // }
6385
+
6386
+ },
6387
+ telephoneImage: {
6388
+ width: '80%'
6195
6389
  },
6196
6390
  rightContainer: {
6197
6391
  width: '50%',
@@ -6290,6 +6484,9 @@ const useSectionStyles = createUseStyles(theme => ({
6290
6484
  },
6291
6485
  error: {
6292
6486
  bottom: '-2px'
6487
+ },
6488
+ contactContainer: {
6489
+ width: '97%'
6293
6490
  }
6294
6491
  }
6295
6492
  }));
@@ -6325,6 +6522,7 @@ function Contact({
6325
6522
  phoneValid: 1,
6326
6523
  messageValid: 1
6327
6524
  });
6525
+
6328
6526
  const handleSubmit = () => {
6329
6527
  const data = {
6330
6528
  sectionId: sectionData?._id || null,
@@ -6335,6 +6533,7 @@ function Contact({
6335
6533
  setBtnDisabled(true);
6336
6534
  setInputVal(formInitialValue);
6337
6535
  };
6536
+
6338
6537
  React.useEffect(() => {
6339
6538
  if (validData?.nameValid && validData?.emailValid && validData?.phoneValid && validData?.messageValid) {
6340
6539
  setBtnDisabled(false);
@@ -6342,22 +6541,23 @@ function Contact({
6342
6541
  setBtnDisabled(true);
6343
6542
  }
6344
6543
  }, [validData]);
6544
+
6345
6545
  const checkValidity = (regexField, fieldname, fieldValidity) => {
6346
6546
  if (validations?.[regexField]?.length) {
6347
6547
  let regex = new RegExp(validations[regexField]);
6548
+
6348
6549
  if (regex?.test(inputVal[fieldname])) {
6349
- setValidData({
6350
- ...validData,
6550
+ setValidData({ ...validData,
6351
6551
  [fieldValidity]: 1
6352
6552
  });
6353
6553
  } else {
6354
- setValidData({
6355
- ...validData,
6554
+ setValidData({ ...validData,
6356
6555
  [fieldValidity]: 0
6357
6556
  });
6358
6557
  }
6359
6558
  }
6360
6559
  };
6560
+
6361
6561
  return /*#__PURE__*/React__default["default"].createElement("section", {
6362
6562
  className: classes.section
6363
6563
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6385,10 +6585,10 @@ function Contact({
6385
6585
  }
6386
6586
  }), /*#__PURE__*/React__default["default"].createElement("div", {
6387
6587
  className: classes.addressContainer
6388
- }, /*#__PURE__*/React__default["default"].createElement("img", {
6588
+ }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
6589
+ className: classes?.telephoneImage,
6389
6590
  ref: nodeData?.image?.refSetter,
6390
- src: nodeData?.image?.metadata?.value,
6391
- alt: ""
6591
+ src: nodeData?.image?.metadata?.value
6392
6592
  }))), /*#__PURE__*/React__default["default"].createElement("div", {
6393
6593
  className: classes.rightContainer
6394
6594
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6399,8 +6599,7 @@ function Contact({
6399
6599
  isValid: validData.nameValid,
6400
6600
  inputType: 'input',
6401
6601
  onChange: e => {
6402
- setInputVal({
6403
- ...inputVal,
6602
+ setInputVal({ ...inputVal,
6404
6603
  name: e.target.value
6405
6604
  });
6406
6605
  },
@@ -6408,8 +6607,7 @@ function Contact({
6408
6607
  checkValidity(nodeData?.nameField?.metadata?.validationType, 'name', 'nameValid');
6409
6608
  },
6410
6609
  onFocus: () => {
6411
- setValidData({
6412
- ...validData,
6610
+ setValidData({ ...validData,
6413
6611
  nameValid: 1
6414
6612
  });
6415
6613
  }
@@ -6421,8 +6619,7 @@ function Contact({
6421
6619
  isValid: validData.phoneValid,
6422
6620
  inputType: 'input',
6423
6621
  onChange: e => {
6424
- setInputVal({
6425
- ...inputVal,
6622
+ setInputVal({ ...inputVal,
6426
6623
  phone: e.target.value
6427
6624
  });
6428
6625
  },
@@ -6430,8 +6627,7 @@ function Contact({
6430
6627
  checkValidity(nodeData?.phoneField?.metadata?.validationType, 'phone', 'phoneValid');
6431
6628
  },
6432
6629
  onFocus: () => {
6433
- setValidData({
6434
- ...validData,
6630
+ setValidData({ ...validData,
6435
6631
  phoneValid: 1
6436
6632
  });
6437
6633
  }
@@ -6443,8 +6639,7 @@ function Contact({
6443
6639
  isValid: validData.emailValid,
6444
6640
  inputType: 'input',
6445
6641
  onChange: e => {
6446
- setInputVal({
6447
- ...inputVal,
6642
+ setInputVal({ ...inputVal,
6448
6643
  email: e.target.value
6449
6644
  });
6450
6645
  },
@@ -6452,8 +6647,7 @@ function Contact({
6452
6647
  checkValidity(nodeData?.emailField?.metadata?.validationType, 'email', 'emailValid');
6453
6648
  },
6454
6649
  onFocus: () => {
6455
- setValidData({
6456
- ...validData,
6650
+ setValidData({ ...validData,
6457
6651
  emailValid: 1
6458
6652
  });
6459
6653
  }
@@ -6465,8 +6659,7 @@ function Contact({
6465
6659
  isValid: validData.messageValid,
6466
6660
  inputType: 'textarea',
6467
6661
  onChange: e => {
6468
- setInputVal({
6469
- ...inputVal,
6662
+ setInputVal({ ...inputVal,
6470
6663
  message: e.target.value
6471
6664
  });
6472
6665
  },
@@ -6474,8 +6667,7 @@ function Contact({
6474
6667
  checkValidity(nodeData?.messageField?.metadata?.validationType, 'message', 'messageValid');
6475
6668
  },
6476
6669
  onFocus: () => {
6477
- setValidData({
6478
- ...validData,
6670
+ setValidData({ ...validData,
6479
6671
  messageValid: 1
6480
6672
  });
6481
6673
  }
@@ -6619,11 +6811,10 @@ const useWebinarPromotionPage = createUseStyles(theme => {
6619
6811
  },
6620
6812
  courseViewContainer: {
6621
6813
  width: '645px',
6622
- height: 'fit-content',
6623
6814
  backgroundColor: '#f4f9ff',
6624
6815
  display: 'flex',
6625
6816
  flexDirection: 'column',
6626
- justifyContent: 'start',
6817
+ justifyContent: 'center',
6627
6818
  paddingTop: '20px',
6628
6819
  borderRadius: '10px'
6629
6820
  },
@@ -6671,10 +6862,10 @@ const useWebinarPromotionPage = createUseStyles(theme => {
6671
6862
  courseDetailContent: {
6672
6863
  marginTop: '16px',
6673
6864
  fontSize: '16px',
6865
+ lineHeight: '24px',
6674
6866
  wordBreak: 'break-word',
6675
6867
  color: theme.palette.font.primary,
6676
- margin: '10px 0 20px',
6677
- whiteSpace: 'pre-wrap'
6868
+ margin: '10px 0 20px'
6678
6869
  },
6679
6870
  courseDetailViewFullDetails: {
6680
6871
  cursor: 'pointer',
@@ -6737,8 +6928,7 @@ const useWebinarPromotionPage = createUseStyles(theme => {
6737
6928
  const SingleVideoSlide$1 = props => {
6738
6929
  const [isReadMore, setIsReadMore] = React.useState(false);
6739
6930
  const theme = useTheme();
6740
- React.useEffect(() => {
6741
- // remaining days epoch
6931
+ React.useEffect(() => {// remaining days epoch
6742
6932
  // current date epoch
6743
6933
  // subtract remaining days from current day epoch
6744
6934
  // moment the result - and see if there are days
@@ -6750,6 +6940,7 @@ const SingleVideoSlide$1 = props => {
6750
6940
  webinarCtaClick,
6751
6941
  conversions = 0
6752
6942
  } = props;
6943
+
6753
6944
  const renderer = ({
6754
6945
  days,
6755
6946
  hours,
@@ -6765,7 +6956,9 @@ const SingleVideoSlide$1 = props => {
6765
6956
  return /*#__PURE__*/React__default["default"].createElement("span", null, Math.floor(moment__default["default"].duration(given.diff(current)).asDays()), " day(s)");
6766
6957
  }
6767
6958
  };
6959
+
6768
6960
  const checkIfOfferIsValid = () => moment__default["default"]().diff(moment__default["default"](props.data.offerPriceEndDate)) < 0;
6961
+
6769
6962
  const checkForShowDiscount = () => {
6770
6963
  if (props.data.endDate === null || checkIfOfferIsValid()) {
6771
6964
  if (data.discount > 0 && data.offerPriceValidFor === 0) {
@@ -6777,16 +6970,19 @@ const SingleVideoSlide$1 = props => {
6777
6970
  if (data.offerPriceValidFor <= conversions) {
6778
6971
  return false;
6779
6972
  }
6973
+
6780
6974
  if (data.offerPriceValidFor - conversions < 0) {
6781
6975
  return false;
6782
6976
  } else {
6783
6977
  return true;
6784
6978
  }
6785
6979
  }
6980
+
6786
6981
  if (data.discount > 0) {
6787
6982
  return true;
6788
6983
  }
6789
6984
  };
6985
+
6790
6986
  const discount = ({
6791
6987
  price,
6792
6988
  discount
@@ -6794,6 +6990,7 @@ const SingleVideoSlide$1 = props => {
6794
6990
  console.log('discountxx', props.data.price, props.data.discount);
6795
6991
  return (discount / price * 100).toFixed(2);
6796
6992
  };
6993
+
6797
6994
  const classes = useWebinarPromotionPage();
6798
6995
  return /*#__PURE__*/React__default["default"].createElement("div", {
6799
6996
  className: classes.videoCarouselContainer
@@ -6889,10 +7086,9 @@ const SingleVideoSlide$1 = props => {
6889
7086
  data: {
6890
7087
  // link: 'headerData?.loginCtaLink',
6891
7088
  // isLink: 1,
6892
- value: data.isPaid ? 'BUY NOW' : 'REGISTER NOW'
6893
- // isExternal: 1
6894
- },
7089
+ value: data.isPaid ? 'BUY NOW' : 'REGISTER NOW' // isExternal: 1
6895
7090
 
7091
+ },
6896
7092
  onClick: webinarCtaClick,
6897
7093
  type: 'primary',
6898
7094
  size: 'medium',
@@ -7226,14 +7422,14 @@ const SingleVideoSlide = props => {
7226
7422
  isEdit
7227
7423
  } = React.useContext(PageContext);
7228
7424
  console.log(isEdit, 'isEdit');
7229
- React.useEffect(() => {
7230
- // remaining days epoch
7425
+ React.useEffect(() => {// remaining days epoch
7231
7426
  // current date epoch
7232
7427
  // subtract remaining days from current day epoch
7233
7428
  // moment the result - and see if there are days
7234
7429
  // days is present show days
7235
7430
  // else start reverse timer
7236
7431
  }, []);
7432
+
7237
7433
  const renderer = ({
7238
7434
  days,
7239
7435
  hours,
@@ -7249,6 +7445,7 @@ const SingleVideoSlide = props => {
7249
7445
  return /*#__PURE__*/React__default["default"].createElement("span", null, Math.floor(moment__default["default"].duration(given.diff(current)).asDays()), " day(s)");
7250
7446
  }
7251
7447
  };
7448
+
7252
7449
  const {
7253
7450
  data,
7254
7451
  courseBuyNow,
@@ -7257,7 +7454,9 @@ const SingleVideoSlide = props => {
7257
7454
  } = props;
7258
7455
  const showCourseInstallmentData = data?.courseOverviewData;
7259
7456
  const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments[0].installmentPrice;
7457
+
7260
7458
  const checkIfOfferIsValid = () => moment__default["default"]().diff(moment__default["default"](props?.data?.endDate || 0)) < 0;
7459
+
7261
7460
  const checkForShowDiscount = () => {
7262
7461
  if (props.data.endDate === null || checkIfOfferIsValid()) {
7263
7462
  if (data.discount > 0 && data.offerPriceValidFor === 0) {
@@ -7269,23 +7468,28 @@ const SingleVideoSlide = props => {
7269
7468
  if (data.offerPriceValidFor <= conversions) {
7270
7469
  return false;
7271
7470
  }
7471
+
7272
7472
  if (data.offerPriceValidFor - conversions < 0) {
7273
7473
  return false;
7274
7474
  } else {
7275
7475
  return true;
7276
7476
  }
7277
7477
  }
7478
+
7278
7479
  if (data.discount > 0) {
7279
7480
  return true;
7280
7481
  }
7281
7482
  };
7483
+
7282
7484
  const classes = useCoursePromotionPage();
7485
+
7283
7486
  const discount = ({
7284
7487
  price,
7285
7488
  discount
7286
7489
  }) => {
7287
7490
  return (discount / price * 100).toFixed(2);
7288
7491
  };
7492
+
7289
7493
  return /*#__PURE__*/React__default["default"].createElement("div", {
7290
7494
  className: classes.videoCarouselContainer
7291
7495
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -7399,16 +7603,15 @@ const SingleVideoSlide = props => {
7399
7603
  data: {
7400
7604
  // link: 'headerData?.loginCtaLink',
7401
7605
  // isLink: 1,
7402
- value: 'BUY NOW'
7403
- // isExternal: 1
7404
- },
7606
+ value: 'BUY NOW' // isExternal: 1
7405
7607
 
7608
+ },
7406
7609
  onClick: courseBuyNow,
7407
7610
  type: 'primary',
7408
7611
  size: 'medium',
7409
7612
  target: null,
7410
- rel: null
7411
- // styling={isMobile ? { margin: '0 40px' } : {}}
7613
+ rel: null // styling={isMobile ? { margin: '0 40px' } : {}}
7614
+
7412
7615
  })))), showCourseInstallmentData && InstalmentData && /*#__PURE__*/React__default["default"].createElement("div", {
7413
7616
  className: classes.payInstallmentContainer,
7414
7617
  onClick: showCourseInstallment
@@ -7613,15 +7816,18 @@ const FormPage = ({
7613
7816
  _id,
7614
7817
  baseURLs
7615
7818
  } = React.useContext(PageContext);
7819
+
7616
7820
  const handleSubmit = async e => {
7617
7821
  e.preventDefault();
7618
7822
  let formResponse = [];
7823
+
7619
7824
  for (const [key, value] of Object.entries(formData)) {
7620
7825
  if (value.questionType === 'MC') {
7621
7826
  if (value.solutionArray.length > 1) {
7622
7827
  value.solutionArray.shift();
7623
7828
  }
7624
7829
  }
7830
+
7625
7831
  formResponse.push({
7626
7832
  questionId: key,
7627
7833
  questionName: value.questionName,
@@ -7629,6 +7835,7 @@ const FormPage = ({
7629
7835
  solutionArray: value.solutionArray
7630
7836
  });
7631
7837
  }
7838
+
7632
7839
  const data = {
7633
7840
  sectionId: sectionData?.components?.[0]?._id || null,
7634
7841
  landingPageId: _id || null,
@@ -7638,6 +7845,7 @@ const FormPage = ({
7638
7845
  setFormData({});
7639
7846
  setformSubmitted(!formSubmitted);
7640
7847
  };
7848
+
7641
7849
  React.useEffect(() => {
7642
7850
  //add all questions to formData
7643
7851
  let formData = {};
@@ -7650,26 +7858,23 @@ const FormPage = ({
7650
7858
  });
7651
7859
  setFormData(formData);
7652
7860
  }, [metadata, formSubmitted]);
7861
+
7653
7862
  const handleOnClick = (e, item, option) => {
7654
7863
  // if the checkbox is checked
7655
7864
  if (!e.target.checked) {
7656
7865
  // if the checkbox is checked and the solution array is empty
7657
7866
  if (!formData[item._id]?.solutionArray?.length) {
7658
- setFormData({
7659
- ...formData,
7867
+ setFormData({ ...formData,
7660
7868
  [item._id]: {
7661
7869
  questionName: item.text,
7662
7870
  solutionArray: [option.value],
7663
7871
  questionType: 'MC'
7664
7872
  }
7665
7873
  });
7666
- }
7667
- // if the checkbox is checked and the solution array is not empty and the value is already in the array remove it
7874
+ } // if the checkbox is checked and the solution array is not empty and the value is already in the array remove it
7668
7875
  else if (formData[item._id]?.solutionArray?.includes(option.value)) {
7669
7876
  // if only one value is in the array remove it
7670
-
7671
- setFormData({
7672
- ...formData,
7877
+ setFormData({ ...formData,
7673
7878
  [item._id]: {
7674
7879
  questionName: item.text,
7675
7880
  solutionArray: formData[item._id]?.solutionArray?.filter(item => item !== option.value),
@@ -7677,24 +7882,20 @@ const FormPage = ({
7677
7882
  }
7678
7883
  });
7679
7884
  }
7680
- }
7681
- // if the checkbox is unchecked
7885
+ } // if the checkbox is unchecked
7682
7886
  else {
7683
7887
  // if the checkbox is unchecked and the solution array is empty
7684
7888
  if (typeof formData[item._id]?.solutionArray?.length === 'undefined') {
7685
- setFormData({
7686
- ...formData,
7889
+ setFormData({ ...formData,
7687
7890
  [item._id]: {
7688
7891
  questionName: item.text,
7689
7892
  solutionArray: [option.value],
7690
7893
  questionType: 'MC'
7691
7894
  }
7692
7895
  });
7693
- }
7694
- // if the checkbox is unchecked and the solution array is not empty and the value is not in the array add it
7896
+ } // if the checkbox is unchecked and the solution array is not empty and the value is not in the array add it
7695
7897
  else if (!formData[item._id]?.solutionArray?.includes(option.value)) {
7696
- setFormData({
7697
- ...formData,
7898
+ setFormData({ ...formData,
7698
7899
  [item._id]: {
7699
7900
  questionName: item.text,
7700
7901
  solutionArray: [...formData[item._id]?.solutionArray, option.value],
@@ -7704,6 +7905,7 @@ const FormPage = ({
7704
7905
  }
7705
7906
  }
7706
7907
  };
7908
+
7707
7909
  return /*#__PURE__*/React__default["default"].createElement("section", {
7708
7910
  className: classes.formPageSection
7709
7911
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -7730,8 +7932,7 @@ const FormPage = ({
7730
7932
  placeholder: "Short answer",
7731
7933
  name: item._id,
7732
7934
  onChange: e => {
7733
- setFormData({
7734
- ...formData,
7935
+ setFormData({ ...formData,
7735
7936
  [item._id]: {
7736
7937
  index,
7737
7938
  questionName: item.text,
@@ -7771,13 +7972,11 @@ const FormPage = ({
7771
7972
  name: "text",
7772
7973
  required: item.isRequired,
7773
7974
  value: option.value,
7774
- checked: formData[item._id]?.solutionArray?.[0] === option.value
7775
- // name={option.value}
7975
+ checked: formData[item._id]?.solutionArray?.[0] === option.value // name={option.value}
7776
7976
  // id={option.value}
7777
7977
  ,
7778
7978
  onClick: e => {
7779
- setFormData({
7780
- ...formData,
7979
+ setFormData({ ...formData,
7781
7980
  [item._id]: {
7782
7981
  questionName: item.text,
7783
7982
  solutionArray: [option.value],
@@ -7793,10 +7992,9 @@ const FormPage = ({
7793
7992
  data: {
7794
7993
  // link: 'headerData?.loginCtaLink',
7795
7994
  // isLink: 1,
7796
- value: 'SUBMIT'
7797
- // isExternal: 1
7798
- },
7995
+ value: 'SUBMIT' // isExternal: 1
7799
7996
 
7997
+ },
7800
7998
  type: 'primary',
7801
7999
  size: 'medium',
7802
8000
  target: null,
@@ -7890,6 +8088,7 @@ function Tiles({
7890
8088
  const nodeData = sectionData.components;
7891
8089
  console.log(nodeData);
7892
8090
  const tilesList = nodeData[0]?.tilesList.components;
8091
+
7893
8092
  const handleClick = value => {
7894
8093
  if (!isEdit && value) {
7895
8094
  if (value.indexOf('http://') == 0 || value.indexOf('https://') == 0) {
@@ -7899,6 +8098,7 @@ function Tiles({
7899
8098
  }
7900
8099
  }
7901
8100
  };
8101
+
7902
8102
  const TileDiv = tilesList?.map((tile, i) => {
7903
8103
  return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
7904
8104
  key: i
@@ -7961,8 +8161,8 @@ const useEmailStyles = createUseStyles(theme => ({
7961
8161
  width: 'auto',
7962
8162
  height: '48px'
7963
8163
  /* margin: 18px 0px; */
7964
- },
7965
8164
 
8165
+ },
7966
8166
  'p-young-guru-title': {
7967
8167
  fontFamily: theme?.typography?.fontFamily,
7968
8168
  fontStyle: 'normal',
@@ -7989,8 +8189,8 @@ const useEmailStyles = createUseStyles(theme => ({
7989
8189
  fontSize: '0',
7990
8190
  textAlign: 'center'
7991
8191
  /* padding:35px 0 40px */
7992
- },
7993
8192
 
8193
+ },
7994
8194
  'two-columns .column': {
7995
8195
  width: '100%',
7996
8196
  maxWidth: '275px',
@@ -8006,10 +8206,9 @@ const useEmailStyles = createUseStyles(theme => ({
8006
8206
  color: '#030a21',
8007
8207
  marginBottom: '5px',
8008
8208
  textAlign: 'left'
8009
- }
8010
-
8011
- // @media screen and (max-width: 600px) {
8209
+ } // @media screen and (max-width: 600px) {
8012
8210
  // }
8211
+
8013
8212
  }));
8014
8213
 
8015
8214
  function Section({
@@ -8038,8 +8237,8 @@ function Section({
8038
8237
  }, /*#__PURE__*/React__default["default"].createElement("tbody", null, customHtmlData?.isCustomHtml ? /*#__PURE__*/React__default["default"].createElement("div", {
8039
8238
  className: classes.email_description_para,
8040
8239
  dangerouslySetInnerHTML: {
8041
- __html: `${customHtmlData?.html ? customHtmlData?.html : ''}`
8042
- // __html: '<div>sdnfksdnflksdnfklsndk</div>'
8240
+ __html: `${customHtmlData?.html ? customHtmlData?.html : ''}` // __html: '<div>sdnfksdnflksdnfklsndk</div>'
8241
+
8043
8242
  }
8044
8243
  }) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, header?.isActive ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, /*#__PURE__*/React__default["default"].createElement("table", {
8045
8244
  style: {
@@ -8072,8 +8271,7 @@ function Section({
8072
8271
  textAlign: 'center'
8073
8272
  }
8074
8273
  }, header?.components[1]?.metadata?.image?.length ? /*#__PURE__*/React__default["default"].createElement("img", {
8075
- src: header?.components[1]?.metadata?.image
8076
- // width={600}
8274
+ src: header?.components[1]?.metadata?.image // width={600}
8077
8275
  ,
8078
8276
  alt: "",
8079
8277
  style: {
@@ -8359,12 +8557,14 @@ function Section({
8359
8557
  }
8360
8558
  }, "All rights reserved.")))))))))))))) : null)))));
8361
8559
  }
8560
+
8362
8561
  function EmailDripMarket({
8363
8562
  sectionData,
8364
8563
  extraProps = {}
8365
8564
  }) {
8366
8565
  console.log('extrapropstemplate', extraProps);
8367
8566
  const isInitialMount = React.useRef(true);
8567
+
8368
8568
  const convertToHtml = sectionData => {
8369
8569
  const html = ReactDOMServer__default["default"].renderToStaticMarkup( /*#__PURE__*/React__default["default"].createElement(Section, {
8370
8570
  nodeData: sectionData,
@@ -8374,15 +8574,15 @@ function EmailDripMarket({
8374
8574
  }));
8375
8575
  return html;
8376
8576
  };
8577
+
8377
8578
  React.useEffect(() => {
8378
8579
  if (isInitialMount.current) {
8379
8580
  isInitialMount.current = false;
8380
8581
  } else {
8381
8582
  extraProps?.callbackHtml(convertToHtml(sectionData));
8382
8583
  }
8383
- }, [extraProps?.convertedHtml]);
8584
+ }, [extraProps?.convertedHtml]); // const mockData = sectionData?.sections[0];
8384
8585
 
8385
- // const mockData = sectionData?.sections[0];
8386
8586
  const emailRef = React.useRef(null);
8387
8587
  return /*#__PURE__*/React__default["default"].createElement("section", {
8388
8588
  style: {
@@ -8392,6 +8592,7 @@ function EmailDripMarket({
8392
8592
  }, /*#__PURE__*/React__default["default"].createElement("div", {
8393
8593
  onClick: e => {
8394
8594
  e.stopPropagation(); // prevent the click from event Capturing, in email onClick events do not work
8595
+
8395
8596
  e.preventDefault();
8396
8597
  }
8397
8598
  }, /*#__PURE__*/React__default["default"].createElement(Section, {
@@ -8430,25 +8631,33 @@ const TYPE_TO_COMPONENT_MAP = {
8430
8631
  TILES_SECTION: Tiles,
8431
8632
  EMAIL_DRIP_MARKET: EmailDripMarket
8432
8633
  };
8634
+
8433
8635
  const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
8636
+
8434
8637
  const MemoisedSection = /*#__PURE__*/React.memo(({
8435
8638
  sectionData,
8436
- extraProps
8639
+ extraProps,
8640
+ isCustomWebsite
8437
8641
  }) => {
8642
+ // console.log("isCustomWebsite______", isCustomWebsite)
8438
8643
  console.log('templatesectiondata', sectionData);
8439
8644
  const SectionComp = getCompToRender(sectionData.type);
8440
8645
  return /*#__PURE__*/React__default["default"].createElement(SectionComp, {
8441
8646
  sectionData: sectionData,
8442
- extraProps: extraProps
8647
+ extraProps: extraProps,
8648
+ isCustomWebsite: isCustomWebsite
8443
8649
  });
8444
8650
  });
8445
8651
  function SectionRenderer({
8446
8652
  sectionData,
8447
- extraProps
8653
+ extraProps,
8654
+ isCustomWebsite
8448
8655
  }) {
8656
+ // console.log("isCustomWebsite______", isCustomWebsite)
8449
8657
  return /*#__PURE__*/React__default["default"].createElement(MemoisedSection, {
8450
8658
  sectionData: sectionData,
8451
- extraProps: extraProps
8659
+ extraProps: extraProps,
8660
+ isCustomWebsite: isCustomWebsite
8452
8661
  });
8453
8662
  }
8454
8663
 
@@ -8466,7 +8675,8 @@ function PageRenderer({
8466
8675
  footer,
8467
8676
  validations = {},
8468
8677
  _id,
8469
- isLandingPage = false
8678
+ isLandingPage = false,
8679
+ isCustomWebsite = false
8470
8680
  },
8471
8681
  isMobile = false,
8472
8682
  isLandingPages = false,
@@ -8501,6 +8711,7 @@ function PageRenderer({
8501
8711
  isTutorWebsite,
8502
8712
  extraProps,
8503
8713
  hideLogin,
8714
+ isCustomWebsite,
8504
8715
  _id
8505
8716
  }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id]);
8506
8717
  const Wrapper = SectionWrapper || React.Fragment;
@@ -8523,7 +8734,8 @@ function PageRenderer({
8523
8734
  key: sectionData.type + (sectionData._id || sectionIndex)
8524
8735
  }), /*#__PURE__*/React__default["default"].createElement(SectionRenderer, {
8525
8736
  sectionData: sectionData,
8526
- extraProps: extraProps
8737
+ extraProps: extraProps,
8738
+ isCustomWebsite: isCustomWebsite
8527
8739
  }))) : sectionPlaceholder, !!footer && /*#__PURE__*/React__default["default"].createElement(Wrapper, !!SectionWrapper && {
8528
8740
  sectionData: footer,
8529
8741
  isFooter: true
@@ -8543,9 +8755,11 @@ const componentParser = compObj => {
8543
8755
  });
8544
8756
  return component;
8545
8757
  }
8758
+
8546
8759
  if (Array.isArray(compObj.components)) {
8547
8760
  compObj.components = compObj.components.map(componentParser);
8548
8761
  }
8762
+
8549
8763
  return compObj;
8550
8764
  };
8551
8765
  const inverseComponentParser = compObj => {
@@ -8570,6 +8784,7 @@ const inverseComponentParser = compObj => {
8570
8784
  if (compObj.components) {
8571
8785
  compObj.components = compObj.components.map(inverseComponentParser);
8572
8786
  }
8787
+
8573
8788
  return compObj;
8574
8789
  }
8575
8790
  };