@bikdotai/bik-component-library 0.0.634-aia-beta.6 → 0.0.634-del.1

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 (33) hide show
  1. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +1 -1
  2. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  3. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartInputData.d.ts +0 -6
  4. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  5. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +0 -3
  6. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +2 -1
  7. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
  8. package/dist/cjs/components/template-context-mapper/modalElements/QualityWarningModal.d.ts +12 -0
  9. package/dist/cjs/components/template-context-mapper/modalElements/QualityWarningModal.js +1 -0
  10. package/dist/cjs/components/template-preview/models/WhatsAppTemplate.d.ts +5 -0
  11. package/dist/cjs/components/template-preview/models/WhatsAppTemplate.js +1 -1
  12. package/dist/cjs/index.js +1 -1
  13. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +1 -1
  14. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  15. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartInputData.d.ts +0 -6
  16. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  17. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +0 -3
  18. package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +2 -1
  19. package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
  20. package/dist/esm/components/template-context-mapper/modalElements/QualityWarningModal.d.ts +12 -0
  21. package/dist/esm/components/template-context-mapper/modalElements/QualityWarningModal.js +1 -0
  22. package/dist/esm/components/template-preview/models/WhatsAppTemplate.d.ts +5 -0
  23. package/dist/esm/components/template-preview/models/WhatsAppTemplate.js +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/package.json +1 -1
  26. package/dist/cjs/assets/icons/ChartBar.svg.js +0 -1
  27. package/dist/cjs/assets/icons/maximize.svg.js +0 -1
  28. package/dist/cjs/components/analytics-chips-and-dropdowns/__stories__/VerticalGraph.stories.d.ts +0 -7
  29. package/dist/cjs/components/analytics-chips-and-dropdowns/__stories__/VerticalGraph.stories.js +0 -1
  30. package/dist/esm/assets/icons/ChartBar.svg.js +0 -1
  31. package/dist/esm/assets/icons/maximize.svg.js +0 -1
  32. package/dist/esm/components/analytics-chips-and-dropdowns/__stories__/VerticalGraph.stories.d.ts +0 -7
  33. package/dist/esm/components/analytics-chips-and-dropdowns/__stories__/VerticalGraph.stories.js +0 -1
@@ -12,4 +12,4 @@
12
12
  margin-left: auto;
13
13
  }
14
14
  }
15
- `;exports.PieChart=r=>{let{slices:a}=r;const[i,o]=t.useState(0);t.useEffect((()=>{let e=0;a.forEach((t=>{e+=t.count})),o(e)}),[a]);return e.jsx(c,{children:a.map((t=>{return e.jsxs("div",Object.assign({className:"slice-row"},{children:[e.jsx(s.Legend,{color:t.color,text:t.name},t.name),e.jsxs(n.BodySecondary,Object.assign({className:"percentage"},{children:[(r=t.count,0===i?0:parseFloat((r/i*100).toFixed(1))),"%"]}))]}),t.name);var r}))})};
15
+ `;exports.PieChart=r=>{let{slices:a}=r;const[i,l]=t.useState(0);t.useEffect((()=>{let e=0;a.forEach((t=>{e+=t.count})),l(e)}),[a]);return e.jsx(c,{children:a.map((t=>{return e.jsxs("div",Object.assign({className:"slice-row"},{children:[e.jsx(s.Legend,{color:t.color,text:t.name},t.name),e.jsxs(n.TitleRegular,Object.assign({className:"percentage"},{children:[(r=t.count,0===i?0:parseFloat((r/i*100).toFixed(1))),"%"]}))]}),t.name);var r}))})};
@@ -1 +1 @@
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 c=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 s=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 l=require("../../../modals/styledModal.js");require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.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("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.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("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../utils/calcPercentage.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var t=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../StackedBarChart/StackedBarDistributionChart.js"),require("../StackedBarChart/StackedBarDistributionChart.model.js"),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("../../../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("../../../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");var a=require("chart.js"),d=require("react-chartjs-2"),o=require("../../__stories__/VerticalGraph.stories.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(e);a.Chart.register(a.ArcElement,a.Legend);const p={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const g=e.dataset.data.reduce(((e,g)=>e+g),0),I=parseFloat((e.raw/g*100).toFixed(1));return[` ${e.label}`,` ${e.raw} (${I}% of ${g})`]}}}}},b=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],G=u.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRThCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgQmFyQ2hhcnRJY29uIGZyb20gJ0BzcmMvYXNzZXRzL2ljb25zL0NoYXJ0QmFyLnN2Zyc7XHJcbmltcG9ydCBNYXhpbWl6ZUljb24gZnJvbSAnQHNyYy9hc3NldHMvaWNvbnMvbWF4aW1pemUuc3ZnJztcclxuaW1wb3J0IHsgU3RyaW5nVXRpbHMgfSBmcm9tIFwiLi4vLi4vLi4vLi4vaW5kZXhcIjtcclxuaW1wb3J0IHsgQXJjRWxlbWVudCwgQ2hhcnQgYXMgQ2hhcnRKUywgTGVnZW5kIH0gZnJvbSAnY2hhcnQuanMnO1xyXG5pbXBvcnQgeyB1c2VFZmZlY3QsIHVzZVN0YXRlIH0gZnJvbSAncmVhY3QnO1xyXG5pbXBvcnQgeyBEb3VnaG51dCB9IGZyb20gJ3JlYWN0LWNoYXJ0anMtMic7XHJcbmltcG9ydCB7IEljb25CdXR0b24gfSBmcm9tIFwiLi4vLi4vLi4vaWNvbi1idXR0b25cIjtcclxuaW1wb3J0IHsgU3R5bGVkTW9kYWwgfSBmcm9tIFwiLi4vLi4vLi4vbW9kYWxzXCI7XHJcbmltcG9ydCB7IFRpdGxlTWVkaXVtIH0gZnJvbSBcIi4uLy4uLy4uL1R5cG9ncmFwaHlTdHlsZVwiO1xyXG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tIFwiLi4vLi4vLi4vLi4vY29uc3RhbnRzL1RoZW1lXCI7XHJcbmltcG9ydCB7IFZlcnRpY2FsR3JhcGhEZWZhdWx0IH0gZnJvbSAnLi4vLi4vX19zdG9yaWVzX18vVmVydGljYWxHcmFwaC5zdG9yaWVzJztcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBjb252ZXJ0VG9CYXJDaGFydERhdGEgPSAoZGF0YSwgeEF4aXNUaXRsZSwgeUF4aXNUaXRsZSkgPT4ge1xyXG4gICAgY29uc3QgeEF4aXNEYXRhID0gZGF0YS5tYXAoKGl0ZW0pID0+IGl0ZW0ubmFtZSk7XHJcbiAgICBjb25zdCB5QXhpc0RhdGEgPSBkYXRhLm1hcCgoaXRlbSkgPT4gaXRlbS5jb3VudCk7XHJcbiAgICBjb25zdCB4QXhpcyA9IHtcclxuICAgICAgICBkYXRhOiB4QXhpc0RhdGEsXHJcbiAgICAgICAgdGl0bGU6IHhBeGlzVGl0bGUgIT09IG51bGwgJiYgeEF4aXNUaXRsZSAhPT0gdm9pZCAwID8geEF4aXNUaXRsZSA6ICcnLFxyXG4gICAgfTtcclxuICAgIGNvbnN0IHlBeGlzID0ge1xyXG4gICAgICAgIGRhdGE6IHlBeGlzRGF0YSxcclxuICAgICAgICB0aXRsZTogeUF4aXNUaXRsZSAhPT0gbnVsbCAmJiB5QXhpc1RpdGxlICE9PSB2b2lkIDAgPyB5QXhpc1RpdGxlIDogJycsXHJcbiAgICB9O1xyXG4gICAgY29uc3QgYmFyQ2hhcnREYXRhID0ge1xyXG4gICAgICAgIHhBeGlzLFxyXG4gICAgICAgIHlBeGlzLFxyXG4gICAgICAgIGJhckNvbG9yUkdCQTogeyByOiAyMTAsIGc6IDE3NCwgYjogMjU1LCBhOiAxIH0sXHJcbiAgICB9O1xyXG4gICAgcmV0dXJuIGJhckNoYXJ0RGF0YTtcclxufTtcclxuY29uc3Qgb3B0aW9ucyA9IHtcclxuICAgIHBsdWdpbnM6IHtcclxuICAgICAgICBsZWdlbmQ6IHtcclxuICAgICAgICAgICAgZGlzcGxheTogZmFsc2UsXHJcbiAgICAgICAgfSxcclxuICAgICAgICB0b29sdGlwOiB7XHJcbiAgICAgICAgICAgIGVuYWJsZWQ6IHRydWUsXHJcbiAgICAgICAgICAgIGNhbGxiYWNrczoge1xyXG4gICAgICAgICAgICAgICAgbGFiZWw6ICh0b29sdGlwSXRlbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghdG9vbHRpcEl0ZW0ubGFiZWwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGAgMCVgO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB0b3RhbCA9IHRvb2x0aXBJdGVtLmRhdGFzZXQuZGF0YS5yZWR1Y2UoKGFjYywgY3VyKSA9PiBhY2MgKyBjdXIsIDApO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBlcmNlbnRhZ2UgPSBwYXJzZUZsb2F0KCgodG9vbHRpcEl0ZW0ucmF3IC8gdG90YWwpICogMTAwKS50b0ZpeGVkKDEpKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9YCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYCAke3Rvb2x0aXBJdGVtLnJhd30gKCR7cGVyY2VudGFnZX0lIG9mICR7dG90YWx9KWAsXHJcbiAgICAgICAgICAgICAgICAgICAgXTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgfSxcclxuICAgIH0sXHJcbn07XHJcbmNvbnN0IEdSQVBIX0NPTE9SUyA9IFtcclxuICAgICcjNUUwN0JCJyxcclxuICAgICcjOUU3N0VEJyxcclxuICAgICcjRDJBRUZGJyxcclxuICAgICcjQ0RFMUZGJyxcclxuICAgICcjOTJBRkZBJyxcclxuICAgICcjMzkzNUUxJyxcclxuXTtcclxuY29uc3QgQ2FydFN0eWxlZCA9IHN0eWxlZC5kaXYgYFxuXHRiYWNrZ3JvdW5kOiAkeyhwcm9wcykgPT4gQ09MT1JTLnN1cmZhY2Uuc3RhbmRhcmR9O1xuXHRib3JkZXI6IDFweCBzb2xpZCAkeyhwcm9wcykgPT4gQ09MT1JTLnN0cm9rZS5wcmltYXJ5fTtcblx0Ym9yZGVyLXJhZGl1czogNHB4O1xuYDtcclxuZXhwb3J0IGNvbnN0IENhcmQgPSAocHJvcHMpID0+IHtcclxuICAgIHJldHVybiBfanN4KENhcnRTdHlsZWQsIE9iamVjdC5hc3NpZ24oeyBzdHlsZTogeyBwYWRkaW5nOiAyNCB9IH0sIHsgY2hpbGRyZW46IHByb3BzLmNoaWxkcmVuIH0pKTtcclxufTtcclxuZXhwb3J0IGNvbnN0IFBpZUNoYXJ0QW5hbHl0aWNzID0gKHsgdGl0bGUsIHNsaWNlcywgc2l6ZSwgYWxsb3dDaGFydFBvcHVwLCBzaG93Q29udmVydFRvQmFyQ2hhcnQsIHRydW5jYXRlU2xpY2VzLCBiYXJDaGFydFhBeGlzVGl0bGUsIGJhckNoYXJ0WUF4aXNUaXRsZSwgaGlkZVRpdGxlID0gZmFsc2UsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzaG93UG9wdXAsIHNldFNob3dQb3B1cF0gPSB1c2VTdGF0ZShmYWxzZSk7XHJcbiAgICBjb25zdCBbc2hvd0JhckNoYXJ0LCBzZXRTaG93QmFyQ2hhcnRdID0gdXNlU3RhdGUoZmFsc2UpO1xyXG4gICAgY29uc3QgW3NsaWNlc1dpdGhDb2xvciwgc2V0U2xpY2VzV2l0aENvbG9yXSA9IHVzZVN0YXRlKFtdKTtcclxuICAgIGNvbnN0IFtkYXRhLCBzZXREYXRhXSA9IHVzZVN0YXRlKCk7XHJcbiAgICBjb25zdCBbdHJ1bmNhdGVkRGF0YSwgc2V0VHJ1bmNhdGVkRGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgY29uc3QgW3RydW5jYXRlZFNsaWNlc1dpdGhDb2xvciwgc2V0VHJ1bmNhdGVkU2xpY2VzV2l0aENvbG9yXSA9IHVzZVN0YXRlKFtdKTtcclxuICAgIGNvbnN0IFtiYXJDaGFydERhdGEsIHNldEJhckNoYXJ0RGF0YV0gPSB1c2VTdGF0ZShudWxsKTtcclxuICAgIHVzZUVmZmVjdCgoKSA9PiB7XHJcbiAgICAgICAgY29uc3QgdG90YWxTdW0gPSBzbGljZXMucmVkdWNlKChzdW0sIHNsaWNlKSA9PiBzdW0gKyBzbGljZS5jb3VudCwgMCk7XHJcbiAgICAgICAgbGV0IHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBbXTtcclxuICAgICAgICB1cGRhdGVkU2xpY2VzV2l0aENvbG9yID0gT2JqZWN0LmtleXMoc2xpY2VzKS5tYXAoKGtleSwgaW5kZXgpID0+IChPYmplY3QuYXNzaWduKHsgY29sb3I6IEdSQVBIX0NPTE9SU1tpbmRleCAlIEdSQVBIX0NPTE9SUy5sZW5ndGhdIH0sIHNsaWNlc1trZXldKSkpO1xyXG4gICAgICAgIHNldFNsaWNlc1dpdGhDb2xvcihbLi4udXBkYXRlZFNsaWNlc1dpdGhDb2xvcl0pO1xyXG4gICAgICAgIGlmICh0b3RhbFN1bSA9PT0gMCkge1xyXG4gICAgICAgICAgICBjb25zdCBkYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IFsxMDBdLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IFsnI0YwRjBGMCddLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogMCxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgc2V0RGF0YShkYXRhU2V0KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbHM6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBTdHJpbmdVdGlscy5jYXBpdGFsaXplKHNsaWNlLm5hbWUpKSxcclxuICAgICAgICAgICAgICAgIGRhdGFzZXRzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBzbGljZXMubWFwKChzbGljZSkgPT4gc2xpY2UuY291bnQpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IHNsaWNlcy5tYXAoKHNsaWNlLCBpbmRleCkgPT4geyB2YXIgX2E7IHJldHVybiAoX2EgPSBzbGljZS5jb2xvcikgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF07IH0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJDb2xvcjogWyd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZSddLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogNCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyUmFkaXVzOiA4LFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodHJ1bmNhdGVTbGljZXMgJiYgc2xpY2VzLmxlbmd0aCA+IHRydW5jYXRlU2xpY2VzKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHRydW5jYXRlZFNsaWNlcyA9IHNsaWNlcy5zbGljZSgwLCB0cnVuY2F0ZVNsaWNlcyk7XHJcbiAgICAgICAgICAgIGNvbnN0IG90aGVyU2xpY2VzID0gc2xpY2VzLnNsaWNlKHRydW5jYXRlU2xpY2VzKTtcclxuICAgICAgICAgICAgY29uc3Qgb3RoZXJDb3VudCA9IG90aGVyU2xpY2VzLnJlZHVjZSgoc3VtLCBzbGljZSkgPT4gc3VtICsgc2xpY2UuY291bnQsIDApO1xyXG4gICAgICAgICAgICB0cnVuY2F0ZWRTbGljZXMucHVzaCh7IG5hbWU6ICdPdGhlcicsIGNvdW50OiBvdGhlckNvdW50IH0pO1xyXG4gICAgICAgICAgICBjb25zdCB0cnVuY2F0ZWREYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgbGFiZWxzOiB0cnVuY2F0ZWRTbGljZXMubWFwKChzbGljZSkgPT4gU3RyaW5nVXRpbHMuY2FwaXRhbGl6ZShzbGljZS5uYW1lKSksXHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogdHJ1bmNhdGVkU2xpY2VzLm1hcCgoc2xpY2UpID0+IHNsaWNlLmNvdW50KSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiB0cnVuY2F0ZWRTbGljZXMubWFwKChzbGljZSwgaW5kZXgpID0+IHsgdmFyIF9hOyByZXR1cm4gKF9hID0gc2xpY2UuY29sb3IpICE9PSBudWxsICYmIF9hICE9PSB2b2lkIDAgPyBfYSA6IEdSQVBIX0NPTE9SU1tpbmRleCAlIEdSQVBIX0NPTE9SUy5sZW5ndGhdOyB9KSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyQ29sb3I6IFsnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnXSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyV2lkdGg6IDQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlclJhZGl1czogOCxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgc2V0VHJ1bmNhdGVkRGF0YSh0cnVuY2F0ZWREYXRhU2V0KTtcclxuICAgICAgICAgICAgY29uc3QgdHJ1bmNhdGVkU2xpY2VzV2l0aENvbG9yID0gdHJ1bmNhdGVkU2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiAoT2JqZWN0LmFzc2lnbih7IGNvbG9yOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXSB9LCBzbGljZSkpKTtcclxuICAgICAgICAgICAgc2V0VHJ1bmNhdGVkU2xpY2VzV2l0aENvbG9yKHRydW5jYXRlZFNsaWNlc1dpdGhDb2xvcik7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChzaG93Q29udmVydFRvQmFyQ2hhcnQpIHtcclxuICAgICAgICAgICAgc2V0QmFyQ2hhcnREYXRhKGNvbnZlcnRUb0JhckNoYXJ0RGF0YShzbGljZXMsIGJhckNoYXJ0WEF4aXNUaXRsZSwgYmFyQ2hhcnRZQXhpc1RpdGxlKSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlcywgdHJ1bmNhdGVTbGljZXNdKTtcclxuICAgIGlmICghZGF0YSkge1xyXG4gICAgICAgIHJldHVybiBfanN4KF9GcmFnbWVudCwge30pO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIChfanN4cyhfRnJhZ21lbnQsIHsgY2hpbGRyZW46IFtfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6IGhpZGVUaXRsZSB8fCAodGl0bGUgPT09IG51bGwgfHwgdGl0bGUgPT09IHZvaWQgMCA/IHZvaWQgMCA6IHRpdGxlLmxlbmd0aCkgPT09IDAgPyAnZmxleC1lbmQnIDogJ3NwYWNlLWJldHdlZW4nLFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBbIWhpZGVUaXRsZSAmJiB0aXRsZSAmJiAoX2pzeChUaXRsZU1lZGl1bSwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IHRpdGxlIH0pKSksIF9qc3hzKFwiZGl2XCIsIHsgY2hpbGRyZW46IFtzaG93Q29udmVydFRvQmFyQ2hhcnQgJiYgKF9qc3goSWNvbkJ1dHRvbiwgeyBJY29uOiBCYXJDaGFydEljb24sIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd0JhckNoYXJ0KHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSkpLCBhbGxvd0NoYXJ0UG9wdXAgJiYgKF9qc3goSWNvbkJ1dHRvbiwgeyBJY29uOiBNYXhpbWl6ZUljb24sIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd1BvcHVwKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSkpXSB9KV0gfSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6ICh0cnVuY2F0ZVNsaWNlcyA/IHRydW5jYXRlZERhdGEgOiBkYXRhKSwgb3B0aW9uczogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBvcHRpb25zKSwgeyBtYWludGFpbkFzcGVjdFJhdGlvOiBzaXplID8gZmFsc2UgOiB0cnVlIH0pIH0pIH0pKSB9KSksIF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IGNsYXNzTmFtZTogJ2NvbC02Jywgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmdMZWZ0OiA0OCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsZXhEaXJlY3Rpb246ICdjb2x1bW4nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdjZW50ZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IF9qc3goUGllQ2hhcnQsIHsgc2xpY2VzOiB0cnVuY2F0ZVNsaWNlcyA/IHRydW5jYXRlZFNsaWNlc1dpdGhDb2xvciA6IHNsaWNlc1dpdGhDb2xvciB9KSB9KSldIH0pKSwgc2hvd1BvcHVwICYmIChfanN4KFN0eWxlZE1vZGFsLCBPYmplY3QuYXNzaWduKHsgb3Blbjogc2hvd1BvcHVwLCBvbkNsb3NlOiAoKSA9PiBzZXRTaG93UG9wdXAoZmFsc2UpLCBjbG9zZU9uT3V0c2lkZUNsaWNrOiB0cnVlLCBoZWFkaW5nVGl0bGU6IHRpdGxlLCB3aWR0aDogXCI3NSVcIiB9LCB7IGNoaWxkcmVuOiBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMjQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdzcGFjZS1iZXR3ZWVuJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnODB2aCcsXHJcbiAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgd2lkdGg6ICc1NSUnLCBtYXJnaW5MZWZ0OiAnNCUnIH0gfSwgeyBjaGlsZHJlbjogX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICcxMDAlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnMTAwJScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25JdGVtczogJ2NlbnRlcicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IF9qc3goRG91Z2hudXQsIHsgZGF0YTogZGF0YSwgb3B0aW9uczogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBvcHRpb25zKSwgeyBtYWludGFpbkFzcGVjdFJhdGlvOiBzaXplID8gZmFsc2UgOiB0cnVlIH0pIH0pIH0pKSB9KSksIF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICczMCUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogJzEwMCUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93WTogJ2F1dG8nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpIH0pKSksIHNob3dCYXJDaGFydCAmJiBiYXJDaGFydERhdGEgJiYgKF9qc3goU3R5bGVkTW9kYWwsIE9iamVjdC5hc3NpZ24oeyBvcGVuOiBzaG93QmFyQ2hhcnQsIG9uQ2xvc2U6ICgpID0+IHNldFNob3dCYXJDaGFydChmYWxzZSksIGNsb3NlT25PdXRzaWRlQ2xpY2s6IHRydWUsIGhlYWRpbmdUaXRsZTogdGl0bGUsIHdpZHRoOiBcIjg1JVwiIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6ICcyNHB4IDAnLFxyXG4gICAgICAgICAgICAgICAgICAgIH0gfSwgeyBjaGlsZHJlbjogX2pzeChWZXJ0aWNhbEdyYXBoRGVmYXVsdCwgeyB4QXhpczogYmFyQ2hhcnREYXRhLnhBeGlzLCB5QXhpczogYmFyQ2hhcnREYXRhLnlBeGlzLCBiYXJDb2xvclJHQkE6IGJhckNoYXJ0RGF0YSA9PT0gbnVsbCB8fCBiYXJDaGFydERhdGEgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGJhckNoYXJ0RGF0YS5iYXJDb2xvclJHQkEgfSkgfSkpIH0pKSldIH0pKTtcclxufTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9UGllQ2hhcnRBbmFseXRpY3MuanMubWFwIl19 */"));exports.Card=e=>g.jsx(G,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:r,slices:a,size:n,allowChartPopup:u,showConvertToBarChart:G,truncateSlices:h,barChartXAxisTitle:y,barChartYAxisTitle:X,hideTitle:m=!1}=e;const[x,B]=c.useState(!1),[j,Z]=c.useState(!1),[N,H]=c.useState([]),[Y,W]=c.useState(),[R,F]=c.useState(),[J,V]=c.useState([]),[S,v]=c.useState(null);return c.useEffect((()=>{const e=a.reduce(((e,g)=>e+g.count),0);let g=[];if(g=Object.keys(a).map(((e,g)=>Object.assign({color:b[g%b.length]},a[e]))),H([...g]),0===e){W({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:a.map((e=>A.default.capitalize(e.name))),datasets:[{data:a.map((e=>e.count)),backgroundColor:a.map(((e,g)=>{var I;return null!==(I=e.color)&&void 0!==I?I:b[g%b.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};W(e)}if(h&&a.length>h){const e=a.slice(0,h),g=a.slice(h).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:b[g%b.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};F(I);const C=e.map(((e,g)=>Object.assign({color:b[g%b.length]},e)));V(C)}G&&v(((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}}))(a,y,X))}),[a,h]),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(i.TitleMedium,Object.assign({style:{marginBottom:16}},{children:r})),g.jsxs("div",{children:[G&&g.jsx(s.IconButton,{Icon:I.default,onClick:()=>{Z(!0)}}),u&&g.jsx(s.IconButton,{Icon:C.default,onClick:()=>{B(!0)}})]})]})),g.jsxs("div",Object.assign({className:"row"},{children:[g.jsx("div",Object.assign({className:"col-6"},{children:g.jsx("div",Object.assign({style:{width:n,height:n}},{children:g.jsx(d.Doughnut,{data:h?R:Y,options:Object.assign(Object.assign({},p),{maintainAspectRatio:!n})})}))})),g.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:g.jsx(t.PieChart,{slices:h?J:N})}))]})),x&&g.jsx(l.StyledModal,Object.assign({open:x,onClose:()=>B(!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(d.Doughnut,{data:Y,options:Object.assign(Object.assign({},p),{maintainAspectRatio:!n})})}))})),g.jsx("div",Object.assign({style:{width:"30%",height:"100%",overflowY:"auto"}},{children:g.jsx(t.PieChart,{slices:N})}))]}))})),j&&S&&g.jsx(l.StyledModal,Object.assign({open:j,onClose:()=>Z(!1),closeOnOutsideClick:!0,headingTitle:r,width:"85%"},{children:g.jsx("div",Object.assign({style:{padding:"24px 0"}},{children:g.jsx(o.VerticalGraphDefault,{xAxis:S.xAxis,yAxis:S.yAxis,barColorRGBA:null==S?void 0:S.barColorRGBA})}))}))]}):g.jsx(g.Fragment,{})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime");require("@amplitude/analytics-browser"),require("../../../../amplitude/model.js");var i=require("../../../../utils/StringUtils.js"),t=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var s=require("react");require("../../../checkBox/CheckBox.styled.js");var g=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"),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"),require("../../../modals/styledModal.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.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("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.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("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../utils/calcPercentage.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var o=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../StackedBarChart/StackedBarDistributionChart.js"),require("../StackedBarChart/StackedBarDistributionChart.model.js"),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("../../../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("../../../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");var I=require("chart.js"),C=require("react-chartjs-2");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e);I.Chart.register(I.ArcElement,I.Legend);const l={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),i=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${i}%`}}}}},u=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],d=c.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>t.COLORS.surface.standard),";border:1px solid ",(e=>t.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));exports.Card=e=>r.jsx(d,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:t,slices:I,size:a}=e;const[c,d]=s.useState([]),[n,A]=s.useState();return s.useEffect((()=>{const e=I.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(I).map(((e,r)=>Object.assign({color:u[r%u.length]},I[e]))),d([...r]),0===e){A({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:I.map((e=>i.default.capitalize(e.name))),datasets:[{data:I.map((e=>e.count)),backgroundColor:I.map(((e,r)=>{var i;return null!==(i=e.color)&&void 0!==i?i:u[r%u.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};A(e)}}),[I]),n?r.jsxs(r.Fragment,{children:[t&&r.jsx(g.TitleMedium,Object.assign({style:{marginBottom:16}},{children:t})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:a,height:a}},{children:r.jsx(C.Doughnut,{data:n,options:Object.assign(Object.assign({},l),{maintainAspectRatio:!a})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(o.PieChart,{slices:c})}))]}))]}):r.jsx(r.Fragment,{})};
@@ -7,10 +7,4 @@ export interface PieChartInputData {
7
7
  slices: PieChartInput[];
8
8
  title?: string;
9
9
  size?: number;
10
- allowChartPopup?: boolean;
11
- showConvertToBarChart?: boolean;
12
- truncateSlices?: number;
13
- barChartXAxisTitle?: string;
14
- barChartYAxisTitle?: string;
15
- hideTitle?: boolean;
16
10
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../assets/icons/maximize.svg.js"),a=require("chart.js"),o=require("chartjs-plugin-datalabels"),i=require("react"),n=require("react-chartjs-2"),l=require("../../../icon-button/IconButton.js"),s=require("../../../modals/styledModal.js"),r=require("../../../TypographyStyle.js"),d=require("../../../../constants/Theme.js"),c=require("../utils/calcPercentage.js"),u=require("./StackedBarChart.model.js"),O=require("./StackedBarChart.styles.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=p(o);a.Chart.register(a.CategoryScale,a.LinearScale,a.BarElement,a.Tooltip,a.Legend,g.default);exports.StackedBarChart=a=>{var o,p,g,v,x,A,h,y,b,T,R,C,I,N,S,f,j,m,H,L,E,k,F,P,_,B,G,D,w,Z,z,q,V,M,W,Y;const[J,K]=i.useState(!1),Q=[250,1e3,800,1500,300,600],U=0===a.yAxis.data.length,X=void 0===a.customColourScaleBrand||void 0===a.customColourScalePastel?a.colorSchema===u.COLOR_SCHEMA.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"]:a.colorSchema===u.COLOR_SCHEMA.PASTEL?a.customColourScalePastel:a.customColourScaleBrand,$=a.customHoverColour,ee={barPercentage:.4,categoryPercentage:1,pointStyle:"circle",barWidth:a.barWidth},te={};a.yAxis.data.map((e=>{e.map((e=>{te[e.name]?te[e.name].push(e.value):te[e.name]=[e.value]}))}));const ae=Object.keys(te).map(((e,t)=>Object.assign({label:e,data:te[e],backgroundColor:X[t],hoverBackgroundColor:void 0===$?void 0:$[t]},ee)));let oe=a.xAxis.data.map((e=>"string"==typeof e?e:e.name)),ie=ae;if(a.truncateBars){const e=((e,t,a)=>{if(t.length<=a)return{truncatedData:e,truncatedLabels:t,originalData:e,originalLabels:t};const o=e.map((e=>e.slice(0,a))),i=e.map((e=>e.slice(a).reduce(((e,t)=>e+t),0)));o.forEach(((e,t)=>e.push(i[t])));const n=t.slice(0,a);return n.push("Others"),{truncatedData:o,truncatedLabels:n,originalData:e,originalLabels:t}})(ae.map((e=>e.data)),oe,a.truncateBars);ae.forEach(((t,a)=>t.data=e.truncatedData[a])),oe=e.truncatedLabels,ie=e.originalData.map(((e,t)=>Object.assign(Object.assign({},ae[t]),{data:e})))}const ne={plugins:{legend:{display:!U&&!a.customLegend,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!U,callbacks:{label:null===(o=a.tooltipConfig)||void 0===o?void 0:o.labelCallback,footer:null===(p=a.tooltipConfig)||void 0===p?void 0:p.footerCallback},footerFont:null===(v=null===(g=a.tooltipConfig)||void 0===g?void 0:g.footerStyles)||void 0===v?void 0:v.footerFont},datalabels:{display:null!==(x=a.showTotal)&&void 0!==x&&x,anchor:"end",align:"end",clamp:!0,formatter:(e,t)=>{var a;const o=t.datasetIndex,i=t.chart.data.datasets;if(o!==i.length-1)return"";const n=t.dataIndex;let l=0;for(let e=0;e<i.length;e++)l+=null!==(a=i[e].data[n])&&void 0!==a?a:0;return l?l<1e3?l:(l/1e3).toString().substring(0,4)+"k":""},color:d.COLORS.content.secondary}},layout:{padding:{right:a.showTotal&&a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?50:0,top:a.showTotal&&a.orientation!=u.GRAPH_ORIENTATION.HORIZONTAL?50:0}},responsive:!0,maintainAspectRatio:!1,legend:{display:!a.customLegend,labels:{usePointStyle:!0}},indexAxis:a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?null===(A=a.yAxis)||void 0===A?void 0:A.title:null===(h=a.xAxis)||void 0===h?void 0:h.title),text:a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?null===(y=a.yAxis)||void 0===y?void 0:y.title:null===(b=a.xAxis)||void 0===b?void 0:b.title,color:null!==(C=a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?null===(T=a.yAxis)||void 0===T?void 0:T.titleColor:null===(R=a.xAxis)||void 0===R?void 0:R.titleColor)&&void 0!==C?C:d.COLORS.content.secondary,font:{size:d.FONTS.caption.fontSize}},grid:{display:a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL,color:d.COLORS.background.base},ticks:{fontSize:d.FONTS.caption.fontSize,color:null!==(I=a.yAxis.labelColor)&&void 0!==I?I:d.COLORS.content.secondary,callback:a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?a.isInternationalStore?c.truncateValueForInternationalStore:c.truncateValueForIndianStore:void 0},stacked:a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?"boolean"!=typeof(null===(N=a.yAxis)||void 0===N?void 0:N.stacked)||(null===(S=a.yAxis)||void 0===S?void 0:S.stacked):"boolean"!=typeof(null===(f=a.xAxis)||void 0===f?void 0:f.stacked)||(null===(j=a.xAxis)||void 0===j?void 0:j.stacked)},y:{title:{display:!!(a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?null===(m=a.xAxis)||void 0===m?void 0:m.title:null===(H=a.yAxis)||void 0===H?void 0:H.title),text:a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?null===(L=a.xAxis)||void 0===L?void 0:L.title:null===(E=a.yAxis)||void 0===E?void 0:E.title,color:null!==(P=a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?null===(k=a.xAxis)||void 0===k?void 0:k.titleColor:null===(F=a.yAxis)||void 0===F?void 0:F.titleColor)&&void 0!==P?P:d.COLORS.content.secondary,font:{size:d.FONTS.caption.fontSize}},grid:{display:a.orientation!==u.GRAPH_ORIENTATION.HORIZONTAL,color:d.COLORS.background.base},ticks:Object.assign(Object.assign({stepSize:a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?null===(_=a.xAxis)||void 0===_?void 0:_.stepSize:null===(B=a.yAxis)||void 0===B?void 0:B.stepSize,fontSize:d.FONTS.caption.fontSize,color:null!==(G=a.xAxis.labelColor)&&void 0!==G?G:d.COLORS.content.secondary},U?{min:0,max:2e3,stepSize:200}:{}),{callback:a.orientation!==u.GRAPH_ORIENTATION.VERTICAL?a.isInternationalStore?c.truncateValueForInternationalStore:c.truncateValueForIndianStore:void 0}),stacked:a.orientation===u.GRAPH_ORIENTATION.HORIZONTAL?"boolean"!=typeof(null===(D=a.xAxis)||void 0===D?void 0:D.stacked)||(null===(w=a.xAxis)||void 0===w?void 0:w.stacked):"boolean"!=typeof(null===(Z=a.yAxis)||void 0===Z?void 0:Z.stacked)||(null===(z=a.yAxis)||void 0===z?void 0:z.stacked)}},onClick:(e,t)=>{if(!a.onBarClick)return;const o=t[0].datasetIndex,i=t[0].index,n=e.chart.data.datasets[o].label,l=e.chart.data.labels[i];a.onBarClick(l,n)},onHover:(e,t)=>{a.onBarClick&&t.length&&(e.native.target.style.cursor="pointer")}};a.orientation&&a.orientation!==u.GRAPH_ORIENTATION.VERTICAL?delete ne.scales.y.ticks.callback:delete ne.scales.x.ticks.callback;const le={labels:oe,datasets:U?[{data:Q,backgroundColor:"rgba(0,0,0,0)"}]:ae},se={labels:a.xAxis.data.map((e=>"string"==typeof e?e:e.name)),datasets:U?[{data:Q,backgroundColor:"rgba(0,0,0,0)"}]:ie},re=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e.jsx("div",Object.assign({style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",padding:"0px 24px 12px 24px",justifyContent:a.allowChartPopup&&!t?"flex-start":"flex-end"}},{children:ae.map((t=>e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px"}},{children:[e.jsx("div",{style:{backgroundColor:t.backgroundColor,width:"16px",height:"16px",borderRadius:"2px"}}),e.jsx(r.BodyTiny,Object.assign({color:d.COLORS.content.secondary},{children:t.label}))]}),t.label.replace(" ","_"))))}))};return e.jsxs(O.GraphContainerWrapper,Object.assign({style:null!==(q=a.wrapperStyle)&&void 0!==q?q:{},padding:a.outerPadding,customLegend:a.customLegend},{children:[a.chartHeading&&e.jsxs("div",Object.assign({style:{marginBottom:24,display:"flex",justifyContent:a.hideHeading?"flex-end":"space-between"}},{children:[!0!==a.hideHeading&&e.jsx(r.TitleRegular,Object.assign({color:null!==(V=a.chartHeading.color)&&void 0!==V?V:d.COLORS.content.secondary},{children:a.chartHeading.heading})),a.allowChartPopup&&e.jsx("div",Object.assign({style:{display:"flex",justifyContent:"flex-end"}},{children:e.jsx("div",{children:e.jsx(l.IconButton,{Icon:t.default,onClick:()=>{K(!0)}})})}))]})),a.customLegend&&re(),e.jsx("div",Object.assign({className:"graph__wrapper"},{children:e.jsx("div",Object.assign({style:{height:null!==(M=a.graphCanvasHeight)&&void 0!==M?M:500,width:null!==(W=a.graphCanvasWidth)&&void 0!==W?W:"auto"}},{children:e.jsx(n.Bar,{options:ne,data:le})}))})),J&&e.jsx(s.StyledModal,Object.assign({open:J,onClose:()=>K(!1),closeOnOutsideClick:!0,headingTitle:null===(Y=a.chartHeading)||void 0===Y?void 0:Y.heading,width:"85%"},{children:e.jsxs("div",Object.assign({className:"graph__wrapper",style:{padding:"8px"}},{children:[a.customLegend&&re(!0),e.jsx("div",Object.assign({style:{height:"70vh",width:"100%",padding:"16px",borderRadius:"8px"}},{children:e.jsx(n.Bar,{options:ne,data:se})}))]}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("chart.js"),o=require("chartjs-plugin-datalabels"),i=require("react-chartjs-2"),a=require("../../../TypographyStyle.js"),l=require("../../../../constants/Theme.js"),n=require("../utils/calcPercentage.js"),r=require("./StackedBarChart.model.js"),s=require("./StackedBarChart.styles.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(o);t.Chart.register(t.CategoryScale,t.LinearScale,t.BarElement,t.Tooltip,t.Legend,c.default);exports.StackedBarChart=t=>{var o,d,c,u,O,v,A,x,g,p,T,R,y,I,C,N,b,S,h,E,H,F,f,k,L,m,j,P,_,G,B,Z,z,D,q;const w=0===t.yAxis.data.length,V=void 0===t.customColourScaleBrand||void 0===t.customColourScalePastel?t.colorSchema===r.COLOR_SCHEMA.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"]:t.colorSchema===r.COLOR_SCHEMA.PASTEL?t.customColourScalePastel:t.customColourScaleBrand,W=t.customHoverColour,M={barPercentage:.4,categoryPercentage:1,pointStyle:"circle",barWidth:t.barWidth},Y={};t.yAxis.data.map((e=>{e.map((e=>{Y[e.name]?Y[e.name].push(e.value):Y[e.name]=[e.value]}))}));const J=Object.keys(Y).map(((e,t)=>Object.assign({label:e,data:Y[e],backgroundColor:V[t],hoverBackgroundColor:void 0===W?void 0:W[t]},M))),K={plugins:{legend:{display:!w&&!t.customLegend,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!w,callbacks:{label:null===(o=t.tooltipConfig)||void 0===o?void 0:o.labelCallback,footer:null===(d=t.tooltipConfig)||void 0===d?void 0:d.footerCallback},footerFont:null===(u=null===(c=t.tooltipConfig)||void 0===c?void 0:c.footerStyles)||void 0===u?void 0:u.footerFont},datalabels:{display:null!==(O=t.showTotal)&&void 0!==O&&O,anchor:"end",align:"end",clamp:!0,formatter:(e,t)=>{var o;const i=t.datasetIndex,a=t.chart.data.datasets;if(i!==a.length-1)return"";const l=t.dataIndex;let n=0;for(let e=0;e<a.length;e++)n+=null!==(o=a[e].data[l])&&void 0!==o?o:0;return n?n<1e3?n:(n/1e3).toString().substring(0,4)+"k":""},color:l.COLORS.content.secondary}},layout:{padding:{right:t.showTotal&&t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?50:0,top:t.showTotal&&t.orientation!=r.GRAPH_ORIENTATION.HORIZONTAL?50:0}},responsive:!0,maintainAspectRatio:!1,legend:{display:!t.customLegend,labels:{usePointStyle:!0}},indexAxis:t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?null===(v=t.yAxis)||void 0===v?void 0:v.title:null===(A=t.xAxis)||void 0===A?void 0:A.title),text:t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?null===(x=t.yAxis)||void 0===x?void 0:x.title:null===(g=t.xAxis)||void 0===g?void 0:g.title,color:null!==(R=t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?null===(p=t.yAxis)||void 0===p?void 0:p.titleColor:null===(T=t.xAxis)||void 0===T?void 0:T.titleColor)&&void 0!==R?R:l.COLORS.content.secondary,font:{size:l.FONTS.caption.fontSize}},grid:{display:t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL,color:l.COLORS.background.base},ticks:{fontSize:l.FONTS.caption.fontSize,color:null!==(y=t.yAxis.labelColor)&&void 0!==y?y:l.COLORS.content.secondary,callback:t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?t.isInternationalStore?n.truncateValueForInternationalStore:n.truncateValueForIndianStore:void 0},stacked:t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?"boolean"!=typeof(null===(I=t.yAxis)||void 0===I?void 0:I.stacked)||(null===(C=t.yAxis)||void 0===C?void 0:C.stacked):"boolean"!=typeof(null===(N=t.xAxis)||void 0===N?void 0:N.stacked)||(null===(b=t.xAxis)||void 0===b?void 0:b.stacked)},y:{title:{display:!!(t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?null===(S=t.xAxis)||void 0===S?void 0:S.title:null===(h=t.yAxis)||void 0===h?void 0:h.title),text:t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?null===(E=t.xAxis)||void 0===E?void 0:E.title:null===(H=t.yAxis)||void 0===H?void 0:H.title,color:null!==(k=t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?null===(F=t.xAxis)||void 0===F?void 0:F.titleColor:null===(f=t.yAxis)||void 0===f?void 0:f.titleColor)&&void 0!==k?k:l.COLORS.content.secondary,font:{size:l.FONTS.caption.fontSize}},grid:{display:t.orientation!==r.GRAPH_ORIENTATION.HORIZONTAL,color:l.COLORS.background.base},ticks:Object.assign(Object.assign({stepSize:t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?null===(L=t.xAxis)||void 0===L?void 0:L.stepSize:null===(m=t.yAxis)||void 0===m?void 0:m.stepSize,fontSize:l.FONTS.caption.fontSize,color:null!==(j=t.xAxis.labelColor)&&void 0!==j?j:l.COLORS.content.secondary},w?{min:0,max:2e3,stepSize:200}:{}),{callback:t.orientation!==r.GRAPH_ORIENTATION.VERTICAL?t.isInternationalStore?n.truncateValueForInternationalStore:n.truncateValueForIndianStore:void 0}),stacked:t.orientation===r.GRAPH_ORIENTATION.HORIZONTAL?"boolean"!=typeof(null===(P=t.xAxis)||void 0===P?void 0:P.stacked)||(null===(_=t.xAxis)||void 0===_?void 0:_.stacked):"boolean"!=typeof(null===(G=t.yAxis)||void 0===G?void 0:G.stacked)||(null===(B=t.yAxis)||void 0===B?void 0:B.stacked)}},onClick:(e,o)=>{if(!t.onBarClick)return;const i=o[0].datasetIndex,a=o[0].index,l=e.chart.data.datasets[i].label,n=e.chart.data.labels[a];t.onBarClick(n,l)},onHover:(e,o)=>{t.onBarClick&&o.length&&(e.native.target.style.cursor="pointer")}};t.orientation&&t.orientation!==r.GRAPH_ORIENTATION.VERTICAL?delete K.scales.y.ticks.callback:delete K.scales.x.ticks.callback;const Q={labels:t.xAxis.data.map((e=>"string"==typeof e?e:e.name)),datasets:w?[{data:[250,1e3,800,1500,300,600],backgroundColor:"rgba(0,0,0,0)"}]:J};return e.jsxs(s.GraphContainerWrapper,Object.assign({style:null!==(Z=t.wrapperStyle)&&void 0!==Z?Z:{},padding:t.outerPadding,customLegend:t.customLegend},{children:[t.chartHeading&&e.jsx("div",Object.assign({style:{marginBottom:24}},{children:e.jsx(a.TitleRegular,Object.assign({color:null!==(z=t.chartHeading.color)&&void 0!==z?z:l.COLORS.content.secondary},{children:t.chartHeading.heading}))})),t.customLegend&&e.jsx("div",Object.assign({style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",padding:"0px 24px 12px 24px",justifyContent:"flex-end"}},{children:J.map((t=>e.jsxs("div",Object.assign({className:"legend__row"},{children:[e.jsx("div",{className:"legend__palette",style:{backgroundColor:t.backgroundColor}}),e.jsx(a.BodyTiny,Object.assign({color:l.COLORS.content.secondary},{children:t.label}))]}),t.label.replace(" ","_"))))})),e.jsx("div",Object.assign({className:"graph__wrapper"},{children:e.jsx("div",Object.assign({style:{height:null!==(D=t.graphCanvasHeight)&&void 0!==D?D:500,width:null!==(q=t.graphCanvasWidth)&&void 0!==q?q:"auto"}},{children:e.jsx(i.Bar,{options:K,data:Q})}))}))]}))};
@@ -59,7 +59,4 @@ export interface StackedBarGraphI {
59
59
  customColourScalePastel?: string[];
60
60
  customHoverColour?: string[];
61
61
  isInternationalStore?: boolean;
62
- truncateBars?: number;
63
- allowChartPopup?: boolean;
64
- hideHeading?: boolean;
65
62
  }
@@ -5,7 +5,7 @@ import { CHANNEL_TYPE } from '../template-preview/models/Channels';
5
5
  import { CUSTOM_VARIABLE, GlobalPlaceholderType } from '../template-preview/models/TemplateMeta';
6
6
  import { AllTemplateTypes, AllTemplateVariables, NonNullTemplateTypes } from '../template-preview/models/types';
7
7
  import { WebpushTemplateVariables } from '../template-preview/models/WebpushTemplate';
8
- import { ExtrasWhatsapp, POD, WhatsAppPickerMeta, WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
8
+ import { ExtrasWhatsapp, POD, TEMPLATE_QUALITY, WhatsAppPickerMeta, WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
9
9
  import { VariableV3 } from '../variable-picker-v3/model';
10
10
  export interface TemplateContextMapperProps {
11
11
  selectedTemplate: NonNullTemplateTypes;
@@ -62,5 +62,6 @@ export interface TemplateContextMapperProps {
62
62
  showDiscountCodeExpiryInfo?: boolean;
63
63
  footerButtonText?: string;
64
64
  footerInfoText?: string;
65
+ templateQuality?: TEMPLATE_QUALITY;
65
66
  }
66
67
  export declare const TemplateContextMapper: (props: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("lodash"),l=require("react"),o=require("../../utils/StringUtils.js"),a=require("../../constants/Theme.js"),i=require("../modals/styledModal.js"),r=require("../template-preview/models/Channels.js"),s=require("../template-preview/models/WhatsAppTemplate.js"),n=require("./context/templateModalContext.js"),d=require("./modalElements/Footer.js"),u=require("./modalElements/TemplateSelectModalContent.js"),c=require("./utils/convertPlaceholdersToBikDropdown.js");exports.TemplateContextMapper=p=>{var v,m,C,h,b,S,E,x;const{selectedTemplate:f,closeDialog:P,showVariableMapping:T,channel:g,htmlContent:y,templateVariables:I,onTemplateSelect:D,globalPlaceholders:L,showOnlyContent:j,whatsappSpecificPickerMeta:w,zIndex:k,showVariableModal:V,variableList:A,discountCode:H,setDiscountCode:M,onBackPress:N,enabledCustomText:B,variableListForImage:O,showSampleValues:q,disableEditVariable:F,pod:_,extras:W,pickerConf:Y,selectedCarouselProducts:R,disableEditExpiry:z,cardWidth:U,onDeleteSelectedProducts:$,fileName:G,setFileName:J,hideDeviceContainerInPreview:K,maxCharLimit:Q,onDefaultVariableSelect:X,skipDefaultVariableContent:Z,disableDatePicker:ee,disableCopyCode:te,initialExpiryDateTime:le,showDiscountCodeExpiryInfo:oe,footerButtonText:ae,footerInfoText:ie}=p;l.useEffect((()=>{ve(y)}),[y]);const re=g===r.CHANNEL_TYPE.WHATSAPP&&"CAROUSEL"===(null===(m=null===(v=null==f?void 0:f.components)||void 0===v?void 0:v[1])||void 0===m?void 0:m.type),se=null==f?void 0:f.isProductCarouselType,[ne,de]=l.useState(g===r.CHANNEL_TYPE.EMAIL||g==r.CHANNEL_TYPE.WEBPUSH||re?"desktop":"mobile"),[ue,ce]=l.useState(!1),[pe,ve]=l.useState(y),[me,Ce]=l.useState(!1),[he,be]=l.useState([]),[Se,Ee]=l.useState({}),[xe,fe]=l.useState(f),[Pe,Te]=l.useState([]),[ge,ye]=l.useState(null),[Ie,De]=l.useState(!1),[Le,je]=l.useState(null!=I?I:[]),[we,ke]=l.useState(!1),[Ve,Ae]=l.useState(re?(null===(h=null===(C=null==xe?void 0:xe.mapping)||void 0===C?void 0:C.body)||void 0===h?void 0:h.length)?-1:0:-1),[He,Me]=l.useState([]),[Ne,Be]=l.useState(void 0),Oe=l.useRef(null),[qe,Fe]=l.useState(!1),[_e,We]=l.useState(!1),[Ye,Re]=l.useState(!1),[ze,Ue]=l.useState({});l.useEffect((()=>{R?Me(R):se&&Me([])}),[R]),l.useEffect((()=>{var e;if(!Ie&&se&&(!R||0===Me.length)){const t=null===(e=null==xe?void 0:xe.components)||void 0===e?void 0:e[1].cards,l=[];null==t||t.forEach((e=>{var t;null===(t=null==e?void 0:e.components)||void 0===t||t.forEach((e=>{var t,o,a;"HEADER"===e.type&&l.push(null!==(a=null===(o=null===(t=e.example)||void 0===t?void 0:t.header_handle)||void 0===o?void 0:o[0])&&void 0!==a?a:"")}))})),Te(l),De(!0)}}),[Ie]);const $e=l.useMemo((()=>c.convertPlaceholdersToBikDropdown(L)),[L]);return l.useEffect((()=>{Be(t.cloneDeep(A))}),[A]),e.jsx(n.TemplateModalContext.Provider,Object.assign({value:{hideFooterButton:Ye,setHideFooterButton:Re,hideCrossButton:_e,setHideCrossButton:We,variableList:Ne,setVariableList:Be,variableCallback:ge,setVariableCallback:ye,showVariablePicker:ue,setShowVariablePicker:ce,template:xe,setTemplate:fe,device:ne,setDevice:de,display_content:pe,setDisplayContent:ve,originalVariableList:Le,setOriginalVariableList:je,isError:me,setIsError:Ce,channel:g,globalNormalizedPlaceholders:$e,templateSelectionTriggered:we,setTemplateSelectionTriggered:ke,enabledCustomText:B,disableEditVariable:F,pod:_,extras:W,isWhatsappCarousel:re,selectedCarouselIndex:Ve,setSelectedCarouselIndex:Ae,isProductCarouselType:se,templateErrorIndexes:Se,cardCount:re?null===(S=null===(b=f.components)||void 0===b?void 0:b[1].cards)||void 0===S?void 0:S.length:void 0,errorIndexes:he,setErrorIndexes:be,pickerConf:Y,carouselProducts:He,setCarouselProducts:Me,disableEditExpiry:z,cardWidth:U,cardImages:Pe,onDeleteSelectedProducts:$,hideDeviceContainerInPreview:K,sliderRef:Oe,isCarouselHovered:qe,setIsCarouselHovered:Fe,maxCharLimit:Q,ctaOptionsErrors:ze,setCtaOptionsErrors:Ue,onDefaultVariableSelect:X,disableDatePicker:ee,disableCopyCode:te,initialExpiryDateTime:le,showDiscountCodeExpiryInfo:oe}},{children:j?e.jsx(u.default,{variableListFromProps:A,channel:r.CHANNEL_TYPE.EMAIL,hideHeader:!0}):e.jsxs(i.StyledModal,Object.assign({hideCrossButton:_e,zIndex:k,centralContainerStyles:{width:re?900:g===r.CHANNEL_TYPE.EMAIL&&T?1e3:800},open:!0,onClose:()=>{null==P||P()},headingTitle:null==xe?void 0:xe.label,headingSubtitle:g===r.CHANNEL_TYPE.WHATSAPP?`${o.default.capitaliseFirstLetterOfString(null!==(E=null==xe?void 0:xe.category)&&void 0!==E?E:"")} • ${null!==(x=null==xe?void 0:xe.templateCategory)&&void 0!==x?x:""}`:"",onBackPress:N,modalHeaderStyles:{borderBottom:`1px solid ${a.COLORS.stroke.primary}`}},{children:[e.jsx(u.default,{variableListFromProps:A,showSampleValues:q,showVariableMapping:T,channel:g,whatsappSpecificPickerMeta:w,showVariableModal:V,discountCode:H,setDiscountCode:M,variableListForImage:O&&(null==O?void 0:O.length)>0?O:Ne,fileName:G,setFileName:e=>{null==J||J(e)},skipDefaultVariableContent:Z}),D?e.jsx(d.default,{isWhatsappCarousel:null!=re&&re,onSelect:function(){var e;if((null==He?void 0:He.length)<1&&se)return void Ce(!0);if(Object.keys(ze).length>0&&_!==s.POD.CHATBOT)return void Ce(!0);const t=null==D?void 0:D(xe,Le,null!=pe?pe:"",He);Ee(null!==(e=null==t?void 0:t.templateErrorIndexes)&&void 0!==e?e:{body:[],buttons:[]}),(null==t?void 0:t.errorIndexes)||(null==t?void 0:t.error)?((null==t?void 0:t.errorIndexes)&&be(t.errorIndexes),(null==t?void 0:t.error)&&Ce(!!(null==t?void 0:t.error))):ke(!0)},footerButtonText:ae,footerInfoText:ie}):e.jsx(e.Fragment,{})]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("lodash"),l=require("react"),o=require("../../utils/StringUtils.js"),a=require("../../constants/Theme.js"),i=require("../modals/styledModal.js"),r=require("../template-preview/models/Channels.js"),s=require("../template-preview/models/WhatsAppTemplate.js"),n=require("./context/templateModalContext.js"),d=require("./modalElements/Footer.js"),u=require("./modalElements/QualityWarningModal.js"),c=require("./modalElements/TemplateSelectModalContent.js"),p=require("./utils/convertPlaceholdersToBikDropdown.js");exports.TemplateContextMapper=v=>{var m,C,h,E,b,S,f,x,P,T;const{selectedTemplate:g,closeDialog:y,showVariableMapping:L,channel:I,htmlContent:D,templateVariables:A,onTemplateSelect:j,globalPlaceholders:w,showOnlyContent:M,whatsappSpecificPickerMeta:k,zIndex:H,showVariableModal:N,variableList:V,discountCode:O,setDiscountCode:q,onBackPress:B,enabledCustomText:_,variableListForImage:F,showSampleValues:W,disableEditVariable:Y,pod:R,extras:U,pickerConf:$,selectedCarouselProducts:Q,disableEditExpiry:z,cardWidth:G,onDeleteSelectedProducts:J,fileName:K,setFileName:X,hideDeviceContainerInPreview:Z,maxCharLimit:ee,onDefaultVariableSelect:te,skipDefaultVariableContent:le,disableDatePicker:oe,disableCopyCode:ae,initialExpiryDateTime:ie,showDiscountCodeExpiryInfo:re,footerButtonText:se,footerInfoText:ne,templateQuality:de}=v;l.useEffect((()=>{Ee(D)}),[D]);const ue=I===r.CHANNEL_TYPE.WHATSAPP&&"CAROUSEL"===(null===(C=null===(m=null==g?void 0:g.components)||void 0===m?void 0:m[1])||void 0===C?void 0:C.type),ce=null==g?void 0:g.isProductCarouselType,[pe,ve]=l.useState(I===r.CHANNEL_TYPE.EMAIL||I==r.CHANNEL_TYPE.WEBPUSH||ue?"desktop":"mobile"),[me,Ce]=l.useState(!1),[he,Ee]=l.useState(D),[be,Se]=l.useState(!1),[fe,xe]=l.useState([]),[Pe,Te]=l.useState({}),[ge,ye]=l.useState(g),[Le,Ie]=l.useState([]),[De,Ae]=l.useState(null),[je,we]=l.useState(!1),[Me,ke]=l.useState(null!=A?A:[]),[He,Ne]=l.useState(!1),[Ve,Oe]=l.useState(ue?(null===(E=null===(h=null==ge?void 0:ge.mapping)||void 0===h?void 0:h.body)||void 0===E?void 0:E.length)?-1:0:-1),[qe,Be]=l.useState([]),[_e,Fe]=l.useState(void 0),We=l.useRef(null),[Ye,Re]=l.useState(!1),[Ue,$e]=l.useState(!1),[Qe,ze]=l.useState(!1),[Ge,Je]=l.useState(!0),[Ke,Xe]=l.useState(!0),[Ze,et]=l.useState({});l.useEffect((()=>{Q?Be(Q):ce&&Be([])}),[Q]),l.useEffect((()=>{var e;if(!je&&ce&&(!Q||0===Be.length)){const t=null===(e=null==ge?void 0:ge.components)||void 0===e?void 0:e[1].cards,l=[];null==t||t.forEach((e=>{var t;null===(t=null==e?void 0:e.components)||void 0===t||t.forEach((e=>{var t,o,a;"HEADER"===e.type&&l.push(null!==(a=null===(o=null===(t=e.example)||void 0===t?void 0:t.header_handle)||void 0===o?void 0:o[0])&&void 0!==a?a:"")}))})),Ie(l),we(!0)}}),[je]);const tt=l.useMemo((()=>p.convertPlaceholdersToBikDropdown(w)),[w]);return l.useEffect((()=>{Fe(t.cloneDeep(V))}),[V]),de!==s.TEMPLATE_QUALITY.RED&&de!==s.TEMPLATE_QUALITY.YELLOW||!Ge?e.jsx(n.TemplateModalContext.Provider,Object.assign({value:{hideFooterButton:Qe,setHideFooterButton:ze,hideCrossButton:Ue,setHideCrossButton:$e,variableList:_e,setVariableList:Fe,variableCallback:De,setVariableCallback:Ae,showVariablePicker:me,setShowVariablePicker:Ce,template:ge,setTemplate:ye,device:pe,setDevice:ve,display_content:he,setDisplayContent:Ee,originalVariableList:Me,setOriginalVariableList:ke,isError:be,setIsError:Se,channel:I,globalNormalizedPlaceholders:tt,templateSelectionTriggered:He,setTemplateSelectionTriggered:Ne,enabledCustomText:_,disableEditVariable:Y,pod:R,extras:U,isWhatsappCarousel:ue,selectedCarouselIndex:Ve,setSelectedCarouselIndex:Oe,isProductCarouselType:ce,templateErrorIndexes:Pe,cardCount:ue?null===(x=null===(f=g.components)||void 0===f?void 0:f[1].cards)||void 0===x?void 0:x.length:void 0,errorIndexes:fe,setErrorIndexes:xe,pickerConf:$,carouselProducts:qe,setCarouselProducts:Be,disableEditExpiry:z,cardWidth:G,cardImages:Le,onDeleteSelectedProducts:J,hideDeviceContainerInPreview:Z,sliderRef:We,isCarouselHovered:Ye,setIsCarouselHovered:Re,maxCharLimit:ee,ctaOptionsErrors:Ze,setCtaOptionsErrors:et,onDefaultVariableSelect:te,disableDatePicker:oe,disableCopyCode:ae,initialExpiryDateTime:ie,showDiscountCodeExpiryInfo:re}},{children:M?e.jsx(c.default,{variableListFromProps:V,channel:r.CHANNEL_TYPE.EMAIL,hideHeader:!0}):e.jsxs(i.StyledModal,Object.assign({hideCrossButton:Ue,zIndex:H,centralContainerStyles:{width:ue?900:I===r.CHANNEL_TYPE.EMAIL&&L?1e3:800},open:Ke,onClose:()=>{Xe(!1),null==y||y()},headingTitle:null==ge?void 0:ge.label,headingSubtitle:I===r.CHANNEL_TYPE.WHATSAPP?`${o.default.capitaliseFirstLetterOfString(null!==(P=null==ge?void 0:ge.category)&&void 0!==P?P:"")} • ${null!==(T=null==ge?void 0:ge.templateCategory)&&void 0!==T?T:""}`:"",onBackPress:B,modalHeaderStyles:{borderBottom:`1px solid ${a.COLORS.stroke.primary}`}},{children:[e.jsx(c.default,{variableListFromProps:V,showSampleValues:W,showVariableMapping:L,channel:I,whatsappSpecificPickerMeta:k,showVariableModal:N,discountCode:O,setDiscountCode:q,variableListForImage:F&&(null==F?void 0:F.length)>0?F:_e,fileName:K,setFileName:e=>{null==X||X(e)},skipDefaultVariableContent:le}),j?e.jsx(d.default,{isWhatsappCarousel:null!=ue&&ue,onSelect:function(){var e;if((null==qe?void 0:qe.length)<1&&ce)return void Se(!0);if(Object.keys(Ze).length>0&&R!==s.POD.CHATBOT)return void Se(!0);const t=null==j?void 0:j(ge,Me,null!=he?he:"",qe);Te(null!==(e=null==t?void 0:t.templateErrorIndexes)&&void 0!==e?e:{body:[],buttons:[]}),(null==t?void 0:t.errorIndexes)||(null==t?void 0:t.error)?((null==t?void 0:t.errorIndexes)&&xe(t.errorIndexes),(null==t?void 0:t.error)&&Se(!!(null==t?void 0:t.error))):Ne(!0)},footerButtonText:se,footerInfoText:ne}):e.jsx(e.Fragment,{})]}))})):e.jsx(u.default,{headingTitle:null==ge?void 0:ge.label,headingSubtitle:I===r.CHANNEL_TYPE.WHATSAPP?`${o.default.capitaliseFirstLetterOfString(null!==(b=null==ge?void 0:ge.category)&&void 0!==b?b:"")} • ${null!==(S=null==ge?void 0:ge.templateCategory)&&void 0!==S?S:""}`:"",quality:de,onClose:()=>{null==y||y(),Je(!1),Xe(!1)},onCancel:()=>{Je(!1),Xe(!1)},onProceed:()=>{Je(!1),Xe(!0)}})};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { TEMPLATE_QUALITY } from "../../template-preview";
3
+ interface QualityWarningModalProps {
4
+ quality: TEMPLATE_QUALITY;
5
+ onClose?: () => void;
6
+ onProceed?: () => void;
7
+ onCancel?: () => void;
8
+ headingTitle?: string;
9
+ headingSubtitle?: string;
10
+ }
11
+ declare const QualityWarningModal: React.FC<QualityWarningModalProps>;
12
+ export default QualityWarningModal;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/alert_triangle.svg.js"),n=require("../../modals/styledModal.js"),i=require("../../TypographyStyle.js"),r=require("../../../constants/Theme.js");const l={YELLOW:"Medium quality",RED:"Low quality"};exports.default=o=>{let{quality:s,onClose:a,onProceed:d,onCancel:c,headingTitle:u,headingSubtitle:g}=o;return e.jsx(n.StyledModal,Object.assign({open:!0,headingTitle:u,tintedHeader:!0,modalHeaderStyles:{backgroundColor:r.COLORS.surface.subdued},onBackPress:()=>{null==a||a()},headingSubtitle:g,footerShadow:!0,primaryButton:{buttonText:"Cancel",buttonType:"primary",onClick:()=>{null==a||a(),null==c||c()}},secondaryButton:{buttonText:"Proceed with selection",buttonType:"secondary",onClick:()=>{null==d||d()}},onClose:()=>{null==a||a()}},{children:e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"128px 80px",gap:"16px"}},{children:[e.jsx("div",Object.assign({style:{background:r.COLORS.background.warning.light,width:"64px",height:"64px",padding:"12px",borderRadius:"40px"}},{children:e.jsx(t.default,{width:40,height:40,color:r.COLORS.content.warning})})),e.jsxs(i.TitleMedium,{children:[l[s]," template"]}),e.jsx(i.BodyPrimary,Object.assign({style:{textAlign:"center"},color:r.COLORS.content.secondary},{children:`This template is of ${l[s]}. Are you sure you want to send the\n\t\t\t\t\tcampaign with this template? We recommend changing the content or\n\t\t\t\t\tselect a different template before proceeding`}))]}))}))};
@@ -197,6 +197,11 @@ export type WhatsappPreviewButtonType = {
197
197
  flowId: string;
198
198
  flowName: string;
199
199
  };
200
+ export declare enum TEMPLATE_QUALITY {
201
+ GREEN = "GREEN",
202
+ YELLOW = "YELLOW",
203
+ RED = "RED"
204
+ }
200
205
  export type WhatsappMeta = {
201
206
  containerStyle?: React.CSSProperties | undefined;
202
207
  templateContainerStyles?: React.CSSProperties | undefined;
@@ -1 +1 @@
1
- "use strict";var O,T;Object.defineProperty(exports,"__esModule",{value:!0}),exports.BUTTON_TYPE=void 0,(O=exports.BUTTON_TYPE||(exports.BUTTON_TYPE={})).QUICK_REPLY="QUICK_REPLY",O.URL="URL",O.PHONE_NUMBER="PHONE_NUMBER",O.COPY_CODE="COPY_CODE",exports.POD=void 0,(T=exports.POD||(exports.POD={})).CHATBOT="CHATBOT",T.GROWTH="GROWTH",T.CAMPAIGN="CAMPAIGN",T.CRM="CRM",T.INTEGRATIONS="INTEGRATIONS",T.OPENAI="OPENAI",T.DM="DM",T.FRONTEND="FRONTEND";
1
+ "use strict";var E,T,O;Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEMPLATE_QUALITY=void 0,(E=exports.TEMPLATE_QUALITY||(exports.TEMPLATE_QUALITY={})).GREEN="GREEN",E.YELLOW="YELLOW",E.RED="RED",exports.BUTTON_TYPE=void 0,(T=exports.BUTTON_TYPE||(exports.BUTTON_TYPE={})).QUICK_REPLY="QUICK_REPLY",T.URL="URL",T.PHONE_NUMBER="PHONE_NUMBER",T.COPY_CODE="COPY_CODE",exports.POD=void 0,(O=exports.POD||(exports.POD={})).CHATBOT="CHATBOT",O.GROWTH="GROWTH",O.CAMPAIGN="CAMPAIGN",O.CRM="CRM",O.INTEGRATIONS="INTEGRATIONS",O.OPENAI="OPENAI",O.DM="DM",O.FRONTEND="FRONTEND";
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./amplitude/index.js"),r=require("./components/template-preview/constants/regexPatterns.js"),t=require("./utils/StringUtils.js"),o=require("./constants/Theme.js"),n=require("./constants/zindex.js"),i=require("./components/checkBox/CheckBox.js"),a=require("./components/list-item/ListItem.js"),s=require("./components/pagination/Pagination.js"),p=require("./components/radioButton/RadioButton.js"),u=require("./components/toaster/Toaster.js"),c=require("./components/tooltips/Tooltip.js"),l=require("./components/spinner/Spinner.js"),d=require("./components/stepper/Stepper.js"),m=require("./components/tag/Tag.js"),T=require("./components/icon-button/IconButton.js"),x=require("./components/template-preview/TemplatePreview.js"),P=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),S=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),A=require("./components/template-preview/helpers/SmsTemplateHelper.js"),C=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),y=require("./components/template-preview/helpers/VariableEditorHelper.js"),O=require("./components/template-preview/models/TemplateMeta.js"),b=require("./components/template-preview/models/WhatsAppTemplate.js"),E=require("./components/template-preview/models/Channels.js"),j=require("./components/template-context-mapper/TemplateContextMapper.js"),h=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),R=require("./components/template-context-mapper/utils/validateIsUrl.js");require("./_virtual/_tslib.js");var g=require("./components/fab-menu/FABMenu.js"),B=require("./components/floating-action-button/FloatingActionButton.js"),_=require("./components/floating-action-button/FloatingActionButton.styles.js"),I=require("./components/image-compress/ImageCompress.js"),q=require("./components/TypographyStyle.js"),f=require("./components/button/Button.js"),D=require("./components/progress-bar/ProgressBarComponent.js");require("react/jsx-runtime");var N=require("./components/progress-bar-v2/ProgressBarV2.js"),w=require("./components/QueryBuilder/QueryBuilder.js"),k=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),L=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),M=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),V=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),v=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),G=require("./components/modals/styledModal.js"),F=require("./components/dropdown/DropdownPopover/index.js"),U=require("./components/dropdown/Dropdown.js"),H=require("./components/dropdown/ChipDropdown.js"),W=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),Y=require("./components/dropdown/MenuItem/MenuItem.js"),Q=require("./components/analytics-card/AnalyticsCard.js"),K=require("./components/analytics-card/AnalyticsCard.styled.js"),z=require("./components/input/Input.js"),Z=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),X=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),J=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),$=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),ee=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),re=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),te=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),ae=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),se=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js"),pe=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js"),ue=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),ce=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js"),le=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),de=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js"),me=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),Te=require("./components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js"),xe=require("./components/avatar/Avatar.js"),Pe=require("./components/avatar/AvatarHelper.js"),Se=require("./components/alerts/Alert.js"),Ae=require("./components/alerts/AlertHelper.js"),Ce=require("./components/thumbnail/Thumbnail.js"),ye=require("./components/curtain/Curtain.js"),Oe=require("./components/datePicker/DatePicker.js"),be=require("./components/datePicker/DatePickerWrapper.js"),Ee=require("./components/switch/Switch.js"),je=require("./components/plans/SubscriptionPlan.js"),he=require("./components/plans/SubscriptionPlanSelector.js"),Re=require("./components/plans/NewSubscriptionPlan.js"),ge=require("./components/plans/SubscriptionPlansCollected.js"),Be=require("./components/tabs/Tabs.js"),_e=require("./components/dynamic-tabs/DynamicTabs.js"),Ie=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),qe=require("./components/TablePagination/TablePagination.js"),fe=require("./components/TablePagination/TablePaginationCard.js"),De=require("./components/states-modal/StateModalComponent.js"),Ne=require("./components/states-modal/DeleteConfirmationModal.js"),we=require("./components/states/StateComponent.js"),ke=require("./components/states/ShopifyScopeWrapper.js"),Le=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),Me=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),Ve=require("./helpers/BaseWhatsappContentLang.helper.js"),ve=require("./components/curtain/CurtainHelper.js"),Ge=require("./utils/resizeImage.js"),Fe=require("./components/variable-picker-v3/model.js"),Ue=require("./components/card-selection-modal/CardSelectionModal.js"),He=require("./components/image-cropper/BikImageCropper.js"),We=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),Ye=require("./components/buttonGroup/ButtonGroup.js"),Qe=require("./components/accordion/Accordion.js"),Ke=require("./components/file-uploader/FileUploader.js"),ze=require("./components/colourInput/ColourInput.js"),Ze=require("./components/bik-layout/BikHeader.js"),Xe=require("./components/bik-layout/BikLayout.js"),Je=require("./components/bik-layout/BikProfile.js"),$e=require("./components/bik-layout/SimpleSidebar.js"),er=require("./components/bik-layout/BikSidebar.js"),rr=require("./components/bik-layout/FeatureModal.js"),tr=require("./components/bik-layout/SidebarSkeleton.js"),or=require("./components/bik-layout/ShowShopifyRestrictedModal.js"),nr=require("./components/bik-layout/FeatureModalV2.js"),ir=require("./components/searchBar/searchBar.js"),ar=require("./components/custom-date-time/CustomDateTime.js"),sr=require("./components/product-picker/ProductPickerModal.js"),pr=require("./components/discount-modal/DiscountModal.js"),ur=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),cr=require("./components/discount-modal/type.js"),lr=require("./components/country-code-picker/CountryCodePicker.js"),dr=require("./components/country-code-picker/CountryCodePicker.modal.js"),mr=require("./components/shimmer-image/ShimmerImage.js"),Tr=require("./components/product-picker-v2/modal.js"),xr=require("./components/carousel/carousel.js"),Pr=require("./components/carousel-secondary/CarouselSecondary.js"),Sr=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),Ar=require("./components/radioList/RadioList.js"),Cr=require("./components/checkList/CheckList.js"),yr=require("./components/postPicker/postPicker.js"),Or=require("./components/dropdown-button/DropdownButton.js"),br=require("./components/side-modal/SideModal.js"),Er=require("./components/keywords-input/KeywordsInput.js"),jr=require("./components/add-variableV2/AddVariableV2SideModal.js"),hr=require("./components/add-variableV2/AddVariableV2.js"),Rr=require("./components/navigation-hyperlink/NavigationHyperlink.js"),gr=require("./components/SearchFilter/index.js"),Br=require("./components/input-with-vars/InputWithVariables.js"),_r=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),Ir=require("./components/star-rating/StarRating.js"),qr=require("./components/testimonial-card/TestimonialCard.js"),fr=require("./components/slider/slider.js"),Dr=require("./components/resizeImage/index.js"),Nr=require("./utils/validator.js"),wr=require("./components/carousel-preview/CarouselPreview.js"),kr=require("./components/floater/floater.js"),Lr=require("./components/card-selector/CardSelector.js"),Mr=require("./components/card-selector/CardSelectorGroup.js"),Vr=require("./components/variable-picker-v3/VariablePicker.js"),vr=require("./components/action-button/ActionButtons.js"),Gr=require("./components/ai-modals/ActivateBikAI.js"),Fr=require("./components/ai-modals/AiSyncProgress.js"),Ur=require("./components/ai-modals/AiCreditsExhausted.js"),Hr=require("./components/ai-modals/AiCreditsLow.js"),Wr=require("./components/input-with-vars/customPortal.js"),Yr=require("./components/floating-input-dropdown/FloatingInputDropdown.js"),Qr=require("./components/dropdown/MultilevelDropdownPopover/index.js"),Kr=require("./components/dropShadow/DropShadow.js"),zr=require("./components/multi-level-dropdown/MultiLevelDropdown.js");exports.AmplitudeEvent=e.AmplitudeEvent,exports.regexPatterns=r,exports.StringUtils=t.default,exports.BASE_COLORS=o.BASE_COLORS,exports.COLORS=o.COLORS,exports.DEFAULT_THEME=o.DEFAULT_THEME,exports.FONTS=o.FONTS,exports.ComponentZindex=n.ComponentZindex,exports.CheckBox=i.CheckBox,exports.ListItem=a.ListItem,exports.Pagination=s.Pagination,exports.RadioButton=p.RadioButton,exports.Toaster=u.Toaster,exports.Tooltip=c.Tooltip,exports.PureSpinner=l.PureSpinner,exports.Spinner=l.Spinner,exports.Stepper=d.Stepper,exports.Tag=m.Tag,exports.IconButton=T.IconButton,exports.TemplatePreview=x.TemplatePreview,exports.WhatsappLikePreview=P.WhatsappLikePreview,exports.WhatsappLikePreviewV2=S.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=A.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=C.WhatsAppFormatToHTML,exports.VariableEditorHelper=y.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return O.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=O.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return O.HEADER_TYPES}}),exports.STATIC_URL_CTA_OPTION=O.STATIC_URL_CTA_OPTION,Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return O.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return O.TEMPLATE_STATUS}}),Object.defineProperty(exports,"BUTTON_TYPE",{enumerable:!0,get:function(){return b.BUTTON_TYPE}}),Object.defineProperty(exports,"POD",{enumerable:!0,get:function(){return b.POD}}),Object.defineProperty(exports,"CHANNEL_TYPE",{enumerable:!0,get:function(){return E.CHANNEL_TYPE}}),exports.TemplateContextMapper=j.TemplateContextMapper,exports.getAllDataFromTemplateComponent=h.getAllDataFromTemplateComponent,exports.getAllDataFromWebpushTemplateComponent=h.getAllDataFromWebpushTemplateComponent,exports.isVariable=R.isVariable,exports.validateIsUrl=R.validateIsUrl,exports.FABMenu=g.FABMenu,exports.FloatingActionButton=B.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return _.DROP_POSITION}}),exports.DropdownToggleContainer=_.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return _.FAB_POSITION}}),exports.FloatingActionButtonContainer=_.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=_.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return _.MENU_ALIGNMENT}}),exports.StyledDropdown=_.StyledDropdown,exports.TooltipStyled=_.TooltipStyled,exports.ImageService=I.ImageService,exports.AiBodyCaption=q.AiBodyCaption,exports.AiBodyTiny=q.AiBodyTiny,exports.BodyCaption=q.BodyCaption,exports.BodyLarge=q.BodyLarge,exports.BodyPrimary=q.BodyPrimary,exports.BodyPrimaryLink=q.BodyPrimaryLink,exports.BodyRegular=q.BodyRegular,exports.BodySecondary=q.BodySecondary,exports.BodySecondaryLink=q.BodySecondaryLink,exports.BodySmall=q.BodySmall,exports.BodyTiny=q.BodyTiny,exports.ButtonLarge=q.ButtonLarge,exports.ButtonLargeAI=q.ButtonLargeAI,exports.ButtonRegular=q.ButtonRegular,exports.ButtonRegularAI=q.ButtonRegularAI,exports.Caption=q.Caption,exports.CaptionBold=q.CaptionBold,exports.Display=q.Display,exports.SmallRegular=q.SmallRegular,exports.SubHeading=q.SubHeading,exports.TextPlaceholder=q.TextPlaceholder,exports.Tiny=q.Tiny,exports.TitleFour=q.TitleFour,exports.TitleLarge=q.TitleLarge,exports.TitleMedium=q.TitleMedium,exports.TitleRegular=q.TitleRegular,exports.TitleSmall=q.TitleSmall,exports.TitleXlarge=q.TitleXlarge,exports.Button=f.Button,exports.ProgressBarComponent=D.ProgressBarComponent,exports.ProgressCompletedBar=D.ProgressCompletedBar,Object.defineProperty(exports,"ProgressBarType",{enumerable:!0,get:function(){return N.ProgressBarType}}),exports.ProgressBarV2=N.ProgressBarV2,Object.defineProperty(exports,"TextAlignment",{enumerable:!0,get:function(){return N.TextAlignment}}),exports.QueryBuilder=w.QueryBuilder,exports.BaseQueryBuilderNode=k.BaseQueryBuilderNode,exports.PropertyNode=L.PropertyNode,exports.PropertyNodeHeadless=L.PropertyNodeHeadless,exports.queryBuilderSlice=M.queryBuilderSlice,exports.queryBuilderCacheSlice=V.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return v.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return v.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return v.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return v.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return v.EVENT_VALUES}}),Object.defineProperty(exports,"EXACTLY_OPERATORS",{enumerable:!0,get:function(){return v.EXACTLY_OPERATORS}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return v.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return v.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return v.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return v.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return v.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return v.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return v.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return v.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return v.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return v.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return v.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=G.StyledModal,exports.DropdownPopover=F.DropdownPopover,exports.Dropdown=U.Dropdown,exports.ChipDropdown=H.ChipDropdown,exports.ChipDropdownContainer=H.ChipDropdownContainer,exports.OpenedDropdown=W.OpenedDropdown,exports.MenuItemDropdown=Y.MenuItemDropdown,exports.AnalyticsCard=Q.AnalyticsCard,exports.AnalyticsContainer=K.AnalyticsContainer,exports.CardDataContainer=K.CardDataContainer,exports.Input=z.Input,exports.AnalyticsChip=Z.AnalyticsChip,exports.AnalyticsDropdown=X.AnalyticsDropdown,exports.EachItem=X.EachItem,exports.formatDate=X.formatDate,exports.AnalyticsMultiChip=J.AnalyticsMultiChip,exports.AnalyticsMetric=$.AnalyticsMetric,exports.AnalyticsTrend=ee.AnalyticsTrend,exports.LineChart=re.LineChart,exports.LinearChipGroupedChart=te.LinearChipGroupedChart,exports.Card=oe.Card,exports.PieChartAnalytics=oe.PieChartAnalytics,exports.PieChart=ne.PieChart,exports.HorizontalGraph=ie.HorizontalGraph,exports.StackedBarChart=ae.StackedBarChart,exports.StackedBarDistributionChart=se.StackedBarDistributionChart,Object.defineProperty(exports,"GRAPH_ORIENTATION",{enumerable:!0,get:function(){return pe.GRAPH_ORIENTATION}}),exports.VerticalGraph=ue.VerticalGraph,exports.FunnelVerticalBarGraph=ce.FunnelVerticalBarGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return le.HEAT}}),exports.HEAT_COLORS=le.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return le.HEAT_GRADING_TYPE}}),exports.HeatMap=le.HeatMap,exports.HeatBoxStyled=de.HeatBoxStyled,exports.HeatMapVertical=de.HeatMapVertical,exports.VerticalBarAndLinearGraph=me.VerticalBarAndLinearGraph,Object.defineProperty(exports,"TruncateValue",{enumerable:!0,get:function(){return Te.TruncateValue}}),exports.calculatePercentage=Te.calculatePercentage,exports.roundNumber=Te.roundNumber,exports.truncateValueForIndianStore=Te.truncateValueForIndianStore,exports.truncateValueForInternationalStore=Te.truncateValueForInternationalStore,exports.truncateValueTo10K=Te.truncateValueTo10K,exports.truncateValueToA=Te.truncateValueToA,exports.truncateValueToB=Te.truncateValueToB,exports.truncateValueToC=Te.truncateValueToC,exports.truncateValueToK=Te.truncateValueToK,exports.truncateValueToL=Te.truncateValueToL,exports.truncateValueToM=Te.truncateValueToM,exports.truncateValueToT=Te.truncateValueToT,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=xe.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=xe.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=xe.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"MESSAGE_CHANNELS",{enumerable:!0,get:function(){return xe.MESSAGE_CHANNELS}}),Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return Pe.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=Pe.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return Pe.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return Pe.SIZE}}),exports.Alert=Se.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return Ae.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=Ae.COLOR_CONFIG_MAP,Object.defineProperty(exports,"CONTENT_POSITION",{enumerable:!0,get:function(){return Ae.CONTENT_POSITION}}),Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return Ce.RATIO}}),exports.Thumbnail=Ce.Thumbnail,exports.Curtain=ye.Curtain,exports.DatePicker=Oe.DatePicker,exports.DatePickerWrapper=be.DatePickerWrapper,exports.Loader=Ee.Loader,exports.Switch=Ee.Switch,exports.SwitchContainer=Ee.SwitchContainer,exports.Thumb=Ee.Thumb,exports.SubscriptionPlan=je.SubscriptionPlan,exports.BottomWrapper=he.BottomWrapper,exports.HeaderWrapper=he.HeaderWrapper,exports.SubscriptionPlanSelector=he.SubscriptionPlanSelector,exports.defaultTabs=he.defaultTabs,exports.NewSubscriptionPlan=Re.NewSubscriptionPlan,exports.SubscriptionPlansCollected=ge.SubscriptionPlansCollected,exports.TabItemComponent=Be.TabItemComponent,exports.Tabs=Be.Tabs,exports.DynamicTabs=_e.DynamicTabs,exports.BikShimmer=Ie.BikShimmer,exports.TablePagination=qe.TablePagination,exports.TablePaginationCard=fe.TablePaginationCard,exports.TablePaginationCardStyled=fe.TablePaginationCardStyled,exports.StateModalComponent=De.StateModalComponent,exports.DeleteConfirmationModal=Ne.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return we.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return we.ButtonTypes}}),exports.StateComponent=we.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return we.StateInterface}}),exports.ShopifyScopeWrapper=ke.ShopifyScopeWrapper,exports.WhatsAppTextEditor=Le.WhatsAppTextEditor,exports.CustomRightBorder=Me.CustomRightBorder,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return Me.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=Me.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=Ve.BaseWhatsappContentLangHelper,exports.CURTAIN_COLOR_CONFIG_MAP=ve.CURTAIN_COLOR_CONFIG_MAP,Object.defineProperty(exports,"CURTAIN_MODE",{enumerable:!0,get:function(){return ve.CURTAIN_MODE}}),Object.defineProperty(exports,"CURTAIN_TYPES",{enumerable:!0,get:function(){return ve.CURTAIN_TYPES}}),exports.resizeImage=Ge.resizeImage,Object.defineProperty(exports,"PickerType",{enumerable:!0,get:function(){return Fe.PickerType}}),exports.CardSelectionModal=Ue.CardSelectionModal,exports.BikImageCropper=He.BikImageCropper,exports.BikImagePipeline=We.BikImagePipeline,exports.ButtonGroup=Ye.ButtonGroup,exports.BikAccordion=Qe.BikAccordion,exports.FileUploader=Ke.FileUploader,exports.ColourInput=ze.ColourInput,exports.BikHeader=Ze.BikHeader,exports.BikLayout=Xe.BikLayout,exports.BikProfile=Je.BikProfile,exports.SimpleSidebar=$e.SimpleSidebar,exports.BikSidebar=er.BikSidebar,exports.FeatureModal=rr.FeatureModal,exports.SidebarSkeleton=tr.SidebarSkeleton,exports.ShowShopifyRestrictedModal=or.ShowShopifyRestrictedModal,exports.FeatureModalV2=nr.FeatureModalV2,exports.SearchBar=ir.SearchBar,exports.CustomDateTime=ar.CustomDateTime,exports.PricePleaseProductPicker=sr.PricePleaseProductPicker,exports.ProductPickerContent=sr.ProductPickerContent,exports.DiscountModal=pr.DiscountModal,exports.CouponExpiration=ur.CouponExpiration,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return cr.COUPON_EXPIRATION}}),Object.defineProperty(exports,"DISCOUNT_APPLIES_TO",{enumerable:!0,get:function(){return cr.DISCOUNT_APPLIES_TO}}),Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return cr.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return cr.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return cr.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return cr.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return cr.MIN_PURCHASE_REQUIREMENT}}),Object.defineProperty(exports,"OFFER_APPLIES_TO",{enumerable:!0,get:function(){return cr.OFFER_APPLIES_TO}}),exports.initialDynamicCouponErrorState=cr.initialDynamicCouponErrorState,exports.initialStaticCouponErrorState=cr.initialStaticCouponErrorState,exports.CountryCodePicker=lr.CountryCodePicker,exports.CountriesData=dr.CountriesData,exports.DEFAULT_IMAGE=mr.DEFAULT_IMAGE,exports.ShimmerImage=mr.ShimmerImage,exports.ProductPickerModal=Tr.ProductPickerModal,Object.defineProperty(exports,"ScreenName",{enumerable:!0,get:function(){return Tr.ScreenName}}),exports.Carousel=xr.Carousel,exports.CarouselSecondary=Pr.CarouselSecondary,Object.defineProperty(exports,"CarouselVersion",{enumerable:!0,get:function(){return Pr.CarouselVersion}}),exports.AccessTokenTroubleshootDialog=Sr.AccessTokenTroubleshootDialog,exports.RadioList=Ar.RadioList,exports.CheckList=Cr.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return yr.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return yr.MEDIA_TYPES}}),exports.PostPicker=yr.PostPicker,exports.dateOptions=yr.dateOptions,exports.DropdownButton=Or.DropdownButton,exports.SideModal=br.SideModal,exports.KeywordsInput=Er.KeywordsInput,exports.AddVariableV2SideModal=jr.AddVariableV2SideModal,exports.AddVariableV2=hr.AddVariableV2,exports.NaLinkWrapper=Rr.NaLinkWrapper,exports.NavigationHyperlink=Rr.NavigationHyperlink,exports.SearchFilter=gr.SearchFilter,exports.InputWithVariables=Br.InputWithVariables,exports.DashboardReviewPopUp=_r.DashboardReviewPopUp,exports.StarRating=Ir.StarRating,exports.TestimonialCard=qr.TestimonialCard,exports.BikSlider=fr.BikSlider,exports.ResizableImage=Dr.ResizableImage,exports.validateURL=Nr.validateURL,exports.CarouselPreview=wr.CarouselPreview,exports.Floater=kr.Floater,exports.CardSelector=Lr.CardSelector,exports.CardSelectorGroup=Mr.CardSelectorGroup,exports.VariablePicker=Vr.VariablePicker,exports.ActionButtons=vr.ActionButtons,exports.ActivateBikAi=Gr.ActivateBikAi,exports.AiSyncProgress=Fr.AiSyncProgress,exports.AiCreditsExhausted=Ur.AiCreditsExhausted,exports.AiCreditsLow=Hr.AiCreditsLow,exports.CustomPortal=Wr.CustomPortal,exports.FloatingInputDropdown=Yr.FloatingInputDropdown,exports.MultilevelDropdownPopover=Qr.MultilevelDropdownPopover,exports.DropShadow=Kr.DropShadow,exports.MultiLevelDropdown=zr.MultiLevelDropdown;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./amplitude/index.js"),r=require("./components/template-preview/constants/regexPatterns.js"),t=require("./utils/StringUtils.js"),o=require("./constants/Theme.js"),n=require("./constants/zindex.js"),i=require("./components/checkBox/CheckBox.js"),a=require("./components/list-item/ListItem.js"),s=require("./components/pagination/Pagination.js"),p=require("./components/radioButton/RadioButton.js"),u=require("./components/toaster/Toaster.js"),c=require("./components/tooltips/Tooltip.js"),l=require("./components/spinner/Spinner.js"),d=require("./components/stepper/Stepper.js"),m=require("./components/tag/Tag.js"),T=require("./components/icon-button/IconButton.js"),x=require("./components/template-preview/TemplatePreview.js"),P=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),S=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),A=require("./components/template-preview/helpers/SmsTemplateHelper.js"),C=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),y=require("./components/template-preview/helpers/VariableEditorHelper.js"),O=require("./components/template-preview/models/TemplateMeta.js"),b=require("./components/template-preview/models/WhatsAppTemplate.js"),E=require("./components/template-preview/models/Channels.js"),j=require("./components/template-context-mapper/TemplateContextMapper.js"),h=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),R=require("./components/template-context-mapper/utils/validateIsUrl.js");require("./_virtual/_tslib.js");var g=require("./components/fab-menu/FABMenu.js"),B=require("./components/floating-action-button/FloatingActionButton.js"),_=require("./components/floating-action-button/FloatingActionButton.styles.js"),I=require("./components/image-compress/ImageCompress.js"),q=require("./components/TypographyStyle.js"),f=require("./components/button/Button.js"),D=require("./components/progress-bar/ProgressBarComponent.js");require("react/jsx-runtime");var N=require("./components/progress-bar-v2/ProgressBarV2.js"),w=require("./components/QueryBuilder/QueryBuilder.js"),L=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),k=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),M=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),V=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),v=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),G=require("./components/modals/styledModal.js"),F=require("./components/dropdown/DropdownPopover/index.js"),U=require("./components/dropdown/Dropdown.js"),H=require("./components/dropdown/ChipDropdown.js"),W=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),Y=require("./components/dropdown/MenuItem/MenuItem.js"),Q=require("./components/analytics-card/AnalyticsCard.js"),K=require("./components/analytics-card/AnalyticsCard.styled.js"),z=require("./components/input/Input.js"),Z=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),X=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),J=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),$=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),ee=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),re=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),te=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),ae=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),se=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js"),pe=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js"),ue=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),ce=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js"),le=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),de=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js"),me=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),Te=require("./components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js"),xe=require("./components/avatar/Avatar.js"),Pe=require("./components/avatar/AvatarHelper.js"),Se=require("./components/alerts/Alert.js"),Ae=require("./components/alerts/AlertHelper.js"),Ce=require("./components/thumbnail/Thumbnail.js"),ye=require("./components/curtain/Curtain.js"),Oe=require("./components/datePicker/DatePicker.js"),be=require("./components/datePicker/DatePickerWrapper.js"),Ee=require("./components/switch/Switch.js"),je=require("./components/plans/SubscriptionPlan.js"),he=require("./components/plans/SubscriptionPlanSelector.js"),Re=require("./components/plans/NewSubscriptionPlan.js"),ge=require("./components/plans/SubscriptionPlansCollected.js"),Be=require("./components/tabs/Tabs.js"),_e=require("./components/dynamic-tabs/DynamicTabs.js"),Ie=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),qe=require("./components/TablePagination/TablePagination.js"),fe=require("./components/TablePagination/TablePaginationCard.js"),De=require("./components/states-modal/StateModalComponent.js"),Ne=require("./components/states-modal/DeleteConfirmationModal.js"),we=require("./components/states/StateComponent.js"),Le=require("./components/states/ShopifyScopeWrapper.js"),ke=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),Me=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),Ve=require("./helpers/BaseWhatsappContentLang.helper.js"),ve=require("./components/curtain/CurtainHelper.js"),Ge=require("./utils/resizeImage.js"),Fe=require("./components/variable-picker-v3/model.js"),Ue=require("./components/card-selection-modal/CardSelectionModal.js"),He=require("./components/image-cropper/BikImageCropper.js"),We=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),Ye=require("./components/buttonGroup/ButtonGroup.js"),Qe=require("./components/accordion/Accordion.js"),Ke=require("./components/file-uploader/FileUploader.js"),ze=require("./components/colourInput/ColourInput.js"),Ze=require("./components/bik-layout/BikHeader.js"),Xe=require("./components/bik-layout/BikLayout.js"),Je=require("./components/bik-layout/BikProfile.js"),$e=require("./components/bik-layout/SimpleSidebar.js"),er=require("./components/bik-layout/BikSidebar.js"),rr=require("./components/bik-layout/FeatureModal.js"),tr=require("./components/bik-layout/SidebarSkeleton.js"),or=require("./components/bik-layout/ShowShopifyRestrictedModal.js"),nr=require("./components/bik-layout/FeatureModalV2.js"),ir=require("./components/searchBar/searchBar.js"),ar=require("./components/custom-date-time/CustomDateTime.js"),sr=require("./components/product-picker/ProductPickerModal.js"),pr=require("./components/discount-modal/DiscountModal.js"),ur=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),cr=require("./components/discount-modal/type.js"),lr=require("./components/country-code-picker/CountryCodePicker.js"),dr=require("./components/country-code-picker/CountryCodePicker.modal.js"),mr=require("./components/shimmer-image/ShimmerImage.js"),Tr=require("./components/product-picker-v2/modal.js"),xr=require("./components/carousel/carousel.js"),Pr=require("./components/carousel-secondary/CarouselSecondary.js"),Sr=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),Ar=require("./components/radioList/RadioList.js"),Cr=require("./components/checkList/CheckList.js"),yr=require("./components/postPicker/postPicker.js"),Or=require("./components/dropdown-button/DropdownButton.js"),br=require("./components/side-modal/SideModal.js"),Er=require("./components/keywords-input/KeywordsInput.js"),jr=require("./components/add-variableV2/AddVariableV2SideModal.js"),hr=require("./components/add-variableV2/AddVariableV2.js"),Rr=require("./components/navigation-hyperlink/NavigationHyperlink.js"),gr=require("./components/SearchFilter/index.js"),Br=require("./components/input-with-vars/InputWithVariables.js"),_r=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),Ir=require("./components/star-rating/StarRating.js"),qr=require("./components/testimonial-card/TestimonialCard.js"),fr=require("./components/slider/slider.js"),Dr=require("./components/resizeImage/index.js"),Nr=require("./utils/validator.js"),wr=require("./components/carousel-preview/CarouselPreview.js"),Lr=require("./components/floater/floater.js"),kr=require("./components/card-selector/CardSelector.js"),Mr=require("./components/card-selector/CardSelectorGroup.js"),Vr=require("./components/variable-picker-v3/VariablePicker.js"),vr=require("./components/action-button/ActionButtons.js"),Gr=require("./components/ai-modals/ActivateBikAI.js"),Fr=require("./components/ai-modals/AiSyncProgress.js"),Ur=require("./components/ai-modals/AiCreditsExhausted.js"),Hr=require("./components/ai-modals/AiCreditsLow.js"),Wr=require("./components/input-with-vars/customPortal.js"),Yr=require("./components/floating-input-dropdown/FloatingInputDropdown.js"),Qr=require("./components/dropdown/MultilevelDropdownPopover/index.js"),Kr=require("./components/dropShadow/DropShadow.js"),zr=require("./components/multi-level-dropdown/MultiLevelDropdown.js");exports.AmplitudeEvent=e.AmplitudeEvent,exports.regexPatterns=r,exports.StringUtils=t.default,exports.BASE_COLORS=o.BASE_COLORS,exports.COLORS=o.COLORS,exports.DEFAULT_THEME=o.DEFAULT_THEME,exports.FONTS=o.FONTS,exports.ComponentZindex=n.ComponentZindex,exports.CheckBox=i.CheckBox,exports.ListItem=a.ListItem,exports.Pagination=s.Pagination,exports.RadioButton=p.RadioButton,exports.Toaster=u.Toaster,exports.Tooltip=c.Tooltip,exports.PureSpinner=l.PureSpinner,exports.Spinner=l.Spinner,exports.Stepper=d.Stepper,exports.Tag=m.Tag,exports.IconButton=T.IconButton,exports.TemplatePreview=x.TemplatePreview,exports.WhatsappLikePreview=P.WhatsappLikePreview,exports.WhatsappLikePreviewV2=S.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=A.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=C.WhatsAppFormatToHTML,exports.VariableEditorHelper=y.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return O.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=O.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return O.HEADER_TYPES}}),exports.STATIC_URL_CTA_OPTION=O.STATIC_URL_CTA_OPTION,Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return O.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return O.TEMPLATE_STATUS}}),Object.defineProperty(exports,"BUTTON_TYPE",{enumerable:!0,get:function(){return b.BUTTON_TYPE}}),Object.defineProperty(exports,"POD",{enumerable:!0,get:function(){return b.POD}}),Object.defineProperty(exports,"TEMPLATE_QUALITY",{enumerable:!0,get:function(){return b.TEMPLATE_QUALITY}}),Object.defineProperty(exports,"CHANNEL_TYPE",{enumerable:!0,get:function(){return E.CHANNEL_TYPE}}),exports.TemplateContextMapper=j.TemplateContextMapper,exports.getAllDataFromTemplateComponent=h.getAllDataFromTemplateComponent,exports.getAllDataFromWebpushTemplateComponent=h.getAllDataFromWebpushTemplateComponent,exports.isVariable=R.isVariable,exports.validateIsUrl=R.validateIsUrl,exports.FABMenu=g.FABMenu,exports.FloatingActionButton=B.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return _.DROP_POSITION}}),exports.DropdownToggleContainer=_.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return _.FAB_POSITION}}),exports.FloatingActionButtonContainer=_.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=_.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return _.MENU_ALIGNMENT}}),exports.StyledDropdown=_.StyledDropdown,exports.TooltipStyled=_.TooltipStyled,exports.ImageService=I.ImageService,exports.AiBodyCaption=q.AiBodyCaption,exports.AiBodyTiny=q.AiBodyTiny,exports.BodyCaption=q.BodyCaption,exports.BodyLarge=q.BodyLarge,exports.BodyPrimary=q.BodyPrimary,exports.BodyPrimaryLink=q.BodyPrimaryLink,exports.BodyRegular=q.BodyRegular,exports.BodySecondary=q.BodySecondary,exports.BodySecondaryLink=q.BodySecondaryLink,exports.BodySmall=q.BodySmall,exports.BodyTiny=q.BodyTiny,exports.ButtonLarge=q.ButtonLarge,exports.ButtonLargeAI=q.ButtonLargeAI,exports.ButtonRegular=q.ButtonRegular,exports.ButtonRegularAI=q.ButtonRegularAI,exports.Caption=q.Caption,exports.CaptionBold=q.CaptionBold,exports.Display=q.Display,exports.SmallRegular=q.SmallRegular,exports.SubHeading=q.SubHeading,exports.TextPlaceholder=q.TextPlaceholder,exports.Tiny=q.Tiny,exports.TitleFour=q.TitleFour,exports.TitleLarge=q.TitleLarge,exports.TitleMedium=q.TitleMedium,exports.TitleRegular=q.TitleRegular,exports.TitleSmall=q.TitleSmall,exports.TitleXlarge=q.TitleXlarge,exports.Button=f.Button,exports.ProgressBarComponent=D.ProgressBarComponent,exports.ProgressCompletedBar=D.ProgressCompletedBar,Object.defineProperty(exports,"ProgressBarType",{enumerable:!0,get:function(){return N.ProgressBarType}}),exports.ProgressBarV2=N.ProgressBarV2,Object.defineProperty(exports,"TextAlignment",{enumerable:!0,get:function(){return N.TextAlignment}}),exports.QueryBuilder=w.QueryBuilder,exports.BaseQueryBuilderNode=L.BaseQueryBuilderNode,exports.PropertyNode=k.PropertyNode,exports.PropertyNodeHeadless=k.PropertyNodeHeadless,exports.queryBuilderSlice=M.queryBuilderSlice,exports.queryBuilderCacheSlice=V.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return v.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return v.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return v.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return v.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return v.EVENT_VALUES}}),Object.defineProperty(exports,"EXACTLY_OPERATORS",{enumerable:!0,get:function(){return v.EXACTLY_OPERATORS}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return v.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return v.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return v.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return v.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return v.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return v.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return v.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return v.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return v.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return v.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return v.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=G.StyledModal,exports.DropdownPopover=F.DropdownPopover,exports.Dropdown=U.Dropdown,exports.ChipDropdown=H.ChipDropdown,exports.ChipDropdownContainer=H.ChipDropdownContainer,exports.OpenedDropdown=W.OpenedDropdown,exports.MenuItemDropdown=Y.MenuItemDropdown,exports.AnalyticsCard=Q.AnalyticsCard,exports.AnalyticsContainer=K.AnalyticsContainer,exports.CardDataContainer=K.CardDataContainer,exports.Input=z.Input,exports.AnalyticsChip=Z.AnalyticsChip,exports.AnalyticsDropdown=X.AnalyticsDropdown,exports.EachItem=X.EachItem,exports.formatDate=X.formatDate,exports.AnalyticsMultiChip=J.AnalyticsMultiChip,exports.AnalyticsMetric=$.AnalyticsMetric,exports.AnalyticsTrend=ee.AnalyticsTrend,exports.LineChart=re.LineChart,exports.LinearChipGroupedChart=te.LinearChipGroupedChart,exports.Card=oe.Card,exports.PieChartAnalytics=oe.PieChartAnalytics,exports.PieChart=ne.PieChart,exports.HorizontalGraph=ie.HorizontalGraph,exports.StackedBarChart=ae.StackedBarChart,exports.StackedBarDistributionChart=se.StackedBarDistributionChart,Object.defineProperty(exports,"GRAPH_ORIENTATION",{enumerable:!0,get:function(){return pe.GRAPH_ORIENTATION}}),exports.VerticalGraph=ue.VerticalGraph,exports.FunnelVerticalBarGraph=ce.FunnelVerticalBarGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return le.HEAT}}),exports.HEAT_COLORS=le.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return le.HEAT_GRADING_TYPE}}),exports.HeatMap=le.HeatMap,exports.HeatBoxStyled=de.HeatBoxStyled,exports.HeatMapVertical=de.HeatMapVertical,exports.VerticalBarAndLinearGraph=me.VerticalBarAndLinearGraph,Object.defineProperty(exports,"TruncateValue",{enumerable:!0,get:function(){return Te.TruncateValue}}),exports.calculatePercentage=Te.calculatePercentage,exports.roundNumber=Te.roundNumber,exports.truncateValueForIndianStore=Te.truncateValueForIndianStore,exports.truncateValueForInternationalStore=Te.truncateValueForInternationalStore,exports.truncateValueTo10K=Te.truncateValueTo10K,exports.truncateValueToA=Te.truncateValueToA,exports.truncateValueToB=Te.truncateValueToB,exports.truncateValueToC=Te.truncateValueToC,exports.truncateValueToK=Te.truncateValueToK,exports.truncateValueToL=Te.truncateValueToL,exports.truncateValueToM=Te.truncateValueToM,exports.truncateValueToT=Te.truncateValueToT,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=xe.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=xe.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=xe.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"MESSAGE_CHANNELS",{enumerable:!0,get:function(){return xe.MESSAGE_CHANNELS}}),Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return Pe.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=Pe.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return Pe.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return Pe.SIZE}}),exports.Alert=Se.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return Ae.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=Ae.COLOR_CONFIG_MAP,Object.defineProperty(exports,"CONTENT_POSITION",{enumerable:!0,get:function(){return Ae.CONTENT_POSITION}}),Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return Ce.RATIO}}),exports.Thumbnail=Ce.Thumbnail,exports.Curtain=ye.Curtain,exports.DatePicker=Oe.DatePicker,exports.DatePickerWrapper=be.DatePickerWrapper,exports.Loader=Ee.Loader,exports.Switch=Ee.Switch,exports.SwitchContainer=Ee.SwitchContainer,exports.Thumb=Ee.Thumb,exports.SubscriptionPlan=je.SubscriptionPlan,exports.BottomWrapper=he.BottomWrapper,exports.HeaderWrapper=he.HeaderWrapper,exports.SubscriptionPlanSelector=he.SubscriptionPlanSelector,exports.defaultTabs=he.defaultTabs,exports.NewSubscriptionPlan=Re.NewSubscriptionPlan,exports.SubscriptionPlansCollected=ge.SubscriptionPlansCollected,exports.TabItemComponent=Be.TabItemComponent,exports.Tabs=Be.Tabs,exports.DynamicTabs=_e.DynamicTabs,exports.BikShimmer=Ie.BikShimmer,exports.TablePagination=qe.TablePagination,exports.TablePaginationCard=fe.TablePaginationCard,exports.TablePaginationCardStyled=fe.TablePaginationCardStyled,exports.StateModalComponent=De.StateModalComponent,exports.DeleteConfirmationModal=Ne.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return we.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return we.ButtonTypes}}),exports.StateComponent=we.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return we.StateInterface}}),exports.ShopifyScopeWrapper=Le.ShopifyScopeWrapper,exports.WhatsAppTextEditor=ke.WhatsAppTextEditor,exports.CustomRightBorder=Me.CustomRightBorder,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return Me.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=Me.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=Ve.BaseWhatsappContentLangHelper,exports.CURTAIN_COLOR_CONFIG_MAP=ve.CURTAIN_COLOR_CONFIG_MAP,Object.defineProperty(exports,"CURTAIN_MODE",{enumerable:!0,get:function(){return ve.CURTAIN_MODE}}),Object.defineProperty(exports,"CURTAIN_TYPES",{enumerable:!0,get:function(){return ve.CURTAIN_TYPES}}),exports.resizeImage=Ge.resizeImage,Object.defineProperty(exports,"PickerType",{enumerable:!0,get:function(){return Fe.PickerType}}),exports.CardSelectionModal=Ue.CardSelectionModal,exports.BikImageCropper=He.BikImageCropper,exports.BikImagePipeline=We.BikImagePipeline,exports.ButtonGroup=Ye.ButtonGroup,exports.BikAccordion=Qe.BikAccordion,exports.FileUploader=Ke.FileUploader,exports.ColourInput=ze.ColourInput,exports.BikHeader=Ze.BikHeader,exports.BikLayout=Xe.BikLayout,exports.BikProfile=Je.BikProfile,exports.SimpleSidebar=$e.SimpleSidebar,exports.BikSidebar=er.BikSidebar,exports.FeatureModal=rr.FeatureModal,exports.SidebarSkeleton=tr.SidebarSkeleton,exports.ShowShopifyRestrictedModal=or.ShowShopifyRestrictedModal,exports.FeatureModalV2=nr.FeatureModalV2,exports.SearchBar=ir.SearchBar,exports.CustomDateTime=ar.CustomDateTime,exports.PricePleaseProductPicker=sr.PricePleaseProductPicker,exports.ProductPickerContent=sr.ProductPickerContent,exports.DiscountModal=pr.DiscountModal,exports.CouponExpiration=ur.CouponExpiration,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return cr.COUPON_EXPIRATION}}),Object.defineProperty(exports,"DISCOUNT_APPLIES_TO",{enumerable:!0,get:function(){return cr.DISCOUNT_APPLIES_TO}}),Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return cr.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return cr.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return cr.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return cr.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return cr.MIN_PURCHASE_REQUIREMENT}}),Object.defineProperty(exports,"OFFER_APPLIES_TO",{enumerable:!0,get:function(){return cr.OFFER_APPLIES_TO}}),exports.initialDynamicCouponErrorState=cr.initialDynamicCouponErrorState,exports.initialStaticCouponErrorState=cr.initialStaticCouponErrorState,exports.CountryCodePicker=lr.CountryCodePicker,exports.CountriesData=dr.CountriesData,exports.DEFAULT_IMAGE=mr.DEFAULT_IMAGE,exports.ShimmerImage=mr.ShimmerImage,exports.ProductPickerModal=Tr.ProductPickerModal,Object.defineProperty(exports,"ScreenName",{enumerable:!0,get:function(){return Tr.ScreenName}}),exports.Carousel=xr.Carousel,exports.CarouselSecondary=Pr.CarouselSecondary,Object.defineProperty(exports,"CarouselVersion",{enumerable:!0,get:function(){return Pr.CarouselVersion}}),exports.AccessTokenTroubleshootDialog=Sr.AccessTokenTroubleshootDialog,exports.RadioList=Ar.RadioList,exports.CheckList=Cr.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return yr.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return yr.MEDIA_TYPES}}),exports.PostPicker=yr.PostPicker,exports.dateOptions=yr.dateOptions,exports.DropdownButton=Or.DropdownButton,exports.SideModal=br.SideModal,exports.KeywordsInput=Er.KeywordsInput,exports.AddVariableV2SideModal=jr.AddVariableV2SideModal,exports.AddVariableV2=hr.AddVariableV2,exports.NaLinkWrapper=Rr.NaLinkWrapper,exports.NavigationHyperlink=Rr.NavigationHyperlink,exports.SearchFilter=gr.SearchFilter,exports.InputWithVariables=Br.InputWithVariables,exports.DashboardReviewPopUp=_r.DashboardReviewPopUp,exports.StarRating=Ir.StarRating,exports.TestimonialCard=qr.TestimonialCard,exports.BikSlider=fr.BikSlider,exports.ResizableImage=Dr.ResizableImage,exports.validateURL=Nr.validateURL,exports.CarouselPreview=wr.CarouselPreview,exports.Floater=Lr.Floater,exports.CardSelector=kr.CardSelector,exports.CardSelectorGroup=Mr.CardSelectorGroup,exports.VariablePicker=Vr.VariablePicker,exports.ActionButtons=vr.ActionButtons,exports.ActivateBikAi=Gr.ActivateBikAi,exports.AiSyncProgress=Fr.AiSyncProgress,exports.AiCreditsExhausted=Ur.AiCreditsExhausted,exports.AiCreditsLow=Hr.AiCreditsLow,exports.CustomPortal=Wr.CustomPortal,exports.FloatingInputDropdown=Yr.FloatingInputDropdown,exports.MultilevelDropdownPopover=Qr.MultilevelDropdownPopover,exports.DropShadow=Kr.DropShadow,exports.MultiLevelDropdown=zr.MultiLevelDropdown;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useEffect as o}from"react";import n from"styled-components";import{Legend as c}from"../Legend/Legend.js";import{BodySecondary as i}from"../../../TypographyStyle.js";const a=n.div`
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useEffect as o}from"react";import n from"styled-components";import{Legend as c}from"../Legend/Legend.js";import{TitleRegular as i}from"../../../TypographyStyle.js";const a=n.div`
2
2
  width: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import g from"@emotion/styled/base";import{jsx as I,Fragment as C,jsxs as t}from"react/jsx-runtime";import A from"../../../../assets/icons/ChartBar.svg.js";import e from"../../../../assets/icons/maximize.svg.js";import"@amplitude/analytics-browser";import"../../../../amplitude/model.js";import c from"../../../../utils/StringUtils.js";import{COLORS as o}from"../../../../constants/Theme.js";import"../../../../constants/zindex.js";import{useState as i,useEffect as l}from"react";import"../../../checkBox/CheckBox.styled.js";import{TitleMedium as s}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-dom";import"react-toastify";import"../../../button/Button.js";import"../../../toaster/Toaster.styled.js";import"../../../tooltips/Tooltip.js";import"../../../spinner/Spinner.js";import"../../../stepper/Stepper.styled.js";import"../../../tag/Tag.js";import{IconButton as r}from"../../../icon-button/IconButton.js";import"../../../template-preview/TemplatePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../curtain/CurtainHelper.js";import"../../../variable-picker-v3/model.js";import"../../../template-preview/models/TemplateMeta.js";import"../../../template-preview/models/WhatsAppTemplate.js";import"../../../template-preview/models/Channels.js";import"lodash";import{StyledModal as p}from"../../../modals/styledModal.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../../_virtual/_tslib.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../progress-bar-v2/ProgressBarV2.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"../../../QueryBuilder/components/Connectors/Components/InTwoLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/ChipDropdown.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../utils/calcPercentage.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as d}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../StackedBarChart/StackedBarDistributionChart.js";import"../StackedBarChart/StackedBarDistributionChart.model.js";import"../VerticalBarGraph/VerticalGraph.js";import"../VerticalBarGraph/FunnelVerticalBarGraph.js";import"../heatmap/HeatMap.js";import"../heatmap/HeatMapVertical.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../switch/Switch.js";import"../../../plans/SubscriptionPlanStyled.js";import"../../../plans/SubscriptionPlanSelector.js";import"../../../plans/SubscriptionPlansCollected.js";import"../../../tabs/Tabs.js";import"../../../TablePagination/TablePagination.styled.js";import"../../../TablePagination/TablePaginationCard.js";import"../../../states/StateComponent.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditor.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js";import"../../../card-selection-modal/CardSelectionModal.styled.js";import"react-image-crop";import"../../../buttonGroup/ButtonGroupStyle.js";import"../../../accordion/Accordion.style.js";import"../../../accordion/AccordionArrow.js";import"../../../file-uploader/FileUploaderStyle.js";import"../../../colourInput/ColourInput.styled.js";import"../../../bik-layout/CommonStyles.js";import"../../../navigation-hyperlink/NavigationHyperlink.js";import"../../../bik-layout/SidebarStyles.js";import"date-fns";import"react-popper";import"../../../dropdown/Common.styled.js";import"../../../custom-date-time/CustomDateTime.styled.js";import"../../../../node_modules/lodash.debounce/index.js";import"../../../product-picker/ProductPicker.styled.js";import"../../../discount-modal/type.js";import"../../../product-picker-v2/modal.js";import"../../../modals/modal.styled.js";import"../../../variable-picker-v3/NoResult.js";import"../../../variable-picker-v3/styles.js";import"../../../discount-modal/DiscountModal.styled.js";import"../../../discount-modal/DynamicCoupon/DynamicCoupon.js";import"../../../country-code-picker/CountryCodePicker.styled.js";import"../../../carousel/carousel.js";import"../../../carousel-secondary/CarouselSecondary.js";import"../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js";import"../../../radioList/RadioList.styled.js";import"../../../checkList/CheckList.styled.js";import"../../../postPicker/postPicker.js";import"../../../dropdown-button/DropdownButton.style.js";import"../../../side-modal/SideModal.style.js";import"../../../add-variableV2/AddVariableV2.styled.js";import"../../../SearchFilter/types/SearchFilter.type.js";import"../../../SearchFilter/components/DatePickerButton.js";import"../../../SearchFilter/components/DateRangeOnlyButton.js";import"../../../input-with-vars/InputWithVariables.js";import"../../../star-rating/StarRating.js";import"../../../dashboard-review-popup/components/FiveStar.styled.js";import"../../../dashboard-review-popup/components/Form.styled.js";import"../../../dashboard-review-popup/components/ZeroState.js";import"../../../dashboard-review-popup/DashboardReviewPopUp.styled.js";import"../../../testimonial-card/TestimonialCard.style.js";import"../../../slider/slider.js";import"react-slick";import"../../../carousel-preview/CarouselPreview.style.js";import"../../../card-selector/CardSelector.styled.js";import"../../../action-button/ActionButton.styled.js";import"../../../floating-input-dropdown/FloatingInputDropdown.js";import"../../../dropdown/MultilevelDropdownPopover/index.js";import"../../../multi-level-dropdown/MultiLevelDropdown.styled.js";import{Chart as a,ArcElement as n,Legend as m}from"chart.js";import{Doughnut as b}from"react-chartjs-2";import{VerticalGraphDefault as G}from"../../__stories__/VerticalGraph.stories.js";a.register(n,m);const u={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:g=>{if(!g.label)return" 0%";const I=g.dataset.data.reduce(((g,I)=>g+I),0),C=parseFloat((g.raw/I*100).toFixed(1));return[` ${g.label}`,` ${g.raw} (${C}% of ${I})`]}}}}},h=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],y=g("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(g=>o.surface.standard),";border:1px solid ",(g=>o.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRThCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgQmFyQ2hhcnRJY29uIGZyb20gJ0BzcmMvYXNzZXRzL2ljb25zL0NoYXJ0QmFyLnN2Zyc7XHJcbmltcG9ydCBNYXhpbWl6ZUljb24gZnJvbSAnQHNyYy9hc3NldHMvaWNvbnMvbWF4aW1pemUuc3ZnJztcclxuaW1wb3J0IHsgU3RyaW5nVXRpbHMgfSBmcm9tIFwiLi4vLi4vLi4vLi4vaW5kZXhcIjtcclxuaW1wb3J0IHsgQXJjRWxlbWVudCwgQ2hhcnQgYXMgQ2hhcnRKUywgTGVnZW5kIH0gZnJvbSAnY2hhcnQuanMnO1xyXG5pbXBvcnQgeyB1c2VFZmZlY3QsIHVzZVN0YXRlIH0gZnJvbSAncmVhY3QnO1xyXG5pbXBvcnQgeyBEb3VnaG51dCB9IGZyb20gJ3JlYWN0LWNoYXJ0anMtMic7XHJcbmltcG9ydCB7IEljb25CdXR0b24gfSBmcm9tIFwiLi4vLi4vLi4vaWNvbi1idXR0b25cIjtcclxuaW1wb3J0IHsgU3R5bGVkTW9kYWwgfSBmcm9tIFwiLi4vLi4vLi4vbW9kYWxzXCI7XHJcbmltcG9ydCB7IFRpdGxlTWVkaXVtIH0gZnJvbSBcIi4uLy4uLy4uL1R5cG9ncmFwaHlTdHlsZVwiO1xyXG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tIFwiLi4vLi4vLi4vLi4vY29uc3RhbnRzL1RoZW1lXCI7XHJcbmltcG9ydCB7IFZlcnRpY2FsR3JhcGhEZWZhdWx0IH0gZnJvbSAnLi4vLi4vX19zdG9yaWVzX18vVmVydGljYWxHcmFwaC5zdG9yaWVzJztcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBjb252ZXJ0VG9CYXJDaGFydERhdGEgPSAoZGF0YSwgeEF4aXNUaXRsZSwgeUF4aXNUaXRsZSkgPT4ge1xyXG4gICAgY29uc3QgeEF4aXNEYXRhID0gZGF0YS5tYXAoKGl0ZW0pID0+IGl0ZW0ubmFtZSk7XHJcbiAgICBjb25zdCB5QXhpc0RhdGEgPSBkYXRhLm1hcCgoaXRlbSkgPT4gaXRlbS5jb3VudCk7XHJcbiAgICBjb25zdCB4QXhpcyA9IHtcclxuICAgICAgICBkYXRhOiB4QXhpc0RhdGEsXHJcbiAgICAgICAgdGl0bGU6IHhBeGlzVGl0bGUgIT09IG51bGwgJiYgeEF4aXNUaXRsZSAhPT0gdm9pZCAwID8geEF4aXNUaXRsZSA6ICcnLFxyXG4gICAgfTtcclxuICAgIGNvbnN0IHlBeGlzID0ge1xyXG4gICAgICAgIGRhdGE6IHlBeGlzRGF0YSxcclxuICAgICAgICB0aXRsZTogeUF4aXNUaXRsZSAhPT0gbnVsbCAmJiB5QXhpc1RpdGxlICE9PSB2b2lkIDAgPyB5QXhpc1RpdGxlIDogJycsXHJcbiAgICB9O1xyXG4gICAgY29uc3QgYmFyQ2hhcnREYXRhID0ge1xyXG4gICAgICAgIHhBeGlzLFxyXG4gICAgICAgIHlBeGlzLFxyXG4gICAgICAgIGJhckNvbG9yUkdCQTogeyByOiAyMTAsIGc6IDE3NCwgYjogMjU1LCBhOiAxIH0sXHJcbiAgICB9O1xyXG4gICAgcmV0dXJuIGJhckNoYXJ0RGF0YTtcclxufTtcclxuY29uc3Qgb3B0aW9ucyA9IHtcclxuICAgIHBsdWdpbnM6IHtcclxuICAgICAgICBsZWdlbmQ6IHtcclxuICAgICAgICAgICAgZGlzcGxheTogZmFsc2UsXHJcbiAgICAgICAgfSxcclxuICAgICAgICB0b29sdGlwOiB7XHJcbiAgICAgICAgICAgIGVuYWJsZWQ6IHRydWUsXHJcbiAgICAgICAgICAgIGNhbGxiYWNrczoge1xyXG4gICAgICAgICAgICAgICAgbGFiZWw6ICh0b29sdGlwSXRlbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghdG9vbHRpcEl0ZW0ubGFiZWwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGAgMCVgO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB0b3RhbCA9IHRvb2x0aXBJdGVtLmRhdGFzZXQuZGF0YS5yZWR1Y2UoKGFjYywgY3VyKSA9PiBhY2MgKyBjdXIsIDApO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBlcmNlbnRhZ2UgPSBwYXJzZUZsb2F0KCgodG9vbHRpcEl0ZW0ucmF3IC8gdG90YWwpICogMTAwKS50b0ZpeGVkKDEpKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9YCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYCAke3Rvb2x0aXBJdGVtLnJhd30gKCR7cGVyY2VudGFnZX0lIG9mICR7dG90YWx9KWAsXHJcbiAgICAgICAgICAgICAgICAgICAgXTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgfSxcclxuICAgIH0sXHJcbn07XHJcbmNvbnN0IEdSQVBIX0NPTE9SUyA9IFtcclxuICAgICcjNUUwN0JCJyxcclxuICAgICcjOUU3N0VEJyxcclxuICAgICcjRDJBRUZGJyxcclxuICAgICcjQ0RFMUZGJyxcclxuICAgICcjOTJBRkZBJyxcclxuICAgICcjMzkzNUUxJyxcclxuXTtcclxuY29uc3QgQ2FydFN0eWxlZCA9IHN0eWxlZC5kaXYgYFxuXHRiYWNrZ3JvdW5kOiAkeyhwcm9wcykgPT4gQ09MT1JTLnN1cmZhY2Uuc3RhbmRhcmR9O1xuXHRib3JkZXI6IDFweCBzb2xpZCAkeyhwcm9wcykgPT4gQ09MT1JTLnN0cm9rZS5wcmltYXJ5fTtcblx0Ym9yZGVyLXJhZGl1czogNHB4O1xuYDtcclxuZXhwb3J0IGNvbnN0IENhcmQgPSAocHJvcHMpID0+IHtcclxuICAgIHJldHVybiBfanN4KENhcnRTdHlsZWQsIE9iamVjdC5hc3NpZ24oeyBzdHlsZTogeyBwYWRkaW5nOiAyNCB9IH0sIHsgY2hpbGRyZW46IHByb3BzLmNoaWxkcmVuIH0pKTtcclxufTtcclxuZXhwb3J0IGNvbnN0IFBpZUNoYXJ0QW5hbHl0aWNzID0gKHsgdGl0bGUsIHNsaWNlcywgc2l6ZSwgYWxsb3dDaGFydFBvcHVwLCBzaG93Q29udmVydFRvQmFyQ2hhcnQsIHRydW5jYXRlU2xpY2VzLCBiYXJDaGFydFhBeGlzVGl0bGUsIGJhckNoYXJ0WUF4aXNUaXRsZSwgaGlkZVRpdGxlID0gZmFsc2UsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzaG93UG9wdXAsIHNldFNob3dQb3B1cF0gPSB1c2VTdGF0ZShmYWxzZSk7XHJcbiAgICBjb25zdCBbc2hvd0JhckNoYXJ0LCBzZXRTaG93QmFyQ2hhcnRdID0gdXNlU3RhdGUoZmFsc2UpO1xyXG4gICAgY29uc3QgW3NsaWNlc1dpdGhDb2xvciwgc2V0U2xpY2VzV2l0aENvbG9yXSA9IHVzZVN0YXRlKFtdKTtcclxuICAgIGNvbnN0IFtkYXRhLCBzZXREYXRhXSA9IHVzZVN0YXRlKCk7XHJcbiAgICBjb25zdCBbdHJ1bmNhdGVkRGF0YSwgc2V0VHJ1bmNhdGVkRGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgY29uc3QgW3RydW5jYXRlZFNsaWNlc1dpdGhDb2xvciwgc2V0VHJ1bmNhdGVkU2xpY2VzV2l0aENvbG9yXSA9IHVzZVN0YXRlKFtdKTtcclxuICAgIGNvbnN0IFtiYXJDaGFydERhdGEsIHNldEJhckNoYXJ0RGF0YV0gPSB1c2VTdGF0ZShudWxsKTtcclxuICAgIHVzZUVmZmVjdCgoKSA9PiB7XHJcbiAgICAgICAgY29uc3QgdG90YWxTdW0gPSBzbGljZXMucmVkdWNlKChzdW0sIHNsaWNlKSA9PiBzdW0gKyBzbGljZS5jb3VudCwgMCk7XHJcbiAgICAgICAgbGV0IHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBbXTtcclxuICAgICAgICB1cGRhdGVkU2xpY2VzV2l0aENvbG9yID0gT2JqZWN0LmtleXMoc2xpY2VzKS5tYXAoKGtleSwgaW5kZXgpID0+IChPYmplY3QuYXNzaWduKHsgY29sb3I6IEdSQVBIX0NPTE9SU1tpbmRleCAlIEdSQVBIX0NPTE9SUy5sZW5ndGhdIH0sIHNsaWNlc1trZXldKSkpO1xyXG4gICAgICAgIHNldFNsaWNlc1dpdGhDb2xvcihbLi4udXBkYXRlZFNsaWNlc1dpdGhDb2xvcl0pO1xyXG4gICAgICAgIGlmICh0b3RhbFN1bSA9PT0gMCkge1xyXG4gICAgICAgICAgICBjb25zdCBkYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IFsxMDBdLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IFsnI0YwRjBGMCddLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogMCxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgc2V0RGF0YShkYXRhU2V0KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbHM6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBTdHJpbmdVdGlscy5jYXBpdGFsaXplKHNsaWNlLm5hbWUpKSxcclxuICAgICAgICAgICAgICAgIGRhdGFzZXRzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBzbGljZXMubWFwKChzbGljZSkgPT4gc2xpY2UuY291bnQpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IHNsaWNlcy5tYXAoKHNsaWNlLCBpbmRleCkgPT4geyB2YXIgX2E7IHJldHVybiAoX2EgPSBzbGljZS5jb2xvcikgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF07IH0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJDb2xvcjogWyd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZScsICd3aGl0ZSddLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogNCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyUmFkaXVzOiA4LFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodHJ1bmNhdGVTbGljZXMgJiYgc2xpY2VzLmxlbmd0aCA+IHRydW5jYXRlU2xpY2VzKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHRydW5jYXRlZFNsaWNlcyA9IHNsaWNlcy5zbGljZSgwLCB0cnVuY2F0ZVNsaWNlcyk7XHJcbiAgICAgICAgICAgIGNvbnN0IG90aGVyU2xpY2VzID0gc2xpY2VzLnNsaWNlKHRydW5jYXRlU2xpY2VzKTtcclxuICAgICAgICAgICAgY29uc3Qgb3RoZXJDb3VudCA9IG90aGVyU2xpY2VzLnJlZHVjZSgoc3VtLCBzbGljZSkgPT4gc3VtICsgc2xpY2UuY291bnQsIDApO1xyXG4gICAgICAgICAgICB0cnVuY2F0ZWRTbGljZXMucHVzaCh7IG5hbWU6ICdPdGhlcicsIGNvdW50OiBvdGhlckNvdW50IH0pO1xyXG4gICAgICAgICAgICBjb25zdCB0cnVuY2F0ZWREYXRhU2V0ID0ge1xyXG4gICAgICAgICAgICAgICAgbGFiZWxzOiB0cnVuY2F0ZWRTbGljZXMubWFwKChzbGljZSkgPT4gU3RyaW5nVXRpbHMuY2FwaXRhbGl6ZShzbGljZS5uYW1lKSksXHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogdHJ1bmNhdGVkU2xpY2VzLm1hcCgoc2xpY2UpID0+IHNsaWNlLmNvdW50KSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiB0cnVuY2F0ZWRTbGljZXMubWFwKChzbGljZSwgaW5kZXgpID0+IHsgdmFyIF9hOyByZXR1cm4gKF9hID0gc2xpY2UuY29sb3IpICE9PSBudWxsICYmIF9hICE9PSB2b2lkIDAgPyBfYSA6IEdSQVBIX0NPTE9SU1tpbmRleCAlIEdSQVBIX0NPTE9SUy5sZW5ndGhdOyB9KSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyQ29sb3I6IFsnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnLCAnd2hpdGUnXSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyV2lkdGg6IDQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlclJhZGl1czogOCxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgc2V0VHJ1bmNhdGVkRGF0YSh0cnVuY2F0ZWREYXRhU2V0KTtcclxuICAgICAgICAgICAgY29uc3QgdHJ1bmNhdGVkU2xpY2VzV2l0aENvbG9yID0gdHJ1bmNhdGVkU2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiAoT2JqZWN0LmFzc2lnbih7IGNvbG9yOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXSB9LCBzbGljZSkpKTtcclxuICAgICAgICAgICAgc2V0VHJ1bmNhdGVkU2xpY2VzV2l0aENvbG9yKHRydW5jYXRlZFNsaWNlc1dpdGhDb2xvcik7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChzaG93Q29udmVydFRvQmFyQ2hhcnQpIHtcclxuICAgICAgICAgICAgc2V0QmFyQ2hhcnREYXRhKGNvbnZlcnRUb0JhckNoYXJ0RGF0YShzbGljZXMsIGJhckNoYXJ0WEF4aXNUaXRsZSwgYmFyQ2hhcnRZQXhpc1RpdGxlKSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlcywgdHJ1bmNhdGVTbGljZXNdKTtcclxuICAgIGlmICghZGF0YSkge1xyXG4gICAgICAgIHJldHVybiBfanN4KF9GcmFnbWVudCwge30pO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIChfanN4cyhfRnJhZ21lbnQsIHsgY2hpbGRyZW46IFtfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6IGhpZGVUaXRsZSB8fCAodGl0bGUgPT09IG51bGwgfHwgdGl0bGUgPT09IHZvaWQgMCA/IHZvaWQgMCA6IHRpdGxlLmxlbmd0aCkgPT09IDAgPyAnZmxleC1lbmQnIDogJ3NwYWNlLWJldHdlZW4nLFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBbIWhpZGVUaXRsZSAmJiB0aXRsZSAmJiAoX2pzeChUaXRsZU1lZGl1bSwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IHRpdGxlIH0pKSksIF9qc3hzKFwiZGl2XCIsIHsgY2hpbGRyZW46IFtzaG93Q29udmVydFRvQmFyQ2hhcnQgJiYgKF9qc3goSWNvbkJ1dHRvbiwgeyBJY29uOiBCYXJDaGFydEljb24sIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd0JhckNoYXJ0KHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSkpLCBhbGxvd0NoYXJ0UG9wdXAgJiYgKF9qc3goSWNvbkJ1dHRvbiwgeyBJY29uOiBNYXhpbWl6ZUljb24sIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd1BvcHVwKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSkpXSB9KV0gfSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6ICh0cnVuY2F0ZVNsaWNlcyA/IHRydW5jYXRlZERhdGEgOiBkYXRhKSwgb3B0aW9uczogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBvcHRpb25zKSwgeyBtYWludGFpbkFzcGVjdFJhdGlvOiBzaXplID8gZmFsc2UgOiB0cnVlIH0pIH0pIH0pKSB9KSksIF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IGNsYXNzTmFtZTogJ2NvbC02Jywgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmdMZWZ0OiA0OCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsZXhEaXJlY3Rpb246ICdjb2x1bW4nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdjZW50ZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IF9qc3goUGllQ2hhcnQsIHsgc2xpY2VzOiB0cnVuY2F0ZVNsaWNlcyA/IHRydW5jYXRlZFNsaWNlc1dpdGhDb2xvciA6IHNsaWNlc1dpdGhDb2xvciB9KSB9KSldIH0pKSwgc2hvd1BvcHVwICYmIChfanN4KFN0eWxlZE1vZGFsLCBPYmplY3QuYXNzaWduKHsgb3Blbjogc2hvd1BvcHVwLCBvbkNsb3NlOiAoKSA9PiBzZXRTaG93UG9wdXAoZmFsc2UpLCBjbG9zZU9uT3V0c2lkZUNsaWNrOiB0cnVlLCBoZWFkaW5nVGl0bGU6IHRpdGxlLCB3aWR0aDogXCI3NSVcIiB9LCB7IGNoaWxkcmVuOiBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMjQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdzcGFjZS1iZXR3ZWVuJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnODB2aCcsXHJcbiAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgd2lkdGg6ICc1NSUnLCBtYXJnaW5MZWZ0OiAnNCUnIH0gfSwgeyBjaGlsZHJlbjogX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICcxMDAlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnMTAwJScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25JdGVtczogJ2NlbnRlcicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IH0sIHsgY2hpbGRyZW46IF9qc3goRG91Z2hudXQsIHsgZGF0YTogZGF0YSwgb3B0aW9uczogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBvcHRpb25zKSwgeyBtYWludGFpbkFzcGVjdFJhdGlvOiBzaXplID8gZmFsc2UgOiB0cnVlIH0pIH0pIH0pKSB9KSksIF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICczMCUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogJzEwMCUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93WTogJ2F1dG8nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpIH0pKSksIHNob3dCYXJDaGFydCAmJiBiYXJDaGFydERhdGEgJiYgKF9qc3goU3R5bGVkTW9kYWwsIE9iamVjdC5hc3NpZ24oeyBvcGVuOiBzaG93QmFyQ2hhcnQsIG9uQ2xvc2U6ICgpID0+IHNldFNob3dCYXJDaGFydChmYWxzZSksIGNsb3NlT25PdXRzaWRlQ2xpY2s6IHRydWUsIGhlYWRpbmdUaXRsZTogdGl0bGUsIHdpZHRoOiBcIjg1JVwiIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6ICcyNHB4IDAnLFxyXG4gICAgICAgICAgICAgICAgICAgIH0gfSwgeyBjaGlsZHJlbjogX2pzeChWZXJ0aWNhbEdyYXBoRGVmYXVsdCwgeyB4QXhpczogYmFyQ2hhcnREYXRhLnhBeGlzLCB5QXhpczogYmFyQ2hhcnREYXRhLnlBeGlzLCBiYXJDb2xvclJHQkE6IGJhckNoYXJ0RGF0YSA9PT0gbnVsbCB8fCBiYXJDaGFydERhdGEgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGJhckNoYXJ0RGF0YS5iYXJDb2xvclJHQkEgfSkgfSkpIH0pKSldIH0pKTtcclxufTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9UGllQ2hhcnRBbmFseXRpY3MuanMubWFwIl19 */")),X=g=>I(y,Object.assign({style:{padding:24}},{children:g.children})),B=g=>{let{title:o,slices:a,size:n,allowChartPopup:m,showConvertToBarChart:y,truncateSlices:X,barChartXAxisTitle:B,barChartYAxisTitle:x,hideTitle:j=!1}=g;const[Z,N]=i(!1),[H,Y]=i(!1),[W,R]=i([]),[F,J]=i(),[V,S]=i(),[v,w]=i([]),[k,z]=i(null);return l((()=>{const g=a.reduce(((g,I)=>g+I.count),0);let I=[];if(I=Object.keys(a).map(((g,I)=>Object.assign({color:h[I%h.length]},a[g]))),R([...I]),0===g){J({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const g={labels:a.map((g=>c.capitalize(g.name))),datasets:[{data:a.map((g=>g.count)),backgroundColor:a.map(((g,I)=>{var C;return null!==(C=g.color)&&void 0!==C?C:h[I%h.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};J(g)}if(X&&a.length>X){const g=a.slice(0,X),I=a.slice(X).reduce(((g,I)=>g+I.count),0);g.push({name:"Other",count:I});const C={labels:g.map((g=>c.capitalize(g.name))),datasets:[{data:g.map((g=>g.count)),backgroundColor:g.map(((g,I)=>{var C;return null!==(C=g.color)&&void 0!==C?C:h[I%h.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};S(C);const t=g.map(((g,I)=>Object.assign({color:h[I%h.length]},g)));w(t)}y&&z(((g,I,C)=>({xAxis:{data:g.map((g=>g.name)),title:null!=I?I:""},yAxis:{data:g.map((g=>g.count)),title:null!=C?C:""},barColorRGBA:{r:210,g:174,b:255,a:1}}))(a,B,x))}),[a,X]),F?t(C,{children:[t("div",Object.assign({style:{display:"flex",justifyContent:j||0===(null==o?void 0:o.length)?"flex-end":"space-between"}},{children:[!j&&o&&I(s,Object.assign({style:{marginBottom:16}},{children:o})),t("div",{children:[y&&I(r,{Icon:A,onClick:()=>{Y(!0)}}),m&&I(r,{Icon:e,onClick:()=>{N(!0)}})]})]})),t("div",Object.assign({className:"row"},{children:[I("div",Object.assign({className:"col-6"},{children:I("div",Object.assign({style:{width:n,height:n}},{children:I(b,{data:X?V:F,options:Object.assign(Object.assign({},u),{maintainAspectRatio:!n})})}))})),I("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:I(d,{slices:X?v:W})}))]})),Z&&I(p,Object.assign({open:Z,onClose:()=>N(!1),closeOnOutsideClick:!0,headingTitle:o,width:"75%"},{children:t("div",Object.assign({style:{padding:24,display:"flex",justifyContent:"space-between",height:"80vh"}},{children:[I("div",Object.assign({style:{width:"55%",marginLeft:"4%"}},{children:I("div",Object.assign({style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},{children:I(b,{data:F,options:Object.assign(Object.assign({},u),{maintainAspectRatio:!n})})}))})),I("div",Object.assign({style:{width:"30%",height:"100%",overflowY:"auto"}},{children:I(d,{slices:W})}))]}))})),H&&k&&I(p,Object.assign({open:H,onClose:()=>Y(!1),closeOnOutsideClick:!0,headingTitle:o,width:"85%"},{children:I("div",Object.assign({style:{padding:"24px 0"}},{children:I(G,{xAxis:k.xAxis,yAxis:k.yAxis,barColorRGBA:null==k?void 0:k.barColorRGBA})}))}))]}):I(C,{})};export{X as Card,B as PieChartAnalytics};
1
+ import t from"@emotion/styled/base";import{jsx as o,Fragment as e,jsxs as r}from"react/jsx-runtime";import"@amplitude/analytics-browser";import"../../../../amplitude/model.js";import i from"../../../../utils/StringUtils.js";import{COLORS as s}from"../../../../constants/Theme.js";import"../../../../constants/zindex.js";import{useState as g,useEffect as p}from"react";import"../../../checkBox/CheckBox.styled.js";import{TitleMedium as I}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-dom";import"react-toastify";import"../../../button/Button.js";import"../../../toaster/Toaster.styled.js";import"../../../tooltips/Tooltip.js";import"../../../spinner/Spinner.js";import"../../../stepper/Stepper.styled.js";import"../../../tag/Tag.js";import"../../../icon-button/IconButton.js";import"../../../template-preview/TemplatePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../curtain/CurtainHelper.js";import"../../../variable-picker-v3/model.js";import"../../../template-preview/models/TemplateMeta.js";import"../../../template-preview/models/WhatsAppTemplate.js";import"../../../template-preview/models/Channels.js";import"lodash";import"../../../modals/styledModal.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../../_virtual/_tslib.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../progress-bar-v2/ProgressBarV2.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"../../../QueryBuilder/components/Connectors/Components/InTwoLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/ChipDropdown.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../utils/calcPercentage.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as C}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../StackedBarChart/StackedBarDistributionChart.js";import"../StackedBarChart/StackedBarDistributionChart.model.js";import"../VerticalBarGraph/VerticalGraph.js";import"../VerticalBarGraph/FunnelVerticalBarGraph.js";import"../heatmap/HeatMap.js";import"../heatmap/HeatMapVertical.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../switch/Switch.js";import"../../../plans/SubscriptionPlanStyled.js";import"../../../plans/SubscriptionPlanSelector.js";import"../../../plans/SubscriptionPlansCollected.js";import"../../../tabs/Tabs.js";import"../../../TablePagination/TablePagination.styled.js";import"../../../TablePagination/TablePaginationCard.js";import"../../../states/StateComponent.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditor.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js";import"../../../card-selection-modal/CardSelectionModal.styled.js";import"react-image-crop";import"../../../buttonGroup/ButtonGroupStyle.js";import"../../../accordion/Accordion.style.js";import"../../../accordion/AccordionArrow.js";import"../../../file-uploader/FileUploaderStyle.js";import"../../../colourInput/ColourInput.styled.js";import"../../../bik-layout/CommonStyles.js";import"../../../navigation-hyperlink/NavigationHyperlink.js";import"../../../bik-layout/SidebarStyles.js";import"date-fns";import"react-popper";import"../../../dropdown/Common.styled.js";import"../../../custom-date-time/CustomDateTime.styled.js";import"../../../../node_modules/lodash.debounce/index.js";import"../../../product-picker/ProductPicker.styled.js";import"../../../discount-modal/type.js";import"../../../product-picker-v2/modal.js";import"../../../modals/modal.styled.js";import"../../../variable-picker-v3/NoResult.js";import"../../../variable-picker-v3/styles.js";import"../../../discount-modal/DiscountModal.styled.js";import"../../../discount-modal/DynamicCoupon/DynamicCoupon.js";import"../../../country-code-picker/CountryCodePicker.styled.js";import"../../../carousel/carousel.js";import"../../../carousel-secondary/CarouselSecondary.js";import"../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js";import"../../../radioList/RadioList.styled.js";import"../../../checkList/CheckList.styled.js";import"../../../postPicker/postPicker.js";import"../../../dropdown-button/DropdownButton.style.js";import"../../../side-modal/SideModal.style.js";import"../../../add-variableV2/AddVariableV2.styled.js";import"../../../SearchFilter/types/SearchFilter.type.js";import"../../../SearchFilter/components/DatePickerButton.js";import"../../../SearchFilter/components/DateRangeOnlyButton.js";import"../../../input-with-vars/InputWithVariables.js";import"../../../star-rating/StarRating.js";import"../../../dashboard-review-popup/components/FiveStar.styled.js";import"../../../dashboard-review-popup/components/Form.styled.js";import"../../../dashboard-review-popup/components/ZeroState.js";import"../../../dashboard-review-popup/DashboardReviewPopUp.styled.js";import"../../../testimonial-card/TestimonialCard.style.js";import"../../../slider/slider.js";import"react-slick";import"../../../carousel-preview/CarouselPreview.style.js";import"../../../card-selector/CardSelector.styled.js";import"../../../action-button/ActionButton.styled.js";import"../../../floating-input-dropdown/FloatingInputDropdown.js";import"../../../dropdown/MultilevelDropdownPopover/index.js";import"../../../multi-level-dropdown/MultiLevelDropdown.styled.js";import{Chart as c,ArcElement as a,Legend as l}from"chart.js";import{Doughnut as d}from"react-chartjs-2";c.register(a,l);const A={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{if(!t.label)return" 0%";const o=t.dataset.data.reduce(((t,o)=>t+o),0),e=parseFloat((t.raw/o*100).toFixed(1));return` ${t.label}: ${e}%`}}}}},m=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],n=t("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(t=>s.surface.standard),";border:1px solid ",(t=>s.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */")),u=t=>o(n,Object.assign({style:{padding:24}},{children:t.children})),b=t=>{let{title:s,slices:c,size:a}=t;const[l,n]=g([]),[u,b]=g();return p((()=>{const t=c.reduce(((t,o)=>t+o.count),0);let o=[];if(o=Object.keys(c).map(((t,o)=>Object.assign({color:m[o%m.length]},c[t]))),n([...o]),0===t){b({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const t={labels:c.map((t=>i.capitalize(t.name))),datasets:[{data:c.map((t=>t.count)),backgroundColor:c.map(((t,o)=>{var e;return null!==(e=t.color)&&void 0!==e?e:m[o%m.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};b(t)}}),[c]),u?r(e,{children:[s&&o(I,Object.assign({style:{marginBottom:16}},{children:s})),r("div",Object.assign({className:"row"},{children:[o("div",Object.assign({className:"col-6"},{children:o("div",Object.assign({style:{width:a,height:a}},{children:o(d,{data:u,options:Object.assign(Object.assign({},A),{maintainAspectRatio:!a})})}))})),o("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:o(C,{slices:l})}))]}))]}):o(e,{})};export{u as Card,b as PieChartAnalytics};
@@ -7,10 +7,4 @@ export interface PieChartInputData {
7
7
  slices: PieChartInput[];
8
8
  title?: string;
9
9
  size?: number;
10
- allowChartPopup?: boolean;
11
- showConvertToBarChart?: boolean;
12
- truncateSlices?: number;
13
- barChartXAxisTitle?: string;
14
- barChartYAxisTitle?: string;
15
- hideTitle?: boolean;
16
10
  }
@@ -1 +1 @@
1
- import{jsxs as t,jsx as o}from"react/jsx-runtime";import e from"../../../../assets/icons/maximize.svg.js";import{Chart as i,CategoryScale as a,LinearScale as l,BarElement as n,Tooltip as s,Legend as d}from"chart.js";import r from"chartjs-plugin-datalabels";import{useState as c}from"react";import{Bar as p}from"react-chartjs-2";import{IconButton as u}from"../../../icon-button/IconButton.js";import{StyledModal as g}from"../../../modals/styledModal.js";import{TitleRegular as v,BodyTiny as x}from"../../../TypographyStyle.js";import{COLORS as h,FONTS as m}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as b,truncateValueForIndianStore as y}from"../utils/calcPercentage.js";import{COLOR_SCHEMA as f,GRAPH_ORIENTATION as A}from"./StackedBarChart.model.js";import{GraphContainerWrapper as O}from"./StackedBarChart.styles.js";i.register(a,l,n,s,d,r);const C=i=>{var a,l,n,s,d,r,C,k,j,F,L,S,T,I,H,E,R,D,N,w,B,Z,z,P,_,W,V,M,Y,q,G,J,K,Q,U,X;const[$,tt]=c(!1),ot=[250,1e3,800,1500,300,600],et=0===i.yAxis.data.length,it=void 0===i.customColourScaleBrand||void 0===i.customColourScalePastel?i.colorSchema===f.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"]:i.colorSchema===f.PASTEL?i.customColourScalePastel:i.customColourScaleBrand,at=i.customHoverColour,lt={barPercentage:.4,categoryPercentage:1,pointStyle:"circle",barWidth:i.barWidth},nt={};i.yAxis.data.map((t=>{t.map((t=>{nt[t.name]?nt[t.name].push(t.value):nt[t.name]=[t.value]}))}));const st=Object.keys(nt).map(((t,o)=>Object.assign({label:t,data:nt[t],backgroundColor:it[o],hoverBackgroundColor:void 0===at?void 0:at[o]},lt)));let dt=i.xAxis.data.map((t=>"string"==typeof t?t:t.name)),rt=st;if(i.truncateBars){const t=((t,o,e)=>{if(o.length<=e)return{truncatedData:t,truncatedLabels:o,originalData:t,originalLabels:o};const i=t.map((t=>t.slice(0,e))),a=t.map((t=>t.slice(e).reduce(((t,o)=>t+o),0)));i.forEach(((t,o)=>t.push(a[o])));const l=o.slice(0,e);return l.push("Others"),{truncatedData:i,truncatedLabels:l,originalData:t,originalLabels:o}})(st.map((t=>t.data)),dt,i.truncateBars);st.forEach(((o,e)=>o.data=t.truncatedData[e])),dt=t.truncatedLabels,rt=t.originalData.map(((t,o)=>Object.assign(Object.assign({},st[o]),{data:t})))}const ct={plugins:{legend:{display:!et&&!i.customLegend,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!et,callbacks:{label:null===(a=i.tooltipConfig)||void 0===a?void 0:a.labelCallback,footer:null===(l=i.tooltipConfig)||void 0===l?void 0:l.footerCallback},footerFont:null===(s=null===(n=i.tooltipConfig)||void 0===n?void 0:n.footerStyles)||void 0===s?void 0:s.footerFont},datalabels:{display:null!==(d=i.showTotal)&&void 0!==d&&d,anchor:"end",align:"end",clamp:!0,formatter:(t,o)=>{var e;const i=o.datasetIndex,a=o.chart.data.datasets;if(i!==a.length-1)return"";const l=o.dataIndex;let n=0;for(let t=0;t<a.length;t++)n+=null!==(e=a[t].data[l])&&void 0!==e?e:0;return n?n<1e3?n:(n/1e3).toString().substring(0,4)+"k":""},color:h.content.secondary}},layout:{padding:{right:i.showTotal&&i.orientation===A.HORIZONTAL?50:0,top:i.showTotal&&i.orientation!=A.HORIZONTAL?50:0}},responsive:!0,maintainAspectRatio:!1,legend:{display:!i.customLegend,labels:{usePointStyle:!0}},indexAxis:i.orientation===A.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(i.orientation===A.HORIZONTAL?null===(r=i.yAxis)||void 0===r?void 0:r.title:null===(C=i.xAxis)||void 0===C?void 0:C.title),text:i.orientation===A.HORIZONTAL?null===(k=i.yAxis)||void 0===k?void 0:k.title:null===(j=i.xAxis)||void 0===j?void 0:j.title,color:null!==(S=i.orientation===A.HORIZONTAL?null===(F=i.yAxis)||void 0===F?void 0:F.titleColor:null===(L=i.xAxis)||void 0===L?void 0:L.titleColor)&&void 0!==S?S:h.content.secondary,font:{size:m.caption.fontSize}},grid:{display:i.orientation===A.HORIZONTAL,color:h.background.base},ticks:{fontSize:m.caption.fontSize,color:null!==(T=i.yAxis.labelColor)&&void 0!==T?T:h.content.secondary,callback:i.orientation===A.HORIZONTAL?i.isInternationalStore?b:y:void 0},stacked:i.orientation===A.HORIZONTAL?"boolean"!=typeof(null===(I=i.yAxis)||void 0===I?void 0:I.stacked)||(null===(H=i.yAxis)||void 0===H?void 0:H.stacked):"boolean"!=typeof(null===(E=i.xAxis)||void 0===E?void 0:E.stacked)||(null===(R=i.xAxis)||void 0===R?void 0:R.stacked)},y:{title:{display:!!(i.orientation===A.HORIZONTAL?null===(D=i.xAxis)||void 0===D?void 0:D.title:null===(N=i.yAxis)||void 0===N?void 0:N.title),text:i.orientation===A.HORIZONTAL?null===(w=i.xAxis)||void 0===w?void 0:w.title:null===(B=i.yAxis)||void 0===B?void 0:B.title,color:null!==(P=i.orientation===A.HORIZONTAL?null===(Z=i.xAxis)||void 0===Z?void 0:Z.titleColor:null===(z=i.yAxis)||void 0===z?void 0:z.titleColor)&&void 0!==P?P:h.content.secondary,font:{size:m.caption.fontSize}},grid:{display:i.orientation!==A.HORIZONTAL,color:h.background.base},ticks:Object.assign(Object.assign({stepSize:i.orientation===A.HORIZONTAL?null===(_=i.xAxis)||void 0===_?void 0:_.stepSize:null===(W=i.yAxis)||void 0===W?void 0:W.stepSize,fontSize:m.caption.fontSize,color:null!==(V=i.xAxis.labelColor)&&void 0!==V?V:h.content.secondary},et?{min:0,max:2e3,stepSize:200}:{}),{callback:i.orientation!==A.VERTICAL?i.isInternationalStore?b:y:void 0}),stacked:i.orientation===A.HORIZONTAL?"boolean"!=typeof(null===(M=i.xAxis)||void 0===M?void 0:M.stacked)||(null===(Y=i.xAxis)||void 0===Y?void 0:Y.stacked):"boolean"!=typeof(null===(q=i.yAxis)||void 0===q?void 0:q.stacked)||(null===(G=i.yAxis)||void 0===G?void 0:G.stacked)}},onClick:(t,o)=>{if(!i.onBarClick)return;const e=o[0].datasetIndex,a=o[0].index,l=t.chart.data.datasets[e].label,n=t.chart.data.labels[a];i.onBarClick(n,l)},onHover:(t,o)=>{i.onBarClick&&o.length&&(t.native.target.style.cursor="pointer")}};i.orientation&&i.orientation!==A.VERTICAL?delete ct.scales.y.ticks.callback:delete ct.scales.x.ticks.callback;const pt={labels:dt,datasets:et?[{data:ot,backgroundColor:"rgba(0,0,0,0)"}]:st},ut={labels:i.xAxis.data.map((t=>"string"==typeof t?t:t.name)),datasets:et?[{data:ot,backgroundColor:"rgba(0,0,0,0)"}]:rt},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return o("div",Object.assign({style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",padding:"0px 24px 12px 24px",justifyContent:i.allowChartPopup&&!e?"flex-start":"flex-end"}},{children:st.map((e=>t("div",Object.assign({style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px"}},{children:[o("div",{style:{backgroundColor:e.backgroundColor,width:"16px",height:"16px",borderRadius:"2px"}}),o(x,Object.assign({color:h.content.secondary},{children:e.label}))]}),e.label.replace(" ","_"))))}))};return t(O,Object.assign({style:null!==(J=i.wrapperStyle)&&void 0!==J?J:{},padding:i.outerPadding,customLegend:i.customLegend},{children:[i.chartHeading&&t("div",Object.assign({style:{marginBottom:24,display:"flex",justifyContent:i.hideHeading?"flex-end":"space-between"}},{children:[!0!==i.hideHeading&&o(v,Object.assign({color:null!==(K=i.chartHeading.color)&&void 0!==K?K:h.content.secondary},{children:i.chartHeading.heading})),i.allowChartPopup&&o("div",Object.assign({style:{display:"flex",justifyContent:"flex-end"}},{children:o("div",{children:o(u,{Icon:e,onClick:()=>{tt(!0)}})})}))]})),i.customLegend&&gt(),o("div",Object.assign({className:"graph__wrapper"},{children:o("div",Object.assign({style:{height:null!==(Q=i.graphCanvasHeight)&&void 0!==Q?Q:500,width:null!==(U=i.graphCanvasWidth)&&void 0!==U?U:"auto"}},{children:o(p,{options:ct,data:pt})}))})),$&&o(g,Object.assign({open:$,onClose:()=>tt(!1),closeOnOutsideClick:!0,headingTitle:null===(X=i.chartHeading)||void 0===X?void 0:X.heading,width:"85%"},{children:t("div",Object.assign({className:"graph__wrapper",style:{padding:"8px"}},{children:[i.customLegend&&gt(!0),o("div",Object.assign({style:{height:"70vh",width:"100%",padding:"16px",borderRadius:"8px"}},{children:o(p,{options:ct,data:ut})}))]}))}))]}))};export{C as StackedBarChart};
1
+ import{jsxs as o,jsx as t}from"react/jsx-runtime";import{Chart as i,CategoryScale as e,LinearScale as l,BarElement as a,Tooltip as n,Legend as s}from"chart.js";import d from"chartjs-plugin-datalabels";import{Bar as r}from"react-chartjs-2";import{TitleRegular as c,BodyTiny as v}from"../../../TypographyStyle.js";import{COLORS as u,FONTS as p}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as g,truncateValueForIndianStore as x}from"../utils/calcPercentage.js";import{COLOR_SCHEMA as y,GRAPH_ORIENTATION as m}from"./StackedBarChart.model.js";import{GraphContainerWrapper as b}from"./StackedBarChart.styles.js";i.register(e,l,a,n,s,d);const A=i=>{var e,l,a,n,s,d,A,h,O,f,C,k,F,S,L,T,j,I,H,E,N,R,Z,z,B,D,P,w,_,W,V,Y,q,G,J;const K=0===i.yAxis.data.length,M=void 0===i.customColourScaleBrand||void 0===i.customColourScalePastel?i.colorSchema===y.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"]:i.colorSchema===y.PASTEL?i.customColourScalePastel:i.customColourScaleBrand,Q=i.customHoverColour,U={barPercentage:.4,categoryPercentage:1,pointStyle:"circle",barWidth:i.barWidth},X={};i.yAxis.data.map((o=>{o.map((o=>{X[o.name]?X[o.name].push(o.value):X[o.name]=[o.value]}))}));const $=Object.keys(X).map(((o,t)=>Object.assign({label:o,data:X[o],backgroundColor:M[t],hoverBackgroundColor:void 0===Q?void 0:Q[t]},U))),oo={plugins:{legend:{display:!K&&!i.customLegend,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!K,callbacks:{label:null===(e=i.tooltipConfig)||void 0===e?void 0:e.labelCallback,footer:null===(l=i.tooltipConfig)||void 0===l?void 0:l.footerCallback},footerFont:null===(n=null===(a=i.tooltipConfig)||void 0===a?void 0:a.footerStyles)||void 0===n?void 0:n.footerFont},datalabels:{display:null!==(s=i.showTotal)&&void 0!==s&&s,anchor:"end",align:"end",clamp:!0,formatter:(o,t)=>{var i;const e=t.datasetIndex,l=t.chart.data.datasets;if(e!==l.length-1)return"";const a=t.dataIndex;let n=0;for(let o=0;o<l.length;o++)n+=null!==(i=l[o].data[a])&&void 0!==i?i:0;return n?n<1e3?n:(n/1e3).toString().substring(0,4)+"k":""},color:u.content.secondary}},layout:{padding:{right:i.showTotal&&i.orientation===m.HORIZONTAL?50:0,top:i.showTotal&&i.orientation!=m.HORIZONTAL?50:0}},responsive:!0,maintainAspectRatio:!1,legend:{display:!i.customLegend,labels:{usePointStyle:!0}},indexAxis:i.orientation===m.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(i.orientation===m.HORIZONTAL?null===(d=i.yAxis)||void 0===d?void 0:d.title:null===(A=i.xAxis)||void 0===A?void 0:A.title),text:i.orientation===m.HORIZONTAL?null===(h=i.yAxis)||void 0===h?void 0:h.title:null===(O=i.xAxis)||void 0===O?void 0:O.title,color:null!==(k=i.orientation===m.HORIZONTAL?null===(f=i.yAxis)||void 0===f?void 0:f.titleColor:null===(C=i.xAxis)||void 0===C?void 0:C.titleColor)&&void 0!==k?k:u.content.secondary,font:{size:p.caption.fontSize}},grid:{display:i.orientation===m.HORIZONTAL,color:u.background.base},ticks:{fontSize:p.caption.fontSize,color:null!==(F=i.yAxis.labelColor)&&void 0!==F?F:u.content.secondary,callback:i.orientation===m.HORIZONTAL?i.isInternationalStore?g:x:void 0},stacked:i.orientation===m.HORIZONTAL?"boolean"!=typeof(null===(S=i.yAxis)||void 0===S?void 0:S.stacked)||(null===(L=i.yAxis)||void 0===L?void 0:L.stacked):"boolean"!=typeof(null===(T=i.xAxis)||void 0===T?void 0:T.stacked)||(null===(j=i.xAxis)||void 0===j?void 0:j.stacked)},y:{title:{display:!!(i.orientation===m.HORIZONTAL?null===(I=i.xAxis)||void 0===I?void 0:I.title:null===(H=i.yAxis)||void 0===H?void 0:H.title),text:i.orientation===m.HORIZONTAL?null===(E=i.xAxis)||void 0===E?void 0:E.title:null===(N=i.yAxis)||void 0===N?void 0:N.title,color:null!==(z=i.orientation===m.HORIZONTAL?null===(R=i.xAxis)||void 0===R?void 0:R.titleColor:null===(Z=i.yAxis)||void 0===Z?void 0:Z.titleColor)&&void 0!==z?z:u.content.secondary,font:{size:p.caption.fontSize}},grid:{display:i.orientation!==m.HORIZONTAL,color:u.background.base},ticks:Object.assign(Object.assign({stepSize:i.orientation===m.HORIZONTAL?null===(B=i.xAxis)||void 0===B?void 0:B.stepSize:null===(D=i.yAxis)||void 0===D?void 0:D.stepSize,fontSize:p.caption.fontSize,color:null!==(P=i.xAxis.labelColor)&&void 0!==P?P:u.content.secondary},K?{min:0,max:2e3,stepSize:200}:{}),{callback:i.orientation!==m.VERTICAL?i.isInternationalStore?g:x:void 0}),stacked:i.orientation===m.HORIZONTAL?"boolean"!=typeof(null===(w=i.xAxis)||void 0===w?void 0:w.stacked)||(null===(_=i.xAxis)||void 0===_?void 0:_.stacked):"boolean"!=typeof(null===(W=i.yAxis)||void 0===W?void 0:W.stacked)||(null===(V=i.yAxis)||void 0===V?void 0:V.stacked)}},onClick:(o,t)=>{if(!i.onBarClick)return;const e=t[0].datasetIndex,l=t[0].index,a=o.chart.data.datasets[e].label,n=o.chart.data.labels[l];i.onBarClick(n,a)},onHover:(o,t)=>{i.onBarClick&&t.length&&(o.native.target.style.cursor="pointer")}};i.orientation&&i.orientation!==m.VERTICAL?delete oo.scales.y.ticks.callback:delete oo.scales.x.ticks.callback;const to={labels:i.xAxis.data.map((o=>"string"==typeof o?o:o.name)),datasets:K?[{data:[250,1e3,800,1500,300,600],backgroundColor:"rgba(0,0,0,0)"}]:$};return o(b,Object.assign({style:null!==(Y=i.wrapperStyle)&&void 0!==Y?Y:{},padding:i.outerPadding,customLegend:i.customLegend},{children:[i.chartHeading&&t("div",Object.assign({style:{marginBottom:24}},{children:t(c,Object.assign({color:null!==(q=i.chartHeading.color)&&void 0!==q?q:u.content.secondary},{children:i.chartHeading.heading}))})),i.customLegend&&t("div",Object.assign({style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",padding:"0px 24px 12px 24px",justifyContent:"flex-end"}},{children:$.map((i=>o("div",Object.assign({className:"legend__row"},{children:[t("div",{className:"legend__palette",style:{backgroundColor:i.backgroundColor}}),t(v,Object.assign({color:u.content.secondary},{children:i.label}))]}),i.label.replace(" ","_"))))})),t("div",Object.assign({className:"graph__wrapper"},{children:t("div",Object.assign({style:{height:null!==(G=i.graphCanvasHeight)&&void 0!==G?G:500,width:null!==(J=i.graphCanvasWidth)&&void 0!==J?J:"auto"}},{children:t(r,{options:oo,data:to})}))}))]}))};export{A as StackedBarChart};
@@ -59,7 +59,4 @@ export interface StackedBarGraphI {
59
59
  customColourScalePastel?: string[];
60
60
  customHoverColour?: string[];
61
61
  isInternationalStore?: boolean;
62
- truncateBars?: number;
63
- allowChartPopup?: boolean;
64
- hideHeading?: boolean;
65
62
  }
@@ -5,7 +5,7 @@ import { CHANNEL_TYPE } from '../template-preview/models/Channels';
5
5
  import { CUSTOM_VARIABLE, GlobalPlaceholderType } from '../template-preview/models/TemplateMeta';
6
6
  import { AllTemplateTypes, AllTemplateVariables, NonNullTemplateTypes } from '../template-preview/models/types';
7
7
  import { WebpushTemplateVariables } from '../template-preview/models/WebpushTemplate';
8
- import { ExtrasWhatsapp, POD, WhatsAppPickerMeta, WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
8
+ import { ExtrasWhatsapp, POD, TEMPLATE_QUALITY, WhatsAppPickerMeta, WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
9
9
  import { VariableV3 } from '../variable-picker-v3/model';
10
10
  export interface TemplateContextMapperProps {
11
11
  selectedTemplate: NonNullTemplateTypes;
@@ -62,5 +62,6 @@ export interface TemplateContextMapperProps {
62
62
  showDiscountCodeExpiryInfo?: boolean;
63
63
  footerButtonText?: string;
64
64
  footerInfoText?: string;
65
+ templateQuality?: TEMPLATE_QUALITY;
65
66
  }
66
67
  export declare const TemplateContextMapper: (props: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o,Fragment as l}from"react/jsx-runtime";import{cloneDeep as t}from"lodash";import{useEffect as i,useState as r,useRef as a,useMemo as s}from"react";import n from"../../utils/StringUtils.js";import{COLORS as d}from"../../constants/Theme.js";import{StyledModal as u}from"../modals/styledModal.js";import{CHANNEL_TYPE as c}from"../template-preview/models/Channels.js";import{POD as p}from"../template-preview/models/WhatsAppTemplate.js";import{TemplateModalContext as m}from"./context/templateModalContext.js";import v from"./modalElements/Footer.js";import h from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as b}from"./utils/convertPlaceholdersToBikDropdown.js";const C=C=>{var f,x,g,E,P,I,T,y;const{selectedTemplate:S,closeDialog:D,showVariableMapping:w,channel:V,htmlContent:k,templateVariables:L,onTemplateSelect:j,globalPlaceholders:B,showOnlyContent:M,whatsappSpecificPickerMeta:A,zIndex:H,showVariableModal:F,variableList:O,discountCode:W,setDiscountCode:N,onBackPress:z,enabledCustomText:R,variableListForImage:U,showSampleValues:$,disableEditVariable:_,pod:q,extras:G,pickerConf:J,selectedCarouselProducts:K,disableEditExpiry:Q,cardWidth:X,onDeleteSelectedProducts:Y,fileName:Z,setFileName:ee,hideDeviceContainerInPreview:oe,maxCharLimit:le,onDefaultVariableSelect:te,skipDefaultVariableContent:ie,disableDatePicker:re,disableCopyCode:ae,initialExpiryDateTime:se,showDiscountCodeExpiryInfo:ne,footerButtonText:de,footerInfoText:ue}=C;i((()=>{fe(k)}),[k]);const ce=V===c.WHATSAPP&&"CAROUSEL"===(null===(x=null===(f=null==S?void 0:S.components)||void 0===f?void 0:f[1])||void 0===x?void 0:x.type),pe=null==S?void 0:S.isProductCarouselType,[me,ve]=r(V===c.EMAIL||V==c.WEBPUSH||ce?"desktop":"mobile"),[he,be]=r(!1),[Ce,fe]=r(k),[xe,ge]=r(!1),[Ee,Pe]=r([]),[Ie,Te]=r({}),[ye,Se]=r(S),[De,we]=r([]),[Ve,ke]=r(null),[Le,je]=r(!1),[Be,Me]=r(null!=L?L:[]),[Ae,He]=r(!1),[Fe,Oe]=r(ce?(null===(E=null===(g=null==ye?void 0:ye.mapping)||void 0===g?void 0:g.body)||void 0===E?void 0:E.length)?-1:0:-1),[We,Ne]=r([]),[ze,Re]=r(void 0),Ue=a(null),[$e,_e]=r(!1),[qe,Ge]=r(!1),[Je,Ke]=r(!1),[Qe,Xe]=r({});i((()=>{K?Ne(K):pe&&Ne([])}),[K]),i((()=>{var e;if(!Le&&pe&&(!K||0===Ne.length)){const o=null===(e=null==ye?void 0:ye.components)||void 0===e?void 0:e[1].cards,l=[];null==o||o.forEach((e=>{var o;null===(o=null==e?void 0:e.components)||void 0===o||o.forEach((e=>{var o,t,i;"HEADER"===e.type&&l.push(null!==(i=null===(t=null===(o=e.example)||void 0===o?void 0:o.header_handle)||void 0===t?void 0:t[0])&&void 0!==i?i:"")}))})),we(l),je(!0)}}),[Le]);const Ye=s((()=>b(B)),[B]);return i((()=>{Re(t(O))}),[O]),e(m.Provider,Object.assign({value:{hideFooterButton:Je,setHideFooterButton:Ke,hideCrossButton:qe,setHideCrossButton:Ge,variableList:ze,setVariableList:Re,variableCallback:Ve,setVariableCallback:ke,showVariablePicker:he,setShowVariablePicker:be,template:ye,setTemplate:Se,device:me,setDevice:ve,display_content:Ce,setDisplayContent:fe,originalVariableList:Be,setOriginalVariableList:Me,isError:xe,setIsError:ge,channel:V,globalNormalizedPlaceholders:Ye,templateSelectionTriggered:Ae,setTemplateSelectionTriggered:He,enabledCustomText:R,disableEditVariable:_,pod:q,extras:G,isWhatsappCarousel:ce,selectedCarouselIndex:Fe,setSelectedCarouselIndex:Oe,isProductCarouselType:pe,templateErrorIndexes:Ie,cardCount:ce?null===(I=null===(P=S.components)||void 0===P?void 0:P[1].cards)||void 0===I?void 0:I.length:void 0,errorIndexes:Ee,setErrorIndexes:Pe,pickerConf:J,carouselProducts:We,setCarouselProducts:Ne,disableEditExpiry:Q,cardWidth:X,cardImages:De,onDeleteSelectedProducts:Y,hideDeviceContainerInPreview:oe,sliderRef:Ue,isCarouselHovered:$e,setIsCarouselHovered:_e,maxCharLimit:le,ctaOptionsErrors:Qe,setCtaOptionsErrors:Xe,onDefaultVariableSelect:te,disableDatePicker:re,disableCopyCode:ae,initialExpiryDateTime:se,showDiscountCodeExpiryInfo:ne}},{children:M?e(h,{variableListFromProps:O,channel:c.EMAIL,hideHeader:!0}):o(u,Object.assign({hideCrossButton:qe,zIndex:H,centralContainerStyles:{width:ce?900:V===c.EMAIL&&w?1e3:800},open:!0,onClose:()=>{null==D||D()},headingTitle:null==ye?void 0:ye.label,headingSubtitle:V===c.WHATSAPP?`${n.capitaliseFirstLetterOfString(null!==(T=null==ye?void 0:ye.category)&&void 0!==T?T:"")} • ${null!==(y=null==ye?void 0:ye.templateCategory)&&void 0!==y?y:""}`:"",onBackPress:z,modalHeaderStyles:{borderBottom:`1px solid ${d.stroke.primary}`}},{children:[e(h,{variableListFromProps:O,showSampleValues:$,showVariableMapping:w,channel:V,whatsappSpecificPickerMeta:A,showVariableModal:F,discountCode:W,setDiscountCode:N,variableListForImage:U&&(null==U?void 0:U.length)>0?U:ze,fileName:Z,setFileName:e=>{null==ee||ee(e)},skipDefaultVariableContent:ie}),j?e(v,{isWhatsappCarousel:null!=ce&&ce,onSelect:function(){var e;if((null==We?void 0:We.length)<1&&pe)return void ge(!0);if(Object.keys(Qe).length>0&&q!==p.CHATBOT)return void ge(!0);const o=null==j?void 0:j(ye,Be,null!=Ce?Ce:"",We);Te(null!==(e=null==o?void 0:o.templateErrorIndexes)&&void 0!==e?e:{body:[],buttons:[]}),(null==o?void 0:o.errorIndexes)||(null==o?void 0:o.error)?((null==o?void 0:o.errorIndexes)&&Pe(o.errorIndexes),(null==o?void 0:o.error)&&ge(!!(null==o?void 0:o.error))):He(!0)},footerButtonText:de,footerInfoText:ue}):e(l,{})]}))}))};export{C as TemplateContextMapper};
1
+ import{jsx as e,jsxs as o,Fragment as l}from"react/jsx-runtime";import{cloneDeep as t}from"lodash";import{useEffect as i,useState as r,useRef as a,useMemo as n}from"react";import s from"../../utils/StringUtils.js";import{COLORS as d}from"../../constants/Theme.js";import{StyledModal as u}from"../modals/styledModal.js";import{CHANNEL_TYPE as c}from"../template-preview/models/Channels.js";import{TEMPLATE_QUALITY as p,POD as m}from"../template-preview/models/WhatsAppTemplate.js";import{TemplateModalContext as v}from"./context/templateModalContext.js";import h from"./modalElements/Footer.js";import C from"./modalElements/QualityWarningModal.js";import b from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as f}from"./utils/convertPlaceholdersToBikDropdown.js";const g=g=>{var x,E,P,y,S,T,I,D,w,L;const{selectedTemplate:V,closeDialog:k,showVariableMapping:j,channel:A,htmlContent:B,templateVariables:M,onTemplateSelect:H,globalPlaceholders:O,showOnlyContent:F,whatsappSpecificPickerMeta:W,zIndex:N,showVariableModal:$,variableList:R,discountCode:z,setDiscountCode:U,onBackPress:Q,enabledCustomText:_,variableListForImage:q,showSampleValues:Y,disableEditVariable:G,pod:J,extras:K,pickerConf:X,selectedCarouselProducts:Z,disableEditExpiry:ee,cardWidth:oe,onDeleteSelectedProducts:le,fileName:te,setFileName:ie,hideDeviceContainerInPreview:re,maxCharLimit:ae,onDefaultVariableSelect:ne,skipDefaultVariableContent:se,disableDatePicker:de,disableCopyCode:ue,initialExpiryDateTime:ce,showDiscountCodeExpiryInfo:pe,footerButtonText:me,footerInfoText:ve,templateQuality:he}=g;i((()=>{ye(B)}),[B]);const Ce=A===c.WHATSAPP&&"CAROUSEL"===(null===(E=null===(x=null==V?void 0:V.components)||void 0===x?void 0:x[1])||void 0===E?void 0:E.type),be=null==V?void 0:V.isProductCarouselType,[fe,ge]=r(A===c.EMAIL||A==c.WEBPUSH||Ce?"desktop":"mobile"),[xe,Ee]=r(!1),[Pe,ye]=r(B),[Se,Te]=r(!1),[Ie,De]=r([]),[we,Le]=r({}),[Ve,ke]=r(V),[je,Ae]=r([]),[Be,Me]=r(null),[He,Oe]=r(!1),[Fe,We]=r(null!=M?M:[]),[Ne,$e]=r(!1),[Re,ze]=r(Ce?(null===(y=null===(P=null==Ve?void 0:Ve.mapping)||void 0===P?void 0:P.body)||void 0===y?void 0:y.length)?-1:0:-1),[Ue,Qe]=r([]),[_e,qe]=r(void 0),Ye=a(null),[Ge,Je]=r(!1),[Ke,Xe]=r(!1),[Ze,eo]=r(!1),[oo,lo]=r(!0),[to,io]=r(!0),[ro,ao]=r({});i((()=>{Z?Qe(Z):be&&Qe([])}),[Z]),i((()=>{var e;if(!He&&be&&(!Z||0===Qe.length)){const o=null===(e=null==Ve?void 0:Ve.components)||void 0===e?void 0:e[1].cards,l=[];null==o||o.forEach((e=>{var o;null===(o=null==e?void 0:e.components)||void 0===o||o.forEach((e=>{var o,t,i;"HEADER"===e.type&&l.push(null!==(i=null===(t=null===(o=e.example)||void 0===o?void 0:o.header_handle)||void 0===t?void 0:t[0])&&void 0!==i?i:"")}))})),Ae(l),Oe(!0)}}),[He]);const no=n((()=>f(O)),[O]);return i((()=>{qe(t(R))}),[R]),he!==p.RED&&he!==p.YELLOW||!oo?e(v.Provider,Object.assign({value:{hideFooterButton:Ze,setHideFooterButton:eo,hideCrossButton:Ke,setHideCrossButton:Xe,variableList:_e,setVariableList:qe,variableCallback:Be,setVariableCallback:Me,showVariablePicker:xe,setShowVariablePicker:Ee,template:Ve,setTemplate:ke,device:fe,setDevice:ge,display_content:Pe,setDisplayContent:ye,originalVariableList:Fe,setOriginalVariableList:We,isError:Se,setIsError:Te,channel:A,globalNormalizedPlaceholders:no,templateSelectionTriggered:Ne,setTemplateSelectionTriggered:$e,enabledCustomText:_,disableEditVariable:G,pod:J,extras:K,isWhatsappCarousel:Ce,selectedCarouselIndex:Re,setSelectedCarouselIndex:ze,isProductCarouselType:be,templateErrorIndexes:we,cardCount:Ce?null===(D=null===(I=V.components)||void 0===I?void 0:I[1].cards)||void 0===D?void 0:D.length:void 0,errorIndexes:Ie,setErrorIndexes:De,pickerConf:X,carouselProducts:Ue,setCarouselProducts:Qe,disableEditExpiry:ee,cardWidth:oe,cardImages:je,onDeleteSelectedProducts:le,hideDeviceContainerInPreview:re,sliderRef:Ye,isCarouselHovered:Ge,setIsCarouselHovered:Je,maxCharLimit:ae,ctaOptionsErrors:ro,setCtaOptionsErrors:ao,onDefaultVariableSelect:ne,disableDatePicker:de,disableCopyCode:ue,initialExpiryDateTime:ce,showDiscountCodeExpiryInfo:pe}},{children:F?e(b,{variableListFromProps:R,channel:c.EMAIL,hideHeader:!0}):o(u,Object.assign({hideCrossButton:Ke,zIndex:N,centralContainerStyles:{width:Ce?900:A===c.EMAIL&&j?1e3:800},open:to,onClose:()=>{io(!1),null==k||k()},headingTitle:null==Ve?void 0:Ve.label,headingSubtitle:A===c.WHATSAPP?`${s.capitaliseFirstLetterOfString(null!==(w=null==Ve?void 0:Ve.category)&&void 0!==w?w:"")} • ${null!==(L=null==Ve?void 0:Ve.templateCategory)&&void 0!==L?L:""}`:"",onBackPress:Q,modalHeaderStyles:{borderBottom:`1px solid ${d.stroke.primary}`}},{children:[e(b,{variableListFromProps:R,showSampleValues:Y,showVariableMapping:j,channel:A,whatsappSpecificPickerMeta:W,showVariableModal:$,discountCode:z,setDiscountCode:U,variableListForImage:q&&(null==q?void 0:q.length)>0?q:_e,fileName:te,setFileName:e=>{null==ie||ie(e)},skipDefaultVariableContent:se}),H?e(h,{isWhatsappCarousel:null!=Ce&&Ce,onSelect:function(){var e;if((null==Ue?void 0:Ue.length)<1&&be)return void Te(!0);if(Object.keys(ro).length>0&&J!==m.CHATBOT)return void Te(!0);const o=null==H?void 0:H(Ve,Fe,null!=Pe?Pe:"",Ue);Le(null!==(e=null==o?void 0:o.templateErrorIndexes)&&void 0!==e?e:{body:[],buttons:[]}),(null==o?void 0:o.errorIndexes)||(null==o?void 0:o.error)?((null==o?void 0:o.errorIndexes)&&De(o.errorIndexes),(null==o?void 0:o.error)&&Te(!!(null==o?void 0:o.error))):$e(!0)},footerButtonText:me,footerInfoText:ve}):e(l,{})]}))})):e(C,{headingTitle:null==Ve?void 0:Ve.label,headingSubtitle:A===c.WHATSAPP?`${s.capitaliseFirstLetterOfString(null!==(S=null==Ve?void 0:Ve.category)&&void 0!==S?S:"")} • ${null!==(T=null==Ve?void 0:Ve.templateCategory)&&void 0!==T?T:""}`:"",quality:he,onClose:()=>{null==k||k(),lo(!1),io(!1)},onCancel:()=>{lo(!1),io(!1)},onProceed:()=>{lo(!1),io(!0)}})};export{g as TemplateContextMapper};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { TEMPLATE_QUALITY } from "../../template-preview";
3
+ interface QualityWarningModalProps {
4
+ quality: TEMPLATE_QUALITY;
5
+ onClose?: () => void;
6
+ onProceed?: () => void;
7
+ onCancel?: () => void;
8
+ headingTitle?: string;
9
+ headingSubtitle?: string;
10
+ }
11
+ declare const QualityWarningModal: React.FC<QualityWarningModalProps>;
12
+ export default QualityWarningModal;
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import n from"../../../assets/icons/alert_triangle.svg.js";import{StyledModal as o}from"../../modals/styledModal.js";import{TitleMedium as i,BodyPrimary as r}from"../../TypographyStyle.js";import{COLORS as l}from"../../../constants/Theme.js";const a={YELLOW:"Medium quality",RED:"Low quality"},s=s=>{let{quality:c,onClose:d,onProceed:u,onCancel:p,headingTitle:g,headingSubtitle:m}=s;return e(o,Object.assign({open:!0,headingTitle:g,tintedHeader:!0,modalHeaderStyles:{backgroundColor:l.surface.subdued},onBackPress:()=>{null==d||d()},headingSubtitle:m,footerShadow:!0,primaryButton:{buttonText:"Cancel",buttonType:"primary",onClick:()=>{null==d||d(),null==p||p()}},secondaryButton:{buttonText:"Proceed with selection",buttonType:"secondary",onClick:()=>{null==u||u()}},onClose:()=>{null==d||d()}},{children:t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"128px 80px",gap:"16px"}},{children:[e("div",Object.assign({style:{background:l.background.warning.light,width:"64px",height:"64px",padding:"12px",borderRadius:"40px"}},{children:e(n,{width:40,height:40,color:l.content.warning})})),t(i,{children:[a[c]," template"]}),e(r,Object.assign({style:{textAlign:"center"},color:l.content.secondary},{children:`This template is of ${a[c]}. Are you sure you want to send the\n\t\t\t\t\tcampaign with this template? We recommend changing the content or\n\t\t\t\t\tselect a different template before proceeding`}))]}))}))};export{s as default};
@@ -197,6 +197,11 @@ export type WhatsappPreviewButtonType = {
197
197
  flowId: string;
198
198
  flowName: string;
199
199
  };
200
+ export declare enum TEMPLATE_QUALITY {
201
+ GREEN = "GREEN",
202
+ YELLOW = "YELLOW",
203
+ RED = "RED"
204
+ }
200
205
  export type WhatsappMeta = {
201
206
  containerStyle?: React.CSSProperties | undefined;
202
207
  templateContainerStyles?: React.CSSProperties | undefined;
@@ -1 +1 @@
1
- var N,O;!function(N){N.QUICK_REPLY="QUICK_REPLY",N.URL="URL",N.PHONE_NUMBER="PHONE_NUMBER",N.COPY_CODE="COPY_CODE"}(N||(N={})),function(N){N.CHATBOT="CHATBOT",N.GROWTH="GROWTH",N.CAMPAIGN="CAMPAIGN",N.CRM="CRM",N.INTEGRATIONS="INTEGRATIONS",N.OPENAI="OPENAI",N.DM="DM",N.FRONTEND="FRONTEND"}(O||(O={}));export{N as BUTTON_TYPE,O as POD};
1
+ var E,N,O;!function(E){E.GREEN="GREEN",E.YELLOW="YELLOW",E.RED="RED"}(E||(E={})),function(E){E.QUICK_REPLY="QUICK_REPLY",E.URL="URL",E.PHONE_NUMBER="PHONE_NUMBER",E.COPY_CODE="COPY_CODE"}(N||(N={})),function(E){E.CHATBOT="CHATBOT",E.GROWTH="GROWTH",E.CAMPAIGN="CAMPAIGN",E.CRM="CRM",E.INTEGRATIONS="INTEGRATIONS",E.OPENAI="OPENAI",E.DM="DM",E.FRONTEND="FRONTEND"}(O||(O={}));export{N as BUTTON_TYPE,O as POD,E as TEMPLATE_QUALITY};
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export{AmplitudeEvent}from"./amplitude/index.js";import*as o from"./components/template-preview/constants/regexPatterns.js";export{o as regexPatterns};export{default as StringUtils}from"./utils/StringUtils.js";export{BASE_COLORS,COLORS,DEFAULT_THEME,FONTS}from"./constants/Theme.js";export{ComponentZindex}from"./constants/zindex.js";export{CheckBox}from"./components/checkBox/CheckBox.js";export{ListItem}from"./components/list-item/ListItem.js";export{Pagination}from"./components/pagination/Pagination.js";export{RadioButton}from"./components/radioButton/RadioButton.js";export{Toaster}from"./components/toaster/Toaster.js";export{Tooltip}from"./components/tooltips/Tooltip.js";export{PureSpinner,Spinner}from"./components/spinner/Spinner.js";export{Stepper}from"./components/stepper/Stepper.js";export{Tag}from"./components/tag/Tag.js";export{IconButton}from"./components/icon-button/IconButton.js";export{TemplatePreview}from"./components/template-preview/TemplatePreview.js";export{WhatsappLikePreview}from"./components/template-preview/WhatsApp/WhatsAppLikePreview.js";export{WhatsappLikePreviewV2}from"./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js";export{renderVariableUIForPreview}from"./components/template-preview/helpers/SmsTemplateHelper.js";export{WhatsAppFormatToHTML}from"./components/template-preview/helpers/WhatsAppFormatToHTML.js";export{VariableEditorHelper}from"./components/template-preview/helpers/VariableEditorHelper.js";export{ACTIONS_TYPES,CUSTOM_URL_NAME,HEADER_TYPES,STATIC_URL_CTA_OPTION,TEMPLATE_EDITOR,TEMPLATE_STATUS}from"./components/template-preview/models/TemplateMeta.js";export{BUTTON_TYPE,POD}from"./components/template-preview/models/WhatsAppTemplate.js";export{CHANNEL_TYPE}from"./components/template-preview/models/Channels.js";export{TemplateContextMapper}from"./components/template-context-mapper/TemplateContextMapper.js";export{getAllDataFromTemplateComponent,getAllDataFromWebpushTemplateComponent}from"./components/template-context-mapper/utils/getDataFromTemplateComponent.js";export{isVariable,validateIsUrl}from"./components/template-context-mapper/utils/validateIsUrl.js";import"./_virtual/_tslib.js";export{FABMenu}from"./components/fab-menu/FABMenu.js";export{FloatingActionButton}from"./components/floating-action-button/FloatingActionButton.js";export{DROP_POSITION,DropdownToggleContainer,FAB_POSITION,FloatingActionButtonContainer,FloatingActionButtonOuterContainer,MENU_ALIGNMENT,StyledDropdown,TooltipStyled}from"./components/floating-action-button/FloatingActionButton.styles.js";export{ImageService}from"./components/image-compress/ImageCompress.js";export{AiBodyCaption,AiBodyTiny,BodyCaption,BodyLarge,BodyPrimary,BodyPrimaryLink,BodyRegular,BodySecondary,BodySecondaryLink,BodySmall,BodyTiny,ButtonLarge,ButtonLargeAI,ButtonRegular,ButtonRegularAI,Caption,CaptionBold,Display,SmallRegular,SubHeading,TextPlaceholder,Tiny,TitleFour,TitleLarge,TitleMedium,TitleRegular,TitleSmall,TitleXlarge}from"./components/TypographyStyle.js";export{Button}from"./components/button/Button.js";export{ProgressBarComponent,ProgressCompletedBar}from"./components/progress-bar/ProgressBarComponent.js";import"react/jsx-runtime";export{ProgressBarType,ProgressBarV2,TextAlignment}from"./components/progress-bar-v2/ProgressBarV2.js";export{QueryBuilder}from"./components/QueryBuilder/QueryBuilder.js";export{BaseQueryBuilderNode}from"./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";export{PropertyNode,PropertyNodeHeadless}from"./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js";export{queryBuilderSlice}from"./components/QueryBuilder/redux/queryBuilder.reducer.js";export{queryBuilderCacheSlice}from"./components/QueryBuilder/redux/queryBuilderCache.reducer.js";export{AD_STRING_OPERATORS,ANY_AD_OPERATORS,ANY_IG_OPERATORS,BOOLEAN_OPERATORS,DATE_OPERATORS,EVENT_VALUES,EXACTLY_OPERATORS,FREQUENCY_OPERATORS,ICE_BREAKER_OPERATORS,IG_STRING_OPERATORS,INTEGER_OPERATORS,MAIL_SUBJECT_OPERATORS,REACTION_OPERATORS,SPECIFIC_IG_OPERATORS,STRING_OPERATORS,STRING_RESTRICTED_OPERATORS,STRING_RESTRICTED_OPERATORS_2,STRING_RESTRICTED_OPERATORS_3}from"./components/QueryBuilder/types/QueryBuilderOperator.type.js";export{StyledModal}from"./components/modals/styledModal.js";export{DropdownPopover}from"./components/dropdown/DropdownPopover/index.js";export{Dropdown}from"./components/dropdown/Dropdown.js";export{ChipDropdown,ChipDropdownContainer}from"./components/dropdown/ChipDropdown.js";export{OpenedDropdown}from"./components/dropdown/OpenedDropdown/components/OpennedDropdown.js";export{MenuItemDropdown}from"./components/dropdown/MenuItem/MenuItem.js";export{AnalyticsCard}from"./components/analytics-card/AnalyticsCard.js";export{AnalyticsContainer,CardDataContainer}from"./components/analytics-card/AnalyticsCard.styled.js";export{Input}from"./components/input/Input.js";export{AnalyticsChip}from"./components/analytics-chips-and-dropdowns/AnalyticsChip.js";export{AnalyticsDropdown,EachItem,formatDate}from"./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js";export{AnalyticsMultiChip}from"./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js";export{AnalyticsMetric}from"./components/analytics-chips-and-dropdowns/AnalyticsMetric.js";export{AnalyticsTrend}from"./components/analytics-chips-and-dropdowns/AnalyticsTrend.js";export{LineChart}from"./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";export{LinearChipGroupedChart}from"./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js";export{Card,PieChartAnalytics}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";export{PieChart}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js";export{HorizontalGraph}from"./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";export{StackedBarChart}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";export{StackedBarDistributionChart}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js";export{GRAPH_ORIENTATION}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js";export{VerticalGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";export{FunnelVerticalBarGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js";export{HEAT,HEAT_COLORS,HEAT_GRADING_TYPE,HeatMap}from"./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";export{HeatBoxStyled,HeatMapVertical}from"./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js";export{VerticalBarAndLinearGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";export{TruncateValue,calculatePercentage,roundNumber,truncateValueForIndianStore,truncateValueForInternationalStore,truncateValueTo10K,truncateValueToA,truncateValueToB,truncateValueToC,truncateValueToK,truncateValueToL,truncateValueToM,truncateValueToT}from"./components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js";export{AVATAR_SIZE_VS_ICON_SIZE_MAP,Avatar,BACKGROUND_VS_TEXT_COLOR_MAP,MESSAGE_CHANNELS}from"./components/avatar/Avatar.js";export{AVATAR_BACKGROUND,AVATAR_SIZE_MAP,AVATAR_TYPES,SIZE}from"./components/avatar/AvatarHelper.js";export{Alert}from"./components/alerts/Alert.js";export{ALERT_TYPES,COLOR_CONFIG_MAP,CONTENT_POSITION}from"./components/alerts/AlertHelper.js";export{RATIO,Thumbnail}from"./components/thumbnail/Thumbnail.js";export{Curtain}from"./components/curtain/Curtain.js";export{DatePicker}from"./components/datePicker/DatePicker.js";export{DatePickerWrapper}from"./components/datePicker/DatePickerWrapper.js";export{Loader,Switch,SwitchContainer,Thumb}from"./components/switch/Switch.js";export{SubscriptionPlan}from"./components/plans/SubscriptionPlan.js";export{BottomWrapper,HeaderWrapper,SubscriptionPlanSelector,defaultTabs}from"./components/plans/SubscriptionPlanSelector.js";export{NewSubscriptionPlan}from"./components/plans/NewSubscriptionPlan.js";export{SubscriptionPlansCollected}from"./components/plans/SubscriptionPlansCollected.js";export{TabItemComponent,Tabs}from"./components/tabs/Tabs.js";export{DynamicTabs}from"./components/dynamic-tabs/DynamicTabs.js";export{BikShimmer}from"./components/shimmer/ShimmerComponent/BikShimmer.js";export{TablePagination}from"./components/TablePagination/TablePagination.js";export{TablePaginationCard,TablePaginationCardStyled}from"./components/TablePagination/TablePaginationCard.js";export{StateModalComponent}from"./components/states-modal/StateModalComponent.js";export{DeleteConfirmationModal}from"./components/states-modal/DeleteConfirmationModal.js";export{ButtonActions,ButtonTypes,StateComponent,StateInterface}from"./components/states/StateComponent.js";export{ShopifyScopeWrapper}from"./components/states/ShopifyScopeWrapper.js";export{WhatsAppTextEditor}from"./components/WhatsAppTextEditor/WhatsAppTextEditor.js";export{CustomRightBorder,EditorActionTypes,WhatsAppTextEditorHeader}from"./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js";export{BaseWhatsappContentLangHelper}from"./helpers/BaseWhatsappContentLang.helper.js";export{CURTAIN_COLOR_CONFIG_MAP,CURTAIN_MODE,CURTAIN_TYPES}from"./components/curtain/CurtainHelper.js";export{resizeImage}from"./utils/resizeImage.js";export{PickerType}from"./components/variable-picker-v3/model.js";export{CardSelectionModal}from"./components/card-selection-modal/CardSelectionModal.js";export{BikImageCropper}from"./components/image-cropper/BikImageCropper.js";export{BikImagePipeline}from"./components/image-cropper/BikImagePipeline/BikImagePipeline.js";export{ButtonGroup}from"./components/buttonGroup/ButtonGroup.js";export{BikAccordion}from"./components/accordion/Accordion.js";export{FileUploader}from"./components/file-uploader/FileUploader.js";export{ColourInput}from"./components/colourInput/ColourInput.js";export{BikHeader}from"./components/bik-layout/BikHeader.js";export{BikLayout}from"./components/bik-layout/BikLayout.js";export{BikProfile}from"./components/bik-layout/BikProfile.js";export{SimpleSidebar}from"./components/bik-layout/SimpleSidebar.js";export{BikSidebar}from"./components/bik-layout/BikSidebar.js";export{FeatureModal}from"./components/bik-layout/FeatureModal.js";export{SidebarSkeleton}from"./components/bik-layout/SidebarSkeleton.js";export{ShowShopifyRestrictedModal}from"./components/bik-layout/ShowShopifyRestrictedModal.js";export{FeatureModalV2}from"./components/bik-layout/FeatureModalV2.js";export{SearchBar}from"./components/searchBar/searchBar.js";export{CustomDateTime}from"./components/custom-date-time/CustomDateTime.js";export{PricePleaseProductPicker,ProductPickerContent}from"./components/product-picker/ProductPickerModal.js";export{DiscountModal}from"./components/discount-modal/DiscountModal.js";export{CouponExpiration}from"./components/discount-modal/CouponExpiration/CouponExpiration.js";export{COUPON_EXPIRATION,DISCOUNT_APPLIES_TO,DISCOUNT_TARGET_SELECTION,DISCOUNT_TARGET_TYPES,DISCOUNT_TYPES,DISCOUNT_VALUE_TYPES,MIN_PURCHASE_REQUIREMENT,OFFER_APPLIES_TO,initialDynamicCouponErrorState,initialStaticCouponErrorState}from"./components/discount-modal/type.js";export{CountryCodePicker}from"./components/country-code-picker/CountryCodePicker.js";export{CountriesData}from"./components/country-code-picker/CountryCodePicker.modal.js";export{DEFAULT_IMAGE,ShimmerImage}from"./components/shimmer-image/ShimmerImage.js";export{ProductPickerModal,ScreenName}from"./components/product-picker-v2/modal.js";export{Carousel}from"./components/carousel/carousel.js";export{CarouselSecondary,CarouselVersion}from"./components/carousel-secondary/CarouselSecondary.js";export{AccessTokenTroubleshootDialog}from"./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js";export{RadioList}from"./components/radioList/RadioList.js";export{CheckList}from"./components/checkList/CheckList.js";export{DateKeys,MEDIA_TYPES,PostPicker,dateOptions}from"./components/postPicker/postPicker.js";export{DropdownButton}from"./components/dropdown-button/DropdownButton.js";export{SideModal}from"./components/side-modal/SideModal.js";export{KeywordsInput}from"./components/keywords-input/KeywordsInput.js";export{AddVariableV2SideModal}from"./components/add-variableV2/AddVariableV2SideModal.js";export{AddVariableV2}from"./components/add-variableV2/AddVariableV2.js";export{NaLinkWrapper,NavigationHyperlink}from"./components/navigation-hyperlink/NavigationHyperlink.js";export{SearchFilter}from"./components/SearchFilter/index.js";export{InputWithVariables}from"./components/input-with-vars/InputWithVariables.js";export{DashboardReviewPopUp}from"./components/dashboard-review-popup/DashboardReviewPopUp.js";export{StarRating}from"./components/star-rating/StarRating.js";export{TestimonialCard}from"./components/testimonial-card/TestimonialCard.js";export{BikSlider}from"./components/slider/slider.js";export{ResizableImage}from"./components/resizeImage/index.js";export{validateURL}from"./utils/validator.js";export{CarouselPreview}from"./components/carousel-preview/CarouselPreview.js";export{Floater}from"./components/floater/floater.js";export{CardSelector}from"./components/card-selector/CardSelector.js";export{CardSelectorGroup}from"./components/card-selector/CardSelectorGroup.js";export{VariablePicker}from"./components/variable-picker-v3/VariablePicker.js";export{ActionButtons}from"./components/action-button/ActionButtons.js";export{ActivateBikAi}from"./components/ai-modals/ActivateBikAI.js";export{AiSyncProgress}from"./components/ai-modals/AiSyncProgress.js";export{AiCreditsExhausted}from"./components/ai-modals/AiCreditsExhausted.js";export{AiCreditsLow}from"./components/ai-modals/AiCreditsLow.js";export{CustomPortal}from"./components/input-with-vars/customPortal.js";export{FloatingInputDropdown}from"./components/floating-input-dropdown/FloatingInputDropdown.js";export{MultilevelDropdownPopover}from"./components/dropdown/MultilevelDropdownPopover/index.js";export{DropShadow}from"./components/dropShadow/DropShadow.js";export{MultiLevelDropdown}from"./components/multi-level-dropdown/MultiLevelDropdown.js";
1
+ export{AmplitudeEvent}from"./amplitude/index.js";import*as o from"./components/template-preview/constants/regexPatterns.js";export{o as regexPatterns};export{default as StringUtils}from"./utils/StringUtils.js";export{BASE_COLORS,COLORS,DEFAULT_THEME,FONTS}from"./constants/Theme.js";export{ComponentZindex}from"./constants/zindex.js";export{CheckBox}from"./components/checkBox/CheckBox.js";export{ListItem}from"./components/list-item/ListItem.js";export{Pagination}from"./components/pagination/Pagination.js";export{RadioButton}from"./components/radioButton/RadioButton.js";export{Toaster}from"./components/toaster/Toaster.js";export{Tooltip}from"./components/tooltips/Tooltip.js";export{PureSpinner,Spinner}from"./components/spinner/Spinner.js";export{Stepper}from"./components/stepper/Stepper.js";export{Tag}from"./components/tag/Tag.js";export{IconButton}from"./components/icon-button/IconButton.js";export{TemplatePreview}from"./components/template-preview/TemplatePreview.js";export{WhatsappLikePreview}from"./components/template-preview/WhatsApp/WhatsAppLikePreview.js";export{WhatsappLikePreviewV2}from"./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js";export{renderVariableUIForPreview}from"./components/template-preview/helpers/SmsTemplateHelper.js";export{WhatsAppFormatToHTML}from"./components/template-preview/helpers/WhatsAppFormatToHTML.js";export{VariableEditorHelper}from"./components/template-preview/helpers/VariableEditorHelper.js";export{ACTIONS_TYPES,CUSTOM_URL_NAME,HEADER_TYPES,STATIC_URL_CTA_OPTION,TEMPLATE_EDITOR,TEMPLATE_STATUS}from"./components/template-preview/models/TemplateMeta.js";export{BUTTON_TYPE,POD,TEMPLATE_QUALITY}from"./components/template-preview/models/WhatsAppTemplate.js";export{CHANNEL_TYPE}from"./components/template-preview/models/Channels.js";export{TemplateContextMapper}from"./components/template-context-mapper/TemplateContextMapper.js";export{getAllDataFromTemplateComponent,getAllDataFromWebpushTemplateComponent}from"./components/template-context-mapper/utils/getDataFromTemplateComponent.js";export{isVariable,validateIsUrl}from"./components/template-context-mapper/utils/validateIsUrl.js";import"./_virtual/_tslib.js";export{FABMenu}from"./components/fab-menu/FABMenu.js";export{FloatingActionButton}from"./components/floating-action-button/FloatingActionButton.js";export{DROP_POSITION,DropdownToggleContainer,FAB_POSITION,FloatingActionButtonContainer,FloatingActionButtonOuterContainer,MENU_ALIGNMENT,StyledDropdown,TooltipStyled}from"./components/floating-action-button/FloatingActionButton.styles.js";export{ImageService}from"./components/image-compress/ImageCompress.js";export{AiBodyCaption,AiBodyTiny,BodyCaption,BodyLarge,BodyPrimary,BodyPrimaryLink,BodyRegular,BodySecondary,BodySecondaryLink,BodySmall,BodyTiny,ButtonLarge,ButtonLargeAI,ButtonRegular,ButtonRegularAI,Caption,CaptionBold,Display,SmallRegular,SubHeading,TextPlaceholder,Tiny,TitleFour,TitleLarge,TitleMedium,TitleRegular,TitleSmall,TitleXlarge}from"./components/TypographyStyle.js";export{Button}from"./components/button/Button.js";export{ProgressBarComponent,ProgressCompletedBar}from"./components/progress-bar/ProgressBarComponent.js";import"react/jsx-runtime";export{ProgressBarType,ProgressBarV2,TextAlignment}from"./components/progress-bar-v2/ProgressBarV2.js";export{QueryBuilder}from"./components/QueryBuilder/QueryBuilder.js";export{BaseQueryBuilderNode}from"./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";export{PropertyNode,PropertyNodeHeadless}from"./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js";export{queryBuilderSlice}from"./components/QueryBuilder/redux/queryBuilder.reducer.js";export{queryBuilderCacheSlice}from"./components/QueryBuilder/redux/queryBuilderCache.reducer.js";export{AD_STRING_OPERATORS,ANY_AD_OPERATORS,ANY_IG_OPERATORS,BOOLEAN_OPERATORS,DATE_OPERATORS,EVENT_VALUES,EXACTLY_OPERATORS,FREQUENCY_OPERATORS,ICE_BREAKER_OPERATORS,IG_STRING_OPERATORS,INTEGER_OPERATORS,MAIL_SUBJECT_OPERATORS,REACTION_OPERATORS,SPECIFIC_IG_OPERATORS,STRING_OPERATORS,STRING_RESTRICTED_OPERATORS,STRING_RESTRICTED_OPERATORS_2,STRING_RESTRICTED_OPERATORS_3}from"./components/QueryBuilder/types/QueryBuilderOperator.type.js";export{StyledModal}from"./components/modals/styledModal.js";export{DropdownPopover}from"./components/dropdown/DropdownPopover/index.js";export{Dropdown}from"./components/dropdown/Dropdown.js";export{ChipDropdown,ChipDropdownContainer}from"./components/dropdown/ChipDropdown.js";export{OpenedDropdown}from"./components/dropdown/OpenedDropdown/components/OpennedDropdown.js";export{MenuItemDropdown}from"./components/dropdown/MenuItem/MenuItem.js";export{AnalyticsCard}from"./components/analytics-card/AnalyticsCard.js";export{AnalyticsContainer,CardDataContainer}from"./components/analytics-card/AnalyticsCard.styled.js";export{Input}from"./components/input/Input.js";export{AnalyticsChip}from"./components/analytics-chips-and-dropdowns/AnalyticsChip.js";export{AnalyticsDropdown,EachItem,formatDate}from"./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js";export{AnalyticsMultiChip}from"./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js";export{AnalyticsMetric}from"./components/analytics-chips-and-dropdowns/AnalyticsMetric.js";export{AnalyticsTrend}from"./components/analytics-chips-and-dropdowns/AnalyticsTrend.js";export{LineChart}from"./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";export{LinearChipGroupedChart}from"./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js";export{Card,PieChartAnalytics}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";export{PieChart}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js";export{HorizontalGraph}from"./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";export{StackedBarChart}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";export{StackedBarDistributionChart}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js";export{GRAPH_ORIENTATION}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js";export{VerticalGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";export{FunnelVerticalBarGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js";export{HEAT,HEAT_COLORS,HEAT_GRADING_TYPE,HeatMap}from"./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";export{HeatBoxStyled,HeatMapVertical}from"./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js";export{VerticalBarAndLinearGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";export{TruncateValue,calculatePercentage,roundNumber,truncateValueForIndianStore,truncateValueForInternationalStore,truncateValueTo10K,truncateValueToA,truncateValueToB,truncateValueToC,truncateValueToK,truncateValueToL,truncateValueToM,truncateValueToT}from"./components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js";export{AVATAR_SIZE_VS_ICON_SIZE_MAP,Avatar,BACKGROUND_VS_TEXT_COLOR_MAP,MESSAGE_CHANNELS}from"./components/avatar/Avatar.js";export{AVATAR_BACKGROUND,AVATAR_SIZE_MAP,AVATAR_TYPES,SIZE}from"./components/avatar/AvatarHelper.js";export{Alert}from"./components/alerts/Alert.js";export{ALERT_TYPES,COLOR_CONFIG_MAP,CONTENT_POSITION}from"./components/alerts/AlertHelper.js";export{RATIO,Thumbnail}from"./components/thumbnail/Thumbnail.js";export{Curtain}from"./components/curtain/Curtain.js";export{DatePicker}from"./components/datePicker/DatePicker.js";export{DatePickerWrapper}from"./components/datePicker/DatePickerWrapper.js";export{Loader,Switch,SwitchContainer,Thumb}from"./components/switch/Switch.js";export{SubscriptionPlan}from"./components/plans/SubscriptionPlan.js";export{BottomWrapper,HeaderWrapper,SubscriptionPlanSelector,defaultTabs}from"./components/plans/SubscriptionPlanSelector.js";export{NewSubscriptionPlan}from"./components/plans/NewSubscriptionPlan.js";export{SubscriptionPlansCollected}from"./components/plans/SubscriptionPlansCollected.js";export{TabItemComponent,Tabs}from"./components/tabs/Tabs.js";export{DynamicTabs}from"./components/dynamic-tabs/DynamicTabs.js";export{BikShimmer}from"./components/shimmer/ShimmerComponent/BikShimmer.js";export{TablePagination}from"./components/TablePagination/TablePagination.js";export{TablePaginationCard,TablePaginationCardStyled}from"./components/TablePagination/TablePaginationCard.js";export{StateModalComponent}from"./components/states-modal/StateModalComponent.js";export{DeleteConfirmationModal}from"./components/states-modal/DeleteConfirmationModal.js";export{ButtonActions,ButtonTypes,StateComponent,StateInterface}from"./components/states/StateComponent.js";export{ShopifyScopeWrapper}from"./components/states/ShopifyScopeWrapper.js";export{WhatsAppTextEditor}from"./components/WhatsAppTextEditor/WhatsAppTextEditor.js";export{CustomRightBorder,EditorActionTypes,WhatsAppTextEditorHeader}from"./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js";export{BaseWhatsappContentLangHelper}from"./helpers/BaseWhatsappContentLang.helper.js";export{CURTAIN_COLOR_CONFIG_MAP,CURTAIN_MODE,CURTAIN_TYPES}from"./components/curtain/CurtainHelper.js";export{resizeImage}from"./utils/resizeImage.js";export{PickerType}from"./components/variable-picker-v3/model.js";export{CardSelectionModal}from"./components/card-selection-modal/CardSelectionModal.js";export{BikImageCropper}from"./components/image-cropper/BikImageCropper.js";export{BikImagePipeline}from"./components/image-cropper/BikImagePipeline/BikImagePipeline.js";export{ButtonGroup}from"./components/buttonGroup/ButtonGroup.js";export{BikAccordion}from"./components/accordion/Accordion.js";export{FileUploader}from"./components/file-uploader/FileUploader.js";export{ColourInput}from"./components/colourInput/ColourInput.js";export{BikHeader}from"./components/bik-layout/BikHeader.js";export{BikLayout}from"./components/bik-layout/BikLayout.js";export{BikProfile}from"./components/bik-layout/BikProfile.js";export{SimpleSidebar}from"./components/bik-layout/SimpleSidebar.js";export{BikSidebar}from"./components/bik-layout/BikSidebar.js";export{FeatureModal}from"./components/bik-layout/FeatureModal.js";export{SidebarSkeleton}from"./components/bik-layout/SidebarSkeleton.js";export{ShowShopifyRestrictedModal}from"./components/bik-layout/ShowShopifyRestrictedModal.js";export{FeatureModalV2}from"./components/bik-layout/FeatureModalV2.js";export{SearchBar}from"./components/searchBar/searchBar.js";export{CustomDateTime}from"./components/custom-date-time/CustomDateTime.js";export{PricePleaseProductPicker,ProductPickerContent}from"./components/product-picker/ProductPickerModal.js";export{DiscountModal}from"./components/discount-modal/DiscountModal.js";export{CouponExpiration}from"./components/discount-modal/CouponExpiration/CouponExpiration.js";export{COUPON_EXPIRATION,DISCOUNT_APPLIES_TO,DISCOUNT_TARGET_SELECTION,DISCOUNT_TARGET_TYPES,DISCOUNT_TYPES,DISCOUNT_VALUE_TYPES,MIN_PURCHASE_REQUIREMENT,OFFER_APPLIES_TO,initialDynamicCouponErrorState,initialStaticCouponErrorState}from"./components/discount-modal/type.js";export{CountryCodePicker}from"./components/country-code-picker/CountryCodePicker.js";export{CountriesData}from"./components/country-code-picker/CountryCodePicker.modal.js";export{DEFAULT_IMAGE,ShimmerImage}from"./components/shimmer-image/ShimmerImage.js";export{ProductPickerModal,ScreenName}from"./components/product-picker-v2/modal.js";export{Carousel}from"./components/carousel/carousel.js";export{CarouselSecondary,CarouselVersion}from"./components/carousel-secondary/CarouselSecondary.js";export{AccessTokenTroubleshootDialog}from"./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js";export{RadioList}from"./components/radioList/RadioList.js";export{CheckList}from"./components/checkList/CheckList.js";export{DateKeys,MEDIA_TYPES,PostPicker,dateOptions}from"./components/postPicker/postPicker.js";export{DropdownButton}from"./components/dropdown-button/DropdownButton.js";export{SideModal}from"./components/side-modal/SideModal.js";export{KeywordsInput}from"./components/keywords-input/KeywordsInput.js";export{AddVariableV2SideModal}from"./components/add-variableV2/AddVariableV2SideModal.js";export{AddVariableV2}from"./components/add-variableV2/AddVariableV2.js";export{NaLinkWrapper,NavigationHyperlink}from"./components/navigation-hyperlink/NavigationHyperlink.js";export{SearchFilter}from"./components/SearchFilter/index.js";export{InputWithVariables}from"./components/input-with-vars/InputWithVariables.js";export{DashboardReviewPopUp}from"./components/dashboard-review-popup/DashboardReviewPopUp.js";export{StarRating}from"./components/star-rating/StarRating.js";export{TestimonialCard}from"./components/testimonial-card/TestimonialCard.js";export{BikSlider}from"./components/slider/slider.js";export{ResizableImage}from"./components/resizeImage/index.js";export{validateURL}from"./utils/validator.js";export{CarouselPreview}from"./components/carousel-preview/CarouselPreview.js";export{Floater}from"./components/floater/floater.js";export{CardSelector}from"./components/card-selector/CardSelector.js";export{CardSelectorGroup}from"./components/card-selector/CardSelectorGroup.js";export{VariablePicker}from"./components/variable-picker-v3/VariablePicker.js";export{ActionButtons}from"./components/action-button/ActionButtons.js";export{ActivateBikAi}from"./components/ai-modals/ActivateBikAI.js";export{AiSyncProgress}from"./components/ai-modals/AiSyncProgress.js";export{AiCreditsExhausted}from"./components/ai-modals/AiCreditsExhausted.js";export{AiCreditsLow}from"./components/ai-modals/AiCreditsLow.js";export{CustomPortal}from"./components/input-with-vars/customPortal.js";export{FloatingInputDropdown}from"./components/floating-input-dropdown/FloatingInputDropdown.js";export{MultilevelDropdownPopover}from"./components/dropdown/MultilevelDropdownPopover/index.js";export{DropShadow}from"./components/dropShadow/DropShadow.js";export{MultiLevelDropdown}from"./components/multi-level-dropdown/MultiLevelDropdown.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.634-aia-beta.6",
3
+ "version": "0.0.634-del.1",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var a=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),t||(t=r.createElement("path",{fill:"#616161",fillRule:"evenodd",d:"M9.5 1.852a.65.65 0 0 0-.65.65v2.35H6a.65.65 0 0 0-.65.65v2.35H3a.65.65 0 0 0-.65.65v3.85H2a.65.65 0 1 0 0 1.3h12a.65.65 0 0 0 0-1.3h-.35v-9.85a.65.65 0 0 0-.65-.65H9.5Zm.65 10.5v-9.2h2.2v9.2h-2.2Zm-3.5 0v-6.2h2.2v6.2h-2.2Zm-3 0v-3.2h1.7v3.2h-1.7Z",clipRule:"evenodd"})));exports.default=a;
@@ -1 +0,0 @@
1
- "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var a=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),t||(t=r.createElement("path",{fill:"#616161",fillRule:"evenodd",d:"M14.473 1.529a.665.665 0 0 1 .193.468v4.002a.667.667 0 1 1-1.333 0v-2.39L9.804 7.136a.667.667 0 1 1-.942-.943l3.528-3.529H10a.667.667 0 1 1 0-1.333h4c.183 0 .35.074.47.194l.002.003ZM7.138 9.803l-3.529 3.529H6a.667.667 0 0 1 0 1.333H1.999a.665.665 0 0 1-.468-.193l-.003-.003a.665.665 0 0 1-.194-.47v-4a.667.667 0 1 1 1.333 0v2.39l3.529-3.528a.667.667 0 1 1 .943.942Z",clipRule:"evenodd"})));exports.default=a;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { ComponentMeta, ComponentStory } from '@storybook/react';
3
- declare const _default: ComponentMeta<import("react").FC<import("../chart/VerticalBarGraph/VerticalGraph").VerticalGraphI>>;
4
- export default _default;
5
- export declare const VerticalGraphDefault: ComponentStory<import("react").FC<import("../chart/VerticalBarGraph/VerticalGraph").VerticalGraphI>>;
6
- export declare const VerticalFunnelGraph: ComponentStory<import("react").FC<import("../chart/VerticalBarGraph/VerticalGraph").VerticalGraphI>>;
7
- export declare const ZeroState: ComponentStory<import("react").FC<import("../chart/VerticalBarGraph/VerticalGraph").VerticalGraphI>>;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a=require("react/jsx-runtime"),e=require("../../../constants/Theme.js"),r=require("../chart/VerticalBarGraph/VerticalGraph.js");const t=e=>a.jsx(r.VerticalGraph,Object.assign({},e)),i=t.bind({});i.args={chartHeading:{heading:"Vertical Graph",color:e.COLORS.content.primary},barColorRGBA:{r:146,g:96,b:237,a:1},yAxis:{data:[1500,1400,1350,1200,1e3,920,800,600,450,300,100],title:"Engagement"},xAxis:{data:["May","June","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar"],title:"Months"}};const n=t.bind({});n.args={chartHeading:{heading:"Vertical Graph"},barColorRGBA:{r:146,g:96,b:237,a:1},yAxis:{data:[1500,1400,1350,1200,1e3,920,800,600,450,300,100],title:"Engagement"},xAxis:{data:["May","June","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar"],title:"Months"},isFunnel:!0};const s=t.bind({});s.args={chartHeading:{heading:"Vertical Graph"},xAxis:{data:["May","June","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar","Apr"]},yAxis:{data:[]}},exports.VerticalFunnelGraph=n,exports.VerticalGraphDefault=i,exports.ZeroState=s;
@@ -1 +0,0 @@
1
- import*as e from"react";var a;function t(){return t=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},t.apply(this,arguments)}var r=r=>e.createElement("svg",t({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},r),a||(a=e.createElement("path",{fill:"#616161",fillRule:"evenodd",d:"M9.5 1.852a.65.65 0 0 0-.65.65v2.35H6a.65.65 0 0 0-.65.65v2.35H3a.65.65 0 0 0-.65.65v3.85H2a.65.65 0 1 0 0 1.3h12a.65.65 0 0 0 0-1.3h-.35v-9.85a.65.65 0 0 0-.65-.65H9.5Zm.65 10.5v-9.2h2.2v9.2h-2.2Zm-3.5 0v-6.2h2.2v6.2h-2.2Zm-3 0v-3.2h1.7v3.2h-1.7Z",clipRule:"evenodd"})));export{r as default};
@@ -1 +0,0 @@
1
- import*as e from"react";var a;function t(){return t=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},t.apply(this,arguments)}var l=l=>e.createElement("svg",t({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},l),a||(a=e.createElement("path",{fill:"#616161",fillRule:"evenodd",d:"M14.473 1.529a.665.665 0 0 1 .193.468v4.002a.667.667 0 1 1-1.333 0v-2.39L9.804 7.136a.667.667 0 1 1-.942-.943l3.528-3.529H10a.667.667 0 1 1 0-1.333h4c.183 0 .35.074.47.194l.002.003ZM7.138 9.803l-3.529 3.529H6a.667.667 0 0 1 0 1.333H1.999a.665.665 0 0 1-.468-.193l-.003-.003a.665.665 0 0 1-.194-.47v-4a.667.667 0 1 1 1.333 0v2.39l3.529-3.528a.667.667 0 1 1 .943.942Z",clipRule:"evenodd"})));export{l as default};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { ComponentMeta, ComponentStory } from '@storybook/react';
3
- declare const _default: ComponentMeta<import("react").FC<import("../chart/VerticalBarGraph/VerticalGraph").VerticalGraphI>>;
4
- export default _default;
5
- export declare const VerticalGraphDefault: ComponentStory<import("react").FC<import("../chart/VerticalBarGraph/VerticalGraph").VerticalGraphI>>;
6
- export declare const VerticalFunnelGraph: ComponentStory<import("react").FC<import("../chart/VerticalBarGraph/VerticalGraph").VerticalGraphI>>;
7
- export declare const ZeroState: ComponentStory<import("react").FC<import("../chart/VerticalBarGraph/VerticalGraph").VerticalGraphI>>;
@@ -1 +0,0 @@
1
- import{jsx as a}from"react/jsx-runtime";import{COLORS as t}from"../../../constants/Theme.js";import{VerticalGraph as e}from"../chart/VerticalBarGraph/VerticalGraph.js";const r=t=>a(e,Object.assign({},t)),n=r.bind({});n.args={chartHeading:{heading:"Vertical Graph",color:t.content.primary},barColorRGBA:{r:146,g:96,b:237,a:1},yAxis:{data:[1500,1400,1350,1200,1e3,920,800,600,450,300,100],title:"Engagement"},xAxis:{data:["May","June","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar"],title:"Months"}};const i=r.bind({});i.args={chartHeading:{heading:"Vertical Graph"},barColorRGBA:{r:146,g:96,b:237,a:1},yAxis:{data:[1500,1400,1350,1200,1e3,920,800,600,450,300,100],title:"Engagement"},xAxis:{data:["May","June","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar"],title:"Months"},isFunnel:!0};const c=r.bind({});c.args={chartHeading:{heading:"Vertical Graph"},xAxis:{data:["May","June","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar","Apr"]},yAxis:{data:[]}};export{i as VerticalFunnelGraph,n as VerticalGraphDefault,c as ZeroState};