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.es.js CHANGED
@@ -2743,33 +2743,36 @@ function withSectionBackground(WrappedSectionRenderer) {
2743
2743
  }
2744
2744
 
2745
2745
  const TYPE_TO_COMPONENT_MAP$1 = {
2746
- BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$q; })),
2747
- GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$p; })),
2748
- BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$o; })),
2749
- BANNER_CAROUSEL_CENTER_V2: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$n; })),
2750
- BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$m; })),
2751
- FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$l; })),
2752
- TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$k; })),
2753
- VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$j; })),
2754
- VIDEO_WORKSHOP_PROMOTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
2755
- VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$i; })),
2756
- INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$h; })),
2757
- TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
2758
- IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
2759
- FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
2760
- COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
2761
- TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
2762
- TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
2763
- CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
2764
- FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
2765
- WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
2766
- COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
2767
- COURSE_LANDING_PAGE_V2: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
2768
- FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
2769
- TILES_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
2770
- EMAIL_DRIP_MARKET: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
2771
- ABOUT_INSTITUTE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; })),
2772
- COUNTER_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
2746
+ BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$t; })),
2747
+ GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$s; })),
2748
+ BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$r; })),
2749
+ BANNER_CAROUSEL_CENTER_V2: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$q; })),
2750
+ BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$p; })),
2751
+ FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$o; })),
2752
+ TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$n; })),
2753
+ VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$m; })),
2754
+ VIDEO_WORKSHOP_PROMOTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
2755
+ VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$l; })),
2756
+ INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$k; })),
2757
+ TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$j; })),
2758
+ IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$i; })),
2759
+ FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$h; })),
2760
+ COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
2761
+ TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
2762
+ TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
2763
+ CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
2764
+ FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
2765
+ WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
2766
+ COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
2767
+ COURSE_LANDING_PAGE_V2: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; })),
2768
+ FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
2769
+ TILES_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
2770
+ EMAIL_DRIP_MARKET: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
2771
+ ABOUT_INSTITUTE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
2772
+ COUNTER_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
2773
+ TIMER_AND_CALL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
2774
+ STICKY_CTA: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
2775
+ CUSTOM_HTML_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; }))
2773
2776
  };
2774
2777
  const getCompToRender$1 = type => {
2775
2778
  const Comp = TYPE_TO_COMPONENT_MAP$1[type];
@@ -2803,35 +2806,21 @@ function SectionRenderer$1({
2803
2806
 
2804
2807
  console.log('nishu222', sectionData);
2805
2808
  let sectionBg = {};
2806
- debugger;
2807
2809
  if (sectionData?.isV2Section) {
2808
- let currentObj = sectionData?.components?.find(component => component.hasOwnProperty('sectionsBgname')?.sectionBgData || {});
2809
- sectionBg = currentObj?.sectionsBgname?.sectionBgData || {};
2810
+ sectionBg = sectionData?.bgSection?.components?.[0]?.sectionBgData || {};
2811
+ }
2812
+ if (sectionData?.type === 'STICKY_CTA') {
2813
+ sectionData = {
2814
+ ...sectionData,
2815
+ isDefaultEditor: true
2816
+ };
2810
2817
  }
2811
-
2812
- // sectionBg ={
2813
- // id:"625fb1a879d4c9001261cewqsazxs21",
2814
- // value: "imagev",
2815
- // label: "",
2816
- // type: "image",
2817
- // bgType: "video",
2818
- // name: "Image",
2819
- // isYoutubeVideo: true,
2820
- // elementType: "div",
2821
- // isV2: true,
2822
- // metadata: {
2823
- // value: "https://www.youtube.com/watch?v=bjxTIcuzB6k&list=PLe6YKWr4VVM1x2LIpiqmVvG4QgIvoDEdO",
2824
- // }
2825
- // }
2826
- console.log('nishu222333', sectionData);
2827
2818
  return /*#__PURE__*/React.createElement(Suspense, {
2828
2819
  fallback: null /*GIF maybe*/
2829
2820
  }, /*#__PURE__*/React.createElement(SectionWithBackground$1, {
2830
2821
  sectionData: sectionData,
2831
2822
  extraProps: extraProps,
2832
- sectionIndex: sectionIndex
2833
- // isSkipV2Section={sectionData?.isV2Section}
2834
- ,
2823
+ sectionIndex: sectionIndex,
2835
2824
  isSkipV2Section: sectionData?.isV2Section
2836
2825
  // componentBg={sectionData?.componentBg || { type: "image", value: "https://fastly.picsum.photos/id/4/5000/3333.jpg?hmac=ghf06FdmgiD0-G4c9DdNM8RnBIN7BO0-ZGEw47khHP4" }}
2837
2826
  ,
@@ -3575,7 +3564,7 @@ function BannerCarouselRight({
3575
3564
  })))));
3576
3565
  }
3577
3566
 
3578
- var index$q = /*#__PURE__*/Object.freeze({
3567
+ var index$t = /*#__PURE__*/Object.freeze({
3579
3568
  __proto__: null,
3580
3569
  'default': BannerCarouselRight
3581
3570
  });
@@ -3751,7 +3740,7 @@ function List({
3751
3740
  containerWidth,
3752
3741
  isMobile
3753
3742
  });
3754
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
3743
+ const [nodeData] = sectionData.components;
3755
3744
  const getNumber = val => {
3756
3745
  return val.toString().length == 1 ? '0' + val : val;
3757
3746
  };
@@ -3799,7 +3788,7 @@ function List({
3799
3788
  }))));
3800
3789
  }
3801
3790
 
3802
- var index$p = /*#__PURE__*/Object.freeze({
3791
+ var index$s = /*#__PURE__*/Object.freeze({
3803
3792
  __proto__: null,
3804
3793
  'default': List
3805
3794
  });
@@ -4107,7 +4096,7 @@ function BannerCarouselCenter({
4107
4096
  }))));
4108
4097
  }
4109
4098
 
4110
- var index$o = /*#__PURE__*/Object.freeze({
4099
+ var index$r = /*#__PURE__*/Object.freeze({
4111
4100
  __proto__: null,
4112
4101
  'default': BannerCarouselCenter
4113
4102
  });
@@ -4402,7 +4391,7 @@ function BannerCarouselCenterv2({
4402
4391
  }))));
4403
4392
  }
4404
4393
 
4405
- var index$n = /*#__PURE__*/Object.freeze({
4394
+ var index$q = /*#__PURE__*/Object.freeze({
4406
4395
  __proto__: null,
4407
4396
  'default': BannerCarouselCenterv2
4408
4397
  });
@@ -4643,7 +4632,7 @@ function BannerCarouselLeft({
4643
4632
  })))));
4644
4633
  }
4645
4634
 
4646
- var index$m = /*#__PURE__*/Object.freeze({
4635
+ var index$p = /*#__PURE__*/Object.freeze({
4647
4636
  __proto__: null,
4648
4637
  'default': BannerCarouselLeft
4649
4638
  });
@@ -4924,7 +4913,7 @@ function SubscribeToNewsletter({
4924
4913
  isLandingPages,
4925
4914
  extraProps
4926
4915
  } = useContext(PageContext);
4927
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
4916
+ const [nodeData] = sectionData.components;
4928
4917
  const classes = useSectionStyles$4({
4929
4918
  containerWidth,
4930
4919
  isMobile
@@ -5039,7 +5028,7 @@ function SubscribeToNewsletter({
5039
5028
  })))))));
5040
5029
  }
5041
5030
 
5042
- var index$l = /*#__PURE__*/Object.freeze({
5031
+ var index$o = /*#__PURE__*/Object.freeze({
5043
5032
  __proto__: null,
5044
5033
  'default': SubscribeToNewsletter
5045
5034
  });
@@ -5327,7 +5316,7 @@ function Testimonials({
5327
5316
  }));
5328
5317
  }
5329
5318
 
5330
- var index$k = /*#__PURE__*/Object.freeze({
5319
+ var index$n = /*#__PURE__*/Object.freeze({
5331
5320
  __proto__: null,
5332
5321
  'default': Testimonials
5333
5322
  });
@@ -5700,7 +5689,7 @@ function VideoTestimonial({
5700
5689
  containerWidth,
5701
5690
  isMobile
5702
5691
  });
5703
- const [videoData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
5692
+ const [videoData] = sectionData.components;
5704
5693
  const Wrapper = videoData.videoCarousel.components.length > 1 ? Carousel : Fragment;
5705
5694
  return /*#__PURE__*/React.createElement("div", {
5706
5695
  className: classes.videoTestimonialSuperContainer
@@ -5731,7 +5720,7 @@ function VideoTestimonial({
5731
5720
  }))))));
5732
5721
  }
5733
5722
 
5734
- var index$j = /*#__PURE__*/Object.freeze({
5723
+ var index$m = /*#__PURE__*/Object.freeze({
5735
5724
  __proto__: null,
5736
5725
  'default': VideoTestimonial
5737
5726
  });
@@ -5920,7 +5909,7 @@ function Video({
5920
5909
  containerWidth
5921
5910
  }
5922
5911
  } = useContext(PageContext);
5923
- const [videoData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
5912
+ const [videoData] = sectionData.components;
5924
5913
  const cardsCount = videoData?.videoCarousel?.components?.length;
5925
5914
  const slidesToShow = isMobile ? 1 : 2;
5926
5915
  const classes = useVideoStyles({
@@ -5967,7 +5956,7 @@ function Video({
5967
5956
  }, carouselContent))));
5968
5957
  }
5969
5958
 
5970
- var index$i = /*#__PURE__*/Object.freeze({
5959
+ var index$l = /*#__PURE__*/Object.freeze({
5971
5960
  __proto__: null,
5972
5961
  'default': Video
5973
5962
  });
@@ -6127,7 +6116,7 @@ function Info({
6127
6116
  } = useContext(PageContext);
6128
6117
  const theme = useTheme();
6129
6118
  const slidesToShow = isMobile ? 1 : 4;
6130
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6119
+ const [nodeData] = sectionData.components;
6131
6120
  const carouselList = nodeData?.contentList?.components;
6132
6121
  const cardsCount = carouselList?.length;
6133
6122
  const classes = useSectionStyles$3({
@@ -6203,7 +6192,7 @@ function Info({
6203
6192
  }, carouselContent))));
6204
6193
  }
6205
6194
 
6206
- var index$h = /*#__PURE__*/Object.freeze({
6195
+ var index$k = /*#__PURE__*/Object.freeze({
6207
6196
  __proto__: null,
6208
6197
  'default': Info
6209
6198
  });
@@ -6286,7 +6275,7 @@ const TextSection = ({
6286
6275
  containerWidth,
6287
6276
  isMobile
6288
6277
  });
6289
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6278
+ const [nodeData] = sectionData.components;
6290
6279
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("section", {
6291
6280
  className: classes.section
6292
6281
  }, /*#__PURE__*/React.createElement("div", {
@@ -6322,7 +6311,7 @@ const TextSection = ({
6322
6311
  })))));
6323
6312
  };
6324
6313
 
6325
- var index$g = /*#__PURE__*/Object.freeze({
6314
+ var index$j = /*#__PURE__*/Object.freeze({
6326
6315
  __proto__: null,
6327
6316
  'default': TextSection
6328
6317
  });
@@ -6463,7 +6452,7 @@ function PhotoGallery({
6463
6452
  containerWidth
6464
6453
  }
6465
6454
  } = useContext(PageContext);
6466
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6455
+ const [nodeData] = sectionData.components;
6467
6456
  const carouselList = nodeData?.cardCarousel?.components;
6468
6457
  const cardsCount = carouselList?.length;
6469
6458
  const slidesToShow = isMobile ? 1 : 2;
@@ -6545,7 +6534,7 @@ function PhotoGallery({
6545
6534
  }, carouselContent))));
6546
6535
  }
6547
6536
 
6548
- var index$f = /*#__PURE__*/Object.freeze({
6537
+ var index$i = /*#__PURE__*/Object.freeze({
6549
6538
  __proto__: null,
6550
6539
  'default': PhotoGallery
6551
6540
  });
@@ -6662,7 +6651,7 @@ const FAQListing = ({
6662
6651
  containerWidth,
6663
6652
  isMobile
6664
6653
  });
6665
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6654
+ const [nodeData] = sectionData.components;
6666
6655
  return /*#__PURE__*/React.createElement("section", {
6667
6656
  className: classes.section
6668
6657
  }, /*#__PURE__*/React.createElement("div", {
@@ -6728,7 +6717,7 @@ const Accordion = ({
6728
6717
  })));
6729
6718
  };
6730
6719
 
6731
- var index$e = /*#__PURE__*/Object.freeze({
6720
+ var index$h = /*#__PURE__*/Object.freeze({
6732
6721
  __proto__: null,
6733
6722
  'default': FAQListing
6734
6723
  });
@@ -6840,7 +6829,7 @@ const TextGrid = ({
6840
6829
  containerWidth
6841
6830
  }
6842
6831
  } = useContext(PageContext);
6843
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6832
+ const [nodeData] = sectionData.components;
6844
6833
  const cardsCount = nodeData?.contentList?.components?.length;
6845
6834
  const slidesToShow = isMobile ? 1 : 2;
6846
6835
  const classes = useTextGridStyles({
@@ -6899,7 +6888,7 @@ const TextGrid = ({
6899
6888
  }, carouselContent))));
6900
6889
  };
6901
6890
 
6902
- var index$d = /*#__PURE__*/Object.freeze({
6891
+ var index$g = /*#__PURE__*/Object.freeze({
6903
6892
  __proto__: null,
6904
6893
  'default': TextGrid
6905
6894
  });
@@ -8183,7 +8172,7 @@ function SimpleCardsContainer({
8183
8172
  }, children);
8184
8173
  }
8185
8174
 
8186
- var index$c = /*#__PURE__*/Object.freeze({
8175
+ var index$f = /*#__PURE__*/Object.freeze({
8187
8176
  __proto__: null,
8188
8177
  'default': courses
8189
8178
  });
@@ -8449,7 +8438,7 @@ function TeamCard({
8449
8438
  containerWidth
8450
8439
  }
8451
8440
  } = useContext(PageContext);
8452
- const [teamData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
8441
+ const [teamData] = sectionData.components;
8453
8442
  const cardsCount = teamData?.teamCarousel?.components?.length;
8454
8443
  const slidesToShow = isMobile ? 1 : 4;
8455
8444
  const classes = useTeamStyles({
@@ -8501,7 +8490,7 @@ function TeamCard({
8501
8490
  }, " ", getCarouselContent())));
8502
8491
  }
8503
8492
 
8504
- var index$b = /*#__PURE__*/Object.freeze({
8493
+ var index$e = /*#__PURE__*/Object.freeze({
8505
8494
  __proto__: null,
8506
8495
  'default': TeamCard
8507
8496
  });
@@ -8688,7 +8677,7 @@ function FormEnquiry({
8688
8677
  containerWidth,
8689
8678
  isMobile
8690
8679
  });
8691
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
8680
+ const [nodeData] = sectionData.components;
8692
8681
  const [isSubmitted, setIsSubmitted] = useState(false);
8693
8682
  const theme = useTheme();
8694
8683
  let [btnDisabled, setBtnDisabled] = useState(false);
@@ -8922,7 +8911,7 @@ function FormEnquiry({
8922
8911
  })))))));
8923
8912
  }
8924
8913
 
8925
- var index$a = /*#__PURE__*/Object.freeze({
8914
+ var index$d = /*#__PURE__*/Object.freeze({
8926
8915
  __proto__: null,
8927
8916
  'default': FormEnquiry
8928
8917
  });
@@ -9145,7 +9134,7 @@ function Contact({
9145
9134
  } = useContext(PageContext);
9146
9135
  let [btnDisabled, setBtnDisabled] = useState(false);
9147
9136
  const [isSubmitted, setIsSubmitted] = useState(false);
9148
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
9137
+ const [nodeData] = sectionData.components;
9149
9138
  const classes = useSectionStyles({
9150
9139
  containerWidth,
9151
9140
  isMobile
@@ -9344,7 +9333,7 @@ function Contact({
9344
9333
  })))))));
9345
9334
  }
9346
9335
 
9347
- var index$9 = /*#__PURE__*/Object.freeze({
9336
+ var index$c = /*#__PURE__*/Object.freeze({
9348
9337
  __proto__: null,
9349
9338
  'default': Contact
9350
9339
  });
@@ -9821,7 +9810,7 @@ function CoursePromotionPage$1({
9821
9810
  }))));
9822
9811
  }
9823
9812
 
9824
- var index$8 = /*#__PURE__*/Object.freeze({
9813
+ var index$b = /*#__PURE__*/Object.freeze({
9825
9814
  __proto__: null,
9826
9815
  'default': CoursePromotionPage$1
9827
9816
  });
@@ -10408,7 +10397,7 @@ function CoursePromotionPage({
10408
10397
  }))));
10409
10398
  }
10410
10399
 
10411
- var index$7 = /*#__PURE__*/Object.freeze({
10400
+ var index$a = /*#__PURE__*/Object.freeze({
10412
10401
  __proto__: null,
10413
10402
  'default': CoursePromotionPage
10414
10403
  });
@@ -10771,7 +10760,7 @@ const FormPage = ({
10771
10760
  })))));
10772
10761
  };
10773
10762
 
10774
- var index$6 = /*#__PURE__*/Object.freeze({
10763
+ var index$9 = /*#__PURE__*/Object.freeze({
10775
10764
  __proto__: null,
10776
10765
  'default': FormPage
10777
10766
  });
@@ -10871,7 +10860,7 @@ function Tiles({
10871
10860
  const classes = useTilesStyles({
10872
10861
  isMobile
10873
10862
  });
10874
- const nodeData = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
10863
+ const nodeData = sectionData.components;
10875
10864
  const tilesList = nodeData[0]?.tilesList.components;
10876
10865
  const handleClick = value => {
10877
10866
  if (!isEdit && value) {
@@ -10919,7 +10908,7 @@ function Tiles({
10919
10908
  }, TileDiv)));
10920
10909
  }
10921
10910
 
10922
- var index$5 = /*#__PURE__*/Object.freeze({
10911
+ var index$8 = /*#__PURE__*/Object.freeze({
10923
10912
  __proto__: null,
10924
10913
  'default': Tiles
10925
10914
  });
@@ -11392,7 +11381,7 @@ function EmailDripMarket({
11392
11381
  })));
11393
11382
  }
11394
11383
 
11395
- var index$4 = /*#__PURE__*/Object.freeze({
11384
+ var index$7 = /*#__PURE__*/Object.freeze({
11396
11385
  __proto__: null,
11397
11386
  'default': EmailDripMarket
11398
11387
  });
@@ -11618,7 +11607,7 @@ function ABOUT_INSTITUTE({
11618
11607
  containerWidth,
11619
11608
  isMobile
11620
11609
  });
11621
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
11610
+ const [nodeData] = sectionData.components;
11622
11611
  const [highlightNodeData] = nodeData?.highlight?.components;
11623
11612
  const theme = useTheme();
11624
11613
  const ImageJSX = () => {
@@ -11760,104 +11749,954 @@ function ABOUT_INSTITUTE({
11760
11749
  }, /*#__PURE__*/React.createElement(ImageJSX, null), /*#__PURE__*/React.createElement(ContentJSX, null)), /*#__PURE__*/React.createElement(HighlightJSX, null)));
11761
11750
  }
11762
11751
 
11763
- var index$3 = /*#__PURE__*/Object.freeze({
11752
+ var index$6 = /*#__PURE__*/Object.freeze({
11764
11753
  __proto__: null,
11765
11754
  'default': ABOUT_INSTITUTE
11766
11755
  });
11767
11756
 
11768
- // import TIMER_AND_CALL from '../../sections/timerAndCall';
11769
- const TYPE_TO_COMPONENT_MAP = {
11770
- BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
11771
- GRID_CARD: List,
11772
- BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
11773
- BANNER_CAROUSEL_CENTER_V2: BannerCarouselCenterv2,
11774
- BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
11775
- FORM_SUBSCRIBE: SubscribeToNewsletter,
11776
- TEXT_TESTIMONIAL: Testimonials,
11777
- VIDEO_TESTIMONIAL: VideoTestimonial,
11778
- VIDEO: Video,
11779
- INFO: Info,
11780
- TEXT: TextSection,
11781
- IMAGE_GALLERY: PhotoGallery,
11782
- FAQ_LISTING: FAQListing,
11783
- TEXT_GRID: TextGrid,
11784
- COURSE_CAROUSEL: courses,
11785
- TEAM_CARD: TeamCard,
11786
- CONTACT: FormEnquiry,
11787
- FORM_ENQUIRY: Contact,
11788
- WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
11789
- COURSE_LANDING_PAGE: CoursePromotionPage,
11790
- FORM_LANDING_PAGE: FormPage,
11791
- TILES_SECTION: Tiles,
11792
- EMAIL_DRIP_MARKET: EmailDripMarket,
11793
- ABOUT_INSTITUTE
11794
- };
11795
- const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
11796
- const MemoisedSection = /*#__PURE__*/memo(({
11797
- sectionData,
11798
- extraProps,
11799
- isCustomWebsite,
11800
- sectionIndex
11801
- }) => {
11802
- console.log('extraProps in section data', extraProps);
11803
- const SectionComp = getCompToRender(sectionData.type);
11804
- return /*#__PURE__*/React.createElement(SectionComp, {
11805
- sectionData: sectionData,
11806
- extraProps: extraProps,
11807
- isCustomWebsite: isCustomWebsite,
11808
- sectionIndex: sectionIndex
11809
- });
11757
+ const useCounterSectionStyles = createUseStyles(theme => {
11758
+ return {
11759
+ section: {
11760
+ width: '100%',
11761
+ borderRadius: theme.shape?.borderRadius?.regular || '12px',
11762
+ overflow: 'hidden',
11763
+ backgroundImage: ({
11764
+ backgroundImage
11765
+ } = {}) => backgroundImage ? `url("${backgroundImage}")` : 'none',
11766
+ backgroundColor: ({
11767
+ backgroundColor
11768
+ } = {}) => backgroundColor || '#f8f8fa',
11769
+ backgroundSize: 'cover',
11770
+ backgroundPosition: 'center',
11771
+ backgroundRepeat: 'no-repeat',
11772
+ '&, & *, & *:before, & *:after': {
11773
+ fontFamily: theme?.typography?.fontFamily,
11774
+ boxSizing: 'border-box'
11775
+ }
11776
+ },
11777
+ container: {
11778
+ width: '100%',
11779
+ maxWidth: ({
11780
+ containerWidth
11781
+ } = {}) => containerWidth || '1440px',
11782
+ margin: '0 auto',
11783
+ padding: ({
11784
+ isMobile
11785
+ } = {}) => isMobile ? `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px` : `${theme.spacing.padding.small}px ${theme.spacing.padding.medium}px`
11786
+ },
11787
+ grid: {
11788
+ display: 'grid',
11789
+ gridTemplateColumns: 'repeat(4, 1fr)',
11790
+ gap: ({
11791
+ isMobile
11792
+ } = {}) => isMobile ? '24px' : '32px',
11793
+ alignItems: 'stretch'
11794
+ },
11795
+ counterItem: {
11796
+ display: 'flex',
11797
+ flexDirection: 'column',
11798
+ alignItems: 'center',
11799
+ justifyContent: 'center',
11800
+ textAlign: 'center'
11801
+ },
11802
+ value: {
11803
+ margin: 0,
11804
+ marginBottom: '8px',
11805
+ fontSize: '64px',
11806
+ fontWeight: theme.typography?.fontWeight?.bold,
11807
+ lineHeight: 1.1,
11808
+ color: 'rgba(247, 37, 133, 1)' ,
11809
+ wordBreak: 'break-word'
11810
+ },
11811
+ description: {
11812
+ margin: 0,
11813
+ fontSize: '20px',
11814
+ lineHeight: 1.4,
11815
+ fontWeight: '700',
11816
+ color: 'rgba(51, 51, 51, 1)' ,
11817
+ wordBreak: 'break-word'
11818
+ },
11819
+ '@media (max-width: 1024px)': {
11820
+ grid: {
11821
+ gridTemplateColumns: 'repeat(2, 1fr)',
11822
+ gap: '28px'
11823
+ }
11824
+ },
11825
+ '@media (max-width: 767px)': {
11826
+ section: {
11827
+ borderRadius: theme.shape?.borderRadius?.small || '8px'
11828
+ },
11829
+ container: {
11830
+ padding: `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px`
11831
+ },
11832
+ grid: {
11833
+ gridTemplateColumns: '1fr',
11834
+ gap: '24px'
11835
+ },
11836
+ value: {
11837
+ fontSize: theme.typography.fontSize.h3,
11838
+ marginBottom: '4px',
11839
+ lineHeight: 1.1
11840
+ },
11841
+ description: {
11842
+ fontSize: theme.typography.fontSize.body,
11843
+ lineHeight: 1.4
11844
+ }
11845
+ }
11846
+ };
11810
11847
  });
11811
- const SectionWithBackground = withSectionBackground(MemoisedSection);
11812
- function SectionRenderer({
11848
+
11849
+ function CounterSection({
11813
11850
  sectionData,
11814
- extraProps,
11815
- isCustomWebsite,
11816
11851
  sectionIndex
11817
11852
  }) {
11818
- let sectionBg = {};
11819
- if (sectionData?.isV2Section) {
11820
- let currentObj = sectionData?.components?.find(component => component.hasOwnProperty('sectionsBgname')?.sectionBgData || {});
11821
- sectionBg = currentObj?.sectionsBgname?.sectionBgData || {};
11822
- }
11823
- return /*#__PURE__*/React.createElement(SectionWithBackground, {
11824
- sectionData: sectionData,
11825
- extraProps: extraProps,
11826
- isCustomWebsite: isCustomWebsite,
11827
- sectionIndex: sectionIndex,
11828
- isSkipV2Section: sectionData?.isV2Section,
11829
- componentBg: sectionBg || {}
11853
+ const {
11854
+ layout: {
11855
+ containerWidth
11856
+ },
11857
+ isMobile
11858
+ } = useContext(PageContext);
11859
+ console.log('llll', sectionData);
11860
+ sectionData.components = sectionData.components;
11861
+ const metadata = sectionData.metadata || {};
11862
+ const backgroundImage = metadata.backgroundImage || '';
11863
+ const backgroundColor = metadata.backgroundColor || '#f8f8fa';
11864
+ const classes = useCounterSectionStyles({
11865
+ containerWidth,
11866
+ isMobile,
11867
+ backgroundImage: backgroundImage || null,
11868
+ backgroundColor
11830
11869
  });
11870
+ const cardData = sectionData?.components[0];
11871
+ const [sectionComponent] = sectionData.components || [];
11872
+ const counterSection = sectionComponent?.counterSection;
11873
+ counterSection?.components || [];
11874
+ if (!cardData) return null;
11875
+ return /*#__PURE__*/React.createElement("section", {
11876
+ className: classes.section
11877
+ }, /*#__PURE__*/React.createElement("div", {
11878
+ className: classes.container
11879
+ }, /*#__PURE__*/React.createElement("div", {
11880
+ className: classes.grid
11881
+ }, cardData?.contentList?.components?.map((item, index) => /*#__PURE__*/React.createElement("div", {
11882
+ key: item._id || index,
11883
+ className: classes.counterItem
11884
+ }, item.contentHeading?.metadata?.value != null && item.contentHeading?.metadata?.value !== '' && /*#__PURE__*/React.createElement("h2", {
11885
+ ref: item.contentHeading?.refSetter,
11886
+ className: classes.value,
11887
+ dangerouslySetInnerHTML: {
11888
+ __html: item.contentHeading.metadata.value
11889
+ }
11890
+ }), item.contentPara?.metadata?.value != null && item.contentPara?.metadata?.value !== '' && /*#__PURE__*/React.createElement("p", {
11891
+ ref: item.contentPara?.refSetter,
11892
+ className: classes.description,
11893
+ dangerouslySetInnerHTML: {
11894
+ __html: item.contentPara.metadata.value
11895
+ }
11896
+ }))))));
11831
11897
  }
11832
11898
 
11833
- function PageRenderer({
11834
- pageData: {
11835
- metadata: {
11836
- theme: {
11837
- color = defaultTheme.color,
11838
- font = defaultTheme.font
11839
- } = defaultTheme,
11840
- layout = defaultLayout
11841
- } = defaultMetadata,
11842
- sections,
11843
- header,
11844
- footer,
11845
- validations = {},
11846
- _id,
11847
- isLandingPage = false,
11848
- isCustomWebsite = false
11849
- },
11850
- isMobile = false,
11851
- isLandingPages = false,
11852
- baseURLs = {},
11853
- hashToken,
11854
- SectionWrapper,
11855
- isMasterTemplate,
11856
- basePath,
11857
- countryCode,
11858
- currencySymbol,
11859
- isPreview,
11860
- isEdit,
11899
+ var index$5 = /*#__PURE__*/Object.freeze({
11900
+ __proto__: null,
11901
+ 'default': CounterSection
11902
+ });
11903
+
11904
+ const BREAKPOINTS = {
11905
+ mobile: 0,
11906
+ tablet: 768,
11907
+ desktop: 1024
11908
+ };
11909
+
11910
+ /**
11911
+ * Get current breakpoint from window width
11912
+ */
11913
+ const getBreakpoint = width => {
11914
+ if (width >= BREAKPOINTS.desktop) return 'desktop';
11915
+ if (width >= BREAKPOINTS.tablet) return 'tablet';
11916
+ return 'mobile';
11917
+ };
11918
+ const stickyBarBase = {
11919
+ position: 'fixed',
11920
+ left: 0,
11921
+ right: 0,
11922
+ bottom: 0,
11923
+ zIndex: 9998,
11924
+ display: 'flex',
11925
+ alignItems: 'center',
11926
+ justifyContent: 'center',
11927
+ backgroundColor: '#F8F9FB',
11928
+ boxShadow: '0 -2px 8px rgba(0, 0, 0, 0.06)',
11929
+ borderTop: '1px solid #E5E7EB'
11930
+ };
11931
+ const stickyBarResponsive = {
11932
+ mobile: {
11933
+ ...stickyBarBase,
11934
+ padding: '12px 16px',
11935
+ gap: '12px',
11936
+ flexDirection: 'column',
11937
+ alignItems: 'stretch'
11938
+ },
11939
+ tablet: {
11940
+ ...stickyBarBase,
11941
+ padding: '14px 24px',
11942
+ gap: '16px',
11943
+ flexDirection: 'row',
11944
+ alignItems: 'center'
11945
+ },
11946
+ desktop: {
11947
+ ...stickyBarBase,
11948
+ padding: '16px 32px',
11949
+ gap: '24px',
11950
+ flexDirection: 'row',
11951
+ alignItems: 'center'
11952
+ }
11953
+ };
11954
+ const getStickyBarStyle = breakpoint => stickyBarResponsive[breakpoint] || stickyBarResponsive.mobile;
11955
+ const stickyTextBase = {
11956
+ color: '#343A40',
11957
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
11958
+ margin: 0
11959
+ };
11960
+ const stickyTextResponsive = {
11961
+ mobile: {
11962
+ ...stickyTextBase,
11963
+ fontSize: '13px',
11964
+ lineHeight: 1.4,
11965
+ textAlign: 'center'
11966
+ },
11967
+ tablet: {
11968
+ ...stickyTextBase,
11969
+ fontSize: '14px',
11970
+ lineHeight: 1.45,
11971
+ textAlign: 'left'
11972
+ },
11973
+ desktop: {
11974
+ ...stickyTextBase,
11975
+ fontSize: '15px',
11976
+ lineHeight: 1.5,
11977
+ textAlign: 'left'
11978
+ }
11979
+ };
11980
+ const getStickyTextStyle = breakpoint => stickyTextResponsive[breakpoint] || stickyTextResponsive.mobile;
11981
+ const stickyButtonBase = {
11982
+ backgroundColor: '#3366FF',
11983
+ color: '#FFFFFF',
11984
+ border: 'none',
11985
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
11986
+ fontWeight: 600,
11987
+ textTransform: 'uppercase',
11988
+ letterSpacing: '0.02em',
11989
+ cursor: 'pointer',
11990
+ whiteSpace: 'nowrap',
11991
+ flexShrink: 0
11992
+ };
11993
+ const stickyButtonResponsive = {
11994
+ mobile: {
11995
+ ...stickyButtonBase,
11996
+ padding: '10px 20px',
11997
+ fontSize: '12px',
11998
+ borderRadius: '6px'
11999
+ },
12000
+ tablet: {
12001
+ ...stickyButtonBase,
12002
+ padding: '12px 24px',
12003
+ fontSize: '13px',
12004
+ borderRadius: '8px'
12005
+ },
12006
+ desktop: {
12007
+ ...stickyButtonBase,
12008
+ padding: '14px 28px',
12009
+ fontSize: '14px',
12010
+ borderRadius: '8px'
12011
+ }
12012
+ };
12013
+ const getStickyButtonStyle = breakpoint => stickyButtonResponsive[breakpoint] || stickyButtonResponsive.mobile;
12014
+
12015
+ // --- Floating (WhatsApp) type ---
12016
+
12017
+ const floatingButtonBase = {
12018
+ position: 'fixed',
12019
+ bottom: 24,
12020
+ right: 24,
12021
+ width: 'fit-content',
12022
+ marginLeft: 'auto',
12023
+ zIndex: 9999,
12024
+ display: 'inline-flex',
12025
+ alignItems: 'center',
12026
+ gap: '10px',
12027
+ padding: '12px 20px',
12028
+ backgroundColor: '#FFFFFF',
12029
+ border: '1px solid #E5E7EB',
12030
+ borderRadius: '9999px',
12031
+ boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
12032
+ cursor: 'pointer',
12033
+ textDecoration: 'none',
12034
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12035
+ fontWeight: 700,
12036
+ fontSize: '14px',
12037
+ textTransform: 'uppercase',
12038
+ letterSpacing: '0.02em',
12039
+ color: '#000000',
12040
+ transition: 'box-shadow 0.2s ease, transform 0.2s ease'
12041
+ };
12042
+ const floatingButtonResponsive = {
12043
+ mobile: {
12044
+ ...floatingButtonBase,
12045
+ bottom: 16,
12046
+ left: 16,
12047
+ padding: '10px 16px',
12048
+ gap: '8px',
12049
+ fontSize: '12px'
12050
+ },
12051
+ tablet: {
12052
+ ...floatingButtonBase,
12053
+ bottom: 20,
12054
+ left: 20,
12055
+ padding: '12px 18px',
12056
+ gap: '10px',
12057
+ fontSize: '13px'
12058
+ },
12059
+ desktop: {
12060
+ ...floatingButtonBase,
12061
+ bottom: 24,
12062
+ left: 24,
12063
+ padding: '12px 20px',
12064
+ gap: '10px',
12065
+ fontSize: '14px'
12066
+ }
12067
+ };
12068
+ const getFloatingButtonStyle = breakpoint => floatingButtonResponsive[breakpoint] || floatingButtonResponsive.mobile;
12069
+ const whatsAppIconSvgSize = {
12070
+ mobile: 24,
12071
+ tablet: 26,
12072
+ desktop: 28
12073
+ };
12074
+ const getWhatsAppIconSize = breakpoint => whatsAppIconSvgSize[breakpoint] ?? whatsAppIconSvgSize.mobile;
12075
+
12076
+ const DEFAULT_WHATSAPP_ICON_COLOR = '#25D366';
12077
+
12078
+ /** Build WhatsApp wa.me URL from phone number (digits only, optional + prefix). */
12079
+ function buildWhatsAppUrl(phoneNumber) {
12080
+ if (!phoneNumber || typeof phoneNumber !== 'string') return null;
12081
+ const digits = phoneNumber.replace(/\D/g, '');
12082
+ return digits.length > 0 ? `https://wa.me/${digits}` : null;
12083
+ }
12084
+
12085
+ /**
12086
+ * WhatsApp icon SVG – bubble color is dynamic via props (default #25D366)
12087
+ */
12088
+ const WhatsAppIcon = ({
12089
+ size = 28,
12090
+ color = DEFAULT_WHATSAPP_ICON_COLOR
12091
+ }) => /*#__PURE__*/React.createElement("svg", {
12092
+ width: size,
12093
+ height: size,
12094
+ viewBox: "0 0 24 24",
12095
+ fill: "none",
12096
+ xmlns: "http://www.w3.org/2000/svg",
12097
+ "aria-hidden": true
12098
+ }, /*#__PURE__*/React.createElement("path", {
12099
+ 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",
12100
+ fill: color
12101
+ }));
12102
+
12103
+ /** Icon: image when iconImageUrl is provided, otherwise WhatsApp SVG */
12104
+ const CtaIcon = ({
12105
+ size = 28,
12106
+ color,
12107
+ iconImageUrl
12108
+ }) => {
12109
+ if (iconImageUrl && typeof iconImageUrl === 'string') {
12110
+ return /*#__PURE__*/React.createElement("img", {
12111
+ src: iconImageUrl,
12112
+ alt: "",
12113
+ width: size,
12114
+ height: size,
12115
+ style: {
12116
+ display: 'block',
12117
+ objectFit: 'contain'
12118
+ },
12119
+ "aria-hidden": true
12120
+ });
12121
+ }
12122
+ return /*#__PURE__*/React.createElement(WhatsAppIcon, {
12123
+ size: size,
12124
+ color: color ?? DEFAULT_WHATSAPP_ICON_COLOR
12125
+ });
12126
+ };
12127
+
12128
+ /**
12129
+ * Sticky CTA component.
12130
+ * Renders relative to viewport (app root), not parent section.
12131
+ * Accepts either sectionData (from pageRenderer/sectionRenderer) or flat props.
12132
+ *
12133
+ * @param {object} [sectionData] - Section payload when rendered via SectionRenderer: { type, label, components: [{ type, stickyMessage, ... }] }
12134
+ * @param {string} type - "sticky" | "floating"
12135
+ * @param {string} [stickyMessage] - Message text for sticky bar
12136
+ * @param {string} [stickyButtonText] - CTA button label (default "ENQUIRE NOW")
12137
+ * @param {string} [whatsAppPhoneNumber] - Mobile number for WhatsApp
12138
+ * @param {string} [whatsAppHref] - Optional fallback full URL when whatsAppPhoneNumber is not provided
12139
+ * @param {string} [whatsAppLabel] - Label next to icon (default "SUPPORT")
12140
+ * @param {string} [whatsAppIconColor] - WhatsApp icon color (used when iconImageUrl is not set)
12141
+ * @param {string} [whatsAppButtonBackgroundColor] - Floating button background color
12142
+ * @param {string} [iconImageUrl] - Optional image URL for the icon; when set, shows <img> instead of WhatsApp SVG
12143
+ * @param {object} [extraProps] - From SectionRenderer; extraProps.isEdit true shows in-flow edit hint
12144
+ * @param {boolean} [showEditHint] - When true, shows "Click on edit button to edit this section" in normal flow
12145
+ */
12146
+ function StickyCta({
12147
+ sectionData,
12148
+ type = 'sticky',
12149
+ stickyMessage = 'Live Masterclass will be on 26 January (Monday) from 05:00 PM',
12150
+ stickyButtonText = 'ENQUIRE NOW',
12151
+ whatsAppPhoneNumber,
12152
+ whatsAppHref,
12153
+ whatsAppLabel = 'SUPPORT',
12154
+ whatsAppIconColor,
12155
+ whatsAppButtonBackgroundColor,
12156
+ iconImageUrl
12157
+ }) {
12158
+ console.log('nishu03333', sectionData);
12159
+ const node = sectionData?.components?.[0];
12160
+ const contentList = node?.contentList?.components || [];
12161
+ const showEditHint = sectionData?.isDefaultEditor ?? false;
12162
+ const propsFromSection = node ? {
12163
+ type: node?.title?.metadata?.value ?? type,
12164
+ stickyMessage: contentList[1]?.contentPara?.metadata?.value ?? stickyMessage,
12165
+ stickyButtonText: contentList[1]?.contentHeading?.metadata?.value ?? stickyButtonText,
12166
+ whatsAppPhoneNumber: node.subheading?.metadata?.value ?? whatsAppPhoneNumber,
12167
+ whatsAppHref: node.whatsAppHref ?? whatsAppHref,
12168
+ whatsAppLabel: contentList[0]?.contentHeading?.metadata?.value ?? whatsAppLabel,
12169
+ whatsAppIconColor: node.whatsAppIconColor ?? whatsAppIconColor,
12170
+ whatsAppButtonBackgroundColor: node.whatsAppButtonBackgroundColor ?? whatsAppButtonBackgroundColor,
12171
+ iconImageUrl: contentList[0]?.contentPara?.metadata?.value ?? iconImageUrl
12172
+ } : null;
12173
+ const p = propsFromSection ?? {
12174
+ type,
12175
+ stickyMessage,
12176
+ stickyButtonText,
12177
+ whatsAppPhoneNumber,
12178
+ whatsAppHref,
12179
+ whatsAppLabel,
12180
+ whatsAppIconColor,
12181
+ whatsAppButtonBackgroundColor,
12182
+ iconImageUrl
12183
+ };
12184
+ const whatsAppUrl = p?.whatsAppPhoneNumber ? p?.whatsAppPhoneNumber : buildWhatsAppUrl(p?.whatsAppPhoneNumber);
12185
+ const [breakpoint, setBreakpoint] = useState(() => typeof window !== 'undefined' ? getBreakpoint(window.innerWidth) : 'mobile');
12186
+ useEffect(() => {
12187
+ if (typeof window === 'undefined') return;
12188
+ const onResize = () => setBreakpoint(getBreakpoint(window.innerWidth));
12189
+ window.addEventListener('resize', onResize);
12190
+ return () => window.removeEventListener('resize', onResize);
12191
+ }, []);
12192
+ const editHintBlock = showEditHint ? /*#__PURE__*/React.createElement("div", {
12193
+ "data-section": "sticky-cta-edit-hint",
12194
+ style: {
12195
+ position: 'relative',
12196
+ width: '100%',
12197
+ padding: '12px 16px',
12198
+ textAlign: 'center',
12199
+ backgroundColor: '#f5f5f5',
12200
+ border: '1px dashed #ccc',
12201
+ borderRadius: 8,
12202
+ marginBottom: 8
12203
+ }
12204
+ }, /*#__PURE__*/React.createElement("h2", {
12205
+ style: {
12206
+ margin: 0,
12207
+ fontSize: 16,
12208
+ fontWeight: 600,
12209
+ color: '#555'
12210
+ }
12211
+ }, "Click on edit button to edit this section")) : null;
12212
+ if (p.type === 'floating') {
12213
+ const buttonStyle = {
12214
+ ...getFloatingButtonStyle(breakpoint),
12215
+ ...(p.whatsAppButtonBackgroundColor != null && {
12216
+ backgroundColor: p.whatsAppButtonBackgroundColor
12217
+ })
12218
+ };
12219
+ const iconSize = getWhatsAppIconSize(breakpoint);
12220
+ const iconColor = p.whatsAppIconColor ?? DEFAULT_WHATSAPP_ICON_COLOR;
12221
+ return /*#__PURE__*/React.createElement(React.Fragment, null, editHintBlock, /*#__PURE__*/React.createElement("a", {
12222
+ href: whatsAppUrl,
12223
+ target: "_blank",
12224
+ rel: "noopener noreferrer",
12225
+ "access-cta": "DIY",
12226
+ style: buttonStyle,
12227
+ onMouseEnter: e => {
12228
+ e.currentTarget.style.boxShadow = '0 6px 16px rgba(0, 0, 0, 0.12)';
12229
+ e.currentTarget.style.transform = 'scale(1.02)';
12230
+ },
12231
+ onMouseLeave: e => {
12232
+ e.currentTarget.style.boxShadow = '0 4px 12px rgba(0, 0, 0, 0.1)';
12233
+ e.currentTarget.style.transform = 'scale(1)';
12234
+ },
12235
+ "aria-label": `${p.whatsAppLabel} via WhatsApp`
12236
+ }, /*#__PURE__*/React.createElement(CtaIcon, {
12237
+ size: iconSize,
12238
+ color: iconColor,
12239
+ iconImageUrl: p.iconImageUrl
12240
+ }), /*#__PURE__*/React.createElement("span", null, p.whatsAppLabel)));
12241
+ }
12242
+
12243
+ // type === 'sticky' – button uses mobile number from props to build URL; click redirects to WhatsApp
12244
+ const barStyle = getStickyBarStyle(breakpoint);
12245
+ const textStyle = getStickyTextStyle(breakpoint);
12246
+ const buttonStyle = getStickyButtonStyle(breakpoint);
12247
+ return /*#__PURE__*/React.createElement(React.Fragment, null, editHintBlock, /*#__PURE__*/React.createElement("div", {
12248
+ style: barStyle,
12249
+ role: "banner"
12250
+ }, /*#__PURE__*/React.createElement("p", {
12251
+ style: textStyle
12252
+ }, p.stickyMessage), /*#__PURE__*/React.createElement("a", {
12253
+ href: whatsAppUrl,
12254
+ target: "_blank",
12255
+ rel: "noopener noreferrer",
12256
+ "access-cta-container": "DIY",
12257
+ style: {
12258
+ ...buttonStyle,
12259
+ textDecoration: 'none',
12260
+ display: 'inline-flex',
12261
+ alignItems: 'center',
12262
+ justifyContent: 'center'
12263
+ }
12264
+ }, p.stickyButtonText)));
12265
+ }
12266
+
12267
+ var index$4 = /*#__PURE__*/Object.freeze({
12268
+ __proto__: null,
12269
+ 'default': StickyCta,
12270
+ WhatsAppIcon: WhatsAppIcon
12271
+ });
12272
+
12273
+ /**
12274
+ * Styles for CustomHtmlRender section.
12275
+ * Wrapper for user-provided HTML content.
12276
+ */
12277
+
12278
+ const sectionStyle = {
12279
+ width: '100%',
12280
+ maxWidth: '100%',
12281
+ height: 'auto',
12282
+ minHeight: 'auto',
12283
+ margin: 0,
12284
+ padding: 0,
12285
+ overflow: 'visible'
12286
+ };
12287
+
12288
+ const SHADOW_WRAPPER_CLASS = 'custom-html-body-wrap';
12289
+ const SHADOW_INNER_CLASS = 'custom-html-render__shadow-inner';
12290
+
12291
+ /**
12292
+ * Parses full HTML string and extracts styles + body/content for Shadow DOM.
12293
+ * - Strips <!DOCTYPE>, <html>, <head>, <body> and uses inner content + all <style>.
12294
+ * - Scopes "body" and "html" selectors to a wrapper class so styles don't leak to the main app.
12295
+ */
12296
+ function parseHtmlForShadow(html) {
12297
+ if (typeof html !== 'string' || !html.trim()) return {
12298
+ styles: '',
12299
+ content: ''
12300
+ };
12301
+ const styleRegex = /<style[^>]*>([\s\S]*?)<\/style>/gi;
12302
+ const bodyRegex = /<body[^>]*>([\s\S]*?)<\/body>/i;
12303
+ let styles = '';
12304
+ let match;
12305
+ while ((match = styleRegex.exec(html)) !== null) {
12306
+ styles += match[1];
12307
+ }
12308
+ const bodyMatch = html.match(bodyRegex);
12309
+ const rawContent = bodyMatch ? bodyMatch[1].trim() : html;
12310
+
12311
+ // Scope "body" and "html" in CSS to the wrapper so they don't affect the main page.
12312
+ // Only replace as standalone selectors (word boundary) to avoid breaking values like content: "body"
12313
+ let scopedStyles = styles.replace(/\bbody\b(?=\s*[{,])/g, `.${SHADOW_WRAPPER_CLASS}`).replace(/\bhtml\b(?=\s*[{,])/g, `.${SHADOW_WRAPPER_CLASS}`);
12314
+ const content = bodyMatch ? `<div class="${SHADOW_WRAPPER_CLASS}">${rawContent}</div>` : rawContent;
12315
+ return {
12316
+ styles: scopedStyles,
12317
+ content
12318
+ };
12319
+ }
12320
+
12321
+ /**
12322
+ * Base styles inside shadow so the body wrapper has layout and can show background/padding.
12323
+ */
12324
+ const SHADOW_BASE_STYLES = `
12325
+ .${SHADOW_INNER_CLASS}, .${SHADOW_WRAPPER_CLASS} {
12326
+ display: block;
12327
+ width: 100%;
12328
+ box-sizing: border-box;
12329
+ }
12330
+ .${SHADOW_INNER_CLASS} {
12331
+ min-height: 0;
12332
+ }
12333
+ `;
12334
+
12335
+ /**
12336
+ * Resolves HTML string from section data.
12337
+ * Supports: sectionData.components[0].CustomHtml.metadata.value (API shape)
12338
+ * and sectionData.components[0].html or props.html (legacy/flat).
12339
+ */
12340
+ function getHtmlFromSectionData(sectionData, fallbackHtml = '') {
12341
+ const node = sectionData?.components?.[0];
12342
+ if (!node) return fallbackHtml;
12343
+ const fromCustomHtml = node.CustomHtml?.metadata?.value;
12344
+ if (typeof fromCustomHtml === 'string') return fromCustomHtml;
12345
+ if (typeof node.html === 'string') return node.html;
12346
+ return fallbackHtml;
12347
+ }
12348
+
12349
+ /**
12350
+ * CustomHtmlRender – renders any full HTML document or fragment in an encapsulated Shadow DOM.
12351
+ * Receives html via sectionData.components[0].CustomHtml.metadata.value (or .html) or props.html.
12352
+ * Body/html background, padding, and all other CSS apply only inside this section.
12353
+ */
12354
+ function CustomHtmlRender({
12355
+ sectionData,
12356
+ html = '',
12357
+ className,
12358
+ style = {}
12359
+ }) {
12360
+ const containerRef = useRef(null);
12361
+ const node = sectionData?.components?.[0];
12362
+ const resolvedHtml = getHtmlFromSectionData(sectionData, html);
12363
+ const p = node ? {
12364
+ html: resolvedHtml,
12365
+ className: node.className ?? className,
12366
+ style: node.style ?? style
12367
+ } : {
12368
+ html: resolvedHtml,
12369
+ className,
12370
+ style
12371
+ };
12372
+ const safeHtml = typeof p.html === 'string' ? p.html : '';
12373
+ const setSectionRef = el => {
12374
+ containerRef.current = el;
12375
+ const refSetter = node?.CustomHtml?.refSetter;
12376
+ if (refSetter) {
12377
+ if (typeof refSetter === 'function') refSetter(el);else if (refSetter && typeof refSetter === 'object') refSetter.current = el;
12378
+ }
12379
+ };
12380
+ useEffect(() => {
12381
+ if (!safeHtml.trim() || !containerRef.current) return;
12382
+ const {
12383
+ styles,
12384
+ content
12385
+ } = parseHtmlForShadow(safeHtml);
12386
+ const host = containerRef.current;
12387
+ if (!host.shadowRoot) {
12388
+ host.attachShadow({
12389
+ mode: 'open'
12390
+ });
12391
+ }
12392
+ const shadowRoot = host.shadowRoot;
12393
+ shadowRoot.innerHTML = '';
12394
+ const inner = document.createElement('div');
12395
+ inner.className = SHADOW_INNER_CLASS;
12396
+ if (SHADOW_BASE_STYLES) {
12397
+ const baseStyle = document.createElement('style');
12398
+ baseStyle.textContent = SHADOW_BASE_STYLES;
12399
+ shadowRoot.appendChild(baseStyle);
12400
+ }
12401
+ if (styles) {
12402
+ const styleEl = document.createElement('style');
12403
+ styleEl.textContent = styles;
12404
+ shadowRoot.appendChild(styleEl);
12405
+ }
12406
+ const contentWrap = document.createElement('div');
12407
+ contentWrap.innerHTML = content;
12408
+ while (contentWrap.firstChild) {
12409
+ inner.appendChild(contentWrap.firstChild);
12410
+ }
12411
+ shadowRoot.appendChild(inner);
12412
+ return () => {
12413
+ shadowRoot.innerHTML = '';
12414
+ };
12415
+ }, [safeHtml]);
12416
+ if (!safeHtml.trim()) {
12417
+ return null;
12418
+ }
12419
+ return /*#__PURE__*/React.createElement("section", {
12420
+ ref: setSectionRef,
12421
+ className: p.className,
12422
+ style: {
12423
+ ...sectionStyle,
12424
+ ...p.style
12425
+ },
12426
+ "data-section": "custom-html-render"
12427
+ });
12428
+ }
12429
+
12430
+ var index$3 = /*#__PURE__*/Object.freeze({
12431
+ __proto__: null,
12432
+ 'default': CustomHtmlRender
12433
+ });
12434
+
12435
+ const useTimerCallPageStyles = createUseStyles(theme => ({
12436
+ timerAndCallSection: {
12437
+ padding: ({
12438
+ isMobile
12439
+ } = {}) => isMobile ? '24px' : '80px 120px',
12440
+ background: theme?.colors?.white,
12441
+ '&, & *, & *:before, & *:after': {
12442
+ fontFamily: theme?.typography?.fontFamily,
12443
+ boxSizing: 'border-box'
12444
+ }
12445
+ },
12446
+ timerAndCallContainer: {
12447
+ padding: '72px',
12448
+ background: '#F4F9FF',
12449
+ borderRadius: '8px',
12450
+ boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.16)'
12451
+ },
12452
+ timerAndCallBox: {
12453
+ display: 'flex',
12454
+ flexDirection: 'column',
12455
+ gap: '42px',
12456
+ justifyContent: 'center',
12457
+ alignItems: 'center'
12458
+ },
12459
+ title: {
12460
+ fontWeight: '700',
12461
+ fontSize: '40px',
12462
+ textAlign: 'center',
12463
+ lineHeight: '45px'
12464
+ },
12465
+ offerWrapper: {
12466
+ display: 'flex',
12467
+ flexDirection: 'column',
12468
+ gap: '24px',
12469
+ justifyContent: 'center',
12470
+ alignItems: 'center'
12471
+ },
12472
+ offerEndsTitle: {
12473
+ fontWeight: '700',
12474
+ fontSize: '16px'
12475
+ },
12476
+ countdown: {
12477
+ display: 'flex',
12478
+ gap: '10px'
12479
+ },
12480
+ counterBox: {
12481
+ display: 'flex',
12482
+ flexDirection: 'column',
12483
+ justifyContent: 'center',
12484
+ alignItems: 'center',
12485
+ border: '0.56px solid #2C88FF',
12486
+ borderRadius: '8px',
12487
+ background: '#FFFFFF',
12488
+ color: '#2C88FF',
12489
+ padding: '12px 16px 12px 16px',
12490
+ fontWeight: '600',
12491
+ fontSize: '14px'
12492
+ },
12493
+ // SMALL SCREEN
12494
+ '@media screen and (max-width: 767px)': {
12495
+ timerAndCallSection: {
12496
+ padding: '24px'
12497
+ },
12498
+ timerAndCallContainer: {
12499
+ padding: '16px'
12500
+ },
12501
+ timerAndCallBox: {
12502
+ gap: '32px'
12503
+ },
12504
+ title: {
12505
+ fontSize: '24px'
12506
+ },
12507
+ offerWrapper: {
12508
+ gap: '16px'
12509
+ }
12510
+ }
12511
+ }));
12512
+
12513
+ const TimerAndCall = ({
12514
+ sectionData,
12515
+ extraProps = {}
12516
+ }) => {
12517
+ const {
12518
+ isMobile,
12519
+ fullPageData
12520
+ } = useContext(PageContext);
12521
+ const [nodeData] = sectionData?.components;
12522
+ const classes = useTimerCallPageStyles({
12523
+ isMobile
12524
+ });
12525
+ const CounterBox = ({
12526
+ value,
12527
+ text
12528
+ }) => {
12529
+ return /*#__PURE__*/React.createElement("div", {
12530
+ className: classes.counterBox
12531
+ }, /*#__PURE__*/React.createElement("div", null, value), /*#__PURE__*/React.createElement("div", null, text));
12532
+ };
12533
+ const renderer = ({
12534
+ formatted,
12535
+ completed
12536
+ }) => {
12537
+ return /*#__PURE__*/React.createElement("div", {
12538
+ className: classes.countdown
12539
+ }, /*#__PURE__*/React.createElement(CounterBox, {
12540
+ value: formatted?.hours,
12541
+ text: "Hours"
12542
+ }), /*#__PURE__*/React.createElement(CounterBox, {
12543
+ value: formatted?.minutes,
12544
+ text: "Mins"
12545
+ }), /*#__PURE__*/React.createElement(CounterBox, {
12546
+ value: formatted?.seconds,
12547
+ text: "Secs"
12548
+ }));
12549
+ };
12550
+ const CountDownJSX = offerPriceValidFor => {
12551
+ let conversions = extraProps?.conversions || 0;
12552
+ if (offerPriceValidFor && offerPriceValidFor - conversions <= 0) {
12553
+ return null;
12554
+ }
12555
+ return /*#__PURE__*/React.createElement("div", {
12556
+ className: classes.offerWrapper
12557
+ }, /*#__PURE__*/React.createElement("div", {
12558
+ className: classes.offerEndsTitle
12559
+ }, "Offer ends in"), /*#__PURE__*/React.createElement(Countdown, {
12560
+ renderer: renderer,
12561
+ date: nodeData.offerCounter?.metadata?.endDate,
12562
+ daysInHours: true
12563
+ }));
12564
+ };
12565
+ return /*#__PURE__*/React.createElement("section", {
12566
+ className: classes.timerAndCallSection
12567
+ }, /*#__PURE__*/React.createElement("div", {
12568
+ className: classes.timerAndCallContainer
12569
+ }, /*#__PURE__*/React.createElement("div", {
12570
+ className: classes.timerAndCallBox
12571
+ }, nodeData?.showOffer?.metadata?.value && nodeData.offerCounter?.metadata?.isOfferActive ? CountDownJSX(nodeData.offerCounter?.metadata?.offerPriceValidFor) : null, nodeData?.title?.metadata?.value ? /*#__PURE__*/React.createElement("div", {
12572
+ className: classes.title
12573
+ }, /*#__PURE__*/React.createElement("span", {
12574
+ ref: nodeData?.heading?.refSetter,
12575
+ dangerouslySetInnerHTML: {
12576
+ __html: nodeData?.title?.metadata?.value
12577
+ }
12578
+ })) : null, nodeData?.timerButton?.metadata?.value ? /*#__PURE__*/React.createElement(Button, {
12579
+ style: {
12580
+ width: '100%',
12581
+ fontWeight: '700',
12582
+ fontSize: '14px'
12583
+ },
12584
+ data: {
12585
+ // link: 'headerData?.loginCtaLink',
12586
+ // isLink: 1,
12587
+ value: nodeData.timerButton.metadata.value
12588
+ // isExternal: 1
12589
+ },
12590
+ onClick: extraProps?.courseBuyNow,
12591
+ type: 'primary',
12592
+ size: 'medium',
12593
+ target: null,
12594
+ name: "button",
12595
+ rel: null
12596
+ // styling={isMobile ? { margin: '0 40px' } : {}}
12597
+ }) : null)));
12598
+ };
12599
+
12600
+ var index$2 = /*#__PURE__*/Object.freeze({
12601
+ __proto__: null,
12602
+ 'default': TimerAndCall
12603
+ });
12604
+
12605
+ const TYPE_TO_COMPONENT_MAP = {
12606
+ BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
12607
+ GRID_CARD: List,
12608
+ BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
12609
+ BANNER_CAROUSEL_CENTER_V2: BannerCarouselCenterv2,
12610
+ BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
12611
+ FORM_SUBSCRIBE: SubscribeToNewsletter,
12612
+ TEXT_TESTIMONIAL: Testimonials,
12613
+ VIDEO_TESTIMONIAL: VideoTestimonial,
12614
+ VIDEO: Video,
12615
+ INFO: Info,
12616
+ TEXT: TextSection,
12617
+ IMAGE_GALLERY: PhotoGallery,
12618
+ FAQ_LISTING: FAQListing,
12619
+ TEXT_GRID: TextGrid,
12620
+ COURSE_CAROUSEL: courses,
12621
+ TEAM_CARD: TeamCard,
12622
+ CONTACT: FormEnquiry,
12623
+ FORM_ENQUIRY: Contact,
12624
+ WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
12625
+ COURSE_LANDING_PAGE: CoursePromotionPage,
12626
+ FORM_LANDING_PAGE: FormPage,
12627
+ TILES_SECTION: Tiles,
12628
+ EMAIL_DRIP_MARKET: EmailDripMarket,
12629
+ ABOUT_INSTITUTE,
12630
+ COUNTER_SECTION: CounterSection,
12631
+ STICKY_CTA: StickyCta,
12632
+ CUSTOM_HTML_SECTION: CustomHtmlRender,
12633
+ TIMER_AND_CALL: TimerAndCall
12634
+ };
12635
+ const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
12636
+ const MemoisedSection = /*#__PURE__*/memo(({
12637
+ sectionData,
12638
+ extraProps,
12639
+ isCustomWebsite,
12640
+ sectionIndex
12641
+ }) => {
12642
+ console.log('extraProps in section data', extraProps);
12643
+ const SectionComp = getCompToRender(sectionData.type);
12644
+ return /*#__PURE__*/React.createElement(SectionComp, {
12645
+ sectionData: sectionData,
12646
+ extraProps: extraProps,
12647
+ isCustomWebsite: isCustomWebsite,
12648
+ sectionIndex: sectionIndex
12649
+ });
12650
+ });
12651
+ const SectionWithBackground = withSectionBackground(MemoisedSection);
12652
+ function SectionRenderer({
12653
+ sectionData,
12654
+ extraProps,
12655
+ isCustomWebsite,
12656
+ sectionIndex
12657
+ }) {
12658
+ let sectionBg = {};
12659
+ if (sectionData?.isV2Section) {
12660
+ sectionBg = sectionData?.bgSection?.components?.[0]?.sectionBgData || {};
12661
+ }
12662
+ return /*#__PURE__*/React.createElement(SectionWithBackground, {
12663
+ sectionData: sectionData,
12664
+ extraProps: extraProps,
12665
+ isCustomWebsite: isCustomWebsite,
12666
+ sectionIndex: sectionIndex,
12667
+ isSkipV2Section: sectionData?.isV2Section,
12668
+ componentBg: sectionBg || {}
12669
+ });
12670
+ }
12671
+
12672
+ function PageRenderer({
12673
+ pageData: {
12674
+ metadata: {
12675
+ theme: {
12676
+ color = defaultTheme.color,
12677
+ font = defaultTheme.font
12678
+ } = defaultTheme,
12679
+ layout = defaultLayout
12680
+ } = defaultMetadata,
12681
+ sections,
12682
+ header,
12683
+ footer,
12684
+ validations = {},
12685
+ _id,
12686
+ isLandingPage = false,
12687
+ isCustomWebsite = false
12688
+ },
12689
+ isMobile = false,
12690
+ isLandingPages = false,
12691
+ baseURLs = {},
12692
+ hashToken,
12693
+ SectionWrapper,
12694
+ isMasterTemplate,
12695
+ basePath,
12696
+ countryCode,
12697
+ currencySymbol,
12698
+ isPreview,
12699
+ isEdit,
11861
12700
  sectionPlaceholder,
11862
12701
  templateId,
11863
12702
  isTutorWebsite = false,
@@ -12148,30 +12987,12 @@ function VideoWorkshopPromotion({
12148
12987
  },
12149
12988
  isMobile
12150
12989
  } = useContext(PageContext);
12151
- console.log('nnnn', sectionData);
12152
12990
  const classes = useVideoWorkshopPromotionStyles({
12153
12991
  containerWidth,
12154
12992
  isMobile
12155
12993
  });
12156
- const [sectionComponent] = sectionData?.components?.slice(1) || [];
12157
- const videoWorkshopPromotion = sectionComponent?.videoWorkshopPromotion;
12158
- const [contentNode] = videoWorkshopPromotion?.components || [];
12159
- if (!contentNode) return null;
12160
- const {
12161
- testimonialCategory,
12162
- mainHeading,
12163
- subHeading,
12164
- cta,
12165
- videoThumbnail,
12166
- videoEmbed,
12167
- videoTitleOverlay,
12168
- videoCaption,
12169
- watchOnYouTube
12170
- } = contentNode;
12171
- const videoUrl = videoEmbed?.metadata?.value;
12172
- const thumbnailUrl = videoEmbed?.metadata?.thumbnail || videoThumbnail?.metadata?.value;
12173
- const showCta = cta?.metadata?.value && (cta?.validations?.isEmptyAllowed ? true : cta?.metadata?.value !== '');
12174
- const showWatchOnYouTube = watchOnYouTube?.metadata?.value && (watchOnYouTube?.validations?.isEmptyAllowed ? true : watchOnYouTube?.metadata?.value !== '');
12994
+ const wokShopData = sectionData?.components[0];
12995
+ const videoData = wokShopData?.videoCarousel?.components?.[0];
12175
12996
  return /*#__PURE__*/React.createElement("section", {
12176
12997
  className: classes.section
12177
12998
  }, /*#__PURE__*/React.createElement("div", {
@@ -12180,70 +13001,40 @@ function VideoWorkshopPromotion({
12180
13001
  className: classes.sectionInner
12181
13002
  }, /*#__PURE__*/React.createElement("div", {
12182
13003
  className: classes.textBlock
12183
- }, testimonialCategory?.metadata?.value && /*#__PURE__*/React.createElement("h5", {
12184
- ref: testimonialCategory?.refSetter,
13004
+ }, wokShopData?.videoHeading?.metadata?.value && /*#__PURE__*/React.createElement("h5", {
13005
+ ref: wokShopData?.videoHeading?.refSetter,
12185
13006
  className: classes.category,
12186
13007
  dangerouslySetInnerHTML: {
12187
- __html: testimonialCategory.metadata.value
13008
+ __html: wokShopData?.videoHeading?.metadata?.value
12188
13009
  }
12189
- }), mainHeading?.metadata?.value && /*#__PURE__*/React.createElement("h1", {
12190
- ref: mainHeading?.refSetter,
13010
+ }), wokShopData?.title?.metadata?.value && /*#__PURE__*/React.createElement("h1", {
13011
+ ref: wokShopData?.title?.refSetter,
12191
13012
  className: classes.mainHeading,
12192
13013
  dangerouslySetInnerHTML: {
12193
- __html: mainHeading.metadata.value
13014
+ __html: wokShopData?.title?.metadata?.value
12194
13015
  }
12195
- }), subHeading?.metadata?.value && /*#__PURE__*/React.createElement("p", {
12196
- ref: subHeading?.refSetter,
12197
- className: classes.subHeading,
12198
- dangerouslySetInnerHTML: {
12199
- __html: subHeading.metadata.value
12200
- }
12201
- }), showCta && /*#__PURE__*/React.createElement("div", {
13016
+ }), videoData?.videoTextContent?.metadata?.value && /*#__PURE__*/React.createElement("div", {
12202
13017
  className: classes.ctaWrap
12203
13018
  }, /*#__PURE__*/React.createElement(Button, {
12204
- ref: cta?.refSetter,
12205
- data: cta.metadata,
12206
- type: cta.metadata?.type || 'primary',
13019
+ ref: videoData?.videoTextContent?.metadata?.refSetter,
13020
+ data: videoData?.videoTextContent?.metadata,
13021
+ type: 'primary',
12207
13022
  size: isMobile ? 'small' : 'medium'
12208
13023
  }))), /*#__PURE__*/React.createElement("div", {
12209
13024
  className: classes.videoBlock
12210
13025
  }, /*#__PURE__*/React.createElement("div", {
12211
13026
  className: classes.videoWrapper
12212
13027
  }, /*#__PURE__*/React.createElement("div", {
12213
- ref: videoEmbed?.refSetter,
13028
+ ref: videoData?.videoFrame?.refSetter,
12214
13029
  className: classes.videoAspectWrap
12215
13030
  }, /*#__PURE__*/React.createElement(VideoPlayer, {
12216
- imageUrl: thumbnailUrl,
12217
- videoUrl: videoUrl,
13031
+ imageUrl: videoData?.videoFrame?.metadata?.thumbnail,
13032
+ videoUrl: videoData?.videoFrame?.metadata?.value,
12218
13033
  sectionIndex: sectionIndex
12219
- })), videoTitleOverlay?.metadata?.value && /*#__PURE__*/React.createElement("div", {
12220
- className: classes.videoTitleOverlay
12221
- }, /*#__PURE__*/React.createElement("span", {
12222
- ref: videoTitleOverlay?.refSetter,
12223
- dangerouslySetInnerHTML: {
12224
- __html: videoTitleOverlay.metadata.value
12225
- }
12226
- })), videoCaption?.metadata?.value && /*#__PURE__*/React.createElement("div", {
12227
- className: classes.videoCaption
12228
- }, /*#__PURE__*/React.createElement("p", {
12229
- ref: videoCaption?.refSetter,
12230
- dangerouslySetInnerHTML: {
12231
- __html: videoCaption.metadata.value
12232
- }
12233
- })), showWatchOnYouTube && /*#__PURE__*/React.createElement("div", {
12234
- className: classes.watchOnYouTubeWrap
12235
- }, /*#__PURE__*/React.createElement(Button, {
12236
- ref: watchOnYouTube?.refSetter,
12237
- data: {
12238
- ...watchOnYouTube.metadata,
12239
- isExternal: true
12240
- },
12241
- type: watchOnYouTube.metadata?.type || 'secondary',
12242
- size: "small"
12243
13034
  })))))));
12244
13035
  }
12245
13036
 
12246
- var index$2 = /*#__PURE__*/Object.freeze({
13037
+ var index$1 = /*#__PURE__*/Object.freeze({
12247
13038
  __proto__: null,
12248
13039
  'default': VideoWorkshopPromotion
12249
13040
  });
@@ -12876,157 +13667,9 @@ function CoursePromotionPagev2({
12876
13667
  }))));
12877
13668
  }
12878
13669
 
12879
- var index$1 = /*#__PURE__*/Object.freeze({
12880
- __proto__: null,
12881
- 'default': CoursePromotionPagev2
12882
- });
12883
-
12884
- const useCounterSectionStyles = createUseStyles(theme => {
12885
- return {
12886
- section: {
12887
- width: '100%',
12888
- borderRadius: theme.shape?.borderRadius?.regular || '12px',
12889
- overflow: 'hidden',
12890
- backgroundImage: ({
12891
- backgroundImage
12892
- } = {}) => backgroundImage ? `url("${backgroundImage}")` : 'none',
12893
- backgroundColor: ({
12894
- backgroundColor
12895
- } = {}) => backgroundColor || '#f8f8fa',
12896
- backgroundSize: 'cover',
12897
- backgroundPosition: 'center',
12898
- backgroundRepeat: 'no-repeat',
12899
- '&, & *, & *:before, & *:after': {
12900
- fontFamily: theme?.typography?.fontFamily,
12901
- boxSizing: 'border-box'
12902
- }
12903
- },
12904
- container: {
12905
- width: '100%',
12906
- maxWidth: ({
12907
- containerWidth
12908
- } = {}) => containerWidth || '1440px',
12909
- margin: '0 auto',
12910
- padding: ({
12911
- isMobile
12912
- } = {}) => isMobile ? `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px` : `${theme.spacing.padding.small}px ${theme.spacing.padding.medium}px`
12913
- },
12914
- grid: {
12915
- display: 'grid',
12916
- gridTemplateColumns: 'repeat(4, 1fr)',
12917
- gap: ({
12918
- isMobile
12919
- } = {}) => isMobile ? '24px' : '32px',
12920
- alignItems: 'stretch'
12921
- },
12922
- counterItem: {
12923
- display: 'flex',
12924
- flexDirection: 'column',
12925
- alignItems: 'center',
12926
- justifyContent: 'center',
12927
- textAlign: 'center'
12928
- },
12929
- value: {
12930
- margin: 0,
12931
- marginBottom: '8px',
12932
- fontSize: theme.typography.fontSize.h2,
12933
- fontWeight: theme.typography?.fontWeight?.bold,
12934
- lineHeight: 1.1,
12935
- color: theme.palette?.primary?.main || '#1976d2',
12936
- wordBreak: 'break-word'
12937
- },
12938
- description: {
12939
- margin: 0,
12940
- fontSize: theme.typography.fontSize.body,
12941
- lineHeight: 1.4,
12942
- color: theme.palette?.font?.primary || '#4a4a4a',
12943
- wordBreak: 'break-word'
12944
- },
12945
- '@media (max-width: 1024px)': {
12946
- grid: {
12947
- gridTemplateColumns: 'repeat(2, 1fr)',
12948
- gap: '28px'
12949
- }
12950
- },
12951
- '@media (max-width: 767px)': {
12952
- section: {
12953
- borderRadius: theme.shape?.borderRadius?.small || '8px'
12954
- },
12955
- container: {
12956
- padding: `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px`
12957
- },
12958
- grid: {
12959
- gridTemplateColumns: '1fr',
12960
- gap: '24px'
12961
- },
12962
- value: {
12963
- fontSize: theme.typography.fontSize.h3,
12964
- marginBottom: '4px',
12965
- lineHeight: 1.1
12966
- },
12967
- description: {
12968
- fontSize: theme.typography.fontSize.body,
12969
- lineHeight: 1.4
12970
- }
12971
- }
12972
- };
12973
- });
12974
-
12975
- function CounterSection({
12976
- sectionData,
12977
- sectionIndex
12978
- }) {
12979
- const {
12980
- layout: {
12981
- containerWidth
12982
- },
12983
- isMobile
12984
- } = useContext(PageContext);
12985
- console.log('llll', sectionData);
12986
- sectionData.components = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
12987
-
12988
- // console.log("llll",sectionData);
12989
-
12990
- const metadata = sectionData.metadata || {};
12991
- const backgroundImage = metadata.backgroundImage || '';
12992
- const backgroundColor = metadata.backgroundColor || '#f8f8fa';
12993
- const classes = useCounterSectionStyles({
12994
- containerWidth,
12995
- isMobile,
12996
- backgroundImage: backgroundImage || null,
12997
- backgroundColor
12998
- });
12999
- const [sectionComponent] = sectionData.components || [];
13000
- const counterSection = sectionComponent?.counterSection;
13001
- const counters = counterSection?.components || [];
13002
- if (!counters.length) return null;
13003
- return /*#__PURE__*/React.createElement("section", {
13004
- className: classes.section
13005
- }, /*#__PURE__*/React.createElement("div", {
13006
- className: classes.container
13007
- }, /*#__PURE__*/React.createElement("div", {
13008
- className: classes.grid
13009
- }, counters.map((item, index) => /*#__PURE__*/React.createElement("div", {
13010
- key: item._id || index,
13011
- className: classes.counterItem
13012
- }, item.value?.metadata?.value != null && item.value?.metadata?.value !== '' && /*#__PURE__*/React.createElement("h2", {
13013
- ref: item.value?.refSetter,
13014
- className: classes.value,
13015
- dangerouslySetInnerHTML: {
13016
- __html: item.value.metadata.value
13017
- }
13018
- }), item.description?.metadata?.value != null && item.description?.metadata?.value !== '' && /*#__PURE__*/React.createElement("p", {
13019
- ref: item.description?.refSetter,
13020
- className: classes.description,
13021
- dangerouslySetInnerHTML: {
13022
- __html: item.description.metadata.value
13023
- }
13024
- }))))));
13025
- }
13026
-
13027
13670
  var index = /*#__PURE__*/Object.freeze({
13028
13671
  __proto__: null,
13029
- 'default': CounterSection
13672
+ 'default': CoursePromotionPagev2
13030
13673
  });
13031
13674
 
13032
13675
  export { Icon, PageRenderer$1 as PageRenderer, PageRenderer as PageRendererStatic, componentParser, getTheme, inverseComponentParser };