@cleartrip/ct-platform-supercoins-chip 1.0.1-beta.5 → 1.0.1-beta.8

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 +1 @@
1
- {"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAatE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAa7D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0LjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SuperCoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAatE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAa7D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgMjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SupercoinsChip.types.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClD,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,6BAA6B;IAC1C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClD,SAAS,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"SupercoinsChip.types.d.ts","sourceRoot":"","sources":["../packages/components/SuperCoinsChip/src/SupercoinsChip.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClD,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,6BAA6B;IAC1C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClD,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,wHACwF,CAAC;AAE1H,eAAO,MAAM,mCAAmC,6BAA6B,CAAC;AAE9E,eAAO,MAAM,iCAAiC,0BAA0B,CAAC;AAEzE,eAAO,MAAM,qCAAqC,+BAClB,CAAC;AAEjC,eAAO,MAAM,gCAAgC;;;;;;CAM5C,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/SuperCoinsChip/src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,wHACwF,CAAC;AAE1H,eAAO,MAAM,mCAAmC,6BAA6B,CAAC;AAE9E,eAAO,MAAM,iCAAiC,0BAA0B,CAAC;AAEzE,eAAO,MAAM,qCAAqC,+BAClB,CAAC;AAEjC,eAAO,MAAM,gCAAgC;;;;;;CAM5C,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),o=require("react"),r=require("@cleartrip/ct-design-typography"),i=require("@cleartrip/ct-platform-shimmer"),t=require("@cleartrip/ct-platform-utils");function a(e){return e&&e.__esModule?e:{default:e}}var s=a(o);var c="index-module_supercoinsBalance__w9srh",l="index-module_supercoinContainer__JiReA",u="index-module_superCoinsFloatingIslandContainer__5FNNa",d="index-module_supercoinsBalanceBackgroundColorShift__r6YWa",_="index-module_supercoinsBalanceTextColorShift__y7vva",m="index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",f="index-module_supercoinsBalanceTextColorShift_exit__JKt90";!function(e,n){void 0===n&&(n={});var o=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;padding:6px 8px}.index-module_supercoinContainer__JiReA{position:relative}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_shimmer__SAN3n .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_shimmer__SAN3n{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:rgba(0,62,162,0)}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var p="island_rendered_frquency",g="islandAnimationPlayed",x="island_expiration_frquency",h={requiredSupercoins:50,frequency:3,frequencyGapInDays:30,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function v(e){var n,o=e.renderFloatingIsland,r=e.supercoins;if(!o)return!1;if(r<h.requiredSupercoins)return!1;if(function(){var e=localStorage.getItem(p);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=h.frequency){var i=(n=localStorage.getItem(x))&&"number"==typeof parseInt(n)?parseInt(n):null;return!i||!(i>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(p),localStorage.removeItem(x),!0)}return!sessionStorage.getItem(g)}function y(){var e=localStorage.getItem(p);if(e){var n=parseInt(e)+1;if(localStorage.setItem(p,n.toString()),n>=h.frequency){var o=Math.floor(Date.now()/1e3)+86400*h.frequencyGapInDays;localStorage.setItem(x,o.toString())}}else localStorage.setItem(p,"1")}var S=s.default.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))}));exports.SupercoinsChip=function(a){var s=a.supercoinsLoading,p=a.supercoinBurnBalance,x=a.ravenPayload,b=void 0===x?{}:x,k=a.onSupercoinsClick,I=a.renderFloatingIsland,C=void 0===I||I,w=o.useMemo((function(){var e;return null!==(e=t.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),B=o.useMemo((function(){return"number"==typeof p&&p>=0}),[p]),q=o.useState(!1),T=q[0],j=q[1],N=o.useState(null),A=N[0],F=N[1],E=o.useState(!1),H=E[0],M=E[1],D="entry"===A?d:"exit"===A?m:"",J="entry"===A?_:"exit"===A?f:"";return o.useEffect((function(){var e=function(){window.scrollY>0&&(sessionStorage.getItem(g)||(M(!0),F(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),o.useEffect((function(){var e;return v({renderFloatingIsland:C,supercoins:p})&&!H&&(F("entry"),e=setTimeout((function(){j(!0)}),1500)),function(){clearTimeout(e)}}),[]),o.useEffect((function(){var e=setTimeout((function(){sessionStorage.getItem(g)||(j(!1),F("exit"))}),h.cutoffTimeInMs);return function(){clearTimeout(e)}}),[]),n.jsx(n.Fragment,{children:s?n.jsx("div",e.__assign({className:c},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx(i.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(i.Shimmer,{width:44,height:18,type:"rounded"})]}))})):B?n.jsxs("div",e.__assign({className:l},{children:[n.jsx("div",e.__assign({className:"".concat(c," ").concat(D),onClick:function(){k&&"function"==typeof k&&k(),t.ravenSDKTrigger("u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:p,u_utm_source:w},b))}},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",alt:"supercoin_icon",width:18,height:18}),n.jsx(r.Typography,e.__assign({variant:"B2",style:{lineHeight:"18px"},className:J},{children:p}))]}))})),T&&!H&&n.jsx("div",e.__assign({className:u},{children:n.jsx(o.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(S,{superCoins:p,onAnimationStart:function(){return function(n){var o=n.supercoins,r=n.ravenPayload,i=n.utmSource,a=void 0===i?"":i;t.ravenSDKTrigger("u_ui_action",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:a},r)),sessionStorage.setItem("islandAnimationPlayed","true"),y()}({supercoins:p,ravenPayload:b,utmSource:w})},onAnimationEnd:function(){F("exit")}})}))}))]})):null})};
1
+ "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),o=require("react"),r=require("@cleartrip/ct-design-typography"),i=require("@cleartrip/ct-platform-shimmer"),t=require("@cleartrip/ct-platform-utils");function a(e){return e&&e.__esModule?e:{default:e}}var s=a(o);var c="index-module_supercoinsBalance__w9srh",l="index-module_superCoinsFloatingIslandContainer__5FNNa",u="index-module_supercoinsBalanceBackgroundColorShift__r6YWa",d="index-module_supercoinsBalanceTextColorShift__y7vva",_="index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",f="index-module_supercoinsBalanceTextColorShift_exit__JKt90";!function(e,n){void 0===n&&(n={});var o=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_shimmer__SAN3n .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_shimmer__SAN3n{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:rgba(0,62,162,0)}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var m="island_rendered_frquency",p="islandAnimationPlayed",g="island_expiration_frquency",x={requiredSupercoins:50,frequency:3,frequencyGapInDays:30,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function h(e){var n,o=e.renderFloatingIsland,r=e.supercoins;if(!o)return!1;if(r<x.requiredSupercoins)return!1;if(function(){var e=localStorage.getItem(m);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=x.frequency){var i=(n=localStorage.getItem(g))&&"number"==typeof parseInt(n)?parseInt(n):null;return!i||!(i>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(m),localStorage.removeItem(g),!0)}return!sessionStorage.getItem(p)}function v(){var e=localStorage.getItem(m);if(e){var n=parseInt(e)+1;if(localStorage.setItem(m,n.toString()),n>=x.frequency){var o=Math.floor(Date.now()/1e3)+86400*x.frequencyGapInDays;localStorage.setItem(g,o.toString())}}else localStorage.setItem(m,"1")}var y=s.default.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))}));exports.SupercoinsChip=function(a){var s=a.supercoinsLoading,m=a.supercoinBurnBalance,g=a.ravenPayload,S=void 0===g?{}:g,b=a.onSupercoinsClick,k=a.renderFloatingIsland,I=void 0===k||k,w=o.useMemo((function(){var e;return null!==(e=t.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),B=o.useMemo((function(){return"number"==typeof m&&m>=0&&!s}),[m,s]),C=o.useState(!1),q=C[0],T=C[1],j=o.useState(null),N=j[0],F=j[1],E=o.useState(!1),A=E[0],H=E[1],M="entry"===N?u:"exit"===N?_:"",D="entry"===N?d:"exit"===N?f:"";return o.useEffect((function(){var e=function(){window.scrollY>0&&(sessionStorage.getItem(p)||(H(!0),F(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),o.useEffect((function(){var e;return h({renderFloatingIsland:I,supercoins:m})&&!A&&(F("entry"),e=setTimeout((function(){T(!0)}),1500)),function(){clearTimeout(e)}}),[m]),o.useEffect((function(){if(I){var e=setTimeout((function(){sessionStorage.getItem(p)||(T(!1),F("exit"))}),x.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),n.jsx(n.Fragment,{children:s?n.jsx("div",e.__assign({className:c},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx(i.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(i.Shimmer,{width:44,height:18,type:"rounded"})]}))})):B?n.jsxs("div",e.__assign({style:{position:"relative"}},{children:[n.jsx("div",e.__assign({className:"".concat(c," ").concat(M),onClick:function(){b&&"function"==typeof b&&b(),t.ravenSDKTrigger("u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:m,u_utm_source:w},S))}},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",alt:"supercoin_icon",width:18,height:18}),n.jsx(r.Typography,e.__assign({variant:"B2",style:{lineHeight:"18px"},className:D},{children:m}))]}))})),q&&!A&&n.jsx("div",e.__assign({className:l},{children:n.jsx(o.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(y,{superCoins:m,onAnimationStart:function(){return function(n){var o=n.supercoins,r=n.ravenPayload,i=n.utmSource,a=void 0===i?"":i;t.ravenSDKTrigger("u_ui_action",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:a},r)),sessionStorage.setItem("islandAnimationPlayed","true"),v()}({supercoins:m,ravenPayload:S,utmSource:w})},onAnimationEnd:function(){F("exit")}})}))}))]})):null})};
2
2
  //# sourceMappingURL=ct-platform-supercoins-chip.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/SupercoinsChip.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,null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","_b","ravenPayload","onSupercoinsClick","_c","utmSource","useMemo","getQueryParam","shouldRenderSupercoins","_d","useState","renderSuperCoinIsland","setRenderSuperCoinIsland","_e","chipAnimationType","setChipAnimationType","_f","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","chipBackgroundAnimationClassname","styles","chipTextAnimationClassname","useEffect","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","setTimeout","clearTimeout","_jsx","_Fragment","children","jsx","__assign","className","_jsxs","jsxs","display","alignItems","gap","Shimmer","width","height","concat","onClick","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","src","alt","Typography","variant","lineHeight","Suspense","fallback","Fragment","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"iqBAAA,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,k1DCzBO,IAGMe,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAESC,EAAmC,CAC5CC,mBAAoB,GACpBC,UAAW,EACXC,mBAAoB,GACpBC,eAAgB,IAChBC,mBAAmB,GCMC,SAAAC,EAA2BC,OALzCC,EAMNC,EAAoBF,EAAAE,qBACpBC,EAAUH,EAAAG,WAGV,IAAKD,EAAsB,OAAO,EAGlC,GAAIC,EAAaV,EAAiCC,mBAC9C,OAAO,EASX,GA9BJ,WACI,IAAMC,EAAYS,aAAaC,QAAQf,GACvC,OAAKK,GAA4C,iBAAxBW,SAASX,GAC3BW,SAASX,GADkD,CAEtE,CAyBsBY,IACDd,EAAiCE,UAAW,CAEzD,IAAMa,GAzBJP,EAASG,aAAaC,QAAQb,KACO,iBAArBc,SAASL,GACxBK,SAASL,GAD4C,KAyBxD,OAAKO,KAEDA,EADiBC,KAAKC,MAAMC,KAAKC,MAAQ,QAK7CR,aAAaS,WAAWvB,GACxBc,aAAaS,WAAWrB,IACjB,EACV,CAID,OADiBsB,eAAeT,QAAQd,EAO5C,CC5CA,SAASwB,IACL,IAAMpB,EAAYS,aAAaC,QAAQf,GACvC,GAA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HsF,QAAS,OACTC,WAAY,SACZC,IAAK,QACR,CAAAR,SAAA,CAEDF,EAAAA,IACI,MAAA,CAAAqB,IH7K5B,sHG8K4BC,IAAK,iBACLV,MAAO,GACPC,OAAQ,KAEZb,MAACuB,EAAAA,WACGnB,EAAAA,SAAA,CAAAoB,QAAS,KACTtG,MAAO,CAAEuG,WAAY,QACrBpB,UAAWf,GAA0B,CAAAY,SAEpCjC,YAIZW,IAA0BM,GACvBc,EACIG,IAAA,MAAAC,EAAAA,SAAA,CAAAC,UAAWhB,GAAwC,CAAAa,SAEnDF,EAAAA,IAAC0B,EAAAA,SAAStB,EAAAA,SAAA,CAAAuB,SAAU3B,EAAKG,IAAAF,EAAA2B,SAAA,CAAA,IAAA,CAAA1B,SACrBF,EAAAA,IAACxC,GACGqE,WAAY5D,EACZ6D,iBAAkB,WACd,OD5JlC,SAAiCzF,OACnCG,EAAUH,EAAAG,WACV2B,EAAY9B,EAAA8B,aACZD,cAAAI,OAAY,IAAAJ,EAAA,GAAEA,EAGd8C,EAAAA,gBAAgB,cACZZ,EAAAA,SAAA,CAAAa,YAAa,8BACbC,UAAW,mBACXC,kBAAmB3E,EACnB4E,aAAc9C,GACXH,IAIPhB,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CCyIwC2E,CAAuB,CACnBvF,WACIyB,EACJE,aAAYA,EACZG,UAASA,GACX,EAEN0D,eAxIhC,WACIhD,EAAqB,OACxB,cA4IW,MAGhB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SuperCoinsChip/src/constants.ts","../packages/components/SuperCoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SuperCoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SuperCoinsChip/src/SupercoinsChip.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,null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","_b","ravenPayload","onSupercoinsClick","_c","utmSource","useMemo","getQueryParam","shouldRenderSupercoins","_d","useState","renderSuperCoinIsland","setRenderSuperCoinIsland","_e","chipAnimationType","setChipAnimationType","_f","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","chipBackgroundAnimationClassname","styles","chipTextAnimationClassname","useEffect","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","setTimeout","clearTimeout","_jsx","_Fragment","children","jsx","__assign","className","_jsxs","jsxs","display","alignItems","gap","Shimmer","width","height","position","concat","onClick","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","src","alt","Typography","variant","lineHeight","Suspense","fallback","Fragment","superCoins","onAn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AY,SACZC,IAAK,QACR,CAAAR,SAAA,CAEDF,EAAAA,IACI,MAAA,CAAAsB,IHnL5B,sHGoL4BC,IAAK,iBACLX,MAAO,GACPC,OAAQ,KAEZb,MAACwB,EAAAA,WACGpB,EAAAA,SAAA,CAAAqB,QAAS,KACTvG,MAAO,CAAEwG,WAAY,QACrBrB,UAAWf,GAA0B,CAAAY,SAEpCjC,YAIZW,IAA0BM,GACvBc,EACIG,IAAA,MAAAC,EAAAA,SAAA,CAAAC,UAAWhB,GAAwC,CAAAa,SAEnDF,EAAAA,IAAC2B,EAAAA,SAASvB,EAAAA,SAAA,CAAAwB,SAAU5B,EAAKG,IAAAF,EAAA4B,SAAA,CAAA,IAAA,CAAA3B,SACrBF,EAAAA,IAACxC,GACGsE,WAAY7D,EACZ8D,iBAAkB,WACd,ODlKlC,SAAiC1F,OACnCG,EAAUH,EAAAG,WACV2B,EAAY9B,EAAA8B,aACZD,cAAAI,OAAY,IAAAJ,EAAA,GAAEA,EAGd+C,EAAAA,gBAAgB,cACZb,EAAAA,SAAA,CAAAc,YAAa,8BACbC,UAAW,mBACXC,kBAAmB5E,EACnB6E,aAAc/C,GACXH,IAIPhB,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CC+IwC4E,CAAuB,CACnBxF,WACIyB,EACJE,aAAYA,EACZG,UAASA,GACX,EAEN2D,eA7IhC,WACIjD,EAAqB,OACxB,cAiJW,MAGhB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,Fragment as o,jsxs as r}from"react/jsx-runtime";import i,{useMemo as t,useState as a,useEffect as l,Suspense as c}from"react";import{Typography as s}from"@cleartrip/ct-design-typography";import{Shimmer as u}from"@cleartrip/ct-platform-shimmer";import{ravenSDKTrigger as d,getQueryParam as _}from"@cleartrip/ct-platform-utils";var m="index-module_supercoinsBalance__w9srh",f="index-module_supercoinContainer__JiReA",p="index-module_superCoinsFloatingIslandContainer__5FNNa",g="index-module_supercoinsBalanceBackgroundColorShift__r6YWa",x="index-module_supercoinsBalanceTextColorShift__y7vva",h="index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",v="index-module_supercoinsBalanceTextColorShift_exit__JKt90";!function(e,n){void 0===n&&(n={});var o=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;padding:6px 8px}.index-module_supercoinContainer__JiReA{position:relative}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_shimmer__SAN3n .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_shimmer__SAN3n{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:rgba(0,62,162,0)}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var y="island_rendered_frquency",b="islandAnimationPlayed",S="island_expiration_frquency",k={requiredSupercoins:50,frequency:3,frequencyGapInDays:30,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function I(e){var n,o=e.renderFloatingIsland,r=e.supercoins;if(!o)return!1;if(r<k.requiredSupercoins)return!1;if(function(){var e=localStorage.getItem(y);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=k.frequency){var i=(n=localStorage.getItem(S))&&"number"==typeof parseInt(n)?parseInt(n):null;return!i||!(i>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(y),localStorage.removeItem(S),!0)}return!sessionStorage.getItem(b)}function C(){var e=localStorage.getItem(y);if(e){var n=parseInt(e)+1;if(localStorage.setItem(y,n.toString()),n>=k.frequency){var o=Math.floor(Date.now()/1e3)+86400*k.frequencyGapInDays;localStorage.setItem(S,o.toString())}}else localStorage.setItem(y,"1")}var w=i.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))})),B=function(i){var y=i.supercoinsLoading,S=i.supercoinBurnBalance,B=i.ravenPayload,N=void 0===B?{}:B,T=i.onSupercoinsClick,q=i.renderFloatingIsland,A=void 0===q||q,F=t((function(){var e;return null!==(e=_("utm_source"))&&void 0!==e?e:"organic"}),[]),E=t((function(){return"number"==typeof S&&S>=0}),[S]),H=a(!1),J=H[0],U=H[1],P=a(null),D=P[0],M=P[1],Y=a(!1),L=Y[0],V=Y[1],W="entry"===D?g:"exit"===D?h:"",G="entry"===D?x:"exit"===D?v:"";return l((function(){var e=function(){window.scrollY>0&&(sessionStorage.getItem(b)||(V(!0),M(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),l((function(){var e;return I({renderFloatingIsland:A,supercoins:S})&&!L&&(M("entry"),e=setTimeout((function(){U(!0)}),1500)),function(){clearTimeout(e)}}),[]),l((function(){var e=setTimeout((function(){sessionStorage.getItem(b)||(U(!1),M("exit"))}),k.cutoffTimeInMs);return function(){clearTimeout(e)}}),[]),n(o,{children:y?n("div",e({className:m},{children:r("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n(u,{width:18,height:18,type:"rounded"}),n(u,{width:44,height:18,type:"rounded"})]}))})):E?r("div",e({className:f},{children:[n("div",e({className:"".concat(m," ").concat(W),onClick:function(){T&&"function"==typeof T&&T(),d("u_ui_action",e({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:S,u_utm_source:F},N))}},{children:r("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",alt:"supercoin_icon",width:18,height:18}),n(s,e({variant:"B2",style:{lineHeight:"18px"},className:G},{children:S}))]}))})),J&&!L&&n("div",e({className:p},{children:n(c,e({fallback:n(o,{})},{children:n(w,{superCoins:S,onAnimationStart:function(){return function(n){var o=n.supercoins,r=n.ravenPayload,i=n.utmSource;d("u_ui_action",e({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:void 0===i?"":i},r)),sessionStorage.setItem("islandAnimationPlayed","true"),C()}({supercoins:S,ravenPayload:N,utmSource:F})},onAnimationEnd:function(){M("exit")}})}))}))]})):null})};export{B as SupercoinsChip};
1
+ import{__assign as e}from"tslib";import{jsx as n,Fragment as o,jsxs as r}from"react/jsx-runtime";import i,{useMemo as t,useState as a,useEffect as l,Suspense as c}from"react";import{Typography as s}from"@cleartrip/ct-design-typography";import{Shimmer as u}from"@cleartrip/ct-platform-shimmer";import{ravenSDKTrigger as d,getQueryParam as _}from"@cleartrip/ct-platform-utils";var m="index-module_supercoinsBalance__w9srh",f="index-module_superCoinsFloatingIslandContainer__5FNNa",p="index-module_supercoinsBalanceBackgroundColorShift__r6YWa",g="index-module_supercoinsBalanceTextColorShift__y7vva",h="index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",x="index-module_supercoinsBalanceTextColorShift_exit__JKt90";!function(e,n){void 0===n&&(n={});var o=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_shimmer__SAN3n .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_shimmer__SAN3n{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:rgba(0,62,162,0)}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var v="island_rendered_frquency",y="islandAnimationPlayed",b="island_expiration_frquency",S={requiredSupercoins:50,frequency:3,frequencyGapInDays:30,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function k(e){var n,o=e.renderFloatingIsland,r=e.supercoins;if(!o)return!1;if(r<S.requiredSupercoins)return!1;if(function(){var e=localStorage.getItem(v);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=S.frequency){var i=(n=localStorage.getItem(b))&&"number"==typeof parseInt(n)?parseInt(n):null;return!i||!(i>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(v),localStorage.removeItem(b),!0)}return!sessionStorage.getItem(y)}function I(){var e=localStorage.getItem(v);if(e){var n=parseInt(e)+1;if(localStorage.setItem(v,n.toString()),n>=S.frequency){var o=Math.floor(Date.now()/1e3)+86400*S.frequencyGapInDays;localStorage.setItem(b,o.toString())}}else localStorage.setItem(v,"1")}var w=i.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))})),B=function(i){var v=i.supercoinsLoading,b=i.supercoinBurnBalance,B=i.ravenPayload,C=void 0===B?{}:B,N=i.onSupercoinsClick,T=i.renderFloatingIsland,q=void 0===T||T,A=t((function(){var e;return null!==(e=_("utm_source"))&&void 0!==e?e:"organic"}),[]),F=t((function(){return"number"==typeof b&&b>=0&&!v}),[b,v]),E=a(!1),H=E[0],U=E[1],P=a(null),D=P[0],J=P[1],M=a(!1),Y=M[0],L=M[1],V="entry"===D?p:"exit"===D?h:"",W="entry"===D?g:"exit"===D?x:"";return l((function(){var e=function(){window.scrollY>0&&(sessionStorage.getItem(y)||(L(!0),J(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),l((function(){var e;return k({renderFloatingIsland:q,supercoins:b})&&!Y&&(J("entry"),e=setTimeout((function(){U(!0)}),1500)),function(){clearTimeout(e)}}),[b]),l((function(){if(q){var e=setTimeout((function(){sessionStorage.getItem(y)||(U(!1),J("exit"))}),S.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),n(o,{children:v?n("div",e({className:m},{children:r("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n(u,{width:18,height:18,type:"rounded"}),n(u,{width:44,height:18,type:"rounded"})]}))})):F?r("div",e({style:{position:"relative"}},{children:[n("div",e({className:"".concat(m," ").concat(V),onClick:function(){N&&"function"==typeof N&&N(),d("u_ui_action",e({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:b,u_utm_source:A},C))}},{children:r("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",alt:"supercoin_icon",width:18,height:18}),n(s,e({variant:"B2",style:{lineHeight:"18px"},className:W},{children:b}))]}))})),H&&!Y&&n("div",e({className:f},{children:n(c,e({fallback:n(o,{})},{children:n(w,{superCoins:b,onAnimationStart:function(){return function(n){var o=n.supercoins,r=n.ravenPayload,i=n.utmSource;d("u_ui_action",e({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:void 0===i?"":i},r)),sessionStorage.setItem("islandAnimationPlayed","true"),I()}({supercoins:b,ravenPayload:C,utmSource:A})},onAnimationEnd:function(){J("exit")}})}))}))]})):null})};export{B as SupercoinsChip};
2
2
  //# sourceMappingURL=ct-platform-supercoins-chip.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/SupercoinsChip.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,null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","_b","ravenPayload","onSupercoinsClick","_c","utmSource","useMemo","getQueryParam","shouldRenderSupercoins","_d","useState","renderSuperCoinIsland","setRenderSuperCoinIsland","_e","chipAnimationType","setChipAnimationType","_f","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","chipBackgroundAnimationClassname","styles","chipTextAnimationClassname","useEffect","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","setTimeout","clearTimeout","_jsx","_Fragment","children","__assign","className","_jsxs","display","alignItems","gap","Shimmer","width","height","concat","onClick","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","src","alt","Typography","variant","lineHeight","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"iwBAAA,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,k1DCzBO,IAGMe,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAESC,EAAmC,CAC5CC,mBAAoB,GACpBC,UAAW,EACXC,mBAAoB,GACpBC,eAAgB,IAChBC,mBAAmB,GCMC,SAAAC,EAA2BC,OALzCC,EAMNC,EAAoBF,EAAAE,qBACpBC,EAAUH,EAAAG,WAGV,IAAKD,EAAsB,OAAO,EAGlC,GAAIC,EAAaV,EAAiCC,mBAC9C,OAAO,EASX,GA9BJ,WACI,IAAMC,EAAYS,aAAaC,QAAQf,GACvC,OAAKK,GAA4C,iBAAxBW,SAASX,GAC3BW,SAASX,GADkD,CAEtE,CAyBsBY,IACDd,EAAiCE,UAAW,CAEzD,IAAMa,GAzBJP,EAASG,aAAaC,QAAQb,KACO,iBAArBc,SAASL,GACxBK,SAASL,GAD4C,KAyBxD,OAAKO,KAEDA,EADiBC,KAAKC,MAAMC,KAAKC,MAAQ,QAK7CR,aAAaS,WAAWvB,GACxBc,aAAaS,WAAWrB,IACjB,EACV,CAID,OADiBsB,eAAeT,QAAQd,EAO5C,CC5CA,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X,EAACqB,EACGlB,EAAA,CAAAmB,QAAS,KACTrG,MAAO,CAAEsG,WAAY,QACrBnB,UAAWd,GAA0B,CAAAY,SAEpCjC,YAIZW,IAA0BM,GACvBc,EACI,MAAAG,EAAA,CAAAC,UAAWf,GAAwC,CAAAa,SAEnDF,EAACwB,EAASrB,EAAA,CAAAsB,SAAUzB,EAAKC,EAAA,CAAA,IAAA,CAAAC,SACrBF,EAACzC,GACGmE,WAAYzD,EACZ0D,iBAAkB,WACd,OD5JlC,SAAiCvF,OACnCG,EAAUH,EAAAG,WACV4B,EAAY/B,EAAA+B,aACZD,cAGA4C,EAAgB,cACZX,EAAA,CAAAY,YAAa,8BACbC,UAAW,mBACXC,kBAAmB1E,EACnB2E,kBAPQ,IAAAhD,EAAA,GAAEA,GAQPC,IAIPjB,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CCyIwCyE,CAAuB,CACnBrF,WACI0B,EACJE,aAAYA,EACZG,UAASA,GACX,EAENuD,eAxIhC,WACI7C,EAAqB,OACxB,cA4IW,MAGhB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SuperCoinsChip/src/constants.ts","../packages/components/SuperCoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SuperCoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SuperCoinsChip/src/SupercoinsChip.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,null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","_b","ravenPayload","onSupercoinsClick","_c","utmSource","useMemo","getQueryParam","shouldRenderSupercoins","_d","useState","renderSuperCoinIsland","setRenderSuperCoinIsland","_e","chipAnimationType","setChipAnimationType","_f","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","chipBackgroundAnimationClassname","styles","chipTextAnimationClassname","useEffect","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","setTimeout","clearTimeout","_jsx","_Fragment","children","__assign","className","_jsxs","display","alignItems","gap","Shimmer","width","height","position","concat","onClick","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","src","alt","Typography","variant","lineHeight","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"stBAAA,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,WAE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F,OACnCG,EAAUH,EAAAG,WACV4B,EAAY/B,EAAA+B,aACZD,cAGA6C,EAAgB,cACZZ,EAAA,CAAAa,YAAa,8BACbC,UAAW,mBACXC,kBAAmB3E,EACnB4E,kBAPQ,IAAAjD,EAAA,GAAEA,GAQPC,IAIPjB,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CC+IwC0E,CAAuB,CACnBtF,WACI0B,EACJE,aAAYA,EACZG,UAASA,GACX,EAENwD,eA7IhC,WACI9C,EAAqB,OACxB,cAiJW,MAGhB","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/SuperCoinsChip/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"onIslandAnimationStart.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAkCrE,wBAAgB,sBAAsB,CAAC,EACnC,UAAU,EACV,YAAY,EACZ,SAAc,GACjB,EAAE,0BAA0B,QAe5B"}
1
+ {"version":3,"file":"onIslandAnimationStart.d.ts","sourceRoot":"","sources":["../../packages/components/SuperCoinsChip/src/utils/onIslandAnimationStart.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAkCrE,wBAAgB,sBAAsB,CAAC,EACnC,UAAU,EACV,YAAY,EACZ,SAAc,GACjB,EAAE,0BAA0B,QAe5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"shouldRenderFloatingIsland.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAcxE,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,EAC/C,oBAAoB,EACpB,UAAU,GACb,EAAE,6BAA6B,WAqC/B"}
1
+ {"version":3,"file":"shouldRenderFloatingIsland.d.ts","sourceRoot":"","sources":["../../packages/components/SuperCoinsChip/src/utils/shouldRenderFloatingIsland.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAcxE,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,EAC/C,oBAAoB,EACpB,UAAU,GACb,EAAE,6BAA6B,WAqC/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-platform-supercoins-chip",
3
- "version": "1.0.1-beta.5",
3
+ "version": "1.0.1-beta.8",
4
4
  "description": "SuperCoins Chip Component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/ct-platform-supercoins-chip.cjs.js",
@@ -11,9 +11,9 @@
11
11
  ],
12
12
  "dependencies": {
13
13
  "@cleartrip/ct-design-typography": "2.6.0",
14
- "@cleartrip/ct-platform-supercoins-floating-island": "1.0.1-beta.3",
15
- "@cleartrip/ct-platform-shimmer": "3.0.3-beta.25",
16
- "@cleartrip/ct-platform-utils": "3.18.1-beta.17"
14
+ "@cleartrip/ct-platform-supercoins-floating-island": "1.0.1-beta.6",
15
+ "@cleartrip/ct-platform-utils": "3.18.1-beta.20",
16
+ "@cleartrip/ct-platform-shimmer": "3.0.3-beta.28"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "react": ">=16.8.0",