diy-template-components 0.0.76 → 0.1.3

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.es.js CHANGED
@@ -12,6 +12,8 @@ function ___$insertStyle(css) {
12
12
  import React, { createContext, useContext, forwardRef, useRef, useEffect, useState, useMemo, useLayoutEffect, Suspense, memo, lazy, Fragment } from 'react';
13
13
  import Slider from 'react-slick';
14
14
  import axios from 'axios';
15
+ import moment from 'moment';
16
+ import Countdown from 'react-countdown';
15
17
  import { createTheming, createUseStyles as createUseStyles$1, useTheme as useTheme$1 } from 'react-jss';
16
18
 
17
19
  function _extends() {
@@ -447,10 +449,6 @@ function useLinkBuilder(data) {
447
449
  return data.link;
448
450
  }
449
451
 
450
- if (data?.isExternal) {
451
- return data.link;
452
- }
453
-
454
452
  if (!isPreview) {
455
453
  const link = data.link === '/' ? '' : '/' + data.link;
456
454
  return basePath ? `//${basePath}${link}` : null;
@@ -489,8 +487,8 @@ const Button = /*#__PURE__*/forwardRef(function Button({
489
487
  return data?.isLink ? /*#__PURE__*/React.createElement("a", _extends({
490
488
  ref: ref,
491
489
  href: link,
492
- target: data?.isExternal ? '_blank' : null,
493
- rel: data?.isExternal ? 'nofollow noopener' : null,
490
+ target: data?.isExistingLink === false ? '_blank' : null,
491
+ rel: data?.isExistingLink === false ? 'nofollow noopener' : null,
494
492
  className: (active ? classes.active : '') + ' ' + classes[type] + ' ' + classes[size] + ' ' + classes.anchorClass,
495
493
  style: styling
496
494
  }, elementProps), data?.value) : /*#__PURE__*/React.createElement("button", _extends({
@@ -621,6 +619,16 @@ var success = "data:image/svg+xml,%3Csvg%20width%3D%2248%22%20height%3D%2248%22%
621
619
 
622
620
  var quote = "data:image/svg+xml,%3Csvg%20width%3D%2228%22%20height%3D%2221%22%20viewBox%3D%220%200%2028%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.352%2020.88H3.384L0%2010.584V0H11.736V10.584L8.352%2020.88ZM24.0476%2020.88H19.1516L15.7676%2010.584V0H27.5036V10.584L24.0476%2020.88Z%22%20fill%3D%22%236269C9%22%2F%3E%3C%2Fsvg%3E";
623
621
 
622
+ var clock = "data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M9%2016.5C13.1421%2016.5%2016.5%2013.1421%2016.5%209C16.5%204.85786%2013.1421%201.5%209%201.5C4.85786%201.5%201.5%204.85786%201.5%209C1.5%2013.1421%204.85786%2016.5%209%2016.5Z%22%20fill%3D%22%234E93FF%22%2F%3E%3Cpath%20d%3D%22M11.7825%2011.9478C11.685%2011.9478%2011.5875%2011.9253%2011.4975%2011.8653L9.17248%2010.4778C8.59498%2010.1328%208.16748%209.37531%208.16748%208.70781V5.63281C8.16748%205.32531%208.42248%205.07031%208.72998%205.07031C9.03748%205.07031%209.29248%205.32531%209.29248%205.63281V8.70781C9.29248%208.97781%209.51748%209.37531%209.74998%209.51031L12.075%2010.8978C12.345%2011.0553%2012.4275%2011.4003%2012.27%2011.6703C12.1575%2011.8503%2011.97%2011.9478%2011.7825%2011.9478Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E";
623
+
624
+ var bookSaved = "data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.4375%204.50055V14.933C8.4375%2015.4655%207.8975%2015.833%207.41%2015.6305C6.015%2015.0455%204.2825%2014.5355%203.0525%2014.3705L2.82%2014.3405C2.0925%2014.2505%201.5%2013.583%201.5%2012.8555V3.93805C1.5%203.03805%202.2275%202.31055%203.1275%202.31055H3.18C4.59%202.43055%206.6675%203.09055%208.04%203.83305C8.2875%203.96805%208.4375%204.21555%208.4375%204.50055Z%22%20fill%3D%22%234E93FF%22%2F%3E%3Cpath%20d%3D%22M14.8725%202.31055H14.8275C14.6475%202.32555%2014.4525%202.34805%2014.25%202.38555C13.3275%202.53555%2012.2325%202.85055%2011.25%203.24055C10.785%203.42805%2010.35%203.63055%209.9675%203.83305C9.72%203.96805%209.5625%204.22305%209.5625%204.50055V14.933C9.5625%2015.4655%2010.1025%2015.833%2010.59%2015.6305C11.985%2015.0455%2013.7175%2014.5355%2014.9475%2014.3705L15.18%2014.3405C15.9075%2014.2505%2016.5%2013.583%2016.5%2012.8555V3.93805C16.5%203.03805%2015.7725%202.31055%2014.8725%202.31055ZM14.4525%2010.298C14.4525%2010.5905%2014.2425%2010.718%2013.9875%2010.5755L13.1925%2010.133C13.11%2010.088%2012.975%2010.088%2012.885%2010.133L12.09%2010.5755C11.835%2010.718%2011.625%2010.5905%2011.625%2010.298V7.99555C11.625%207.65055%2011.91%207.36555%2012.255%207.36555H13.83C14.175%207.36555%2014.46%207.65055%2014.46%207.99555V10.298H14.4525Z%22%20fill%3D%22%234E93FF%22%2F%3E%3C%2Fsvg%3E";
625
+
626
+ var certificate = "data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2214%22%20viewBox%3D%220%200%2012%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20opacity%3D%220.7%22%20d%3D%22M10.5%200H1.5C0.675%200%200%200.63%200%201.4V12.6C0%2013.37%200.675%2014%201.5%2014H10.5C11.325%2014%2012%2013.37%2012%2012.6V1.4C12%200.63%2011.325%200%2010.5%200ZM1.5%201.4H5.25V7L3.375%205.95L1.5%207V1.4Z%22%20fill%3D%22%231676F3%22%2F%3E%3C%2Fsvg%3E";
627
+
628
+ var calendar = "data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.5627%202.67V1.5C12.5627%201.1925%2012.3077%200.9375%2012.0002%200.9375C11.6927%200.9375%2011.4377%201.1925%2011.4377%201.5V2.625H6.56267V1.5C6.56267%201.1925%206.30767%200.9375%206.00017%200.9375C5.69267%200.9375%205.43767%201.1925%205.43767%201.5V2.67C3.41267%202.8575%202.43017%204.065%202.28017%205.8575C2.26517%206.075%202.44517%206.255%202.65517%206.255H15.3452C15.5627%206.255%2015.7427%206.0675%2015.7202%205.8575C15.5702%204.065%2014.5877%202.8575%2012.5627%202.67Z%22%20fill%3D%22%234E93FF%22%2F%3E%3Cpath%20d%3D%22M15%207.38086H3C2.5875%207.38086%202.25%207.71836%202.25%208.13086V12.7509C2.25%2015.0009%203.375%2016.5009%206%2016.5009H12C14.625%2016.5009%2015.75%2015.0009%2015.75%2012.7509V8.13086C15.75%207.71836%2015.4125%207.38086%2015%207.38086ZM6.9075%2013.6584C6.87%2013.6884%206.8325%2013.7259%206.795%2013.7484C6.75%2013.7784%206.705%2013.8009%206.66%2013.8159C6.615%2013.8384%206.57%2013.8534%206.525%2013.8609C6.4725%2013.8684%206.4275%2013.8759%206.375%2013.8759C6.2775%2013.8759%206.18%2013.8534%206.09%2013.8159C5.9925%2013.7784%205.9175%2013.7259%205.8425%2013.6584C5.7075%2013.5159%205.625%2013.3209%205.625%2013.1259C5.625%2012.9309%205.7075%2012.7359%205.8425%2012.5934C5.9175%2012.5259%205.9925%2012.4734%206.09%2012.4359C6.225%2012.3759%206.375%2012.3609%206.525%2012.3909C6.57%2012.3984%206.615%2012.4134%206.66%2012.4359C6.705%2012.4509%206.75%2012.4734%206.795%2012.5034C6.8325%2012.5334%206.87%2012.5634%206.9075%2012.5934C7.0425%2012.7359%207.125%2012.9309%207.125%2013.1259C7.125%2013.3209%207.0425%2013.5159%206.9075%2013.6584ZM6.9075%2011.0334C6.765%2011.1684%206.57%2011.2509%206.375%2011.2509C6.18%2011.2509%205.985%2011.1684%205.8425%2011.0334C5.7075%2010.8909%205.625%2010.6959%205.625%2010.5009C5.625%2010.3059%205.7075%2010.1109%205.8425%209.96836C6.0525%209.75836%206.3825%209.69086%206.66%209.81086C6.7575%209.84836%206.84%209.90086%206.9075%209.96836C7.0425%2010.1109%207.125%2010.3059%207.125%2010.5009C7.125%2010.6959%207.0425%2010.8909%206.9075%2011.0334ZM9.5325%2013.6584C9.39%2013.7934%209.195%2013.8759%209%2013.8759C8.805%2013.8759%208.61%2013.7934%208.4675%2013.6584C8.3325%2013.5159%208.25%2013.3209%208.25%2013.1259C8.25%2012.9309%208.3325%2012.7359%208.4675%2012.5934C8.745%2012.3159%209.255%2012.3159%209.5325%2012.5934C9.6675%2012.7359%209.75%2012.9309%209.75%2013.1259C9.75%2013.3209%209.6675%2013.5159%209.5325%2013.6584ZM9.5325%2011.0334C9.495%2011.0634%209.4575%2011.0934%209.42%2011.1234C9.375%2011.1534%209.33%2011.1759%209.285%2011.1909C9.24%2011.2134%209.195%2011.2284%209.15%2011.2359C9.0975%2011.2434%209.0525%2011.2509%209%2011.2509C8.805%2011.2509%208.61%2011.1684%208.4675%2011.0334C8.3325%2010.8909%208.25%2010.6959%208.25%2010.5009C8.25%2010.3059%208.3325%2010.1109%208.4675%209.96836C8.535%209.90086%208.6175%209.84836%208.715%209.81086C8.9925%209.69086%209.3225%209.75836%209.5325%209.96836C9.6675%2010.1109%209.75%2010.3059%209.75%2010.5009C9.75%2010.6959%209.6675%2010.8909%209.5325%2011.0334ZM12.1575%2013.6584C12.015%2013.7934%2011.82%2013.8759%2011.625%2013.8759C11.43%2013.8759%2011.235%2013.7934%2011.0925%2013.6584C10.9575%2013.5159%2010.875%2013.3209%2010.875%2013.1259C10.875%2012.9309%2010.9575%2012.7359%2011.0925%2012.5934C11.37%2012.3159%2011.88%2012.3159%2012.1575%2012.5934C12.2925%2012.7359%2012.375%2012.9309%2012.375%2013.1259C12.375%2013.3209%2012.2925%2013.5159%2012.1575%2013.6584ZM12.1575%2011.0334C12.12%2011.0634%2012.0825%2011.0934%2012.045%2011.1234C12%2011.1534%2011.955%2011.1759%2011.91%2011.1909C11.865%2011.2134%2011.82%2011.2284%2011.775%2011.2359C11.7225%2011.2434%2011.67%2011.2509%2011.625%2011.2509C11.43%2011.2509%2011.235%2011.1684%2011.0925%2011.0334C10.9575%2010.8909%2010.875%2010.6959%2010.875%2010.5009C10.875%2010.3059%2010.9575%2010.1109%2011.0925%209.96836C11.1675%209.90086%2011.2425%209.84836%2011.34%209.81086C11.475%209.75086%2011.625%209.73586%2011.775%209.76586C11.82%209.77336%2011.865%209.78836%2011.91%209.81086C11.955%209.82586%2012%209.84836%2012.045%209.87836C12.0825%209.90836%2012.12%209.93836%2012.1575%209.96836C12.2925%2010.1109%2012.375%2010.3059%2012.375%2010.5009C12.375%2010.6959%2012.2925%2010.8909%2012.1575%2011.0334Z%22%20fill%3D%22%234E93FF%22%2F%3E%3C%2Fsvg%3E";
629
+
630
+ 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";
631
+
624
632
  /** @returns {import('./types').IconData} */
625
633
 
626
634
  const getConfiguredIcon1 = url => ({
@@ -708,7 +716,13 @@ const icons = {
708
716
  // Others
709
717
  Teachers: getConfiguredIcon2(teachers, false, true),
710
718
  Learning: getConfiguredIcon2(learning, false, true),
711
- Success: getConfiguredIcon2(success, false, true)
719
+ Success: getConfiguredIcon2(success, false, true),
720
+ // landing pages
721
+ Clock: getConfiguredIcon2(clock, false, true),
722
+ 'Book Saved': getConfiguredIcon2(bookSaved, false, true),
723
+ Certificate: getConfiguredIcon2(certificate, false, true),
724
+ Calendar: getConfiguredIcon2(calendar, false, true),
725
+ Video: getConfiguredIcon2(video, false, true)
712
726
  };
713
727
 
714
728
  const someMethod1 = (
@@ -973,7 +987,7 @@ function Dropdown(props) {
973
987
  link: dt.slug,
974
988
  isLink: true,
975
989
  value: dt.title,
976
- isExternal: 0
990
+ isExternal: false
977
991
  },
978
992
  fluid: true,
979
993
  active: dt.active,
@@ -993,7 +1007,8 @@ function OptionList({
993
1007
  isMobile,
994
1008
  moreContent,
995
1009
  navDataCount,
996
- isTutorWebsite
1010
+ isTutorWebsite,
1011
+ isLandingPages
997
1012
  }) {
998
1013
  useContext(PageContext);
999
1014
 
@@ -1004,7 +1019,7 @@ function OptionList({
1004
1019
  link: dt.slug,
1005
1020
  active: dt.active,
1006
1021
  isLink: true,
1007
- isExternal: 0
1022
+ isExistingLink: false
1008
1023
  };
1009
1024
  });
1010
1025
  };
@@ -1055,7 +1070,7 @@ function OptionList({
1055
1070
  link: headerData?.appLink,
1056
1071
  isLink: 1,
1057
1072
  value: 'Download App',
1058
- isExternal: 1
1073
+ isExistingLink: false
1059
1074
  },
1060
1075
  type: 'primary',
1061
1076
  size: 'small',
@@ -1069,7 +1084,7 @@ function OptionList({
1069
1084
  link: headerData?.loginCtaLink,
1070
1085
  isLink: 1,
1071
1086
  value: 'Login',
1072
- isExternal: 1
1087
+ isExistingLink: false
1073
1088
  },
1074
1089
  type: 'primary',
1075
1090
  size: isMobile ? 'small' : 'medium',
@@ -1084,7 +1099,8 @@ function OptionList({
1084
1099
  function DesktopHeader({
1085
1100
  header,
1086
1101
  navData,
1087
- isTutorWebsite
1102
+ isTutorWebsite,
1103
+ isLandingPages
1088
1104
  }) {
1089
1105
  const {
1090
1106
  isFixed = true
@@ -1143,6 +1159,7 @@ function DesktopHeader({
1143
1159
  navDataCount: navData?.length,
1144
1160
  headerData: header,
1145
1161
  isMobile: false,
1162
+ isLandingPages: isLandingPages,
1146
1163
  moreContent: moreContentFn(),
1147
1164
  isTutorWebsite: isTutorWebsite
1148
1165
  }))));
@@ -1155,7 +1172,8 @@ var phoneAndroid = "data:image/svg+xml,%3Csvg%20width%3D%2244%22%20height%3D%224
1155
1172
  function MobileHeader({
1156
1173
  header,
1157
1174
  navData,
1158
- isTutorWebsite
1175
+ isTutorWebsite,
1176
+ isLandingPages
1159
1177
  }) {
1160
1178
  const {
1161
1179
  isFixed = true
@@ -1193,7 +1211,7 @@ function MobileHeader({
1193
1211
  src: phoneIos,
1194
1212
  alt: "iosUrl"
1195
1213
  }),
1196
- isExternal: 1
1214
+ isExistingLink: false
1197
1215
  },
1198
1216
  type: '',
1199
1217
  size: 'small',
@@ -1215,7 +1233,7 @@ function MobileHeader({
1215
1233
  src: phoneAndroid,
1216
1234
  alt: "iosUrl"
1217
1235
  }),
1218
- isExternal: 1
1236
+ isExistingLink: false
1219
1237
  },
1220
1238
  type: '',
1221
1239
  size: 'small',
@@ -1235,7 +1253,7 @@ function MobileHeader({
1235
1253
  link: header?.iosUrl,
1236
1254
  isLink: 1,
1237
1255
  value: 'Download App',
1238
- isExternal: 1
1256
+ isExistingLink: false
1239
1257
  },
1240
1258
  type: 'primary',
1241
1259
  size: 'small',
@@ -1248,7 +1266,7 @@ function MobileHeader({
1248
1266
  link: header?.androidURL,
1249
1267
  isLink: 1,
1250
1268
  value: 'Download App',
1251
- isExternal: 1
1269
+ isExistingLink: false
1252
1270
  },
1253
1271
  type: 'primary',
1254
1272
  size: 'small',
@@ -1265,7 +1283,7 @@ function MobileHeader({
1265
1283
  link: header?.appLink,
1266
1284
  isLink: 1,
1267
1285
  value: 'Download App',
1268
- isExternal: 1
1286
+ isExistingLink: false
1269
1287
  },
1270
1288
  type: 'primary',
1271
1289
  size: 'small',
@@ -1326,7 +1344,8 @@ function Header({
1326
1344
  }) {
1327
1345
  const {
1328
1346
  isMobile,
1329
- isTutorWebsite
1347
+ isTutorWebsite,
1348
+ isLandingPages
1330
1349
  } = useContext(PageContext);
1331
1350
 
1332
1351
  const filterHiddenNavs = () => {
@@ -1336,11 +1355,13 @@ function Header({
1336
1355
  return isMobile ? /*#__PURE__*/React.createElement(MobileHeader, {
1337
1356
  navData: filterHiddenNavs(),
1338
1357
  header: data,
1339
- isTutorWebsite: isTutorWebsite
1358
+ isTutorWebsite: isTutorWebsite,
1359
+ isLandingPages: isLandingPages
1340
1360
  }) : /*#__PURE__*/React.createElement(DesktopHeader, {
1341
1361
  navData: filterHiddenNavs(),
1342
1362
  header: data,
1343
- isTutorWebsite: isTutorWebsite
1363
+ isTutorWebsite: isTutorWebsite,
1364
+ isLandingPages: isLandingPages
1344
1365
  });
1345
1366
  }
1346
1367
 
@@ -1800,44 +1821,51 @@ function ArimaMadurai() {
1800
1821
  }
1801
1822
 
1802
1823
  const TYPE_TO_COMPONENT_MAP$1 = {
1803
- BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
1804
- GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
1805
- BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
1806
- BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
1807
- FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
1808
- TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
1809
- VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
1810
- VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
1811
- INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
1812
- TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
1813
- IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
1814
- FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
1815
- COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; })),
1816
- TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
1817
- TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
1818
- CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
1819
- FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
1824
+ BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$j; })),
1825
+ GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$i; })),
1826
+ BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$h; })),
1827
+ BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
1828
+ FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
1829
+ TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
1830
+ VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
1831
+ VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
1832
+ INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
1833
+ TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
1834
+ IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
1835
+ FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
1836
+ COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
1837
+ TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
1838
+ TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
1839
+ CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
1840
+ FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; })),
1841
+ WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
1842
+ COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
1843
+ FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
1820
1844
  };
1821
1845
 
1822
1846
  const getCompToRender$1 = type => TYPE_TO_COMPONENT_MAP$1[type] || (() => null);
1823
1847
 
1824
1848
  const MemoisedSection$1 = /*#__PURE__*/memo(({
1825
- sectionData
1849
+ sectionData,
1850
+ extraProps
1826
1851
  }) => {
1827
1852
  const SectionComp = getCompToRender$1(sectionData.type);
1828
1853
  return /*#__PURE__*/React.createElement(SectionComp, {
1829
- sectionData: sectionData
1854
+ sectionData: sectionData,
1855
+ extraProps: extraProps
1830
1856
  });
1831
1857
  });
1832
1858
  function SectionRenderer$1({
1833
- sectionData
1859
+ sectionData,
1860
+ extraProps
1834
1861
  }) {
1835
1862
  return /*#__PURE__*/React.createElement(Suspense, {
1836
1863
  fallback: null
1837
1864
  /*GIF maybe*/
1838
1865
 
1839
1866
  }, /*#__PURE__*/React.createElement(MemoisedSection$1, {
1840
- sectionData: sectionData
1867
+ sectionData: sectionData,
1868
+ extraProps: extraProps
1841
1869
  }));
1842
1870
  }
1843
1871
 
@@ -1865,9 +1893,11 @@ function PageRenderer$1({
1865
1893
  sections,
1866
1894
  header,
1867
1895
  footer,
1868
- validations = {}
1896
+ validations = {},
1897
+ _id
1869
1898
  },
1870
1899
  isMobile = false,
1900
+ isLandingPages = false,
1871
1901
  baseURLs = {},
1872
1902
  hashToken,
1873
1903
  SectionWrapper,
@@ -1877,12 +1907,15 @@ function PageRenderer$1({
1877
1907
  isEdit,
1878
1908
  sectionPlaceholder,
1879
1909
  templateId,
1880
- isTutorWebsite = false
1910
+ isTutorWebsite = false,
1911
+ extraProps,
1912
+ hideLogin
1881
1913
  }) {
1882
1914
  const theme = useMemo(() => getTheme(color, font), [color, font]);
1883
1915
  const navList = header?.navs;
1884
1916
  const context = useMemo(() => ({
1885
1917
  isMobile,
1918
+ isLandingPages,
1886
1919
  layout,
1887
1920
  baseURLs,
1888
1921
  hashToken,
@@ -1893,8 +1926,11 @@ function PageRenderer$1({
1893
1926
  templateId,
1894
1927
  navList,
1895
1928
  validations,
1896
- isTutorWebsite
1897
- }), [isMobile, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite]);
1929
+ isTutorWebsite,
1930
+ extraProps,
1931
+ hideLogin,
1932
+ _id
1933
+ }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id]);
1898
1934
  const Wrapper = SectionWrapper || Fragment;
1899
1935
  return /*#__PURE__*/React.createElement(ThemeProvider, {
1900
1936
  theme: theme
@@ -1904,7 +1940,8 @@ function PageRenderer$1({
1904
1940
  fontFamily: font
1905
1941
  }), !!header && /*#__PURE__*/React.createElement(Wrapper, !!SectionWrapper && {
1906
1942
  sectionData: header,
1907
- isHeader: true
1943
+ isHeader: true,
1944
+ hideLogin
1908
1945
  }, /*#__PURE__*/React.createElement(Header, {
1909
1946
  data: header
1910
1947
  })), sections?.length ? sections?.map((sectionData, sectionIndex) => /*#__PURE__*/React.createElement(Wrapper, _extends({}, !!SectionWrapper && {
@@ -1913,7 +1950,8 @@ function PageRenderer$1({
1913
1950
  }, {
1914
1951
  key: sectionData.type + (sectionData._id || sectionIndex)
1915
1952
  }), /*#__PURE__*/React.createElement(SectionRenderer$1, {
1916
- sectionData: sectionData
1953
+ sectionData: sectionData,
1954
+ extraProps: extraProps
1917
1955
  }))) : sectionPlaceholder, !!footer && /*#__PURE__*/React.createElement(Wrapper, !!SectionWrapper && {
1918
1956
  sectionData: footer,
1919
1957
  isFooter: true
@@ -2338,7 +2376,7 @@ function BannerCarouselRight({
2338
2376
  })))));
2339
2377
  }
2340
2378
 
2341
- var index$g = /*#__PURE__*/Object.freeze({
2379
+ var index$j = /*#__PURE__*/Object.freeze({
2342
2380
  __proto__: null,
2343
2381
  'default': BannerCarouselRight
2344
2382
  });
@@ -2590,7 +2628,7 @@ function List({
2590
2628
  }))));
2591
2629
  }
2592
2630
 
2593
- var index$f = /*#__PURE__*/Object.freeze({
2631
+ var index$i = /*#__PURE__*/Object.freeze({
2594
2632
  __proto__: null,
2595
2633
  'default': List
2596
2634
  });
@@ -2759,7 +2797,7 @@ function BannerCarouselCenter({
2759
2797
  }))));
2760
2798
  }
2761
2799
 
2762
- var index$e = /*#__PURE__*/Object.freeze({
2800
+ var index$h = /*#__PURE__*/Object.freeze({
2763
2801
  __proto__: null,
2764
2802
  'default': BannerCarouselCenter
2765
2803
  });
@@ -2950,7 +2988,7 @@ function BannerCarouselLeft({
2950
2988
  })))));
2951
2989
  }
2952
2990
 
2953
- var index$d = /*#__PURE__*/Object.freeze({
2991
+ var index$g = /*#__PURE__*/Object.freeze({
2954
2992
  __proto__: null,
2955
2993
  'default': BannerCarouselLeft
2956
2994
  });
@@ -3319,7 +3357,7 @@ function SubscribeToNewsletter({
3319
3357
  })))))));
3320
3358
  }
3321
3359
 
3322
- var index$c = /*#__PURE__*/Object.freeze({
3360
+ var index$f = /*#__PURE__*/Object.freeze({
3323
3361
  __proto__: null,
3324
3362
  'default': SubscribeToNewsletter
3325
3363
  });
@@ -3581,7 +3619,7 @@ function Testimonials({
3581
3619
  }));
3582
3620
  }
3583
3621
 
3584
- var index$b = /*#__PURE__*/Object.freeze({
3622
+ var index$e = /*#__PURE__*/Object.freeze({
3585
3623
  __proto__: null,
3586
3624
  'default': Testimonials
3587
3625
  });
@@ -3734,13 +3772,13 @@ function VideoPlayer(props) {
3734
3772
 
3735
3773
  return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoaded && /*#__PURE__*/React.createElement("div", {
3736
3774
  className: classes.imgContainer
3737
- }, isEnabled ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Icon, {
3775
+ }, isEnabled ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(React.Fragment, null, props.onlyThumbnail ? null : /*#__PURE__*/React.createElement(Icon, {
3738
3776
  name: "Video Play",
3739
3777
  color: theme.palette.font.invertedDefault,
3740
3778
  onClick: () => {
3741
3779
  setIsEnableed(true);
3742
3780
  }
3743
- })), isEnabled && /*#__PURE__*/React.createElement("iframe", {
3781
+ }))), isEnabled && /*#__PURE__*/React.createElement("iframe", {
3744
3782
  className: classes.iframe + ' ' + classes.hideImg,
3745
3783
  src: imageUrl ? getId(videoUrl) + '?autoplay=1' : getId(videoUrl),
3746
3784
  frameBorder: "0",
@@ -3881,7 +3919,7 @@ const useVideoTestimonialStyles = createUseStyles(theme => {
3881
3919
  };
3882
3920
  });
3883
3921
 
3884
- const SingleVideoSlide = props => {
3922
+ const SingleVideoSlide$2 = props => {
3885
3923
  const {
3886
3924
  data
3887
3925
  } = props;
@@ -3954,13 +3992,13 @@ function VideoTestimonial({
3954
3992
  dangerouslySetInnerHTML: {
3955
3993
  __html: videoData.title.metadata.value
3956
3994
  }
3957
- })), /*#__PURE__*/React.createElement(Wrapper, null, videoData.videoCarousel.components.map((data, index) => /*#__PURE__*/React.createElement(SingleVideoSlide, {
3995
+ })), /*#__PURE__*/React.createElement(Wrapper, null, videoData.videoCarousel.components.map((data, index) => /*#__PURE__*/React.createElement(SingleVideoSlide$2, {
3958
3996
  data: data,
3959
3997
  key: index
3960
3998
  }))))));
3961
3999
  }
3962
4000
 
3963
- var index$a = /*#__PURE__*/Object.freeze({
4001
+ var index$d = /*#__PURE__*/Object.freeze({
3964
4002
  __proto__: null,
3965
4003
  'default': VideoTestimonial
3966
4004
  });
@@ -4188,7 +4226,7 @@ function Video({
4188
4226
  }, carouselContent))));
4189
4227
  }
4190
4228
 
4191
- var index$9 = /*#__PURE__*/Object.freeze({
4229
+ var index$c = /*#__PURE__*/Object.freeze({
4192
4230
  __proto__: null,
4193
4231
  'default': Video
4194
4232
  });
@@ -4414,7 +4452,7 @@ function Info({
4414
4452
  }, carouselContent))));
4415
4453
  }
4416
4454
 
4417
- var index$8 = /*#__PURE__*/Object.freeze({
4455
+ var index$b = /*#__PURE__*/Object.freeze({
4418
4456
  __proto__: null,
4419
4457
  'default': Info
4420
4458
  });
@@ -4533,7 +4571,7 @@ const TextSection = ({
4533
4571
  })))));
4534
4572
  };
4535
4573
 
4536
- var index$7 = /*#__PURE__*/Object.freeze({
4574
+ var index$a = /*#__PURE__*/Object.freeze({
4537
4575
  __proto__: null,
4538
4576
  'default': TextSection
4539
4577
  });
@@ -4690,7 +4728,7 @@ function PhotoGallery({
4690
4728
  }, carouselContent))));
4691
4729
  }
4692
4730
 
4693
- var index$6 = /*#__PURE__*/Object.freeze({
4731
+ var index$9 = /*#__PURE__*/Object.freeze({
4694
4732
  __proto__: null,
4695
4733
  'default': PhotoGallery
4696
4734
  });
@@ -4868,7 +4906,7 @@ const Accordion = ({
4868
4906
  })));
4869
4907
  };
4870
4908
 
4871
- var index$5 = /*#__PURE__*/Object.freeze({
4909
+ var index$8 = /*#__PURE__*/Object.freeze({
4872
4910
  __proto__: null,
4873
4911
  'default': FAQListing
4874
4912
  });
@@ -5033,7 +5071,7 @@ const TextGrid = ({
5033
5071
  }, carouselContent))));
5034
5072
  };
5035
5073
 
5036
- var index$4 = /*#__PURE__*/Object.freeze({
5074
+ var index$7 = /*#__PURE__*/Object.freeze({
5037
5075
  __proto__: null,
5038
5076
  'default': TextGrid
5039
5077
  });
@@ -5487,7 +5525,7 @@ function SimpleCardsContainer({
5487
5525
  }, children);
5488
5526
  }
5489
5527
 
5490
- var index$3 = /*#__PURE__*/Object.freeze({
5528
+ var index$6 = /*#__PURE__*/Object.freeze({
5491
5529
  __proto__: null,
5492
5530
  'default': courses
5493
5531
  });
@@ -5710,7 +5748,7 @@ function TeamCard({
5710
5748
  }, " ", carouselContent)));
5711
5749
  }
5712
5750
 
5713
- var index$2 = /*#__PURE__*/Object.freeze({
5751
+ var index$5 = /*#__PURE__*/Object.freeze({
5714
5752
  __proto__: null,
5715
5753
  'default': TeamCard
5716
5754
  });
@@ -6084,7 +6122,7 @@ function FormEnquiry({
6084
6122
  }))))));
6085
6123
  }
6086
6124
 
6087
- var index$1 = /*#__PURE__*/Object.freeze({
6125
+ var index$4 = /*#__PURE__*/Object.freeze({
6088
6126
  __proto__: null,
6089
6127
  'default': FormEnquiry
6090
6128
  });
@@ -6458,46 +6496,1068 @@ function Contact({
6458
6496
  }))))));
6459
6497
  }
6460
6498
 
6461
- var index = /*#__PURE__*/Object.freeze({
6499
+ var index$3 = /*#__PURE__*/Object.freeze({
6462
6500
  __proto__: null,
6463
6501
  'default': Contact
6464
6502
  });
6465
6503
 
6466
- const TYPE_TO_COMPONENT_MAP = {
6467
- BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
6468
- GRID_CARD: List,
6469
- BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
6470
- BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
6471
- FORM_SUBSCRIBE: SubscribeToNewsletter,
6472
- TEXT_TESTIMONIAL: Testimonials,
6473
- VIDEO_TESTIMONIAL: VideoTestimonial,
6474
- VIDEO: Video,
6475
- INFO: Info,
6476
- TEXT: TextSection,
6477
- IMAGE_GALLERY: PhotoGallery,
6478
- FAQ_LISTING: FAQListing,
6479
- TEXT_GRID: TextGrid,
6480
- COURSE_CAROUSEL: courses,
6481
- TEAM_CARD: TeamCard,
6482
- CONTACT: FormEnquiry,
6483
- FORM_ENQUIRY: Contact
6484
- };
6504
+ const useWebinarPromotionPage = createUseStyles(theme => {
6505
+ return {
6506
+ webinarSuperContainer: {
6507
+ display: 'flex',
6508
+ justifyContent: 'center',
6509
+ padding: '70px',
6510
+ '&, & *, & *:before, & *:after': {
6511
+ fontFamily: theme?.typography?.fontFamily,
6512
+ boxSizing: 'border-box'
6513
+ },
6514
+ '& h2,& h3': {
6515
+ fontWeight: '500',
6516
+ '& b,& strong': {
6517
+ fontWeight: '700'
6518
+ }
6519
+ }
6520
+ },
6521
+ sectionContainer: {
6522
+ margin: '0 auto',
6523
+ maxWidth: ({
6524
+ containerWidth
6525
+ } = {}) => containerWidth
6526
+ },
6527
+ videoTestimonialContainer: {
6528
+ width: '100%',
6529
+ maxWidth: '1440px',
6530
+ fontFamily: theme?.typography?.fontFamily
6531
+ },
6532
+ videoTestimonialHeading: {
6533
+ fontSize: '16px',
6534
+ lineHeight: '20px',
6535
+ letterSpacing: '3px',
6536
+ textTransform: 'uppercase',
6537
+ color: theme.palette.font.tertiary,
6538
+ wordBreak: 'break-word',
6539
+ fontWeight: '700'
6540
+ },
6541
+ videoTestimonialTitle: {
6542
+ fontSize: '56px',
6543
+ lineHeight: '71px',
6544
+ letterSpacing: '-3px',
6545
+ margin: '0',
6546
+ color: theme.palette.font.default,
6547
+ wordBreak: 'break-word'
6548
+ },
6549
+ videoCarouselContainer: {
6550
+ marginTop: '16px'
6551
+ },
6552
+ webinarCarousel: {
6553
+ display: 'flex',
6554
+ justifyContent: 'flex-start',
6555
+ gap: '60px'
6556
+ },
6557
+ iframeSuperContainer: {
6558
+ height: '100%',
6559
+ width: '100%',
6560
+ display: 'flex',
6561
+ alignItems: 'center'
6562
+ },
6563
+ iframeContainer: {
6564
+ width: '90%',
6565
+ position: 'relative',
6566
+ paddingBottom: '56.25%',
6567
+ // top: "6%",
6568
+ left: '5%'
6569
+ },
6570
+ offerText: {
6571
+ textAlign: 'center',
6572
+ color: theme.palette.font.primary
6573
+ },
6574
+ offerPrice: {
6575
+ fontSize: '32px',
6576
+ fontWeight: '700'
6577
+ },
6578
+ priceContainer: {
6579
+ display: 'flex',
6580
+ flexDirection: 'column',
6581
+ width: 'fit-content'
6582
+ },
6583
+ originalPrice: {
6584
+ textDecoration: 'line-through',
6585
+ color: 'rgba(51, 51, 51, 0.6)'
6586
+ },
6587
+ offerDiscount: {
6588
+ color: '#08BD80',
6589
+ fontWeight: '600'
6590
+ },
6591
+ bottomContainer: {
6592
+ display: 'flex',
6593
+ justifyContent: 'space-around',
6594
+ marginTop: '5%'
6595
+ },
6596
+ iframe: {
6597
+ position: 'absolute',
6598
+ width: '100%',
6599
+ height: '100%',
6600
+ borderRadius: theme.shape.borderRadius.small
6601
+ },
6602
+ videoDetails: {
6603
+ width: '100%',
6604
+ display: 'flex',
6605
+ flexDirection: 'column',
6606
+ alignItems: 'flex-start'
6607
+ },
6608
+ videoDetailsHeading: {
6609
+ fontSize: '40px',
6610
+ lineHeight: '48px',
6611
+ margin: '0',
6612
+ letterSpacing: '-1px',
6613
+ wordBreak: 'break-word',
6614
+ color: theme.palette.font.default
6615
+ },
6616
+ courseViewContainer: {
6617
+ width: '645px',
6618
+ backgroundColor: '#f4f9ff',
6619
+ display: 'flex',
6620
+ flexDirection: 'column'
6621
+ },
6622
+ bannerContainer: {
6623
+ background: '#EB5757',
6624
+ color: '#fff',
6625
+ textAlign: 'center',
6626
+ padding: '6.5px 18px',
6627
+ position: 'relative',
6628
+ '&:after': {
6629
+ width: '0',
6630
+ height: '0',
6631
+ border: '11.5px solid transparent',
6632
+ position: 'absolute',
6633
+ content: '""',
6634
+ borderTopColor: '#EB5757',
6635
+ right: '-23px',
6636
+ top: '0px',
6637
+ borderLeftColor: ' #EB5757'
6638
+ },
6639
+ '&:before': {
6640
+ width: 0,
6641
+ height: 0,
6642
+ border: '22.5px solid transparent',
6643
+ position: 'absolute',
6644
+ content: '""',
6645
+ borderBottomColor: '#EB5757',
6646
+ right: '-23px',
6647
+ top: '-10.5px'
6648
+ }
6649
+ },
6650
+ courseDetailsTags: {
6651
+ marginTop: '16px',
6652
+ display: 'flex'
6653
+ },
6654
+ courseDetailTag: {
6655
+ display: 'flex',
6656
+ alignItems: 'center',
6657
+ marginRight: '20px',
6658
+ '& div': {
6659
+ fontSize: '14px',
6660
+ marginLeft: '10px'
6661
+ }
6662
+ },
6663
+ courseDetailContent: {
6664
+ marginTop: '16px',
6665
+ fontSize: '16px',
6666
+ lineHeight: '24px',
6667
+ wordBreak: 'break-word',
6668
+ color: theme.palette.font.primary,
6669
+ margin: '10px 0 20px'
6670
+ },
6671
+ courseDetailViewFullDetails: {
6672
+ cursor: 'pointer',
6673
+ fontSize: '16px',
6674
+ lineHeight: '24px',
6675
+ margin: '0',
6676
+ color: '#1676F3',
6677
+ wordBreak: 'break-word'
6678
+ },
6679
+ courseDetailTime: {
6680
+ color: '#EB5757',
6681
+ fontWeight: '600'
6682
+ },
6683
+ webinarButtonContainer: {
6684
+ marginBottom: '20px'
6685
+ },
6686
+ '@media (max-width: 767px)': {
6687
+ courseViewContainer: {
6688
+ width: '100%'
6689
+ },
6690
+ webinarSuperContainer: {
6691
+ padding: '20px 10px 60px 20px'
6692
+ },
6693
+ videoCarousel: {
6694
+ flexDirection: 'column-reverse',
6695
+ gap: '20px'
6696
+ },
6697
+ videoCarouselContainer: {
6698
+ height: 'max-content',
6699
+ paddingRight: '10px'
6700
+ },
6701
+ videoDetails: {
6702
+ width: '100%'
6703
+ },
6704
+ videoDetailsHeading: {
6705
+ fontSize: '16px',
6706
+ lineHeight: '20px'
6707
+ },
6708
+ videoTestimonialTitle: {
6709
+ fontSize: '24px',
6710
+ lineHeight: '36px',
6711
+ letterSpacing: '-1px'
6712
+ },
6713
+ videoDetailsContent: {
6714
+ marginTop: '4px'
6715
+ }
6716
+ }
6717
+ };
6718
+ });
6485
6719
 
6486
- const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
6720
+ const SingleVideoSlide$1 = props => {
6721
+ useEffect(() => {// remaining days epoch
6722
+ // current date epoch
6723
+ // subtract remaining days from current day epoch
6724
+ // moment the result - and see if there are days
6725
+ // days is present show days
6726
+ // else start reverse timer
6727
+ }, []);
6728
+ const {
6729
+ data,
6730
+ webinarCtaClick
6731
+ } = props;
6487
6732
 
6488
- const MemoisedSection = /*#__PURE__*/memo(({
6489
- sectionData
6490
- }) => {
6491
- const SectionComp = getCompToRender(sectionData.type);
6492
- return /*#__PURE__*/React.createElement(SectionComp, {
6493
- sectionData: sectionData
6494
- });
6495
- });
6496
- function SectionRenderer({
6497
- sectionData
6733
+ const renderer = ({
6734
+ hours,
6735
+ minutes,
6736
+ seconds,
6737
+ completed
6738
+ }) => {
6739
+ if (hours < 24) {
6740
+ return /*#__PURE__*/React.createElement("span", null, hours, ":", minutes, ":", seconds);
6741
+ } else {
6742
+ let given = moment(props.data.endTime);
6743
+ let current = moment().startOf('day');
6744
+ return /*#__PURE__*/React.createElement("span", null, moment().duration(given.diff(current)).asDays());
6745
+ }
6746
+ };
6747
+
6748
+ const classes = useWebinarPromotionPage();
6749
+ return /*#__PURE__*/React.createElement("div", {
6750
+ className: classes.videoCarouselContainer
6751
+ }, /*#__PURE__*/React.createElement("div", {
6752
+ className: classes.webinarCarousel
6753
+ }, /*#__PURE__*/React.createElement("div", {
6754
+ className: classes.iframeSuperContainer
6755
+ }, /*#__PURE__*/React.createElement("div", {
6756
+ className: classes.videoDetails
6757
+ }, /*#__PURE__*/React.createElement("h3", {
6758
+ className: classes.bannerContainer
6759
+ }, data.offerPriceValidFor <= 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer for limited period only") : /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer is left for ", data.offerPriceValidFor, " users now")), /*#__PURE__*/React.createElement("h3", {
6760
+ ref: data?.videoTextHeading?.refSetter,
6761
+ className: classes.videoDetailsHeading,
6762
+ dangerouslySetInnerHTML: {
6763
+ __html: data.title
6764
+ }
6765
+ }), /*#__PURE__*/React.createElement("div", {
6766
+ className: classes.courseDetailsTags
6767
+ }, /*#__PURE__*/React.createElement("div", {
6768
+ className: classes.courseDetailTag
6769
+ }, /*#__PURE__*/React.createElement(Icon, {
6770
+ name: 'Calendar'
6771
+ }), /*#__PURE__*/React.createElement("div", null, moment(data.startDate).format('dddd, MMMM Do, h:mm:ss'))), /*#__PURE__*/React.createElement("div", {
6772
+ className: classes.courseDetailTag
6773
+ }, /*#__PURE__*/React.createElement(Icon, {
6774
+ name: 'Video'
6775
+ }), /*#__PURE__*/React.createElement("div", null, data.webinarLocation))), /*#__PURE__*/React.createElement("p", {
6776
+ ref: data?.videoTextContent?.refSetter,
6777
+ className: classes.courseDetailContent,
6778
+ dangerouslySetInnerHTML: {
6779
+ __html: data.description.substring(0, 250)
6780
+ }
6781
+ }), /*#__PURE__*/React.createElement("p", {
6782
+ ref: data?.videoTextSubContent?.refSetter,
6783
+ className: classes.courseDetailViewFullDetails,
6784
+ dangerouslySetInnerHTML: {
6785
+ __html: data.description.length > 250 ? 'Read More' : null
6786
+ }
6787
+ }))), /*#__PURE__*/React.createElement("div", {
6788
+ className: classes.courseViewContainer
6789
+ }, /*#__PURE__*/React.createElement("p", {
6790
+ className: classes.offerText
6791
+ }, "Offer Ends in", ' ', /*#__PURE__*/React.createElement("span", {
6792
+ className: classes.courseDetailTime
6793
+ }, /*#__PURE__*/React.createElement(Countdown, {
6794
+ renderer: renderer,
6795
+ date: data.endDate
6796
+ }))), /*#__PURE__*/React.createElement("div", {
6797
+ ref: data?.videoFrame?.refSetter,
6798
+ className: classes.iframeContainer
6799
+ }, /*#__PURE__*/React.createElement(VideoPlayer, {
6800
+ onlyThumbnail: true,
6801
+ imageUrl: data.thumbnail,
6802
+ videoUrl: data.thumbnail
6803
+ })), /*#__PURE__*/React.createElement("div", {
6804
+ className: classes.bottomContainer
6805
+ }, data.isPaid && /*#__PURE__*/React.createElement("div", {
6806
+ className: classes.priceContainer
6807
+ }, /*#__PURE__*/React.createElement("div", {
6808
+ className: classes.offerPrice
6809
+ }, data.offerPrice), /*#__PURE__*/React.createElement("p", {
6810
+ style: {
6811
+ fontSize: '20px'
6812
+ }
6813
+ }, /*#__PURE__*/React.createElement("span", {
6814
+ className: classes.originalPrice
6815
+ }, data.regularPrice), ' ', /*#__PURE__*/React.createElement("span", {
6816
+ className: classes.offerDiscount
6817
+ }, "50% OFF"))), /*#__PURE__*/React.createElement("div", {
6818
+ className: classes.webinarButtonContainer
6819
+ }, /*#__PURE__*/React.createElement(Button, {
6820
+ style: {
6821
+ backgroundColor: '#009AE0',
6822
+ width: data.isPaid ? '150px' : '250px'
6823
+ },
6824
+ data: {
6825
+ // link: 'headerData?.loginCtaLink',
6826
+ // isLink: 1,
6827
+ value: data.isPaid ? 'BUY NOW' : 'REGISTER NOW' // isExternal: 1
6828
+
6829
+ },
6830
+ onClick: webinarCtaClick,
6831
+ type: 'primary',
6832
+ size: 'medium',
6833
+ target: null,
6834
+ rel: null
6835
+ }))))));
6836
+ };
6837
+
6838
+ function CoursePromotionPage$1({
6839
+ sectionData,
6840
+ extraProps = {}
6841
+ }) {
6842
+ const {
6843
+ layout: {
6844
+ containerWidth
6845
+ }
6846
+ } = useContext(PageContext);
6847
+ const classes = useWebinarPromotionPage({
6848
+ containerWidth
6849
+ });
6850
+ console.log(sectionData);
6851
+ return /*#__PURE__*/React.createElement("div", {
6852
+ className: classes.webinarSuperContainer
6853
+ }, /*#__PURE__*/React.createElement("div", {
6854
+ className: classes.videoTestimonialContainer
6855
+ }, /*#__PURE__*/React.createElement("div", {
6856
+ className: classes.sectionContainer
6857
+ }, /*#__PURE__*/React.createElement(SingleVideoSlide$1, {
6858
+ data: sectionData.components[0].metadata,
6859
+ webinarCtaClick: extraProps.webinarCtaClick
6860
+ }))));
6861
+ }
6862
+
6863
+ var index$2 = /*#__PURE__*/Object.freeze({
6864
+ __proto__: null,
6865
+ 'default': CoursePromotionPage$1
6866
+ });
6867
+
6868
+ const useCoursePromotionPage = createUseStyles(theme => {
6869
+ return {
6870
+ courseSuperContainer: {
6871
+ display: 'flex',
6872
+ justifyContent: 'center',
6873
+ padding: '70px ',
6874
+ '&, & *, & *:before, & *:after': {
6875
+ fontFamily: theme?.typography?.fontFamily,
6876
+ boxSizing: 'border-box'
6877
+ },
6878
+ '& h2,& h3': {
6879
+ fontWeight: '500',
6880
+ '& b,& strong': {
6881
+ fontWeight: '700'
6882
+ }
6883
+ }
6884
+ },
6885
+ sectionContainer: {
6886
+ margin: '0 auto',
6887
+ maxWidth: ({
6888
+ containerWidth
6889
+ } = {}) => containerWidth
6890
+ },
6891
+ videoTestimonialContainer: {
6892
+ width: '100%',
6893
+ maxWidth: '1440px',
6894
+ fontFamily: theme?.typography?.fontFamily
6895
+ },
6896
+ videoTestimonialHeading: {
6897
+ fontSize: '16px',
6898
+ lineHeight: '20px',
6899
+ letterSpacing: '3px',
6900
+ textTransform: 'uppercase',
6901
+ color: theme.palette.font.tertiary,
6902
+ wordBreak: 'break-word',
6903
+ fontWeight: '700'
6904
+ },
6905
+ videoTestimonialTitle: {
6906
+ fontSize: '56px',
6907
+ lineHeight: '71px',
6908
+ letterSpacing: '-3px',
6909
+ margin: '0',
6910
+ color: theme.palette.font.default,
6911
+ wordBreak: 'break-word'
6912
+ },
6913
+ videoCarouselContainer: {
6914
+ marginTop: '16px'
6915
+ },
6916
+ coursePageCarousel: {
6917
+ display: 'flex',
6918
+ justifyContent: 'flex-start',
6919
+ gap: '60px'
6920
+ },
6921
+ iframeSuperContainer: {
6922
+ height: '100%',
6923
+ width: '100%',
6924
+ display: 'flex',
6925
+ alignItems: 'center'
6926
+ },
6927
+ iframeContainer: {
6928
+ width: '90%',
6929
+ position: 'relative',
6930
+ paddingBottom: '56.25%',
6931
+ // top: "6%",
6932
+ left: '5%'
6933
+ },
6934
+ offerText: {
6935
+ textAlign: 'center',
6936
+ color: theme.palette.font.primary
6937
+ },
6938
+ offerPrice: {
6939
+ fontSize: '32px',
6940
+ fontWeight: '700'
6941
+ },
6942
+ priceContainer: {
6943
+ display: 'flex',
6944
+ flexDirection: 'column',
6945
+ width: 'fit-content'
6946
+ },
6947
+ originalPrice: {
6948
+ textDecoration: 'line-through',
6949
+ color: 'rgba(51, 51, 51, 0.6)'
6950
+ },
6951
+ offerDiscount: {
6952
+ color: '#08BD80',
6953
+ fontWeight: '600'
6954
+ },
6955
+ bottomContainer: {
6956
+ display: 'flex',
6957
+ justifyContent: 'space-around',
6958
+ marginTop: '5%'
6959
+ },
6960
+ iframe: {
6961
+ position: 'absolute',
6962
+ width: '100%',
6963
+ height: '100%',
6964
+ borderRadius: theme.shape.borderRadius.small
6965
+ },
6966
+ videoDetails: {
6967
+ width: '100%',
6968
+ display: 'flex',
6969
+ flexDirection: 'column',
6970
+ alignItems: 'flex-start'
6971
+ },
6972
+ videoDetailsHeading: {
6973
+ fontSize: '40px',
6974
+ lineHeight: '48px',
6975
+ margin: '0',
6976
+ letterSpacing: '-1px',
6977
+ wordBreak: 'break-word',
6978
+ color: theme.palette.font.default
6979
+ },
6980
+ courseViewContainer: {
6981
+ width: '645px',
6982
+ backgroundColor: '#f4f9ff',
6983
+ display: 'flex',
6984
+ flexDirection: 'column'
6985
+ },
6986
+ bannerContainer: {
6987
+ background: '#EB5757',
6988
+ color: '#fff',
6989
+ textAlign: 'center',
6990
+ padding: '6.5px 18px',
6991
+ position: 'relative',
6992
+ '&:after': {
6993
+ width: '0',
6994
+ height: '0',
6995
+ border: '11.5px solid transparent',
6996
+ position: 'absolute',
6997
+ content: '""',
6998
+ borderTopColor: '#EB5757',
6999
+ right: '-23px',
7000
+ top: '0px',
7001
+ borderLeftColor: ' #EB5757'
7002
+ },
7003
+ '&:before': {
7004
+ width: 0,
7005
+ height: 0,
7006
+ border: '22.5px solid transparent',
7007
+ position: 'absolute',
7008
+ content: '""',
7009
+ borderBottomColor: '#EB5757',
7010
+ right: '-23px',
7011
+ top: '-10.5px'
7012
+ }
7013
+ },
7014
+ courseDetailsTags: {
7015
+ marginTop: '16px',
7016
+ display: 'flex'
7017
+ },
7018
+ courseDetailTag: {
7019
+ display: 'flex',
7020
+ alignItems: 'center',
7021
+ marginRight: '20px',
7022
+ '& div': {
7023
+ fontSize: '14px',
7024
+ marginLeft: '10px'
7025
+ }
7026
+ },
7027
+ courseDetailContent: {
7028
+ marginTop: '16px',
7029
+ fontSize: '16px',
7030
+ lineHeight: '24px',
7031
+ wordBreak: 'break-word',
7032
+ color: theme.palette.font.primary,
7033
+ margin: '10px 0 20px'
7034
+ },
7035
+ courseDetailViewFullDetails: {
7036
+ cursor: 'pointer',
7037
+ fontSize: '16px',
7038
+ lineHeight: '24px',
7039
+ margin: '0',
7040
+ color: '#1676F3',
7041
+ wordBreak: 'break-word'
7042
+ },
7043
+ courseDetailTime: {
7044
+ color: '#EB5757',
7045
+ fontWeight: '600'
7046
+ },
7047
+ '@media (max-width: 767px)': {
7048
+ courseViewContainer: {
7049
+ width: '100%'
7050
+ },
7051
+ courseSuperContainer: {
7052
+ padding: '20px 10px 60px 20px'
7053
+ },
7054
+ videoCarousel: {
7055
+ flexDirection: 'column-reverse',
7056
+ gap: '20px'
7057
+ },
7058
+ videoCarouselContainer: {
7059
+ height: 'max-content',
7060
+ paddingRight: '10px'
7061
+ },
7062
+ videoDetails: {
7063
+ width: '100%'
7064
+ },
7065
+ videoDetailsHeading: {
7066
+ fontSize: '20px',
7067
+ fontWeight: '600',
7068
+ lineHeight: '20px'
7069
+ },
7070
+ videoTestimonialTitle: {
7071
+ fontSize: '24px',
7072
+ lineHeight: '36px',
7073
+ letterSpacing: '-1px'
7074
+ },
7075
+ videoDetailsContent: {
7076
+ marginTop: '4px'
7077
+ }
7078
+ }
7079
+ };
7080
+ });
7081
+
7082
+ const SingleVideoSlide = props => {
7083
+ useEffect(() => {// remaining days epoch
7084
+ // current date epoch
7085
+ // subtract remaining days from current day epoch
7086
+ // moment the result - and see if there are days
7087
+ // days is present show days
7088
+ // else start reverse timer
7089
+ }, []);
7090
+
7091
+ const renderer = ({
7092
+ hours,
7093
+ minutes,
7094
+ seconds,
7095
+ completed
7096
+ }) => {
7097
+ if (hours < 24) {
7098
+ return /*#__PURE__*/React.createElement("span", null, hours, ":", minutes, ":", seconds);
7099
+ } else {
7100
+ let given = moment(props.data.endTime);
7101
+ let current = moment().startOf('day');
7102
+ return /*#__PURE__*/React.createElement("span", null, moment.duration(given.diff(current)).asDays());
7103
+ }
7104
+ };
7105
+
7106
+ const {
7107
+ data,
7108
+ courseBuyNow
7109
+ } = props;
7110
+ const classes = useCoursePromotionPage();
7111
+ console.log(courseBuyNow, 'courseBuyNow');
7112
+ return /*#__PURE__*/React.createElement("div", {
7113
+ className: classes.videoCarouselContainer
7114
+ }, /*#__PURE__*/React.createElement("div", {
7115
+ className: classes.coursePageCarousel
7116
+ }, /*#__PURE__*/React.createElement("div", {
7117
+ className: classes.iframeSuperContainer
7118
+ }, /*#__PURE__*/React.createElement("div", {
7119
+ className: classes.videoDetails
7120
+ }, /*#__PURE__*/React.createElement("h3", {
7121
+ className: classes.bannerContainer
7122
+ }, data.offerPriceValidFor <= 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer for limited period only") : /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer is left for ", data.offerPriceValidFor, " users now")), /*#__PURE__*/React.createElement("h3", {
7123
+ ref: data?.videoTextHeading?.refSetter,
7124
+ className: classes.videoDetailsHeading,
7125
+ dangerouslySetInnerHTML: {
7126
+ __html: data.courseName
7127
+ }
7128
+ }), /*#__PURE__*/React.createElement("div", {
7129
+ className: classes.courseDetailsTags
7130
+ }, /*#__PURE__*/React.createElement("div", {
7131
+ className: classes.courseDetailTag
7132
+ }, /*#__PURE__*/React.createElement(Icon, {
7133
+ name: 'Clock'
7134
+ }), /*#__PURE__*/React.createElement("div", null, data.courseInfo?.validity ? data.courseInfo?.validity : '1 year Validity')), /*#__PURE__*/React.createElement("div", {
7135
+ className: classes.courseDetailTag
7136
+ }, /*#__PURE__*/React.createElement(Icon, {
7137
+ name: 'Book Saved'
7138
+ }), /*#__PURE__*/React.createElement("div", null, data.courseInfo?.books ? data.courseInfo?.books : 'Physical Books')), /*#__PURE__*/React.createElement("div", {
7139
+ className: classes.courseDetailTag
7140
+ }, /*#__PURE__*/React.createElement(Icon, {
7141
+ name: 'Certificate'
7142
+ }), /*#__PURE__*/React.createElement("div", null, data.courseInfo?.certificate ? data.courseInfo?.certificate : 'Course Cerficate'))), /*#__PURE__*/React.createElement("p", {
7143
+ ref: data?.videoTextContent?.refSetter,
7144
+ className: classes.courseDetailContent,
7145
+ dangerouslySetInnerHTML: {
7146
+ __html: data.description.substring(0, 250)
7147
+ }
7148
+ }), /*#__PURE__*/React.createElement("p", {
7149
+ ref: data?.videoTextSubContent?.refSetter,
7150
+ className: classes.courseDetailViewFullDetails,
7151
+ dangerouslySetInnerHTML: {
7152
+ __html: data.description.length > 250 ? 'Read More' : null
7153
+ }
7154
+ }))), /*#__PURE__*/React.createElement("div", {
7155
+ className: classes.courseViewContainer
7156
+ }, /*#__PURE__*/React.createElement("p", {
7157
+ className: classes.offerText
7158
+ }, "Offer Ends in", ' ', /*#__PURE__*/React.createElement("span", {
7159
+ className: classes.courseDetailTime
7160
+ }, /*#__PURE__*/React.createElement(Countdown, {
7161
+ renderer: renderer,
7162
+ date: data.endDate
7163
+ }))), /*#__PURE__*/React.createElement("div", {
7164
+ ref: data?.videoFrame?.refSetter,
7165
+ className: classes.iframeContainer
7166
+ }, /*#__PURE__*/React.createElement(VideoPlayer, {
7167
+ onlyThumbnail: true,
7168
+ imageUrl: data.thumbnail,
7169
+ videoUrl: data.thumbnail
7170
+ })), /*#__PURE__*/React.createElement("div", {
7171
+ className: classes.bottomContainer
7172
+ }, /*#__PURE__*/React.createElement("div", {
7173
+ className: classes.priceContainer
7174
+ }, /*#__PURE__*/React.createElement("div", {
7175
+ className: classes.offerPrice
7176
+ }, "\u20B9 ", data.effectivePrice), /*#__PURE__*/React.createElement("p", {
7177
+ style: {
7178
+ fontSize: '20px'
7179
+ }
7180
+ }, /*#__PURE__*/React.createElement("span", {
7181
+ className: classes.originalPrice
7182
+ }, "\u20B9 ", data.price), ' ', /*#__PURE__*/React.createElement("span", {
7183
+ className: classes.offerDiscount
7184
+ }, "50% OFF"))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
7185
+ style: {
7186
+ width: '150px'
7187
+ },
7188
+ data: {
7189
+ // link: 'headerData?.loginCtaLink',
7190
+ // isLink: 1,
7191
+ value: 'BUY NOW' // isExternal: 1
7192
+
7193
+ },
7194
+ onClick: courseBuyNow,
7195
+ type: 'primary',
7196
+ size: 'medium',
7197
+ target: null,
7198
+ rel: null // styling={isMobile ? { margin: '0 40px' } : {}}
7199
+
7200
+ }))))));
7201
+ };
7202
+
7203
+ function CoursePromotionPage({
7204
+ sectionData,
7205
+ extraProps = {}
7206
+ }) {
7207
+ const {
7208
+ layout: {
7209
+ containerWidth
7210
+ }
7211
+ } = useContext(PageContext);
7212
+ const classes = useCoursePromotionPage({
7213
+ containerWidth
7214
+ });
7215
+ console.log(sectionData, 'sectionData');
7216
+ return /*#__PURE__*/React.createElement("div", {
7217
+ className: classes.courseSuperContainer
7218
+ }, /*#__PURE__*/React.createElement("div", {
7219
+ className: classes.videoTestimonialContainer
7220
+ }, /*#__PURE__*/React.createElement("div", {
7221
+ className: classes.sectionContainer
7222
+ }, /*#__PURE__*/React.createElement(SingleVideoSlide, {
7223
+ data: sectionData.components[0].metadata,
7224
+ courseBuyNow: extraProps.courseBuyNow
7225
+ }))));
7226
+ }
7227
+
7228
+ var index$1 = /*#__PURE__*/Object.freeze({
7229
+ __proto__: null,
7230
+ 'default': CoursePromotionPage
7231
+ });
7232
+
7233
+ const useFormPageStyles = createUseStyles(theme => ({
7234
+ formPageSection: {
7235
+ padding: '35px 70px',
7236
+ background: '#F4F9FF',
7237
+ '&, & *, & *:before, & *:after': {
7238
+ fontFamily: theme?.typography?.fontFamily,
7239
+ boxSizing: 'border-box'
7240
+ }
7241
+ },
7242
+ formPageHeader: {
7243
+ textAlign: 'center'
7244
+ },
7245
+ formPageTitle: {
7246
+ fontSize: '50px',
7247
+ fontWeight: '700'
7248
+ },
7249
+ formPageSubtitle: {
7250
+ marginTop: '16px',
7251
+ fontSize: '16px',
7252
+ lineHeight: '23px',
7253
+ color: 'rgba(51, 51, 51, 0.5)',
7254
+ marginBottom: '32px'
7255
+ },
7256
+ formPageFormContainer: {
7257
+ marginTop: '32px',
7258
+ '& form': {
7259
+ padding: '35px 140px',
7260
+ background: '#FFFFFF',
7261
+ borderRadius: '8px',
7262
+ boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.16)'
7263
+ }
7264
+ },
7265
+ inputField: {
7266
+ marginTop: '20px',
7267
+ padding: '20px',
7268
+ border: '1px solid #D8E0F0',
7269
+ borderRadius: '16px'
7270
+ },
7271
+ inputFieldLabel: {
7272
+ color: '#333',
7273
+ fontSize: '20px',
7274
+ display: 'block',
7275
+ marginBottom: '10px'
7276
+ },
7277
+ inputFieldControl: {
7278
+ width: '100%',
7279
+ height: '50px',
7280
+ borderRadius: '8px',
7281
+ border: '1px solid #D8E0F0',
7282
+ padding: '5px 10px',
7283
+ color: '#7D8592',
7284
+ fontSize: '16px'
7285
+ },
7286
+ checkboxField: {
7287
+ marginTop: '20px',
7288
+ padding: '20px',
7289
+ border: '1px solid #D8E0F0',
7290
+ borderRadius: '8px'
7291
+ },
7292
+ checkBoxFieldLabel: {
7293
+ color: '#333',
7294
+ fontSize: '20px',
7295
+ margin: '10px 0'
7296
+ },
7297
+ checkboxFieldControl: {
7298
+ padding: '6px 0',
7299
+ '& label': {
7300
+ fontFamily: '16px',
7301
+ marginLeft: '10px',
7302
+ color: '#7D8592'
7303
+ }
7304
+ },
7305
+ submitBtnContainer: {
7306
+ marginTop: '20px',
7307
+ width: '100%',
7308
+ margin: '0 auto',
7309
+ '& button': {
7310
+ background: '#6269C9',
7311
+ height: '44px',
7312
+ padding: '10px 40px',
7313
+ border: '1px solid #4A90E2',
7314
+ color: '#FFFFFF',
7315
+ fontSize: '16px',
7316
+ cursor: 'pointer',
7317
+ borderRadius: '8px'
7318
+ }
7319
+ },
7320
+ // SMALL SCREEN
7321
+ '@media screen and (max-width: 767px)': {
7322
+ formPageSection: {
7323
+ padding: '24px'
7324
+ },
7325
+ formPageTitle: {
7326
+ fontSize: '24px'
7327
+ },
7328
+ formPageFormContainer: {
7329
+ '& form': {
7330
+ padding: '24px'
7331
+ }
7332
+ }
7333
+ }
7334
+ }));
7335
+
7336
+ const formPageMock = {
7337
+ title: 'Sed ut perspiciatis unde omnis iste',
7338
+ subTitle: 'Sed ut perspiciatis unde omnis iste natus error',
7339
+ questions: [{
7340
+ _id: '22',
7341
+ text: 'fdsafds',
7342
+ type: 'SA',
7343
+ options: [{
7344
+ value: ''
7345
+ }],
7346
+ isRequired: false,
7347
+ order: 1
7348
+ }, {
7349
+ _id: '23',
7350
+ text: 'fasdfdsaffdsafds',
7351
+ type: 'MC',
7352
+ options: [{
7353
+ value: 'fadsfdsf'
7354
+ }, {
7355
+ value: 'fdsafdsaf'
7356
+ }, {
7357
+ value: 'fsadfd'
7358
+ }, {
7359
+ value: 'fadsf'
7360
+ }],
7361
+ isRequired: false,
7362
+ order: 1
7363
+ }, {
7364
+ _id: '24',
7365
+ text: 'ewaofdsfkds',
7366
+ type: 'SC',
7367
+ options: [{
7368
+ value: 'fasdfdsf'
7369
+ }, {
7370
+ value: 'fasdfdasf'
7371
+ }, {
7372
+ value: 'fdsafsdf'
7373
+ }, {
7374
+ value: 'fdsafds'
7375
+ }],
7376
+ isRequired: false,
7377
+ order: 1
7378
+ }]
7379
+ };
7380
+
7381
+ const FormPage = ({
7382
+ sectionData,
7383
+ extraProps = {}
7384
+ }) => {
7385
+ const [formData, setFormData] = useState({});
7386
+ const classes = useFormPageStyles();
7387
+ const metadata = sectionData?.components?.[0]?.metadata || formPageMock;
7388
+ const {
7389
+ _id
7390
+ } = useContext(PageContext);
7391
+
7392
+ const handleSubmit = async e => {
7393
+ e.preventDefault();
7394
+ let formResponse = [];
7395
+
7396
+ for (const [key, value] of Object.entries(formData)) {
7397
+ formResponse.push({
7398
+ questionId: key,
7399
+ questionName: value.questionName,
7400
+ questionType: value.questionType,
7401
+ solutionArray: value.solutionArray
7402
+ });
7403
+ } // page id - section id
7404
+
7405
+
7406
+ axios.post(`https://diy.clp.staging.classplus.co/v1/diy/landingPages/form`, {
7407
+ paylaod: formResponse,
7408
+ sectionId: sectionData?.components?.[0]?._id || null,
7409
+ landingPageId: _id || null
7410
+ }).then(() => {
7411
+ if (extraProps && extraProps.formSubmitSuccess) {
7412
+ extraProps.formSubmitSuccess();
7413
+ }
7414
+ });
7415
+ };
7416
+
7417
+ return /*#__PURE__*/React.createElement("section", {
7418
+ className: classes.formPageSection
7419
+ }, /*#__PURE__*/React.createElement("div", {
7420
+ className: classes.formPageFormContainer
7421
+ }, /*#__PURE__*/React.createElement("form", {
7422
+ onSubmit: handleSubmit
7423
+ }, /*#__PURE__*/React.createElement("div", {
7424
+ className: classes.formPageHeader
7425
+ }, /*#__PURE__*/React.createElement("div", {
7426
+ className: classes.formPageTitle
7427
+ }, metadata?.title), /*#__PURE__*/React.createElement("div", {
7428
+ className: classes.formPageSubtitle
7429
+ }, metadata?.subTitle)), metadata?.questions?.map((item, index) => /*#__PURE__*/React.createElement(React.Fragment, null, item.type === 'SA' && /*#__PURE__*/React.createElement("div", {
7430
+ className: classes.inputField
7431
+ }, /*#__PURE__*/React.createElement("label", {
7432
+ className: classes.inputFieldLabel
7433
+ }, item.text), /*#__PURE__*/React.createElement("input", {
7434
+ className: classes.inputFieldControl,
7435
+ type: "text",
7436
+ placeholder: "Short answer",
7437
+ name: item._id,
7438
+ onChange: e => {
7439
+ setFormData({ ...formData,
7440
+ [item._id]: {
7441
+ questionName: item.text,
7442
+ solutionArray: [e.target.value],
7443
+ questionType: 'SA'
7444
+ }
7445
+ });
7446
+ }
7447
+ })), item.type === 'MC' && /*#__PURE__*/React.createElement("div", {
7448
+ className: classes.checkboxField
7449
+ }, /*#__PURE__*/React.createElement("div", {
7450
+ className: classes.checkBoxFieldLabel
7451
+ }, item.text), item.options.map((option, index) => /*#__PURE__*/React.createElement("div", {
7452
+ className: classes.checkboxFieldControl
7453
+ }, /*#__PURE__*/React.createElement("input", {
7454
+ value: option.value,
7455
+ type: "checkbox",
7456
+ name: option.value,
7457
+ id: option.value,
7458
+ onChange: e => {
7459
+ setFormData({ ...formData,
7460
+ [item._id]: {
7461
+ questionName: item.text,
7462
+ solutionArray: [],
7463
+ questionType: 'SA'
7464
+ }
7465
+ });
7466
+ },
7467
+ onBlur: e => {
7468
+ let newSolArray = [];
7469
+
7470
+ if (formData[item._id]) {
7471
+ if (!formData[item._id].solutionArray?.find(el => el === option.value)) {
7472
+ newSolArray.push(e.target.value);
7473
+ }
7474
+ }
7475
+
7476
+ setFormData({ ...formData,
7477
+ [item._id]: {
7478
+ questionName: item.text,
7479
+ solutionArray: [...newSolArray],
7480
+ questionType: 'SA'
7481
+ }
7482
+ });
7483
+ }
7484
+ }), /*#__PURE__*/React.createElement("label", {
7485
+ htmlFor: option.value
7486
+ }, option.value)))), item.type === 'SC' && /*#__PURE__*/React.createElement("div", {
7487
+ className: classes.checkboxField
7488
+ }, /*#__PURE__*/React.createElement("div", {
7489
+ className: classes.checkBoxFieldLabel
7490
+ }, item.text), item.options.map((option, index) => /*#__PURE__*/React.createElement("div", {
7491
+ className: classes.checkboxFieldControl
7492
+ }, /*#__PURE__*/React.createElement("input", {
7493
+ // value={option.value}
7494
+ type: "radio",
7495
+ name: "text" // name={option.value}
7496
+ // id={option.value}
7497
+ ,
7498
+ onChange: e => {
7499
+ setFormData({ ...formData,
7500
+ [item._id]: {
7501
+ questionName: item.text,
7502
+ solutionArray: [item.text],
7503
+ questionType: 'SC'
7504
+ }
7505
+ });
7506
+ }
7507
+ }), /*#__PURE__*/React.createElement("label", {
7508
+ htmlFor: option.value
7509
+ }, option.value)))))), /*#__PURE__*/React.createElement("div", {
7510
+ className: classes.submitBtnContainer
7511
+ }, /*#__PURE__*/React.createElement("button", null, "Submit")))));
7512
+ };
7513
+
7514
+ var index = /*#__PURE__*/Object.freeze({
7515
+ __proto__: null,
7516
+ 'default': FormPage
7517
+ });
7518
+
7519
+ const TYPE_TO_COMPONENT_MAP = {
7520
+ BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
7521
+ GRID_CARD: List,
7522
+ BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
7523
+ BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
7524
+ FORM_SUBSCRIBE: SubscribeToNewsletter,
7525
+ TEXT_TESTIMONIAL: Testimonials,
7526
+ VIDEO_TESTIMONIAL: VideoTestimonial,
7527
+ VIDEO: Video,
7528
+ INFO: Info,
7529
+ TEXT: TextSection,
7530
+ IMAGE_GALLERY: PhotoGallery,
7531
+ FAQ_LISTING: FAQListing,
7532
+ TEXT_GRID: TextGrid,
7533
+ COURSE_CAROUSEL: courses,
7534
+ TEAM_CARD: TeamCard,
7535
+ CONTACT: FormEnquiry,
7536
+ FORM_ENQUIRY: Contact,
7537
+ WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
7538
+ COURSE_LANDING_PAGE: CoursePromotionPage,
7539
+ FORM_LANDING_PAGE: FormPage
7540
+ };
7541
+
7542
+ const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
7543
+
7544
+ const MemoisedSection = /*#__PURE__*/memo(({
7545
+ sectionData,
7546
+ extraProps
7547
+ }) => {
7548
+ const SectionComp = getCompToRender(sectionData.type);
7549
+ return /*#__PURE__*/React.createElement(SectionComp, {
7550
+ sectionData: sectionData,
7551
+ extraProps: extraProps
7552
+ });
7553
+ });
7554
+ function SectionRenderer({
7555
+ sectionData,
7556
+ extraProps
6498
7557
  }) {
6499
7558
  return /*#__PURE__*/React.createElement(MemoisedSection, {
6500
- sectionData: sectionData
7559
+ sectionData: sectionData,
7560
+ extraProps: extraProps
6501
7561
  });
6502
7562
  }
6503
7563
 
@@ -6516,6 +7576,7 @@ function PageRenderer({
6516
7576
  validations = {}
6517
7577
  },
6518
7578
  isMobile = false,
7579
+ isLandingPages = false,
6519
7580
  baseURLs = {},
6520
7581
  hashToken,
6521
7582
  SectionWrapper,
@@ -6525,12 +7586,15 @@ function PageRenderer({
6525
7586
  isEdit,
6526
7587
  sectionPlaceholder,
6527
7588
  templateId,
6528
- isTutorWebsite = false
7589
+ isTutorWebsite = false,
7590
+ extraProps,
7591
+ hideLogin
6529
7592
  }) {
6530
7593
  const theme = useMemo(() => getTheme(color, font), [color, font]);
6531
7594
  const navList = header?.navs;
6532
7595
  const context = useMemo(() => ({
6533
7596
  isMobile,
7597
+ isLandingPages,
6534
7598
  layout,
6535
7599
  baseURLs,
6536
7600
  hashToken,
@@ -6541,8 +7605,10 @@ function PageRenderer({
6541
7605
  templateId,
6542
7606
  navList,
6543
7607
  validations,
6544
- isTutorWebsite
6545
- }), [isMobile, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite]);
7608
+ isTutorWebsite,
7609
+ extraProps,
7610
+ hideLogin
7611
+ }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin]);
6546
7612
  const Wrapper = SectionWrapper || Fragment;
6547
7613
  return /*#__PURE__*/React.createElement(ThemeProvider, {
6548
7614
  theme: theme
@@ -6561,7 +7627,8 @@ function PageRenderer({
6561
7627
  }, {
6562
7628
  key: sectionData.type + (sectionData._id || sectionIndex)
6563
7629
  }), /*#__PURE__*/React.createElement(SectionRenderer, {
6564
- sectionData: sectionData
7630
+ sectionData: sectionData,
7631
+ extraProps: extraProps
6565
7632
  }))) : sectionPlaceholder, !!footer && /*#__PURE__*/React.createElement(Wrapper, !!SectionWrapper && {
6566
7633
  sectionData: footer,
6567
7634
  isFooter: true