@cleartrip/ct-platform-top-offers 3.0.0-beta.34 → 3.0.0-beta.36

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.
@@ -1,4 +1,4 @@
1
1
  import { IBaseItemProps, ITopOffersProps } from './TopOffers.types';
2
- declare const TopOffers: <T extends IBaseItemProps = IBaseItemProps>({ lazyWidget, eligibleUserType, widgetData, getSlideStyles, }: ITopOffersProps<T>) => import("react/jsx-runtime").JSX.Element;
2
+ declare const TopOffers: <T extends IBaseItemProps = IBaseItemProps>({ lazyWidget, eligibleUserType, isLoadingOffers, widgetData, getSlideStyles, ravenPayload, }: ITopOffersProps<T>) => import("react/jsx-runtime").JSX.Element;
3
3
  export default TopOffers;
4
4
  //# sourceMappingURL=TopOffers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopOffers.d.ts","sourceRoot":"","sources":["../packages/components/TopOffers/src/TopOffers.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpE,QAAA,MAAM,SAAS,2KA+Id,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TopOffers.d.ts","sourceRoot":"","sources":["../packages/components/TopOffers/src/TopOffers.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpE,QAAA,MAAM,SAAS,0MA0Kd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -16,7 +16,9 @@ export interface ITopOffersData<T extends IBaseItemProps> {
16
16
  export interface ITopOffersProps<T extends IBaseItemProps = IBaseItemProps> {
17
17
  lazyWidget: boolean;
18
18
  eligibleUserType?: string;
19
+ isLoadingOffers?: boolean;
19
20
  widgetData: ITopOffersData<T>;
20
21
  getSlideStyles?: (slide: any) => CSSProperties;
22
+ ravenPayload?: Record<string, unknown>;
21
23
  }
22
24
  //# sourceMappingURL=TopOffers.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopOffers.types.d.ts","sourceRoot":"","sources":["../packages/components/TopOffers/src/TopOffers.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEjD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,cAAc;IACrD,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;CACf;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,cAAc;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACtE,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,aAAa,CAAC;CAClD"}
1
+ {"version":3,"file":"TopOffers.types.d.ts","sourceRoot":"","sources":["../packages/components/TopOffers/src/TopOffers.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEjD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,cAAc;IACrD,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;CACf;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,cAAc;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACtE,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,aAAa,CAAC;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),o=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-platform-merch-carousel"),t=require("@cleartrip/ct-platform-pill-carousel"),l=require("@cleartrip/ct-platform-utils"),A=require("@cleartrip/ct-platform-assets");var a="index-module_top-offers__container__Z747x",d="index-module_top-offers__header__hIxia";!function(e,i){void 0===i&&(i={});var n=i.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('@font-face{font-family:swiper-icons;font-style:normal;font-weight:400;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8j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RbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff")}:root{--swiper-theme-color:#007aff}.index-module_swiper-container__3KSgl{list-style:none;margin-left:auto;margin-right:auto;overflow:hidden;padding:0;position:relative;z-index:1}.index-module_swiper-container-vertical__-qoi0>.index-module_swiper-wrapper__xTq01{flex-direction:column}.index-module_swiper-wrapper__xTq01{box-sizing:content-box;display:flex;height:100%;position:relative;transition-property:transform;width:100%;z-index:1}.index-module_swiper-container-android__ALUNh .index-module_swiper-slide__Zchn0,.index-module_swiper-wrapper__xTq01{transform:translateZ(0)}.index-module_swiper-container-multirow__XQ6jv>.index-module_swiper-wrapper__xTq01{flex-wrap:wrap}.index-module_swiper-container-multirow-column__pF8z->.index-module_swiper-wrapper__xTq01{flex-direction:column;flex-wrap:wrap}.index-module_swiper-container-free-mode__wWVcG>.index-module_swiper-wrapper__xTq01{margin:0 auto;transition-timing-function:ease-out}.index-module_swiper-container-pointer-events__UnxWm{touch-action:pan-y}.index-module_swiper-container-pointer-events__UnxWm.index-module_swiper-container-vertical__-qoi0{touch-action:pan-x}.index-module_swiper-slide__Zchn0{flex-shrink:0;height:100%;position:relative;transition-property:transform;width:100%}.index-module_swiper-slide-invisible-blank__FdKYe{visibility:hidden}.index-module_swiper-container-autoheight__ag5Qv,.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-wrapper__xTq01{align-items:flex-start;transition-property:transform,height}.index-module_swiper-container-3d__utVhl{perspective:1200px}.index-module_swiper-container-3d__utVhl .index-module_swiper-cube-shadow__5Bd--,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide__Zchn0,.index-module_swiper-container-3d__utVhl .index-module_swiper-wrapper__xTq01{transform-style:preserve-3d}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:10}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea{background-image:linear-gradient(270deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3{background-image:linear-gradient(90deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF{background-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{-ms-overflow-style:none;overflow:auto;scrollbar-width:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01::-webkit-scrollbar{display:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01>.index-module_swiper-slide__Zchn0{scroll-snap-align:start start}.index-module_swiper-container-horizontal__yvB5j.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:x mandatory}.index-module_swiper-container-vertical__-qoi0.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:y mandatory}.index-module_top-offers__container__Z747x{align-items:flex-start;background:linear-gradient(180deg,#e4edff,#f7faff);display:flex;flex-direction:column;gap:16px;padding:16px 0 24px}.index-module_top-offers__header__hIxia{font-feature-settings:"dlig" on,"clig" off,"liga" off;font-style:normal;padding-left:16px}');var s=[{text:"For you",imageUrl:A.ForYouPill,value:"forYou"},{text:"Bank",imageUrl:A.BankPill,value:"bank"},{text:"Flights",imageUrl:A.FlightPill,value:"flights"},{text:"Hotels",imageUrl:A.HotelPill,value:"hotels"},{text:"Buses",imageUrl:A.BusPill,value:"buses"},{text:"Trains",imageUrl:A.TrainPill,value:"trains"}];exports.TopOffers=function(A){var _=A.lazyWidget,u=A.eligibleUserType,p=A.widgetData,c=A.getSlideStyles,g=n.useState(""),m=g[0],w=g[1],x=n.useState([]),h=x[0],f=x[1],v=n.useState([]),B=v[0],y=v[1];n.useEffect((function(){if(p){var e=s.filter((function(e){var i;return(null===(i=null==p?void 0:p[e.value])||void 0===i?void 0:i.items.length)>0}));u&&(e=e.filter((function(e){var i;return(null===(i=null==p?void 0:p[e.value])||void 0===i?void 0:i.items.filter((function(e){return!(null==e?void 0:e.userType)||e.userType===u}))).length>0}))),e.length&&(y(e),w(e[0].value))}}),[]),n.useEffect((function(){var e;if(m){var i=(null===(e=null==p?void 0:p[m])||void 0===e?void 0:e.items)||[];u&&(i=i.filter((function(e){return!(null==e?void 0:e.userType)||e.userType===u}))),f(i)}}),[m]);var Y=n.useCallback((function(e){w(e.value)}),[]),C=n.useCallback((function(e){var i,n,o,r;console.log(e),l.ravenSDKTrigger("u_ui_action",{action_name:"top_offers_widget_click",page_name:"unified_homepage",action_type:"click",personalised_callout:e,u_utm_source:(null===(i=null===location||void 0===location?void 0:location.search)||void 0===i?void 0:i.split("utm_source=").length)>1?null===(r=null===(o=null===(n=null===location||void 0===location?void 0:location.search)||void 0===n?void 0:n.split("utm_source="))||void 0===o?void 0:o.pop())||void 0===r?void 0:r.split("&")[0]:"organic",ab_variant:"uhp_enabled",new_user_flag:""})}),[]),E=n.useCallback((function(e){var i,n,o,r;console.log(e),l.ravenSDKTrigger("u_impression",{action_name:"top_offers_card_impression",page_name:"unified_homepage",personalised_callout:e,u_utm_source:(null===(i=null===location||void 0===location?void 0:location.search)||void 0===i?void 0:i.split("utm_source=").length)>1?null===(r=null===(o=null===(n=null===location||void 0===location?void 0:location.search)||void 0===n?void 0:n.split("utm_source="))||void 0===o?void 0:o.pop())||void 0===r?void 0:r.split("&")[0]:"organic",ab_variant:"uhp_enabled",new_user_flag:""})}),[]);return i.jsx(i.Fragment,{children:m&&i.jsxs("div",e.__assign({className:a},{children:[i.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.HM3,className:d},{children:(null==p?void 0:p.title)||"Top offers"})),i.jsx(t.PillCarousel,{carouselType:t.CarouselType.PILL_CHIP,carouselData:B,onItemClick:function(e){return Y(e)},styleConfig:{carouselStyleConfig:{paddingLeft:"16px",paddingRight:"16px"}}}),i.jsx("div",e.__assign({style:{width:"100%",marginTop:"8px"}},{children:i.jsx(r.MerchCarousel,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!0,isLoopAdditionalSlides:!0,lazyLoad:!0,lazyWidget:_,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:0,slidesToDisplay:null==p?void 0:p.slidesToDisplay,slides:h,getSlideStyles:c,onItemClick:C,onItemImpression:E},m)}))]}))})};
1
+ "use strict";var e=require("tslib"),i=require("react/jsx-runtime"),o=require("react"),n=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-platform-merch-carousel"),t=require("@cleartrip/ct-platform-pill-carousel"),l=require("@cleartrip/ct-platform-utils"),a=require("@cleartrip/ct-platform-assets");var d="index-module_top-offers__container__Z747x",A="index-module_top-offers__header__hIxia";!function(e,i){void 0===i&&(i={});var o=i.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('@font-face{font-family:swiper-icons;font-style:normal;font-weight:400;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExc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iBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff")}:root{--swiper-theme-color:#007aff}.index-module_swiper-container__3KSgl{list-style:none;margin-left:auto;margin-right:auto;overflow:hidden;padding:0;position:relative;z-index:1}.index-module_swiper-container-vertical__-qoi0>.index-module_swiper-wrapper__xTq01{flex-direction:column}.index-module_swiper-wrapper__xTq01{box-sizing:content-box;display:flex;height:100%;position:relative;transition-property:transform;width:100%;z-index:1}.index-module_swiper-container-android__ALUNh .index-module_swiper-slide__Zchn0,.index-module_swiper-wrapper__xTq01{transform:translateZ(0)}.index-module_swiper-container-multirow__XQ6jv>.index-module_swiper-wrapper__xTq01{flex-wrap:wrap}.index-module_swiper-container-multirow-column__pF8z->.index-module_swiper-wrapper__xTq01{flex-direction:column;flex-wrap:wrap}.index-module_swiper-container-free-mode__wWVcG>.index-module_swiper-wrapper__xTq01{margin:0 auto;transition-timing-function:ease-out}.index-module_swiper-container-pointer-events__UnxWm{touch-action:pan-y}.index-module_swiper-container-pointer-events__UnxWm.index-module_swiper-container-vertical__-qoi0{touch-action:pan-x}.index-module_swiper-slide__Zchn0{flex-shrink:0;height:100%;position:relative;transition-property:transform;width:100%}.index-module_swiper-slide-invisible-blank__FdKYe{visibility:hidden}.index-module_swiper-container-autoheight__ag5Qv,.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-wrapper__xTq01{align-items:flex-start;transition-property:transform,height}.index-module_swiper-container-3d__utVhl{perspective:1200px}.index-module_swiper-container-3d__utVhl .index-module_swiper-cube-shadow__5Bd--,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide__Zchn0,.index-module_swiper-container-3d__utVhl .index-module_swiper-wrapper__xTq01{transform-style:preserve-3d}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:10}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea{background-image:linear-gradient(270deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3{background-image:linear-gradient(90deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF{background-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{-ms-overflow-style:none;overflow:auto;scrollbar-width:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01::-webkit-scrollbar{display:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01>.index-module_swiper-slide__Zchn0{scroll-snap-align:start start}.index-module_swiper-container-horizontal__yvB5j.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:x mandatory}.index-module_swiper-container-vertical__-qoi0.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:y mandatory}.index-module_top-offers__container__Z747x{align-items:flex-start;background:linear-gradient(180deg,#e4edff,#f7faff);display:flex;flex-direction:column;gap:16px;padding:16px 0 24px}.index-module_top-offers__header__hIxia{font-feature-settings:"dlig" on,"clig" off,"liga" off;font-style:normal;padding-left:16px}');var s=[{text:"For you",imageUrl:a.ForYouPill,value:"forYou"},{text:"Bank",imageUrl:a.BankPill,value:"bank"},{text:"Flights",imageUrl:a.FlightPill,value:"flights"},{text:"Hotels",imageUrl:a.HotelPill,value:"hotels"},{text:"Buses",imageUrl:a.BusPill,value:"buses"},{text:"Trains",imageUrl:a.TrainPill,value:"trains"}];exports.TopOffers=function(a){var u=a.lazyWidget,_=a.eligibleUserType,p=a.isLoadingOffers,c=a.widgetData,g=a.getSlideStyles,m=a.ravenPayload,w=o.useState(""),x=w[0],h=w[1],f=o.useState([]),v=f[0],B=f[1],y=o.useState([]),Y=y[0],C=y[1];o.useEffect((function(){var i,o,n,r;if(c){var t=s.filter((function(e){var i;return(null===(i=null==c?void 0:c[e.value])||void 0===i?void 0:i.items.length)>0}));_&&(t=t.filter((function(e){var i;return(null===(i=null==c?void 0:c[e.value])||void 0===i?void 0:i.items.filter((function(e){return!(null==e?void 0:e.userType)||e.userType===_}))).length>0}))),t.length&&(C(t),h(t[0].value),l.ravenSDKTrigger("u_impression",e.__assign({action_name:"top_offers_widget_impression",page_name:"unified_homepage",u_utm_source:(null===(i=null===location||void 0===location?void 0:location.search)||void 0===i?void 0:i.split("utm_source=").length)>1?null===(r=null===(n=null===(o=null===location||void 0===location?void 0:location.search)||void 0===o?void 0:o.split("utm_source="))||void 0===n?void 0:n.pop())||void 0===r?void 0:r.split("&")[0]:"organic"},m)))}}),[]),o.useEffect((function(){var e;if(x){var i=(null===(e=null==c?void 0:c[x])||void 0===e?void 0:e.items)||[];_&&(i=i.filter((function(e){return!(null==e?void 0:e.userType)||e.userType===_}))),B(i)}}),[x]);var E=o.useCallback((function(e){h(e.value)}),[]),G=o.useCallback((function(i,o,n){var r,t,a,d,A;l.ravenSDKTrigger("u_ui_action",e.__assign({action_name:"top_offers_card_click",page_name:"unified_homepage",action_type:"click",u_utm_source:(null===(r=null===location||void 0===location?void 0:location.search)||void 0===r?void 0:r.split("utm_source=").length)>1?null===(d=null===(a=null===(t=null===location||void 0===location?void 0:location.search)||void 0===t?void 0:t.split("utm_source="))||void 0===a?void 0:a.pop())||void 0===d?void 0:d.split("&")[0]:"organic",slot_id:i,url:null===(A=null==o?void 0:o.split("/"))||void 0===A?void 0:A.pop(),percent_scroll:n,offer_type:x},m))}),[x]),T=o.useCallback((function(i,o,n){var r,t,a,d,A;l.ravenSDKTrigger("u_impression",e.__assign({action_name:"top_offers_card_impression",page_name:"unified_homepage",u_utm_source:(null===(r=null===location||void 0===location?void 0:location.search)||void 0===r?void 0:r.split("utm_source=").length)>1?null===(d=null===(a=null===(t=null===location||void 0===location?void 0:location.search)||void 0===t?void 0:t.split("utm_source="))||void 0===a?void 0:a.pop())||void 0===d?void 0:d.split("&")[0]:"organic",slot_id:i,url:null===(A=null==o?void 0:o.split("/"))||void 0===A?void 0:A.pop(),percent_scroll:n},m))}),[]);return i.jsx(i.Fragment,{children:x&&i.jsxs("div",e.__assign({className:d},{children:[i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.HM3,className:A},{children:(null==c?void 0:c.title)||"Top offers"})),i.jsx(t.PillCarousel,{carouselType:t.CarouselType.PILL_CHIP,carouselData:Y,onItemClick:function(e){return E(e)},styleConfig:{carouselStyleConfig:{paddingLeft:"16px",paddingRight:"16px"}}}),i.jsx("div",e.__assign({style:{width:"100%",marginTop:"8px"}},{children:i.jsx(r.MerchCarousel,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!0,lazyLoad:!0,lazyWidget:u,isLoading:p,isLoopAdditionalSlides:!u,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:0,slidesToDisplay:null==c?void 0:c.slidesToDisplay,slides:v,getSlideStyles:g,onItemClick:function(e,i,o){return G(e,i,o)},onItemImpression:function(e,i,o){return T(e,i,o)}},x)}))]}))})};
2
2
  //# sourceMappingURL=ct-platform-top-offers.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-top-offers.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TopOffers/src/constants.ts","../packages/components/TopOffers/src/TopOffers.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","PILL_CAROUSEL_CONFIG","text","imageUrl","ForYouPill","value","BankPill","FlightPill","HotelPill","BusPill","TrainPill","_a","lazyWidget","eligibleUserType","widgetData","getSlideStyles","_b","useState","selectedFilter","setSelectedFilter","_c","filteredSlides","setFilteredSlides","_d","pillCarouselConfig","setPillCarouselConfig","useEffect","availableFilters","filter","data","items","length","item","userType","slidesByUserType","handleFilterClick","useCallback","handleItemClick","itemId","console","log","ravenSDKTrigger","action_name","page_name","action_type","personalised_callout","u_utm_source","location","search","split","pop","ab_variant","new_user_flag","handleItemImpression","_jsx","_Fragment","children","_jsxs","__assign","className","styles","Typography","variant","TypographyVariant","HM3","title","jsx","PillCarousel","carouselType","CarouselType","PILL_CHIP","carouselData","onItemClick","styleConfig","carouselStyleConfig","paddingLeft","paddingRight","width","marginTop","MerchCarousel","isFreeSwipe","isCentered","isInfinite","isAutoplay","isLoopAdditionalSlides","lazyLoad","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","slides","onItemImpression"],"mappings":"2ZAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,+hNChBO,IAEMe,EAAuB,CAChC,CACIC,KAAM,UACNC,SAAUC,EAAUA,WACpBC,MAAO,UAEX,CACIH,KAAM,OACNC,SAAUG,EAAQA,SAClBD,MAAO,QAEX,CACIH,KAAM,UACNC,SAAUI,EAAUA,WACpBF,MAAO,WAEX,CACIH,KAAM,SACNC,SAAUK,EAASA,UACnBH,MAAO,UAEX,CACIH,KAAM,QACNC,SAAUM,EAAOA,QACjBJ,MAAO,SAEX,CACIH,KAAM,SACNC,SAAUO,EAASA,UACnBL,MAAO,6BCxBG,SAA4CM,OAC1DC,EAAUD,EAAAC,WACVC,EAAgBF,EAAAE,iBAChBC,EAAUH,EAAAG,WACVC,EAAcJ,EAAAI,eAERC,EAAsCC,EAAAA,SAAiB,IAAtDC,EAAcF,EAAA,GAAEG,EAAiBH,EAAA,GAClCI,EAAsCH,EAAAA,SAAc,IAAnDI,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAClCG,EAA8CN,EAAAA,SAChD,IADGO,EAAkBD,EAAA,GAAEE,EAAqBF,EAAA,GAIhDG,EAAAA,WAAU,WACN,GAAIZ,EAAY,C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BAAiB5E,aAAA,EAAAA,EAAY4E,gBAC7BC,OAAQtE,EACRN,eAAgBA,EAChByD,YAAanC,EACbuD,iBAAkBvC,GAhBbnC,WAuBjC","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-top-offers.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TopOffers/src/constants.ts","../packages/components/TopOffers/src/TopOffers.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","PILL_CAROUSEL_CONFIG","text","imageUrl","ForYouPill","value","BankPill","FlightPill","HotelPill","BusPill","TrainPill","_a","lazyWidget","eligibleUserType","isLoadingOffers","widgetData","getSlideStyles","ravenPayload","_b","useState","selectedFilter","setSelectedFilter","_c","filteredSlides","setFilteredSlides","_d","pillCarouselConfig","setPillCarouselConfig","useEffect","availableFilters","filter","data","items","length","item","userType","ravenSDKTrigger","__assign","action_name","page_name","u_utm_source","location","search","split","pop","slidesByUserType","handleFilterClick","useCallback","handleItemClick","itemId","src","percentage","action_type","slot_id","url","_e","percent_scroll","offer_type","handleItemImpression","_jsx","_Fragment","children","_jsxs","className","styles","Typography","variant","TypographyVariant","HM3","title","jsx","PillCarousel","carouselType","CarouselType","PILL_CHIP","carouselData","onItemClick","styleConfig","carouselStyleConfig","paddingLeft","paddingRight","width","marginTop","MerchCarousel","isFreeSwipe","isCentered","isInfinite","isAutoplay","lazyLoad","isLoading","isLoopAdditionalSlides","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","slides","onItemImpression"],"mappings":"2ZAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,+hNChBO,IAEMe,EAAuB,CAChC,CACIC,KAAM,UACNC,SAAUC,EAAUA,WACpBC,MAAO,UAEX,CACIH,KAAM,OACNC,SAAUG,EAAQA,SAClBD,MAAO,QAEX,CACIH,KAAM,UACNC,SAAUI,EAAUA,WACpBF,MAAO,WAEX,CACIH,KAAM,SACNC,SAAUK,EAASA,UACnBH,MAAO,UAEX,CACIH,KAAM,QACNC,SAAUM,EAAOA,QACjBJ,MAAO,SAEX,CACIH,KAAM,SACNC,SAAUO,EAASA,UACnBL,MAAO,6BCxBG,SAA4CM,GAC1D,IAAAC,EAAUD,EAAAC,WACVC,EAAgBF,EAAAE,iBAChBC,EAAeH,EAAAG,gBACfC,eACAC,EAAcL,EAAAK,eACdC,EAAYN,EAAAM,aAENC,EAAsCC,EAAAA,SAAiB,IAAtDC,EAAcF,EAAA,GAAEG,EAAiBH,EAAA,GAClCI,EAAsCH,EAAAA,SAAc,IAAnDI,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAClCG,EAA8CN,EAAAA,SAChD,IADGO,EAAkBD,EAAA,GAAEE,EAAqBF,EAAA,GAIh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IAAAY,OAAA,EAAAA,EAAEX,MACtBY,eAAgBL,GACblC,GAEV,GACD,IAGJ,OACI0C,MAAAC,EAAAA,SAAA,CAAAC,SACKzC,GACG0C,EAAAA,KAAK,MAAAzB,EAAAA,SAAA,CAAA0B,UAAWC,GAA+B,CAAAH,SAAA,CAC3CF,MAACM,aAAU5B,EAAAA,SAAA,CACP6B,QAASC,oBAAkBC,IAC3BL,UAAWC,GAA4B,CAAAH,UAEtC9C,aAAU,EAAVA,EAAYsD,QDpIR,gBCuITV,EAACW,IAAAC,EAAYA,aACT,CAAAC,aAAcC,EAAYA,aAACC,UAC3BC,aAAcjD,EACdkD,YAAa,SAAC7C,GAAS,OAAAe,EAAkBf,EAAK,EAC9C8C,YAAa,CACTC,oBAAqB,CACjBC,YAAa,OACbC,aAAc,WAK1BrB,EAAKW,IAAA,MAAAjC,EAAAA,SAAA,CAAA7C,MAAO,CAAEyF,MAAO,OAAQC,UAAW,QACpC,CAAArB,SAAAF,EAAAA,IAACwB,EAAaA,cAEV,CAAAC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,UAAU,EACV5E,WAAYA,EACZ6E,UAAW3E,EACX4E,wBAAyB9E,EACzB+E,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAe,EACfC,eAAgB,EAChBC,gBAAiBhF,aAAU,EAAVA,EAAYgF,gBAC7BC,OAAQzE,EACRP,eAAgBA,EAChB4D,YAAa,SAAC3B,EAAQC,EAAKC,GACvB,OAAAH,EAAgBC,EAAQC,EAAKC,EAAW,EAE5C8C,iBAAkB,SAAChD,EAAQC,EAAKC,GAC5B,OAAAO,EAAqBT,EAAQC,EAAKC,KApBjC/B,WA4BjC","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as i,Fragment as o,jsxs as n}from"react/jsx-runtime";import{useState as r,useEffect as t,useCallback as A}from"react";import{Typography as l,TypographyVariant as d}from"@cleartrip/ct-design-typography";import{MerchCarousel as a}from"@cleartrip/ct-platform-merch-carousel";import{PillCarousel as s,CarouselType as _}from"@cleartrip/ct-platform-pill-carousel";import{ravenSDKTrigger as p}from"@cleartrip/ct-platform-utils";import{ForYouPill as u,BankPill as c,FlightPill as m,HotelPill as g,BusPill as w,TrainPill as x}from"@cleartrip/ct-platform-assets";var h="index-module_top-offers__container__Z747x",f="index-module_top-offers__header__hIxia";!function(e,i){void 0===i&&(i={});var o=i.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('@font-face{font-family:swiper-icons;font-style:normal;font-weight:400;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlY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/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff")}:root{--swiper-theme-color:#007aff}.index-module_swiper-container__3KSgl{list-style:none;margin-left:auto;margin-right:auto;overflow:hidden;padding:0;position:relative;z-index:1}.index-module_swiper-container-vertical__-qoi0>.index-module_swiper-wrapper__xTq01{flex-direction:column}.index-module_swiper-wrapper__xTq01{box-sizing:content-box;display:flex;height:100%;position:relative;transition-property:transform;width:100%;z-index:1}.index-module_swiper-container-android__ALUNh .index-module_swiper-slide__Zchn0,.index-module_swiper-wrapper__xTq01{transform:translateZ(0)}.index-module_swiper-container-multirow__XQ6jv>.index-module_swiper-wrapper__xTq01{flex-wrap:wrap}.index-module_swiper-container-multirow-column__pF8z->.index-module_swiper-wrapper__xTq01{flex-direction:column;flex-wrap:wrap}.index-module_swiper-container-free-mode__wWVcG>.index-module_swiper-wrapper__xTq01{margin:0 auto;transition-timing-function:ease-out}.index-module_swiper-container-pointer-events__UnxWm{touch-action:pan-y}.index-module_swiper-container-pointer-events__UnxWm.index-module_swiper-container-vertical__-qoi0{touch-action:pan-x}.index-module_swiper-slide__Zchn0{flex-shrink:0;height:100%;position:relative;transition-property:transform;width:100%}.index-module_swiper-slide-invisible-blank__FdKYe{visibility:hidden}.index-module_swiper-container-autoheight__ag5Qv,.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-wrapper__xTq01{align-items:flex-start;transition-property:transform,height}.index-module_swiper-container-3d__utVhl{perspective:1200px}.index-module_swiper-container-3d__utVhl .index-module_swiper-cube-shadow__5Bd--,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide__Zchn0,.index-module_swiper-container-3d__utVhl .index-module_swiper-wrapper__xTq01{transform-style:preserve-3d}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:10}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea{background-image:linear-gradient(270deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3{background-image:linear-gradient(90deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF{background-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{-ms-overflow-style:none;overflow:auto;scrollbar-width:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01::-webkit-scrollbar{display:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01>.index-module_swiper-slide__Zchn0{scroll-snap-align:start start}.index-module_swiper-container-horizontal__yvB5j.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:x mandatory}.index-module_swiper-container-vertical__-qoi0.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:y mandatory}.index-module_top-offers__container__Z747x{align-items:flex-start;background:linear-gradient(180deg,#e4edff,#f7faff);display:flex;flex-direction:column;gap:16px;padding:16px 0 24px}.index-module_top-offers__header__hIxia{font-feature-settings:"dlig" on,"clig" off,"liga" off;font-style:normal;padding-left:16px}');var v=[{text:"For you",imageUrl:u,value:"forYou"},{text:"Bank",imageUrl:c,value:"bank"},{text:"Flights",imageUrl:m,value:"flights"},{text:"Hotels",imageUrl:g,value:"hotels"},{text:"Buses",imageUrl:w,value:"buses"},{text:"Trains",imageUrl:x,value:"trains"}],B=function(u){var c=u.lazyWidget,m=u.eligibleUserType,g=u.widgetData,w=u.getSlideStyles,x=r(""),B=x[0],y=x[1],Y=r([]),G=Y[0],C=Y[1],E=r([]),b=E[0],Z=E[1];t((function(){if(g){var e=v.filter((function(e){var i;return(null===(i=null==g?void 0:g[e.value])||void 0===i?void 0:i.items.length)>0}));m&&(e=e.filter((function(e){var i;return(null===(i=null==g?void 0:g[e.value])||void 0===i?void 0:i.items.filter((function(e){return!(null==e?void 0:e.userType)||e.userType===m}))).length>0}))),e.length&&(Z(e),y(e[0].value))}}),[]),t((function(){var e;if(B){var i=(null===(e=null==g?void 0:g[B])||void 0===e?void 0:e.items)||[];m&&(i=i.filter((function(e){return!(null==e?void 0:e.userType)||e.userType===m}))),C(i)}}),[B]);var Q=A((function(e){y(e.value)}),[]),T=A((function(e){var i,o,n,r;console.log(e),p("u_ui_action",{action_name:"top_offers_widget_click",page_name:"unified_homepage",action_type:"click",personalised_callout:e,u_utm_source:(null===(i=null===location||void 0===location?void 0:location.search)||void 0===i?void 0:i.split("utm_source=").length)>1?null===(r=null===(n=null===(o=null===location||void 0===location?void 0:location.search)||void 0===o?void 0:o.split("utm_source="))||void 0===n?void 0:n.pop())||void 0===r?void 0:r.split("&")[0]:"organic",ab_variant:"uhp_enabled",new_user_flag:""})}),[]),F=A((function(e){var i,o,n,r;console.log(e),p("u_impression",{action_name:"top_offers_card_impression",page_name:"unified_homepage",personalised_callout:e,u_utm_source:(null===(i=null===location||void 0===location?void 0:location.search)||void 0===i?void 0:i.split("utm_source=").length)>1?null===(r=null===(n=null===(o=null===location||void 0===location?void 0:location.search)||void 0===o?void 0:o.split("utm_source="))||void 0===n?void 0:n.pop())||void 0===r?void 0:r.split("&")[0]:"organic",ab_variant:"uhp_enabled",new_user_flag:""})}),[]);return i(o,{children:B&&n("div",e({className:h},{children:[i(l,e({variant:d.HM3,className:f},{children:(null==g?void 0:g.title)||"Top offers"})),i(s,{carouselType:_.PILL_CHIP,carouselData:b,onItemClick:function(e){return Q(e)},styleConfig:{carouselStyleConfig:{paddingLeft:"16px",paddingRight:"16px"}}}),i("div",e({style:{width:"100%",marginTop:"8px"}},{children:i(a,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!0,isLoopAdditionalSlides:!0,lazyLoad:!0,lazyWidget:c,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:0,slidesToDisplay:null==g?void 0:g.slidesToDisplay,slides:G,getSlideStyles:w,onItemClick:T,onItemImpression:F},B)}))]}))})};export{B as TopOffers};
1
+ import{__assign as e}from"tslib";import{jsx as i,Fragment as o,jsxs as n}from"react/jsx-runtime";import{useState as r,useEffect as t,useCallback as l}from"react";import{Typography as d,TypographyVariant as A}from"@cleartrip/ct-design-typography";import{MerchCarousel as a}from"@cleartrip/ct-platform-merch-carousel";import{PillCarousel as s,CarouselType as _}from"@cleartrip/ct-platform-pill-carousel";import{ravenSDKTrigger as u}from"@cleartrip/ct-platform-utils";import{ForYouPill as p,BankPill as c,FlightPill as m,HotelPill as g,BusPill as w,TrainPill as x}from"@cleartrip/ct-platform-assets";var f="index-module_top-offers__container__Z747x",h="index-module_top-offers__header__hIxia";!function(e,i){void 0===i&&(i={});var o=i.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('@font-face{font-family:swiper-icons;font-style:normal;font-weight:400;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBi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l47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff")}:root{--swiper-theme-color:#007aff}.index-module_swiper-container__3KSgl{list-style:none;margin-left:auto;margin-right:auto;overflow:hidden;padding:0;position:relative;z-index:1}.index-module_swiper-container-vertical__-qoi0>.index-module_swiper-wrapper__xTq01{flex-direction:column}.index-module_swiper-wrapper__xTq01{box-sizing:content-box;display:flex;height:100%;position:relative;transition-property:transform;width:100%;z-index:1}.index-module_swiper-container-android__ALUNh .index-module_swiper-slide__Zchn0,.index-module_swiper-wrapper__xTq01{transform:translateZ(0)}.index-module_swiper-container-multirow__XQ6jv>.index-module_swiper-wrapper__xTq01{flex-wrap:wrap}.index-module_swiper-container-multirow-column__pF8z->.index-module_swiper-wrapper__xTq01{flex-direction:column;flex-wrap:wrap}.index-module_swiper-container-free-mode__wWVcG>.index-module_swiper-wrapper__xTq01{margin:0 auto;transition-timing-function:ease-out}.index-module_swiper-container-pointer-events__UnxWm{touch-action:pan-y}.index-module_swiper-container-pointer-events__UnxWm.index-module_swiper-container-vertical__-qoi0{touch-action:pan-x}.index-module_swiper-slide__Zchn0{flex-shrink:0;height:100%;position:relative;transition-property:transform;width:100%}.index-module_swiper-slide-invisible-blank__FdKYe{visibility:hidden}.index-module_swiper-container-autoheight__ag5Qv,.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-wrapper__xTq01{align-items:flex-start;transition-property:transform,height}.index-module_swiper-container-3d__utVhl{perspective:1200px}.index-module_swiper-container-3d__utVhl .index-module_swiper-cube-shadow__5Bd--,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide__Zchn0,.index-module_swiper-container-3d__utVhl .index-module_swiper-wrapper__xTq01{transform-style:preserve-3d}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:10}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea{background-image:linear-gradient(270deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3{background-image:linear-gradient(90deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF{background-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{-ms-overflow-style:none;overflow:auto;scrollbar-width:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01::-webkit-scrollbar{display:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01>.index-module_swiper-slide__Zchn0{scroll-snap-align:start start}.index-module_swiper-container-horizontal__yvB5j.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:x mandatory}.index-module_swiper-container-vertical__-qoi0.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:y mandatory}.index-module_top-offers__container__Z747x{align-items:flex-start;background:linear-gradient(180deg,#e4edff,#f7faff);display:flex;flex-direction:column;gap:16px;padding:16px 0 24px}.index-module_top-offers__header__hIxia{font-feature-settings:"dlig" on,"clig" off,"liga" off;font-style:normal;padding-left:16px}');var v=[{text:"For you",imageUrl:p,value:"forYou"},{text:"Bank",imageUrl:c,value:"bank"},{text:"Flights",imageUrl:m,value:"flights"},{text:"Hotels",imageUrl:g,value:"hotels"},{text:"Buses",imageUrl:w,value:"buses"},{text:"Trains",imageUrl:x,value:"trains"}],B=function(p){var c=p.lazyWidget,m=p.eligibleUserType,g=p.isLoadingOffers,w=p.widgetData,x=p.getSlideStyles,B=p.ravenPayload,y=r(""),Y=y[0],G=y[1],C=r([]),E=C[0],Z=C[1],Q=r([]),b=Q[0],T=Q[1];t((function(){var i,o,n,r;if(w){var t=v.filter((function(e){var i;return(null===(i=null==w?void 0:w[e.value])||void 0===i?void 0:i.items.length)>0}));m&&(t=t.filter((function(e){var i;return(null===(i=null==w?void 0:w[e.value])||void 0===i?void 0:i.items.filter((function(e){return!(null==e?void 0:e.userType)||e.userType===m}))).length>0}))),t.length&&(T(t),G(t[0].value),u("u_impression",e({action_name:"top_offers_widget_impression",page_name:"unified_homepage",u_utm_source:(null===(i=null===location||void 0===location?void 0:location.search)||void 0===i?void 0:i.split("utm_source=").length)>1?null===(r=null===(n=null===(o=null===location||void 0===location?void 0:location.search)||void 0===o?void 0:o.split("utm_source="))||void 0===n?void 0:n.pop())||void 0===r?void 0:r.split("&")[0]:"organic"},B)))}}),[]),t((function(){var e;if(Y){var i=(null===(e=null==w?void 0:w[Y])||void 0===e?void 0:e.items)||[];m&&(i=i.filter((function(e){return!(null==e?void 0:e.userType)||e.userType===m}))),Z(i)}}),[Y]);var F=l((function(e){G(e.value)}),[]),M=l((function(i,o,n){var r,t,l,d,A;u("u_ui_action",e({action_name:"top_offers_card_click",page_name:"unified_homepage",action_type:"click",u_utm_source:(null===(r=null===location||void 0===location?void 0:location.search)||void 0===r?void 0:r.split("utm_source=").length)>1?null===(d=null===(l=null===(t=null===location||void 0===location?void 0:location.search)||void 0===t?void 0:t.split("utm_source="))||void 0===l?void 0:l.pop())||void 0===d?void 0:d.split("&")[0]:"organic",slot_id:i,url:null===(A=null==o?void 0:o.split("/"))||void 0===A?void 0:A.pop(),percent_scroll:n,offer_type:Y},B))}),[Y]),P=l((function(i,o,n){var r,t,l,d,A;u("u_impression",e({action_name:"top_offers_card_impression",page_name:"unified_homepage",u_utm_source:(null===(r=null===location||void 0===location?void 0:location.search)||void 0===r?void 0:r.split("utm_source=").length)>1?null===(d=null===(l=null===(t=null===location||void 0===location?void 0:location.search)||void 0===t?void 0:t.split("utm_source="))||void 0===l?void 0:l.pop())||void 0===d?void 0:d.split("&")[0]:"organic",slot_id:i,url:null===(A=null==o?void 0:o.split("/"))||void 0===A?void 0:A.pop(),percent_scroll:n},B))}),[]);return i(o,{children:Y&&n("div",e({className:f},{children:[i(d,e({variant:A.HM3,className:h},{children:(null==w?void 0:w.title)||"Top offers"})),i(s,{carouselType:_.PILL_CHIP,carouselData:b,onItemClick:function(e){return F(e)},styleConfig:{carouselStyleConfig:{paddingLeft:"16px",paddingRight:"16px"}}}),i("div",e({style:{width:"100%",marginTop:"8px"}},{children:i(a,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!0,lazyLoad:!0,lazyWidget:c,isLoading:g,isLoopAdditionalSlides:!c,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:0,slidesToDisplay:null==w?void 0:w.slidesToDisplay,slides:E,getSlideStyles:x,onItemClick:function(e,i,o){return M(e,i,o)},onItemImpression:function(e,i,o){return P(e,i,o)}},Y)}))]}))})};export{B as TopOffers};
2
2
  //# sourceMappingURL=ct-platform-top-offers.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-top-offers.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TopOffers/src/constants.ts","../packages/components/TopOffers/src/TopOffers.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","PILL_CAROUSEL_CONFIG","text","imageUrl","ForYouPill","value","BankPill","FlightPill","HotelPill","BusPill","TrainPill","TopOffers","_a","lazyWidget","eligibleUserType","widgetData","getSlideStyles","_b","useState","selectedFilter","setSelectedFilter","_c","filteredSlides","setFilteredSlides","_d","pillCarouselConfig","setPillCarouselConfig","useEffect","availableFilters","filter","data","items","length","item","userType","slidesByUserType","handleFilterClick","useCallback","handleItemClick","itemId","console","log","ravenSDKTrigger","action_name","page_name","action_type","personalised_callout","u_utm_source","location","search","split","pop","ab_variant","new_user_flag","handleItemImpression","_jsx","_Fragment","children","_jsxs","__assign","className","styles","Typography","variant","TypographyVariant","HM3","title","PillCarousel","carouselType","CarouselType","PILL_CHIP","carouselData","onItemClick","styleConfig","carouselStyleConfig","paddingLeft","paddingRight","width","marginTop","MerchCarousel","isFreeSwipe","isCentered","isInfinite","isAutoplay","isLoopAdditionalSlides","lazyLoad","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","slides","onItemImpression"],"mappings":"mrBAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,+hNChBO,IAEMe,EAAuB,CAChC,CACIC,KAAM,UACNC,SAAUC,EACVC,MAAO,UAEX,CACIH,KAAM,OACNC,SAAUG,EACVD,MAAO,QAEX,CACIH,KAAM,UACNC,SAAUI,EACVF,MAAO,WAEX,CACIH,KAAM,SACNC,SAAUK,EACVH,MAAO,UAEX,CACIH,KAAM,QACNC,SAAUM,EACVJ,MAAO,SAEX,CACIH,KAAM,SACNC,SAAUO,EACVL,MAAO,WCxBTM,EAAY,SAA4CC,OAC1DC,EAAUD,EAAAC,WACVC,EAAgBF,EAAAE,iBAChBC,EAAUH,EAAAG,WACVC,EAAcJ,EAAAI,eAERC,EAAsCC,EAAiB,IAAtDC,EAAcF,EAAA,GAAEG,EAAiBH,EAAA,GAClCI,EAAsCH,EAAc,IAAnDI,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAClCG,EAA8CN,EAChD,IADGO,EAAkBD,EAAA,GAAEE,EAAqBF,EAAA,GAIhDG,GAAU,WACN,GAAIZ,EAAY,CAEZ,IAAIa,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C,WAuBjC","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-top-offers.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TopOffers/src/constants.ts","../packages/components/TopOffers/src/TopOffers.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","PILL_CAROUSEL_CONFIG","text","imageUrl","ForYouPill","value","BankPill","FlightPill","HotelPill","BusPill","TrainPill","TopOffers","_a","lazyWidget","eligibleUserType","isLoadingOffers","widgetData","getSlideStyles","ravenPayload","_b","useState","selectedFilter","setSelectedFilter","_c","filteredSlides","setFilteredSlides","_d","pillCarouselConfig","setPillCarouselConfig","useEffect","availableFilters","filter","data","items","length","item","userType","ravenSDKTrigger","__assign","action_name","page_name","u_utm_source","location","search","split","pop","slidesByUserType","handleFilterClick","useCallback","handleItemClick","itemId","src","percentage","action_type","slot_id","url","_e","percent_scroll","offer_type","handleItemImpression","_jsx","_Fragment","children","_jsxs","className","styles","Typography","variant","TypographyVariant","HM3","title","PillCarousel","carouselType","CarouselType","PILL_CHIP","carouselData","onItemClick","styleConfig","carouselStyleConfig","paddingLeft","paddingRight","width","marginTop","MerchCarousel","isFreeSwipe","isCentered","isInfinite","isAutoplay","lazyLoad","isLoading","isLoopAdditionalSlides","showNavigation","showPagination","starting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AAH,UAEtC9C,aAAU,EAAVA,EAAYsD,QDpIR,gBCuITV,EAACW,EACG,CAAAC,aAAcC,EAAaC,UAC3BC,aAAchD,EACdiD,YAAa,SAAC5C,GAAS,OAAAe,EAAkBf,EAAK,EAC9C6C,YAAa,CACTC,oBAAqB,CACjBC,YAAa,OACbC,aAAc,WAK1BpB,EAAK,MAAAtB,EAAA,CAAA9C,MAAO,CAAEyF,MAAO,OAAQC,UAAW,QACpC,CAAApB,SAAAF,EAACuB,EAEG,CAAAC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,UAAU,EACV3E,WAAYA,EACZ4E,UAAW1E,EACX2E,wBAAyB7E,EACzB8E,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAe,EACfC,eAAgB,EAChBC,gBAAiB/E,aAAU,EAAVA,EAAY+E,gBAC7BC,OAAQxE,EACRP,eAAgBA,EAChB2D,YAAa,SAAC1B,EAAQC,EAAKC,GACvB,OAAAH,EAAgBC,EAAQC,EAAKC,EAAW,EAE5C6C,iBAAkB,SAAC/C,EAAQC,EAAKC,GAC5B,OAAAO,EAAqBT,EAAQC,EAAKC,KApBjC/B,WA4BjC","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-platform-top-offers",
3
- "version": "3.0.0-beta.34",
3
+ "version": "3.0.0-beta.36",
4
4
  "description": "Top Offers Component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/ct-platform-top-offers.cjs.js",
@@ -12,9 +12,9 @@
12
12
  "dependencies": {
13
13
  "@cleartrip/ct-design-typography": "2.6.0",
14
14
  "swiper": "6.8.4",
15
- "@cleartrip/ct-platform-assets": "3.0.0-beta.25",
16
- "@cleartrip/ct-platform-merch-carousel": "3.5.1-beta.0",
17
- "@cleartrip/ct-platform-pill-carousel": "1.0.0-beta.26"
15
+ "@cleartrip/ct-platform-merch-carousel": "3.5.1-beta.2",
16
+ "@cleartrip/ct-platform-assets": "3.0.0-beta.27",
17
+ "@cleartrip/ct-platform-pill-carousel": "1.0.0-beta.28"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "react": ">=16.8.0",