@trafilea/afrodita-components 6.39.8 → 6.39.10

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.d.ts CHANGED
@@ -155,7 +155,7 @@ declare type Custom$1 = 'custom/atom' | 'custom/avatar_placeholder' | 'custom/br
155
155
  declare type Download$1 = 'download/apple_store' | 'download/google_play';
156
156
  declare type Emoji$1 = 'emoji/blowing_kiss' | 'emoji/frowning' | 'emoji/grinning' | 'emoji/grinning_with_sweat' | 'emoji/relieved' | 'emoji/smiling_v2' | 'emoji/smiling_v3' | 'emoji/thinking';
157
157
  declare type Messaging$1 = 'messaging/ada_chat' | 'messaging/comment' | 'messaging/comment_dots' | 'messaging/comment_light' | 'messaging/comment_money' | 'messaging/community' | 'messaging/light' | 'messaging/light_bulb' | 'messaging/light_bulb_solid' | 'messaging/mail' | 'messaging/messenger' | 'messaging/question_circle' | 'messaging/quote_left' | 'messaging/quote_right' | 'messaging/quote_solid_left' | 'messaging/quote_solid_right' | 'messaging/question_circle_light';
158
- declare type MyAccount$1 = 'myaccount/birthday_gifts' | 'myaccount/community' | 'myaccount/deals_offers' | 'myaccount/free_returns' | 'myaccount/free_shipping' | 'myaccount/guard' | 'myaccount/members_only_discount' | 'myaccount/members_only_discount_opposite' | 'myaccount/personal_stylist' | 'myaccount/priority_shipping' | 'myaccount/profile' | 'myaccount/place_image' | 'myaccount/sale_tag' | 'myaccount/style_fashion_content' | 'myaccount/cart' | 'myaccount/vip';
158
+ declare type MyAccount$1 = 'myaccount/birthday_gifts' | 'myaccount/community' | 'myaccount/deals_offers' | 'myaccount/free_returns' | 'myaccount/free_shipping' | 'myaccount/guard' | 'myaccount/members_only_discount' | 'myaccount/members_only_discount_opposite' | 'myaccount/personal_stylist' | 'myaccount/priority_shipping' | 'myaccount/profile' | 'myaccount/place_image' | 'myaccount/sale_tag' | 'myaccount/style_fashion_content' | 'myaccount/cart' | 'myaccount/vip' | 'myaccount/calendar';
159
159
  declare type Navigation$1 = 'navigation/address_information' | 'navigation/benefits' | 'navigation/club_membership' | 'navigation/ellipsis' | 'navigation/ellipsis_horizontal' | 'navigation/filters' | 'navigation/hamburger' | 'navigation/home' | 'navigation/home_solid' | 'navigation/loading' | 'navigation/lock' | 'navigation/lock_solid' | 'navigation/map_marker' | 'navigation/map_marker_light' | 'navigation/map_solid' | 'navigation/menu_lines' | 'navigation/search' | 'navigation/shaperbox' | 'navigation/shopping_bag' | 'navigation/shopping_bag_v2' | 'navigation/shopping_bag_v3' | 'navigation/shopping_bag_v4' | 'navigation/shopping_cart' | 'navigation/shopping_cart_v2' | 'navigation/slide_dot' | 'navigation/slide_dot_solid' | 'navigation/user' | 'navigation/address_information_light' | 'navigation/user_solid' | 'navigation/user_v2' | 'navigation/filters_v2' | 'navigation/gift';
160
160
  declare type Other$1 = 'other/bod_con_label' | 'other/bod_con_mobile_label' | 'other/call_us' | 'other/chat' | 'other/email' | 'other/express_shipping' | 'other/fit_guarantee' | 'other/fit_predictor' | 'other/free_exchange' | 'other/get_discount' | 'other/hassel_free_returns' | 'other/loading' | 'other/mc_afee' | 'other/play' | 'other/qr_code' | 'other/question_with_circle' | 'other/revel_beauty' | 'other/shapermint' | 'other/shapermint_club_icon' | 'other/shapermint_club_icon2' | 'other/shapermint_club_label' | 'other/shapermint_club_mobile_label' | 'other/shapermint_logo' | 'other/shm_club' | 'other/shop_now' | 'other/sign_form' | 'other/sixty_days_tsd' | 'other/the_bod_con' | 'other/the_spa_dr' | 'other/lock' | 'other/help_center' | 'other/coupons';
161
161
  declare type Payment$1 = 'payment/amazon' | 'payment/amex' | 'payment/jcb' | 'payment/klarna' | 'payment/master_card' | 'payment/paypal' | 'payment/visa' | 'payment/payment_methods';
@@ -720,6 +720,8 @@ declare namespace Messaging {
720
720
 
721
721
  declare const BirthdayGifts: IconComponent;
722
722
 
723
+ declare const Calendar: IconComponent;
724
+
723
725
  declare const Cart: IconComponent;
724
726
 
725
727
  declare const Community: IconComponent;
@@ -751,6 +753,7 @@ declare const StyleFashionContent: IconComponent;
751
753
  declare const VIP: IconComponent;
752
754
 
753
755
  declare const MyAccount_BirthdayGifts: typeof BirthdayGifts;
756
+ declare const MyAccount_Calendar: typeof Calendar;
754
757
  declare const MyAccount_Cart: typeof Cart;
755
758
  declare const MyAccount_Community: typeof Community;
756
759
  declare const MyAccount_DealsOffers: typeof DealsOffers;
@@ -769,6 +772,7 @@ declare const MyAccount_VIP: typeof VIP;
769
772
  declare namespace MyAccount {
770
773
  export {
771
774
  MyAccount_BirthdayGifts as BirthdayGifts,
775
+ MyAccount_Calendar as Calendar,
772
776
  MyAccount_Cart as Cart,
773
777
  MyAccount_Community as Community,
774
778
  MyAccount_DealsOffers as DealsOffers,
@@ -3370,8 +3374,9 @@ interface SizeSelectorProps {
3370
3374
  width?: string;
3371
3375
  hasSizeGuide?: boolean;
3372
3376
  sizeTipReferences?: SizeTip[];
3377
+ showExtendedSize?: boolean;
3373
3378
  }
3374
- declare const SizeSelector: ({ label, sizes, selectedValue, onChange, onClickSizeTip, inline, width, hasSizeGuide, sizeTipReferences, }: SizeSelectorProps) => _emotion_react_jsx_runtime.JSX.Element;
3379
+ declare const SizeSelector: ({ label, sizes, selectedValue, onChange, onClickSizeTip, inline, width, hasSizeGuide, sizeTipReferences, showExtendedSize, }: SizeSelectorProps) => _emotion_react_jsx_runtime.JSX.Element;
3375
3380
 
3376
3381
  interface SliderNavigationProps {
3377
3382
  children: JSX.Element | JSX.Element[] | StyledComponent<any>;
@@ -4340,6 +4340,8 @@ var Messaging = /*#__PURE__*/Object.freeze({
4340
4340
 
4341
4341
  var BirthdayGifts = function (props) { return (jsx$1(Icon$1, __assign$1({}, props, { name: "myaccount/birthday_gifts" }), void 0)); };
4342
4342
 
4343
+ var Calendar = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name: "myaccount/calendar" }), void 0); };
4344
+
4343
4345
  var Cart = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name: "myaccount/cart" }), void 0); };
4344
4346
 
4345
4347
  var Community = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name: "myaccount/community" }), void 0); };
@@ -4373,6 +4375,7 @@ var VIP = function (props) { return jsx$1(Icon$1, __assign$1({}, props, { name:
4373
4375
  var MyAccount = /*#__PURE__*/Object.freeze({
4374
4376
  __proto__: null,
4375
4377
  BirthdayGifts: BirthdayGifts,
4378
+ Calendar: Calendar,
4376
4379
  Cart: Cart,
4377
4380
  Community: Community,
4378
4381
  DealsOffers: DealsOffers,
@@ -19404,7 +19407,7 @@ var templateObject_1$E, templateObject_2$v;
19404
19407
 
19405
19408
  var SizeSelector = function (_a) {
19406
19409
  var _b;
19407
- var label = _a.label, sizes = _a.sizes, selectedValue = _a.selectedValue, onChange = _a.onChange, onClickSizeTip = _a.onClickSizeTip, _c = _a.inline, inline = _c === void 0 ? false : _c, width = _a.width, _d = _a.hasSizeGuide, hasSizeGuide = _d === void 0 ? false : _d, sizeTipReferences = _a.sizeTipReferences;
19410
+ var label = _a.label, sizes = _a.sizes, selectedValue = _a.selectedValue, onChange = _a.onChange, onClickSizeTip = _a.onClickSizeTip, _c = _a.inline, inline = _c === void 0 ? false : _c, width = _a.width, _d = _a.hasSizeGuide, hasSizeGuide = _d === void 0 ? false : _d, sizeTipReferences = _a.sizeTipReferences, _e = _a.showExtendedSize, showExtendedSize = _e === void 0 ? false : _e;
19408
19411
  var activeSizeTip = hasSizeGuide
19409
19412
  ? sizeTipReferences === null || sizeTipReferences === void 0 ? void 0 : sizeTipReferences.find(function (sizeTip) { return (sizeTip === null || sizeTip === void 0 ? void 0 : sizeTip.size) === (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.label); })
19410
19413
  : null;
@@ -19412,7 +19415,7 @@ var SizeSelector = function (_a) {
19412
19415
  display: 'flex',
19413
19416
  flexDirection: inline ? 'row' : 'column',
19414
19417
  alignItems: inline ? 'center' : 'start',
19415
- } }, { children: [jsxs(Text$7, __assign$1({ variant: "body", weight: "regular", size: "small", css: { alignSelf: inline ? 'start' : 'inherit', padding: inline ? '0.75rem 0' : '0' } }, { children: [label, !inline && (jsx(Text$7, __assign$1({ variant: "label", weight: "demi", size: "regular" }, { children: selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.description }), void 0))] }), void 0), hasSizeGuide && (jsxs(Row, __assign$1({ "data-testid": "sizing-tip" }, { children: [jsx(Icon.Actions.CircleInfo, { width: 1.2 }, void 0), jsx(Text$7, __assign$1({ variant: "body", weight: "demi", size: "small", css: { display: 'flex' } }, { children: "Sizing Tip:" }), void 0), jsx(Text$7, __assign$1({ variant: "body", weight: "regular", size: "small" }, { children: activeSizeTip === null || activeSizeTip === void 0 ? void 0 : activeSizeTip.tip }), void 0), onClickSizeTip && (jsx(SizeFitGuide, { hideIcon: true, onClick: onClickSizeTip, title: (_b = activeSizeTip === null || activeSizeTip === void 0 ? void 0 : activeSizeTip.cta) !== null && _b !== void 0 ? _b : 'Size and Fit Guide' }, void 0))] }), void 0)), jsx(ButtonsContainer, __assign$1({ inline: inline }, { children: sizes === null || sizes === void 0 ? void 0 : sizes.map(function (size) {
19418
+ } }, { children: [jsxs(Text$7, __assign$1({ variant: "body", weight: "regular", size: "small", css: { alignSelf: inline ? 'start' : 'inherit', padding: inline ? '0.75rem 0' : '0' } }, { children: [label, !inline && !showExtendedSize && (jsx(Text$7, __assign$1({ variant: "label", weight: "demi", size: "regular" }, { children: selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.description }), void 0))] }), void 0), hasSizeGuide && (jsxs(Row, __assign$1({ "data-testid": "sizing-tip" }, { children: [jsx(Icon.Actions.CircleInfo, { width: 1.2 }, void 0), jsx(Text$7, __assign$1({ variant: "body", weight: "demi", size: "small", css: { display: 'flex' } }, { children: "Sizing Tip:" }), void 0), jsx(Text$7, __assign$1({ variant: "body", weight: "regular", size: "small" }, { children: activeSizeTip === null || activeSizeTip === void 0 ? void 0 : activeSizeTip.tip }), void 0), onClickSizeTip && (jsx(SizeFitGuide, { hideIcon: true, onClick: onClickSizeTip, title: (_b = activeSizeTip === null || activeSizeTip === void 0 ? void 0 : activeSizeTip.cta) !== null && _b !== void 0 ? _b : 'Size and Fit Guide' }, void 0))] }), void 0)), jsx(ButtonsContainer, __assign$1({ inline: inline }, { children: sizes === null || sizes === void 0 ? void 0 : sizes.map(function (size) {
19416
19419
  var active = !size.disabled && size.label === selectedValue.label;
19417
19420
  return (jsx(SelectorSecondary, { css: {
19418
19421
  padding: '0.75rem 1rem 0.625rem',
@@ -20515,6 +20518,26 @@ function usePreventVerticalScroll(ref, dragThreshold) {
20515
20518
  }, [preventTouch, ref, touchStart]);
20516
20519
  }
20517
20520
 
20521
+ var sendCommandToIframe = function (command, elementId) {
20522
+ if (elementId === void 0) { elementId = 'vwo-video'; }
20523
+ var iframe = document.getElementById(elementId);
20524
+ var origin = new URL(iframe === null || iframe === void 0 ? void 0 : iframe.src).origin;
20525
+ // TODO: Add verification to only allow specific origins
20526
+ // const allowedOrigins = ['https://youtube.com'];
20527
+ // if (!allowedOrigins.includes(origin)) return;
20528
+ (iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) &&
20529
+ iframe.contentWindow.postMessage(JSON.stringify({
20530
+ event: 'command',
20531
+ func: command,
20532
+ }), origin);
20533
+ };
20534
+ var stopVideoCommand = function () {
20535
+ sendCommandToIframe('stopVideo');
20536
+ };
20537
+ var playVideoCommand = function () {
20538
+ sendCommandToIframe('playVideo');
20539
+ };
20540
+
20518
20541
  var Container$g = newStyled.div(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n ", "\n position: relative;\n max-height: 524px;\n overflow: hidden;\n & .slick-dots li.slick-active button:before {\n background-color: ", ";\n }\n"], ["\n ", "\n position: relative;\n max-height: 524px;\n overflow: hidden;\n & .slick-dots li.slick-active button:before {\n background-color: ", ";\n }\n"])), function (_a) {
20519
20542
  var borderRadiusVariant = _a.borderRadiusVariant;
20520
20543
  return borderRadiusVariant &&
@@ -20523,7 +20546,6 @@ var Container$g = newStyled.div(templateObject_1$i || (templateObject_1$i = __ma
20523
20546
  var theme = _a.theme;
20524
20547
  return theme.component.slideNavigation.slideDots.selectedDotColor;
20525
20548
  });
20526
- // max-height: 31.875rem;
20527
20549
  var TopTagContainer$4 = newStyled.div(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n position: absolute;\n left: ", ";\n top: ", ";\n"], ["\n position: absolute;\n left: ", ";\n top: ", ";\n"])), function (props) { return (props.borderRadiusVariant ? '13px' : '0'); }, function (props) { return (props.borderRadiusVariant ? '11px' : '0'); });
20528
20550
  var TopRightTagContainer$1 = newStyled.div(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n"], ["\n position: absolute;\n right: 0;\n top: 0;\n"])));
20529
20551
  var BottomTagContainer$4 = newStyled.div(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"], ["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"])));
@@ -20553,28 +20575,29 @@ var ImageProductSlide = function (_a) {
20553
20575
  var contents = _a.contents, _b = _a.customClick, customClick = _b === void 0 ? false : _b, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, testId = _a.testId, borderRadiusVariant = _a.borderRadiusVariant, selectedValue = _a.selectedValue, onChange = _a.onChange, _c = _a.itemsOnViewport, itemsOnViewport = _c === void 0 ? 0 : _c;
20554
20576
  var slick = useRef(null);
20555
20577
  var sliderWrapper = useRef(null);
20556
- useRef(null);
20557
20578
  var _d = useState(false); _d[0]; var setIsPlaying = _d[1];
20558
20579
  usePreventVerticalScroll(sliderWrapper);
20559
20580
  var onButtonClick = useCallback(function (i) {
20560
20581
  var _a;
20561
20582
  (_a = slick.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(i);
20562
20583
  }, [slick]);
20563
- var _sendCommandToIframe = function (command) {
20564
- var iframe = document.getElementById('vwo-video');
20565
- (iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) &&
20566
- iframe.contentWindow.postMessage(JSON.stringify({
20567
- event: 'command',
20568
- func: command,
20569
- }), '*');
20570
- };
20571
- var _stopVideo = function () {
20572
- _sendCommandToIframe('stopVideo');
20573
- setIsPlaying(false);
20584
+ var stopVideo = function () {
20585
+ stopVideoCommand();
20586
+ setIsPlaying(function (prevIsPlaying) {
20587
+ if (prevIsPlaying) {
20588
+ return !prevIsPlaying;
20589
+ }
20590
+ return prevIsPlaying;
20591
+ });
20574
20592
  };
20575
- var _playVideo = function () {
20576
- _sendCommandToIframe('playVideo');
20577
- setIsPlaying(true);
20593
+ var playVideo = function () {
20594
+ playVideoCommand();
20595
+ setIsPlaying(function (prevIsPlaying) {
20596
+ if (!prevIsPlaying) {
20597
+ return prevIsPlaying;
20598
+ }
20599
+ return !prevIsPlaying;
20600
+ });
20578
20601
  };
20579
20602
  useEffect(function () {
20580
20603
  var _a;
@@ -20590,7 +20613,7 @@ var ImageProductSlide = function (_a) {
20590
20613
  var activeSlide = contents[e];
20591
20614
  // If autoplay is true and iframe is the active slide, play the video
20592
20615
  var autoplay = (_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.url) === null || _a === void 0 ? void 0 : _a.includes('autoplay=1');
20593
- autoplay ? _playVideo() : _stopVideo();
20616
+ autoplay ? playVideo() : stopVideo();
20594
20617
  onChange === null || onChange === void 0 ? void 0 : onChange(e);
20595
20618
  } }, settings$3, { nextArrow: jsx$1(NavButtonContainer$3, { children: jsx$1(Button$4, { children: jsx$1(Icon.Arrows.ChevronRight, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), prevArrow: jsx$1(NavButtonContainer$3, { children: jsx$1(Button$4, { children: jsx$1(Icon.Arrows.ChevronLeft, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), ref: slick }, { children: contents.map(function (content, idx) {
20596
20619
  var _a;
@@ -20963,7 +20986,6 @@ var Container$b = newStyled.div(templateObject_1$b || (templateObject_1$b = __ma
20963
20986
  var theme = _a.theme;
20964
20987
  return theme.component.slideNavigation.slideDots.selectedDotColor;
20965
20988
  });
20966
- // max-height: 31.875rem;
20967
20989
  var TopTagContainer$2 = newStyled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n position: absolute;\n left: ", ";\n top: ", ";\n"], ["\n position: absolute;\n left: ", ";\n top: ", ";\n"])), function (props) { return (props.borderRadiusVariant ? '13px' : '0'); }, function (props) { return (props.borderRadiusVariant ? '11px' : '0'); });
20968
20990
  var BottomTagContainer$2 = newStyled.div(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"], ["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"])));
20969
20991
  var VideoOverlay = newStyled.div(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n content: '';\n background: transparent;\n width: 100%;\n height: 100%;\n min-height: 1px;\n position: absolute;\n top: 0;\n"], ["\n content: '';\n background: transparent;\n width: 100%;\n height: 100%;\n min-height: 1px;\n position: absolute;\n top: 0;\n"])));
@@ -20991,21 +21013,23 @@ var ImageProductSlideV3 = function (_a) {
20991
21013
  var _a;
20992
21014
  (_a = slick.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(i);
20993
21015
  }, [slick]);
20994
- var _sendCommandToIframe = function (command) {
20995
- var iframe = document.getElementById('vwo-video');
20996
- (iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) &&
20997
- iframe.contentWindow.postMessage(JSON.stringify({
20998
- event: 'command',
20999
- func: command,
21000
- }), '*');
21001
- };
21002
- var _stopVideo = function () {
21003
- _sendCommandToIframe('stopVideo');
21004
- setIsPlaying(false);
21016
+ var stopVideo = function () {
21017
+ stopVideoCommand();
21018
+ setIsPlaying(function (prevIsPlaying) {
21019
+ if (prevIsPlaying) {
21020
+ return !prevIsPlaying;
21021
+ }
21022
+ return prevIsPlaying;
21023
+ });
21005
21024
  };
21006
- var _playVideo = function () {
21007
- _sendCommandToIframe('playVideo');
21008
- setIsPlaying(true);
21025
+ var playVideo = function () {
21026
+ playVideoCommand();
21027
+ setIsPlaying(function (prevIsPlaying) {
21028
+ if (!prevIsPlaying) {
21029
+ return prevIsPlaying;
21030
+ }
21031
+ return !prevIsPlaying;
21032
+ });
21009
21033
  };
21010
21034
  useEffect(function () {
21011
21035
  var _a;
@@ -21021,11 +21045,11 @@ var ImageProductSlideV3 = function (_a) {
21021
21045
  var activeSlide = images[e];
21022
21046
  // If autoplay is true and iframe is the active slide, play the video
21023
21047
  var autoplay = (_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.url) === null || _a === void 0 ? void 0 : _a.includes('autoplay=1');
21024
- autoplay ? _playVideo() : _stopVideo();
21048
+ autoplay ? playVideo() : stopVideo();
21025
21049
  } }, settings$2, { nextArrow: jsx$1(NavButtonContainer$2, { children: jsx$1(Button$2, { children: jsx$1(Icon.Arrows.ChevronRight, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), prevArrow: jsx$1(NavButtonContainer$2, { children: jsx$1(Button$2, { children: jsx$1(Icon.Arrows.ChevronLeft, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), ref: slick }, { children: images.map(function (image) {
21026
21050
  var _a, _b;
21027
21051
  return (jsxs$1("div", { children: [!((_a = image === null || image === void 0 ? void 0 : image.alt) === null || _a === void 0 ? void 0 : _a.includes('-video')) && (jsxs$1(Fragment$2, { children: [jsx$1(InnerImageZoom, { src: image.url, zoomSrc: image.url, zoomType: "hover", imgAttributes: { alt: image.alt, width: '100%', height: '510px' }, height: 510, fullscreenOnMobile: true, className: "zoomWrapper" }, void 0), jsx$1(TopTagContainer$2, __assign$1({ borderRadiusVariant: borderRadiusVariant, "data-testid": "topTag" }, { children: topTag }), void 0), jsx$1(BottomTagContainer$2, __assign$1({ "data-testid": "bottomTag" }, { children: bottomTag }), void 0)] }, void 0)), ((_b = image === null || image === void 0 ? void 0 : image.alt) === null || _b === void 0 ? void 0 : _b.includes('-video')) && (jsxs$1(Video, { children: [jsx$1("iframe", { id: "vwo-video", ref: iframeRef, allowFullScreen: true, title: image.alt, width: "100%", height: "220px", src: image === null || image === void 0 ? void 0 : image.url, allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" }, void 0), jsx$1(VideoOverlay, { onClick: function () {
21028
- isPlaying ? _stopVideo() : _playVideo();
21052
+ isPlaying ? stopVideo() : playVideo();
21029
21053
  } }, void 0), jsxs$1(VideoTag, { children: [jsx$1(Icon.PDP.PlayMini, { width: 1.5 }, void 0), jsx$1(Text, { children: "VIDEO" }, void 0)] }, void 0)] }, void 0))] }, image.key));
21030
21054
  }) }), void 0) }), void 0)] }, void 0));
21031
21055
  };
@@ -21038,21 +21062,6 @@ var ProductGalleryMobileV3 = function (_a) {
21038
21062
  };
21039
21063
  var templateObject_1$a;
21040
21064
 
21041
- var _sendCommandToIframe = function (command) {
21042
- var iframe = document.getElementById('vwo-video');
21043
- (iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) &&
21044
- iframe.contentWindow.postMessage(JSON.stringify({
21045
- event: 'command',
21046
- func: command,
21047
- }), '*' + '');
21048
- };
21049
- var _stopVideo = function () {
21050
- _sendCommandToIframe('stopVideo');
21051
- };
21052
- var _playVideo = function () {
21053
- _sendCommandToIframe('playVideo');
21054
- };
21055
-
21056
21065
  function closeZoom() {
21057
21066
  var closeButton = document.querySelectorAll('.iiz__btn.iiz__close.iiz__close--visible')[0];
21058
21067
  if (closeButton) {
@@ -21066,7 +21075,7 @@ var afterChangeSlide = function (_a) {
21066
21075
  var activeSlide = contents[slide];
21067
21076
  // If autoplay is true and iframe is the active slide, play the video
21068
21077
  var autoplay = (_b = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.url) === null || _b === void 0 ? void 0 : _b.includes('autoplay=1');
21069
- autoplay ? _playVideo() : _stopVideo();
21078
+ autoplay ? playVideoCommand() : stopVideoCommand();
21070
21079
  setSelectedImageIndex(Math.round(slide));
21071
21080
  onChange === null || onChange === void 0 ? void 0 : onChange(slide);
21072
21081
  closeZoom();