@bikdotai/bik-component-library 0.0.679-2 → 0.0.679-3

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.
Files changed (63) hide show
  1. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  2. package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
  3. package/dist/cjs/components/country-code-picker/CountryCodePicker.d.ts +0 -2
  4. package/dist/cjs/components/country-code-picker/CountryCodePicker.js +1 -1
  5. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.d.ts +12 -0
  6. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -0
  7. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.d.ts +13 -0
  8. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -0
  9. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.style.d.ts +8 -0
  10. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.style.js +55 -0
  11. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.d.ts +13 -0
  12. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -0
  13. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.style.d.ts +12 -0
  14. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.style.js +93 -0
  15. package/dist/cjs/components/feature-announcements/VideoModal.d.ts +8 -0
  16. package/dist/cjs/components/feature-announcements/VideoModal.js +1 -0
  17. package/dist/cjs/components/feature-announcements/index.d.ts +4 -0
  18. package/dist/cjs/components/index.d.ts +1 -0
  19. package/dist/cjs/components/input/Input.d.ts +0 -2
  20. package/dist/cjs/components/input/Input.js +1 -1
  21. package/dist/cjs/components/input/Input.styled.d.ts +0 -1
  22. package/dist/cjs/components/input/Input.styled.js +1 -1
  23. package/dist/cjs/hooks/index.d.ts +2 -0
  24. package/dist/cjs/hooks/useElementVisibility.d.ts +11 -0
  25. package/dist/cjs/hooks/useElementVisibility.js +1 -0
  26. package/dist/cjs/hooks/useFeatureAnnouncements.d.ts +17 -0
  27. package/dist/cjs/hooks/useFeatureAnnouncements.js +1 -0
  28. package/dist/cjs/index.d.ts +3 -0
  29. package/dist/cjs/index.js +1 -1
  30. package/dist/cjs/types/FeatureAnnouncement.types.d.ts +27 -0
  31. package/dist/cjs/types/index.d.ts +1 -0
  32. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  33. package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
  34. package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +0 -2
  35. package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
  36. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.d.ts +12 -0
  37. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -0
  38. package/dist/esm/components/feature-announcements/MajorUpdatePopup.d.ts +13 -0
  39. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -0
  40. package/dist/esm/components/feature-announcements/MajorUpdatePopup.style.d.ts +8 -0
  41. package/dist/esm/components/feature-announcements/MajorUpdatePopup.style.js +55 -0
  42. package/dist/esm/components/feature-announcements/MinorUpdatePopup.d.ts +13 -0
  43. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +1 -0
  44. package/dist/esm/components/feature-announcements/MinorUpdatePopup.style.d.ts +12 -0
  45. package/dist/esm/components/feature-announcements/MinorUpdatePopup.style.js +93 -0
  46. package/dist/esm/components/feature-announcements/VideoModal.d.ts +8 -0
  47. package/dist/esm/components/feature-announcements/VideoModal.js +1 -0
  48. package/dist/esm/components/feature-announcements/index.d.ts +4 -0
  49. package/dist/esm/components/index.d.ts +1 -0
  50. package/dist/esm/components/input/Input.d.ts +0 -2
  51. package/dist/esm/components/input/Input.js +1 -1
  52. package/dist/esm/components/input/Input.styled.d.ts +0 -1
  53. package/dist/esm/components/input/Input.styled.js +1 -1
  54. package/dist/esm/hooks/index.d.ts +2 -0
  55. package/dist/esm/hooks/useElementVisibility.d.ts +11 -0
  56. package/dist/esm/hooks/useElementVisibility.js +1 -0
  57. package/dist/esm/hooks/useFeatureAnnouncements.d.ts +17 -0
  58. package/dist/esm/hooks/useFeatureAnnouncements.js +1 -0
  59. package/dist/esm/index.d.ts +3 -0
  60. package/dist/esm/index.js +1 -1
  61. package/dist/esm/types/FeatureAnnouncement.types.d.ts +27 -0
  62. package/dist/esm/types/index.d.ts +1 -0
  63. package/package.json +5 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("@emotion/styled/base"),I=require("react/jsx-runtime"),e=require("../../../../assets/icons/ChartBar.svg.js"),C=require("../../../../assets/icons/maximize.svg.js");require("@amplitude/analytics-browser"),require("../../../../amplitude/model.js");var A=require("../../../../utils/StringUtils.js"),r=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var l=require("react");require("../../../checkBox/CheckBox.styled.js");var i=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../button/Button.js"),require("../../../toaster/Toaster.styled.js"),require("../../../tooltips/Tooltip.js"),require("../../../spinner/Spinner.js"),require("../../../stepper/Stepper.styled.js"),require("../../../tag/Tag.js");var c=require("../../../icon-button/IconButton.js");require("../../../template-preview/TemplatePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../curtain/CurtainHelper.js"),require("../../../variable-picker-v3/model.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../template-preview/models/WhatsAppTemplate.js"),require("../../../template-preview/models/Channels.js"),require("lodash");var s=require("../../../modals/styledModal.js");require("../../../template-preview/models/RCSTemplate.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.js"),require("../../../template-context-mapper/styles/TemplateAnalyticsStyles.js"),require("../../../template-context-mapper/utils/TemplateConstants.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../template-context-mapper/modalElements/Body.js"),require("../../../template-context-mapper/modalElements/Header.js"),require("../../../../_virtual/_tslib.js"),require("../../../zeroState/ZeroState.js"),require("../../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../../../input/Input.js"),require("react-bootstrap"),require("../../../floating-action-button/FloatingActionButton.styles.js"),require("../../../image-compress/ImageCompress.js"),require("../../../progress-bar/ProgressBarComponent.js"),require("../../../progress-bar-v2/ProgressBarV2.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("../../../datePicker/DatePickerWrapper.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("react-calendar"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../../../../utils/DateUtils.js");var t=require("../utils/calcPercentage.js");require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var a=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../StackedBarChart/StackedBarDistributionChart.js"),require("../StackedBarChart/StackedBarDistributionChart.model.js");var d=require("../VerticalBarGraph/VerticalGraph.js");require("../VerticalBarGraph/FunnelVerticalBarGraph.js"),require("../heatmap/HeatMap.js"),require("../heatmap/HeatMapVertical.js"),require("../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),require("../../../avatar/Avatar.js"),require("../../../avatar/AvatarHelper.js"),require("../../../alerts/Alert.styled.js"),require("../../../alerts/AlertHelper.js"),require("../../../thumbnail/Thumbnail.js"),require("../../../curtain/Curtain.styled.js"),require("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../plans/SubscriptionPlansCollected.js"),require("../../../tabs/Tabs.js"),require("../../../TablePagination/TablePagination.styled.js"),require("../../../TablePagination/TablePaginationCard.js"),require("../../../states/StateComponent.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditor.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),require("../../../card-selection-modal/CardSelectionModal.styled.js"),require("react-image-crop"),require("../../../buttonGroup/ButtonGroupStyle.js"),require("../../../accordion/Accordion.style.js"),require("../../../accordion/AccordionArrow.js"),require("../../../file-uploader/FileUploaderStyle.js"),require("../../../colourInput/ColourInput.styled.js"),require("../../../bik-layout/CommonStyles.js"),require("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js"),require("../../../discount-modal/type.js"),require("../../../product-picker-v2/modal.js"),require("../../../modals/modal.styled.js"),require("../../../variable-picker-v3/NoResult.js"),require("../../../variable-picker-v3/styles.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js"),require("../../../SearchFilter/components/DateRangeOnlyButton.js"),require("../../../input-with-vars/InputWithVariables.js"),require("../../../star-rating/StarRating.js"),require("../../../dashboard-review-popup/components/FiveStar.styled.js"),require("../../../dashboard-review-popup/components/Form.styled.js"),require("../../../dashboard-review-popup/components/ZeroState.js"),require("../../../dashboard-review-popup/DashboardReviewPopUp.styled.js"),require("../../../testimonial-card/TestimonialCard.style.js"),require("../../../slider/slider.js"),require("react-slick"),require("../../../carousel-preview/CarouselPreview.style.js"),require("../../../template-preview/RCS/RCSPreview.styled.js"),require("../../../card-selector/CardSelector.styled.js"),require("../../../action-button/ActionButton.styled.js"),require("../../../floating-input-dropdown/FloatingInputDropdown.js"),require("../../../dropdown/MultilevelDropdownPopover/index.js"),require("../../../multi-level-dropdown/MultiLevelDropdown.styled.js"),require("../../../data-source-panel/DataSourceInfoFooter.js"),require("../../../data-source-panel/DataSourcePanel.style.js"),require("../../../data-source-panel/Modals/DescriptionModal.js"),require("../../../data-source-panel/model.js"),require("../../../unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.js"),require("../../../unsatisfactory-response-list/UnsatisfactoryResponseList.style.js");var n=require("chart.js"),o=require("react-chartjs-2");function u(g){return g&&"object"==typeof g&&"default"in g?g:{default:g}}var b=u(g);n.Chart.register(n.ArcElement,n.Legend);const p=g=>({plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:I=>{var e;if(!I.label)return" 0%";const C=I.dataset.data.reduce(((g,I)=>g+I),0),A=parseFloat((I.raw/C*100).toFixed(1)),{label:r,raw:l}=I,i=null!==(e=null==g?void 0:g.symbol)&&void 0!==e?e:"",c=null==g?void 0:g.isInternationalStore;return[` ${r}`,` ${i}${void 0!==c?c?t.truncateValueForInternationalStore(l):t.truncateValueForIndianStore(l):l} (${A}% of ${i}${void 0!==c?c?t.truncateValueForInternationalStore(C):t.truncateValueForIndianStore(C):C})`]}}}}}),G=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],y=b.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(g=>r.COLORS.surface.standard),";border:1px solid ",(g=>r.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErRThCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNv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REYXRhO1xyXG59O1xyXG5jb25zdCBvcHRpb25zID0gKGN1cnJlbmN5UHJvcHMpID0+ICh7XHJcbiAgICBwbHVnaW5zOiB7XHJcbiAgICAgICAgbGVnZW5kOiB7XHJcbiAgICAgICAgICAgIGRpc3BsYXk6IGZhbHNlLFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgdG9vbHRpcDoge1xyXG4gICAgICAgICAgICBlbmFibGVkOiB0cnVlLFxyXG4gICAgICAgICAgICBjYWxsYmFja3M6IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsOiAodG9vbHRpcEl0ZW0pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgX2E7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgbGFiZWwsIHJhdyB9ID0gdG9vbHRpcEl0ZW07XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3ltYm9sID0gKF9hID0gY3VycmVuY3lQcm9wcyA9PT0gbnVsbCB8fCBjdXJyZW5jeVByb3BzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBjdXJyZW5jeVByb3BzLnN5bWJvbCkgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaXNJbnRsID0gY3VycmVuY3lQcm9wcyA9PT0gbnVsbCB8fCBjdXJyZW5jeVByb3BzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBjdXJyZW5jeVByb3BzLmlzSW50ZXJuYXRpb25hbFN0b3JlO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gaXNJbnRsICE9PSB1bmRlZmluZWRcclxuICAgICAgICAgICAgICAgICAgICAgICAgPyBpc0ludGxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1bmNhdGVWYWx1ZUZvckludGVybmF0aW9uYWxTdG9yZShyYXcpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRydW5jYXRlVmFsdWVGb3JJbmRpYW5TdG9yZShyYXcpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDogcmF3O1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsVmFsdWUgPSBpc0ludGwgIT09IHVuZGVmaW5lZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlzSW50bFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVuY2F0ZVZhbHVlRm9ySW50ZXJuYXRpb25hbFN0b3JlKHRvdGFsKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB0cnVuY2F0ZVZhbHVlRm9ySW5kaWFuU3RvcmUodG90YWwpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDogdG90YWw7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYCAke2xhYmVsfWAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGAgJHtzeW1ib2x9JHt2YWx1ZX0gKCR7cGVyY2VudGFnZX0lIG9mICR7c3ltYm9sfSR7dG90YWxWYWx1ZX0pYCxcclxuICAgICAgICAgICAgICAgICAgICBdO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICA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AgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IFsxMDBdLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IFsnI0YwRjBGMCddLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogMCxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgICAgIGxhYmVsczogW10sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICBjb25zdCBkYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgbGFiZWxzOiBzbGljZXMubWFwKChzbGljZSkgPT4gU3RyaW5nVXRpbHMuY2FwaXRhbGl6ZUVhY2hXb3JkKHNsaWNlLm5hbWUpKSxcclxuICAgICAgICAgICAgICAgIGRhdGFzZXRzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBzbGljZXMubWFwKChzbGljZSkgPT4gc2xpY2UuY291bnQpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IHNsaWNlcy5tYXAoKHNsaWNlLCBpbmRleCkgPT4geyB2YXIgX2E7IHJldHVybiAoX2EgPSBzbGljZS5jb2xvcikgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF07IH0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJDb2xvcjogWyd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZSddLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogNCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyUmFkaXVzOiA4LFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodHJ1bmNhdGVTbGljZXMgJiYgc2xpY2VzLmxlbmd0aCA+IHRydW5jYXRlU2xpY2VzKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHRydW5jYXRlZFNsaWNlcyA9IHNsaWNlcy5zbGljZSgwLCB0cnVuY2F0ZVNsaWNlcyk7XHJcbiAgICAgICAgICAgIGNvbnN0IG90aGVyU2xpY2VzID0gc2xpY2VzLnNsaWNlKHRydW5jYXRlU2xpY2VzKTtcclxuICAgICAgICAgICAgY29uc3Qgb3RoZXJDb3VudCA9IG90aGVyU2xpY2VzLnJlZHVjZSgoc3VtLCBzbGljZSkgPT4gc3VtICsgc2xpY2UuY291bnQsIDApO1xyXG4gICAgICAgICAgICB0cnVuY2F0ZWRTbGljZXMucHVzaCh7IG5hbWU6ICdPdGhlcicsIGNvdW50OiBvdGhlckNvdW50IH0pO1xyXG4gICAgICAgICAgICBjb25zdCB0cnVuY2F0ZWREYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgbGFiZWxzOiB0cnVuY2F0ZWRTbGljZXMubWFwKChzbGljZSkgPT4gU3RyaW5nVXRpbHMuY2FwaXRhbGl6ZShzbGljZS5uYW1lKSksXHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogdHJ1bmNhdGVkU2xpY2VzLm1hcCgoc2xpY2UpID0+IHNsaWNlLmNvdW50KSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiB0cnVuY2F0ZWRTbGljZ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AgICAgfVxyXG4gICAgfSwgW3NsaWNlcywgdHJ1bmNhdGVTbGljZXNdKTtcclxuICAgIGlmICghZGF0YSkge1xyXG4gICAgICAgIHJldHVybiBfanN4KF9GcmFnbWVudCwge30pO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIChfanN4cyhfRnJhZ21lbnQsIHsgY2hpbGRyZW46IFtfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6IGhpZGVUaXRsZSB8fCAodGl0bGUgPT09IG51bGwgfHwgdGl0bGUgPT09IHZvaWQgMCA/IHZvaWQgMCA6IHRpdGxlLmxlbmd0aCkgPT09IDAgPyAnZmxleC1lbmQnIDogJ3NwYWNlLWJldHdlZW4nLFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBbIWhpZGVUaXRsZSAmJiB0aXRsZSAmJiAoX2pzeChUaXRsZU1lZGl1bSwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IHRpdGxlIH0pKSksIF9qc3hzKFwiZGl2XCIsIHsgY2hpbGRyZW46IFtzaG93Q29udmVydFRvQmFyQ2hhcnQgJiYgKF9qc3goSWNvbkJ1dHRvbiwgeyBJY29uOiBCYXJDaGFydEljb24sIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd0JhckNoYXJ0KHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSkpLCBhbGxvd0NoYXJ0UG9wdXAgJiYgKF9qc3goSWNvbkJ1dHRvbiwgeyBJY29uOiBNYXhpbWl6ZUljb24sIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd1BvcHVwKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSkpXSB9KV0gfSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYgJywgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWduSXRlbXM6ICdjZW50ZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdjZW50ZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6ICh0cnVuY2F0ZVNsaWNlcyA/IHRydW5jYXRlZERhdGEgOiBkYXRhKSwgb3B0aW9uczogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBvcHRpb25zKGN1cnJlbmN5UHJvcHMpKSwgeyBtYWludGFpbkFzcGVjdFJhdGlvOiBzaXplID8gZmFsc2UgOiB0cnVlIH0pIH0pIH0pKSB9KSksIF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IGNsYXNzTmFtZTogJ2NvbC02Jywgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmdMZWZ0OiA0OCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsZXhEaXJlY3Rpb246ICdjb2x1bW4nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdmbGV4LXN0YXJ0JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogdHJ1bmNhdGVTbGljZXMgPyB0cnVuY2F0ZWRTbGljZXNXaXRoQ29sb3IgOiBzbGljZXNXaXRoQ29sb3IsIHNpemU6IHNpemUgfSkgfSkpXSB9KSksIHNob3dQb3B1cCAmJiAoX2pzeChTdHlsZWRNb2RhbCwgT2JqZWN0LmFzc2lnbih7IG9wZW46IHNob3dQb3B1cCwgb25DbG9zZTogKCkgPT4gc2V0U2hvd1BvcHVwKGZhbHNlKSwgY2xvc2VPbk91dHNpZGVDbGljazogdHJ1ZSwgaGVhZGluZ1RpdGxlOiB0aXRsZSwgd2lkdGg6IFwiNzUlXCIgfSwgeyBjaGlsZHJlbjogX2pzeHMoXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IDI0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnc3BhY2UtYmV0d2VlbicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogJzgwdmgnLFxyXG4gICAgICAgICAgICAgICAgICAgIH0gfSwgeyBjaGlsZHJlbjogW19qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7IHdpZHRoOiAnNTUlJywgbWFyZ2luTGVmdDogJzQlJyB9IH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAnMTAwJScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogJzEwMCUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWduSXRlbXM6ICdjZW50ZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5Q29udGVudDogJ2NlbnRlcicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyhjdXJyZW5jeVByb3BzKSksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBzdHlsZToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAnMzAlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6ICcxMDAlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvd1k6ICdhdXRvJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSwgeyBjaGlsZHJlbjogX2pzeChQaWVDaGFydCwgeyBzbGljZXM6IHNsaWNlc1dpdGhDb2xvciB9KSB9KSldIH0pKSB9KSkpLCBzaG93QmFyQ2hhcnQgJiYgYmFyQ2hhcnREYXRhICYmIChfanN4KFN0eWxlZE1vZGFsLCBPYmplY3QuYXNzaWduKHsgb3Blbjogc2hvd0JhckNoYXJ0LCBvbkNsb3NlOiAoKSA9PiBzZXRTaG93QmFyQ2hhcnQoZmFsc2UpLCBjbG9zZU9uT3V0c2lkZUNsaWNrOiB0cnVlLCBoZWFkaW5nVGl0bGU6IHRpdGxlLCB3aWR0aDogXCI4NSVcIiB9LCB7IGNoaWxkcmVuOiBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBzdHlsZToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiAnMjRweCAwJyxcclxuICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IF9qc3goVmVydGljYWxHcmFwaCwgeyB4QXhpczogYmFyQ2hhcnREYXRhLnhBeGlzLCB5QXhpczogYmFyQ2hhcnREYXRhLnlBeGlzLCBiYXJDb2xvclJHQkE6IGJhckNoYXJ0RGF0YSA9PT0gbnVsbCB8fCBiYXJDaGFydERhdGEgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGJhckNoYXJ0RGF0YS5iYXJDb2xvclJHQkEgfSkgfSkpIH0pKSldIH0pKTtcclxufTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9UGllQ2hhcnRBbmFseXRpY3MuanMubWFwIl19 */"));exports.Card=g=>I.jsx(y,Object.assign({style:{padding:24}},{children:g.children})),exports.PieChartAnalytics=g=>{let{title:r,slices:t,size:n,allowChartPopup:u,showConvertToBarChart:b,truncateSlices:y,barChartXAxisTitle:h,barChartYAxisTitle:X,hideTitle:m=!1,currencyProps:B}=g;const[x,j]=l.useState(!1),[Z,H]=l.useState(!1),[N,W]=l.useState([]),[Y,R]=l.useState(),[J,V]=l.useState(),[F,S]=l.useState([]),[v,q]=l.useState(null);return l.useEffect((()=>{const g=t.reduce(((g,I)=>g+I.count),0);let I=[];if(I=Object.keys(t).map(((g,I)=>Object.assign({color:G[I%G.length]},t[g]))),W([...I]),0===g){R({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}],labels:[]})}else{const g={labels:t.map((g=>A.default.capitalizeEachWord(g.name))),datasets:[{data:t.map((g=>g.count)),backgroundColor:t.map(((g,I)=>{var e;return null!==(e=g.color)&&void 0!==e?e:G[I%G.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};R(g)}if(y&&t.length>y){const g=t.slice(0,y),I=t.slice(y).reduce(((g,I)=>g+I.count),0);g.push({name:"Other",count:I});const e={labels:g.map((g=>A.default.capitalize(g.name))),datasets:[{data:g.map((g=>g.count)),backgroundColor:g.map(((g,I)=>{var e;return null!==(e=g.color)&&void 0!==e?e:G[I%G.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};V(e);const C=g.map(((g,I)=>Object.assign({color:G[I%G.length]},g)));S(C)}b&&q(((g,I,e)=>({xAxis:{data:g.map((g=>g.name)),title:null!=I?I:""},yAxis:{data:g.map((g=>g.count)),title:null!=e?e:""},barColorRGBA:{r:210,g:174,b:255,a:1}}))(t,h,X))}),[t,y]),Y?I.jsxs(I.Fragment,{children:[I.jsxs("div",Object.assign({style:{display:"flex",justifyContent:m||0===(null==r?void 0:r.length)?"flex-end":"space-between"}},{children:[!m&&r&&I.jsx(i.TitleMedium,Object.assign({style:{marginBottom:16}},{children:r})),I.jsxs("div",{children:[b&&I.jsx(c.IconButton,{Icon:e.default,onClick:()=>{H(!0)}}),u&&I.jsx(c.IconButton,{Icon:C.default,onClick:()=>{j(!0)}})]})]})),I.jsxs("div",Object.assign({className:"row"},{children:[I.jsx("div",Object.assign({className:"col-6 ",style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:I.jsx("div",Object.assign({style:{width:n,height:n}},{children:I.jsx(o.Doughnut,{data:y?J:Y,options:Object.assign(Object.assign({},p(B)),{maintainAspectRatio:!n})})}))})),I.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"flex-start"}},{children:I.jsx(a.PieChart,{slices:y?F:N,size:n})}))]})),x&&I.jsx(s.StyledModal,Object.assign({open:x,onClose:()=>j(!1),closeOnOutsideClick:!0,headingTitle:r,width:"75%"},{children:I.jsxs("div",Object.assign({style:{padding:24,display:"flex",justifyContent:"space-between",height:"80vh"}},{children:[I.jsx("div",Object.assign({style:{width:"55%",marginLeft:"4%"}},{children:I.jsx("div",Object.assign({style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},{children:I.jsx(o.Doughnut,{data:Y,options:Object.assign(Object.assign({},p(B)),{maintainAspectRatio:!n})})}))})),I.jsx("div",Object.assign({style:{width:"30%",height:"100%",overflowY:"auto"}},{children:I.jsx(a.PieChart,{slices:N})}))]}))})),Z&&v&&I.jsx(s.StyledModal,Object.assign({open:Z,onClose:()=>H(!1),closeOnOutsideClick:!0,headingTitle:r,width:"85%"},{children:I.jsx("div",Object.assign({style:{padding:"24px 0"}},{children:I.jsx(d.VerticalGraph,{xAxis:v.xAxis,yAxis:v.yAxis,barColorRGBA:null==v?void 0:v.barColorRGBA})}))}))]}):I.jsx(I.Fragment,{})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),g=require("react/jsx-runtime"),I=require("../../../../assets/icons/ChartBar.svg.js"),C=require("../../../../assets/icons/maximize.svg.js");require("@amplitude/analytics-browser"),require("../../../../amplitude/model.js");var A=require("../../../../utils/StringUtils.js"),r=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var i=require("react");require("../../../checkBox/CheckBox.styled.js");var l=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../button/Button.js"),require("../../../toaster/Toaster.styled.js"),require("../../../tooltips/Tooltip.js"),require("../../../spinner/Spinner.js"),require("../../../stepper/Stepper.styled.js"),require("../../../tag/Tag.js");var c=require("../../../icon-button/IconButton.js");require("../../../template-preview/TemplatePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../curtain/CurtainHelper.js"),require("../../../variable-picker-v3/model.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../template-preview/models/WhatsAppTemplate.js"),require("../../../template-preview/models/Channels.js"),require("lodash");var t=require("../../../modals/styledModal.js");require("../../../template-preview/models/RCSTemplate.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.js"),require("../../../template-context-mapper/styles/TemplateAnalyticsStyles.js"),require("../../../template-context-mapper/utils/TemplateConstants.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../template-context-mapper/modalElements/Body.js"),require("../../../template-context-mapper/modalElements/Header.js"),require("../../../../_virtual/_tslib.js"),require("../../../zeroState/ZeroState.js"),require("../../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../../../input/Input.js"),require("react-bootstrap"),require("../../../floating-action-button/FloatingActionButton.styles.js"),require("../../../image-compress/ImageCompress.js"),require("../../../progress-bar/ProgressBarComponent.js"),require("../../../progress-bar-v2/ProgressBarV2.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("../../../datePicker/DatePickerWrapper.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("react-calendar"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../../../../utils/DateUtils.js");var s=require("../utils/calcPercentage.js");require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var a=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../StackedBarChart/StackedBarDistributionChart.js"),require("../StackedBarChart/StackedBarDistributionChart.model.js");var d=require("../VerticalBarGraph/VerticalGraph.js");require("../VerticalBarGraph/FunnelVerticalBarGraph.js"),require("../heatmap/HeatMap.js"),require("../heatmap/HeatMapVertical.js"),require("../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),require("../../../avatar/Avatar.js"),require("../../../avatar/AvatarHelper.js"),require("../../../alerts/Alert.styled.js"),require("../../../alerts/AlertHelper.js"),require("../../../thumbnail/Thumbnail.js"),require("../../../curtain/Curtain.styled.js"),require("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../plans/SubscriptionPlansCollected.js"),require("../../../tabs/Tabs.js"),require("../../../TablePagination/TablePagination.styled.js"),require("../../../TablePagination/TablePaginationCard.js"),require("../../../states/StateComponent.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditor.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),require("../../../card-selection-modal/CardSelectionModal.styled.js"),require("react-image-crop"),require("../../../buttonGroup/ButtonGroupStyle.js"),require("../../../accordion/Accordion.style.js"),require("../../../accordion/AccordionArrow.js"),require("../../../file-uploader/FileUploaderStyle.js"),require("../../../colourInput/ColourInput.styled.js"),require("../../../bik-layout/CommonStyles.js"),require("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js"),require("../../../discount-modal/type.js"),require("../../../product-picker-v2/modal.js"),require("../../../modals/modal.styled.js"),require("../../../variable-picker-v3/NoResult.js"),require("../../../variable-picker-v3/styles.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js"),require("../../../SearchFilter/components/DateRangeOnlyButton.js"),require("../../../input-with-vars/InputWithVariables.js"),require("../../../star-rating/StarRating.js"),require("../../../dashboard-review-popup/components/FiveStar.styled.js"),require("../../../dashboard-review-popup/components/Form.styled.js"),require("../../../dashboard-review-popup/components/ZeroState.js"),require("../../../dashboard-review-popup/DashboardReviewPopUp.styled.js"),require("../../../testimonial-card/TestimonialCard.style.js"),require("../../../slider/slider.js"),require("react-slick"),require("../../../carousel-preview/CarouselPreview.style.js"),require("../../../template-preview/RCS/RCSPreview.styled.js"),require("../../../card-selector/CardSelector.styled.js"),require("../../../action-button/ActionButton.styled.js"),require("../../../floating-input-dropdown/FloatingInputDropdown.js"),require("../../../dropdown/MultilevelDropdownPopover/index.js"),require("../../../multi-level-dropdown/MultiLevelDropdown.styled.js"),require("../../../data-source-panel/DataSourceInfoFooter.js"),require("../../../data-source-panel/DataSourcePanel.style.js"),require("../../../data-source-panel/Modals/DescriptionModal.js"),require("../../../data-source-panel/model.js"),require("../../../unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.js"),require("../../../unsatisfactory-response-list/UnsatisfactoryResponseList.style.js"),require("next/router"),require("react-joyride"),require("../../../feature-announcements/MajorUpdatePopup.style.js"),require("../../../feature-announcements/MinorUpdatePopup.style.js");var n=require("chart.js"),o=require("react-chartjs-2");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=u(e);n.Chart.register(n.ArcElement,n.Legend);const p=e=>({plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:g=>{var I;if(!g.label)return" 0%";const C=g.dataset.data.reduce(((e,g)=>e+g),0),A=parseFloat((g.raw/C*100).toFixed(1)),{label:r,raw:i}=g,l=null!==(I=null==e?void 0:e.symbol)&&void 0!==I?I:"",c=null==e?void 0:e.isInternationalStore;return[` ${r}`,` ${l}${void 0!==c?c?s.truncateValueForInternationalStore(i):s.truncateValueForIndianStore(i):i} (${A}% of ${l}${void 0!==c?c?s.truncateValueForInternationalStore(C):s.truncateValueForIndianStore(C):C})`]}}}}}),G=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],y=b.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>r.COLORS.surface.standard),";border:1px solid ",(e=>r.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErRThCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgQmFyQ2hhcnRJY29uIGZyb20gJ0BzcmMvYXNzZXRzL2ljb25zL0NoYXJ0QmFyLnN2Zyc7XHJcbmltcG9ydCBNYXhpbWl6ZUljb24gZnJvbSAnQHNyYy9hc3NldHMvaWNvbnMvbWF4aW1pemUuc3ZnJztcclxuaW1wb3J0IHsgU3RyaW5nVXRpbHMgfSBmcm9tIFwiLi4vLi4vLi4vLi4vaW5kZXhcIjtcclxuaW1wb3J0IHsgQXJjRWxlbWVudCwgQ2hhcnQgYXMgQ2hhcnRKUywgTGVnZW5kIH0gZnJvbSAnY2hhcnQuanMnO1xyXG5pbXBvcnQg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GE6IHhBeGlzRGF0YSxcclxuICAgICAgICB0aXRsZTogeEF4aXNUaXRsZSAhPT0gbnVsbCAmJiB4QXhpc1RpdGxlICE9PSB2b2lkIDAgPyB4QXhpc1RpdGxlIDogJycsXHJcbiAgICB9O1xyXG4gICAgY29uc3QgeUF4aXMgPSB7XHJcbiAgICAgICAgZGF0YTogeUF4aXNEYXRhLFxyXG4gICAgICAgIHRpdGxlOiB5QXhpc1RpdGxlICE9PSBudWxsICYmIHlBeGlzVGl0bGUgIT09IHZvaWQgMCA/IHlBeGlzVGl0bGUgOiAnJyxcclxuICAgIH07XHJcbiAgICBjb25zdCBiYXJDaGFydERhdGEgPSB7XHJcbiAgICAgICAgeEF4aXMsXHJcbiAgICAgICAgeUF4aXMsXHJcbiAgICAgICAgYmFyQ29sb3JSR0JBOiB7IHI6IDIxMCwgZzogMTc0LCBiOiAyNTUsIGE6IDEgfSxcclxuICAgIH07XHJcbiAgICByZXR1cm4gYmFyQ2hhcnREYXRhO1xyXG59O1xyXG5jb25zdCBvcHRpb25zID0gKGN1cnJlbmN5UHJvcHMpID0+ICh7XHJcbiAgICBwbHVnaW5zOiB7XHJcbiAgICAgICAgbGVnZW5kOiB7XHJcbiAgICAgICAgICAgIGRpc3BsYXk6IGZhbHNlLFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgdG9vbHRpcDoge1xyXG4gICAgICAgICAgICBlbmFibGVkOiB0cnVlLFxyXG4gICAgICAgICAgICBjYWxsYmFja3M6IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsOiAodG9vbHRpcEl0ZW0pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgX2E7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgbGFiZWwsIHJhdyB9ID0gdG9vbHRpcEl0ZW07XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3ltYm9sID0gKF9hID0gY3VycmVuY3lQcm9wcyA9PT0gbnVsbCB8fCBjdXJyZW5jeVByb3BzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBjdXJyZW5jeVByb3BzLnN5bWJvbCkgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaXNJbnRsID0gY3VycmVuY3lQcm9wcyA9PT0gbnVsbCB8fCBjdXJyZW5jeVByb3BzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBjdXJyZW5jeVByb3BzLmlzSW50ZXJuYXRpb25hbFN0b3JlO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gaXNJbnRsICE9PSB1bmRlZmluZWRcclxuICAgICAgICAgICAgICAgICAgICAgICAgPyBpc0ludGxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1bmNhdGVWYWx1ZUZvckludGVybmF0aW9uYWxTdG9yZShyYXcpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRydW5jYXRlVmFsdWVGb3JJbmRpYW5TdG9yZShyYXcpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDogcmF3O1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsVmFsdWUgPSBpc0ludGwgIT09IHVuZGVmaW5lZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlzSW50bFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVuY2F0ZVZhbHVlRm9ySW50ZXJuYXRpb25hbFN0b3JlKHRvdGFsKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB0cnVuY2F0ZVZhbHVlRm9ySW5kaWFuU3RvcmUodG90YWwpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDogdG90YWw7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYCAke2xhYmVsfWAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGAgJHtzeW1ib2x9JHt2YWx1ZX0gKCR7cGVyY2VudGFnZX0lIG9mICR7c3ltYm9sfSR7dG90YWxWYWx1ZX0pYCxcclxuICAgICAgICAgICAgICAgICAgICBdO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICB9LFxyXG4gICAgfSxcclxufSk7XHJcbmNvbnN0IEdSQVBIX0NPTE9SUyA9IFtcclxuICAgICcjNUUwN0JCJyxcclxuICAgICcjOUU3N0VEJyxcclxuICAgICcjRDJBRUZGJyxcclxuICAgICcjQ0RFMUZGJyxcclxuICAgICcjOTJBRkZBJyxcclxuICAgICcjMzkzNUUxJyxcclxuXTtcclxuY29uc3QgQ2FydFN0eWxlZCA9IHN0eWxlZC5kaXYgYFxuXHRiYWNrZ3JvdW5kOiAkeyhwcm9wcykgPT4gQ09MT1JTLnN1cmZhY2Uuc3RhbmRhcmR9O1xuXHRib3JkZXI6IDFweCBzb2xpZCAkeyhwcm9wcykgPT4gQ09MT1JTLnN0cm9rZS5wcmltYXJ5fTtcblx0Ym9yZGVyLXJhZGl1czogNHB4O1xuYDtcclxuZXhwb3J0IGNvbnN0IENhcmQgPSAocHJvcHMpID0+IHtcclxuICAgIHJldHVybiBfanN4KENhcnRTdHlsZWQs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zdW0gKyBzbGljZS5jb3VudCwgMCk7XHJcbiAgICAgICAgbGV0IHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBbXTtcclxuICAgICAgICB1cGRhdGVkU2xpY2VzV2l0aENvbG9yID0gT2JqZWN0LmtleXMoc2xpY2VzKS5tYXAoKGtleSwgaW5kZXgpID0+IChPYmplY3QuYXNzaWduKHsgY29sb3I6IEdSQVBIX0NPTE9SU1tpbmRleCAlIEdSQVBIX0NPTE9SUy5sZW5ndGhdIH0sIHNsaWNlc1trZXldKSkpO1xyXG4gICAgICAgIHNldFNsaWNlc1dpdGhDb2xvcihbLi4udXBkYXRlZFNsaWNlc1dpdGhDb2xvcl0pO1xyXG4gICAgICAgIGlmICh0b3RhbFN1bSA9PT0gMCkge1xyXG4gICAgICAgICAgICBjb25zdCBkYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IFsxMDBdLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IFsnI0YwRjBGMCddLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogMCxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgICAgIGxhYmVsczogW10sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICBjb25zdCBkYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgbGFiZWxzOiBzbGljZXMubWFwKChzbGljZSkgPT4gU3RyaW5nVXRpbHMuY2FwaXRhbGl6ZUVhY2hXb3JkKHNsaWNlLm5hbWUpKSxcclxuICAgICAgICAgICAgICAgIGRhdGFzZXRzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBzbGljZXMubWFwKChzbGljZSkgPT4gc2xpY2UuY291bnQpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IHNsaWNlcy5tYXAoKHNsaWNlLCBpbmRleCkgPT4geyB2YXIgX2E7IHJldHVybiAoX2EgPSBzbGljZS5jb2xvcikgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF07IH0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJDb2xvcjogWyd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZSddLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogNCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyUmFkaXVzOiA4LFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodHJ1bmNhdGVTbGljZXMgJiYgc2xpY2VzLmxlbmd0aCA+IHRydW5jYXRlU2xpY2VzKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHRydW5jYXRlZFNsaWNlcyA9IHNsaWNlcy5zbGljZSgwLCB0cnVuY2F0ZVNsaWNlcyk7XHJcbiAgICAgICAgICAgIGNvbnN0IG90aGVyU2xpY2VzID0gc2xpY2VzLnNsaWNlKHRydW5jYXRlU2xpY2VzKTtcclxuICAgICAgICAgICAgY29uc3Qgb3RoZXJDb3VudCA9IG90aGVyU2xpY2VzLnJlZHVjZSgoc3VtLCBzbGljZSkgPT4gc3VtICsgc2xpY2UuY291bnQsIDApO1xyXG4gICAgICAgICAgICB0cnVuY2F0ZWRTbGljZXMucHVzaCh7IG5hbWU6ICdPdGhlcicsIGNvdW50OiBvdGhlckNvdW50IH0pO1xyXG4gICAgICAgICAgICBjb25zdCB0cnVuY2F0ZWREYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgbGFiZWxzOiB0cnVuY2F0ZWRTbGljZXMubWFwKChzbGljZSkgPT4gU3RyaW5nVXRpbHMuY2FwaXRhbGl6ZShzbGljZS5uYW1lKSksXHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogdHJ1bmNhdGVkU2xpY2VzLm1hcCgoc2xpY2UpID0+IHNsaWNlLmNvdW50KSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiB0cnVuY2F0ZWRTbGljZXMubWFwKChzbGljZSwgaW5kZXgpID0+IHsgdmFyIF9hOyByZXR1cm4gKF9hID0gc2xpY2UuY29sb3IpICE9PSBudWxsICYmIF9hICE9PSB2b2lkIDAgPyBfYSA6IEdSQVBIX0NPTE9SU1tpbmRleCAlIEdSQVBIX0NPTE9SUy5sZW5ndGhdOyB9KSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyQ29sb3I6IFsnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnXSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyV2lkdGg6IDQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlclJhZGl1czogOCxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgc2V0VHJ1bmNhdGVkRGF0YSh0cnVuY2F0ZWREYXRhU2V0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aXRsZSAmJiB0aXRsZSAmJiAoX2pzeChUaXRsZU1lZGl1bSwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IHRpdGxlIH0pKSksIF9qc3hzKFwiZGl2XCIsIHsgY2hpbGRyZW46IFtzaG93Q29udmVydFRvQmFyQ2hhcnQgJiYgKF9qc3goSWNvbkJ1dHRvbiwgeyBJY29uOiBCYXJDaGFydEljb24sIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd0JhckNoYXJ0KHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSkpLCBhbGxvd0NoYXJ0UG9wdXAgJiYgKF9qc3goSWNvbkJ1dHRvbiwgeyBJY29uOiBNYXhpbWl6ZUljb24sIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd1BvcHVwKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSkpXSB9KV0gfSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYgJywgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWduSXRlbXM6ICdjZW50ZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdjZW50ZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6ICh0cnVuY2F0ZVNsaWNlcyA/IHRydW5jYXRlZERhdGEgOiBkYXRhKSwgb3B0aW9uczogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBvcHRpb25zKGN1cnJlbmN5UHJvcHMpKSwgeyBtYWludGFpbkFzcGVjdFJhdGlvOiBzaXplID8gZmFsc2UgOiB0cnVlIH0pIH0pIH0pKSB9KSksIF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IGNsYXNzTmFtZTogJ2NvbC02Jywgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmdMZWZ0OiA0OCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsZXhEaXJlY3Rpb246ICdjb2x1bW4nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdmbGV4LXN0YXJ0JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogdHJ1bmNhdGVTbGljZXMgPyB0cnVuY2F0ZWRTbGljZXNXaXRoQ29sb3IgOiBzbGljZXNXaXRoQ29sb3IsIHNpemU6IHNpemUgfSkgfSkpXSB9KSksIHNob3dQb3B1cCAmJiAoX2pzeChTdHlsZWRNb2RhbCwgT2JqZWN0LmFzc2lnbih7IG9wZW46IHNob3dQb3B1cCwgb25DbG9zZTogKCkgPT4gc2V0U2hvd1BvcHVwKGZhbHNlKSwgY2xvc2VPbk91dHNpZGVDbGljazogdHJ1ZSwgaGVhZGluZ1RpdGxlOiB0aXRsZSwgd2lkdGg6IFwiNzUlXCIgfSwgeyBjaGlsZHJlbjogX2pzeHMoXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IDI0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnc3BhY2UtYmV0d2VlbicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogJzgwdmgnLFxyXG4gICAgICAgICAgICAgICAgICAgIH0gfSwgeyBjaGlsZHJlbjogW19qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7IHdpZHRoOiAnNTUlJywgbWFyZ2luTGVmdDogJzQlJyB9IH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAnMTAwJScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogJzEwMCUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWduSXRlbXM6ICdjZW50ZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5Q29udGVudDogJ2NlbnRlcicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC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Q2hhcnREYXRhLnhBeGlzLCB5QXhpczogYmFyQ2hhcnREYXRhLnlBeGlzLCBiYXJDb2xvclJHQkE6IGJhckNoYXJ0RGF0YSA9PT0gbnVsbCB8fCBiYXJDaGFydERhdGEgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGJhckNoYXJ0RGF0YS5iYXJDb2xvclJHQkEgfSkgfSkpIH0pKSldIH0pKTtcclxufTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9UGllQ2hhcnRBbmFseXRpY3MuanMubWFwIl19 */"));exports.Card=e=>g.jsx(y,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:r,slices:s,size:n,allowChartPopup:u,showConvertToBarChart:b,truncateSlices:y,barChartXAxisTitle:h,barChartYAxisTitle:X,hideTitle:m=!1,currencyProps:B}=e;const[x,j]=i.useState(!1),[Z,H]=i.useState(!1),[N,W]=i.useState([]),[Y,R]=i.useState(),[J,V]=i.useState(),[F,S]=i.useState([]),[v,q]=i.useState(null);return i.useEffect((()=>{const e=s.reduce(((e,g)=>e+g.count),0);let g=[];if(g=Object.keys(s).map(((e,g)=>Object.assign({color:G[g%G.length]},s[e]))),W([...g]),0===e){R({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}],labels:[]})}else{const e={labels:s.map((e=>A.default.capitalizeEachWord(e.name))),datasets:[{data:s.map((e=>e.count)),backgroundColor:s.map(((e,g)=>{var I;return null!==(I=e.color)&&void 0!==I?I:G[g%G.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};R(e)}if(y&&s.length>y){const e=s.slice(0,y),g=s.slice(y).reduce(((e,g)=>e+g.count),0);e.push({name:"Other",count:g});const I={labels:e.map((e=>A.default.capitalize(e.name))),datasets:[{data:e.map((e=>e.count)),backgroundColor:e.map(((e,g)=>{var I;return null!==(I=e.color)&&void 0!==I?I:G[g%G.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};V(I);const C=e.map(((e,g)=>Object.assign({color:G[g%G.length]},e)));S(C)}b&&q(((e,g,I)=>({xAxis:{data:e.map((e=>e.name)),title:null!=g?g:""},yAxis:{data:e.map((e=>e.count)),title:null!=I?I:""},barColorRGBA:{r:210,g:174,b:255,a:1}}))(s,h,X))}),[s,y]),Y?g.jsxs(g.Fragment,{children:[g.jsxs("div",Object.assign({style:{display:"flex",justifyContent:m||0===(null==r?void 0:r.length)?"flex-end":"space-between"}},{children:[!m&&r&&g.jsx(l.TitleMedium,Object.assign({style:{marginBottom:16}},{children:r})),g.jsxs("div",{children:[b&&g.jsx(c.IconButton,{Icon:I.default,onClick:()=>{H(!0)}}),u&&g.jsx(c.IconButton,{Icon:C.default,onClick:()=>{j(!0)}})]})]})),g.jsxs("div",Object.assign({className:"row"},{children:[g.jsx("div",Object.assign({className:"col-6 ",style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:g.jsx("div",Object.assign({style:{width:n,height:n}},{children:g.jsx(o.Doughnut,{data:y?J:Y,options:Object.assign(Object.assign({},p(B)),{maintainAspectRatio:!n})})}))})),g.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"flex-start"}},{children:g.jsx(a.PieChart,{slices:y?F:N,size:n})}))]})),x&&g.jsx(t.StyledModal,Object.assign({open:x,onClose:()=>j(!1),closeOnOutsideClick:!0,headingTitle:r,width:"75%"},{children:g.jsxs("div",Object.assign({style:{padding:24,display:"flex",justifyContent:"space-between",height:"80vh"}},{children:[g.jsx("div",Object.assign({style:{width:"55%",marginLeft:"4%"}},{children:g.jsx("div",Object.assign({style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},{children:g.jsx(o.Doughnut,{data:Y,options:Object.assign(Object.assign({},p(B)),{maintainAspectRatio:!n})})}))})),g.jsx("div",Object.assign({style:{width:"30%",height:"100%",overflowY:"auto"}},{children:g.jsx(a.PieChart,{slices:N})}))]}))})),Z&&v&&g.jsx(t.StyledModal,Object.assign({open:Z,onClose:()=>H(!1),closeOnOutsideClick:!0,headingTitle:r,width:"85%"},{children:g.jsx("div",Object.assign({style:{padding:"24px 0"}},{children:g.jsx(d.VerticalGraph,{xAxis:v.xAxis,yAxis:v.yAxis,barColorRGBA:null==v?void 0:v.barColorRGBA})}))}))]}):g.jsx(g.Fragment,{})};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -10,6 +10,4 @@ export declare const CountryCodePicker: React.FC<{
10
10
  placement?: Placement;
11
11
  placementStrategy?: PositioningStrategy;
12
12
  disabled?: boolean;
13
- hideFlagImage?: boolean;
14
- containerStyles?: React.CSSProperties;
15
13
  }>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../../assets/icons/chevronDown.svg.js"),r=require("react"),t=require("./CountryCodePicker.modal.js"),n=require("./CountryCodePicker.styled.js"),s=require("../dropdown/DropdownPopover/index.js");require("../dropdown/Dropdown.js"),require("../dropdown/ChipDropdown.js"),require("../zeroState/ZeroState.js");var d=require("../TypographyStyle.js"),i=require("../../constants/Theme.js");require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../button/Button.js"),require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../icon-button/IconButton.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");exports.CountryCodePicker=c=>{var l,u,a,p,m,j;const[y,w]=r.useState(null!==(l=c.selectedCountry)&&void 0!==l?l:{name:"India",dial:"+91",code:"IN"}),h=`https://flagcdn.com/${null===(u=y.code)||void 0===u?void 0:u.toLowerCase()}.svg`;r.useEffect((()=>{c.selectedCountry&&w(c.selectedCountry)}),[null===(a=c.selectedCountry)||void 0===a?void 0:a.code]);return e.jsx(s.DropdownPopover,Object.assign({version:c.version,isSearchable:!0,width:null!==(p=c.popoverWidth)&&void 0!==p?p:"200px",placement:null!==(m=c.placement)&&void 0!==m?m:"bottom-start",strategy:null!==(j=c.placementStrategy)&&void 0!==j?j:"absolute",options:t.CountriesData.map((o=>{var r;const t=`https://flagcdn.com/${null===(r=o.code)||void 0===r?void 0:r.toLowerCase()}.svg`;return{value:o.code,label:o.dial,searchKey:o.name,customComponent:e.jsxs(n.StyledCountryPickerOption,{children:[!c.hideFlagImage&&e.jsx("img",{src:t,className:"country-flag__option",alt:o.name}),e.jsxs(d.BodySecondary,{children:[o.code," ",o.dial]})]}),selected:y.code===o.code}})),disabled:c.disabled,onSelect:e=>{const o=t.CountriesData.filter((o=>o.code===e.value));w(o[0]),c.onCountrySelect(o[0])}},{children:e.jsxs(n.StyledCountryPickerWrapper,Object.assign({height:c.height,style:c.containerStyles},{children:[e.jsxs("div",Object.assign({className:"content__wrapper"},{children:[!c.hideFlagImage&&e.jsx("img",{src:h,className:"country-flag__selected-option",alt:y.name}),e.jsx(d.BodySecondary,{children:y.dial})]})),e.jsx(o.default,{width:24,height:24,color:i.COLORS.content.primary})]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../../assets/icons/chevronDown.svg.js"),r=require("react"),t=require("./CountryCodePicker.modal.js"),n=require("./CountryCodePicker.styled.js"),s=require("../dropdown/DropdownPopover/index.js");require("../dropdown/Dropdown.js"),require("../dropdown/ChipDropdown.js"),require("../zeroState/ZeroState.js");var d=require("../TypographyStyle.js"),i=require("../../constants/Theme.js");require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../button/Button.js"),require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../icon-button/IconButton.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");exports.CountryCodePicker=c=>{var l,u,a,p,m,j;const[y,w]=r.useState(null!==(l=c.selectedCountry)&&void 0!==l?l:{name:"India",dial:"+91",code:"IN"}),v=`https://flagcdn.com/${null===(u=y.code)||void 0===u?void 0:u.toLowerCase()}.svg`;r.useEffect((()=>{c.selectedCountry&&w(c.selectedCountry)}),[null===(a=c.selectedCountry)||void 0===a?void 0:a.code]);return e.jsx(s.DropdownPopover,Object.assign({version:c.version,isSearchable:!0,width:null!==(p=c.popoverWidth)&&void 0!==p?p:"200px",placement:null!==(m=c.placement)&&void 0!==m?m:"bottom-start",strategy:null!==(j=c.placementStrategy)&&void 0!==j?j:"absolute",options:t.CountriesData.map((o=>{var r;const t=`https://flagcdn.com/${null===(r=o.code)||void 0===r?void 0:r.toLowerCase()}.svg`;return{value:o.code,label:o.dial,searchKey:o.name,customComponent:e.jsxs(n.StyledCountryPickerOption,{children:[e.jsx("img",{src:t,className:"country-flag__option",alt:o.name}),e.jsxs(d.BodySecondary,{children:[o.code," ",o.dial]})]}),selected:y.code===o.code}})),disabled:c.disabled,onSelect:e=>{const o=t.CountriesData.filter((o=>o.code===e.value));w(o[0]),c.onCountrySelect(o[0])}},{children:e.jsxs(n.StyledCountryPickerWrapper,Object.assign({height:c.height},{children:[e.jsxs("div",Object.assign({className:"content__wrapper"},{children:[e.jsx("img",{src:v,className:"country-flag__selected-option",alt:y.name}),e.jsx(d.BodySecondary,{children:y.dial})]})),e.jsx(o.default,{width:24,height:24,color:i.COLORS.content.primary})]}))}))};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { FeatureAnnouncementRepoInjected } from '../../hooks/useFeatureAnnouncements';
3
+ interface FeatureAnnouncementProviderProps {
4
+ children: React.ReactNode;
5
+ fetchVisibleFeatures: FeatureAnnouncementRepoInjected['fetchVisibleFeatures'];
6
+ getStoreFeatureProgress: FeatureAnnouncementRepoInjected['getStoreFeatureProgress'];
7
+ fetchFeatureById: FeatureAnnouncementRepoInjected['fetchFeatureById'];
8
+ markFeatureAsViewedForStore: FeatureAnnouncementRepoInjected['markFeatureAsViewedForStore'];
9
+ isFeatureApplicableToCurrentPage: FeatureAnnouncementRepoInjected['isFeatureApplicableToCurrentPage'];
10
+ }
11
+ declare const FeatureAnnouncementProvider: React.FC<FeatureAnnouncementProviderProps>;
12
+ export default FeatureAnnouncementProvider;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("next/router"),o=require("react"),n=require("react-joyride"),a=require("../../hooks/useFeatureAnnouncements.js"),r=require("./MajorUpdatePopup.js"),s=require("./MinorUpdatePopup.js"),i=require("./VideoModal.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(n);const d="#007bff";exports.default=u=>{let{children:c,fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:h}=u;const{majorUpdateFeatures:x,minorUpdateFeatures:k,isLoading:m,markFeatureAsViewed:C}=a.useFeatureAnnouncements({fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:h}),y=t.useRouter(),[S,T]=o.useState(null),[w,B]=o.useState(null),[F,v]=o.useState(!1),[E,I]=o.useState([]),[j,N]=o.useState(!1),[W,P]=o.useState([]),[q,M]=o.useState(!1),[O,V]=o.useState(!1),[A,L]=o.useState([]),[R,U]=o.useState(!1),[$,z]=o.useState(!1),[_,D]=o.useState(!1),[G,H]=o.useState(""),[J,K]=o.useState(!1);o.useEffect((()=>{if(!(x.length>0)||S||m||q||J)0!==x.length||m||z(!0);else{z(!1),U(!1),v(!1),I([]),B(null),L([]);const e=()=>{document.querySelector('[data-testid="whats-new-button"]')?Q(x[0]):setTimeout(e,1e3)};e()}}),[x,S,m,q,J]),o.useEffect((()=>{const e=y.query.featureId;if(!e||m||0===k.length)return;const t=k.find((t=>t.id===e));if(!t||!t.featureTag)return;U(!0);let o=0;const n=setInterval((()=>{o++;const e=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`;document.querySelector(e)?(ae(t),clearInterval(n)):o>=25&&(console.warn(`FeatureAnnouncements: Timed out waiting for element with selector: ${e}`),clearInterval(n))}),200);return()=>{clearInterval(n)}}),[k,y.query.featureId,m]),o.useEffect((()=>{if(k.length>0&&!m&&!F&&!O&&!w&&!R&&$&&!J){let e=null,t=null,o=null,n=!1;const a=()=>{if(n||O||w||R||!$)return;const a=k.filter((e=>{if(!e.featureTag||""===e.featureTag.trim())return!1;const t=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`;return null!==document.querySelector(t)}));a.length>0&&(L(a),ae(a[0]),e&&(e.disconnect(),e=null),t&&(window.removeEventListener("scroll",t),t=null),o&&(clearTimeout(o),o=null))};e=new MutationObserver((e=>{let t=!1;for(const o of e){if("childList"===o.type&&o.addedNodes.length>0)for(let e=0;e<o.addedNodes.length;e++){const n=o.addedNodes[e];if(n.nodeType===Node.ELEMENT_NODE){const e=n;if(e.id||e.querySelector("[id]")){t=!0;break}}}if(t)break}!t||F||n||O||w||R||!$||(o&&clearTimeout(o),o=setTimeout((()=>{n||O||w||R||!$||a()}),200))})),t=()=>{F||n||O||w||R||!$||(o&&clearTimeout(o),o=setTimeout((()=>{n||O||w||R||!$||a()}),300))};const r=()=>{k.forEach((e=>{if(!e.featureTag||""===e.featureTag.trim())return;const t=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,o=document.querySelector(t);if(o&&!F&&!n&&!O&&!w&&!R&&$){const e=new IntersectionObserver((e=>{e.forEach((e=>{!e.isIntersecting||F||n||O||w||R||!$||setTimeout((()=>{n||O||w||R||!$||a()}),100)}))}),{threshold:.1});e.observe(o),n||setTimeout((()=>{e.disconnect()}),3e4)}}))};return e.observe(document.body,{childList:!0,subtree:!0}),window.addEventListener("scroll",t,{passive:!0}),a(),setTimeout((()=>{n||O||w||R||!$||a()}),100),setTimeout((()=>{n||O||w||R||!$||a()}),1e3),setTimeout((()=>{n||O||w||R||!$||r()}),500),()=>{n=!0,e&&e.disconnect(),t&&window.removeEventListener("scroll",t),o&&clearTimeout(o)}}(0===k.length||m)&&(v(!1),I([]),B(null),L([]),U(!1))}),[k,m,F,O,w,R,$,C,J]);const Q=t=>{T(t);const o=x.findIndex((e=>e.id===t.id)),n=x.length,a=[{target:'[data-testid="whats-new-button"]',content:e.jsx(r.default,{feature:t,currentIndex:o,totalFeatures:n,onSkip:()=>X(t),onExplore:()=>Y(t),onPrevious:()=>Z(t),onNext:()=>ee(t)}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];P(a),N(!0)},X=o.useCallback((e=>{(e||S)&&(M(!0),x.forEach((e=>{C(e.id)})),N(!1),T(null),P([]),z(!0),setTimeout((()=>{M(!1)}),500))}),[S,x,C]),Y=o.useCallback((e=>{M(!0),C(e.id),e.productVideo&&(H(e.productVideo),D(!0),K(!0)),N(!1),T(null),P([]);x.findIndex((t=>t.id===e.id))===x.length-1&&z(!0),setTimeout((()=>{M(!1)}),500)}),[x,C]),Z=o.useCallback((t=>{const o=t||S;if(!o)return;const n=x.findIndex((e=>e.id===o.id));if(n>0){const t=x[n-1];T(t);const o=n-1,a=x.length,s=[{target:'[data-testid="whats-new-button"]',content:e.jsx(r.default,{feature:t,currentIndex:o,totalFeatures:a,onSkip:()=>X(t),onExplore:()=>Y(t),onPrevious:()=>Z(t),onNext:()=>ee(t)}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];P(s)}}),[S,x]);e.jsx(i.VideoModal,{isOpen:_,videoUrl:G,onClose:()=>{D(!1),H(""),K(!1)}});const ee=o.useCallback((t=>{const o=t||S;if(!o)return;const n=x.findIndex((e=>e.id===o.id));if(n<x.length-1){const t=x[n+1];T(t);const o=n+1,a=x.length,s=[{target:'[data-testid="whats-new-button"]',content:e.jsx(r.default,{feature:t,currentIndex:o,totalFeatures:a,onSkip:()=>X(t),onExplore:()=>Y(t),onPrevious:()=>Z(t),onNext:()=>ee(t)}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];P(s)}else M(!0),C(o.id),N(!1),T(null),P([]),z(!0),setTimeout((()=>{M(!1)}),500)}),[S,x,C]),te=()=>{if(x.length>0&&!S){document.querySelector('[data-testid="whats-new-button"]')&&Q(x[0])}};o.useEffect((()=>(window.showMajorUpdatePopup=te,()=>{delete window.showMajorUpdatePopup})),[x,S]);const oe=o.useCallback((e=>{const{action:t}=e;t===n.ACTIONS.CLOSE&&(S&&(M(!0),x.forEach((e=>{C(e.id)})),z(!0),setTimeout((()=>{M(!1)}),500)),N(!1),T(null),P([]))}),[S,x,C]),ne=o.useCallback((e=>{const{action:t}=e;t===n.ACTIONS.CLOSE&&(w&&(V(!0),U(!0),k.forEach((e=>{C(e.id)})),setTimeout((()=>{V(!1)}),500)),v(!1),B(null),I([]))}),[w,k,C]),ae=t=>{B(t);const o=A.findIndex((e=>e.id===t.id)),n=A.length,a=[{target:t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,content:e.jsx(s.default,{feature:t,currentIndex:o,totalFeatures:n,onSkip:()=>re(t),onExplore:()=>se(t),onPrevious:()=>ie(t),onNext:()=>ue(t)}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];I(a),v(!0)},re=o.useCallback((e=>{(e||w)&&(V(!0),U(!0),k.forEach((e=>{C(e.id)})),v(!1),B(null),I([]),setTimeout((()=>{V(!1)}),500))}),[w,k,C]),se=o.useCallback((e=>{V(!0),U(!0),C(e.id),e.productVideo&&(H(e.productVideo),D(!0),K(!0)),v(!1),B(null),I([]),setTimeout((()=>{V(!1)}),500)}),[C]),ie=o.useCallback((t=>{const o=t||w;if(!o)return;const n=A.findIndex((e=>e.id===o.id));if(n>0){const t=A[n-1];B(t);const o=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,a=n-1,r=A.length,i=[{target:o,content:e.jsx(s.default,{feature:t,currentIndex:a,totalFeatures:r,onSkip:()=>re(t),onExplore:()=>se(t),onPrevious:()=>ie(t),onNext:()=>ue(t)}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];I(i)}}),[w,A]),ue=o.useCallback((t=>{const o=t||w;if(!o)return;const n=A.findIndex((e=>e.id===o.id));if(n<A.length-1){const t=A[n+1];B(t);const o=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,a=n+1,r=A.length,i=[{target:o,content:e.jsx(s.default,{feature:t,currentIndex:a,totalFeatures:r,onSkip:()=>re(t),onExplore:()=>se(t),onPrevious:()=>ie(t),onNext:()=>ue(t)}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];I(i)}else V(!0),U(!0),C(o.id),v(!1),B(null),I([]),setTimeout((()=>{V(!1)}),500)}),[w,A,C]);return e.jsxs(e.Fragment,{children:[c,W.length>0&&e.jsx(l.default,{steps:W,run:j,continuous:!1,showProgress:!1,showSkipButton:!1,callback:oe,disableOverlayClose:!0,disableCloseOnEsc:!0,disableOverlay:!0,spotlightClicks:!1,styles:{options:{primaryColor:d,zIndex:1e4,width:"auto",arrowColor:"#212121"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",border:"none"},tooltip:{borderRadius:"16px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}}),E.length>0&&e.jsx(l.default,{steps:E,run:F,continuous:!1,showProgress:!1,showSkipButton:!1,callback:ne,disableOverlayClose:!0,disableCloseOnEsc:!0,styles:{options:{primaryColor:d,zIndex:1e4,width:"auto",arrowColor:"#ffffff"},tooltip:{borderRadius:"4px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonSkip:{display:"none"},buttonClose:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}}),e.jsx(i.VideoModal,{isOpen:_,videoUrl:G,onClose:()=>{D(!1),H(""),K(!1)}})]})};
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { FeatureAnnouncement } from '../../types/FeatureAnnouncement.types';
3
+ interface MajorUpdatePopupProps {
4
+ feature: FeatureAnnouncement;
5
+ currentIndex: number;
6
+ totalFeatures: number;
7
+ onSkip: () => void;
8
+ onExplore: () => void;
9
+ onPrevious: () => void;
10
+ onNext: () => void;
11
+ }
12
+ declare const MajorUpdatePopup: React.FC<MajorUpdatePopupProps>;
13
+ export default MajorUpdatePopup;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./MajorUpdatePopup.style.js");const r=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value};exports.default=n=>{let{feature:o,currentIndex:a,totalFeatures:l,onSkip:s,onExplore:i,onPrevious:c,onNext:u}=n;return e.jsx(e.Fragment,{children:e.jsxs(t.StyledMajorUpdateContainer,{children:[e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),s()},style:{position:"absolute",top:"10px",right:"10px",background:"transparent",border:"none",color:"#BDBDBD",fontSize:"14px",fontWeight:"500",cursor:"pointer",zIndex:10,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f3f4f6",e.currentTarget.style.color="#374151"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.color="#6b7280"}},{children:"Skip"})),e.jsx(t.StyledImageContainer,{children:o.displayImage?e.jsx("img",{src:o.displayImage,alt:o.title,style:{width:"464px",height:"258px",objectFit:"cover"},onError:e=>{o.image&&(e.target.src=o.image)}}):e.jsx(t.StyledFeaturePreviewText,{children:"Feature Preview"})}),e.jsxs(t.StyledContentContainer,{children:[e.jsxs(t.StyledHeaderContainer,{children:[e.jsx(t.StyledTitle,{children:o.title}),e.jsx(t.StyledDescription,{dangerouslySetInnerHTML:{__html:r(o.content||o.body||"")}}),e.jsx("div",{children:e.jsx("button",Object.assign({onClick:()=>{i()},style:{backgroundColor:"transparent",border:"1px solid #FEC02D",color:"#FEC02D",borderRadius:"4px",fontSize:"14px",fontWeight:"500",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"16px"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgba(254, 192, 45, 0.1)"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},{children:o.buttonText||"Explore the feature"}))})]}),l>1&&e.jsxs(t.StyledNavigationContainer,{children:[e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),c()},disabled:0===a,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:0===a?"#666":"#fff",fontSize:"20px",cursor:0===a?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{0!==a&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{0!==a&&(e.currentTarget.style.color="#fff")}},{children:"‹"})),e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),u()},disabled:a===l-1,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:a===l-1?"#666":"#fff",fontSize:"20px",cursor:a===l-1?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{a!==l-1&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{a!==l-1&&(e.currentTarget.style.color="#fff")}},{children:"›"}))]})]})]})})};
@@ -0,0 +1,8 @@
1
+ export declare const StyledMajorUpdateContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledImageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledFeaturePreviewText: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const StyledHeaderContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const StyledTitle: import("styled-components").StyledComponent<"h3", any, {}, never>;
7
+ export declare const StyledDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const StyledNavigationContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,55 @@
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("styled-components"));const i=t.default.div`
2
+ width: 959px;
3
+ height: 274px;
4
+ display: flex;
5
+ background-color: #212121;
6
+ border-radius: 4px;
7
+ overflow: hidden;
8
+ position: relative;
9
+ `,n=t.default.div`
10
+ background-color: #212121;
11
+ width: 480px;
12
+ height: 274px;
13
+ position: relative;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ padding: 8px;
18
+ `,o=t.default.div`
19
+ color: #9ca3af;
20
+ font-size: 14px;
21
+ text-align: center;
22
+ width: 290px;
23
+ height: 258px;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ `,l=t.default.div`
28
+ flex: 1;
29
+ display: flex;
30
+ margin: 0 8px 0 0;
31
+ flex-direction: column;
32
+ justify-content: space-between;
33
+ background: transparent;
34
+ `,a=t.default.div`
35
+ /* No specific styles, just a container */
36
+ `,r=t.default.h3`
37
+ font-size: 16px;
38
+ font-weight: 600;
39
+ padding: 36px 0 0 0;
40
+ color: #fff;
41
+ line-height: 1.25;
42
+ text-align: left;
43
+ `,d=t.default.div`
44
+ font-size: 14px;
45
+ line-height: 1.5;
46
+ color: rgba(255, 255, 255, 0.8);
47
+ text-align: left;
48
+ `,p=t.default.div`
49
+ position: absolute;
50
+ bottom: 16px;
51
+ right: 16px;
52
+ display: flex;
53
+ gap: 8px;
54
+ align-items: center;
55
+ `;exports.StyledContentContainer=l,exports.StyledDescription=d,exports.StyledFeaturePreviewText=o,exports.StyledHeaderContainer=a,exports.StyledImageContainer=n,exports.StyledMajorUpdateContainer=i,exports.StyledNavigationContainer=p,exports.StyledTitle=r;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { FeatureAnnouncement } from '../../types/FeatureAnnouncement.types';
3
+ interface MinorUpdatePopupProps {
4
+ feature: FeatureAnnouncement;
5
+ currentIndex: number;
6
+ totalFeatures: number;
7
+ onSkip: () => void;
8
+ onExplore: () => void;
9
+ onPrevious: () => void;
10
+ onNext: () => void;
11
+ }
12
+ declare const MinorUpdatePopup: React.FC<MinorUpdatePopupProps>;
13
+ export default MinorUpdatePopup;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./MinorUpdatePopup.style.js");const r=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value};exports.default=n=>{let{feature:i,currentIndex:o,totalFeatures:l,onSkip:s,onExplore:d,onPrevious:a,onNext:c}=n;return e.jsx(e.Fragment,{children:e.jsxs(t.StyledMinorUpdateContainer,{children:[e.jsx(t.StyledImageContainer,{children:i.displayImage?e.jsxs(t.StyledImageWrapper,{children:[e.jsx("img",{src:i.displayImage,alt:i.title,style:{width:"235px",height:"134px",objectFit:"cover",borderRadius:"4px",display:"block"},onError:e=>{i.image&&(e.target.src=i.image)}}),e.jsx(t.StyledImageOverlay,{children:e.jsx(t.StyledNewFeatureText,{children:"New feature"})})]}):e.jsx(t.StyledFeaturePreviewText,{children:"Feature Preview"})}),e.jsxs(t.StyledContentContainer,{children:[e.jsxs(t.StyledHeaderContainer,{children:[e.jsx(t.StyledTitle,{children:i.title}),e.jsx(t.StyledDescription,{dangerouslySetInnerHTML:{__html:r(i.content||i.body||"")}})]}),e.jsxs(t.StyledActionButtonsContainer,{children:[e.jsx(t.StyledUnderstoodText,Object.assign({onClick:s},{children:"Understood"})),i.productVideo&&e.jsx("button",Object.assign({onClick:()=>{d()},style:{backgroundColor:"#4B1583",border:"none",color:"#ffffff",borderRadius:"4px",fontSize:"14px",fontWeight:"500",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},{children:i.buttonText||"Explore the feature"}))]})]})]})})};
@@ -0,0 +1,12 @@
1
+ export declare const StyledMinorUpdateContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledImageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledImageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledImageOverlay: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const StyledNewFeatureText: import("styled-components").StyledComponent<"span", any, {}, never>;
6
+ export declare const StyledFeaturePreviewText: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const StyledContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const StyledHeaderContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ export declare const StyledTitle: import("styled-components").StyledComponent<"h3", any, {}, never>;
10
+ export declare const StyledDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ export declare const StyledActionButtonsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
12
+ export declare const StyledUnderstoodText: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -0,0 +1,93 @@
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("styled-components"));const i=t.default.div`
2
+ width: 519px;
3
+ height: 160px;
4
+ display: flex;
5
+ background-color: #ffffff;
6
+ border-radius: 4px;
7
+ overflow: hidden;
8
+ position: relative;
9
+ box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
10
+ `,o=t.default.div`
11
+ background-color: #f9fafb;
12
+ border-radius: 4px;
13
+ position: relative;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ margin: 13px 10px 13px 10px;
18
+ width: 235px;
19
+ min-width: 235px;
20
+ max-width: 235px;
21
+ height: 134px;
22
+ `,r=t.default.div`
23
+ position: relative;
24
+ width: 235px;
25
+ height: 134px;
26
+ `,n=t.default.div`
27
+ position: absolute;
28
+ top: 0px;
29
+ left: 0px;
30
+ right: 0px;
31
+ height: 27px;
32
+ background-color: rgba(0, 0, 0, 0.26);
33
+ border-radius: 4px 4px 4px 4px;
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ z-index: 10;
38
+ `,a=t.default.span`
39
+ color: #ffffff;
40
+ font-weight: 400;
41
+ font-size: 14px;
42
+ `,p=t.default.div`
43
+ color: #9ca3af;
44
+ font-size: 14px;
45
+ text-align: center;
46
+ width: 100%;
47
+ height: 100%;
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ background-color: #f3f4f6;
52
+ border-radius: 4px;
53
+ `,l=t.default.div`
54
+ flex: 1;
55
+ display: flex;
56
+ margin: 13px 13px 13px 3px;
57
+ flex-direction: column;
58
+ justify-content: space-between;
59
+ background: transparent;
60
+ `,d=t.default.div`
61
+ /* No specific styles, just a container */
62
+ `,x=t.default.h3`
63
+ font-size: 16px;
64
+ font-weight: 600;
65
+ padding: 0 0 0 0;
66
+ color: #212121;
67
+ line-height: 1.25;
68
+ text-align: left;
69
+ `,s=t.default.div`
70
+ font-size: 12px;
71
+ font-weight: 400;
72
+ line-height: 1.2;
73
+ color: #616161;
74
+ text-align: left;
75
+ max-height: 48px;
76
+ overflow: hidden;
77
+ display: -webkit-box;
78
+ -webkit-line-clamp: 3;
79
+ -webkit-box-orient: vertical;
80
+ `,f=t.default.div`
81
+ position: absolute;
82
+ bottom: 13px;
83
+ right: 10px;
84
+ display: flex;
85
+ gap: 16px;
86
+ align-items: center;
87
+ `,c=t.default.span`
88
+ color: #4b1583;
89
+ font-size: 14px;
90
+ font-weight: 500;
91
+ cursor: pointer;
92
+ transition: all 0.2s;
93
+ `;exports.StyledActionButtonsContainer=f,exports.StyledContentContainer=l,exports.StyledDescription=s,exports.StyledFeaturePreviewText=p,exports.StyledHeaderContainer=d,exports.StyledImageContainer=o,exports.StyledImageOverlay=n,exports.StyledImageWrapper=r,exports.StyledMinorUpdateContainer=i,exports.StyledNewFeatureText=a,exports.StyledTitle=x,exports.StyledUnderstoodText=c;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface VideoModalProps {
3
+ isOpen: boolean;
4
+ videoUrl: string;
5
+ onClose: () => void;
6
+ }
7
+ export declare const VideoModal: React.FC<VideoModalProps>;
8
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.VideoModal=t=>{let{isOpen:o,videoUrl:r,onClose:i}=t;if(!o)return null;const s=r.includes("youtube.com")||r.includes("youtu.be")?r.replace("watch?v=","embed/").replace("youtu.be/","youtube.com/embed/"):r,n=r.includes("youtube.com")||r.includes("youtu.be");return e.jsx("div",Object.assign({style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.9)",zIndex:2e3,display:"flex",justifyContent:"center",alignItems:"center",padding:"20px"},onClick:e=>{e.target===e.currentTarget&&i()}},{children:e.jsxs("div",Object.assign({style:{position:"relative",width:"90vw",height:"90vh",maxWidth:"1200px",maxHeight:"800px",backgroundColor:"black",borderRadius:"12px",overflow:"hidden",boxShadow:"0 25px 50px rgba(0, 0, 0, 0.8)"},onClick:e=>e.stopPropagation()},{children:[e.jsx("button",Object.assign({onClick:i,style:{position:"absolute",top:"20px",right:"20px",background:"rgba(0, 0, 0, 0.7)",border:"none",color:"white",fontSize:"24px",width:"40px",height:"40px",borderRadius:"50%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,transition:"background-color 0.2s"},onMouseOver:e=>{e.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.9)"},onMouseOut:e=>{e.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.7)"}},{children:"×"})),e.jsx("div",Object.assign({style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},{children:r?n?e.jsx("iframe",{width:"100%",height:"100%",src:s,title:"Product Video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,style:{borderRadius:"12px"}}):e.jsxs("video",Object.assign({controls:!0,autoPlay:!0,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:"12px"}},{children:[e.jsx("source",{src:r,type:"video/mp4"}),e.jsx("source",{src:r,type:"video/webm"}),e.jsx("source",{src:r,type:"video/ogg"}),"Your browser does not support the video tag."]})):e.jsx("div",Object.assign({style:{color:"white",fontSize:"18px",textAlign:"center"}},{children:"No video available"}))}))]}))}))};
@@ -0,0 +1,4 @@
1
+ export { default as FeatureAnnouncementProvider } from './FeatureAnnouncementProvider';
2
+ export { VideoModal } from './VideoModal';
3
+ export { default as MajorUpdatePopup } from './MajorUpdatePopup';
4
+ export { default as MinorUpdatePopup } from './MinorUpdatePopup';
@@ -0,0 +1 @@
1
+ export * from './feature-announcements';
@@ -65,7 +65,5 @@ export interface InputProps {
65
65
  hightlightInputColor?: string;
66
66
  onKeyDownEvent?: (e: Event) => void;
67
67
  hideInputHeader?: boolean;
68
- hideBorder?: boolean;
69
- inputWrapperStyles?: React.CSSProperties;
70
68
  }
71
69
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement | null>>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/info.svg.js"),n=require("react"),i=require("../button/Button.js"),s=require("./Input-helper.js"),l=require("../tooltips/Tooltip.js"),r=require("../TypographyStyle.js"),o=require("../../constants/Theme.js"),a=require("../../assets/icons/errorInfo.svg.js"),u=require("./context/InputStyleProvider.js"),c=require("./Input.styled.js");const d=n.forwardRef(((d,h)=>{var v,p,x,g,j,f,m,b;const{placeholder:y,leftIcon:C,rightIcon:O,labelText:I,maxCharLimit:T,isRequired:S,hintText:w,type:E,state:k,validate:H,variant:q,button:B,suffixText:L,prefixText:M,onChangeText:F,value:P,noErrorHint:R,reset:D,rangeValidation:z,noKeyDownChange:A,version:K,noMaxCharCheck:N,labelElement:_,autoGrow:W,minHeight:G,maxHeight:V,labelTextBold:$,truncateText:J,maxCharLimitPosition:Q,hightlightInputColor:U,onKeyDownEvent:X,hideInputHeader:Y,hideBorder:Z,inputWrapperStyles:ee}=Object.assign({maxCharLimit:0,type:"text",variant:"default",maxCharLimitPosition:"TOP"},d),te=null==C?void 0:C.icon,ne=null==O?void 0:O.icon,[ie,se]=n.useState(!1),[le,re]=n.useState(!1),[oe,ae]=n.useState(),ue="x-small"===q?"12px":"small"===q?"18px":"22px",ce=n.useContext(u.InputStyleContext),[de,he]=n.useState(),ve=n.useRef(null),pe=null!=h?h:ve;n.useEffect((()=>{he(P),!P&&W&&(pe.current.style.height=G||"48px")}),[P]),n.useEffect((()=>{var e;pe.current&&(null===(e=d.onReferenceInit)||void 0===e||e.call(d,pe.current))}),[pe]),n.useEffect((()=>{const e=pe.current;if(e&&["phonenumber","zip","number"].includes(E))return e.addEventListener("wheel",fe,{passive:!1}),()=>{e.removeEventListener("wheel",fe)}}),[]),n.useEffect((()=>{D&&he("")}),[D]),n.useEffect((()=>{var e;re(!!d.isActive),d.isActive&&(null===(e=pe.current)||void 0===e||e.focus())}),[d.isActive]),n.useEffect((()=>{ae(d.errorMessage)}),[d.errorMessage]),n.useEffect((()=>{var e;se(!1),("invalid"===d.state||oe||"disabled-invalid"===d.state)&&se(!0),"active"===d.state&&(null===(e=pe.current)||void 0===e||e.focus())}),[d.state,oe]),n.useEffect((()=>{se(!!oe||"invalid"===d.state)}),[oe,d.state]);const xe=function(e){if(s.isFunction(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e(...n)}},ge=()=>"zip"===E?6:2e3,je=e=>{const t=0!==T?T:ge();if(X&&X(e),A||F(P||"",e),N)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},fe=e=>{e.preventDefault()},me=e=>{let t=e.target.value;const n=0!==T?T+1:ge();!N&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),F(t,e),d.textControl||he(t),W&&(pe.current.style.height=`${pe.current.scrollHeight}px`,t||(pe.current.style.height=G||"48px"));const i=H||s.validateInput;if(!i||!s.isFunction(i))return;const[l,r]=i(t,E,z);se(!l),ae(d.errorMessage?d.errorMessage:r)},be=e=>{var t;d.skipFocus||re(!0),xe(null===(t=d.onFocus)||void 0===t?void 0:t.call(d,e))},ye=e=>{var t;d.skipFocus||re(!1),xe(null===(t=d.onBlur)||void 0===t?void 0:t.call(d,e))},Ce=()=>{var t;return e.jsxs(e.Fragment,{children:["multiline"!==E&&e.jsx("input",{className:J?"truncate-class":"","data-test":d["data-test"],id:d.id,style:null!==(t=null==ce?void 0:ce.input)&&void 0!==t?t:{},ref:pe,type:["phonenumber","zip","number"].includes(E)?"number":E,value:de,onFocus:e=>be(e),onBlur:e=>ye(e),placeholder:y||"Enter here",onChange:me,onClick:e=>xe(d.onClick),onKeyDown:e=>je(e)}),"multiline"===E&&e.jsx("textarea",{"data-test":d["data-test"],value:de,ref:pe,onFocus:e=>be(e),onBlur:e=>ye(e),onClick:e=>xe(d.onClick),placeholder:y||"Enter here",onChange:me,onKeyDown:e=>je(e),maxLength:T>0?T:void 0})]})};return e.jsxs(c.RootContainer,Object.assign({width:d.width,height:d.height,state:k,type:E,style:null!==(v=null==ce?void 0:ce.RootContainer)&&void 0!==v?v:{}},{children:[e.jsxs("div",Object.assign({className:"flex-align-center"},{children:[!R&&(!!w||!!oe)&&e.jsxs(c.InputFooter,Object.assign({invalid:!!oe},{children:[!!oe&&e.jsx(a.default,{width:16,height:16}),oe||w]})),T>0&&"BOTTOM"===Q&&e.jsxs(c.MaxCharStyle,Object.assign({position:"BOTTOM"},{children:[null!==(x=null===(p=(null!=P?P:"").toString())||void 0===p?void 0:p.length)&&void 0!==x?x:0,"/",T]}))]})),e.jsxs(c.InputWrapper,Object.assign({variant:q,state:k,width:d.width,isActive:"active"===k||le,isInvalid:ie,style:null!==(j=null!==(g=null==ce?void 0:ce.InputWrapper)&&void 0!==g?g:ee)&&void 0!==j?j:{},version:K,height:d.height,hightlightInputColor:U,hideBorder:Z},{children:[!!te&&e.jsx(c.IconHolder,Object.assign({variant:q,iconSize:ue,onClick:()=>xe(null==C?void 0:C.callback),isLeft:!0,style:null!==(f=null==ce?void 0:ce.IconHolder)&&void 0!==f?f:{}},{children:e.jsx(te,{})})),!!M&&e.jsx(c.PrefixHolder,Object.assign({variant:q},{children:M})),"default"===q&&e.jsx(c.InputContainer,Object.assign({height:d.height,type:d.type,minHeight:G,maxHeight:V,autoGrow:W},{children:Ce()})),["x-small","small"].includes(q)&&e.jsx(c.InputContainerSmall,Object.assign({height:d.height,type:d.type},{children:Ce()})),!!ne&&e.jsx(c.IconHolder,Object.assign({variant:q,iconSize:ue,onClick:()=>xe(null==O?void 0:O.callback),isLeft:!1},{children:e.jsx(ne,{})})),!!L&&e.jsx(c.SuffixHolder,Object.assign({variant:q},{children:L})),B&&B.text&&e.jsx(i.Button,{buttonText:B.text,onClick:()=>xe(null==B?void 0:B.onClick)}),B&&B.buttonProps&&e.jsx(i.Button,Object.assign({},B.buttonProps))]})),!Y&&(!!I||!!T)&&e.jsxs(c.InputHeader,Object.assign({invalid:ie},{children:[_&&_,e.jsxs("div",Object.assign({className:"label__container"},{children:[$?e.jsxs(r.TitleSmall,{children:[I,S?e.jsx("span",{children:"*"}):""]}):e.jsxs(r.BodySecondary,{children:[I,S?e.jsx("span",{children:"*"}):""]}),d.tooltipText&&e.jsx(l.Tooltip,Object.assign({body:d.tooltipText,placement:"top"},{children:e.jsx("span",{children:e.jsx(t.default,{style:{marginTop:-3},width:18,height:18,color:ie?o.COLORS.content.negative:o.COLORS.content.primary})})}))]})),T>0&&"TOP"===Q&&e.jsxs(c.MaxCharStyle,{children:[null!==(b=null===(m=(null!=P?P:"").toString())||void 0===m?void 0:m.length)&&void 0!==b?b:0,"/",T]})]}))]}))}));d.displayName="Input",exports.Input=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/info.svg.js"),n=require("react"),i=require("../button/Button.js"),s=require("./Input-helper.js"),l=require("../tooltips/Tooltip.js"),r=require("../TypographyStyle.js"),a=require("../../constants/Theme.js"),o=require("../../assets/icons/errorInfo.svg.js"),u=require("./context/InputStyleProvider.js"),c=require("./Input.styled.js");const d=n.forwardRef(((d,h)=>{var v,x,p,g,j,f,m;const{placeholder:b,leftIcon:y,rightIcon:C,labelText:O,maxCharLimit:I,isRequired:T,hintText:S,type:w,state:E,validate:k,variant:H,button:q,suffixText:L,prefixText:B,onChangeText:M,value:F,noErrorHint:P,reset:R,rangeValidation:D,noKeyDownChange:z,version:A,noMaxCharCheck:K,labelElement:N,autoGrow:_,minHeight:G,maxHeight:W,labelTextBold:V,truncateText:$,maxCharLimitPosition:J,hightlightInputColor:Q,onKeyDownEvent:U,hideInputHeader:X}=Object.assign({maxCharLimit:0,type:"text",variant:"default",maxCharLimitPosition:"TOP"},d),Y=null==y?void 0:y.icon,Z=null==C?void 0:C.icon,[ee,te]=n.useState(!1),[ne,ie]=n.useState(!1),[se,le]=n.useState(),re="x-small"===H?"12px":"small"===H?"18px":"22px",ae=n.useContext(u.InputStyleContext),[oe,ue]=n.useState(),ce=n.useRef(null),de=null!=h?h:ce;n.useEffect((()=>{ue(F),!F&&_&&(de.current.style.height=G||"48px")}),[F]),n.useEffect((()=>{var e;de.current&&(null===(e=d.onReferenceInit)||void 0===e||e.call(d,de.current))}),[de]),n.useEffect((()=>{const e=de.current;if(e&&["phonenumber","zip","number"].includes(w))return e.addEventListener("wheel",pe,{passive:!1}),()=>{e.removeEventListener("wheel",pe)}}),[]),n.useEffect((()=>{R&&ue("")}),[R]),n.useEffect((()=>{var e;ie(!!d.isActive),d.isActive&&(null===(e=de.current)||void 0===e||e.focus())}),[d.isActive]),n.useEffect((()=>{le(d.errorMessage)}),[d.errorMessage]),n.useEffect((()=>{var e;te(!1),("invalid"===d.state||se||"disabled-invalid"===d.state)&&te(!0),"active"===d.state&&(null===(e=de.current)||void 0===e||e.focus())}),[d.state,se]),n.useEffect((()=>{te(!!se||"invalid"===d.state)}),[se,d.state]);const he=function(e){if(s.isFunction(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e(...n)}},ve=()=>"zip"===w?6:2e3,xe=e=>{const t=0!==I?I:ve();if(U&&U(e),z||M(F||"",e),K)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},pe=e=>{e.preventDefault()},ge=e=>{let t=e.target.value;const n=0!==I?I+1:ve();!K&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),M(t,e),d.textControl||ue(t),_&&(de.current.style.height=`${de.current.scrollHeight}px`,t||(de.current.style.height=G||"48px"));const i=k||s.validateInput;if(!i||!s.isFunction(i))return;const[l,r]=i(t,w,D);te(!l),le(d.errorMessage?d.errorMessage:r)},je=e=>{var t;d.skipFocus||ie(!0),he(null===(t=d.onFocus)||void 0===t?void 0:t.call(d,e))},fe=e=>{var t;d.skipFocus||ie(!1),he(null===(t=d.onBlur)||void 0===t?void 0:t.call(d,e))},me=()=>{var t;return e.jsxs(e.Fragment,{children:["multiline"!==w&&e.jsx("input",{className:$?"truncate-class":"","data-test":d["data-test"],id:d.id,style:null!==(t=null==ae?void 0:ae.input)&&void 0!==t?t:{},ref:de,type:["phonenumber","zip","number"].includes(w)?"number":w,value:oe,onFocus:e=>je(e),onBlur:e=>fe(e),placeholder:b||"Enter here",onChange:ge,onClick:e=>he(d.onClick),onKeyDown:e=>xe(e)}),"multiline"===w&&e.jsx("textarea",{"data-test":d["data-test"],value:oe,ref:de,onFocus:e=>je(e),onBlur:e=>fe(e),onClick:e=>he(d.onClick),placeholder:b||"Enter here",onChange:ge,onKeyDown:e=>xe(e),maxLength:I>0?I:void 0})]})};return e.jsxs(c.RootContainer,Object.assign({width:d.width,height:d.height,state:E,type:w,style:null!==(v=null==ae?void 0:ae.RootContainer)&&void 0!==v?v:{}},{children:[e.jsxs("div",Object.assign({className:"flex-align-center"},{children:[!P&&(!!S||!!se)&&e.jsxs(c.InputFooter,Object.assign({invalid:!!se},{children:[!!se&&e.jsx(o.default,{width:16,height:16}),se||S]})),I>0&&"BOTTOM"===J&&e.jsxs(c.MaxCharStyle,Object.assign({position:"BOTTOM"},{children:[null!==(p=null===(x=(null!=F?F:"").toString())||void 0===x?void 0:x.length)&&void 0!==p?p:0,"/",I]}))]})),e.jsxs(c.InputWrapper,Object.assign({variant:H,state:E,width:d.width,isActive:"active"===E||ne,isInvalid:ee,style:null!==(g=null==ae?void 0:ae.InputWrapper)&&void 0!==g?g:{},version:A,height:d.height,hightlightInputColor:Q},{children:[!!Y&&e.jsx(c.IconHolder,Object.assign({variant:H,iconSize:re,onClick:()=>he(null==y?void 0:y.callback),isLeft:!0,style:null!==(j=null==ae?void 0:ae.IconHolder)&&void 0!==j?j:{}},{children:e.jsx(Y,{})})),!!B&&e.jsx(c.PrefixHolder,Object.assign({variant:H},{children:B})),"default"===H&&e.jsx(c.InputContainer,Object.assign({height:d.height,type:d.type,minHeight:G,maxHeight:W,autoGrow:_},{children:me()})),["x-small","small"].includes(H)&&e.jsx(c.InputContainerSmall,Object.assign({height:d.height,type:d.type},{children:me()})),!!Z&&e.jsx(c.IconHolder,Object.assign({variant:H,iconSize:re,onClick:()=>he(null==C?void 0:C.callback),isLeft:!1},{children:e.jsx(Z,{})})),!!L&&e.jsx(c.SuffixHolder,Object.assign({variant:H},{children:L})),q&&q.text&&e.jsx(i.Button,{buttonText:q.text,onClick:()=>he(null==q?void 0:q.onClick)}),q&&q.buttonProps&&e.jsx(i.Button,Object.assign({},q.buttonProps))]})),!X&&(!!O||!!I)&&e.jsxs(c.InputHeader,Object.assign({invalid:ee},{children:[N&&N,e.jsxs("div",Object.assign({className:"label__container"},{children:[V?e.jsxs(r.TitleSmall,{children:[O,T?e.jsx("span",{children:"*"}):""]}):e.jsxs(r.BodySecondary,{children:[O,T?e.jsx("span",{children:"*"}):""]}),d.tooltipText&&e.jsx(l.Tooltip,Object.assign({body:d.tooltipText,placement:"top"},{children:e.jsx("span",{children:e.jsx(t.default,{style:{marginTop:-3},width:18,height:18,color:ee?a.COLORS.content.negative:a.COLORS.content.primary})})}))]})),I>0&&"TOP"===J&&e.jsxs(c.MaxCharStyle,{children:[null!==(m=null===(f=(null!=F?F:"").toString())||void 0===f?void 0:f.length)&&void 0!==m?m:0,"/",I]})]}))]}))}));d.displayName="Input",exports.Input=d;
@@ -12,7 +12,6 @@ export declare const InputWrapper: import("@emotion/styled").StyledComponent<{
12
12
  variant?: InputVariant | undefined;
13
13
  version?: "1.0" | "2.0" | undefined;
14
14
  hightlightInputColor?: string | undefined;
15
- hideBorder?: boolean | undefined;
16
15
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
16
  export declare const IconHolder: import("@emotion/styled").StyledComponent<{
18
17
  theme?: import("@emotion/react").Theme | undefined;