diy-template-components 4.0.1 → 4.0.4

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
@@ -2757,33 +2757,36 @@ function withSectionBackground(WrappedSectionRenderer) {
2757
2757
  }
2758
2758
 
2759
2759
  const TYPE_TO_COMPONENT_MAP$1 = {
2760
- BANNER_CAROUSEL_RIGHT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$q; })),
2761
- GRID_CARD: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$p; })),
2762
- BANNER_CAROUSEL_CENTER: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$o; })),
2763
- BANNER_CAROUSEL_CENTER_V2: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$n; })),
2764
- BANNER_CAROUSEL_LEFT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$m; })),
2765
- FORM_SUBSCRIBE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$l; })),
2766
- TEXT_TESTIMONIAL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$k; })),
2767
- VIDEO_TESTIMONIAL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$j; })),
2768
- VIDEO_WORKSHOP_PROMOTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$2; })),
2769
- VIDEO: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$i; })),
2770
- INFO: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$h; })),
2771
- TEXT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$g; })),
2772
- IMAGE_GALLERY: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$f; })),
2773
- FAQ_LISTING: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$e; })),
2774
- COURSE_CAROUSEL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$c; })),
2775
- TEAM_CARD: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$b; })),
2776
- TEXT_GRID: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$d; })),
2777
- CONTACT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$a; })),
2778
- FORM_ENQUIRY: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$9; })),
2779
- WEBINAR_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$8; })),
2780
- COURSE_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$7; })),
2781
- COURSE_LANDING_PAGE_V2: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$1; })),
2782
- FORM_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$6; })),
2783
- TILES_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$5; })),
2784
- EMAIL_DRIP_MARKET: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$4; })),
2785
- ABOUT_INSTITUTE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$3; })),
2786
- COUNTER_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index; }))
2760
+ BANNER_CAROUSEL_RIGHT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$t; })),
2761
+ GRID_CARD: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$s; })),
2762
+ BANNER_CAROUSEL_CENTER: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$r; })),
2763
+ BANNER_CAROUSEL_CENTER_V2: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$q; })),
2764
+ BANNER_CAROUSEL_LEFT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$p; })),
2765
+ FORM_SUBSCRIBE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$o; })),
2766
+ TEXT_TESTIMONIAL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$n; })),
2767
+ VIDEO_TESTIMONIAL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$m; })),
2768
+ VIDEO_WORKSHOP_PROMOTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$1; })),
2769
+ VIDEO: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$l; })),
2770
+ INFO: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$k; })),
2771
+ TEXT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$j; })),
2772
+ IMAGE_GALLERY: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$i; })),
2773
+ FAQ_LISTING: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$h; })),
2774
+ COURSE_CAROUSEL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$f; })),
2775
+ TEAM_CARD: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$e; })),
2776
+ TEXT_GRID: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$g; })),
2777
+ CONTACT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$d; })),
2778
+ FORM_ENQUIRY: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$c; })),
2779
+ WEBINAR_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$b; })),
2780
+ COURSE_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$a; })),
2781
+ COURSE_LANDING_PAGE_V2: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index; })),
2782
+ FORM_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$9; })),
2783
+ TILES_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$8; })),
2784
+ EMAIL_DRIP_MARKET: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$7; })),
2785
+ ABOUT_INSTITUTE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$6; })),
2786
+ COUNTER_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$5; })),
2787
+ TIMER_AND_CALL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$2; })),
2788
+ STICKY_CTA: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$4; })),
2789
+ CUSTOM_HTML_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$3; }))
2787
2790
  };
2788
2791
  const getCompToRender$1 = type => {
2789
2792
  const Comp = TYPE_TO_COMPONENT_MAP$1[type];
@@ -2817,35 +2820,21 @@ function SectionRenderer$1({
2817
2820
 
2818
2821
  console.log('nishu222', sectionData);
2819
2822
  let sectionBg = {};
2820
- debugger;
2821
2823
  if (sectionData?.isV2Section) {
2822
- let currentObj = sectionData?.components?.find(component => component.hasOwnProperty('sectionsBgname')?.sectionBgData || {});
2823
- sectionBg = currentObj?.sectionsBgname?.sectionBgData || {};
2824
+ sectionBg = sectionData?.bgSection?.components?.[0]?.sectionBgData || {};
2825
+ }
2826
+ if (sectionData?.type === 'STICKY_CTA') {
2827
+ sectionData = {
2828
+ ...sectionData,
2829
+ isDefaultEditor: true
2830
+ };
2824
2831
  }
2825
-
2826
- // sectionBg ={
2827
- // id:"625fb1a879d4c9001261cewqsazxs21",
2828
- // value: "imagev",
2829
- // label: "",
2830
- // type: "image",
2831
- // bgType: "video",
2832
- // name: "Image",
2833
- // isYoutubeVideo: true,
2834
- // elementType: "div",
2835
- // isV2: true,
2836
- // metadata: {
2837
- // value: "https://www.youtube.com/watch?v=bjxTIcuzB6k&list=PLe6YKWr4VVM1x2LIpiqmVvG4QgIvoDEdO",
2838
- // }
2839
- // }
2840
- console.log('nishu222333', sectionData);
2841
2832
  return /*#__PURE__*/React__default["default"].createElement(React.Suspense, {
2842
2833
  fallback: null /*GIF maybe*/
2843
2834
  }, /*#__PURE__*/React__default["default"].createElement(SectionWithBackground$1, {
2844
2835
  sectionData: sectionData,
2845
2836
  extraProps: extraProps,
2846
- sectionIndex: sectionIndex
2847
- // isSkipV2Section={sectionData?.isV2Section}
2848
- ,
2837
+ sectionIndex: sectionIndex,
2849
2838
  isSkipV2Section: sectionData?.isV2Section
2850
2839
  // componentBg={sectionData?.componentBg || { type: "image", value: "https://fastly.picsum.photos/id/4/5000/3333.jpg?hmac=ghf06FdmgiD0-G4c9DdNM8RnBIN7BO0-ZGEw47khHP4" }}
2851
2840
  ,
@@ -3589,7 +3578,7 @@ function BannerCarouselRight({
3589
3578
  })))));
3590
3579
  }
3591
3580
 
3592
- var index$q = /*#__PURE__*/Object.freeze({
3581
+ var index$t = /*#__PURE__*/Object.freeze({
3593
3582
  __proto__: null,
3594
3583
  'default': BannerCarouselRight
3595
3584
  });
@@ -3765,7 +3754,7 @@ function List({
3765
3754
  containerWidth,
3766
3755
  isMobile
3767
3756
  });
3768
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
3757
+ const [nodeData] = sectionData.components;
3769
3758
  const getNumber = val => {
3770
3759
  return val.toString().length == 1 ? '0' + val : val;
3771
3760
  };
@@ -3813,7 +3802,7 @@ function List({
3813
3802
  }))));
3814
3803
  }
3815
3804
 
3816
- var index$p = /*#__PURE__*/Object.freeze({
3805
+ var index$s = /*#__PURE__*/Object.freeze({
3817
3806
  __proto__: null,
3818
3807
  'default': List
3819
3808
  });
@@ -4121,7 +4110,7 @@ function BannerCarouselCenter({
4121
4110
  }))));
4122
4111
  }
4123
4112
 
4124
- var index$o = /*#__PURE__*/Object.freeze({
4113
+ var index$r = /*#__PURE__*/Object.freeze({
4125
4114
  __proto__: null,
4126
4115
  'default': BannerCarouselCenter
4127
4116
  });
@@ -4416,7 +4405,7 @@ function BannerCarouselCenterv2({
4416
4405
  }))));
4417
4406
  }
4418
4407
 
4419
- var index$n = /*#__PURE__*/Object.freeze({
4408
+ var index$q = /*#__PURE__*/Object.freeze({
4420
4409
  __proto__: null,
4421
4410
  'default': BannerCarouselCenterv2
4422
4411
  });
@@ -4657,7 +4646,7 @@ function BannerCarouselLeft({
4657
4646
  })))));
4658
4647
  }
4659
4648
 
4660
- var index$m = /*#__PURE__*/Object.freeze({
4649
+ var index$p = /*#__PURE__*/Object.freeze({
4661
4650
  __proto__: null,
4662
4651
  'default': BannerCarouselLeft
4663
4652
  });
@@ -4938,7 +4927,7 @@ function SubscribeToNewsletter({
4938
4927
  isLandingPages,
4939
4928
  extraProps
4940
4929
  } = React.useContext(PageContext);
4941
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
4930
+ const [nodeData] = sectionData.components;
4942
4931
  const classes = useSectionStyles$4({
4943
4932
  containerWidth,
4944
4933
  isMobile
@@ -5053,7 +5042,7 @@ function SubscribeToNewsletter({
5053
5042
  })))))));
5054
5043
  }
5055
5044
 
5056
- var index$l = /*#__PURE__*/Object.freeze({
5045
+ var index$o = /*#__PURE__*/Object.freeze({
5057
5046
  __proto__: null,
5058
5047
  'default': SubscribeToNewsletter
5059
5048
  });
@@ -5341,7 +5330,7 @@ function Testimonials({
5341
5330
  }));
5342
5331
  }
5343
5332
 
5344
- var index$k = /*#__PURE__*/Object.freeze({
5333
+ var index$n = /*#__PURE__*/Object.freeze({
5345
5334
  __proto__: null,
5346
5335
  'default': Testimonials
5347
5336
  });
@@ -5714,7 +5703,7 @@ function VideoTestimonial({
5714
5703
  containerWidth,
5715
5704
  isMobile
5716
5705
  });
5717
- const [videoData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
5706
+ const [videoData] = sectionData.components;
5718
5707
  const Wrapper = videoData.videoCarousel.components.length > 1 ? Carousel : React.Fragment;
5719
5708
  return /*#__PURE__*/React__default["default"].createElement("div", {
5720
5709
  className: classes.videoTestimonialSuperContainer
@@ -5745,7 +5734,7 @@ function VideoTestimonial({
5745
5734
  }))))));
5746
5735
  }
5747
5736
 
5748
- var index$j = /*#__PURE__*/Object.freeze({
5737
+ var index$m = /*#__PURE__*/Object.freeze({
5749
5738
  __proto__: null,
5750
5739
  'default': VideoTestimonial
5751
5740
  });
@@ -5934,7 +5923,7 @@ function Video({
5934
5923
  containerWidth
5935
5924
  }
5936
5925
  } = React.useContext(PageContext);
5937
- const [videoData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
5926
+ const [videoData] = sectionData.components;
5938
5927
  const cardsCount = videoData?.videoCarousel?.components?.length;
5939
5928
  const slidesToShow = isMobile ? 1 : 2;
5940
5929
  const classes = useVideoStyles({
@@ -5981,7 +5970,7 @@ function Video({
5981
5970
  }, carouselContent))));
5982
5971
  }
5983
5972
 
5984
- var index$i = /*#__PURE__*/Object.freeze({
5973
+ var index$l = /*#__PURE__*/Object.freeze({
5985
5974
  __proto__: null,
5986
5975
  'default': Video
5987
5976
  });
@@ -6141,7 +6130,7 @@ function Info({
6141
6130
  } = React.useContext(PageContext);
6142
6131
  const theme = useTheme();
6143
6132
  const slidesToShow = isMobile ? 1 : 4;
6144
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6133
+ const [nodeData] = sectionData.components;
6145
6134
  const carouselList = nodeData?.contentList?.components;
6146
6135
  const cardsCount = carouselList?.length;
6147
6136
  const classes = useSectionStyles$3({
@@ -6217,7 +6206,7 @@ function Info({
6217
6206
  }, carouselContent))));
6218
6207
  }
6219
6208
 
6220
- var index$h = /*#__PURE__*/Object.freeze({
6209
+ var index$k = /*#__PURE__*/Object.freeze({
6221
6210
  __proto__: null,
6222
6211
  'default': Info
6223
6212
  });
@@ -6300,7 +6289,7 @@ const TextSection = ({
6300
6289
  containerWidth,
6301
6290
  isMobile
6302
6291
  });
6303
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6292
+ const [nodeData] = sectionData.components;
6304
6293
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("section", {
6305
6294
  className: classes.section
6306
6295
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6336,7 +6325,7 @@ const TextSection = ({
6336
6325
  })))));
6337
6326
  };
6338
6327
 
6339
- var index$g = /*#__PURE__*/Object.freeze({
6328
+ var index$j = /*#__PURE__*/Object.freeze({
6340
6329
  __proto__: null,
6341
6330
  'default': TextSection
6342
6331
  });
@@ -6477,7 +6466,7 @@ function PhotoGallery({
6477
6466
  containerWidth
6478
6467
  }
6479
6468
  } = React.useContext(PageContext);
6480
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6469
+ const [nodeData] = sectionData.components;
6481
6470
  const carouselList = nodeData?.cardCarousel?.components;
6482
6471
  const cardsCount = carouselList?.length;
6483
6472
  const slidesToShow = isMobile ? 1 : 2;
@@ -6559,7 +6548,7 @@ function PhotoGallery({
6559
6548
  }, carouselContent))));
6560
6549
  }
6561
6550
 
6562
- var index$f = /*#__PURE__*/Object.freeze({
6551
+ var index$i = /*#__PURE__*/Object.freeze({
6563
6552
  __proto__: null,
6564
6553
  'default': PhotoGallery
6565
6554
  });
@@ -6676,7 +6665,7 @@ const FAQListing = ({
6676
6665
  containerWidth,
6677
6666
  isMobile
6678
6667
  });
6679
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6668
+ const [nodeData] = sectionData.components;
6680
6669
  return /*#__PURE__*/React__default["default"].createElement("section", {
6681
6670
  className: classes.section
6682
6671
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6742,7 +6731,7 @@ const Accordion = ({
6742
6731
  })));
6743
6732
  };
6744
6733
 
6745
- var index$e = /*#__PURE__*/Object.freeze({
6734
+ var index$h = /*#__PURE__*/Object.freeze({
6746
6735
  __proto__: null,
6747
6736
  'default': FAQListing
6748
6737
  });
@@ -6854,7 +6843,7 @@ const TextGrid = ({
6854
6843
  containerWidth
6855
6844
  }
6856
6845
  } = React.useContext(PageContext);
6857
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6846
+ const [nodeData] = sectionData.components;
6858
6847
  const cardsCount = nodeData?.contentList?.components?.length;
6859
6848
  const slidesToShow = isMobile ? 1 : 2;
6860
6849
  const classes = useTextGridStyles({
@@ -6913,7 +6902,7 @@ const TextGrid = ({
6913
6902
  }, carouselContent))));
6914
6903
  };
6915
6904
 
6916
- var index$d = /*#__PURE__*/Object.freeze({
6905
+ var index$g = /*#__PURE__*/Object.freeze({
6917
6906
  __proto__: null,
6918
6907
  'default': TextGrid
6919
6908
  });
@@ -8197,7 +8186,7 @@ function SimpleCardsContainer({
8197
8186
  }, children);
8198
8187
  }
8199
8188
 
8200
- var index$c = /*#__PURE__*/Object.freeze({
8189
+ var index$f = /*#__PURE__*/Object.freeze({
8201
8190
  __proto__: null,
8202
8191
  'default': courses
8203
8192
  });
@@ -8463,7 +8452,7 @@ function TeamCard({
8463
8452
  containerWidth
8464
8453
  }
8465
8454
  } = React.useContext(PageContext);
8466
- const [teamData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
8455
+ const [teamData] = sectionData.components;
8467
8456
  const cardsCount = teamData?.teamCarousel?.components?.length;
8468
8457
  const slidesToShow = isMobile ? 1 : 4;
8469
8458
  const classes = useTeamStyles({
@@ -8515,7 +8504,7 @@ function TeamCard({
8515
8504
  }, " ", getCarouselContent())));
8516
8505
  }
8517
8506
 
8518
- var index$b = /*#__PURE__*/Object.freeze({
8507
+ var index$e = /*#__PURE__*/Object.freeze({
8519
8508
  __proto__: null,
8520
8509
  'default': TeamCard
8521
8510
  });
@@ -8702,7 +8691,7 @@ function FormEnquiry({
8702
8691
  containerWidth,
8703
8692
  isMobile
8704
8693
  });
8705
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
8694
+ const [nodeData] = sectionData.components;
8706
8695
  const [isSubmitted, setIsSubmitted] = React.useState(false);
8707
8696
  const theme = useTheme();
8708
8697
  let [btnDisabled, setBtnDisabled] = React.useState(false);
@@ -8936,7 +8925,7 @@ function FormEnquiry({
8936
8925
  })))))));
8937
8926
  }
8938
8927
 
8939
- var index$a = /*#__PURE__*/Object.freeze({
8928
+ var index$d = /*#__PURE__*/Object.freeze({
8940
8929
  __proto__: null,
8941
8930
  'default': FormEnquiry
8942
8931
  });
@@ -9159,7 +9148,7 @@ function Contact({
9159
9148
  } = React.useContext(PageContext);
9160
9149
  let [btnDisabled, setBtnDisabled] = React.useState(false);
9161
9150
  const [isSubmitted, setIsSubmitted] = React.useState(false);
9162
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
9151
+ const [nodeData] = sectionData.components;
9163
9152
  const classes = useSectionStyles({
9164
9153
  containerWidth,
9165
9154
  isMobile
@@ -9358,7 +9347,7 @@ function Contact({
9358
9347
  })))))));
9359
9348
  }
9360
9349
 
9361
- var index$9 = /*#__PURE__*/Object.freeze({
9350
+ var index$c = /*#__PURE__*/Object.freeze({
9362
9351
  __proto__: null,
9363
9352
  'default': Contact
9364
9353
  });
@@ -9835,7 +9824,7 @@ function CoursePromotionPage$1({
9835
9824
  }))));
9836
9825
  }
9837
9826
 
9838
- var index$8 = /*#__PURE__*/Object.freeze({
9827
+ var index$b = /*#__PURE__*/Object.freeze({
9839
9828
  __proto__: null,
9840
9829
  'default': CoursePromotionPage$1
9841
9830
  });
@@ -10422,7 +10411,7 @@ function CoursePromotionPage({
10422
10411
  }))));
10423
10412
  }
10424
10413
 
10425
- var index$7 = /*#__PURE__*/Object.freeze({
10414
+ var index$a = /*#__PURE__*/Object.freeze({
10426
10415
  __proto__: null,
10427
10416
  'default': CoursePromotionPage
10428
10417
  });
@@ -10785,7 +10774,7 @@ const FormPage = ({
10785
10774
  })))));
10786
10775
  };
10787
10776
 
10788
- var index$6 = /*#__PURE__*/Object.freeze({
10777
+ var index$9 = /*#__PURE__*/Object.freeze({
10789
10778
  __proto__: null,
10790
10779
  'default': FormPage
10791
10780
  });
@@ -10885,7 +10874,7 @@ function Tiles({
10885
10874
  const classes = useTilesStyles({
10886
10875
  isMobile
10887
10876
  });
10888
- const nodeData = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
10877
+ const nodeData = sectionData.components;
10889
10878
  const tilesList = nodeData[0]?.tilesList.components;
10890
10879
  const handleClick = value => {
10891
10880
  if (!isEdit && value) {
@@ -10933,7 +10922,7 @@ function Tiles({
10933
10922
  }, TileDiv)));
10934
10923
  }
10935
10924
 
10936
- var index$5 = /*#__PURE__*/Object.freeze({
10925
+ var index$8 = /*#__PURE__*/Object.freeze({
10937
10926
  __proto__: null,
10938
10927
  'default': Tiles
10939
10928
  });
@@ -11406,7 +11395,7 @@ function EmailDripMarket({
11406
11395
  })));
11407
11396
  }
11408
11397
 
11409
- var index$4 = /*#__PURE__*/Object.freeze({
11398
+ var index$7 = /*#__PURE__*/Object.freeze({
11410
11399
  __proto__: null,
11411
11400
  'default': EmailDripMarket
11412
11401
  });
@@ -11632,7 +11621,7 @@ function ABOUT_INSTITUTE({
11632
11621
  containerWidth,
11633
11622
  isMobile
11634
11623
  });
11635
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
11624
+ const [nodeData] = sectionData.components;
11636
11625
  const [highlightNodeData] = nodeData?.highlight?.components;
11637
11626
  const theme = useTheme();
11638
11627
  const ImageJSX = () => {
@@ -11774,104 +11763,954 @@ function ABOUT_INSTITUTE({
11774
11763
  }, /*#__PURE__*/React__default["default"].createElement(ImageJSX, null), /*#__PURE__*/React__default["default"].createElement(ContentJSX, null)), /*#__PURE__*/React__default["default"].createElement(HighlightJSX, null)));
11775
11764
  }
11776
11765
 
11777
- var index$3 = /*#__PURE__*/Object.freeze({
11766
+ var index$6 = /*#__PURE__*/Object.freeze({
11778
11767
  __proto__: null,
11779
11768
  'default': ABOUT_INSTITUTE
11780
11769
  });
11781
11770
 
11782
- // import TIMER_AND_CALL from '../../sections/timerAndCall';
11783
- const TYPE_TO_COMPONENT_MAP = {
11784
- BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
11785
- GRID_CARD: List,
11786
- BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
11787
- BANNER_CAROUSEL_CENTER_V2: BannerCarouselCenterv2,
11788
- BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
11789
- FORM_SUBSCRIBE: SubscribeToNewsletter,
11790
- TEXT_TESTIMONIAL: Testimonials,
11791
- VIDEO_TESTIMONIAL: VideoTestimonial,
11792
- VIDEO: Video,
11793
- INFO: Info,
11794
- TEXT: TextSection,
11795
- IMAGE_GALLERY: PhotoGallery,
11796
- FAQ_LISTING: FAQListing,
11797
- TEXT_GRID: TextGrid,
11798
- COURSE_CAROUSEL: courses,
11799
- TEAM_CARD: TeamCard,
11800
- CONTACT: FormEnquiry,
11801
- FORM_ENQUIRY: Contact,
11802
- WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
11803
- COURSE_LANDING_PAGE: CoursePromotionPage,
11804
- FORM_LANDING_PAGE: FormPage,
11805
- TILES_SECTION: Tiles,
11806
- EMAIL_DRIP_MARKET: EmailDripMarket,
11807
- ABOUT_INSTITUTE
11808
- };
11809
- const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
11810
- const MemoisedSection = /*#__PURE__*/React.memo(({
11811
- sectionData,
11812
- extraProps,
11813
- isCustomWebsite,
11814
- sectionIndex
11815
- }) => {
11816
- console.log('extraProps in section data', extraProps);
11817
- const SectionComp = getCompToRender(sectionData.type);
11818
- return /*#__PURE__*/React__default["default"].createElement(SectionComp, {
11819
- sectionData: sectionData,
11820
- extraProps: extraProps,
11821
- isCustomWebsite: isCustomWebsite,
11822
- sectionIndex: sectionIndex
11823
- });
11771
+ const useCounterSectionStyles = createUseStyles(theme => {
11772
+ return {
11773
+ section: {
11774
+ width: '100%',
11775
+ borderRadius: theme.shape?.borderRadius?.regular || '12px',
11776
+ overflow: 'hidden',
11777
+ backgroundImage: ({
11778
+ backgroundImage
11779
+ } = {}) => backgroundImage ? `url("${backgroundImage}")` : 'none',
11780
+ backgroundColor: ({
11781
+ backgroundColor
11782
+ } = {}) => backgroundColor || '#f8f8fa',
11783
+ backgroundSize: 'cover',
11784
+ backgroundPosition: 'center',
11785
+ backgroundRepeat: 'no-repeat',
11786
+ '&, & *, & *:before, & *:after': {
11787
+ fontFamily: theme?.typography?.fontFamily,
11788
+ boxSizing: 'border-box'
11789
+ }
11790
+ },
11791
+ container: {
11792
+ width: '100%',
11793
+ maxWidth: ({
11794
+ containerWidth
11795
+ } = {}) => containerWidth || '1440px',
11796
+ margin: '0 auto',
11797
+ padding: ({
11798
+ isMobile
11799
+ } = {}) => isMobile ? `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px` : `${theme.spacing.padding.small}px ${theme.spacing.padding.medium}px`
11800
+ },
11801
+ grid: {
11802
+ display: 'grid',
11803
+ gridTemplateColumns: 'repeat(4, 1fr)',
11804
+ gap: ({
11805
+ isMobile
11806
+ } = {}) => isMobile ? '24px' : '32px',
11807
+ alignItems: 'stretch'
11808
+ },
11809
+ counterItem: {
11810
+ display: 'flex',
11811
+ flexDirection: 'column',
11812
+ alignItems: 'center',
11813
+ justifyContent: 'center',
11814
+ textAlign: 'center'
11815
+ },
11816
+ value: {
11817
+ margin: 0,
11818
+ marginBottom: '8px',
11819
+ fontSize: '64px',
11820
+ fontWeight: theme.typography?.fontWeight?.bold,
11821
+ lineHeight: 1.1,
11822
+ color: 'rgba(247, 37, 133, 1)' ,
11823
+ wordBreak: 'break-word'
11824
+ },
11825
+ description: {
11826
+ margin: 0,
11827
+ fontSize: '20px',
11828
+ lineHeight: 1.4,
11829
+ fontWeight: '700',
11830
+ color: 'rgba(51, 51, 51, 1)' ,
11831
+ wordBreak: 'break-word'
11832
+ },
11833
+ '@media (max-width: 1024px)': {
11834
+ grid: {
11835
+ gridTemplateColumns: 'repeat(2, 1fr)',
11836
+ gap: '28px'
11837
+ }
11838
+ },
11839
+ '@media (max-width: 767px)': {
11840
+ section: {
11841
+ borderRadius: theme.shape?.borderRadius?.small || '8px'
11842
+ },
11843
+ container: {
11844
+ padding: `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px`
11845
+ },
11846
+ grid: {
11847
+ gridTemplateColumns: '1fr',
11848
+ gap: '24px'
11849
+ },
11850
+ value: {
11851
+ fontSize: theme.typography.fontSize.h3,
11852
+ marginBottom: '4px',
11853
+ lineHeight: 1.1
11854
+ },
11855
+ description: {
11856
+ fontSize: theme.typography.fontSize.body,
11857
+ lineHeight: 1.4
11858
+ }
11859
+ }
11860
+ };
11824
11861
  });
11825
- const SectionWithBackground = withSectionBackground(MemoisedSection);
11826
- function SectionRenderer({
11862
+
11863
+ function CounterSection({
11827
11864
  sectionData,
11828
- extraProps,
11829
- isCustomWebsite,
11830
11865
  sectionIndex
11831
11866
  }) {
11832
- let sectionBg = {};
11833
- if (sectionData?.isV2Section) {
11834
- let currentObj = sectionData?.components?.find(component => component.hasOwnProperty('sectionsBgname')?.sectionBgData || {});
11835
- sectionBg = currentObj?.sectionsBgname?.sectionBgData || {};
11836
- }
11837
- return /*#__PURE__*/React__default["default"].createElement(SectionWithBackground, {
11838
- sectionData: sectionData,
11839
- extraProps: extraProps,
11840
- isCustomWebsite: isCustomWebsite,
11841
- sectionIndex: sectionIndex,
11842
- isSkipV2Section: sectionData?.isV2Section,
11843
- componentBg: sectionBg || {}
11867
+ const {
11868
+ layout: {
11869
+ containerWidth
11870
+ },
11871
+ isMobile
11872
+ } = React.useContext(PageContext);
11873
+ console.log('llll', sectionData);
11874
+ sectionData.components = sectionData.components;
11875
+ const metadata = sectionData.metadata || {};
11876
+ const backgroundImage = metadata.backgroundImage || '';
11877
+ const backgroundColor = metadata.backgroundColor || '#f8f8fa';
11878
+ const classes = useCounterSectionStyles({
11879
+ containerWidth,
11880
+ isMobile,
11881
+ backgroundImage: backgroundImage || null,
11882
+ backgroundColor
11844
11883
  });
11884
+ const cardData = sectionData?.components[0];
11885
+ const [sectionComponent] = sectionData.components || [];
11886
+ const counterSection = sectionComponent?.counterSection;
11887
+ counterSection?.components || [];
11888
+ if (!cardData) return null;
11889
+ return /*#__PURE__*/React__default["default"].createElement("section", {
11890
+ className: classes.section
11891
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
11892
+ className: classes.container
11893
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
11894
+ className: classes.grid
11895
+ }, cardData?.contentList?.components?.map((item, index) => /*#__PURE__*/React__default["default"].createElement("div", {
11896
+ key: item._id || index,
11897
+ className: classes.counterItem
11898
+ }, item.contentHeading?.metadata?.value != null && item.contentHeading?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement("h2", {
11899
+ ref: item.contentHeading?.refSetter,
11900
+ className: classes.value,
11901
+ dangerouslySetInnerHTML: {
11902
+ __html: item.contentHeading.metadata.value
11903
+ }
11904
+ }), item.contentPara?.metadata?.value != null && item.contentPara?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement("p", {
11905
+ ref: item.contentPara?.refSetter,
11906
+ className: classes.description,
11907
+ dangerouslySetInnerHTML: {
11908
+ __html: item.contentPara.metadata.value
11909
+ }
11910
+ }))))));
11845
11911
  }
11846
11912
 
11847
- function PageRenderer({
11848
- pageData: {
11849
- metadata: {
11850
- theme: {
11851
- color = defaultTheme.color,
11852
- font = defaultTheme.font
11853
- } = defaultTheme,
11854
- layout = defaultLayout
11855
- } = defaultMetadata,
11856
- sections,
11857
- header,
11858
- footer,
11859
- validations = {},
11860
- _id,
11861
- isLandingPage = false,
11862
- isCustomWebsite = false
11863
- },
11864
- isMobile = false,
11865
- isLandingPages = false,
11866
- baseURLs = {},
11867
- hashToken,
11868
- SectionWrapper,
11869
- isMasterTemplate,
11870
- basePath,
11871
- countryCode,
11872
- currencySymbol,
11873
- isPreview,
11874
- isEdit,
11913
+ var index$5 = /*#__PURE__*/Object.freeze({
11914
+ __proto__: null,
11915
+ 'default': CounterSection
11916
+ });
11917
+
11918
+ const BREAKPOINTS = {
11919
+ mobile: 0,
11920
+ tablet: 768,
11921
+ desktop: 1024
11922
+ };
11923
+
11924
+ /**
11925
+ * Get current breakpoint from window width
11926
+ */
11927
+ const getBreakpoint = width => {
11928
+ if (width >= BREAKPOINTS.desktop) return 'desktop';
11929
+ if (width >= BREAKPOINTS.tablet) return 'tablet';
11930
+ return 'mobile';
11931
+ };
11932
+ const stickyBarBase = {
11933
+ position: 'fixed',
11934
+ left: 0,
11935
+ right: 0,
11936
+ bottom: 0,
11937
+ zIndex: 9998,
11938
+ display: 'flex',
11939
+ alignItems: 'center',
11940
+ justifyContent: 'center',
11941
+ backgroundColor: '#F8F9FB',
11942
+ boxShadow: '0 -2px 8px rgba(0, 0, 0, 0.06)',
11943
+ borderTop: '1px solid #E5E7EB'
11944
+ };
11945
+ const stickyBarResponsive = {
11946
+ mobile: {
11947
+ ...stickyBarBase,
11948
+ padding: '12px 16px',
11949
+ gap: '12px',
11950
+ flexDirection: 'column',
11951
+ alignItems: 'stretch'
11952
+ },
11953
+ tablet: {
11954
+ ...stickyBarBase,
11955
+ padding: '14px 24px',
11956
+ gap: '16px',
11957
+ flexDirection: 'row',
11958
+ alignItems: 'center'
11959
+ },
11960
+ desktop: {
11961
+ ...stickyBarBase,
11962
+ padding: '16px 32px',
11963
+ gap: '24px',
11964
+ flexDirection: 'row',
11965
+ alignItems: 'center'
11966
+ }
11967
+ };
11968
+ const getStickyBarStyle = breakpoint => stickyBarResponsive[breakpoint] || stickyBarResponsive.mobile;
11969
+ const stickyTextBase = {
11970
+ color: '#343A40',
11971
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
11972
+ margin: 0
11973
+ };
11974
+ const stickyTextResponsive = {
11975
+ mobile: {
11976
+ ...stickyTextBase,
11977
+ fontSize: '13px',
11978
+ lineHeight: 1.4,
11979
+ textAlign: 'center'
11980
+ },
11981
+ tablet: {
11982
+ ...stickyTextBase,
11983
+ fontSize: '14px',
11984
+ lineHeight: 1.45,
11985
+ textAlign: 'left'
11986
+ },
11987
+ desktop: {
11988
+ ...stickyTextBase,
11989
+ fontSize: '15px',
11990
+ lineHeight: 1.5,
11991
+ textAlign: 'left'
11992
+ }
11993
+ };
11994
+ const getStickyTextStyle = breakpoint => stickyTextResponsive[breakpoint] || stickyTextResponsive.mobile;
11995
+ const stickyButtonBase = {
11996
+ backgroundColor: '#3366FF',
11997
+ color: '#FFFFFF',
11998
+ border: 'none',
11999
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12000
+ fontWeight: 600,
12001
+ textTransform: 'uppercase',
12002
+ letterSpacing: '0.02em',
12003
+ cursor: 'pointer',
12004
+ whiteSpace: 'nowrap',
12005
+ flexShrink: 0
12006
+ };
12007
+ const stickyButtonResponsive = {
12008
+ mobile: {
12009
+ ...stickyButtonBase,
12010
+ padding: '10px 20px',
12011
+ fontSize: '12px',
12012
+ borderRadius: '6px'
12013
+ },
12014
+ tablet: {
12015
+ ...stickyButtonBase,
12016
+ padding: '12px 24px',
12017
+ fontSize: '13px',
12018
+ borderRadius: '8px'
12019
+ },
12020
+ desktop: {
12021
+ ...stickyButtonBase,
12022
+ padding: '14px 28px',
12023
+ fontSize: '14px',
12024
+ borderRadius: '8px'
12025
+ }
12026
+ };
12027
+ const getStickyButtonStyle = breakpoint => stickyButtonResponsive[breakpoint] || stickyButtonResponsive.mobile;
12028
+
12029
+ // --- Floating (WhatsApp) type ---
12030
+
12031
+ const floatingButtonBase = {
12032
+ position: 'fixed',
12033
+ bottom: 24,
12034
+ right: 24,
12035
+ width: 'fit-content',
12036
+ marginLeft: 'auto',
12037
+ zIndex: 9999,
12038
+ display: 'inline-flex',
12039
+ alignItems: 'center',
12040
+ gap: '10px',
12041
+ padding: '12px 20px',
12042
+ backgroundColor: '#FFFFFF',
12043
+ border: '1px solid #E5E7EB',
12044
+ borderRadius: '9999px',
12045
+ boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
12046
+ cursor: 'pointer',
12047
+ textDecoration: 'none',
12048
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12049
+ fontWeight: 700,
12050
+ fontSize: '14px',
12051
+ textTransform: 'uppercase',
12052
+ letterSpacing: '0.02em',
12053
+ color: '#000000',
12054
+ transition: 'box-shadow 0.2s ease, transform 0.2s ease'
12055
+ };
12056
+ const floatingButtonResponsive = {
12057
+ mobile: {
12058
+ ...floatingButtonBase,
12059
+ bottom: 16,
12060
+ left: 16,
12061
+ padding: '10px 16px',
12062
+ gap: '8px',
12063
+ fontSize: '12px'
12064
+ },
12065
+ tablet: {
12066
+ ...floatingButtonBase,
12067
+ bottom: 20,
12068
+ left: 20,
12069
+ padding: '12px 18px',
12070
+ gap: '10px',
12071
+ fontSize: '13px'
12072
+ },
12073
+ desktop: {
12074
+ ...floatingButtonBase,
12075
+ bottom: 24,
12076
+ left: 24,
12077
+ padding: '12px 20px',
12078
+ gap: '10px',
12079
+ fontSize: '14px'
12080
+ }
12081
+ };
12082
+ const getFloatingButtonStyle = breakpoint => floatingButtonResponsive[breakpoint] || floatingButtonResponsive.mobile;
12083
+ const whatsAppIconSvgSize = {
12084
+ mobile: 24,
12085
+ tablet: 26,
12086
+ desktop: 28
12087
+ };
12088
+ const getWhatsAppIconSize = breakpoint => whatsAppIconSvgSize[breakpoint] ?? whatsAppIconSvgSize.mobile;
12089
+
12090
+ const DEFAULT_WHATSAPP_ICON_COLOR = '#25D366';
12091
+
12092
+ /** Build WhatsApp wa.me URL from phone number (digits only, optional + prefix). */
12093
+ function buildWhatsAppUrl(phoneNumber) {
12094
+ if (!phoneNumber || typeof phoneNumber !== 'string') return null;
12095
+ const digits = phoneNumber.replace(/\D/g, '');
12096
+ return digits.length > 0 ? `https://wa.me/${digits}` : null;
12097
+ }
12098
+
12099
+ /**
12100
+ * WhatsApp icon SVG – bubble color is dynamic via props (default #25D366)
12101
+ */
12102
+ const WhatsAppIcon = ({
12103
+ size = 28,
12104
+ color = DEFAULT_WHATSAPP_ICON_COLOR
12105
+ }) => /*#__PURE__*/React__default["default"].createElement("svg", {
12106
+ width: size,
12107
+ height: size,
12108
+ viewBox: "0 0 24 24",
12109
+ fill: "none",
12110
+ xmlns: "http://www.w3.org/2000/svg",
12111
+ "aria-hidden": true
12112
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
12113
+ d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z",
12114
+ fill: color
12115
+ }));
12116
+
12117
+ /** Icon: image when iconImageUrl is provided, otherwise WhatsApp SVG */
12118
+ const CtaIcon = ({
12119
+ size = 28,
12120
+ color,
12121
+ iconImageUrl
12122
+ }) => {
12123
+ if (iconImageUrl && typeof iconImageUrl === 'string') {
12124
+ return /*#__PURE__*/React__default["default"].createElement("img", {
12125
+ src: iconImageUrl,
12126
+ alt: "",
12127
+ width: size,
12128
+ height: size,
12129
+ style: {
12130
+ display: 'block',
12131
+ objectFit: 'contain'
12132
+ },
12133
+ "aria-hidden": true
12134
+ });
12135
+ }
12136
+ return /*#__PURE__*/React__default["default"].createElement(WhatsAppIcon, {
12137
+ size: size,
12138
+ color: color ?? DEFAULT_WHATSAPP_ICON_COLOR
12139
+ });
12140
+ };
12141
+
12142
+ /**
12143
+ * Sticky CTA component.
12144
+ * Renders relative to viewport (app root), not parent section.
12145
+ * Accepts either sectionData (from pageRenderer/sectionRenderer) or flat props.
12146
+ *
12147
+ * @param {object} [sectionData] - Section payload when rendered via SectionRenderer: { type, label, components: [{ type, stickyMessage, ... }] }
12148
+ * @param {string} type - "sticky" | "floating"
12149
+ * @param {string} [stickyMessage] - Message text for sticky bar
12150
+ * @param {string} [stickyButtonText] - CTA button label (default "ENQUIRE NOW")
12151
+ * @param {string} [whatsAppPhoneNumber] - Mobile number for WhatsApp
12152
+ * @param {string} [whatsAppHref] - Optional fallback full URL when whatsAppPhoneNumber is not provided
12153
+ * @param {string} [whatsAppLabel] - Label next to icon (default "SUPPORT")
12154
+ * @param {string} [whatsAppIconColor] - WhatsApp icon color (used when iconImageUrl is not set)
12155
+ * @param {string} [whatsAppButtonBackgroundColor] - Floating button background color
12156
+ * @param {string} [iconImageUrl] - Optional image URL for the icon; when set, shows <img> instead of WhatsApp SVG
12157
+ * @param {object} [extraProps] - From SectionRenderer; extraProps.isEdit true shows in-flow edit hint
12158
+ * @param {boolean} [showEditHint] - When true, shows "Click on edit button to edit this section" in normal flow
12159
+ */
12160
+ function StickyCta({
12161
+ sectionData,
12162
+ type = 'sticky',
12163
+ stickyMessage = 'Live Masterclass will be on 26 January (Monday) from 05:00 PM',
12164
+ stickyButtonText = 'ENQUIRE NOW',
12165
+ whatsAppPhoneNumber,
12166
+ whatsAppHref,
12167
+ whatsAppLabel = 'SUPPORT',
12168
+ whatsAppIconColor,
12169
+ whatsAppButtonBackgroundColor,
12170
+ iconImageUrl
12171
+ }) {
12172
+ console.log('nishu03333', sectionData);
12173
+ const node = sectionData?.components?.[0];
12174
+ const contentList = node?.contentList?.components || [];
12175
+ const showEditHint = sectionData?.isDefaultEditor ?? false;
12176
+ const propsFromSection = node ? {
12177
+ type: node?.title?.metadata?.value ?? type,
12178
+ stickyMessage: contentList[1]?.contentPara?.metadata?.value ?? stickyMessage,
12179
+ stickyButtonText: contentList[1]?.contentHeading?.metadata?.value ?? stickyButtonText,
12180
+ whatsAppPhoneNumber: node.subheading?.metadata?.value ?? whatsAppPhoneNumber,
12181
+ whatsAppHref: node.whatsAppHref ?? whatsAppHref,
12182
+ whatsAppLabel: contentList[0]?.contentHeading?.metadata?.value ?? whatsAppLabel,
12183
+ whatsAppIconColor: node.whatsAppIconColor ?? whatsAppIconColor,
12184
+ whatsAppButtonBackgroundColor: node.whatsAppButtonBackgroundColor ?? whatsAppButtonBackgroundColor,
12185
+ iconImageUrl: contentList[0]?.contentPara?.metadata?.value ?? iconImageUrl
12186
+ } : null;
12187
+ const p = propsFromSection ?? {
12188
+ type,
12189
+ stickyMessage,
12190
+ stickyButtonText,
12191
+ whatsAppPhoneNumber,
12192
+ whatsAppHref,
12193
+ whatsAppLabel,
12194
+ whatsAppIconColor,
12195
+ whatsAppButtonBackgroundColor,
12196
+ iconImageUrl
12197
+ };
12198
+ const whatsAppUrl = p?.whatsAppPhoneNumber ? p?.whatsAppPhoneNumber : buildWhatsAppUrl(p?.whatsAppPhoneNumber);
12199
+ const [breakpoint, setBreakpoint] = React.useState(() => typeof window !== 'undefined' ? getBreakpoint(window.innerWidth) : 'mobile');
12200
+ React.useEffect(() => {
12201
+ if (typeof window === 'undefined') return;
12202
+ const onResize = () => setBreakpoint(getBreakpoint(window.innerWidth));
12203
+ window.addEventListener('resize', onResize);
12204
+ return () => window.removeEventListener('resize', onResize);
12205
+ }, []);
12206
+ const editHintBlock = showEditHint ? /*#__PURE__*/React__default["default"].createElement("div", {
12207
+ "data-section": "sticky-cta-edit-hint",
12208
+ style: {
12209
+ position: 'relative',
12210
+ width: '100%',
12211
+ padding: '12px 16px',
12212
+ textAlign: 'center',
12213
+ backgroundColor: '#f5f5f5',
12214
+ border: '1px dashed #ccc',
12215
+ borderRadius: 8,
12216
+ marginBottom: 8
12217
+ }
12218
+ }, /*#__PURE__*/React__default["default"].createElement("h2", {
12219
+ style: {
12220
+ margin: 0,
12221
+ fontSize: 16,
12222
+ fontWeight: 600,
12223
+ color: '#555'
12224
+ }
12225
+ }, "Click on edit button to edit this section")) : null;
12226
+ if (p.type === 'floating') {
12227
+ const buttonStyle = {
12228
+ ...getFloatingButtonStyle(breakpoint),
12229
+ ...(p.whatsAppButtonBackgroundColor != null && {
12230
+ backgroundColor: p.whatsAppButtonBackgroundColor
12231
+ })
12232
+ };
12233
+ const iconSize = getWhatsAppIconSize(breakpoint);
12234
+ const iconColor = p.whatsAppIconColor ?? DEFAULT_WHATSAPP_ICON_COLOR;
12235
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, editHintBlock, /*#__PURE__*/React__default["default"].createElement("a", {
12236
+ href: whatsAppUrl,
12237
+ target: "_blank",
12238
+ rel: "noopener noreferrer",
12239
+ "access-cta": "DIY",
12240
+ style: buttonStyle,
12241
+ onMouseEnter: e => {
12242
+ e.currentTarget.style.boxShadow = '0 6px 16px rgba(0, 0, 0, 0.12)';
12243
+ e.currentTarget.style.transform = 'scale(1.02)';
12244
+ },
12245
+ onMouseLeave: e => {
12246
+ e.currentTarget.style.boxShadow = '0 4px 12px rgba(0, 0, 0, 0.1)';
12247
+ e.currentTarget.style.transform = 'scale(1)';
12248
+ },
12249
+ "aria-label": `${p.whatsAppLabel} via WhatsApp`
12250
+ }, /*#__PURE__*/React__default["default"].createElement(CtaIcon, {
12251
+ size: iconSize,
12252
+ color: iconColor,
12253
+ iconImageUrl: p.iconImageUrl
12254
+ }), /*#__PURE__*/React__default["default"].createElement("span", null, p.whatsAppLabel)));
12255
+ }
12256
+
12257
+ // type === 'sticky' – button uses mobile number from props to build URL; click redirects to WhatsApp
12258
+ const barStyle = getStickyBarStyle(breakpoint);
12259
+ const textStyle = getStickyTextStyle(breakpoint);
12260
+ const buttonStyle = getStickyButtonStyle(breakpoint);
12261
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, editHintBlock, /*#__PURE__*/React__default["default"].createElement("div", {
12262
+ style: barStyle,
12263
+ role: "banner"
12264
+ }, /*#__PURE__*/React__default["default"].createElement("p", {
12265
+ style: textStyle
12266
+ }, p.stickyMessage), /*#__PURE__*/React__default["default"].createElement("a", {
12267
+ href: whatsAppUrl,
12268
+ target: "_blank",
12269
+ rel: "noopener noreferrer",
12270
+ "access-cta-container": "DIY",
12271
+ style: {
12272
+ ...buttonStyle,
12273
+ textDecoration: 'none',
12274
+ display: 'inline-flex',
12275
+ alignItems: 'center',
12276
+ justifyContent: 'center'
12277
+ }
12278
+ }, p.stickyButtonText)));
12279
+ }
12280
+
12281
+ var index$4 = /*#__PURE__*/Object.freeze({
12282
+ __proto__: null,
12283
+ 'default': StickyCta,
12284
+ WhatsAppIcon: WhatsAppIcon
12285
+ });
12286
+
12287
+ /**
12288
+ * Styles for CustomHtmlRender section.
12289
+ * Wrapper for user-provided HTML content.
12290
+ */
12291
+
12292
+ const sectionStyle = {
12293
+ width: '100%',
12294
+ maxWidth: '100%',
12295
+ height: 'auto',
12296
+ minHeight: 'auto',
12297
+ margin: 0,
12298
+ padding: 0,
12299
+ overflow: 'visible'
12300
+ };
12301
+
12302
+ const SHADOW_WRAPPER_CLASS = 'custom-html-body-wrap';
12303
+ const SHADOW_INNER_CLASS = 'custom-html-render__shadow-inner';
12304
+
12305
+ /**
12306
+ * Parses full HTML string and extracts styles + body/content for Shadow DOM.
12307
+ * - Strips <!DOCTYPE>, <html>, <head>, <body> and uses inner content + all <style>.
12308
+ * - Scopes "body" and "html" selectors to a wrapper class so styles don't leak to the main app.
12309
+ */
12310
+ function parseHtmlForShadow(html) {
12311
+ if (typeof html !== 'string' || !html.trim()) return {
12312
+ styles: '',
12313
+ content: ''
12314
+ };
12315
+ const styleRegex = /<style[^>]*>([\s\S]*?)<\/style>/gi;
12316
+ const bodyRegex = /<body[^>]*>([\s\S]*?)<\/body>/i;
12317
+ let styles = '';
12318
+ let match;
12319
+ while ((match = styleRegex.exec(html)) !== null) {
12320
+ styles += match[1];
12321
+ }
12322
+ const bodyMatch = html.match(bodyRegex);
12323
+ const rawContent = bodyMatch ? bodyMatch[1].trim() : html;
12324
+
12325
+ // Scope "body" and "html" in CSS to the wrapper so they don't affect the main page.
12326
+ // Only replace as standalone selectors (word boundary) to avoid breaking values like content: "body"
12327
+ let scopedStyles = styles.replace(/\bbody\b(?=\s*[{,])/g, `.${SHADOW_WRAPPER_CLASS}`).replace(/\bhtml\b(?=\s*[{,])/g, `.${SHADOW_WRAPPER_CLASS}`);
12328
+ const content = bodyMatch ? `<div class="${SHADOW_WRAPPER_CLASS}">${rawContent}</div>` : rawContent;
12329
+ return {
12330
+ styles: scopedStyles,
12331
+ content
12332
+ };
12333
+ }
12334
+
12335
+ /**
12336
+ * Base styles inside shadow so the body wrapper has layout and can show background/padding.
12337
+ */
12338
+ const SHADOW_BASE_STYLES = `
12339
+ .${SHADOW_INNER_CLASS}, .${SHADOW_WRAPPER_CLASS} {
12340
+ display: block;
12341
+ width: 100%;
12342
+ box-sizing: border-box;
12343
+ }
12344
+ .${SHADOW_INNER_CLASS} {
12345
+ min-height: 0;
12346
+ }
12347
+ `;
12348
+
12349
+ /**
12350
+ * Resolves HTML string from section data.
12351
+ * Supports: sectionData.components[0].CustomHtml.metadata.value (API shape)
12352
+ * and sectionData.components[0].html or props.html (legacy/flat).
12353
+ */
12354
+ function getHtmlFromSectionData(sectionData, fallbackHtml = '') {
12355
+ const node = sectionData?.components?.[0];
12356
+ if (!node) return fallbackHtml;
12357
+ const fromCustomHtml = node.CustomHtml?.metadata?.value;
12358
+ if (typeof fromCustomHtml === 'string') return fromCustomHtml;
12359
+ if (typeof node.html === 'string') return node.html;
12360
+ return fallbackHtml;
12361
+ }
12362
+
12363
+ /**
12364
+ * CustomHtmlRender – renders any full HTML document or fragment in an encapsulated Shadow DOM.
12365
+ * Receives html via sectionData.components[0].CustomHtml.metadata.value (or .html) or props.html.
12366
+ * Body/html background, padding, and all other CSS apply only inside this section.
12367
+ */
12368
+ function CustomHtmlRender({
12369
+ sectionData,
12370
+ html = '',
12371
+ className,
12372
+ style = {}
12373
+ }) {
12374
+ const containerRef = React.useRef(null);
12375
+ const node = sectionData?.components?.[0];
12376
+ const resolvedHtml = getHtmlFromSectionData(sectionData, html);
12377
+ const p = node ? {
12378
+ html: resolvedHtml,
12379
+ className: node.className ?? className,
12380
+ style: node.style ?? style
12381
+ } : {
12382
+ html: resolvedHtml,
12383
+ className,
12384
+ style
12385
+ };
12386
+ const safeHtml = typeof p.html === 'string' ? p.html : '';
12387
+ const setSectionRef = el => {
12388
+ containerRef.current = el;
12389
+ const refSetter = node?.CustomHtml?.refSetter;
12390
+ if (refSetter) {
12391
+ if (typeof refSetter === 'function') refSetter(el);else if (refSetter && typeof refSetter === 'object') refSetter.current = el;
12392
+ }
12393
+ };
12394
+ React.useEffect(() => {
12395
+ if (!safeHtml.trim() || !containerRef.current) return;
12396
+ const {
12397
+ styles,
12398
+ content
12399
+ } = parseHtmlForShadow(safeHtml);
12400
+ const host = containerRef.current;
12401
+ if (!host.shadowRoot) {
12402
+ host.attachShadow({
12403
+ mode: 'open'
12404
+ });
12405
+ }
12406
+ const shadowRoot = host.shadowRoot;
12407
+ shadowRoot.innerHTML = '';
12408
+ const inner = document.createElement('div');
12409
+ inner.className = SHADOW_INNER_CLASS;
12410
+ if (SHADOW_BASE_STYLES) {
12411
+ const baseStyle = document.createElement('style');
12412
+ baseStyle.textContent = SHADOW_BASE_STYLES;
12413
+ shadowRoot.appendChild(baseStyle);
12414
+ }
12415
+ if (styles) {
12416
+ const styleEl = document.createElement('style');
12417
+ styleEl.textContent = styles;
12418
+ shadowRoot.appendChild(styleEl);
12419
+ }
12420
+ const contentWrap = document.createElement('div');
12421
+ contentWrap.innerHTML = content;
12422
+ while (contentWrap.firstChild) {
12423
+ inner.appendChild(contentWrap.firstChild);
12424
+ }
12425
+ shadowRoot.appendChild(inner);
12426
+ return () => {
12427
+ shadowRoot.innerHTML = '';
12428
+ };
12429
+ }, [safeHtml]);
12430
+ if (!safeHtml.trim()) {
12431
+ return null;
12432
+ }
12433
+ return /*#__PURE__*/React__default["default"].createElement("section", {
12434
+ ref: setSectionRef,
12435
+ className: p.className,
12436
+ style: {
12437
+ ...sectionStyle,
12438
+ ...p.style
12439
+ },
12440
+ "data-section": "custom-html-render"
12441
+ });
12442
+ }
12443
+
12444
+ var index$3 = /*#__PURE__*/Object.freeze({
12445
+ __proto__: null,
12446
+ 'default': CustomHtmlRender
12447
+ });
12448
+
12449
+ const useTimerCallPageStyles = createUseStyles(theme => ({
12450
+ timerAndCallSection: {
12451
+ padding: ({
12452
+ isMobile
12453
+ } = {}) => isMobile ? '24px' : '80px 120px',
12454
+ background: theme?.colors?.white,
12455
+ '&, & *, & *:before, & *:after': {
12456
+ fontFamily: theme?.typography?.fontFamily,
12457
+ boxSizing: 'border-box'
12458
+ }
12459
+ },
12460
+ timerAndCallContainer: {
12461
+ padding: '72px',
12462
+ background: '#F4F9FF',
12463
+ borderRadius: '8px',
12464
+ boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.16)'
12465
+ },
12466
+ timerAndCallBox: {
12467
+ display: 'flex',
12468
+ flexDirection: 'column',
12469
+ gap: '42px',
12470
+ justifyContent: 'center',
12471
+ alignItems: 'center'
12472
+ },
12473
+ title: {
12474
+ fontWeight: '700',
12475
+ fontSize: '40px',
12476
+ textAlign: 'center',
12477
+ lineHeight: '45px'
12478
+ },
12479
+ offerWrapper: {
12480
+ display: 'flex',
12481
+ flexDirection: 'column',
12482
+ gap: '24px',
12483
+ justifyContent: 'center',
12484
+ alignItems: 'center'
12485
+ },
12486
+ offerEndsTitle: {
12487
+ fontWeight: '700',
12488
+ fontSize: '16px'
12489
+ },
12490
+ countdown: {
12491
+ display: 'flex',
12492
+ gap: '10px'
12493
+ },
12494
+ counterBox: {
12495
+ display: 'flex',
12496
+ flexDirection: 'column',
12497
+ justifyContent: 'center',
12498
+ alignItems: 'center',
12499
+ border: '0.56px solid #2C88FF',
12500
+ borderRadius: '8px',
12501
+ background: '#FFFFFF',
12502
+ color: '#2C88FF',
12503
+ padding: '12px 16px 12px 16px',
12504
+ fontWeight: '600',
12505
+ fontSize: '14px'
12506
+ },
12507
+ // SMALL SCREEN
12508
+ '@media screen and (max-width: 767px)': {
12509
+ timerAndCallSection: {
12510
+ padding: '24px'
12511
+ },
12512
+ timerAndCallContainer: {
12513
+ padding: '16px'
12514
+ },
12515
+ timerAndCallBox: {
12516
+ gap: '32px'
12517
+ },
12518
+ title: {
12519
+ fontSize: '24px'
12520
+ },
12521
+ offerWrapper: {
12522
+ gap: '16px'
12523
+ }
12524
+ }
12525
+ }));
12526
+
12527
+ const TimerAndCall = ({
12528
+ sectionData,
12529
+ extraProps = {}
12530
+ }) => {
12531
+ const {
12532
+ isMobile,
12533
+ fullPageData
12534
+ } = React.useContext(PageContext);
12535
+ const [nodeData] = sectionData?.components;
12536
+ const classes = useTimerCallPageStyles({
12537
+ isMobile
12538
+ });
12539
+ const CounterBox = ({
12540
+ value,
12541
+ text
12542
+ }) => {
12543
+ return /*#__PURE__*/React__default["default"].createElement("div", {
12544
+ className: classes.counterBox
12545
+ }, /*#__PURE__*/React__default["default"].createElement("div", null, value), /*#__PURE__*/React__default["default"].createElement("div", null, text));
12546
+ };
12547
+ const renderer = ({
12548
+ formatted,
12549
+ completed
12550
+ }) => {
12551
+ return /*#__PURE__*/React__default["default"].createElement("div", {
12552
+ className: classes.countdown
12553
+ }, /*#__PURE__*/React__default["default"].createElement(CounterBox, {
12554
+ value: formatted?.hours,
12555
+ text: "Hours"
12556
+ }), /*#__PURE__*/React__default["default"].createElement(CounterBox, {
12557
+ value: formatted?.minutes,
12558
+ text: "Mins"
12559
+ }), /*#__PURE__*/React__default["default"].createElement(CounterBox, {
12560
+ value: formatted?.seconds,
12561
+ text: "Secs"
12562
+ }));
12563
+ };
12564
+ const CountDownJSX = offerPriceValidFor => {
12565
+ let conversions = extraProps?.conversions || 0;
12566
+ if (offerPriceValidFor && offerPriceValidFor - conversions <= 0) {
12567
+ return null;
12568
+ }
12569
+ return /*#__PURE__*/React__default["default"].createElement("div", {
12570
+ className: classes.offerWrapper
12571
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
12572
+ className: classes.offerEndsTitle
12573
+ }, "Offer ends in"), /*#__PURE__*/React__default["default"].createElement(Countdown__default["default"], {
12574
+ renderer: renderer,
12575
+ date: nodeData.offerCounter?.metadata?.endDate,
12576
+ daysInHours: true
12577
+ }));
12578
+ };
12579
+ return /*#__PURE__*/React__default["default"].createElement("section", {
12580
+ className: classes.timerAndCallSection
12581
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
12582
+ className: classes.timerAndCallContainer
12583
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
12584
+ className: classes.timerAndCallBox
12585
+ }, nodeData?.showOffer?.metadata?.value && nodeData.offerCounter?.metadata?.isOfferActive ? CountDownJSX(nodeData.offerCounter?.metadata?.offerPriceValidFor) : null, nodeData?.title?.metadata?.value ? /*#__PURE__*/React__default["default"].createElement("div", {
12586
+ className: classes.title
12587
+ }, /*#__PURE__*/React__default["default"].createElement("span", {
12588
+ ref: nodeData?.heading?.refSetter,
12589
+ dangerouslySetInnerHTML: {
12590
+ __html: nodeData?.title?.metadata?.value
12591
+ }
12592
+ })) : null, nodeData?.timerButton?.metadata?.value ? /*#__PURE__*/React__default["default"].createElement(Button, {
12593
+ style: {
12594
+ width: '100%',
12595
+ fontWeight: '700',
12596
+ fontSize: '14px'
12597
+ },
12598
+ data: {
12599
+ // link: 'headerData?.loginCtaLink',
12600
+ // isLink: 1,
12601
+ value: nodeData.timerButton.metadata.value
12602
+ // isExternal: 1
12603
+ },
12604
+ onClick: extraProps?.courseBuyNow,
12605
+ type: 'primary',
12606
+ size: 'medium',
12607
+ target: null,
12608
+ name: "button",
12609
+ rel: null
12610
+ // styling={isMobile ? { margin: '0 40px' } : {}}
12611
+ }) : null)));
12612
+ };
12613
+
12614
+ var index$2 = /*#__PURE__*/Object.freeze({
12615
+ __proto__: null,
12616
+ 'default': TimerAndCall
12617
+ });
12618
+
12619
+ const TYPE_TO_COMPONENT_MAP = {
12620
+ BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
12621
+ GRID_CARD: List,
12622
+ BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
12623
+ BANNER_CAROUSEL_CENTER_V2: BannerCarouselCenterv2,
12624
+ BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
12625
+ FORM_SUBSCRIBE: SubscribeToNewsletter,
12626
+ TEXT_TESTIMONIAL: Testimonials,
12627
+ VIDEO_TESTIMONIAL: VideoTestimonial,
12628
+ VIDEO: Video,
12629
+ INFO: Info,
12630
+ TEXT: TextSection,
12631
+ IMAGE_GALLERY: PhotoGallery,
12632
+ FAQ_LISTING: FAQListing,
12633
+ TEXT_GRID: TextGrid,
12634
+ COURSE_CAROUSEL: courses,
12635
+ TEAM_CARD: TeamCard,
12636
+ CONTACT: FormEnquiry,
12637
+ FORM_ENQUIRY: Contact,
12638
+ WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
12639
+ COURSE_LANDING_PAGE: CoursePromotionPage,
12640
+ FORM_LANDING_PAGE: FormPage,
12641
+ TILES_SECTION: Tiles,
12642
+ EMAIL_DRIP_MARKET: EmailDripMarket,
12643
+ ABOUT_INSTITUTE,
12644
+ COUNTER_SECTION: CounterSection,
12645
+ STICKY_CTA: StickyCta,
12646
+ CUSTOM_HTML_SECTION: CustomHtmlRender,
12647
+ TIMER_AND_CALL: TimerAndCall
12648
+ };
12649
+ const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
12650
+ const MemoisedSection = /*#__PURE__*/React.memo(({
12651
+ sectionData,
12652
+ extraProps,
12653
+ isCustomWebsite,
12654
+ sectionIndex
12655
+ }) => {
12656
+ console.log('extraProps in section data', extraProps);
12657
+ const SectionComp = getCompToRender(sectionData.type);
12658
+ return /*#__PURE__*/React__default["default"].createElement(SectionComp, {
12659
+ sectionData: sectionData,
12660
+ extraProps: extraProps,
12661
+ isCustomWebsite: isCustomWebsite,
12662
+ sectionIndex: sectionIndex
12663
+ });
12664
+ });
12665
+ const SectionWithBackground = withSectionBackground(MemoisedSection);
12666
+ function SectionRenderer({
12667
+ sectionData,
12668
+ extraProps,
12669
+ isCustomWebsite,
12670
+ sectionIndex
12671
+ }) {
12672
+ let sectionBg = {};
12673
+ if (sectionData?.isV2Section) {
12674
+ sectionBg = sectionData?.bgSection?.components?.[0]?.sectionBgData || {};
12675
+ }
12676
+ return /*#__PURE__*/React__default["default"].createElement(SectionWithBackground, {
12677
+ sectionData: sectionData,
12678
+ extraProps: extraProps,
12679
+ isCustomWebsite: isCustomWebsite,
12680
+ sectionIndex: sectionIndex,
12681
+ isSkipV2Section: sectionData?.isV2Section,
12682
+ componentBg: sectionBg || {}
12683
+ });
12684
+ }
12685
+
12686
+ function PageRenderer({
12687
+ pageData: {
12688
+ metadata: {
12689
+ theme: {
12690
+ color = defaultTheme.color,
12691
+ font = defaultTheme.font
12692
+ } = defaultTheme,
12693
+ layout = defaultLayout
12694
+ } = defaultMetadata,
12695
+ sections,
12696
+ header,
12697
+ footer,
12698
+ validations = {},
12699
+ _id,
12700
+ isLandingPage = false,
12701
+ isCustomWebsite = false
12702
+ },
12703
+ isMobile = false,
12704
+ isLandingPages = false,
12705
+ baseURLs = {},
12706
+ hashToken,
12707
+ SectionWrapper,
12708
+ isMasterTemplate,
12709
+ basePath,
12710
+ countryCode,
12711
+ currencySymbol,
12712
+ isPreview,
12713
+ isEdit,
11875
12714
  sectionPlaceholder,
11876
12715
  templateId,
11877
12716
  isTutorWebsite = false,
@@ -12162,30 +13001,12 @@ function VideoWorkshopPromotion({
12162
13001
  },
12163
13002
  isMobile
12164
13003
  } = React.useContext(PageContext);
12165
- console.log('nnnn', sectionData);
12166
13004
  const classes = useVideoWorkshopPromotionStyles({
12167
13005
  containerWidth,
12168
13006
  isMobile
12169
13007
  });
12170
- const [sectionComponent] = sectionData?.components?.slice(1) || [];
12171
- const videoWorkshopPromotion = sectionComponent?.videoWorkshopPromotion;
12172
- const [contentNode] = videoWorkshopPromotion?.components || [];
12173
- if (!contentNode) return null;
12174
- const {
12175
- testimonialCategory,
12176
- mainHeading,
12177
- subHeading,
12178
- cta,
12179
- videoThumbnail,
12180
- videoEmbed,
12181
- videoTitleOverlay,
12182
- videoCaption,
12183
- watchOnYouTube
12184
- } = contentNode;
12185
- const videoUrl = videoEmbed?.metadata?.value;
12186
- const thumbnailUrl = videoEmbed?.metadata?.thumbnail || videoThumbnail?.metadata?.value;
12187
- const showCta = cta?.metadata?.value && (cta?.validations?.isEmptyAllowed ? true : cta?.metadata?.value !== '');
12188
- const showWatchOnYouTube = watchOnYouTube?.metadata?.value && (watchOnYouTube?.validations?.isEmptyAllowed ? true : watchOnYouTube?.metadata?.value !== '');
13008
+ const wokShopData = sectionData?.components[0];
13009
+ const videoData = wokShopData?.videoCarousel?.components?.[0];
12189
13010
  return /*#__PURE__*/React__default["default"].createElement("section", {
12190
13011
  className: classes.section
12191
13012
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -12194,70 +13015,40 @@ function VideoWorkshopPromotion({
12194
13015
  className: classes.sectionInner
12195
13016
  }, /*#__PURE__*/React__default["default"].createElement("div", {
12196
13017
  className: classes.textBlock
12197
- }, testimonialCategory?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("h5", {
12198
- ref: testimonialCategory?.refSetter,
13018
+ }, wokShopData?.videoHeading?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("h5", {
13019
+ ref: wokShopData?.videoHeading?.refSetter,
12199
13020
  className: classes.category,
12200
13021
  dangerouslySetInnerHTML: {
12201
- __html: testimonialCategory.metadata.value
13022
+ __html: wokShopData?.videoHeading?.metadata?.value
12202
13023
  }
12203
- }), mainHeading?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("h1", {
12204
- ref: mainHeading?.refSetter,
13024
+ }), wokShopData?.title?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("h1", {
13025
+ ref: wokShopData?.title?.refSetter,
12205
13026
  className: classes.mainHeading,
12206
13027
  dangerouslySetInnerHTML: {
12207
- __html: mainHeading.metadata.value
13028
+ __html: wokShopData?.title?.metadata?.value
12208
13029
  }
12209
- }), subHeading?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("p", {
12210
- ref: subHeading?.refSetter,
12211
- className: classes.subHeading,
12212
- dangerouslySetInnerHTML: {
12213
- __html: subHeading.metadata.value
12214
- }
12215
- }), showCta && /*#__PURE__*/React__default["default"].createElement("div", {
13030
+ }), videoData?.videoTextContent?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("div", {
12216
13031
  className: classes.ctaWrap
12217
13032
  }, /*#__PURE__*/React__default["default"].createElement(Button, {
12218
- ref: cta?.refSetter,
12219
- data: cta.metadata,
12220
- type: cta.metadata?.type || 'primary',
13033
+ ref: videoData?.videoTextContent?.metadata?.refSetter,
13034
+ data: videoData?.videoTextContent?.metadata,
13035
+ type: 'primary',
12221
13036
  size: isMobile ? 'small' : 'medium'
12222
13037
  }))), /*#__PURE__*/React__default["default"].createElement("div", {
12223
13038
  className: classes.videoBlock
12224
13039
  }, /*#__PURE__*/React__default["default"].createElement("div", {
12225
13040
  className: classes.videoWrapper
12226
13041
  }, /*#__PURE__*/React__default["default"].createElement("div", {
12227
- ref: videoEmbed?.refSetter,
13042
+ ref: videoData?.videoFrame?.refSetter,
12228
13043
  className: classes.videoAspectWrap
12229
13044
  }, /*#__PURE__*/React__default["default"].createElement(VideoPlayer, {
12230
- imageUrl: thumbnailUrl,
12231
- videoUrl: videoUrl,
13045
+ imageUrl: videoData?.videoFrame?.metadata?.thumbnail,
13046
+ videoUrl: videoData?.videoFrame?.metadata?.value,
12232
13047
  sectionIndex: sectionIndex
12233
- })), videoTitleOverlay?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("div", {
12234
- className: classes.videoTitleOverlay
12235
- }, /*#__PURE__*/React__default["default"].createElement("span", {
12236
- ref: videoTitleOverlay?.refSetter,
12237
- dangerouslySetInnerHTML: {
12238
- __html: videoTitleOverlay.metadata.value
12239
- }
12240
- })), videoCaption?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("div", {
12241
- className: classes.videoCaption
12242
- }, /*#__PURE__*/React__default["default"].createElement("p", {
12243
- ref: videoCaption?.refSetter,
12244
- dangerouslySetInnerHTML: {
12245
- __html: videoCaption.metadata.value
12246
- }
12247
- })), showWatchOnYouTube && /*#__PURE__*/React__default["default"].createElement("div", {
12248
- className: classes.watchOnYouTubeWrap
12249
- }, /*#__PURE__*/React__default["default"].createElement(Button, {
12250
- ref: watchOnYouTube?.refSetter,
12251
- data: {
12252
- ...watchOnYouTube.metadata,
12253
- isExternal: true
12254
- },
12255
- type: watchOnYouTube.metadata?.type || 'secondary',
12256
- size: "small"
12257
13048
  })))))));
12258
13049
  }
12259
13050
 
12260
- var index$2 = /*#__PURE__*/Object.freeze({
13051
+ var index$1 = /*#__PURE__*/Object.freeze({
12261
13052
  __proto__: null,
12262
13053
  'default': VideoWorkshopPromotion
12263
13054
  });
@@ -12890,157 +13681,9 @@ function CoursePromotionPagev2({
12890
13681
  }))));
12891
13682
  }
12892
13683
 
12893
- var index$1 = /*#__PURE__*/Object.freeze({
12894
- __proto__: null,
12895
- 'default': CoursePromotionPagev2
12896
- });
12897
-
12898
- const useCounterSectionStyles = createUseStyles(theme => {
12899
- return {
12900
- section: {
12901
- width: '100%',
12902
- borderRadius: theme.shape?.borderRadius?.regular || '12px',
12903
- overflow: 'hidden',
12904
- backgroundImage: ({
12905
- backgroundImage
12906
- } = {}) => backgroundImage ? `url("${backgroundImage}")` : 'none',
12907
- backgroundColor: ({
12908
- backgroundColor
12909
- } = {}) => backgroundColor || '#f8f8fa',
12910
- backgroundSize: 'cover',
12911
- backgroundPosition: 'center',
12912
- backgroundRepeat: 'no-repeat',
12913
- '&, & *, & *:before, & *:after': {
12914
- fontFamily: theme?.typography?.fontFamily,
12915
- boxSizing: 'border-box'
12916
- }
12917
- },
12918
- container: {
12919
- width: '100%',
12920
- maxWidth: ({
12921
- containerWidth
12922
- } = {}) => containerWidth || '1440px',
12923
- margin: '0 auto',
12924
- padding: ({
12925
- isMobile
12926
- } = {}) => isMobile ? `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px` : `${theme.spacing.padding.small}px ${theme.spacing.padding.medium}px`
12927
- },
12928
- grid: {
12929
- display: 'grid',
12930
- gridTemplateColumns: 'repeat(4, 1fr)',
12931
- gap: ({
12932
- isMobile
12933
- } = {}) => isMobile ? '24px' : '32px',
12934
- alignItems: 'stretch'
12935
- },
12936
- counterItem: {
12937
- display: 'flex',
12938
- flexDirection: 'column',
12939
- alignItems: 'center',
12940
- justifyContent: 'center',
12941
- textAlign: 'center'
12942
- },
12943
- value: {
12944
- margin: 0,
12945
- marginBottom: '8px',
12946
- fontSize: theme.typography.fontSize.h2,
12947
- fontWeight: theme.typography?.fontWeight?.bold,
12948
- lineHeight: 1.1,
12949
- color: theme.palette?.primary?.main || '#1976d2',
12950
- wordBreak: 'break-word'
12951
- },
12952
- description: {
12953
- margin: 0,
12954
- fontSize: theme.typography.fontSize.body,
12955
- lineHeight: 1.4,
12956
- color: theme.palette?.font?.primary || '#4a4a4a',
12957
- wordBreak: 'break-word'
12958
- },
12959
- '@media (max-width: 1024px)': {
12960
- grid: {
12961
- gridTemplateColumns: 'repeat(2, 1fr)',
12962
- gap: '28px'
12963
- }
12964
- },
12965
- '@media (max-width: 767px)': {
12966
- section: {
12967
- borderRadius: theme.shape?.borderRadius?.small || '8px'
12968
- },
12969
- container: {
12970
- padding: `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px`
12971
- },
12972
- grid: {
12973
- gridTemplateColumns: '1fr',
12974
- gap: '24px'
12975
- },
12976
- value: {
12977
- fontSize: theme.typography.fontSize.h3,
12978
- marginBottom: '4px',
12979
- lineHeight: 1.1
12980
- },
12981
- description: {
12982
- fontSize: theme.typography.fontSize.body,
12983
- lineHeight: 1.4
12984
- }
12985
- }
12986
- };
12987
- });
12988
-
12989
- function CounterSection({
12990
- sectionData,
12991
- sectionIndex
12992
- }) {
12993
- const {
12994
- layout: {
12995
- containerWidth
12996
- },
12997
- isMobile
12998
- } = React.useContext(PageContext);
12999
- console.log('llll', sectionData);
13000
- sectionData.components = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
13001
-
13002
- // console.log("llll",sectionData);
13003
-
13004
- const metadata = sectionData.metadata || {};
13005
- const backgroundImage = metadata.backgroundImage || '';
13006
- const backgroundColor = metadata.backgroundColor || '#f8f8fa';
13007
- const classes = useCounterSectionStyles({
13008
- containerWidth,
13009
- isMobile,
13010
- backgroundImage: backgroundImage || null,
13011
- backgroundColor
13012
- });
13013
- const [sectionComponent] = sectionData.components || [];
13014
- const counterSection = sectionComponent?.counterSection;
13015
- const counters = counterSection?.components || [];
13016
- if (!counters.length) return null;
13017
- return /*#__PURE__*/React__default["default"].createElement("section", {
13018
- className: classes.section
13019
- }, /*#__PURE__*/React__default["default"].createElement("div", {
13020
- className: classes.container
13021
- }, /*#__PURE__*/React__default["default"].createElement("div", {
13022
- className: classes.grid
13023
- }, counters.map((item, index) => /*#__PURE__*/React__default["default"].createElement("div", {
13024
- key: item._id || index,
13025
- className: classes.counterItem
13026
- }, item.value?.metadata?.value != null && item.value?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement("h2", {
13027
- ref: item.value?.refSetter,
13028
- className: classes.value,
13029
- dangerouslySetInnerHTML: {
13030
- __html: item.value.metadata.value
13031
- }
13032
- }), item.description?.metadata?.value != null && item.description?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement("p", {
13033
- ref: item.description?.refSetter,
13034
- className: classes.description,
13035
- dangerouslySetInnerHTML: {
13036
- __html: item.description.metadata.value
13037
- }
13038
- }))))));
13039
- }
13040
-
13041
13684
  var index = /*#__PURE__*/Object.freeze({
13042
13685
  __proto__: null,
13043
- 'default': CounterSection
13686
+ 'default': CoursePromotionPagev2
13044
13687
  });
13045
13688
 
13046
13689
  exports.Icon = Icon;